Merge branch 'master' into feature/postgresql-export-bytea

This commit is contained in:
Stela Augustinova
2025-11-13 13:44:11 +01:00
161 changed files with 5638 additions and 1627 deletions

View File

@@ -6,9 +6,13 @@ name: Electron app BETA
push: push:
tags: tags:
- v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+ - v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+
permissions:
id-token: write
contents: write
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
environment: dbgate-app
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -60,21 +64,53 @@ jobs:
- name: Install Snapcraft - name: Install Snapcraft
if: matrix.os == 'ubuntu-22.04' if: matrix.os == 'ubuntu-22.04'
uses: samuelmeuli/action-snapcraft@v1 uses: samuelmeuli/action-snapcraft@v1
- name: Publish - name: Publish Windows
if: matrix.os == 'windows-2022'
run: |
yarn run build:app
- name: Publish MacOS
if: matrix.os == 'macos-14'
run: | run: |
yarn run build:app yarn run build:app
env: env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }}
CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }} CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }}
CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }} CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}} APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}
- name: Publish Linux
if: matrix.os == 'ubuntu-22.04'
run: |
yarn run build:app
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
- name: Azure login (OIDC)
uses: azure/login@v2
if: matrix.os == 'windows-2022'
with:
client-id: ${{ secrets.AZURE_TC_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TC_TENANT_ID }}
allow-no-subscriptions: true
- name: Sign Windows artifacts with Azure Trusted Signing
uses: azure/trusted-signing-action@v0
if: matrix.os == 'windows-2022'
with:
endpoint: https://wus3.codesigning.azure.net/
trusted-signing-account-name: DbGate
certificate-profile-name: DbGate-Release
files-folder: app/dist
files-folder-filter: exe
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Fix YML hashes
if: matrix.os == 'windows-2022'
run: |
yarn run fixYmlHashes
- name: Copy artifacts - name: Copy artifacts
run: | run: |
mkdir artifacts mkdir artifacts

View File

@@ -6,9 +6,13 @@ name: Electron app check build
push: push:
tags: tags:
- check-[0-9]+-[0-9]+-[0-9]+.[0-9]+ - check-[0-9]+-[0-9]+-[0-9]+.[0-9]+
permissions:
id-token: write
contents: write
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
environment: dbgate-app
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -56,21 +60,53 @@ jobs:
- name: Install Snapcraft - name: Install Snapcraft
if: matrix.os == 'ubuntu-22.04' if: matrix.os == 'ubuntu-22.04'
uses: samuelmeuli/action-snapcraft@v1 uses: samuelmeuli/action-snapcraft@v1
- name: Publish - name: Publish Windows
if: matrix.os == 'windows-2022'
run: |
yarn run build:app
- name: Publish MacOS
if: matrix.os == 'macos-14'
run: | run: |
yarn run build:app yarn run build:app
env: env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }}
CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }} CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }}
CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }} CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}} APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}
- name: Publish Linux
if: matrix.os == 'ubuntu-22.04'
run: |
yarn run build:app
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
- name: Azure login (OIDC)
uses: azure/login@v2
if: matrix.os == 'windows-2022'
with:
client-id: ${{ secrets.AZURE_TC_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TC_TENANT_ID }}
allow-no-subscriptions: true
- name: Sign Windows artifacts with Azure Trusted Signing
uses: azure/trusted-signing-action@v0
if: matrix.os == 'windows-2022'
with:
endpoint: https://wus3.codesigning.azure.net/
trusted-signing-account-name: DbGate
certificate-profile-name: DbGate-Release
files-folder: app/dist
files-folder-filter: exe
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Fix YML hashes
if: matrix.os == 'windows-2022'
run: |
yarn run fixYmlHashes
- name: Copy artifacts - name: Copy artifacts
run: | run: |
mkdir artifacts mkdir artifacts

View File

@@ -6,9 +6,13 @@ name: Electron app PREMIUM BETA
push: push:
tags: tags:
- v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+ - v[0-9]+.[0-9]+.[0-9]+-premium-beta.[0-9]+
permissions:
id-token: write
contents: write
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
environment: dbgate-app
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -39,7 +43,7 @@ jobs:
repository: dbgate/dbgate-pro repository: dbgate/dbgate-pro
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
path: dbgate-pro path: dbgate-pro
ref: 11203754aad94189b565c2816d37760b15c8e07f ref: f27a03d4aff5b00a009643df146a9c17bdbf7801
- name: Merge dbgate/dbgate-pro - name: Merge dbgate/dbgate-pro
run: | run: |
mkdir ../dbgate-pro mkdir ../dbgate-pro
@@ -87,23 +91,61 @@ jobs:
cd dbgate-merged cd dbgate-merged
yarn fillPackagedPlugins yarn fillPackagedPlugins
- name: Publish - name: Publish Windows
if: matrix.os == 'windows-2022'
run: |
cd ..
cd dbgate-merged
yarn run build:app
- name: Publish MacOS
if: matrix.os == 'macos-14'
run: | run: |
cd .. cd ..
cd dbgate-merged cd dbgate-merged
yarn run build:app yarn run build:app
env: env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }}
CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }} CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }}
CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }} CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}} APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}
- name: Publish Linux
if: matrix.os == 'ubuntu-22.04'
run: |
cd ..
cd dbgate-merged
yarn run build:app
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
- name: Azure login (OIDC)
uses: azure/login@v2
if: matrix.os == 'windows-2022'
with:
client-id: ${{ secrets.AZURE_TC_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TC_TENANT_ID }}
allow-no-subscriptions: true
- name: Sign Windows artifacts with Azure Trusted Signing
uses: azure/trusted-signing-action@v0
if: matrix.os == 'windows-2022'
with:
endpoint: https://wus3.codesigning.azure.net/
trusted-signing-account-name: DbGate
certificate-profile-name: DbGate-Release
files-folder: ../dbgate-merged/app/dist
files-folder-filter: exe
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Fix YML hashes
if: matrix.os == 'windows-2022'
run: |
cd ..
cd dbgate-merged
yarn run fixYmlHashes
- name: Copy artifacts - name: Copy artifacts
run: | run: |
mkdir artifacts mkdir artifacts

View File

@@ -6,9 +6,13 @@ name: Electron app PREMIUM
push: push:
tags: tags:
- v[0-9]+.[0-9]+.[0-9]+ - v[0-9]+.[0-9]+.[0-9]+
permissions:
id-token: write
contents: write
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
environment: dbgate-app
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -39,7 +43,7 @@ jobs:
repository: dbgate/dbgate-pro repository: dbgate/dbgate-pro
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
path: dbgate-pro path: dbgate-pro
ref: 11203754aad94189b565c2816d37760b15c8e07f ref: f27a03d4aff5b00a009643df146a9c17bdbf7801
- name: Merge dbgate/dbgate-pro - name: Merge dbgate/dbgate-pro
run: | run: |
mkdir ../dbgate-pro mkdir ../dbgate-pro
@@ -87,23 +91,61 @@ jobs:
cd dbgate-merged cd dbgate-merged
yarn fillPackagedPlugins yarn fillPackagedPlugins
- name: Publish - name: Publish Windows
if: matrix.os == 'windows-2022'
run: |
cd ..
cd dbgate-merged
yarn run build:app
- name: Publish MacOS
if: matrix.os == 'macos-14'
run: | run: |
cd .. cd ..
cd dbgate-merged cd dbgate-merged
yarn run build:app yarn run build:app
env: env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }}
CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }} CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }}
CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }} CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}} APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}
- name: Publish Linux
if: matrix.os == 'ubuntu-22.04'
run: |
cd ..
cd dbgate-merged
yarn run build:app
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
- name: Azure login (OIDC)
uses: azure/login@v2
if: matrix.os == 'windows-2022'
with:
client-id: ${{ secrets.AZURE_TC_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TC_TENANT_ID }}
allow-no-subscriptions: true
- name: Sign Windows artifacts with Azure Trusted Signing
uses: azure/trusted-signing-action@v0
if: matrix.os == 'windows-2022'
with:
endpoint: https://wus3.codesigning.azure.net/
trusted-signing-account-name: DbGate
certificate-profile-name: DbGate-Release
files-folder: ../dbgate-merged/app/dist
files-folder-filter: exe
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Fix YML hashes
if: matrix.os == 'windows-2022'
run: |
cd ..
cd dbgate-merged
yarn run fixYmlHashes
- name: Copy artifacts - name: Copy artifacts
run: | run: |
mkdir artifacts mkdir artifacts

View File

@@ -6,9 +6,13 @@ name: Electron app
push: push:
tags: tags:
- v[0-9]+.[0-9]+.[0-9]+ - v[0-9]+.[0-9]+.[0-9]+
permissions:
id-token: write
contents: write
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
environment: dbgate-app
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -56,24 +60,56 @@ jobs:
- name: Install Snapcraft - name: Install Snapcraft
if: matrix.os == 'ubuntu-22.04' if: matrix.os == 'ubuntu-22.04'
uses: samuelmeuli/action-snapcraft@v1 uses: samuelmeuli/action-snapcraft@v1
- name: Publish - name: Publish Windows
if: matrix.os == 'windows-2022'
run: |
yarn run build:app
- name: Publish MacOS
if: matrix.os == 'macos-14'
run: | run: |
yarn run build:app yarn run build:app
env: env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
WIN_CSC_LINK: ${{ secrets.WINCERT_2025 }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WINCERT_2025_PASSWORD }}
CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }} CSC_LINK: ${{ secrets.APPLECERT_CERTIFICATE }}
CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }} CSC_KEY_PASSWORD: ${{ secrets.APPLECERT_PASSWORD }}
APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}} APPLE_APP_SPECIFIC_PASSWORD: ${{secrets.APPLE_APP_SPECIFIC_PASSWORD}}
- name: Publish Linux
if: matrix.os == 'ubuntu-22.04'
run: |
yarn run build:app
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{secrets.SNAPCRAFT_LOGIN}}
- name: generatePadFile - name: generatePadFile
run: | run: |
yarn generatePadFile yarn generatePadFile
- name: Azure login (OIDC)
uses: azure/login@v2
if: matrix.os == 'windows-2022'
with:
client-id: ${{ secrets.AZURE_TC_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TC_TENANT_ID }}
allow-no-subscriptions: true
- name: Sign Windows artifacts with Azure Trusted Signing
uses: azure/trusted-signing-action@v0
if: matrix.os == 'windows-2022'
with:
endpoint: https://wus3.codesigning.azure.net/
trusted-signing-account-name: DbGate
certificate-profile-name: DbGate-Release
files-folder: app/dist
files-folder-filter: exe
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Fix YML hashes
if: matrix.os == 'windows-2022'
run: |
yarn run fixYmlHashes
- name: Copy artifacts - name: Copy artifacts
run: | run: |
mkdir artifacts mkdir artifacts

View File

@@ -39,7 +39,7 @@ jobs:
repository: dbgate/dbgate-pro repository: dbgate/dbgate-pro
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
path: dbgate-pro path: dbgate-pro
ref: 11203754aad94189b565c2816d37760b15c8e07f ref: f27a03d4aff5b00a009643df146a9c17bdbf7801
- name: Merge dbgate/dbgate-pro - name: Merge dbgate/dbgate-pro
run: | run: |
mkdir ../dbgate-pro mkdir ../dbgate-pro

View File

@@ -44,7 +44,7 @@ jobs:
repository: dbgate/dbgate-pro repository: dbgate/dbgate-pro
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
path: dbgate-pro path: dbgate-pro
ref: 11203754aad94189b565c2816d37760b15c8e07f ref: f27a03d4aff5b00a009643df146a9c17bdbf7801
- name: Merge dbgate/dbgate-pro - name: Merge dbgate/dbgate-pro
run: | run: |
mkdir ../dbgate-pro mkdir ../dbgate-pro

View File

@@ -7,6 +7,9 @@ name: NPM packages PREMIUM
tags: tags:
- v[0-9]+.[0-9]+.[0-9]+ - v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+ - v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+
permissions:
id-token: write
contents: write
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@@ -32,7 +35,7 @@ jobs:
repository: dbgate/dbgate-pro repository: dbgate/dbgate-pro
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
path: dbgate-pro path: dbgate-pro
ref: 11203754aad94189b565c2816d37760b15c8e07f ref: f27a03d4aff5b00a009643df146a9c17bdbf7801
- name: Merge dbgate/dbgate-pro - name: Merge dbgate/dbgate-pro
run: | run: |
mkdir ../dbgate-pro mkdir ../dbgate-pro
@@ -49,13 +52,8 @@ jobs:
cd .. cd ..
cd dbgate-merged cd dbgate-merged
node adjustNpmPackageJsonPremium node adjustNpmPackageJsonPremium
- name: Configure NPM token - name: Update npm
env: run: npm install -g npm@latest
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd ..
cd dbgate-merged
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
- name: Remove dbmodel - should be not published - name: Remove dbmodel - should be not published
run: | run: |
cd .. cd ..
@@ -71,28 +69,35 @@ jobs:
cd .. cd ..
cd dbgate-merged cd dbgate-merged
yarn setCurrentVersion yarn setCurrentVersion
- name: Compute npm dist-tag
run: |
if [[ "${GITHUB_REF_NAME}" =~ -alpha\. ]]; then
echo "NPM_TAG=alpha" >> $GITHUB_ENV
else
echo "NPM_TAG=latest" >> $GITHUB_ENV
fi
- name: Publish dbgate-api-premium - name: Publish dbgate-api-premium
run: | run: |
cd .. cd ..
cd dbgate-merged/packages/api cd dbgate-merged/packages/api
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-web-premium - name: Publish dbgate-web-premium
run: | run: |
cd .. cd ..
cd dbgate-merged/packages/web cd dbgate-merged/packages/web
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-serve-premium - name: Publish dbgate-serve-premium
run: | run: |
cd .. cd ..
cd dbgate-merged/packages/serve cd dbgate-merged/packages/serve
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-cosmosdb - name: Publish dbgate-plugin-cosmosdb
run: | run: |
cd .. cd ..
cd dbgate-merged/plugins/dbgate-plugin-cosmosdb cd dbgate-merged/plugins/dbgate-plugin-cosmosdb
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-firestore - name: Publish dbgate-plugin-firestore
run: | run: |
cd .. cd ..
cd dbgate-merged/plugins/dbgate-plugin-firestore cd dbgate-merged/plugins/dbgate-plugin-firestore
npm publish npm publish --tag "$NPM_TAG"

View File

@@ -7,6 +7,9 @@ name: NPM packages
tags: tags:
- v[0-9]+.[0-9]+.[0-9]+ - v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+ - v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+
permissions:
id-token: write
contents: write
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@@ -26,103 +29,107 @@ jobs:
uses: actions/setup-node@v1 uses: actions/setup-node@v1
with: with:
node-version: 22.x node-version: 22.x
- name: Configure NPM token - name: Update npm
env: run: npm install -g npm@latest
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
- name: yarn install - name: yarn install
run: | run: |
yarn install yarn install
- name: setCurrentVersion - name: setCurrentVersion
run: | run: |
yarn setCurrentVersion yarn setCurrentVersion
- name: Compute npm dist-tag
run: |
if [[ "${GITHUB_REF_NAME}" =~ -alpha\. ]]; then
echo "NPM_TAG=alpha" >> $GITHUB_ENV
else
echo "NPM_TAG=latest" >> $GITHUB_ENV
fi
- name: Publish types - name: Publish types
working-directory: packages/types working-directory: packages/types
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish tools - name: Publish tools
working-directory: packages/tools working-directory: packages/tools
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish sqltree - name: Publish sqltree
working-directory: packages/sqltree working-directory: packages/sqltree
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish api - name: Publish api
working-directory: packages/api working-directory: packages/api
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish datalib - name: Publish datalib
working-directory: packages/datalib working-directory: packages/datalib
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish filterparser - name: Publish filterparser
working-directory: packages/filterparser working-directory: packages/filterparser
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish web - name: Publish web
working-directory: packages/web working-directory: packages/web
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-serve - name: Publish dbgate-serve
working-directory: packages/serve working-directory: packages/serve
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbmodel - name: Publish dbmodel
working-directory: packages/dbmodel working-directory: packages/dbmodel
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-csv - name: Publish dbgate-plugin-csv
working-directory: plugins/dbgate-plugin-csv working-directory: plugins/dbgate-plugin-csv
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-xml - name: Publish dbgate-plugin-xml
working-directory: plugins/dbgate-plugin-xml working-directory: plugins/dbgate-plugin-xml
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-excel - name: Publish dbgate-plugin-excel
working-directory: plugins/dbgate-plugin-excel working-directory: plugins/dbgate-plugin-excel
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-mssql - name: Publish dbgate-plugin-mssql
working-directory: plugins/dbgate-plugin-mssql working-directory: plugins/dbgate-plugin-mssql
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-mysql - name: Publish dbgate-plugin-mysql
working-directory: plugins/dbgate-plugin-mysql working-directory: plugins/dbgate-plugin-mysql
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-mongo - name: Publish dbgate-plugin-mongo
working-directory: plugins/dbgate-plugin-mongo working-directory: plugins/dbgate-plugin-mongo
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-postgres - name: Publish dbgate-plugin-postgres
working-directory: plugins/dbgate-plugin-postgres working-directory: plugins/dbgate-plugin-postgres
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-sqlite - name: Publish dbgate-plugin-sqlite
working-directory: plugins/dbgate-plugin-sqlite working-directory: plugins/dbgate-plugin-sqlite
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-redis - name: Publish dbgate-plugin-redis
working-directory: plugins/dbgate-plugin-redis working-directory: plugins/dbgate-plugin-redis
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-oracle - name: Publish dbgate-plugin-oracle
working-directory: plugins/dbgate-plugin-oracle working-directory: plugins/dbgate-plugin-oracle
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-clickhouse - name: Publish dbgate-plugin-clickhouse
working-directory: plugins/dbgate-plugin-clickhouse working-directory: plugins/dbgate-plugin-clickhouse
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-dbf - name: Publish dbgate-plugin-dbf
working-directory: plugins/dbgate-plugin-dbf working-directory: plugins/dbgate-plugin-dbf
run: | run: |
npm publish npm publish --tag "$NPM_TAG"
- name: Publish dbgate-plugin-cassandra - name: Publish dbgate-plugin-cassandra
working-directory: plugins/dbgate-plugin-cassandra working-directory: plugins/dbgate-plugin-cassandra
run: | run: |
npm publish npm publish --tag "$NPM_TAG"

View File

@@ -26,7 +26,7 @@ jobs:
repository: dbgate/dbgate-pro repository: dbgate/dbgate-pro
token: ${{ secrets.GH_TOKEN }} token: ${{ secrets.GH_TOKEN }}
path: dbgate-pro path: dbgate-pro
ref: 11203754aad94189b565c2816d37760b15c8e07f ref: f27a03d4aff5b00a009643df146a9c17bdbf7801
- name: Merge dbgate/dbgate-pro - name: Merge dbgate/dbgate-pro
run: | run: |
mkdir ../dbgate-pro mkdir ../dbgate-pro

View File

@@ -8,12 +8,37 @@ Builds:
- linux - application for linux - linux - application for linux
- win - application for Windows - win - application for Windows
## 6.6.11
- FIXED: Fixed theming on application startup
- CHANGED: Improved licensing page
## 6.6.10
- FIXED: License from environment variable is not refreshed #1245
- FIXED: connection closing / reconnecting #1237
- ADDED: retain history across multiple queries #1236
- ADDED: load CSVs to temp tables #1235
- FIXED: Not possible to scroll the data view horizontally by pressing shift and scroll mouse middle button on Mac #453
- FIXED: Expired trial workflow (Premium)
- ADDED: Column name collision resolving #1234 (MySQL)
## 6.6.8
- CHANGED: Windows executable now uses Azure trusted signing certificate
- CHANGED: NPM packages now use GitHub OIDC provenance signing for better security
- CHANGED: Some features moved to Premium edition (master/detail views, FK lookups, column expansion, split view, advanced export/import, data archives, grouping, macros)
## 6.6.6
- ADDED: Allow disable/re-enable filter #1174
- ADDED: Close right side tabs #1219
- ADDED: Ability disable execute current line in query editor #1209
- ADDED: Support for Redis Cluster #1204 (Premium)
## 6.6.5 ## 6.6.5
- ADDED: SQL AI assistant - powered by database chat, could help you to write SQL queries (Premium) - ADDED: SQL AI assistant - powered by database chat, could help you to write SQL queries (Premium)
- ADDED: Explain SQL error (powered by AI) (Premium) - ADDED: Explain SQL error (powered by AI) (Premium)
- ADDED: Database chat (and SQL AI Assistant) now supports showing charts (Premium) - ADDED: Database chat (and SQL AI Assistant) now supports showing charts (Premium)
- FIXED: Fxied editing new files and roles (Team Premium) - FIXED: Fxied editing new files and roles (Team Premium)
- FIXED: Connection to standalone database could be now pinned - FIXED: Connection to standalone database could be now pinned
- FIXED: Cannot open up large JSON file #1215
## 6.6.4 ## 6.6.4
- ADDED: AI Database chat now supports much more LLM models. (Premium) - ADDED: AI Database chat now supports much more LLM models. (Premium)

View File

@@ -16,12 +16,9 @@ DbGate is licensed under GPL-3.0 license and is free to use for any purpose.
* Try it online - [demo.dbgate.org](https://demo.dbgate.org) - online demo application * Try it online - [demo.dbgate.org](https://demo.dbgate.org) - online demo application
* **Download** application for Windows, Linux or Mac from [dbgate.io](https://www.dbgate.io/download/) * **Download** application for Windows, Linux or Mac from [dbgate.io](https://www.dbgate.io/download/)
* Looking for DbGate Community? **Download** from [dbgate.org](https://dbgate.org/download/) * Looking for DbGate Community? **Download** from [dbgate.io](https://www.dbgate.io/download-community/)
* Run web version as [NPM package](https://www.npmjs.com/package/dbgate-serve) or as [docker image](https://hub.docker.com/r/dbgate/dbgate) * Run web version as [NPM package](https://www.npmjs.com/package/dbgate-serve) or as [docker image](https://hub.docker.com/r/dbgate/dbgate)
* Use nodeJs [scripting interface](https://docs.dbgate.io/scripting) ([API documentation](https://docs.dbgate.io/apidoc)) * Use nodeJs [scripting interface](https://docs.dbgate.io/scripting) ([API documentation](https://docs.dbgate.io/apidoc))
* [Recommend DbGate](https://testimonial.to/dbgate) | [Rate on G2](https://www.g2.com/products/dbgate/reviews)
* [Give us feedback](https://dbgate.org/feedback) - it will help us to decide, how to improve DbGate in future
* We [offer 2-year PREMIUM license](https://dbgate.org/review/) for any honest review on these platforms (time-limited offer)
## Supported databases ## Supported databases
* MySQL * MySQL
@@ -93,7 +90,6 @@ Any contributions are welcome. If you want to contribute without coding, conside
* Tell your friends about DbGate or share on social networks - when more people will use DbGate, it will grow to be better * Tell your friends about DbGate or share on social networks - when more people will use DbGate, it will grow to be better
* Purchase a [DbGate Premium](https://www.dbgate.io/purchase/premium/) license * Purchase a [DbGate Premium](https://www.dbgate.io/purchase/premium/) license
* Write review on [Product Hunt](https://www.producthunt.com/products/dbgate) or [G2](https://www.g2.com/products/dbgate/reviews) - we offer [2-year PREMIUM license](https://dbgate.org/review/) for reviewers (time limited offer)
* Create issue, if you find problem in app, or you have idea to new feature. If issue already exists, you could leave comment on it, to prioritise most wanted issues * Create issue, if you find problem in app, or you have idea to new feature. If issue already exists, you could leave comment on it, to prioritise most wanted issues
* Create some tutorial video on [youtube](https://www.youtube.com/playlist?list=PLCo7KjCVXhr0RfUSjM9wJMsp_ShL1q61A) * Create some tutorial video on [youtube](https://www.youtube.com/playlist?list=PLCo7KjCVXhr0RfUSjM9wJMsp_ShL1q61A)
* Become a backer on [GitHub sponsors](https://github.com/sponsors/dbgate) or [Open collective](https://opencollective.com/dbgate) * Become a backer on [GitHub sponsors](https://github.com/sponsors/dbgate) or [Open collective](https://opencollective.com/dbgate)

View File

@@ -117,7 +117,7 @@
"scripts": { "scripts": {
"start": "cross-env ELECTRON_START_URL=http://localhost:5001 DEVMODE=1 electron .", "start": "cross-env ELECTRON_START_URL=http://localhost:5001 DEVMODE=1 electron .",
"start:local": "cross-env electron .", "start:local": "cross-env electron .",
"dist": "electron-builder", "dist": "electron-builder --publish never",
"build": "cd ../packages/api && yarn build && cd ../web && yarn build && cd ../../app && yarn dist", "build": "cd ../packages/api && yarn build && cd ../web && yarn build && cd ../../app && yarn dist",
"build:local": "cd ../packages/api && yarn build && cd ../web && yarn build && cd ../../app && yarn predist", "build:local": "cd ../packages/api && yarn build && cd ../web && yarn build && cd ../../app && yarn predist",
"postinstall": "yarn rebuild && patch-package", "postinstall": "yarn rebuild && patch-package",
@@ -128,7 +128,7 @@
"devDependencies": { "devDependencies": {
"copyfiles": "^2.2.0", "copyfiles": "^2.2.0",
"cross-env": "^6.0.3", "cross-env": "^6.0.3",
"electron": "30.0.2", "electron": "38.6.0",
"electron-builder": "25.1.8" "electron-builder": "25.1.8"
} }
} }

View File

@@ -85,7 +85,7 @@ function formatKeyText(keyText) {
return keyText.replace('CtrlOrCommand+', 'Ctrl+'); return keyText.replace('CtrlOrCommand+', 'Ctrl+');
} }
function commandItem(item) { function commandItem(item, disableAll = false) {
const id = item.command; const id = item.command;
const command = commands[id]; const command = commands[id];
if (item.skipInApp) { if (item.skipInApp) {
@@ -95,7 +95,7 @@ function commandItem(item) {
id, id,
label: command ? command.menuName || command.toolbarName || command.name : id, label: command ? command.menuName || command.toolbarName || command.name : id,
accelerator: formatKeyText(command ? command.keyText : undefined), accelerator: formatKeyText(command ? command.keyText : undefined),
enabled: command ? command.enabled : false, enabled: command ? command.enabled && !disableAll : false,
click() { click() {
if (mainWindow) { if (mainWindow) {
mainWindow.webContents.send('run-command', id); mainWindow.webContents.send('run-command', id);
@@ -107,14 +107,14 @@ function commandItem(item) {
}; };
} }
function buildMenu() { function buildMenu(disableAll = false) {
let template = _cloneDeepWith(mainMenuDefinition({ editMenu: true, isMac: isMac() }), item => { let template = _cloneDeepWith(mainMenuDefinition({ editMenu: true, isMac: isMac() }), item => {
if (item.divider) { if (item.divider) {
return { type: 'separator' }; return { type: 'separator' };
} }
if (item.command) { if (item.command) {
return commandItem(item); return commandItem(item, disableAll);
} }
}); });
@@ -129,7 +129,7 @@ function buildMenu() {
{ {
label: 'DbGate', label: 'DbGate',
submenu: [ submenu: [
commandItem({ command: 'about.show' }), commandItem({ command: 'about.show' }, disableAll),
{ role: 'services' }, { role: 'services' },
{ role: 'hide' }, { role: 'hide' },
{ role: 'hideOthers' }, { role: 'hideOthers' },
@@ -145,7 +145,10 @@ function buildMenu() {
} }
ipcMain.on('update-commands', async (event, arg) => { ipcMain.on('update-commands', async (event, arg) => {
commands = JSON.parse(arg); const parsed = JSON.parse(arg);
commands = parsed.commands;
const isModalOpened = parsed.isModalOpened;
const dbgatePage = parsed.dbgatePage;
for (const key of Object.keys(commands)) { for (const key of Object.keys(commands)) {
const menu = mainMenu.getMenuItemById(key); const menu = mainMenu.getMenuItemById(key);
if (!menu) continue; if (!menu) continue;
@@ -153,14 +156,14 @@ ipcMain.on('update-commands', async (event, arg) => {
// rebuild menu // rebuild menu
if (menu.label != command.text || menu.accelerator != command.keyText) { if (menu.label != command.text || menu.accelerator != command.keyText) {
mainMenu = buildMenu(); mainMenu = buildMenu(isModalOpened || !!dbgatePage);
Menu.setApplicationMenu(mainMenu); Menu.setApplicationMenu(mainMenu);
// mainWindow.setMenu(mainMenu); // mainWindow.setMenu(mainMenu);
return; return;
} }
menu.enabled = command.enabled; menu.enabled = command.enabled && !isModalOpened && !dbgatePage;
} }
}); });
ipcMain.on('quit-app', async (event, arg) => { ipcMain.on('quit-app', async (event, arg) => {

View File

@@ -16,9 +16,9 @@
ajv-keywords "^3.4.1" ajv-keywords "^3.4.1"
"@electron/asar@^3.2.7": "@electron/asar@^3.2.7":
version "3.2.17" version "3.4.1"
resolved "https://registry.yarnpkg.com/@electron/asar/-/asar-3.2.17.tgz#91d28087aad80d1a1c8cc4e667c6476edf50f949" resolved "https://registry.yarnpkg.com/@electron/asar/-/asar-3.4.1.tgz#4e9196a4b54fba18c56cd8d5cac67c5bdc588065"
integrity sha512-OcWImUI686w8LkghQj9R2ynZ2ME693Ek6L1SiaAgqGKzBaTIZw3fHDqN82Rcl+EU1Gm9EgkJ5KLIY/q5DCRbbA== integrity sha512-i4/rNPRS84t0vSRa2HorerGRXWyF4vThfHesw0dmcWHp+cspK743UanA0suA5Q5y8kzY2y6YKrvbIUn69BCAiA==
dependencies: dependencies:
commander "^5.0.0" commander "^5.0.0"
glob "^7.1.6" glob "^7.1.6"
@@ -98,6 +98,18 @@
resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6"
integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==
"@isaacs/balanced-match@^4.0.1":
version "4.0.1"
resolved "https://registry.yarnpkg.com/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz#3081dadbc3460661b751e7591d7faea5df39dd29"
integrity sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==
"@isaacs/brace-expansion@^5.0.0":
version "5.0.0"
resolved "https://registry.yarnpkg.com/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz#4b3dabab7d8e75a429414a96bd67bf4c1d13e0f3"
integrity sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==
dependencies:
"@isaacs/balanced-match" "^4.0.1"
"@isaacs/cliui@^8.0.2": "@isaacs/cliui@^8.0.2":
version "8.0.2" version "8.0.2"
resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
@@ -202,16 +214,23 @@
"@types/node" "*" "@types/node" "*"
"@types/ms@*": "@types/ms@*":
version "0.7.34" version "2.1.0"
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.34.tgz#10964ba0dee6ac4cd462e2795b6bebd407303433" resolved "https://registry.yarnpkg.com/@types/ms/-/ms-2.1.0.tgz#052aa67a48eccc4309d7f0191b7e41434b90bb78"
integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g== integrity sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==
"@types/node@*", "@types/node@^20.9.0": "@types/node@*":
version "20.12.10" version "24.10.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.12.10.tgz#8f0c3f12b0f075eee1fe20c1afb417e9765bef76" resolved "https://registry.yarnpkg.com/@types/node/-/node-24.10.0.tgz#6b79086b0dfc54e775a34ba8114dcc4e0221f31f"
integrity sha512-Eem5pH9pmWBHoGAT8Dr5fdc5rYA+4NAovdM4EktRPVAAiJhmWWfQrA0cFhAbOsQdSfIHjAud6YdkbL69+zSKjw== integrity sha512-qzQZRBqkFsYyaSWXuEHc2WR9c0a0CXwiE5FWUvn7ZM+vdy1uZLfCunD38UzhuB7YN/J11ndbDBcTmOdxJo9Q7A==
dependencies: dependencies:
undici-types "~5.26.4" undici-types "~7.16.0"
"@types/node@^22.7.7":
version "22.19.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.19.0.tgz#849606ef3920850583a4e7ee0930987c35ad80be"
integrity sha512-xpr/lmLPQEj+TUnHmR+Ab91/glhJvsqcjB+yY0Ix9GO70H6Lb4FHH5GeqdOE5btAx7eIMwuHkp4H2MSkLcqWbA==
dependencies:
undici-types "~6.21.0"
"@types/plist@^3.0.1": "@types/plist@^3.0.1":
version "3.0.5" version "3.0.5"
@@ -229,9 +248,9 @@
"@types/node" "*" "@types/node" "*"
"@types/verror@^1.10.3": "@types/verror@^1.10.3":
version "1.10.10" version "1.10.11"
resolved "https://registry.yarnpkg.com/@types/verror/-/verror-1.10.10.tgz#d5a4b56abac169bfbc8b23d291363a682e6fa087" resolved "https://registry.yarnpkg.com/@types/verror/-/verror-1.10.11.tgz#d3d6b418978c8aa202d41e5bb3483227b6ecc1bb"
integrity sha512-l4MM0Jppn18hb9xmM6wwD1uTdShpf9Pn80aXTStnK1C94gtPvJcV2FrDmbOQUAQfJ1cKZHktkQUDwEqaAKXMMg== integrity sha512-RlDm9K7+o5stv0Co8i8ZRGxDbrTxhJtgjqjFyVh/tXQyl/rYtTKlnTvZ88oSTeYREWurwx20Js4kTuKCsFkUtg==
"@types/yauzl@^2.9.1": "@types/yauzl@^2.9.1":
version "2.10.3" version "2.10.3"
@@ -241,9 +260,9 @@
"@types/node" "*" "@types/node" "*"
"@xmldom/xmldom@^0.8.8": "@xmldom/xmldom@^0.8.8":
version "0.8.10" version "0.8.11"
resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz#a1337ca426aa61cef9fe15b5b28e340a72f6fa99" resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.11.tgz#b79de2d67389734c57c52595f7a7305e30c2d608"
integrity sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw== integrity sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==
"@yarnpkg/lockfile@^1.1.0": "@yarnpkg/lockfile@^1.1.0":
version "1.1.0" version "1.1.0"
@@ -263,14 +282,14 @@ agent-base@6, agent-base@^6.0.2:
debug "4" debug "4"
agent-base@^7.1.0, agent-base@^7.1.2: agent-base@^7.1.0, agent-base@^7.1.2:
version "7.1.3" version "7.1.4"
resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.3.tgz#29435eb821bc4194633a5b89e5bc4703bafc25a1" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.4.tgz#e3cd76d4c548ee895d3c3fd8dc1f6c5b9032e7a8"
integrity sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw== integrity sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==
agentkeepalive@^4.2.1: agentkeepalive@^4.2.1:
version "4.5.0" version "4.6.0"
resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.6.0.tgz#35f73e94b3f40bf65f105219c623ad19c136ea6a"
integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== integrity sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==
dependencies: dependencies:
humanize-ms "^1.2.1" humanize-ms "^1.2.1"
@@ -303,9 +322,9 @@ ansi-regex@^5.0.1:
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
ansi-regex@^6.0.1: ansi-regex@^6.0.1:
version "6.1.0" version "6.2.2"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.1.0.tgz#95ec409c69619d6cb1b8b34f14b660ef28ebd654" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.2.2.tgz#60216eea464d864597ce2832000738a0589650c1"
integrity sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA== integrity sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==
ansi-styles@^4.0.0, ansi-styles@^4.1.0: ansi-styles@^4.0.0, ansi-styles@^4.1.0:
version "4.3.0" version "4.3.0"
@@ -315,9 +334,9 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0:
color-convert "^2.0.1" color-convert "^2.0.1"
ansi-styles@^6.1.0: ansi-styles@^6.1.0:
version "6.2.1" version "6.2.3"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.3.tgz#c044d5dcc521a076413472597a1acb1f103c4041"
integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== integrity sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==
app-builder-bin@5.0.0-alpha.10: app-builder-bin@5.0.0-alpha.10:
version "5.0.0-alpha.10" version "5.0.0-alpha.10"
@@ -363,9 +382,9 @@ app-builder-lib@25.1.8:
temp-file "^3.4.0" temp-file "^3.4.0"
"aproba@^1.0.3 || ^2.0.0": "aproba@^1.0.3 || ^2.0.0":
version "2.0.0" version "2.1.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.1.0.tgz#75500a190313d95c64e871e7e4284c6ac219f0b1"
integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== integrity sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew==
are-we-there-yet@^3.0.0: are-we-there-yet@^3.0.0:
version "3.0.1" version "3.0.1"
@@ -395,10 +414,10 @@ async-exit-hook@^2.0.1:
resolved "https://registry.yarnpkg.com/async-exit-hook/-/async-exit-hook-2.0.1.tgz#8bd8b024b0ec9b1c01cccb9af9db29bd717dfaf3" resolved "https://registry.yarnpkg.com/async-exit-hook/-/async-exit-hook-2.0.1.tgz#8bd8b024b0ec9b1c01cccb9af9db29bd717dfaf3"
integrity sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw== integrity sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==
async@^3.2.3: async@^3.2.6:
version "3.2.5" version "3.2.6"
resolved "https://registry.yarnpkg.com/async/-/async-3.2.5.tgz#ebd52a8fdaf7a2289a24df399f8d8485c8a46b66" resolved "https://registry.yarnpkg.com/async/-/async-3.2.6.tgz#1b0728e14929d51b85b449b7f06e27c1145e38ce"
integrity sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg== integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==
asynckit@^0.4.0: asynckit@^0.4.0:
version "0.4.0" version "0.4.0"
@@ -447,33 +466,33 @@ boolean@^3.0.1:
integrity sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw== integrity sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==
brace-expansion@^1.1.7: brace-expansion@^1.1.7:
version "1.1.11" version "1.1.12"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843"
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== integrity sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==
dependencies: dependencies:
balanced-match "^1.0.0" balanced-match "^1.0.0"
concat-map "0.0.1" concat-map "0.0.1"
brace-expansion@^2.0.1: brace-expansion@^2.0.1:
version "2.0.1" version "2.0.2"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7"
integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==
dependencies: dependencies:
balanced-match "^1.0.0" balanced-match "^1.0.0"
braces@^3.0.2: braces@^3.0.3:
version "3.0.2" version "3.0.3"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
dependencies: dependencies:
fill-range "^7.0.1" fill-range "^7.1.1"
buffer-crc32@~0.2.3: buffer-crc32@~0.2.3:
version "0.2.13" version "0.2.13"
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==
buffer-equal-constant-time@1.0.1: buffer-equal-constant-time@^1.0.1:
version "1.0.1" version "1.0.1"
resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"
integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA== integrity sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==
@@ -499,10 +518,10 @@ builder-util-runtime@9.2.10:
debug "^4.3.4" debug "^4.3.4"
sax "^1.2.4" sax "^1.2.4"
builder-util-runtime@9.2.5: builder-util-runtime@9.3.1:
version "9.2.5" version "9.3.1"
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-9.2.5.tgz#0afdffa0adb5c84c14926c7dd2cf3c6e96e9be83" resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-9.3.1.tgz#0daedde0f6d381f2a00a50a407b166fe7dca1a67"
integrity sha512-HjIDfhvqx/8B3TDN4GbABQcgpewTU4LMRTQPkVpKYV3lsuxEJoIfvg09GyWTNmfVNSUAYf+fbTN//JX4TH20pg== integrity sha512-2/egrNDDnRaxVwK3A+cJq6UOlqOdedGA7JPqCeJjN2Zjk1/QB/6QUi3b714ScIGS7HafFXTyzJEOr5b44I3kvQ==
dependencies: dependencies:
debug "^4.3.4" debug "^4.3.4"
sax "^1.2.4" sax "^1.2.4"
@@ -571,7 +590,15 @@ cacheable-request@^7.0.2:
normalize-url "^6.0.1" normalize-url "^6.0.1"
responselike "^2.0.0" responselike "^2.0.0"
chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2: call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz#4b5428c222be985d79c3d82657479dbe0b59b2d6"
integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==
dependencies:
es-errors "^1.3.0"
function-bind "^1.1.2"
chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2:
version "4.1.2" version "4.1.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
@@ -744,9 +771,9 @@ cross-env@^6.0.3:
cross-spawn "^7.0.0" cross-spawn "^7.0.0"
cross-spawn@^6.0.5: cross-spawn@^6.0.5:
version "6.0.5" version "6.0.6"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.6.tgz#30d0efa0712ddb7eb5a76e1e8721bffafa6b5d57"
integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== integrity sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==
dependencies: dependencies:
nice-try "^1.0.4" nice-try "^1.0.4"
path-key "^2.0.1" path-key "^2.0.1"
@@ -754,26 +781,19 @@ cross-spawn@^6.0.5:
shebang-command "^1.2.0" shebang-command "^1.2.0"
which "^1.2.9" which "^1.2.9"
cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.3: cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.3, cross-spawn@^7.0.6:
version "7.0.3" version "7.0.6"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f"
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==
dependencies: dependencies:
path-key "^3.1.0" path-key "^3.1.0"
shebang-command "^2.0.0" shebang-command "^2.0.0"
which "^2.0.1" which "^2.0.1"
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4: debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4:
version "4.3.4" version "4.4.3"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==
dependencies:
ms "2.1.2"
debug@^4.3.3:
version "4.4.0"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a"
integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==
dependencies: dependencies:
ms "^2.1.3" ms "^2.1.3"
@@ -825,9 +845,9 @@ delegates@^1.0.0:
integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==
detect-libc@^2.0.1: detect-libc@^2.0.1:
version "2.0.3" version "2.1.2"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.1.2.tgz#689c5dcdc1900ef5583a4cb9f6d7b473742074ad"
integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw== integrity sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==
detect-node@^2.0.4: detect-node@^2.0.4:
version "2.1.0" version "2.1.0"
@@ -878,9 +898,18 @@ dotenv-expand@^11.0.6:
dotenv "^16.4.5" dotenv "^16.4.5"
dotenv@^16.4.5: dotenv@^16.4.5:
version "16.4.7" version "16.6.1"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.7.tgz#0e20c5b82950140aa99be360a8a5f52335f53c26" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.6.1.tgz#773f0e69527a8315c7285d5ee73c4459d20a8020"
integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ== integrity sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==
dunder-proto@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.1.tgz#d7ae667e1dc83482f8b70fd0f6eefc50da30f58a"
integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==
dependencies:
call-bind-apply-helpers "^1.0.1"
es-errors "^1.3.0"
gopd "^1.2.0"
eastasianwidth@^0.2.0: eastasianwidth@^0.2.0:
version "0.2.0" version "0.2.0"
@@ -936,11 +965,11 @@ electron-publish@25.1.7:
mime "^2.5.2" mime "^2.5.2"
electron-updater@^6.3.4: electron-updater@^6.3.4:
version "6.3.4" version "6.6.2"
resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-6.3.4.tgz#3934bc89875bb524c2cbbd11041114e97c0c2496" resolved "https://registry.yarnpkg.com/electron-updater/-/electron-updater-6.6.2.tgz#3e65e044f1a99b00d61e200e24de8e709c69ce99"
integrity sha512-uZUo7p1Y53G4tl6Cgw07X1yF8Jlz6zhaL7CQJDZ1fVVkOaBfE2cWtx80avwDVi8jHp+I/FWawrMgTAeCCNIfAg== integrity sha512-Cr4GDOkbAUqRHP5/oeOmH/L2Bn6+FQPxVLZtPbcmKZC63a1F3uu5EefYOssgZXG3u/zBlubbJ5PJdITdMVggbw==
dependencies: dependencies:
builder-util-runtime "9.2.5" builder-util-runtime "9.3.1"
fs-extra "^10.1.0" fs-extra "^10.1.0"
js-yaml "^4.1.0" js-yaml "^4.1.0"
lazy-val "^1.0.5" lazy-val "^1.0.5"
@@ -949,13 +978,13 @@ electron-updater@^6.3.4:
semver "^7.6.3" semver "^7.6.3"
tiny-typed-emitter "^2.1.0" tiny-typed-emitter "^2.1.0"
electron@30.0.2: electron@38.6.0:
version "30.0.2" version "38.6.0"
resolved "https://registry.yarnpkg.com/electron/-/electron-30.0.2.tgz#95ba019216bf8be9f3097580123e33ea37497733" resolved "https://registry.yarnpkg.com/electron/-/electron-38.6.0.tgz#c862bff41d42776e307bf5cc92503dda23612339"
integrity sha512-zv7T+GG89J/hyWVkQsLH4Y/rVEfqJG5M/wOBIGNaDdqd8UV9/YZPdS7CuFeaIj0H9LhCt95xkIQNpYB/3svOkQ== integrity sha512-68OFNxJlrEStA+t8k5atzf4frJddvRR1N1oalr49Ll8YZ0+0nEsDhw4UNhTCoZKTjSYcxFF/4rt+sco+OlnB3g==
dependencies: dependencies:
"@electron/get" "^2.0.0" "@electron/get" "^2.0.0"
"@types/node" "^20.9.0" "@types/node" "^22.7.7"
extract-zip "^2.0.1" extract-zip "^2.0.1"
emoji-regex@^8.0.0: emoji-regex@^8.0.0:
@@ -976,9 +1005,9 @@ encoding@^0.1.13:
iconv-lite "^0.6.2" iconv-lite "^0.6.2"
end-of-stream@^1.1.0: end-of-stream@^1.1.0:
version "1.4.4" version "1.4.5"
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.5.tgz#7344d711dea40e0b74abc2ed49778743ccedb08c"
integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== integrity sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==
dependencies: dependencies:
once "^1.4.0" once "^1.4.0"
@@ -992,27 +1021,42 @@ err-code@^2.0.2:
resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9"
integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==
es-define-property@^1.0.0: es-define-property@^1.0.0, es-define-property@^1.0.1:
version "1.0.0" version "1.0.1"
resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa"
integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==
dependencies:
get-intrinsic "^1.2.4"
es-errors@^1.3.0: es-errors@^1.3.0:
version "1.3.0" version "1.3.0"
resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f" resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.3.0.tgz#05f75a25dab98e4fb1dcd5e1472c0546d5057c8f"
integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==
es-object-atoms@^1.0.0, es-object-atoms@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1"
integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==
dependencies:
es-errors "^1.3.0"
es-set-tostringtag@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz#f31dbbe0c183b00a6d26eb6325c810c0fd18bd4d"
integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==
dependencies:
es-errors "^1.3.0"
get-intrinsic "^1.2.6"
has-tostringtag "^1.0.2"
hasown "^2.0.2"
es6-error@^4.1.1: es6-error@^4.1.1:
version "4.1.1" version "4.1.1"
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d"
integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==
escalade@^3.1.1: escalade@^3.1.1:
version "3.1.2" version "3.2.0"
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5"
integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==
escape-string-regexp@^4.0.0: escape-string-regexp@^4.0.0:
version "4.0.0" version "4.0.0"
@@ -1020,9 +1064,9 @@ escape-string-regexp@^4.0.0:
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
exponential-backoff@^3.1.1: exponential-backoff@^3.1.1:
version "3.1.1" version "3.1.3"
resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.3.tgz#51cf92c1c0493c766053f9d3abee4434c244d2f6"
integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== integrity sha512-ZgEeZXj30q+I0EN+CbSSpIyPaJ5HVQD18Z1m+u1FXbAeT94mr1zw50q4q6jiiC447Nl/YTcIYSAftiGqetwXCA==
extract-zip@^2.0.1: extract-zip@^2.0.1:
version "2.0.1" version "2.0.1"
@@ -1064,10 +1108,10 @@ filelist@^1.0.4:
dependencies: dependencies:
minimatch "^5.0.1" minimatch "^5.0.1"
fill-range@^7.0.1: fill-range@^7.1.1:
version "7.0.1" version "7.1.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
dependencies: dependencies:
to-regex-range "^5.0.1" to-regex-range "^5.0.1"
@@ -1079,20 +1123,22 @@ find-yarn-workspace-root@^2.0.0:
micromatch "^4.0.2" micromatch "^4.0.2"
foreground-child@^3.1.0: foreground-child@^3.1.0:
version "3.3.0" version "3.3.1"
resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.0.tgz#0ac8644c06e431439f8561db8ecf29a7b5519c77" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.3.1.tgz#32e8e9ed1b68a3497befb9ac2b6adf92a638576f"
integrity sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg== integrity sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==
dependencies: dependencies:
cross-spawn "^7.0.0" cross-spawn "^7.0.6"
signal-exit "^4.0.1" signal-exit "^4.0.1"
form-data@^4.0.0: form-data@^4.0.0:
version "4.0.0" version "4.0.4"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4"
integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==
dependencies: dependencies:
asynckit "^0.4.0" asynckit "^0.4.0"
combined-stream "^1.0.8" combined-stream "^1.0.8"
es-set-tostringtag "^2.1.0"
hasown "^2.0.2"
mime-types "^2.1.12" mime-types "^2.1.12"
fs-extra@^10.0.0, fs-extra@^10.1.0: fs-extra@^10.0.0, fs-extra@^10.1.0:
@@ -1105,9 +1151,9 @@ fs-extra@^10.0.0, fs-extra@^10.1.0:
universalify "^2.0.0" universalify "^2.0.0"
fs-extra@^11.1.1: fs-extra@^11.1.1:
version "11.2.0" version "11.3.2"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.3.2.tgz#c838aeddc6f4a8c74dd15f85e11fe5511bfe02a4"
integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== integrity sha512-Xr9F6z6up6Ws+NjzMCZc6WXg2YFRlrLP9NQDO3VQrWrfiojdhS56TzueT88ze0uBdCTwEIhQ3ptnmKeWGFAe0A==
dependencies: dependencies:
graceful-fs "^4.2.0" graceful-fs "^4.2.0"
jsonfile "^6.0.1" jsonfile "^6.0.1"
@@ -1168,16 +1214,29 @@ get-caller-file@^2.0.5:
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
get-intrinsic@^1.1.3, get-intrinsic@^1.2.4: get-intrinsic@^1.2.6:
version "1.2.4" version "1.3.0"
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz#743f0e3b6964a93a5491ed1bffaae054d7f98d01"
integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==
dependencies: dependencies:
call-bind-apply-helpers "^1.0.2"
es-define-property "^1.0.1"
es-errors "^1.3.0" es-errors "^1.3.0"
es-object-atoms "^1.1.1"
function-bind "^1.1.2" function-bind "^1.1.2"
has-proto "^1.0.1" get-proto "^1.0.1"
has-symbols "^1.0.3" gopd "^1.2.0"
hasown "^2.0.0" has-symbols "^1.1.0"
hasown "^2.0.2"
math-intrinsics "^1.1.0"
get-proto@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1"
integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==
dependencies:
dunder-proto "^1.0.1"
es-object-atoms "^1.0.0"
get-stream@^5.1.0: get-stream@^5.1.0:
version "5.2.0" version "5.2.0"
@@ -1241,12 +1300,10 @@ globalthis@^1.0.1:
define-properties "^1.2.1" define-properties "^1.2.1"
gopd "^1.0.1" gopd "^1.0.1"
gopd@^1.0.1: gopd@^1.0.1, gopd@^1.2.0:
version "1.0.1" version "1.2.0"
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1"
integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==
dependencies:
get-intrinsic "^1.1.3"
got@^11.7.0, got@^11.8.5: got@^11.7.0, got@^11.8.5:
version "11.8.6" version "11.8.6"
@@ -1282,22 +1339,24 @@ has-property-descriptors@^1.0.0:
dependencies: dependencies:
es-define-property "^1.0.0" es-define-property "^1.0.0"
has-proto@^1.0.1: has-symbols@^1.0.3, has-symbols@^1.1.0:
version "1.0.3" version "1.1.0"
resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.3.tgz#b31ddfe9b0e6e9914536a6ab286426d0214f77fd" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338"
integrity sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q== integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==
has-symbols@^1.0.3: has-tostringtag@^1.0.2:
version "1.0.3" version "1.0.2"
resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc"
integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==
dependencies:
has-symbols "^1.0.3"
has-unicode@^2.0.1: has-unicode@^2.0.1:
version "2.0.1" version "2.0.1"
resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9"
integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==
hasown@^2.0.0: hasown@^2.0.2:
version "2.0.2" version "2.0.2"
resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003"
integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==
@@ -1312,9 +1371,9 @@ hosted-git-info@^4.1.0:
lru-cache "^6.0.0" lru-cache "^6.0.0"
http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0:
version "4.1.1" version "4.2.0"
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz#205f4db64f8562b76a4ff9235aa5279839a09dd5"
integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== integrity sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==
http-proxy-agent@^5.0.0: http-proxy-agent@^5.0.0:
version "5.0.0" version "5.0.0"
@@ -1412,13 +1471,10 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1,
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
ip-address@^9.0.5: ip-address@^10.0.1:
version "9.0.5" version "10.1.0"
resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-10.1.0.tgz#d8dcffb34d0e02eb241427444a6e23f5b0595aa4"
integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== integrity sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==
dependencies:
jsbn "1.1.0"
sprintf-js "^1.1.3"
is-ci@^2.0.0: is-ci@^2.0.0:
version "2.0.0" version "2.0.0"
@@ -1487,9 +1543,9 @@ isbinaryfile@^4.0.8:
integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw== integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==
isbinaryfile@^5.0.0: isbinaryfile@^5.0.0:
version "5.0.4" version "5.0.6"
resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-5.0.4.tgz#2a2edefa76cafa66613fe4c1ea52f7f031017bdf" resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-5.0.6.tgz#01eac28867aeffaebaee7eaf21d1dd3a67d7c0c7"
integrity sha512-YKBKVkKhty7s8rxddb40oOkuP0NbaeXrQvLin6QMHL7Ypiy2RW9LwOVrVgZRyOrhQlayMd9t+D8yDy8MKFTSDQ== integrity sha512-I+NmIfBHUl+r2wcDd6JwE9yWje/PIVY/R5/CmV8dXLZd5K+L9X2klAOwfAHNnondLXkbHyTAleQAWonpTJBTtw==
isexe@^2.0.0: isexe@^2.0.0:
version "2.0.0" version "2.0.0"
@@ -1506,14 +1562,13 @@ jackspeak@^3.1.2:
"@pkgjs/parseargs" "^0.11.0" "@pkgjs/parseargs" "^0.11.0"
jake@^10.8.5: jake@^10.8.5:
version "10.9.1" version "10.9.4"
resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.1.tgz#8dc96b7fcc41cb19aa502af506da4e1d56f5e62b" resolved "https://registry.yarnpkg.com/jake/-/jake-10.9.4.tgz#d626da108c63d5cfb00ab5c25fadc7e0084af8e6"
integrity sha512-61btcOHNnLnsOdtLgA5efqQWjnSi/vow5HbI7HMdKKWqvrKR1bLK3BPlJn9gcSaP2ewuamUSMB5XEy76KUIS2w== integrity sha512-wpHYzhxiVQL+IV05BLE2Xn34zW1S223hvjtqk0+gsPrwd/8JNLXJgZZM/iPFsYc1xyphF+6M6EvdE5E9MBGkDA==
dependencies: dependencies:
async "^3.2.3" async "^3.2.6"
chalk "^4.0.2"
filelist "^1.0.4" filelist "^1.0.4"
minimatch "^3.1.2" picocolors "^1.1.1"
js-yaml@^4.1.0: js-yaml@^4.1.0:
version "4.1.0" version "4.1.0"
@@ -1522,11 +1577,6 @@ js-yaml@^4.1.0:
dependencies: dependencies:
argparse "^2.0.1" argparse "^2.0.1"
jsbn@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040"
integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==
json-buffer@3.0.1: json-buffer@3.0.1:
version "3.0.1" version "3.0.1"
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"
@@ -1555,9 +1605,9 @@ jsonfile@^4.0.0:
graceful-fs "^4.1.6" graceful-fs "^4.1.6"
jsonfile@^6.0.1: jsonfile@^6.0.1:
version "6.1.0" version "6.2.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.2.0.tgz#7c265bd1b65de6977478300087c99f1c84383f62"
integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== integrity sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==
dependencies: dependencies:
universalify "^2.0.0" universalify "^2.0.0"
optionalDependencies: optionalDependencies:
@@ -1580,11 +1630,11 @@ jsonwebtoken@^9.0.2:
semver "^7.5.4" semver "^7.5.4"
jwa@^1.4.1: jwa@^1.4.1:
version "1.4.1" version "1.4.2"
resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.2.tgz#16011ac6db48de7b102777e57897901520eec7b9"
integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== integrity sha512-eeH5JO+21J78qMvTIDdBXidBd6nG2kZjg5Ohz/1fpa28Z4CcsWUzJ1ZZyFq/3z3N17aZy+ZuBoHljASbL1WfOw==
dependencies: dependencies:
buffer-equal-constant-time "1.0.1" buffer-equal-constant-time "^1.0.1"
ecdsa-sig-formatter "1.0.11" ecdsa-sig-formatter "1.0.11"
safe-buffer "^5.0.1" safe-buffer "^5.0.1"
@@ -1729,12 +1779,17 @@ matcher@^3.0.0:
dependencies: dependencies:
escape-string-regexp "^4.0.0" escape-string-regexp "^4.0.0"
math-intrinsics@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9"
integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==
micromatch@^4.0.2: micromatch@^4.0.2:
version "4.0.5" version "4.0.8"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
dependencies: dependencies:
braces "^3.0.2" braces "^3.0.3"
picomatch "^2.3.1" picomatch "^2.3.1"
mime-db@1.52.0: mime-db@1.52.0:
@@ -1770,13 +1825,13 @@ mimic-response@^3.1.0:
integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==
minimatch@^10.0.0: minimatch@^10.0.0:
version "10.0.1" version "10.1.1"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.0.1.tgz#ce0521856b453c86e25f2c4c0d03e6ff7ddc440b" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.1.1.tgz#e6e61b9b0c1dcab116b5a7d1458e8b6ae9e73a55"
integrity sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ== integrity sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==
dependencies: dependencies:
brace-expansion "^2.0.1" "@isaacs/brace-expansion" "^5.0.0"
minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1:
version "3.1.2" version "3.1.2"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
@@ -1871,11 +1926,6 @@ mkdirp@^1.0.3, mkdirp@^1.0.4:
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==
ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: ms@^2.0.0, ms@^2.1.1, ms@^2.1.3:
version "2.1.3" version "2.1.3"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
@@ -1892,9 +1942,9 @@ nice-try@^1.0.4:
integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
node-abi@^3.45.0: node-abi@^3.45.0:
version "3.71.0" version "3.80.0"
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.71.0.tgz#52d84bbcd8575efb71468fbaa1f9a49b2c242038" resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.80.0.tgz#d7390951f27caa129cceeec01e1c20fc9f07581c"
integrity sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw== integrity sha512-LyPuZJcI9HVwzXK1GPxWNzrr+vr8Hp/3UqlmWxxh8p54U1ZbclOqbSog9lWHaCX+dBaiGi6n/hIX+mKu74GmPA==
dependencies: dependencies:
semver "^7.3.5" semver "^7.3.5"
@@ -1904,9 +1954,9 @@ node-addon-api@^1.6.3:
integrity sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg== integrity sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==
node-api-version@^0.2.0: node-api-version@^0.2.0:
version "0.2.0" version "0.2.1"
resolved "https://registry.yarnpkg.com/node-api-version/-/node-api-version-0.2.0.tgz#5177441da2b1046a4d4547ab9e0972eed7b1ac1d" resolved "https://registry.yarnpkg.com/node-api-version/-/node-api-version-0.2.1.tgz#19bad54f6d65628cbee4e607a325e4488ace2de9"
integrity sha512-fthTTsi8CxaBXMaBAD7ST2uylwvsnYxh2PfaScwpMhos6KlSFajXQPcM4ogNE1q2s3Lbz9GCGqeIHC+C6OZnKg== integrity sha512-2xP/IGGMmmSQpI1+O/k72jF/ykvZ89JeuKX3TLJAYPDVLUalrshrLHkeVcCCZqG/eEa635cr8IBYzgnDvM2O8Q==
dependencies: dependencies:
semver "^7.3.5" semver "^7.3.5"
@@ -2081,6 +2131,11 @@ pend@~1.2.0:
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg== integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==
picocolors@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b"
integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==
picomatch@^2.3.1: picomatch@^2.3.1:
version "2.3.1" version "2.3.1"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
@@ -2119,9 +2174,9 @@ promise-retry@^2.0.1:
retry "^0.12.0" retry "^0.12.0"
pump@^3.0.0: pump@^3.0.0:
version "3.0.0" version "3.0.3"
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.3.tgz#151d979f1a29668dc0025ec589a455b53282268d"
integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== integrity sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==
dependencies: dependencies:
end-of-stream "^1.1.0" end-of-stream "^1.1.0"
once "^1.3.1" once "^1.3.1"
@@ -2261,9 +2316,9 @@ sanitize-filename@^1.6.3:
truncate-utf8-bytes "^1.0.0" truncate-utf8-bytes "^1.0.0"
sax@^1.2.4: sax@^1.2.4:
version "1.3.0" version "1.4.3"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.3.0.tgz#a5dbe77db3be05c9d1ee7785dbd3ea9de51593d0" resolved "https://registry.yarnpkg.com/sax/-/sax-1.4.3.tgz#fcebae3b756cdc8428321805f4b70f16ec0ab5db"
integrity sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA== integrity sha512-yqYn1JhPczigF94DMS+shiDMjDowYO6y9+wB/4WgO0Y19jWYk0lQ4tuG5KI7kj4FTp1wxPj5IFfcrz/s1c3jjQ==
semver-compare@^1.0.0: semver-compare@^1.0.0:
version "1.0.0" version "1.0.0"
@@ -2280,15 +2335,10 @@ semver@^6.2.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
semver@^7.3.2: semver@^7.3.2, semver@^7.3.5, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3:
version "7.6.1" version "7.7.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.1.tgz#60bfe090bf907a25aa8119a72b9f90ef7ca281b2" resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946"
integrity sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA== integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==
semver@^7.3.5, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3:
version "7.6.3"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==
serialize-error@^7.0.1: serialize-error@^7.0.1:
version "7.0.1" version "7.0.1"
@@ -2372,11 +2422,11 @@ socks-proxy-agent@^7.0.0:
socks "^2.6.2" socks "^2.6.2"
socks@^2.6.2: socks@^2.6.2:
version "2.8.3" version "2.8.7"
resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.7.tgz#e2fb1d9a603add75050a2067db8c381a0b5669ea"
integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== integrity sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==
dependencies: dependencies:
ip-address "^9.0.5" ip-address "^10.0.1"
smart-buffer "^4.2.0" smart-buffer "^4.2.0"
source-map-support@^0.5.19: source-map-support@^0.5.19:
@@ -2392,7 +2442,7 @@ source-map@^0.6.0:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
sprintf-js@^1.1.2, sprintf-js@^1.1.3: sprintf-js@^1.1.2:
version "1.1.3" version "1.1.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a"
integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==
@@ -2454,9 +2504,9 @@ string_decoder@~1.1.1:
ansi-regex "^5.0.1" ansi-regex "^5.0.1"
strip-ansi@^7.0.1: strip-ansi@^7.0.1:
version "7.1.0" version "7.1.2"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.2.tgz#132875abde678c7ea8d691533f2e7e22bb744dba"
integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== integrity sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==
dependencies: dependencies:
ansi-regex "^6.0.1" ansi-regex "^6.0.1"
@@ -2522,9 +2572,9 @@ tmp@^0.0.33:
os-tmpdir "~1.0.2" os-tmpdir "~1.0.2"
tmp@^0.2.0: tmp@^0.2.0:
version "0.2.3" version "0.2.5"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.5.tgz#b06bcd23f0f3c8357b426891726d16015abfd8f8"
integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w== integrity sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==
to-regex-range@^5.0.1: to-regex-range@^5.0.1:
version "5.0.1" version "5.0.1"
@@ -2546,14 +2596,19 @@ type-fest@^0.13.1:
integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg== integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==
typescript@^5.4.3: typescript@^5.4.3:
version "5.7.2" version "5.9.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.9.3.tgz#5b4f59e15310ab17a216f5d6cf53ee476ede670f"
integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== integrity sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==
undici-types@~5.26.4: undici-types@~6.21.0:
version "5.26.5" version "6.21.0"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==
undici-types@~7.16.0:
version "7.16.0"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.16.0.tgz#ffccdff36aea4884cbfce9a750a0580224f58a46"
integrity sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==
unique-filename@^2.0.0: unique-filename@^2.0.0:
version "2.0.1" version "2.0.1"
@@ -2592,9 +2647,9 @@ uri-js@^4.2.2:
punycode "^2.1.0" punycode "^2.1.0"
utf8-byte-length@^1.0.1: utf8-byte-length@^1.0.1:
version "1.0.4" version "1.0.5"
resolved "https://registry.yarnpkg.com/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz#f45f150c4c66eee968186505ab93fcbb8ad6bf61" resolved "https://registry.yarnpkg.com/utf8-byte-length/-/utf8-byte-length-1.0.5.tgz#f9f63910d15536ee2b2d5dd4665389715eac5c1e"
integrity sha512-4+wkEYLBbWxqTahEsWrhxepcoVOJ+1z5PGIjPZxRkytcdSUaNjIjBM7Xn8E+pdSuV7SzvWovBFA54FO0JSoqhA== integrity sha512-Xn0w3MtiQ6zoz2vFyUVruaCL53O/DwUvkEeOvj+uulMm0BkUGYWmBYVyElqZaSLhY6ZD0ulfU3aBra2aVT4xfA==
util-deprecate@^1.0.1, util-deprecate@~1.0.1: util-deprecate@^1.0.1, util-deprecate@~1.0.1:
version "1.0.2" version "1.0.2"

110
common/fixYmlHashes.js Normal file
View File

@@ -0,0 +1,110 @@
import fs from 'node:fs/promises';
import { createHash } from 'node:crypto';
import path from 'node:path';
import process from 'node:process';
import { fileURLToPath } from 'node:url';
import YAML from 'yaml';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
async function sha512Base64(filePath) {
const buf = await fs.readFile(filePath);
const h = createHash('sha512');
h.update(buf);
return h.digest('base64');
}
async function fileSize(filePath) {
const st = await fs.stat(filePath);
return st.size;
}
async function fixOneYaml(ymlPath, distDir) {
let raw;
try {
raw = await fs.readFile(ymlPath, 'utf8');
} catch (e) {
console.error(`✗ Cannot read ${ymlPath}:`, e.message);
return;
}
let doc;
try {
doc = YAML.parse(raw);
} catch (e) {
console.error(`✗ Cannot parse YAML ${ymlPath}:`, e.message);
return;
}
if (!doc || !Array.isArray(doc.files)) {
console.warn(`! ${path.basename(ymlPath)} has no 'files' array — skipped.`);
return;
}
let changed = false;
// Update each files[i].sha512 and files[i].size based on files[i].url
for (const entry of doc.files) {
if (!entry?.url) continue;
const target = path.resolve(distDir, entry.url);
try {
const [hash, size] = await Promise.all([sha512Base64(target), fileSize(target)]);
if (entry.sha512 !== hash || entry.size !== size) {
console.log(`${path.basename(ymlPath)}: refresh ${entry.url}`);
entry.sha512 = hash;
entry.size = size;
changed = true;
}
} catch (e) {
console.warn(
`! Missing or unreadable file for ${entry.url} (referenced by ${path.basename(ymlPath)}): ${e.message}`
);
}
}
// Update top-level sha512 for the primary "path" file if present
if (doc.path) {
const primary = path.resolve(distDir, doc.path);
try {
const hash = await sha512Base64(primary);
if (doc.sha512 !== hash) {
console.log(`${path.basename(ymlPath)}: refresh top-level sha512 for path=${doc.path}`);
doc.sha512 = hash;
changed = true;
}
} catch (e) {
console.warn(`! Primary 'path' file not found for ${path.basename(ymlPath)}: ${doc.path} (${e.message})`);
}
}
if (changed) {
const out = YAML.stringify(doc);
await fs.writeFile(ymlPath, out, 'utf8');
console.log(`✓ Updated ${path.basename(ymlPath)}`);
} else {
console.log(`= No changes for ${path.basename(ymlPath)}`);
}
}
async function main() {
const distDir = path.resolve(process.argv[2] ?? path.join(__dirname, '..', 'app', 'dist'));
const entries = await fs.readdir(distDir);
const ymls = entries.filter(f => f.toLowerCase().endsWith('.yml'));
if (ymls.length === 0) {
console.warn(`No .yml files found in ${distDir}`);
return;
}
console.log(`Scanning ${distDir}`);
for (const y of ymls) {
await fixOneYaml(path.join(distDir, y), distDir);
}
}
main().catch(err => {
console.error(err);
process.exit(1);
});

View File

@@ -6,7 +6,7 @@ const { getFiles } = require('./helpers');
const readFilePromise = promisify(fs.readFile); const readFilePromise = promisify(fs.readFile);
const translationRegex = /_t\(\s*['"]([^'"]+)['"]\s*,\s*\{\s*defaultMessage\s*:\s*['"]([^'"]+)['"]\s*\}/g; const translationRegex = /_t\(\s*['"]([^'"]+)['"]\s*,\s*\{\s*defaultMessage\s*:\s*(?:'([^'\\]*(?:\\.[^'\\]*)*)'|"([^"\\]*(?:\\.[^"\\]*)*)"|\`([^`\\]*(?:\\.[^`\\]*)*(?:\{[^}]*\}[^`\\]*(?:\\.[^`\\]*)*)*)\`)(?:\s*,\s*[^}]*)*\s*\}/g;
/** /**
* @param {string} file * @param {string} file
@@ -20,7 +20,8 @@ async function extractTranslationsFromFile(file) {
let match; let match;
while ((match = translationRegex.exec(content)) !== null) { while ((match = translationRegex.exec(content)) !== null) {
const [_, key, defaultText] = match; const [_, key, singleQuotedText, doubleQuotedText, templateLiteral] = match;
const defaultText = singleQuotedText || doubleQuotedText || templateLiteral;
translations[key] = defaultText; translations[key] = defaultText;
} }

View File

@@ -110,7 +110,7 @@ describe('Charts', () => {
cy.themeshot('new-object-window'); cy.themeshot('new-object-window');
}); });
it('Database chat - charts', () => { it.only('Database chat - charts', () => {
cy.contains('MySql-connection').click(); cy.contains('MySql-connection').click();
cy.contains('MyChinook').click(); cy.contains('MyChinook').click();
cy.testid('TabsPanel_buttonNewObject').click(); cy.testid('TabsPanel_buttonNewObject').click();
@@ -119,8 +119,7 @@ describe('Charts', () => {
cy.get('body').realType('show me chart of most popular genres'); cy.get('body').realType('show me chart of most popular genres');
cy.get('body').realPress('{enter}'); cy.get('body').realPress('{enter}');
cy.testid('DatabaseChatTab_executeAllQueries', { timeout: 30000 }).click(); cy.testid('DatabaseChatTab_executeAllQueries', { timeout: 30000 }).click();
cy.wait(5000); cy.testid('chart-canvas', { timeout: 30000 }).should($c => expect($c[0].toDataURL()).to.match(/^data:image\/png;base64/));
cy.testid('chart-canvas').should($c => expect($c[0].toDataURL()).to.match(/^data:image\/png;base64/));
cy.themeshot('database-chat-chart'); cy.themeshot('database-chat-chart');
}); });

View File

@@ -1,6 +1,6 @@
{ {
"private": true, "private": true,
"version": "6.6.6-beta.13", "version": "6.6.12-premium-beta.5",
"name": "dbgate-all", "name": "dbgate-all",
"workspaces": [ "workspaces": [
"packages/*", "packages/*",
@@ -52,6 +52,7 @@
"generatePadFile": "node generatePadFile", "generatePadFile": "node generatePadFile",
"fillPackagedPlugins": "node fillPackagedPlugins", "fillPackagedPlugins": "node fillPackagedPlugins",
"resetPackagedPlugins": "node resetPackagedPlugins", "resetPackagedPlugins": "node resetPackagedPlugins",
"fixYmlHashes": "cd common && yarn init -y && yarn add yaml -W && cd .. && node common/fixYmlHashes.js app/dist",
"prettier": "prettier --write packages/api/src && prettier --write packages/datalib/src && prettier --write packages/filterparser/src && prettier --write packages/sqltree/src && prettier --write packages/tools/src && prettier --write packages/types && prettier --write packages/web/src && prettier --write app/src", "prettier": "prettier --write packages/api/src && prettier --write packages/datalib/src && prettier --write packages/filterparser/src && prettier --write packages/sqltree/src && prettier --write packages/tools/src && prettier --write packages/types && prettier --write packages/web/src && prettier --write app/src",
"copy:docker:build": "copyfiles packages/api/dist/* docker -f && copyfiles packages/web/public/* docker -u 2 && copyfiles \"packages/web/public/**/*\" docker -u 2 && copyfiles \"plugins/dist/**/*\" docker/plugins -u 2", "copy:docker:build": "copyfiles packages/api/dist/* docker -f && copyfiles packages/web/public/* docker -u 2 && copyfiles \"packages/web/public/**/*\" docker -u 2 && copyfiles \"plugins/dist/**/*\" docker/plugins -u 2",
"copy:packer:build": "copyfiles packages/api/dist/* packer/build -f && copyfiles packages/web/public/* packer/build -u 2 && copyfiles \"packages/web/public/**/*\" packer/build -u 2 && copyfiles \"plugins/dist/**/*\" packer/build/plugins -u 2 && copyfiles packer/install-packages.sh packer/build -f && yarn install:drivers:packer", "copy:packer:build": "copyfiles packages/api/dist/* packer/build -f && copyfiles packages/web/public/* packer/build -u 2 && copyfiles \"packages/web/public/**/*\" packer/build -u 2 && copyfiles \"plugins/dist/**/*\" packer/build/plugins -u 2 && copyfiles packer/install-packages.sh packer/build -f && yarn install:drivers:packer",

View File

@@ -2,7 +2,7 @@ DEVMODE=1
SHELL_SCRIPTING=1 SHELL_SCRIPTING=1
ALLOW_DBGATE_PRIVATE_CLOUD=1 ALLOW_DBGATE_PRIVATE_CLOUD=1
DEVWEB=1 DEVWEB=1
LOCAL_AUTH_PROXY=1 # LOCAL_AUTH_PROXY=1
# LOCAL_AI_GATEWAY=true # LOCAL_AI_GATEWAY=true
# REDIRECT_TO_DBGATE_CLOUD_LOGIN=1 # REDIRECT_TO_DBGATE_CLOUD_LOGIN=1

View File

@@ -9,6 +9,8 @@ const {
putCloudContent, putCloudContent,
removeCloudCachedConnection, removeCloudCachedConnection,
getPromoWidgetData, getPromoWidgetData,
getPromoWidgetList,
getPromoWidgetPreview,
} = require('../utility/cloudIntf'); } = require('../utility/cloudIntf');
const connections = require('./connections'); const connections = require('./connections');
const socket = require('../utility/socket'); const socket = require('../utility/socket');
@@ -296,6 +298,16 @@ module.exports = {
return data; return data;
}, },
promoWidgetList_meta: true,
async promoWidgetList() {
return getPromoWidgetList();
},
promoWidgetPreview_meta: true,
async promoWidgetPreview({ campaign, variant }) {
return getPromoWidgetPreview(campaign, variant);
},
// chatStream_meta: { // chatStream_meta: {
// raw: true, // raw: true,
// method: 'post', // method: 'post',

View File

@@ -29,7 +29,17 @@ const generateDeploySql = require('../shell/generateDeploySql');
const { createTwoFilesPatch } = require('diff'); const { createTwoFilesPatch } = require('diff');
const diff2htmlPage = require('../utility/diff2htmlPage'); const diff2htmlPage = require('../utility/diff2htmlPage');
const processArgs = require('../utility/processArgs'); const processArgs = require('../utility/processArgs');
const { testConnectionPermission, hasPermission, loadPermissionsFromRequest, loadTablePermissionsFromRequest, getTablePermissionRole, loadDatabasePermissionsFromRequest, getDatabasePermissionRole, getTablePermissionRoleLevelIndex, testDatabaseRolePermission } = require('../utility/hasPermission'); const {
testConnectionPermission,
hasPermission,
loadPermissionsFromRequest,
loadTablePermissionsFromRequest,
getTablePermissionRole,
loadDatabasePermissionsFromRequest,
getDatabasePermissionRole,
getTablePermissionRoleLevelIndex,
testDatabaseRolePermission,
} = require('../utility/hasPermission');
const { MissingCredentialsError } = require('../utility/exceptions'); const { MissingCredentialsError } = require('../utility/exceptions');
const pipeForkLogs = require('../utility/pipeForkLogs'); const pipeForkLogs = require('../utility/pipeForkLogs');
const crypto = require('crypto'); const crypto = require('crypto');
@@ -100,7 +110,7 @@ module.exports = {
socket.emitChanged(`database-status-changed`, { conid, database }); socket.emitChanged(`database-status-changed`, { conid, database });
}, },
handle_ping() { }, handle_ping() {},
// session event handlers // session event handlers
@@ -267,7 +277,8 @@ module.exports = {
schemaName: select?.from?.name?.schemaName, schemaName: select?.from?.name?.schemaName,
pureName: select?.from?.name?.pureName, pureName: select?.from?.name?.pureName,
sumint1: response?.rows?.length, sumint1: response?.rows?.length,
sessionParam: `${conid}::${database}::${select?.from?.name?.schemaName || '0'}::${select?.from?.name?.pureName sessionParam: `${conid}::${database}::${select?.from?.name?.schemaName || '0'}::${
select?.from?.name?.pureName
}`, }`,
sessionGroup: auditLogSessionGroup, sessionGroup: auditLogSessionGroup,
message: `Loaded table data from ${select?.from?.name?.pureName}`, message: `Loaded table data from ${select?.from?.name?.pureName}`,
@@ -455,10 +466,18 @@ module.exports = {
[changeSet.inserts, 'create_update_delete'], [changeSet.inserts, 'create_update_delete'],
[changeSet.deletes, 'create_update_delete'], [changeSet.deletes, 'create_update_delete'],
[changeSet.updates, 'update_only'], [changeSet.updates, 'update_only'],
] ];
for (const [operations, requiredRole] of fieldsAndRoles) { for (const [operations, requiredRole] of fieldsAndRoles) {
for (const operation of operations) { for (const operation of operations) {
const role = getTablePermissionRole(conid, database, 'tables', operation.schemaName, operation.pureName, tablePermissions, databasePermissions); const role = getTablePermissionRole(
conid,
database,
'tables',
operation.schemaName,
operation.pureName,
tablePermissions,
databasePermissions
);
if (getTablePermissionRoleLevelIndex(role) < getTablePermissionRoleLevelIndex(requiredRole)) { if (getTablePermissionRoleLevelIndex(role) < getTablePermissionRoleLevelIndex(requiredRole)) {
throw new Error('DBGM-00262 Permission not granted'); throw new Error('DBGM-00262 Permission not granted');
} }
@@ -628,7 +647,15 @@ module.exports = {
function applyTablePermissionRole(list, objectTypeField) { function applyTablePermissionRole(list, objectTypeField) {
const res = []; const res = [];
for (const item of list ?? []) { for (const item of list ?? []) {
const tablePermissionRole = getTablePermissionRole(conid, database, objectTypeField, item.schemaName, item.pureName, tablePermissions, databasePermissionRole); const tablePermissionRole = getTablePermissionRole(
conid,
database,
objectTypeField,
item.schemaName,
item.pureName,
tablePermissions,
databasePermissionRole
);
if (tablePermissionRole != 'deny') { if (tablePermissionRole != 'deny') {
res.push({ res.push({
...item, ...item,
@@ -647,7 +674,7 @@ module.exports = {
functions: applyTablePermissionRole(opened.structure.functions, 'functions'), functions: applyTablePermissionRole(opened.structure.functions, 'functions'),
triggers: applyTablePermissionRole(opened.structure.triggers, 'triggers'), triggers: applyTablePermissionRole(opened.structure.triggers, 'triggers'),
collections: applyTablePermissionRole(opened.structure.collections, 'collections'), collections: applyTablePermissionRole(opened.structure.collections, 'collections'),
} };
return res; return res;
} }
@@ -990,7 +1017,10 @@ module.exports = {
async executeSessionQuery({ sesid, conid, database, sql }, req) { async executeSessionQuery({ sesid, conid, database, sql }, req) {
await testConnectionPermission(conid, req); await testConnectionPermission(conid, req);
logger.info({ sesid, sql }, 'DBGM-00010 Processing query'); logger.info({ sesid, sql }, 'DBGM-00010 Processing query');
sessions.dispatchMessage(sesid, 'Query execution started'); sessions.dispatchMessage(sesid, {
message: 'Query execution started',
sql,
});
const opened = await this.ensureOpened(conid, database); const opened = await this.ensureOpened(conid, database);
opened.subprocess.send({ msgtype: 'executeSessionQuery', sql, sesid }); opened.subprocess.send({ msgtype: 'executeSessionQuery', sql, sesid });

View File

@@ -83,6 +83,16 @@ module.exports = {
socket.emit(`session-recordset-${sesid}`, { jslid, resultIndex }); socket.emit(`session-recordset-${sesid}`, { jslid, resultIndex });
}, },
handle_endrecordset(sesid, props) {
const { jslid, rowCount, durationMs } = props;
this.dispatchMessage(sesid, {
message: `Query returned ${rowCount} rows in ${durationMs} ms`,
rowCount,
durationMs,
jslid,
});
},
handle_stats(sesid, stats) { handle_stats(sesid, stats) {
jsldata.notifyChangedStats(stats); jsldata.notifyChangedStats(stats);
}, },
@@ -97,6 +107,12 @@ module.exports = {
socket.emit(`session-initialize-file-${jslid}`); socket.emit(`session-initialize-file-${jslid}`);
}, },
handle_changedCurrentDatabase(sesid, props) {
const { database } = props;
this.dispatchMessage(sesid, `Current database changed to ${database}`);
socket.emit(`session-changedb-${sesid}`, { database });
},
handle_ping() {}, handle_ping() {},
create_meta: true, create_meta: true,
@@ -182,7 +198,10 @@ module.exports = {
}); });
logger.info({ sesid, sql }, 'DBGM-00019 Processing query'); logger.info({ sesid, sql }, 'DBGM-00019 Processing query');
this.dispatchMessage(sesid, 'Query execution started'); this.dispatchMessage(sesid, {
message: 'Query execution started',
sql,
});
session.subprocess.send({ session.subprocess.send({
msgtype: 'executeQuery', msgtype: 'executeQuery',
sql, sql,

View File

@@ -283,6 +283,7 @@ async function updatePremiumPromoWidget() {
`${DBGATE_CLOUD_URL}/premium-promo-widget?identifier=${promoWidgetData?.identifier ?? 'empty'}&tags=${tags}`, `${DBGATE_CLOUD_URL}/premium-promo-widget?identifier=${promoWidgetData?.identifier ?? 'empty'}&tags=${tags}`,
{ {
headers: { headers: {
...getLicenseHttpHeaders(),
...(await getCloudInstanceHeaders()), ...(await getCloudInstanceHeaders()),
'x-app-version': currentVersion.version, 'x-app-version': currentVersion.version,
}, },
@@ -308,7 +309,8 @@ async function refreshPublicFiles(isRefresh) {
} catch (err) { } catch (err) {
logger.error(extractErrorLogData(err), 'DBGM-00166 Error updating cloud files'); logger.error(extractErrorLogData(err), 'DBGM-00166 Error updating cloud files');
} }
if (!isProApp()) { const configSettings = await config.get();
if (!isProApp() || configSettings?.trialDaysLeft != null) {
await updatePremiumPromoWidget(); await updatePremiumPromoWidget();
} }
} }
@@ -480,6 +482,16 @@ async function getPromoWidgetData() {
return promoWidgetData; return promoWidgetData;
} }
async function getPromoWidgetPreview(campaign, variant) {
const resp = await axios.default.get(`${DBGATE_CLOUD_URL}/premium-promo-widget-preview/${campaign}/${variant}`);
return resp.data;
}
async function getPromoWidgetList() {
const resp = await axios.default.get(`${DBGATE_CLOUD_URL}/promo-widget-list`);
return resp.data;
}
module.exports = { module.exports = {
createDbGateIdentitySession, createDbGateIdentitySession,
startCloudTokenChecking, startCloudTokenChecking,
@@ -498,4 +510,6 @@ module.exports = {
readCloudTestTokenHolder, readCloudTestTokenHolder,
getPublicIpInfo, getPublicIpInfo,
getPromoWidgetData, getPromoWidgetData,
getPromoWidgetPreview,
getPromoWidgetList,
}; };

View File

@@ -14,6 +14,7 @@ class QueryStreamTableWriter {
this.currentChangeIndex = 1; this.currentChangeIndex = 1;
this.initializedFile = false; this.initializedFile = false;
this.sesid = sesid; this.sesid = sesid;
this.started = new Date().getTime();
} }
initializeFromQuery(structure, resultIndex, chartDefinition, autoDetectCharts = false, options = {}) { initializeFromQuery(structure, resultIndex, chartDefinition, autoDetectCharts = false, options = {}) {
@@ -119,6 +120,13 @@ class QueryStreamTableWriter {
this.chartProcessor = null; this.chartProcessor = null;
} }
} }
process.send({
msgtype: 'endrecordset',
jslid: this.jslid,
rowCount: this.currentRowCount,
sesid: this.sesid,
durationMs: new Date().getTime() - this.started,
});
resolve(); resolve();
}); });
} else { } else {
@@ -149,6 +157,7 @@ class StreamHandler {
// this.error = this.error.bind(this); // this.error = this.error.bind(this);
this.done = this.done.bind(this); this.done = this.done.bind(this);
this.info = this.info.bind(this); this.info = this.info.bind(this);
this.changedCurrentDatabase = this.changedCurrentDatabase.bind(this);
// use this for cancelling - not implemented // use this for cancelling - not implemented
// this.stream = null; // this.stream = null;
@@ -167,6 +176,10 @@ class StreamHandler {
} }
} }
changedCurrentDatabase(database) {
process.send({ msgtype: 'changedCurrentDatabase', database, sesid: this.sesid });
}
recordset(columns, options) { recordset(columns, options) {
if (this.rowsLimitOverflow) { if (this.rowsLimitOverflow) {
return; return;

View File

@@ -3,6 +3,10 @@
"name": "dbgate-datalib", "name": "dbgate-datalib",
"main": "lib/index.js", "main": "lib/index.js",
"typings": "lib/index.d.ts", "typings": "lib/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/dbgate/dbgate.git"
},
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"test": "jest", "test": "jest",

View File

@@ -39,7 +39,8 @@ export class TableGridDisplay extends GridDisplay {
public getDictionaryDescription: DictionaryDescriptionFunc = null, public getDictionaryDescription: DictionaryDescriptionFunc = null,
isReadOnly = false, isReadOnly = false,
public isRawMode = false, public isRawMode = false,
public currentSettings = null public currentSettings = null,
public areReferencesAllowed = true
) { ) {
super(config, setConfig, cache, setCache, driver, dbinfo, serverVersion, currentSettings); super(config, setConfig, cache, setCache, driver, dbinfo, serverVersion, currentSettings);
@@ -102,11 +103,11 @@ export class TableGridDisplay extends GridDisplay {
isChecked: this.isColumnChecked(col), isChecked: this.isColumnChecked(col),
hintColumnNames: hintColumnNames:
this.getFkDictionaryDescription(col.isForeignKeyUnique ? col.foreignKey : null)?.columns?.map(columnName => this.getFkDictionaryDescription(col.isForeignKeyUnique ? col.foreignKey : null)?.columns?.map(columnName =>
shortenIdentifier(`hint_${col.uniqueName}_${columnName}`, this.driver.dialect.maxIdentifierLength) shortenIdentifier(`hint_${col.uniqueName}_${columnName}`, this.driver?.dialect?.maxIdentifierLength)
) || null, ) || null,
hintColumnDelimiter: this.getFkDictionaryDescription(col.isForeignKeyUnique ? col.foreignKey : null) hintColumnDelimiter: this.getFkDictionaryDescription(col.isForeignKeyUnique ? col.foreignKey : null)
?.delimiter, ?.delimiter,
uniqueNameShorten: shortenIdentifier(col.uniqueName, this.driver.dialect.maxIdentifierLength), uniqueNameShorten: shortenIdentifier(col.uniqueName, this.driver?.dialect?.maxIdentifierLength),
isExpandable: !!col.foreignKey, isExpandable: !!col.foreignKey,
})) || [] })) || []
); );
@@ -117,7 +118,7 @@ export class TableGridDisplay extends GridDisplay {
if (this.isExpandedColumn(column.uniqueName)) { if (this.isExpandedColumn(column.uniqueName)) {
const table = this.getFkTarget(column); const table = this.getFkTarget(column);
if (table) { if (table) {
const childAlias = shortenIdentifier(`${column.uniqueName}_ref`, this.driver.dialect.maxIdentifierLength); const childAlias = shortenIdentifier(`${column.uniqueName}_ref`, this.driver?.dialect?.maxIdentifierLength);
const subcolumns = this.getDisplayColumns(table, column.uniquePath); const subcolumns = this.getDisplayColumns(table, column.uniquePath);
this.addReferenceToSelect(select, parentAlias, column); this.addReferenceToSelect(select, parentAlias, column);
@@ -130,7 +131,7 @@ export class TableGridDisplay extends GridDisplay {
} }
addReferenceToSelect(select: Select, parentAlias: string, column: DisplayColumn) { addReferenceToSelect(select: Select, parentAlias: string, column: DisplayColumn) {
const childAlias = shortenIdentifier(`${column.uniqueName}_ref`, this.driver.dialect.maxIdentifierLength); const childAlias = shortenIdentifier(`${column.uniqueName}_ref`, this.driver?.dialect?.maxIdentifierLength);
if ((select.from.relations || []).find(x => x.alias == childAlias)) return; if ((select.from.relations || []).find(x => x.alias == childAlias)) return;
const table = this.getFkTarget(column); const table = this.getFkTarget(column);
if (table && table.primaryKey) { if (table && table.primaryKey) {
@@ -195,11 +196,11 @@ export class TableGridDisplay extends GridDisplay {
this.addReferenceToSelect( this.addReferenceToSelect(
select, select,
parentUniqueName parentUniqueName
? shortenIdentifier(`${parentUniqueName}_ref`, this.driver.dialect.maxIdentifierLength) ? shortenIdentifier(`${parentUniqueName}_ref`, this.driver?.dialect?.maxIdentifierLength)
: 'basetbl', : 'basetbl',
column column
); );
const childAlias = shortenIdentifier(`${column.uniqueName}_ref`, this.driver.dialect.maxIdentifierLength); const childAlias = shortenIdentifier(`${column.uniqueName}_ref`, this.driver?.dialect?.maxIdentifierLength);
select.columns.push( select.columns.push(
...hintDescription.columns.map( ...hintDescription.columns.map(
columnName => columnName =>
@@ -208,7 +209,7 @@ export class TableGridDisplay extends GridDisplay {
columnName, columnName,
alias: shortenIdentifier( alias: shortenIdentifier(
`hint_${column.uniqueName}_${columnName}`, `hint_${column.uniqueName}_${columnName}`,
this.driver.dialect.maxIdentifierLength this.driver?.dialect?.maxIdentifierLength
), ),
source: { alias: childAlias }, source: { alias: childAlias },
} as ColumnRefExpression) } as ColumnRefExpression)
@@ -248,6 +249,7 @@ export class TableGridDisplay extends GridDisplay {
} }
processReferences(select: Select, displayedColumnInfo: DisplayedColumnInfo, options) { processReferences(select: Select, displayedColumnInfo: DisplayedColumnInfo, options) {
if (!this.areReferencesAllowed) return;
this.addJoinsFromExpandedColumns(select, this.columns, 'basetbl', displayedColumnInfo); this.addJoinsFromExpandedColumns(select, this.columns, 'basetbl', displayedColumnInfo);
if (!options.isExport && this.displayOptions.showHintColumns) { if (!options.isExport && this.displayOptions.showHintColumns) {
this.addHintsToSelect(select); this.addHintsToSelect(select);

View File

@@ -3,6 +3,10 @@
"name": "dbgate-filterparser", "name": "dbgate-filterparser",
"main": "lib/index.js", "main": "lib/index.js",
"typings": "lib/index.d.ts", "typings": "lib/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/dbgate/dbgate.git"
},
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"start": "tsc --watch", "start": "tsc --watch",

View File

@@ -1,4 +1,5 @@
import _cloneDeep from 'lodash/cloneDeep'; import _cloneDeep from 'lodash/cloneDeep';
import _uniq from 'lodash/uniq';
import _isString from 'lodash/isString'; import _isString from 'lodash/isString';
import type { import type {
ColumnInfo, ColumnInfo,
@@ -75,9 +76,27 @@ export function findForeignKeyForColumn(table: TableInfo, column: ColumnInfo | s
return (table.foreignKeys || []).find(fk => fk.columns.find(col => col.columnName == column.columnName)); return (table.foreignKeys || []).find(fk => fk.columns.find(col => col.columnName == column.columnName));
} }
export function getConflictingColumnNames(columns: ColumnInfo[]): Set<string> {
const conflictingNames = new Set(
_uniq(columns.map(x => x.columnName).filter((item, index, arr) => arr.indexOf(item) !== index))
);
return conflictingNames;
}
export function makeUniqueColumnNames(res: ColumnInfo[]) { export function makeUniqueColumnNames(res: ColumnInfo[]) {
const usedNames = new Set(); const usedNames = new Set();
const conflictingNames = getConflictingColumnNames(res);
for (let i = 0; i < res.length; i++) { for (let i = 0; i < res.length; i++) {
if (
conflictingNames.has(res[i].columnName) &&
res[i].pureName &&
!usedNames.has(`${res[i].pureName}_${res[i].columnName}`)
) {
res[i].columnName = `${res[i].pureName}_${res[i].columnName}`;
usedNames.add(res[i].columnName);
continue;
}
if (usedNames.has(res[i].columnName)) { if (usedNames.has(res[i].columnName)) {
let suffix = 2; let suffix = 2;
while (usedNames.has(`${res[i].columnName}${suffix}`)) suffix++; while (usedNames.has(`${res[i].columnName}${suffix}`)) suffix++;

View File

@@ -21,6 +21,7 @@ export interface StreamOptions {
error?: (error) => void; error?: (error) => void;
done?: (result) => void; done?: (result) => void;
info?: (info) => void; info?: (info) => void;
changedCurrentDatabase?: (database: string) => void;
} }
export type CollectionOperationInfo = export type CollectionOperationInfo =

View File

@@ -26,12 +26,23 @@
<script lang="javascript"> <script lang="javascript">
window.dbgate_page = '{{page}}'; window.dbgate_page = '{{page}}';
</script>
if (localStorage.getItem('currentThemeType') == 'dark') {
document.documentElement.style.setProperty('--theme-background', '#111');
document.documentElement.style.setProperty('--theme-foreground', '#e3e3e3');
} else {
document.documentElement.style.setProperty('--theme-background', '#fff');
document.documentElement.style.setProperty('--theme-foreground', '#262626');
}
</script>
<script defer src="build/bundle.js"></script> <script defer src="build/bundle.js"></script>
<style> <style>
body {
background-color: var(--theme-background);
}
.lds-ellipsis { .lds-ellipsis {
display: inline-block; display: inline-block;
position: relative; position: relative;
@@ -44,7 +55,7 @@
width: 13px; width: 13px;
height: 13px; height: 13px;
border-radius: 50%; border-radius: 50%;
background: #000; background: var(--theme-foreground);
animation-timing-function: cubic-bezier(0, 1, 1, 0); animation-timing-function: cubic-bezier(0, 1, 1, 0);
} }
.lds-ellipsis div:nth-child(1) { .lds-ellipsis div:nth-child(1) {

View File

@@ -9,6 +9,10 @@
"build:index": "node build-index.js", "build:index": "node build-index.js",
"prepublishOnly": "yarn build" "prepublishOnly": "yarn build"
}, },
"repository": {
"type": "git",
"url": "https://github.com/dbgate/dbgate.git"
},
"files": [ "files": [
"public" "public"
], ],

View File

@@ -35,6 +35,11 @@
background: linear-gradient(135deg, #1686c8, #8a25b1); background: linear-gradient(135deg, #1686c8, #8a25b1);
} }
.premium-gradient {
background: linear-gradient(135deg, #1686c8, #8a25b1);
color: white;
}
.web-color-primary { .web-color-primary {
background: #1686c8; background: #1686c8;
} }

View File

@@ -27,7 +27,7 @@
import SettingsListener from './utility/SettingsListener.svelte'; import SettingsListener from './utility/SettingsListener.svelte';
import { handleAuthOnStartup } from './clientAuth'; import { handleAuthOnStartup } from './clientAuth';
import { initializeAppUpdates } from './utility/appUpdate'; import { initializeAppUpdates } from './utility/appUpdate';
import { _t } from './translations'; import { _t, saveSelectedLanguageToCache } from './translations';
import { installCloudListeners } from './utility/cloudListeners'; import { installCloudListeners } from './utility/cloudListeners';
export let isAdminPage = false; export let isAdminPage = false;
@@ -61,6 +61,7 @@
initializeAppUpdates(); initializeAppUpdates();
installCloudListeners(); installCloudListeners();
refreshPublicCloudFiles(); refreshPublicCloudFiles();
saveSelectedLanguageToCache();
} }
loadedApi = loadedApiValue; loadedApi = loadedApiValue;

View File

@@ -14,6 +14,7 @@
import ErrorInfo from './elements/ErrorInfo.svelte'; import ErrorInfo from './elements/ErrorInfo.svelte';
import { isOneOfPage } from './utility/pageDefs'; import { isOneOfPage } from './utility/pageDefs';
import { openWebLink } from './utility/simpleTools'; import { openWebLink } from './utility/simpleTools';
import FontIcon from './icons/FontIcon.svelte';
const config = useConfig(); const config = useConfig();
const values = writable({ amoid: null, databaseServer: null }); const values = writable({ amoid: null, databaseServer: null });
@@ -22,17 +23,15 @@
$: trialDaysLeft = $config?.trialDaysLeft; $: trialDaysLeft = $config?.trialDaysLeft;
let errorMessage = ''; let errorMessage = '';
let expiredMessageSet = false;
$: if (isExpired && !expiredMessageSet) { let isInsertingLicense = false;
errorMessage = 'Your license is expired';
expiredMessageSet = true; $: trialButtonAvailable = !isExpired && trialDaysLeft == null;
}
// $: console.log('CONFIG', $config); // $: console.log('CONFIG', $config);
$: { $: {
if ($config?.isLicenseValid) { if ($config?.isLicenseValid && trialDaysLeft == null) {
internalRedirectTo(isOneOfPage('admin-license') ? '/admin.html' : '/index.html'); internalRedirectTo(isOneOfPage('admin-license') ? '/admin.html' : '/index.html');
} }
} }
@@ -41,10 +40,28 @@
<FormProviderCore {values}> <FormProviderCore {values}>
<SpecialPageLayout> <SpecialPageLayout>
{#if getElectron() || ($config?.storageDatabase && hasPermission('admin/license'))} {#if getElectron() || ($config?.storageDatabase && hasPermission('admin/license'))}
<div class="heading">License</div> <div class="heading">Thank you for using DbGate!</div>
{#if isExpired}
<div class="infotext"><FontIcon icon="img warn" /> Your license has expired. Please insert new license.</div>
{:else if trialDaysLeft > 0}
<div class="infotext">
<FontIcon icon="img warn" /> Your trial period will expire in {trialDaysLeft} day{trialDaysLeft != 1
? 's'
: ''}.
</div>
{:else}
<div class="infotext">
<FontIcon icon="img info" /> Proceed by selecting a licensing option or providing your license key.
</div>
{/if}
{#if isInsertingLicense}
<FormTextAreaField label="Enter your license key" name="licenseKey" rows={5} /> <FormTextAreaField label="Enter your license key" name="licenseKey" rows={5} />
<div class="submit"> <div class="submit">
<div class="flex flex1">
<div class="col-6 flex">
<FormSubmit <FormSubmit
value="Save license" value="Save license"
on:click={async e => { on:click={async e => {
@@ -59,8 +76,30 @@
}} }}
/> />
</div> </div>
<div class="col-6 flex">
<FormStyledButton
value="Cancel"
on:click={() => {
isInsertingLicense = false;
errorMessage = '';
}}
/>
</div>
</div>
</div>
{/if}
{#if !isExpired && trialDaysLeft == null} {#if !isInsertingLicense}
<div class="submit">
<FormStyledButton
value="Insert license key"
on:click={() => {
isInsertingLicense = true;
}}
/>
</div>
{#if trialButtonAvailable}
<div class="submit"> <div class="submit">
<FormStyledButton <FormStyledButton
value="Start 30-day trial" value="Start 30-day trial"
@@ -119,14 +158,15 @@
/> />
</div> </div>
{/if} {/if}
{/if}
{#if errorMessage} {#if errorMessage}
<div class="error">{errorMessage}</div> <div class="error">{errorMessage}</div>
{/if} {/if}
<div class="purchase-info"> <div class="purchase-info">
For more info about DbGate licensing, you could visit <Link href="https://dbgate.eu/">dbgate.eu</Link> web or contact For more info about DbGate licensing, you could visit <Link href="https://dbgate.io/">dbgate.io</Link> web or contact
us at <Link href="mailto:sales@dbgate.eu">sales@dbgate.eu</Link> us at <Link href="mailto:sales@dbgate.io">sales@dbgate.io</Link>
</div> </div>
{:else} {:else}
<ErrorInfo message="License for DbGate is not valid. Please contact administrator." /> <ErrorInfo message="License for DbGate is not valid. Please contact administrator." />
@@ -141,6 +181,10 @@
font-size: xx-large; font-size: xx-large;
} }
.infotext {
margin: 1em;
}
.submit { .submit {
margin: var(--dim-large-form-margin); margin: var(--dim-large-form-margin);
display: flex; display: flex;

View File

@@ -16,7 +16,7 @@
<div class="heading">Configuration error</div> <div class="heading">Configuration error</div>
{#if $config?.checkedLicense?.status == 'error'} {#if $config?.checkedLicense?.status == 'error'}
<ErrorInfo <ErrorInfo
message={`Invalid license. Please contact sales@dbgate.eu for more details. ${$config?.checkedLicense?.error}`} message={`Invalid license. Please contact sales@dbgate.io for more details. ${$config?.checkedLicense?.error || ''}`}
/> />
{:else if $config?.configurationError} {:else if $config?.configurationError}
<ErrorInfo message={$config?.configurationError} /> <ErrorInfo message={$config?.configurationError} />

View File

@@ -8,6 +8,7 @@
import Link from '../elements/Link.svelte'; import Link from '../elements/Link.svelte';
import { focusedConnectionOrDatabase } from '../stores'; import { focusedConnectionOrDatabase } from '../stores';
import { tick } from 'svelte'; import { tick } from 'svelte';
import { _val } from '../translations';
export let list; export let list;
export let module; export let module;
@@ -38,8 +39,19 @@
$: matcher = module.createMatcher && module.createMatcher(filter, passProps?.searchSettings); $: matcher = module.createMatcher && module.createMatcher(filter, passProps?.searchSettings);
$: listTranslated = (list || []).map(data => ({
...data,
group: data?.group && _val(data.group),
title: data?.title && _val(data.title),
description: data?.description && _val(data.description),
args: (data?.args || []).map(x => ({
...x,
label: x?.label && _val(x.label),
})),
}));
$: dataLabeled = _.compact( $: dataLabeled = _.compact(
(list || []).map(data => { (listTranslated || []).map(data => {
const matchResult = matcher ? matcher(data) : true; const matchResult = matcher ? matcher(data) : true;
let isMatched = true; let isMatched = true;
@@ -102,7 +114,8 @@
$: groups = groupFunc ? extendGroups(_.groupBy(dataLabeled, 'group'), emptyGroupNames) : null; $: groups = groupFunc ? extendGroups(_.groupBy(dataLabeled, 'group'), emptyGroupNames) : null;
$: listLimited = isExpandedBySearch && !expandLimited ? filtered.slice(0, filter.trim().length < 3 ? 1 : 3) : list; $: listLimited =
isExpandedBySearch && !expandLimited ? filtered.slice(0, filter.trim().length < 3 ? 1 : 3) : listTranslated;
$: isListLimited = isExpandedBySearch && listLimited.length < filtered.length; $: isListLimited = isExpandedBySearch && listLimited.length < filtered.length;
$: listMissingItems = isListLimited ? filtered.slice(listLimited.length) : []; $: listMissingItems = isListLimited ? filtered.slice(listLimited.length) : [];

View File

@@ -279,7 +279,7 @@
showModal(InputTextModal, { showModal(InputTextModal, {
header: _t('connection.createDatabase', { defaultMessage: 'Create database' }), header: _t('connection.createDatabase', { defaultMessage: 'Create database' }),
value: 'newdb', value: 'newdb',
label: _t('connection.databaseName', { defaultMessage: 'Database name' }), label: _t('connection.database', { defaultMessage: 'Database name' }),
onConfirm: name => onConfirm: name =>
apiCall('server-connections/create-database', { apiCall('server-connections/create-database', {
conid: data._id, conid: data._id,

View File

@@ -446,8 +446,7 @@ await dbgateApi.executeQuery(${JSON.stringify(
driver?.databaseEngineTypes?.includes('document') && { driver?.databaseEngineTypes?.includes('document') && {
onClick: handleNewCollection, onClick: handleNewCollection,
text: _t('database.newCollection', { text: _t('database.newCollection', {
defaultMessage: 'New {collectionLabel}', defaultMessage: 'New collection/container'
values: { collectionLabel: driver?.collectionSingularLabel ?? 'collection/container' },
}), }),
}, },
hasPermission(`dbops/query`) && hasPermission(`dbops/query`) &&
@@ -468,12 +467,14 @@ await dbgateApi.executeQuery(${JSON.stringify(
{ divider: true }, { divider: true },
isSqlOrDoc && isSqlOrDoc &&
isProApp() &&
!connection.isReadOnly && !connection.isReadOnly &&
hasPermission(`dbops/import`) && { hasPermission(`dbops/import`) && {
onClick: handleImport, onClick: handleImport,
text: _t('database.import', { defaultMessage: 'Import' }), text: _t('database.import', { defaultMessage: 'Import' }),
}, },
isSqlOrDoc && isSqlOrDoc &&
isProApp() &&
hasPermission(`dbops/export`) && { hasPermission(`dbops/export`) && {
onClick: handleExport, onClick: handleExport,
text: _t('database.export', { defaultMessage: 'Export' }), text: _t('database.export', { defaultMessage: 'Export' }),

View File

@@ -1,5 +1,6 @@
<script lang="ts" context="module"> <script lang="ts" context="module">
import { copyTextToClipboard } from '../utility/clipboard'; import { copyTextToClipboard } from '../utility/clipboard';
import { _t, _val } from '../translations';
export const extractKey = ({ schemaName, pureName }) => (schemaName ? `${schemaName}.${pureName}` : pureName); export const extractKey = ({ schemaName, pureName }) => (schemaName ? `${schemaName}.${pureName}` : pureName);
export const createMatcher = export const createMatcher =
@@ -69,13 +70,13 @@
function createScriptTemplatesSubmenu(objectTypeField) { function createScriptTemplatesSubmenu(objectTypeField) {
return { return {
label: 'SQL template', label: _t('dbObject.sqlTemplate', { defaultMessage: 'SQL template' }),
submenu: getSupportedScriptTemplates(objectTypeField), submenu: getSupportedScriptTemplates(objectTypeField),
}; };
} }
interface DbObjMenuItem { interface DbObjMenuItem {
label?: string; label?: string | (() => string);
tab?: string; tab?: string;
forceNewTab?: boolean; forceNewTab?: boolean;
initialData?: any; initialData?: any;
@@ -113,19 +114,19 @@
divider: true, divider: true,
}, },
isProApp() && { isProApp() && {
label: 'Design query', label: _t('dbObject.designQuery', { defaultMessage: 'Design query' }),
isQueryDesigner: true, isQueryDesigner: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
isProApp() && { isProApp() && {
label: 'Design perspective query', label: _t('dbObject.designPerspectiveQuery', { defaultMessage: 'Design perspective query' }),
tab: 'PerspectiveTab', tab: 'PerspectiveTab',
forceNewTab: true, forceNewTab: true,
icon: 'img perspective', icon: 'img perspective',
}, },
createScriptTemplatesSubmenu('tables'), createScriptTemplatesSubmenu('tables'),
{ {
label: 'SQL generator', label: _t('dbObject.sqlGenerator', { defaultMessage: 'SQL generator' }),
submenu: [ submenu: [
{ {
label: 'CREATE TABLE', label: 'CREATE TABLE',
@@ -154,33 +155,33 @@
divider: true, divider: true,
}, },
hasPermission('dbops/model/edit') && { hasPermission('dbops/model/edit') && {
label: 'Drop table', label: _t('dbObject.dropTable', { defaultMessage: 'Drop table' }),
isDrop: true, isDrop: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
hasPermission('dbops/table/rename') && hasPermission('dbops/table/rename') &&
!driver?.dialect.disableRenameTable && { !driver?.dialect.disableRenameTable && {
label: 'Rename table', label: _t('dbObject.renameTable', { defaultMessage: 'Rename table' }),
isRename: true, isRename: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
hasPermission('dbops/table/truncate') && { hasPermission('dbops/table/truncate') && {
label: 'Truncate table', label: _t('dbObject.truncateTable', { defaultMessage: 'Truncate table' }),
isTruncate: true, isTruncate: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
{ {
label: 'Copy table name', label: _t('dbObject.copyTableName', { defaultMessage: 'Copy table name' }),
isCopyTableName: true, isCopyTableName: true,
requiresWriteAccess: false, requiresWriteAccess: false,
}, },
hasPermission('dbops/table/backup') && { hasPermission('dbops/table/backup') && {
label: 'Create table backup', label: _t('dbObject.createTableBackup', { defaultMessage: 'Create table backup' }),
isDuplicateTable: true, isDuplicateTable: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
hasPermission('dbops/model/view') && { hasPermission('dbops/model/view') && {
label: 'Show diagram', label: _t('dbObject.showDiagram', { defaultMessage: 'Show diagram' }),
isDiagram: true, isDiagram: true,
}, },
{ {
@@ -204,18 +205,18 @@
divider: true, divider: true,
}, },
isProApp() && { isProApp() && {
label: 'Design query', label: _t('dbObject.designQuery', { defaultMessage: 'Design query' }),
isQueryDesigner: true, isQueryDesigner: true,
}, },
isProApp() && { isProApp() && {
label: 'Design perspective query', label: _t('dbObject.designPerspectiveQuery', { defaultMessage: 'Design perspective query' }),
tab: 'PerspectiveTab', tab: 'PerspectiveTab',
forceNewTab: true, forceNewTab: true,
icon: 'img perspective', icon: 'img perspective',
}, },
createScriptTemplatesSubmenu('views'), createScriptTemplatesSubmenu('views'),
{ {
label: 'SQL generator', label: _t('dbObject.sqlGenerator', { defaultMessage: 'SQL generator' }),
submenu: [ submenu: [
{ {
label: 'CREATE VIEW', label: 'CREATE VIEW',
@@ -235,12 +236,12 @@
divider: true, divider: true,
}, },
hasPermission('dbops/model/edit') && { hasPermission('dbops/model/edit') && {
label: 'Drop view', label: _t('dbObject.dropView', { defaultMessage: 'Drop view' }),
isDrop: true, isDrop: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
hasPermission('dbops/model/edit') && { hasPermission('dbops/model/edit') && {
label: 'Rename view', label: _t('dbObject.renameView', { defaultMessage: 'Rename view' }),
isRename: true, isRename: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
@@ -260,12 +261,12 @@
divider: true, divider: true,
}, },
hasPermission('dbops/model/edit') && { hasPermission('dbops/model/edit') && {
label: 'Drop view', label: _t('dbObject.dropView', { defaultMessage: 'Drop view' }),
isDrop: true, isDrop: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
hasPermission('dbops/model/edit') && { hasPermission('dbops/model/edit') && {
label: 'Rename view', label: _t('dbObject.renameView', { defaultMessage: 'Rename view' }),
isRename: true, isRename: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
@@ -273,12 +274,12 @@
divider: true, divider: true,
}, },
{ {
label: 'Query designer', label: _t('dbObject.queryDesigner', { defaultMessage: 'Query designer' }),
isQueryDesigner: true, isQueryDesigner: true,
}, },
createScriptTemplatesSubmenu('matviews'), createScriptTemplatesSubmenu('matviews'),
{ {
label: 'SQL generator', label: _t('dbObject.sqlGenerator', { defaultMessage: 'SQL generator' }),
submenu: [ submenu: [
{ {
label: 'CREATE MATERIALIZED VIEW', label: 'CREATE MATERIALIZED VIEW',
@@ -306,7 +307,7 @@
case 'queries': case 'queries':
return [ return [
{ {
label: 'Open data', label: _t('dbObject.openData', { defaultMessage: 'Open data' }),
tab: 'QueryDataTab', tab: 'QueryDataTab',
forceNewTab: true, forceNewTab: true,
}, },
@@ -318,18 +319,18 @@
divider: true, divider: true,
}, },
hasPermission('dbops/model/edit') && { hasPermission('dbops/model/edit') && {
label: 'Drop procedure', label: _t('dbObject.dropProcedure', { defaultMessage: 'Drop procedure' }),
isDrop: true, isDrop: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
hasPermission('dbops/model/edit') && { hasPermission('dbops/model/edit') && {
label: 'Rename procedure', label: _t('dbObject.renameProcedure', { defaultMessage: 'Rename procedure' }),
isRename: true, isRename: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
createScriptTemplatesSubmenu('procedures'), createScriptTemplatesSubmenu('procedures'),
{ {
label: 'SQL generator', label: _t('dbObject.sqlGenerator', { defaultMessage: 'SQL generator' }),
submenu: [ submenu: [
{ {
label: 'CREATE PROCEDURE', label: 'CREATE PROCEDURE',
@@ -352,7 +353,7 @@
return [ return [
...defaultDatabaseObjectAppObjectActions['triggers'], ...defaultDatabaseObjectAppObjectActions['triggers'],
hasPermission('dbops/model/edit') && { hasPermission('dbops/model/edit') && {
label: 'Drop trigger', label: _t('dbObject.dropTrigger', { defaultMessage: 'Drop trigger' }),
isDrop: true, isDrop: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
@@ -360,7 +361,7 @@
divider: true, divider: true,
}, },
{ {
label: 'SQL generator', label: _t('dbObject.sqlGenerator', { defaultMessage: 'SQL generator' }),
submenu: [ submenu: [
{ {
label: 'CREATE TRIGGER', label: 'CREATE TRIGGER',
@@ -384,7 +385,7 @@
divider: true, divider: true,
}, },
isProApp() && { isProApp() && {
label: 'Design perspective query', label: _t('dbObject.designPerspectiveQuery', { defaultMessage: 'Design perspective query' }),
tab: 'PerspectiveTab', tab: 'PerspectiveTab',
forceNewTab: true, forceNewTab: true,
icon: 'img perspective', icon: 'img perspective',
@@ -395,17 +396,17 @@
functionName: 'tableReader', functionName: 'tableReader',
}, },
hasPermission('dbops/model/edit') && { hasPermission('dbops/model/edit') && {
label: `Drop ${driver?.collectionSingularLabel ?? 'collection/container'}`, label: _t('dbObject.dropCollection', { defaultMessage: 'Drop collection/container'}),
isDropCollection: true, isDropCollection: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
hasPermission('dbops/table/rename') && { hasPermission('dbops/table/rename') && {
label: `Rename ${driver?.collectionSingularLabel ?? 'collection/container'}`, label: _t('dbObject.renameCollection', { defaultMessage: 'Rename collection/container'}),
isRenameCollection: true, isRenameCollection: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
hasPermission('dbops/table/backup') && { hasPermission('dbops/table/backup') && {
label: `Create ${driver?.collectionSingularLabel ?? 'collection/container'} backup`, label: _t('dbObject.createCollectionBackup', { defaultMessage: 'Create collection/container backup'}),
isDuplicateCollection: true, isDuplicateCollection: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
@@ -418,7 +419,7 @@
const menu: DbObjMenuItem[] = [ const menu: DbObjMenuItem[] = [
...defaultDatabaseObjectAppObjectActions['schedulerEvents'], ...defaultDatabaseObjectAppObjectActions['schedulerEvents'],
hasPermission('dbops/model/edit') && { hasPermission('dbops/model/edit') && {
label: 'Drop event', label: _t('dbObject.dropEvent', { defaultMessage: 'Drop event' }),
isDrop: true, isDrop: true,
requiresWriteAccess: true, requiresWriteAccess: true,
}, },
@@ -426,12 +427,12 @@
if (data?.status === 'ENABLED') { if (data?.status === 'ENABLED') {
menu.push({ menu.push({
label: 'Disable', label: _t('dbObject.disable', { defaultMessage: 'Disable' }),
isDisableEvent: true, isDisableEvent: true,
}); });
} else { } else {
menu.push({ menu.push({
label: 'Enable', label: _t('dbObject.enable', { defaultMessage: 'Enable' }),
isEnableEvent: true, isEnableEvent: true,
}); });
} }
@@ -441,7 +442,7 @@
divider: true, divider: true,
}, },
{ {
label: 'SQL generator', label: _t('dbObject.sqlGenerator', { defaultMessage: 'SQL generator' }),
submenu: [ submenu: [
{ {
label: 'CREATE SCHEDULER EVENT', label: 'CREATE SCHEDULER EVENT',
@@ -474,7 +475,7 @@
if (menu.isQueryDesigner) { if (menu.isQueryDesigner) {
openNewTab( openNewTab(
{ {
title: 'Query #', title: _t('dbObject.query', { defaultMessage: 'Query #' }),
icon: 'img query-design', icon: 'img query-design',
tabComponent: 'QueryDesignTab', tabComponent: 'QueryDesignTab',
focused: true, focused: true,
@@ -499,7 +500,7 @@
} else if (menu.isDiagram) { } else if (menu.isDiagram) {
openNewTab( openNewTab(
{ {
title: 'Diagram #', title: _t('dbObject.diagram', { defaultMessage: 'Diagram #' }),
icon: 'img diagram', icon: 'img diagram',
tabComponent: 'DiagramTab', tabComponent: 'DiagramTab',
props: { props: {
@@ -589,7 +590,7 @@
}); });
} else if (menu.isDropCollection) { } else if (menu.isDropCollection) {
showModal(ConfirmModal, { showModal(ConfirmModal, {
message: `Really drop collection ${data.pureName}?`, message: _t('dbObject.confirmDropCollection', { defaultMessage: 'Really drop collection {name}?', values: { name: data.pureName } }),
onConfirm: async () => { onConfirm: async () => {
const dbid = _.pick(data, ['conid', 'database']); const dbid = _.pick(data, ['conid', 'database']);
runOperationOnDatabase(dbid, { runOperationOnDatabase(dbid, {
@@ -603,8 +604,8 @@
} else if (menu.isRenameCollection) { } else if (menu.isRenameCollection) {
const driver = await getDriver(); const driver = await getDriver();
showModal(InputTextModal, { showModal(InputTextModal, {
label: `New ${driver?.collectionSingularLabel ?? 'collection/container'} name`, label: _t('dbObject.newCollectionName', { defaultMessage: 'New collection/container name' }),
header: `Rename ${driver?.collectionSingularLabel ?? 'collection/container'}`, header: _t('dbObject.renameCollection', { defaultMessage: 'Rename collection/container' }),
value: data.pureName, value: data.pureName,
onConfirm: async newName => { onConfirm: async newName => {
const dbid = _.pick(data, ['conid', 'database']); const dbid = _.pick(data, ['conid', 'database']);
@@ -620,7 +621,7 @@
const driver = await getDriver(); const driver = await getDriver();
showModal(ConfirmModal, { showModal(ConfirmModal, {
message: `Really create ${driver?.collectionSingularLabel ?? 'collection/container'} copy named ${newName}?`, message: _t('dbObject.confirmCloneCollection', { defaultMessage: 'Really create collection/container copy named {name}?', values: { name: newName } }),
onConfirm: async () => { onConfirm: async () => {
const dbid = _.pick(data, ['conid', 'database']); const dbid = _.pick(data, ['conid', 'database']);
runOperationOnDatabase(dbid, { runOperationOnDatabase(dbid, {
@@ -718,7 +719,7 @@
const filteredSumenus = coreMenus.map(item => { const filteredSumenus = coreMenus.map(item => {
if (!item.submenu) { if (!item.submenu) {
return item; return { ...item , label: _val(item.label)};
} }
return { return {
...item, ...item,
@@ -768,7 +769,7 @@
openNewTab( openNewTab(
{ {
// title: getObjectTitle(connection, schemaName, pureName), // title: getObjectTitle(connection, schemaName, pureName),
title: tabComponent ? getObjectTitle(connection, schemaName, pureName) : 'Query #', title: tabComponent ? getObjectTitle(connection, schemaName, pureName) : _t('dbObject.query', { defaultMessage: 'Query #' }),
focused: tabComponent == null, focused: tabComponent == null,
tooltip, tooltip,
icon: icon:

View File

@@ -1,3 +1,4 @@
import { __t } from '../translations';
export function matchDatabaseObjectAppObject(obj1, obj2) { export function matchDatabaseObjectAppObject(obj1, obj2) {
return ( return (
obj1?.objectTypeField == obj2?.objectTypeField && obj1?.objectTypeField == obj2?.objectTypeField &&
@@ -11,12 +12,12 @@ export function matchDatabaseObjectAppObject(obj1, obj2) {
function getTableLikeActions(dataTab) { function getTableLikeActions(dataTab) {
return [ return [
{ {
label: 'Open data', label: __t('dbObject.openData', { defaultMessage: 'Open data' }),
tab: dataTab, tab: dataTab,
defaultActionId: 'openTable', defaultActionId: 'openTable',
}, },
{ {
label: 'Open raw data', label: __t('dbObject.openRawData', { defaultMessage: 'Open raw data' }),
tab: dataTab, tab: dataTab,
defaultActionId: 'openRawTable', defaultActionId: 'openRawTable',
isRawMode: true, isRawMode: true,
@@ -33,13 +34,13 @@ function getTableLikeActions(dataTab) {
// defaultActionId: 'openForm', // defaultActionId: 'openForm',
// }, // },
{ {
label: 'Open structure', label: __t('dbObject.openStructure', { defaultMessage: 'Open structure' }),
tab: 'TableStructureTab', tab: 'TableStructureTab',
icon: 'img table-structure', icon: 'img table-structure',
defaultActionId: 'openStructure', defaultActionId: 'openStructure',
}, },
{ {
label: 'Show SQL', label: __t('dbObject.showSql', { defaultMessage: 'Show SQL' }),
tab: 'SqlObjectTab', tab: 'SqlObjectTab',
defaultActionId: 'showSql', defaultActionId: 'showSql',
icon: 'img sql-file', icon: 'img sql-file',
@@ -53,7 +54,7 @@ export const defaultDatabaseObjectAppObjectActions = {
matviews: getTableLikeActions('ViewDataTab'), matviews: getTableLikeActions('ViewDataTab'),
procedures: [ procedures: [
{ {
label: 'Show SQL', label: __t('dbObject.showSql', { defaultMessage: 'Show SQL' }),
tab: 'SqlObjectTab', tab: 'SqlObjectTab',
defaultActionId: 'showSql', defaultActionId: 'showSql',
icon: 'img sql-file', icon: 'img sql-file',
@@ -61,7 +62,7 @@ export const defaultDatabaseObjectAppObjectActions = {
], ],
functions: [ functions: [
{ {
label: 'Show SQL', label: __t('dbObject.showSql', { defaultMessage: 'Show SQL' }),
tab: 'SqlObjectTab', tab: 'SqlObjectTab',
defaultActionId: 'showSql', defaultActionId: 'showSql',
icon: 'img sql-file', icon: 'img sql-file',
@@ -69,7 +70,7 @@ export const defaultDatabaseObjectAppObjectActions = {
], ],
triggers: [ triggers: [
{ {
label: 'Show SQL', label: __t('dbObject.showSql', { defaultMessage: 'Show SQL' }),
tab: 'SqlObjectTab', tab: 'SqlObjectTab',
defaultActionId: 'showSql', defaultActionId: 'showSql',
icon: 'img sql-file', icon: 'img sql-file',
@@ -77,12 +78,12 @@ export const defaultDatabaseObjectAppObjectActions = {
], ],
collections: [ collections: [
{ {
label: 'Open data', label: __t('dbObject.openData', { defaultMessage: 'Open data' }),
tab: 'CollectionDataTab', tab: 'CollectionDataTab',
defaultActionId: 'openTable', defaultActionId: 'openTable',
}, },
{ {
label: 'Open JSON', label: __t('dbObject.openJson', { defaultMessage: 'Open JSON' }),
tab: 'CollectionDataTab', tab: 'CollectionDataTab',
defaultActionId: 'openJson', defaultActionId: 'openJson',
initialData: { initialData: {
@@ -94,7 +95,7 @@ export const defaultDatabaseObjectAppObjectActions = {
], ],
schedulerEvents: [ schedulerEvents: [
{ {
label: 'Show SQL', label: __t('dbObject.showSql', { defaultMessage: 'Show SQL' }),
tab: 'SqlObjectTab', tab: 'SqlObjectTab',
defaultActionId: 'showSql', defaultActionId: 'showSql',
icon: 'img sql-file', icon: 'img sql-file',
@@ -102,7 +103,7 @@ export const defaultDatabaseObjectAppObjectActions = {
], ],
queries: [ queries: [
{ {
label: 'Show query', label: __t('dbObject.showQuery', { defaultMessage: 'Show query' }),
tab: 'QueryDataTab', tab: 'QueryDataTab',
defaultActionId: 'showAppQuery', defaultActionId: 'showAppQuery',
icon: 'img app-query', icon: 'img app-query',

View File

@@ -1,6 +1,7 @@
<script lang="ts"> <script lang="ts">
import FontIcon from '../icons/FontIcon.svelte'; import FontIcon from '../icons/FontIcon.svelte';
import { isProApp } from '../utility/proTools'; import { isProApp } from '../utility/proTools';
import { _t } from '../translations';
export let icon; export let icon;
export let title; export let title;
@@ -21,7 +22,7 @@
data-testid={$$props['data-testid']} data-testid={$$props['data-testid']}
title={disabled title={disabled
? isProFeature && !isProApp() ? isProFeature && !isProApp()
? 'This feature is available only in DbGate Premium' ? _t('common.featurePremium', { defaultMessage: 'This feature is available only in DbGate Premium' })
: disabledMessage : disabledMessage
: undefined} : undefined}
> >

View File

@@ -1,6 +1,6 @@
<script context="module"> <script context="module">
function getCommandTitle(command) { function getCommandTitle(command) {
let res = command.text; let res = _val(command.text);
if (command.keyText || command.keyTextFromGroup) { if (command.keyText || command.keyTextFromGroup) {
res += ` (${formatKeyText(command.keyText || command.keyTextFromGroup)})`; res += ` (${formatKeyText(command.keyText || command.keyTextFromGroup)})`;
} }
@@ -12,6 +12,8 @@
import { commandsCustomized } from '../stores'; import { commandsCustomized } from '../stores';
import { formatKeyText } from '../utility/common'; import { formatKeyText } from '../utility/common';
import ToolStripButton from './ToolStripButton.svelte'; import ToolStripButton from './ToolStripButton.svelte';
import _ from 'lodash';
import { _val } from '../translations';
export let command; export let command;
export let component = ToolStripButton; export let component = ToolStripButton;
@@ -32,6 +34,6 @@
{iconAfter} {iconAfter}
{...$$restProps} {...$$restProps}
> >
{buttonLabel || cmd.toolbarName || cmd.name} {(_val(buttonLabel) || _val(cmd?.toolbarName) || _val(cmd?.name))}
</svelte:component> </svelte:component>
{/if} {/if}

View File

@@ -23,7 +23,8 @@
import hasPermission from '../utility/hasPermission'; import hasPermission from '../utility/hasPermission';
import ToolStripCommandButton from './ToolStripCommandButton.svelte'; import ToolStripCommandButton from './ToolStripCommandButton.svelte';
import ToolStripDropDownButton from './ToolStripDropDownButton.svelte'; import ToolStripDropDownButton from './ToolStripDropDownButton.svelte';
import _ from 'lodash';
import { _val } from '../translations';
export let quickExportHandlerRef = null; export let quickExportHandlerRef = null;
export let command = 'sqlDataGrid.export'; export let command = 'sqlDataGrid.export';
export let label = 'Export'; export let label = 'Export';
@@ -39,7 +40,7 @@
{#if hasPermission('dbops/export')} {#if hasPermission('dbops/export')}
{#if quickExportHandlerRef} {#if quickExportHandlerRef}
<ToolStripDropDownButton menu={getExportMenu} {label} icon="icon export" /> <ToolStripDropDownButton menu={getExportMenu} label={_val(label)} icon="icon export" />
{:else} {:else}
<ToolStripCommandButton {command} /> <ToolStripCommandButton {command} />
{/if} {/if}

View File

@@ -1,9 +1,9 @@
<script context="module"> <script context="module">
registerCommand({ registerCommand({
id: 'commandPalette.show', id: 'commandPalette.show',
category: 'Command palette', category: __t('command.commandPalette', { defaultMessage: 'Command palette' }),
name: 'Show', name: __t('command.commandPalette.show', { defaultMessage: 'Show' }),
toolbarName: 'Command palette', toolbarName: __t('command.commandPalette', { defaultMessage: 'Command palette' }),
toolbarOrder: 0, toolbarOrder: 0,
keyText: 'F1', keyText: 'F1',
toolbar: true, toolbar: true,
@@ -15,9 +15,9 @@
registerCommand({ registerCommand({
id: 'database.search', id: 'database.search',
category: 'Database', category: __t('command.database', { defaultMessage: 'Database' }),
toolbarName: 'Database search', toolbarName: __t('command.database.databaseSearch', { defaultMessage: 'Database search' }),
name: 'Search', name: __t('command.database.search', { defaultMessage: 'Search' }),
keyText: isElectronAvailable() ? 'CtrlOrCommand+P' : 'F3', keyText: isElectronAvailable() ? 'CtrlOrCommand+P' : 'F3',
onClick: () => visibleCommandPalette.set('database'), onClick: () => visibleCommandPalette.set('database'),
testEnabled: () => getVisibleCommandPalette() != 'database', testEnabled: () => getVisibleCommandPalette() != 'database',
@@ -81,6 +81,7 @@
import { getLocalStorage } from '../utility/storageCache'; import { getLocalStorage } from '../utility/storageCache';
import registerCommand from './registerCommand'; import registerCommand from './registerCommand';
import { formatKeyText, switchCurrentDatabase } from '../utility/common'; import { formatKeyText, switchCurrentDatabase } from '../utility/common';
import { _val, __t } from '../translations';
let domInput; let domInput;
let filter = ''; let filter = '';
@@ -117,7 +118,7 @@
: sortedComands : sortedComands
).filter(x => !x.isGroupCommand), ).filter(x => !x.isGroupCommand),
{ {
extract: x => x.text, extract: x => _val(x.text),
pre: '<b>', pre: '<b>',
post: '</b>', post: '</b>',
} }

View File

@@ -4,11 +4,12 @@ import getElectron from '../utility/getElectron';
import registerCommand from './registerCommand'; import registerCommand from './registerCommand';
import { apiCall } from '../utility/api'; import { apiCall } from '../utility/api';
import { switchCurrentDatabase } from '../utility/common'; import { switchCurrentDatabase } from '../utility/common';
import { __t } from '../translations';
registerCommand({ registerCommand({
id: 'database.changeState', id: 'database.changeState',
category: 'Database', category: __t('command.database', { defaultMessage: 'Database' }),
name: 'Change status', name: __t('command.database.changeStatus', { defaultMessage: 'Change status' }),
getSubCommands: () => { getSubCommands: () => {
const current = getCurrentDatabase(); const current = getCurrentDatabase();
if (!current) return []; if (!current) return [];

View File

@@ -3,6 +3,7 @@ import { recentDatabases, currentDatabase, getRecentDatabases } from '../stores'
import registerCommand from './registerCommand'; import registerCommand from './registerCommand';
import { getConnectionLabel } from 'dbgate-tools'; import { getConnectionLabel } from 'dbgate-tools';
import { switchCurrentDatabase } from '../utility/common'; import { switchCurrentDatabase } from '../utility/common';
import { __t } from '../translations';
currentDatabase.subscribe(value => { currentDatabase.subscribe(value => {
if (!value) return; if (!value) return;
@@ -24,8 +25,8 @@ function switchDatabaseCommand(db) {
registerCommand({ registerCommand({
id: 'database.switch', id: 'database.switch',
category: 'Database', category: __t('command.database', { defaultMessage: 'Database' }),
name: 'Change to recent', name: __t('command.database.changeRecent', { defaultMessage: 'Change to recent' }),
menuName: 'Switch recent database', menuName: 'Switch recent database',
keyText: 'CtrlOrCommand+D', keyText: 'CtrlOrCommand+D',
getSubCommands: () => getRecentDatabases().map(switchDatabaseCommand), getSubCommands: () => getRecentDatabases().map(switchDatabaseCommand),

View File

@@ -1,5 +1,7 @@
import { commands } from '../stores'; import { commands } from '../stores';
import { invalidateCommandDefinitions } from './invalidateCommands'; import { invalidateCommandDefinitions } from './invalidateCommands';
import _ from 'lodash';
import { _val } from '../translations';
export interface SubCommand { export interface SubCommand {
text: string; text: string;
@@ -8,10 +10,10 @@ export interface SubCommand {
export interface GlobalCommand { export interface GlobalCommand {
id: string; id: string;
category: string; // null for group commands category: string | (() => string); // null for group commands
isGroupCommand?: boolean; isGroupCommand?: boolean;
name: string; name: string | (() => string);
text?: string /* category: name */; text?: string | (() => string);
keyText?: string; keyText?: string;
keyTextFromGroup?: string; // automatically filled from group keyTextFromGroup?: string; // automatically filled from group
group?: string; group?: string;
@@ -23,11 +25,11 @@ export interface GlobalCommand {
toolbar?: boolean; toolbar?: boolean;
enabled?: boolean; enabled?: boolean;
showDisabled?: boolean; showDisabled?: boolean;
toolbarName?: string; toolbarName?: string | (() => string);
menuName?: string; menuName?: string;
toolbarOrder?: number; toolbarOrder?: number;
disableHandleKeyText?: string; disableHandleKeyText?: string;
isRelatedToTab?: boolean, isRelatedToTab?: boolean;
systemCommand?: boolean; systemCommand?: boolean;
} }
@@ -41,7 +43,10 @@ export default function registerCommand(command: GlobalCommand) {
return { return {
...x, ...x,
[command.id]: { [command.id]: {
text: `${command.category}: ${command.name}`, text:
_.isFunction(command.category) || _.isFunction(command.name)
? () => `${_val(command.category)}: ${_val(command.name)}`
: `${command.category}: ${command.name}`,
...command, ...command,
enabled: !testEnabled, enabled: !testEnabled,
}, },

View File

@@ -8,6 +8,7 @@ import {
getCloudSigninTokenHolder, getCloudSigninTokenHolder,
getExtensions, getExtensions,
getVisibleToolbar, getVisibleToolbar,
promoWidgetPreview,
visibleToolbar, visibleToolbar,
visibleWidgetSideBar, visibleWidgetSideBar,
} from '../stores'; } from '../stores';
@@ -50,6 +51,8 @@ import { isProApp } from '../utility/proTools';
import { openWebLink } from '../utility/simpleTools'; import { openWebLink } from '../utility/simpleTools';
import { _t } from '../translations'; import { _t } from '../translations';
import ExportImportConnectionsModal from '../modals/ExportImportConnectionsModal.svelte'; import ExportImportConnectionsModal from '../modals/ExportImportConnectionsModal.svelte';
import { getBoolSettingsValue } from '../settings/settingsTools';
import { __t } from '../translations';
// function themeCommand(theme: ThemeDefinition) { // function themeCommand(theme: ThemeDefinition) {
// return { // return {
@@ -67,42 +70,42 @@ import ExportImportConnectionsModal from '../modals/ExportImportConnectionsModal
registerCommand({ registerCommand({
id: 'theme.changeTheme', id: 'theme.changeTheme',
category: 'Theme', category: __t('command.theme', { defaultMessage: 'Theme' }),
name: 'Change', name: __t('command.theme.change', { defaultMessage: 'Change' }),
toolbarName: 'Change theme', toolbarName: __t('command.theme.changeToolbar', { defaultMessage: 'Change theme' }),
onClick: () => showModal(SettingsModal, { selectedTab: 'theme' }), onClick: () => showModal(SettingsModal, { selectedTab: 'theme' }),
// getSubCommands: () => get(extensions).themes.map(themeCommand), // getSubCommands: () => get(extensions).themes.map(themeCommand),
}); });
registerCommand({ registerCommand({
id: 'toolbar.show', id: 'toolbar.show',
category: 'Toolbar', category: __t('command.toolbar', { defaultMessage: 'Toolbar' }),
name: 'Show', name: __t('command.toolbar.show', { defaultMessage: 'Show' }),
onClick: () => visibleToolbar.set(true), onClick: () => visibleToolbar.set(true),
testEnabled: () => !getVisibleToolbar(), testEnabled: () => !getVisibleToolbar(),
}); });
registerCommand({ registerCommand({
id: 'toolbar.hide', id: 'toolbar.hide',
category: 'Toolbar', category: __t('command.toolbar', { defaultMessage: 'Toolbar' }),
name: 'Hide', name: __t('command.toolbar.hide', { defaultMessage: 'Hide' }),
onClick: () => visibleToolbar.set(false), onClick: () => visibleToolbar.set(false),
testEnabled: () => getVisibleToolbar(), testEnabled: () => getVisibleToolbar(),
}); });
registerCommand({ registerCommand({
id: 'about.show', id: 'about.show',
category: 'About', category: __t('command.about', { defaultMessage: 'About' }),
name: 'Show', name: __t('command.about.show', { defaultMessage: 'Show' }),
toolbarName: 'About', toolbarName: __t('command.about.toolbar', { defaultMessage: 'About' }),
onClick: () => showModal(AboutModal), onClick: () => showModal(AboutModal),
}); });
registerCommand({ registerCommand({
id: 'toggle.sidebar', id: 'toggle.sidebar',
category: 'Sidebar', category: __t('command.sidebar', { defaultMessage: 'Sidebar' }),
name: 'Show', name: __t('command.sidebar.show', { defaultMessage: 'Show' }),
toolbarName: 'Toggle sidebar', toolbarName: __t('command.sidebar.toggleToolbar', { defaultMessage: 'Toggle sidebar' }),
keyText: 'CtrlOrCommand+B', keyText: 'CtrlOrCommand+B',
onClick: () => visibleWidgetSideBar.update(x => !x), onClick: () => visibleWidgetSideBar.update(x => !x),
}); });
@@ -111,10 +114,10 @@ registerCommand({
id: 'new.connection', id: 'new.connection',
toolbar: true, toolbar: true,
icon: 'icon new-connection', icon: 'icon new-connection',
toolbarName: 'Add connection', toolbarName: __t('command.new.connection', { defaultMessage: 'Add connection' }),
category: 'New', category: __t('command.new', { defaultMessage: 'New'}),
toolbarOrder: 1, toolbarOrder: 1,
name: 'Connection', name: __t('command.new.connection', { defaultMessage: 'Connection' }),
testEnabled: () => !getCurrentConfig()?.runAsPortal && !getCurrentConfig()?.storageDatabase, testEnabled: () => !getCurrentConfig()?.runAsPortal && !getCurrentConfig()?.storageDatabase,
onClick: () => { onClick: () => {
openNewTab({ openNewTab({
@@ -129,10 +132,10 @@ registerCommand({
id: 'new.connectionOnCloud', id: 'new.connectionOnCloud',
toolbar: true, toolbar: true,
icon: 'img cloud-connection', icon: 'img cloud-connection',
toolbarName: 'Add connection', toolbarName: __t('command.new.connection', { defaultMessage: 'Add connection' }),
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
toolbarOrder: 1, toolbarOrder: 1,
name: 'Connection on Cloud', name: __t('command.new.connectionCloud', { defaultMessage: 'Connection on Cloud' }),
testEnabled: () => testEnabled: () =>
!getCurrentConfig()?.runAsPortal && !getCurrentConfig()?.storageDatabase && !!getCloudSigninTokenHolder(), !getCurrentConfig()?.runAsPortal && !getCurrentConfig()?.storageDatabase && !!getCloudSigninTokenHolder(),
onClick: () => { onClick: () => {
@@ -151,16 +154,16 @@ registerCommand({
id: 'new.connection.folder', id: 'new.connection.folder',
toolbar: true, toolbar: true,
icon: 'icon add-folder', icon: 'icon add-folder',
toolbarName: 'Add connection folder', toolbarName: __t('command.new.connectionFolderToolbar', { defaultMessage: 'Add connection folder' }),
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
toolbarOrder: 1, toolbarOrder: 1,
name: 'Connection folder', name: __t('command.new.connectionFolder', { defaultMessage: 'Connection folder' }),
testEnabled: () => !getCurrentConfig()?.runAsPortal, testEnabled: () => !getCurrentConfig()?.runAsPortal,
onClick: () => { onClick: () => {
showModal(InputTextModal, { showModal(InputTextModal, {
value: '', value: '',
label: 'New connection folder name', label: _t('connection.createNewFolderName', { defaultMessage: 'New connection folder name' }),
header: 'Create connection folder', header: _t('connection.createNewFolder', { defaultMessage: 'Create connection folder' }),
onConfirm: async folder => { onConfirm: async folder => {
emptyConnectionGroupNames.update(names => { emptyConnectionGroupNames.update(names => {
if (!folder) return names; if (!folder) return names;
@@ -174,21 +177,21 @@ registerCommand({
registerCommand({ registerCommand({
id: 'new.query', id: 'new.query',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'icon file', icon: 'icon file',
toolbar: true, toolbar: true,
toolbarOrder: 2, toolbarOrder: 2,
name: 'Query', name: __t('command.new.query', { defaultMessage: 'Query' }),
toolbarName: 'New query', toolbarName: __t('command.new.queryToolbar', { defaultMessage: 'New query' }),
keyText: 'CtrlOrCommand+T', keyText: 'CtrlOrCommand+T',
onClick: () => newQuery(), onClick: () => newQuery(),
}); });
registerCommand({ registerCommand({
id: 'new.shell', id: 'new.shell',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'img shell', icon: 'img shell',
name: 'JavaScript Shell', name: __t('command.new.shell', { defaultMessage: 'JavaScript Shell' }),
menuName: 'New JavaScript shell', menuName: 'New JavaScript shell',
onClick: () => { onClick: () => {
openNewTab({ openNewTab({
@@ -202,9 +205,9 @@ registerCommand({
if (isProApp()) { if (isProApp()) {
registerCommand({ registerCommand({
id: 'new.queryDesign', id: 'new.queryDesign',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'img query-design', icon: 'img query-design',
name: 'Query design', name: __t('command.new.queryDesign', { defaultMessage: 'Query design' }),
menuName: 'New query design', menuName: 'New query design',
onClick: () => newQueryDesign(), onClick: () => newQueryDesign(),
testEnabled: () => testEnabled: () =>
@@ -216,9 +219,9 @@ if (isProApp()) {
if (isProApp()) { if (isProApp()) {
registerCommand({ registerCommand({
id: 'new.modelTransform', id: 'new.modelTransform',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'img transform', icon: 'img transform',
name: 'Model transform', name: __t('command.new.modelTransform', { defaultMessage: 'Model transform' }),
menuName: 'New model transform', menuName: 'New model transform',
onClick: () => { onClick: () => {
openNewTab( openNewTab(
@@ -260,9 +263,9 @@ if (isProApp()) {
if (isProApp()) { if (isProApp()) {
registerCommand({ registerCommand({
id: 'new.perspective', id: 'new.perspective',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'img perspective', icon: 'img perspective',
name: 'Perspective', name: __t('command.new.perspective', { defaultMessage: 'Perspective' }),
menuName: 'New perspective', menuName: 'New perspective',
onClick: () => newPerspective(), onClick: () => newPerspective(),
}); });
@@ -271,9 +274,9 @@ if (isProApp()) {
if (isProApp()) { if (isProApp()) {
registerCommand({ registerCommand({
id: 'new.application', id: 'new.application',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'img app', icon: 'img app',
name: 'Application', name: __t('command.new.application', { defaultMessage: 'Application' }),
menuName: 'New application', menuName: 'New application',
onClick: () => { onClick: () => {
openNewTab({ openNewTab({
@@ -287,9 +290,9 @@ if (isProApp()) {
registerCommand({ registerCommand({
id: 'new.diagram', id: 'new.diagram',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'img diagram', icon: 'img diagram',
name: 'ER Diagram', name: __t('command.new.diagram', { defaultMessage: 'ER Diagram' }),
menuName: 'New ER diagram', menuName: 'New ER diagram',
testEnabled: () => testEnabled: () =>
getCurrentDatabase() && getCurrentDatabase() &&
@@ -299,9 +302,9 @@ registerCommand({
registerCommand({ registerCommand({
id: 'new.archiveFolder', id: 'new.archiveFolder',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'img archive', icon: 'img archive',
name: 'Archive folder', name: __t('command.new.archiveFolder', { defaultMessage: 'Archive folder' }),
onClick: () => { onClick: () => {
showModal(InputTextModal, { showModal(InputTextModal, {
value: '', value: '',
@@ -333,11 +336,11 @@ registerCommand({
registerCommand({ registerCommand({
id: 'new.table', id: 'new.table',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'icon table', icon: 'icon table',
name: 'Table', name: __t('command.new.table', { defaultMessage: 'Table' }),
toolbar: true, toolbar: true,
toolbarName: 'New table', toolbarName: __t('command.new.tableToolbar', { defaultMessage: 'New table' }),
testEnabled: () => { testEnabled: () => {
if (!hasPermission('dbops/model/edit')) return false; if (!hasPermission('dbops/model/edit')) return false;
const driver = findEngineDriver(get(currentDatabase)?.connection, getExtensions()); const driver = findEngineDriver(get(currentDatabase)?.connection, getExtensions());
@@ -353,11 +356,11 @@ registerCommand({
registerCommand({ registerCommand({
id: 'new.collection', id: 'new.collection',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'icon table', icon: 'icon table',
name: 'Collection', name: __t('command.new.collection', { defaultMessage: 'Collection' }),
toolbar: true, toolbar: true,
toolbarName: 'New collection/container', toolbarName: __t('command.new.collectionToolbar', { defaultMessage: 'New collection/container' }),
testEnabled: () => { testEnabled: () => {
const driver = findEngineDriver(get(currentDatabase)?.connection, getExtensions()); const driver = findEngineDriver(get(currentDatabase)?.connection, getExtensions());
return !!get(currentDatabase) && driver?.databaseEngineTypes?.includes('document'); return !!get(currentDatabase) && driver?.databaseEngineTypes?.includes('document');
@@ -379,9 +382,9 @@ registerCommand({
registerCommand({ registerCommand({
id: 'new.markdown', id: 'new.markdown',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'img markdown', icon: 'img markdown',
name: 'Markdown page', name: __t('command.new.markdown', { defaultMessage: 'Markdown page' }),
onClick: () => { onClick: () => {
openNewTab({ openNewTab({
title: 'Page #', title: 'Page #',
@@ -394,9 +397,9 @@ registerCommand({
if (isProApp()) { if (isProApp()) {
registerCommand({ registerCommand({
id: 'new.modelCompare', id: 'new.modelCompare',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'icon compare', icon: 'icon compare',
name: 'Compare DB', name: __t('command.new.modelCompare', { defaultMessage: 'Compare DB' }),
toolbar: true, toolbar: true,
onClick: () => { onClick: () => {
openNewTab({ openNewTab({
@@ -410,9 +413,9 @@ if (isProApp()) {
registerCommand({ registerCommand({
id: 'new.jsonl', id: 'new.jsonl',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'img archive', icon: 'img archive',
name: 'JSON Lines', name: __t('command.new.jsonl', { defaultMessage: 'JSON Lines' }),
menuName: 'New JSON lines file', menuName: 'New JSON lines file',
onClick: () => { onClick: () => {
openNewTab( openNewTab(
@@ -430,9 +433,9 @@ registerCommand({
registerCommand({ registerCommand({
id: 'new.sqliteDatabase', id: 'new.sqliteDatabase',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'img sqlite-database', icon: 'img sqlite-database',
name: 'SQLite database', name: __t('command.new.sqliteDatabase', { defaultMessage: 'SQLite database' }),
menuName: _t('command.new.sqliteDatabase', { defaultMessage: 'New SQLite database' }), menuName: _t('command.new.sqliteDatabase', { defaultMessage: 'New SQLite database' }),
onClick: () => { onClick: () => {
showModal(InputTextModal, { showModal(InputTextModal, {
@@ -450,9 +453,9 @@ registerCommand({
registerCommand({ registerCommand({
id: 'new.duckdbDatabase', id: 'new.duckdbDatabase',
category: 'New', category: __t('command.new', { defaultMessage: 'New' }),
icon: 'img sqlite-database', icon: 'img sqlite-database',
name: 'DuckDB database', name: __t('command.new.duckdbDatabase', { defaultMessage: 'DuckDB database' }),
menuName: _t('command.new.duckdbDatabase', { defaultMessage: 'New DuckDB database' }), menuName: _t('command.new.duckdbDatabase', { defaultMessage: 'New DuckDB database' }),
onClick: () => { onClick: () => {
showModal(InputTextModal, { showModal(InputTextModal, {
@@ -470,8 +473,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'tabs.changelog', id: 'tabs.changelog',
category: 'Tabs', category: __t('command.tabs', { defaultMessage: 'Tabs' }),
name: 'Changelog', name: __t('command.tabs.changelog', { defaultMessage: 'Changelog' }),
onClick: () => { onClick: () => {
openNewTab({ openNewTab({
title: 'ChangeLog', title: 'ChangeLog',
@@ -486,7 +489,7 @@ registerCommand({
id: 'group.save', id: 'group.save',
category: null, category: null,
isGroupCommand: true, isGroupCommand: true,
name: 'Save', name: __t('command.save', { defaultMessage: 'Save' }),
keyText: 'CtrlOrCommand+S', keyText: 'CtrlOrCommand+S',
group: 'save', group: 'save',
}); });
@@ -495,7 +498,7 @@ registerCommand({
id: 'group.saveAs', id: 'group.saveAs',
category: null, category: null,
isGroupCommand: true, isGroupCommand: true,
name: 'Save As', name: __t('command.saveAs', { defaultMessage: 'Save As' }),
keyText: 'CtrlOrCommand+Shift+S', keyText: 'CtrlOrCommand+Shift+S',
group: 'saveAs', group: 'saveAs',
}); });
@@ -504,7 +507,7 @@ registerCommand({
id: 'group.undo', id: 'group.undo',
category: null, category: null,
isGroupCommand: true, isGroupCommand: true,
name: 'Undo', name: __t('command.undo', { defaultMessage: 'Undo' }),
keyText: 'CtrlOrCommand+Z', keyText: 'CtrlOrCommand+Z',
group: 'undo', group: 'undo',
}); });
@@ -513,15 +516,15 @@ registerCommand({
id: 'group.redo', id: 'group.redo',
category: null, category: null,
isGroupCommand: true, isGroupCommand: true,
name: 'Redo', name: __t('command.redo', { defaultMessage: 'Redo' }),
keyText: 'CtrlOrCommand+Y', keyText: 'CtrlOrCommand+Y',
group: 'redo', group: 'redo',
}); });
registerCommand({ registerCommand({
id: 'file.open', id: 'file.open',
category: 'File', category: __t('command.file', { defaultMessage: 'File' }),
name: 'Open', name: __t('command.file.open', { defaultMessage: 'Open' }),
keyText: 'CtrlOrCommand+O', keyText: 'CtrlOrCommand+O',
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: openElectronFile, onClick: openElectronFile,
@@ -529,36 +532,36 @@ registerCommand({
registerCommand({ registerCommand({
id: 'file.openArchive', id: 'file.openArchive',
category: 'File', category: __t('command.file', { defaultMessage: 'File' }),
name: 'Open DB Model/Archive', name: __t('command.file.openArchive', { defaultMessage: 'Open DB Model/Archive' }),
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: openArchiveFolder, onClick: openArchiveFolder,
}); });
registerCommand({ registerCommand({
id: 'folder.showLogs', id: 'folder.showLogs',
category: 'Folder', category: __t('command.folder', { defaultMessage: 'Folder' }),
name: 'Open logs', name: __t('command.folder.openLogs', { defaultMessage: 'Open logs' }),
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: () => electron.showItemInFolder(getCurrentConfig().logsFilePath), onClick: () => electron.showItemInFolder(getCurrentConfig().logsFilePath),
}); });
registerCommand({ registerCommand({
id: 'folder.showData', id: 'folder.showData',
category: 'Folder', category: __t('command.folder', { defaultMessage: 'Folder' }),
name: 'Open data folder', name: __t('command.folder.openData', { defaultMessage: 'Open data folder' }),
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: () => electron.showItemInFolder(getCurrentConfig().connectionsFilePath), onClick: () => electron.showItemInFolder(getCurrentConfig().connectionsFilePath),
}); });
registerCommand({ registerCommand({
id: 'app.resetSettings', id: 'app.resetSettings',
category: 'File', category: __t('command.file', { defaultMessage: 'File' }),
name: 'Reset layout data & settings', name: __t('command.file.resetLayout', { defaultMessage: 'Reset layout data & settings' }),
testEnabled: () => true, testEnabled: () => true,
onClick: () => { onClick: () => {
showModal(ConfirmModal, { showModal(ConfirmModal, {
message: `Really reset layout data? All opened tabs, settings and layout data will be lost. Connections and saved files will be preserved. After this, restart DbGate for applying changes.`, message: _t('command.file.resetLayoutConfirm', { defaultMessage: 'Really reset layout data? All opened tabs, settings and layout data will be lost. Connections and saved files will be preserved. After this, restart DbGate for applying changes.' }),
onConfirm: async () => { onConfirm: async () => {
await apiCall('config/delete-settings'); await apiCall('config/delete-settings');
localStorage.clear(); localStorage.clear();
@@ -575,8 +578,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'app.exportConnections', id: 'app.exportConnections',
category: 'Settings', category: __t('command.settings', { defaultMessage: 'Settings' }),
name: 'Export connections', name: __t('command.settings.exportConnections', { defaultMessage: 'Export connections' }),
testEnabled: () => !getCurrentConfig()?.runAsPortal && !getCurrentConfig()?.storageDatabase, testEnabled: () => !getCurrentConfig()?.runAsPortal && !getCurrentConfig()?.storageDatabase,
onClick: () => { onClick: () => {
showModal(ExportImportConnectionsModal, { showModal(ExportImportConnectionsModal, {
@@ -587,8 +590,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'app.importConnections', id: 'app.importConnections',
category: 'Settings', category: __t('command.settings', { defaultMessage: 'Settings' }),
name: 'Import connections', name: __t('command.settings.importConnections', { defaultMessage: 'Import connections' }),
testEnabled: () => !getCurrentConfig()?.runAsPortal && !getCurrentConfig()?.storageDatabase, testEnabled: () => !getCurrentConfig()?.runAsPortal && !getCurrentConfig()?.storageDatabase,
onClick: async () => { onClick: async () => {
const files = await electron.showOpenDialog({ const files = await electron.showOpenDialog({
@@ -613,8 +616,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'file.import', id: 'file.import',
category: 'File', category: __t('command.file', { defaultMessage: 'File' }),
name: 'Import data', name: __t('command.file.import', { defaultMessage: 'Import data' }),
toolbar: true, toolbar: true,
icon: 'icon import', icon: 'icon import',
onClick: () => onClick: () =>
@@ -634,8 +637,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'view.reset', id: 'view.reset',
category: 'View', category: __t('command.view', { defaultMessage: 'View' }),
name: 'Reset view', name: __t('command.view.reset', { defaultMessage: 'Reset view' }),
onClick: () => { onClick: () => {
const keys = [ const keys = [
'leftPanelWidth', 'leftPanelWidth',
@@ -662,14 +665,14 @@ registerCommand({
'currentArchive', 'currentArchive',
]; ];
for (const key of keys) removeLocalStorage(key); for (const key of keys) removeLocalStorage(key);
showSnackbarSuccess('Restart DbGate (or reload on web) for applying changes'); showSnackbarSuccess(_t('command.view.restart', { defaultMessage: 'Restart DbGate (or reload on web) for applying changes' }));
}, },
}); });
registerCommand({ registerCommand({
id: 'sql.generator', id: 'sql.generator',
category: 'SQL', category: __t('command.sql', { defaultMessage: 'SQL' }),
name: 'SQL Generator', name: __t('command.sql.generator', { defaultMessage: 'SQL Generator' }),
toolbar: true, toolbar: true,
icon: 'icon sql-generator', icon: 'icon sql-generator',
testEnabled: () => testEnabled: () =>
@@ -685,11 +688,11 @@ registerCommand({
registerCommand({ registerCommand({
id: 'database.export', id: 'database.export',
category: 'Database', category: __t('command.database', { defaultMessage: 'Database' }),
name: 'Export database', name: __t('command.database.export', { defaultMessage: 'Export database' }),
toolbar: true, toolbar: true,
icon: 'icon export', icon: 'icon export',
testEnabled: () => getCurrentDatabase() != null && hasPermission(`dbops/export`), testEnabled: () => getCurrentDatabase() != null && hasPermission(`dbops/export`) && isProApp(),
onClick: () => { onClick: () => {
openImportExportTab({ openImportExportTab({
targetStorageType: getDefaultFileFormat(getExtensions()).storageType, targetStorageType: getDefaultFileFormat(getExtensions()).storageType,
@@ -703,8 +706,8 @@ registerCommand({
if (isProApp()) { if (isProApp()) {
registerCommand({ registerCommand({
id: 'database.compare', id: 'database.compare',
category: 'Database', category: __t('command.database', { defaultMessage: 'Database' }),
name: 'Compare databases', name: __t('command.database.compare', { defaultMessage: 'Compare databases' }),
toolbar: true, toolbar: true,
icon: 'icon compare', icon: 'icon compare',
testEnabled: () => testEnabled: () =>
@@ -736,8 +739,8 @@ if (isProApp()) {
registerCommand({ registerCommand({
id: 'database.chat', id: 'database.chat',
category: 'Database', category: __t('command.database', { defaultMessage: 'Database' }),
name: 'Database chat', name: __t('command.database.chat', { defaultMessage: 'Database chat' }),
toolbar: true, toolbar: true,
icon: 'icon ai', icon: 'icon ai',
testEnabled: () => testEnabled: () =>
@@ -761,11 +764,11 @@ if (isProApp()) {
if (hasPermission('settings/change')) { if (hasPermission('settings/change')) {
registerCommand({ registerCommand({
id: 'settings.commands', id: 'settings.commands',
category: 'Settings', category: __t('command.settings', { defaultMessage: 'Settings' }),
name: 'Keyboard shortcuts', name: __t('command.settings.shortcuts', { defaultMessage: 'Keyboard shortcuts' }),
onClick: () => { onClick: () => {
openNewTab({ openNewTab({
title: 'Keyboard Shortcuts', title: _t('command.settings.shortcuts', { defaultMessage: 'Keyboard shortcuts' }),
icon: 'icon keyboard', icon: 'icon keyboard',
tabComponent: 'CommandListTab', tabComponent: 'CommandListTab',
props: {}, props: {},
@@ -776,9 +779,9 @@ if (hasPermission('settings/change')) {
registerCommand({ registerCommand({
id: 'settings.show', id: 'settings.show',
category: 'Settings', category: __t('command.settings', { defaultMessage: 'Settings' }),
name: 'Change', name: __t('command.settings.change', { defaultMessage: 'Change' }),
toolbarName: 'Settings', toolbarName: __t('command.settings', { defaultMessage: 'Settings' }),
onClick: () => showModal(SettingsModal), onClick: () => showModal(SettingsModal),
testEnabled: () => hasPermission('settings/change'), testEnabled: () => hasPermission('settings/change'),
}); });
@@ -786,8 +789,8 @@ if (hasPermission('settings/change')) {
registerCommand({ registerCommand({
id: 'cloud.logout', id: 'cloud.logout',
category: 'Cloud', category: __t('command.cloud', { defaultMessage: 'Cloud' }),
name: 'Logout', name: __t('command.cloud.logout', { defaultMessage: 'Logout' }),
onClick: () => { onClick: () => {
cloudSigninTokenHolder.set(null); cloudSigninTokenHolder.set(null);
}, },
@@ -795,8 +798,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'file.exit', id: 'file.exit',
category: 'File', category: __t('command.file', { defaultMessage: 'File' }),
name: isMac() ? 'Quit' : 'Exit', name: isMac() ? __t('command.file.quit', { defaultMessage: 'Quit' }) : __t('command.file.exit', { defaultMessage: 'Exit' }),
// keyText: isMac() ? 'Command+Q' : null, // keyText: isMac() ? 'Command+Q' : null,
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('quit-app'), onClick: () => getElectron().send('quit-app'),
@@ -804,16 +807,16 @@ registerCommand({
registerCommand({ registerCommand({
id: 'app.logout', id: 'app.logout',
category: 'App', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Logout', name: __t('command.app.logout', { defaultMessage: 'Logout' }),
testEnabled: () => getCurrentConfig()?.isUserLoggedIn, testEnabled: () => getCurrentConfig()?.isUserLoggedIn,
onClick: doLogout, onClick: doLogout,
}); });
registerCommand({ registerCommand({
id: 'app.loggedUserCommands', id: 'app.loggedUserCommands',
category: 'App', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Logged user', name: __t('command.app.loggedUser', { defaultMessage: 'Logged user' }),
getSubCommands: () => { getSubCommands: () => {
const config = getCurrentConfig(); const config = getCurrentConfig();
if (!config) return []; if (!config) return [];
@@ -830,16 +833,16 @@ registerCommand({
registerCommand({ registerCommand({
id: 'app.disconnect', id: 'app.disconnect',
category: 'App', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Disconnect', name: __t('command.app.disconnect', { defaultMessage: 'Disconnect' }),
testEnabled: () => getCurrentConfig()?.singleConnection != null && !getCurrentConfig()?.isUserLoggedIn, testEnabled: () => getCurrentConfig()?.singleConnection != null && !getCurrentConfig()?.isUserLoggedIn,
onClick: () => disconnectServerConnection(getCurrentConfig()?.singleConnection?._id), onClick: () => disconnectServerConnection(getCurrentConfig()?.singleConnection?._id),
}); });
registerCommand({ registerCommand({
id: 'file.checkForUpdates', id: 'app.checkForUpdates',
category: 'App', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Check for updates', name: __t('command.app.checkForUpdates', { defaultMessage: 'Check for updates' }),
// testEnabled: () => true, // testEnabled: () => true,
testEnabled: () => getAppUpdaterActive(), testEnabled: () => getAppUpdaterActive(),
onClick: () => getElectron().send('check-for-updates'), onClick: () => getElectron().send('check-for-updates'),
@@ -865,7 +868,7 @@ export function registerFileCommands({
id: idPrefix + '.save', id: idPrefix + '.save',
group: 'save', group: 'save',
category, category,
name: 'Save', name: __t('command.save', { defaultMessage: 'Save' }),
// keyText: 'CtrlOrCommand+S', // keyText: 'CtrlOrCommand+S',
icon: 'icon save', icon: 'icon save',
toolbar: true, toolbar: true,
@@ -877,14 +880,14 @@ export function registerFileCommands({
id: idPrefix + '.saveAs', id: idPrefix + '.saveAs',
group: 'saveAs', group: 'saveAs',
category, category,
name: 'Save As', name: __t('command.saveAs', { defaultMessage: 'Save As' }),
testEnabled: () => getCurrentEditor() != null, testEnabled: () => getCurrentEditor() != null,
onClick: () => saveTabFile(getCurrentEditor(), 'save-as', folder, format, fileExtension), onClick: () => saveTabFile(getCurrentEditor(), 'save-as', folder, format, fileExtension),
}); });
registerCommand({ registerCommand({
id: idPrefix + '.saveToDisk', id: idPrefix + '.saveToDisk',
category, category,
name: 'Save to disk', name: __t('command.saveToDisk', { defaultMessage: 'Save to disk' }),
testEnabled: () => getCurrentEditor() != null && getElectron() != null, testEnabled: () => getCurrentEditor() != null && getElectron() != null,
onClick: () => saveTabFile(getCurrentEditor(), 'save-to-disk', folder, format, fileExtension), onClick: () => saveTabFile(getCurrentEditor(), 'save-to-disk', folder, format, fileExtension),
}); });
@@ -894,7 +897,7 @@ export function registerFileCommands({
registerCommand({ registerCommand({
id: idPrefix + '.execute', id: idPrefix + '.execute',
category, category,
name: 'Execute', name: __t('command.execute', { defaultMessage: 'Execute' }),
icon: 'icon run', icon: 'icon run',
toolbar: true, toolbar: true,
isRelatedToTab: true, isRelatedToTab: true,
@@ -908,7 +911,7 @@ export function registerFileCommands({
registerCommand({ registerCommand({
id: idPrefix + '.kill', id: idPrefix + '.kill',
category, category,
name: 'Kill', name: __t('command.kill', { defaultMessage: 'Kill' }),
icon: 'icon close', icon: 'icon close',
toolbar: true, toolbar: true,
isRelatedToTab: true, isRelatedToTab: true,
@@ -921,7 +924,7 @@ export function registerFileCommands({
registerCommand({ registerCommand({
id: idPrefix + '.toggleComment', id: idPrefix + '.toggleComment',
category, category,
name: 'Toggle comment', name: __t('command.toggleComment', { defaultMessage: 'Toggle comment' }),
keyText: 'CtrlOrCommand+/', keyText: 'CtrlOrCommand+/',
disableHandleKeyText: 'CtrlOrCommand+/', disableHandleKeyText: 'CtrlOrCommand+/',
testEnabled: () => getCurrentEditor() != null, testEnabled: () => getCurrentEditor() != null,
@@ -933,7 +936,7 @@ export function registerFileCommands({
registerCommand({ registerCommand({
id: idPrefix + '.copy', id: idPrefix + '.copy',
category, category,
name: 'Copy', name: __t('command.copy', { defaultMessage: 'Copy' }),
disableHandleKeyText: 'CtrlOrCommand+C', disableHandleKeyText: 'CtrlOrCommand+C',
testEnabled: () => getCurrentEditor() != null, testEnabled: () => getCurrentEditor() != null,
onClick: () => getCurrentEditor().copy(), onClick: () => getCurrentEditor().copy(),
@@ -941,7 +944,7 @@ export function registerFileCommands({
registerCommand({ registerCommand({
id: idPrefix + '.paste', id: idPrefix + '.paste',
category, category,
name: 'Paste', name: __t('command.paste', { defaultMessage: 'Paste' }),
disableHandleKeyText: 'CtrlOrCommand+V', disableHandleKeyText: 'CtrlOrCommand+V',
testEnabled: () => getCurrentEditor() != null, testEnabled: () => getCurrentEditor() != null,
onClick: () => getCurrentEditor().paste(), onClick: () => getCurrentEditor().paste(),
@@ -952,7 +955,7 @@ export function registerFileCommands({
registerCommand({ registerCommand({
id: idPrefix + '.find', id: idPrefix + '.find',
category, category,
name: 'Find', name: __t('command.find', { defaultMessage: 'Find' }),
keyText: 'CtrlOrCommand+F', keyText: 'CtrlOrCommand+F',
testEnabled: () => getCurrentEditor() != null, testEnabled: () => getCurrentEditor() != null,
onClick: () => getCurrentEditor().find(), onClick: () => getCurrentEditor().find(),
@@ -961,7 +964,7 @@ export function registerFileCommands({
id: idPrefix + '.replace', id: idPrefix + '.replace',
category, category,
keyText: isMac() ? 'Alt+Command+F' : 'CtrlOrCommand+H', keyText: isMac() ? 'Alt+Command+F' : 'CtrlOrCommand+H',
name: 'Replace', name: __t('command.replace', { defaultMessage: 'Replace' }),
testEnabled: () => getCurrentEditor() != null, testEnabled: () => getCurrentEditor() != null,
onClick: () => getCurrentEditor().replace(), onClick: () => getCurrentEditor().replace(),
}); });
@@ -970,7 +973,7 @@ export function registerFileCommands({
registerCommand({ registerCommand({
id: idPrefix + '.undo', id: idPrefix + '.undo',
category, category,
name: 'Undo', name: __t('command.undo', { defaultMessage: 'Undo' }),
group: 'undo', group: 'undo',
icon: 'icon undo', icon: 'icon undo',
testEnabled: () => getCurrentEditor()?.canUndo(), testEnabled: () => getCurrentEditor()?.canUndo(),
@@ -980,7 +983,7 @@ export function registerFileCommands({
id: idPrefix + '.redo', id: idPrefix + '.redo',
category, category,
group: 'redo', group: 'redo',
name: 'Redo', name: __t('command.redo', { defaultMessage: 'Redo' }),
icon: 'icon redo', icon: 'icon redo',
testEnabled: () => getCurrentEditor()?.canRedo(), testEnabled: () => getCurrentEditor()?.canRedo(),
onClick: () => getCurrentEditor().redo(), onClick: () => getCurrentEditor().redo(),
@@ -990,24 +993,24 @@ export function registerFileCommands({
registerCommand({ registerCommand({
id: 'app.minimize', id: 'app.minimize',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Minimize', name: __t('command.application.minimize', { defaultMessage: 'Minimize' }),
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('window-action', 'minimize'), onClick: () => getElectron().send('window-action', 'minimize'),
}); });
registerCommand({ registerCommand({
id: 'app.maximize', id: 'app.maximize',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Maximize', name: __t('command.application.maximize', { defaultMessage: 'Maximize' }),
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('window-action', 'maximize'), onClick: () => getElectron().send('window-action', 'maximize'),
}); });
registerCommand({ registerCommand({
id: 'app.toggleFullScreen', id: 'app.toggleFullScreen',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Toggle full screen', name: __t('command.application.toggleFullScreen', { defaultMessage: 'Toggle full screen' }),
keyText: 'F11', keyText: 'F11',
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: async () => { onClick: async () => {
@@ -1021,45 +1024,45 @@ registerCommand({
registerCommand({ registerCommand({
id: 'app.toggleDevTools', id: 'app.toggleDevTools',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Toggle Dev Tools', name: __t('command.application.toggleDevTools', { defaultMessage: 'Toggle Dev Tools' }),
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('window-action', 'devtools'), onClick: () => getElectron().send('window-action', 'devtools'),
}); });
registerCommand({ registerCommand({
id: 'app.reload', id: 'app.reload',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Reload', name: __t('command.application.reload', { defaultMessage: 'Reload' }),
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('window-action', 'reload'), onClick: () => getElectron().send('window-action', 'reload'),
}); });
registerCommand({ registerCommand({
id: 'app.openDocs', id: 'app.openDocs',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Documentation', name: __t('command.application.documentation', { defaultMessage: 'Documentation' }),
onClick: () => openWebLink('https://docs.dbgate.io/'), onClick: () => openWebLink('https://docs.dbgate.io/'),
}); });
registerCommand({ registerCommand({
id: 'app.openWeb', id: 'app.openWeb',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'DbGate web', name: __t('command.application.web', { defaultMessage: 'DbGate web' }),
onClick: () => openWebLink('https://www.dbgate.io/'), onClick: () => openWebLink('https://www.dbgate.io/'),
}); });
registerCommand({ registerCommand({
id: 'app.openIssue', id: 'app.openIssue',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Report problem or feature request', name: __t('command.application.openIssue', { defaultMessage: 'Report problem or feature request' }),
onClick: () => openWebLink('https://github.com/dbgate/dbgate/issues/new'), onClick: () => openWebLink('https://github.com/dbgate/dbgate/issues/new'),
}); });
registerCommand({ registerCommand({
id: 'app.openSponsoring', id: 'app.openSponsoring',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Become sponsor', name: __t('command.application.becomeSponsor', { defaultMessage: 'Become sponsor' }),
testEnabled: () => !isProApp(), testEnabled: () => !isProApp(),
onClick: () => openWebLink('https://opencollective.com/dbgate'), onClick: () => openWebLink('https://opencollective.com/dbgate'),
}); });
@@ -1073,8 +1076,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'app.zoomIn', id: 'app.zoomIn',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Zoom in', name: __t('command.application.zoomIn', { defaultMessage: 'Zoom in' }),
keyText: 'CtrlOrCommand+=', keyText: 'CtrlOrCommand+=',
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('window-action', 'zoomin'), onClick: () => getElectron().send('window-action', 'zoomin'),
@@ -1082,8 +1085,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'app.zoomOut', id: 'app.zoomOut',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Zoom out', name: __t('command.application.zoomOut', { defaultMessage: 'Zoom out' }),
keyText: 'CtrlOrCommand+-', keyText: 'CtrlOrCommand+-',
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('window-action', 'zoomout'), onClick: () => getElectron().send('window-action', 'zoomout'),
@@ -1091,16 +1094,16 @@ registerCommand({
registerCommand({ registerCommand({
id: 'app.zoomReset', id: 'app.zoomReset',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Reset zoom', name: __t('command.application.zoomReset', { defaultMessage: 'Reset zoom' }),
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('window-action', 'zoomreset'), onClick: () => getElectron().send('window-action', 'zoomreset'),
}); });
registerCommand({ registerCommand({
id: 'edit.undo', id: 'edit.undo',
category: 'Edit', category: __t('command.edit', { defaultMessage: 'Edit' }),
name: 'Undo', name: __t('command.edit.undo', { defaultMessage: 'Undo' }),
keyText: 'CtrlOrCommand+Z', keyText: 'CtrlOrCommand+Z',
systemCommand: true, systemCommand: true,
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
@@ -1109,8 +1112,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'edit.redo', id: 'edit.redo',
category: 'Edit', category: __t('command.edit', { defaultMessage: 'Edit' }),
name: 'Redo', name: __t('command.edit.redo', { defaultMessage: 'Redo' }),
systemCommand: true, systemCommand: true,
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('window-action', 'redo'), onClick: () => getElectron().send('window-action', 'redo'),
@@ -1118,8 +1121,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'edit.cut', id: 'edit.cut',
category: 'Edit', category: __t('command.edit', { defaultMessage: 'Edit' }),
name: 'Cut', name: __t('command.edit.cut', { defaultMessage: 'Cut' }),
keyText: 'CtrlOrCommand+X', keyText: 'CtrlOrCommand+X',
systemCommand: true, systemCommand: true,
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
@@ -1128,8 +1131,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'edit.copy', id: 'edit.copy',
category: 'Edit', category: __t('command.edit', { defaultMessage: 'Edit' }),
name: 'Copy', name: __t('command.edit.copy', { defaultMessage: 'Copy' }),
keyText: 'CtrlOrCommand+C', keyText: 'CtrlOrCommand+C',
systemCommand: true, systemCommand: true,
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
@@ -1138,8 +1141,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'edit.paste', id: 'edit.paste',
category: 'Edit', category: __t('command.edit', { defaultMessage: 'Edit' }),
name: 'Paste', name: __t('command.edit.paste', { defaultMessage: 'Paste' }),
keyText: 'CtrlOrCommand+V', keyText: 'CtrlOrCommand+V',
systemCommand: true, systemCommand: true,
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
@@ -1148,8 +1151,8 @@ registerCommand({
registerCommand({ registerCommand({
id: 'edit.selectAll', id: 'edit.selectAll',
category: 'Edit', category: __t('command.edit', { defaultMessage: 'Edit' }),
name: 'Select All', name: __t('command.edit.selectAll', { defaultMessage: 'Select All' }),
keyText: 'CtrlOrCommand+A', keyText: 'CtrlOrCommand+A',
systemCommand: true, systemCommand: true,
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
@@ -1158,12 +1161,47 @@ registerCommand({
registerCommand({ registerCommand({
id: 'app.unsetCurrentDatabase', id: 'app.unsetCurrentDatabase',
category: 'Application', category: __t('command.application', { defaultMessage: 'Application' }),
name: 'Unset current database', name: __t('command.application.unsetCurrentDatabase', { defaultMessage: 'Unset current database' }),
testEnabled: () => getCurrentDatabase() != null, testEnabled: () => getCurrentDatabase() != null,
onClick: () => currentDatabase.set(null), onClick: () => currentDatabase.set(null),
}); });
let loadedCampaignList = [];
registerCommand({
id: 'internal.loadCampaigns',
category: __t('command.internal', { defaultMessage: 'Internal' }),
name: __t('command.internal.loadCampaigns', { defaultMessage: 'Load campaign list' }),
testEnabled: () => getBoolSettingsValue('internal.showCampaigns', false),
onClick: async () => {
const resp = await apiCall('cloud/promo-widget-list', {});
loadedCampaignList = resp;
},
});
registerCommand({
id: 'internal.showCampaigns',
category: __t('command.internal', { defaultMessage: 'Internal' }),
name: __t('command.internal.showCampaigns', { defaultMessage: 'Show campaigns' }),
testEnabled: () => getBoolSettingsValue('internal.showCampaigns', false) && loadedCampaignList?.length > 0,
getSubCommands: () => {
return loadedCampaignList.map(campaign => ({
text: `${campaign.campaignName} (${campaign.countries || 'Global'}) - #${campaign.quantileRank ?? '*'}/${
campaign.quantileGroupCount ?? '*'
} - ${campaign.variantIdentifier}`,
onClick: async () => {
promoWidgetPreview.set(
await apiCall('cloud/promo-widget-preview', {
campaign: campaign.campaignIdentifier,
variant: campaign.variantIdentifier,
})
);
},
}));
},
});
const electron = getElectron(); const electron = getElectron();
if (electron) { if (electron) {
electron.addEventListener('run-command', (e, commandId) => runCommand(commandId)); electron.addEventListener('run-command', (e, commandId) => runCommand(commandId));

View File

@@ -3,16 +3,16 @@
registerCommand({ registerCommand({
id: 'collectionDataGrid.openQuery', id: 'collectionDataGrid.openQuery',
category: 'Data grid', category: __t('command.dataGrid', { defaultMessage: 'Data grid' }),
name: 'Open query', name: __t('command.dataGrid.openQuery', { defaultMessage: 'Open query' }),
testEnabled: () => getCurrentEditor() != null, testEnabled: () => getCurrentEditor() != null,
onClick: () => getCurrentEditor().openQuery(), onClick: () => getCurrentEditor().openQuery(),
}); });
registerCommand({ registerCommand({
id: 'collectionDataGrid.export', id: 'collectionDataGrid.export',
category: 'Data grid', category: __t('command.dataGrid', { defaultMessage: 'Data grid' }),
name: 'Export', name: __t('command.dataGrid.export', { defaultMessage: 'Export' }),
keyText: 'CtrlOrCommand+E', keyText: 'CtrlOrCommand+E',
icon: 'icon export', icon: 'icon export',
testEnabled: () => getCurrentEditor() != null, testEnabled: () => getCurrentEditor() != null,
@@ -140,6 +140,7 @@
import LoadingDataGridCore from './LoadingDataGridCore.svelte'; import LoadingDataGridCore from './LoadingDataGridCore.svelte';
import { mongoFilterBehaviour, standardFilterBehaviours } from 'dbgate-tools'; import { mongoFilterBehaviour, standardFilterBehaviours } from 'dbgate-tools';
import { openImportExportTab } from '../utility/importExportTools'; import { openImportExportTab } from '../utility/importExportTools';
import { __t } from '../translations';
export let conid; export let conid;
export let display; export let display;

View File

@@ -12,6 +12,7 @@
import { showModal } from '../modals/modalTools'; import { showModal } from '../modals/modalTools';
import DefineDictionaryDescriptionModal from '../modals/DefineDictionaryDescriptionModal.svelte'; import DefineDictionaryDescriptionModal from '../modals/DefineDictionaryDescriptionModal.svelte';
import { sleep } from '../utility/common'; import { sleep } from '../utility/common';
import { isProApp } from '../utility/proTools';
export let column; export let column;
export let conid = undefined; export let conid = undefined;
@@ -72,15 +73,19 @@
column.foreignKey && [{ divider: true }, { onClick: openReferencedTable, text: column.foreignKey.refTableName }], column.foreignKey && [{ divider: true }, { onClick: openReferencedTable, text: column.foreignKey.refTableName }],
setGrouping && { divider: true }, isProApp() &&
setGrouping && { onClick: () => setGrouping('GROUP'), text: 'Group by' }, setGrouping && [
setGrouping && { onClick: () => setGrouping('MAX'), text: 'MAX' }, { divider: true },
setGrouping && { onClick: () => setGrouping('MIN'), text: 'MIN' }, { onClick: () => setGrouping('GROUP'), text: 'Group by' },
setGrouping && { onClick: () => setGrouping('SUM'), text: 'SUM' }, { onClick: () => setGrouping('MAX'), text: 'MAX' },
setGrouping && { onClick: () => setGrouping('AVG'), text: 'AVG' }, { onClick: () => setGrouping('MIN'), text: 'MIN' },
setGrouping && { onClick: () => setGrouping('COUNT'), text: 'COUNT' }, { onClick: () => setGrouping('SUM'), text: 'SUM' },
setGrouping && { onClick: () => setGrouping('COUNT DISTINCT'), text: 'COUNT DISTINCT' }, { onClick: () => setGrouping('AVG'), text: 'AVG' },
{ onClick: () => setGrouping('COUNT'), text: 'COUNT' },
{ onClick: () => setGrouping('COUNT DISTINCT'), text: 'COUNT DISTINCT' },
],
isProApp() &&
isTypeDateTime(column.dataType) && [ isTypeDateTime(column.dataType) && [
{ divider: true }, { divider: true },
{ onClick: () => setGrouping('GROUP:YEAR'), text: 'Group by YEAR' }, { onClick: () => setGrouping('GROUP:YEAR'), text: 'Group by YEAR' },
@@ -90,8 +95,10 @@
{ divider: true }, { divider: true },
isProApp() &&
allowDefineVirtualReferences && { onClick: handleDefineVirtualForeignKey, text: 'Define virtual foreign key' }, allowDefineVirtualReferences && { onClick: handleDefineVirtualForeignKey, text: 'Define virtual foreign key' },
column.foreignKey && { column.foreignKey &&
isProApp() && {
onClick: handleCustomizeDescriptions, onClick: handleCustomizeDescriptions,
text: 'Customize description', text: 'Customize description',
}, },

View File

@@ -17,6 +17,7 @@
import SelectField from '../forms/SelectField.svelte'; import SelectField from '../forms/SelectField.svelte';
import ColumnEditorModal from '../tableeditor/ColumnEditorModal.svelte'; import ColumnEditorModal from '../tableeditor/ColumnEditorModal.svelte';
import { tick } from 'svelte'; import { tick } from 'svelte';
import { _t } from '../translations';
export let managerSize; export let managerSize;
export let display: GridDisplay; export let display: GridDisplay;
@@ -154,8 +155,8 @@
class="colmode" class="colmode"
value={isDynamicStructure ? 'variable' : 'fixed'} value={isDynamicStructure ? 'variable' : 'fixed'}
options={[ options={[
{ label: 'Fixed columns (like SQL)', value: 'fixed' }, { label: _t('column.fixed', {defaultMessage: 'Fixed columns (like SQL)'}), value: 'fixed' },
{ label: 'Variable columns (like MongoDB)', value: 'variable' }, { label: _t('column.variable', {defaultMessage: 'Variable columns (like MongoDB)'}) , value: 'variable' },
]} ]}
on:change={e => { on:change={e => {
dispatchChangeSet({ dispatchChangeSet({
@@ -175,7 +176,7 @@
{/if} {/if}
<SearchBoxWrapper> <SearchBoxWrapper>
<SearchInput <SearchInput
placeholder="Search columns" placeholder={_t('column.search', {defaultMessage: 'Search columns'})}
value={currentFilter} value={currentFilter}
onChange={value => display.setSearchInColumns(value)} onChange={value => display.setSearchInColumns(value)}
data-testid="ColumnManager_searchColumns" data-testid="ColumnManager_searchColumns"
@@ -186,8 +187,8 @@
on:click={() => { on:click={() => {
showModal(InputTextModal, { showModal(InputTextModal, {
value: '', value: '',
label: 'Column name', label: _t('column.name', {defaultMessage: 'Column name'}),
header: 'Add new column', header: _t('column.addNew', {defaultMessage: 'Add new column'}),
onConfirm: name => { onConfirm: name => {
display.addDynamicColumn(name); display.addDynamicColumn(name);
tick().then(() => { tick().then(() => {

View File

@@ -7,6 +7,7 @@
import { showModal } from '../modals/modalTools'; import { showModal } from '../modals/modalTools';
import ColumnEditorModal from '../tableeditor/ColumnEditorModal.svelte'; import ColumnEditorModal from '../tableeditor/ColumnEditorModal.svelte';
import { editorDeleteColumn } from 'dbgate-tools'; import { editorDeleteColumn } from 'dbgate-tools';
import { isProApp } from '../utility/proTools';
export let column; export let column;
export let display; export let display;
@@ -59,13 +60,17 @@
on:mouseup on:mouseup
> >
<div> <div>
{#if isProApp()}
<span class="expandColumnIcon" style={`margin-right: ${5 + (column.uniquePath.length - 1) * 10}px`}> <span class="expandColumnIcon" style={`margin-right: ${5 + (column.uniquePath.length - 1) * 10}px`}>
<FontIcon <FontIcon
icon={column.isExpandable ? plusExpandIcon(display.isExpandedColumn(column.uniqueName)) : 'icon invisible-box'} icon={column.isExpandable
? plusExpandIcon(display.isExpandedColumn(column.uniqueName))
: 'icon invisible-box'}
on:click={() => display.toggleExpandedColumn(column.uniqueName)} on:click={() => display.toggleExpandedColumn(column.uniqueName)}
data-testid="ColumnManagerRow_expand_{column.uniqueName}" data-testid="ColumnManagerRow_expand_{column.uniqueName}"
/> />
</span> </span>
{/if}
{#if isJsonView} {#if isJsonView}
<FontIcon icon="img column" /> <FontIcon icon="img column" />
{:else} {:else}

View File

@@ -17,6 +17,7 @@
import FontIcon from '../icons/FontIcon.svelte'; import FontIcon from '../icons/FontIcon.svelte';
import DictionaryLookupModal from '../modals/DictionaryLookupModal.svelte'; import DictionaryLookupModal from '../modals/DictionaryLookupModal.svelte';
import ValueLookupModal from '../modals/ValueLookupModal.svelte'; import ValueLookupModal from '../modals/ValueLookupModal.svelte';
import { _t } from '../translations';
export let isReadOnly = false; export let isReadOnly = false;
export let filterBehaviour; export let filterBehaviour;
@@ -64,43 +65,43 @@
function createMenu() { function createMenu() {
const res = [ const res = [
{ onClick: () => setFilter(''), text: 'Clear Filter' }, { onClick: () => setFilter(''), text: _t('filter.clear', { defaultMessage: 'Clear Filter' }) },
{ onClick: () => filterMultipleValues(), text: 'Filter multiple values' }, { onClick: () => filterMultipleValues(), text: _t('filter.multipleValues', { defaultMessage: 'Filter multiple values' }) },
]; ];
if (filterBehaviour.supportEquals) { if (filterBehaviour.supportEquals) {
res.push( res.push(
{ onClick: () => openFilterWindow('='), text: 'Equals...' }, { onClick: () => openFilterWindow('='), text: _t('filter.equals', { defaultMessage: 'Equals...' }) },
{ onClick: () => openFilterWindow('<>'), text: 'Does Not Equal...' } { onClick: () => openFilterWindow('<>'), text: _t('filter.doesNotEqual', { defaultMessage: 'Does Not Equal...' }) }
); );
} }
if (filterBehaviour.supportExistsTesting) { if (filterBehaviour.supportExistsTesting) {
res.push( res.push(
{ onClick: () => setFilter('EXISTS'), text: 'Field exists' }, { onClick: () => setFilter('EXISTS'), text: _t('filter.fieldExists', { defaultMessage: 'Field exists' }) },
{ onClick: () => setFilter('NOT EXISTS'), text: 'Field does not exist' } { onClick: () => setFilter('NOT EXISTS'), text: _t('filter.fieldDoesNotExist', { defaultMessage: 'Field does not exist' }) }
); );
} }
if (filterBehaviour.supportNotEmptyArrayTesting) { if (filterBehaviour.supportNotEmptyArrayTesting) {
res.push({ onClick: () => setFilter('NOT EMPTY ARRAY'), text: 'Array is not empty' }); res.push({ onClick: () => setFilter('NOT EMPTY ARRAY'), text: _t('filter.arrayIsNotEmpty', { defaultMessage: 'Array is not empty' }) });
} }
if (filterBehaviour.supportEmptyArrayTesting) { if (filterBehaviour.supportEmptyArrayTesting) {
res.push({ onClick: () => setFilter('EMPTY ARRAY'), text: 'Array is empty' }); res.push({ onClick: () => setFilter('EMPTY ARRAY'), text: _t('filter.arrayIsEmpty', { defaultMessage: 'Array is empty' }) });
} }
if (filterBehaviour.supportNullTesting) { if (filterBehaviour.supportNullTesting) {
res.push( res.push(
{ onClick: () => setFilter('NULL'), text: 'Is Null' }, { onClick: () => setFilter('NULL'), text: _t('filter.isNull', { defaultMessage: 'Is Null' }) },
{ onClick: () => setFilter('NOT NULL'), text: 'Is Not Null' } { onClick: () => setFilter('NOT NULL'), text: _t('filter.isNotNull', { defaultMessage: 'Is Not Null' }) }
); );
} }
if (filterBehaviour.supportEmpty) { if (filterBehaviour.supportEmpty) {
res.push( res.push(
{ onClick: () => setFilter('EMPTY, NULL'), text: 'Is Empty Or Null' }, { onClick: () => setFilter('EMPTY, NULL'), text: _t('filter.isEmptyOrNull', { defaultMessage: 'Is Empty Or Null' }) },
{ onClick: () => setFilter('NOT EMPTY NOT NULL'), text: 'Has Not Empty Value' } { onClick: () => setFilter('NOT EMPTY NOT NULL'), text: _t('filter.hasNotEmptyValue', { defaultMessage: 'Has Not Empty Value' }) }
); );
} }
@@ -108,10 +109,10 @@
res.push( res.push(
{ divider: true }, { divider: true },
{ onClick: () => openFilterWindow('>'), text: 'Greater Than...' }, { onClick: () => openFilterWindow('>'), text: _t('filter.greaterThan', { defaultMessage: 'Greater Than...' }) },
{ onClick: () => openFilterWindow('>='), text: 'Greater Than Or Equal To...' }, { onClick: () => openFilterWindow('>='), text: _t('filter.greaterThanOrEqualTo', { defaultMessage: 'Greater Than Or Equal To...' }) },
{ onClick: () => openFilterWindow('<'), text: 'Less Than...' }, { onClick: () => openFilterWindow('<'), text: _t('filter.lessThan', { defaultMessage: 'Less Than...' }) },
{ onClick: () => openFilterWindow('<='), text: 'Less Than Or Equal To...' } { onClick: () => openFilterWindow('<='), text: _t('filter.lessThanOrEqualTo', { defaultMessage: 'Less Than Or Equal To...' }) }
); );
} }
@@ -119,26 +120,26 @@
res.push( res.push(
{ divider: true }, { divider: true },
{ onClick: () => openFilterWindow('+'), text: 'Contains...' }, { onClick: () => openFilterWindow('+'), text: _t('filter.contains', { defaultMessage: 'Contains...' }) },
{ onClick: () => openFilterWindow('~'), text: 'Does Not Contain...' }, { onClick: () => openFilterWindow('~'), text: _t('filter.doesNotContain', { defaultMessage: 'Does Not Contain...' }) },
{ onClick: () => openFilterWindow('^'), text: 'Begins With...' }, { onClick: () => openFilterWindow('^'), text: _t('filter.beginsWith', { defaultMessage: 'Begins With...' }) },
{ onClick: () => openFilterWindow('!^'), text: 'Does Not Begin With...' }, { onClick: () => openFilterWindow('!^'), text: _t('filter.doesNotBeginWith', { defaultMessage: 'Does Not Begin With...' }) },
{ onClick: () => openFilterWindow('$'), text: 'Ends With...' }, { onClick: () => openFilterWindow('$'), text: _t('filter.endsWith', { defaultMessage: 'Ends With...' }) },
{ onClick: () => openFilterWindow('!$'), text: 'Does Not End With...' } { onClick: () => openFilterWindow('!$'), text: _t('filter.doesNotEndWith', { defaultMessage: 'Does Not End With...' }) }
); );
} }
if (filterBehaviour.supportBooleanValues) { if (filterBehaviour.supportBooleanValues) {
res.push( res.push(
{ onClick: () => setFilter('TRUE'), text: 'Is True' }, { onClick: () => setFilter('TRUE'), text: _t('filter.isTrue', { defaultMessage: 'Is True' }) },
{ onClick: () => setFilter('FALSE'), text: 'Is False' } { onClick: () => setFilter('FALSE'), text: _t('filter.isFalse', { defaultMessage: 'Is False' }) }
); );
} }
if (filterBehaviour.supportBooleanOrNull) { if (filterBehaviour.supportBooleanOrNull) {
res.push( res.push(
{ onClick: () => setFilter('TRUE, NULL'), text: 'Is True or NULL' }, { onClick: () => setFilter('TRUE, NULL'), text: _t('filter.isTrueOrNull', { defaultMessage: 'Is True or NULL' }) },
{ onClick: () => setFilter('FALSE, NULL'), text: 'Is False or NULL' } { onClick: () => setFilter('FALSE, NULL'), text: _t('filter.isFalseOrNull', { defaultMessage: 'Is False or NULL' }) }
); );
} }
@@ -146,44 +147,44 @@
res.push( res.push(
{ divider: true }, { divider: true },
{ onClick: () => setFilter('TOMORROW'), text: 'Tomorrow' }, { onClick: () => setFilter('TOMORROW'), text: _t('filter.tomorrow', { defaultMessage: 'Tomorrow' }) },
{ onClick: () => setFilter('TODAY'), text: 'Today' }, { onClick: () => setFilter('TODAY'), text: _t('filter.today', { defaultMessage: 'Today' }) },
{ onClick: () => setFilter('YESTERDAY'), text: 'Yesterday' }, { onClick: () => setFilter('YESTERDAY'), text: _t('filter.yesterday', { defaultMessage: 'Yesterday' }) },
{ divider: true }, { divider: true },
{ onClick: () => setFilter('NEXT WEEK'), text: 'Next Week' }, { onClick: () => setFilter('NEXT WEEK'), text: _t('filter.nextWeek', { defaultMessage: 'Next Week' }) },
{ onClick: () => setFilter('THIS WEEK'), text: 'This Week' }, { onClick: () => setFilter('THIS WEEK'), text: _t('filter.thisWeek', { defaultMessage: 'This Week' }) },
{ onClick: () => setFilter('LAST WEEK'), text: 'Last Week' }, { onClick: () => setFilter('LAST WEEK'), text: _t('filter.lastWeek', { defaultMessage: 'Last Week' }) },
{ divider: true }, { divider: true },
{ onClick: () => setFilter('NEXT MONTH'), text: 'Next Month' }, { onClick: () => setFilter('NEXT MONTH'), text: _t('filter.nextMonth', { defaultMessage: 'Next Month' }) },
{ onClick: () => setFilter('THIS MONTH'), text: 'This Month' }, { onClick: () => setFilter('THIS MONTH'), text: _t('filter.thisMonth', { defaultMessage: 'This Month' }) },
{ onClick: () => setFilter('LAST MONTH'), text: 'Last Month' }, { onClick: () => setFilter('LAST MONTH'), text: _t('filter.lastMonth', { defaultMessage: 'Last Month' }) },
{ divider: true }, { divider: true },
{ onClick: () => setFilter('NEXT YEAR'), text: 'Next Year' }, { onClick: () => setFilter('NEXT YEAR'), text: _t('filter.nextYear', { defaultMessage: 'Next Year' }) },
{ onClick: () => setFilter('THIS YEAR'), text: 'This Year' }, { onClick: () => setFilter('THIS YEAR'), text: _t('filter.thisYear', { defaultMessage: 'This Year' }) },
{ onClick: () => setFilter('LAST YEAR'), text: 'Last Year' } { onClick: () => setFilter('LAST YEAR'), text: _t('filter.lastYear', { defaultMessage: 'Last Year' }) }
); );
} }
if (filterBehaviour.supportDatetimeComparison) { if (filterBehaviour.supportDatetimeComparison) {
res.push( res.push(
{ divider: true }, { divider: true },
{ onClick: () => openFilterWindow('<='), text: 'Before...' }, { onClick: () => openFilterWindow('<='), text: _t('filter.before', { defaultMessage: 'Before...' }) },
{ onClick: () => openFilterWindow('>='), text: 'After...' }, { onClick: () => openFilterWindow('>='), text: _t('filter.after', { defaultMessage: 'After...' }) },
{ onClick: () => openFilterWindow('>=;<='), text: 'Between...' } { onClick: () => openFilterWindow('>=;<='), text: _t('filter.between', { defaultMessage: 'Between...' }) }
); );
} }
if (filterBehaviour.supportSqlCondition) { if (filterBehaviour.supportSqlCondition) {
res.push( res.push(
{ divider: true }, { divider: true },
{ onClick: () => openFilterWindow('sql'), text: 'SQL condition ...' }, { onClick: () => openFilterWindow('sql'), text: _t('filter.sqlCondition', { defaultMessage: 'SQL condition ...' }) },
{ onClick: () => openFilterWindow('sqlRight'), text: 'SQL condition - right side ...' } { onClick: () => openFilterWindow('sqlRight'), text: _t('filter.sqlConditionRight', { defaultMessage: 'SQL condition - right side ...' }) }
); );
} }

View File

@@ -3,8 +3,8 @@
registerCommand({ registerCommand({
id: 'dataGrid.switchToForm', id: 'dataGrid.switchToForm',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Switch to form', name: __t('command.datagrid.switchToform', { defaultMessage: 'Switch to form' }),
icon: 'icon form', icon: 'icon form',
keyText: 'F4', keyText: 'F4',
testEnabled: () => getCurrentEditor()?.switchViewEnabled('form'), testEnabled: () => getCurrentEditor()?.switchViewEnabled('form'),
@@ -13,8 +13,8 @@
registerCommand({ registerCommand({
id: 'dataGrid.switchToJson', id: 'dataGrid.switchToJson',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Switch to JSON', name: __t('command.datagrid.switchToJSON', { defaultMessage: 'Switch to JSON' }),
icon: 'icon json', icon: 'icon json',
keyText: 'F4', keyText: 'F4',
testEnabled: () => getCurrentEditor()?.switchViewEnabled('json'), testEnabled: () => getCurrentEditor()?.switchViewEnabled('json'),
@@ -23,8 +23,8 @@
registerCommand({ registerCommand({
id: 'dataGrid.switchToTable', id: 'dataGrid.switchToTable',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Switch to table', name: __t('command.datagrid.witchToTable', { defaultMessage: 'Switch to table'}),
icon: 'icon table', icon: 'icon table',
keyText: 'F4', keyText: 'F4',
testEnabled: () => getCurrentEditor()?.switchViewEnabled('table'), testEnabled: () => getCurrentEditor()?.switchViewEnabled('table'),
@@ -33,8 +33,8 @@
registerCommand({ registerCommand({
id: 'dataGrid.toggleLeftPanel', id: 'dataGrid.toggleLeftPanel',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Toggle left panel', name: __t('command.datagrid.toggleLeftPanel', { defaultMessage: 'Toggle left panel' }),
keyText: 'CtrlOrCommand+L', keyText: 'CtrlOrCommand+L',
testEnabled: () => getCurrentEditor()?.canShowLeftPanel(), testEnabled: () => getCurrentEditor()?.canShowLeftPanel(),
onClick: () => getCurrentEditor().toggleLeftPanel(), onClick: () => getCurrentEditor().toggleLeftPanel(),
@@ -68,6 +68,8 @@
import registerCommand from '../commands/registerCommand'; import registerCommand from '../commands/registerCommand';
import { registerMenu } from '../utility/contextMenu'; import { registerMenu } from '../utility/contextMenu';
import { getLocalStorage, setLocalStorage } from '../utility/storageCache'; import { getLocalStorage, setLocalStorage } from '../utility/storageCache';
import { __t, _t } from '../translations';
import { isProApp } from '../utility/proTools';
export let config; export let config;
export let setConfig; export let setConfig;
@@ -173,7 +175,7 @@
<div class="left" slot="1"> <div class="left" slot="1">
<WidgetColumnBar> <WidgetColumnBar>
<WidgetColumnBarItem <WidgetColumnBarItem
title="Columns" title={_t('dataGrid.columns', { defaultMessage: 'Columns' })}
name="columns" name="columns"
height="45%" height="45%"
skip={isFormView} skip={isFormView}
@@ -183,7 +185,7 @@
</WidgetColumnBarItem> </WidgetColumnBarItem>
<WidgetColumnBarItem <WidgetColumnBarItem
title="Filters" title={_t('dataGrid.filters', { defaultMessage: 'Filters' })}
name="filters" name="filters"
height={showReferences && display?.hasReferences && !isFormView ? '15%' : '30%'} height={showReferences && display?.hasReferences && !isFormView ? '15%' : '30%'}
skip={!display?.filterable} skip={!display?.filterable}
@@ -201,20 +203,20 @@
</WidgetColumnBarItem> </WidgetColumnBarItem>
<WidgetColumnBarItem <WidgetColumnBarItem
title="References" title={_t('dataGrid.references', { defaultMessage: 'References' })}
name="references" name="references"
height="30%" height="30%"
collapsed={isDetailView} collapsed={isDetailView}
skip={!(showReferences && display?.hasReferences)} skip={!(showReferences && display?.hasReferences && isProApp())}
data-testid="DataGrid_itemReferences" data-testid="DataGrid_itemReferences"
> >
<ReferenceManager {...$$props} {managerSize} /> <ReferenceManager {...$$props} {managerSize} />
</WidgetColumnBarItem> </WidgetColumnBarItem>
<WidgetColumnBarItem <WidgetColumnBarItem
title="Macros" title={_t('dataGrid.macros', { defaultMessage: 'Macros' })}
name="macros" name="macros"
skip={!showMacros} skip={!(showMacros && isProApp())}
collapsed={!expandMacros} collapsed={!expandMacros}
data-testid="DataGrid_itemMacros" data-testid="DataGrid_itemMacros"
> >

View File

@@ -3,8 +3,8 @@
registerCommand({ registerCommand({
id: 'dataGrid.refresh', id: 'dataGrid.refresh',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('common.refresh', { defaultMessage: 'Refresh' }), name: __t('common.refresh', { defaultMessage: 'Refresh' }),
keyText: 'F5 | CtrlOrCommand+R', keyText: 'F5 | CtrlOrCommand+R',
toolbar: true, toolbar: true,
isRelatedToTab: true, isRelatedToTab: true,
@@ -15,8 +15,8 @@
registerCommand({ registerCommand({
id: 'dataGrid.deepRefresh', id: 'dataGrid.deepRefresh',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Refresh with structure', name: __t('common.datagrid.deepRefresh', { defaultMessage: 'Refresh with structure' }),
keyText: 'Ctrl+F5', keyText: 'Ctrl+F5',
toolbar: true, toolbar: true,
isRelatedToTab: true, isRelatedToTab: true,
@@ -27,8 +27,8 @@
registerCommand({ registerCommand({
id: 'dataGrid.revertRowChanges', id: 'dataGrid.revertRowChanges',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.revertRowChanges', { defaultMessage: 'Revert row changes' }), name: __t('command.datagrid.revertRowChanges', { defaultMessage: 'Revert row changes' }),
keyText: 'CtrlOrCommand+U', keyText: 'CtrlOrCommand+U',
testEnabled: () => getCurrentDataGrid()?.getGrider()?.containsChanges, testEnabled: () => getCurrentDataGrid()?.getGrider()?.containsChanges,
onClick: () => getCurrentDataGrid().revertRowChanges(), onClick: () => getCurrentDataGrid().revertRowChanges(),
@@ -36,9 +36,9 @@
registerCommand({ registerCommand({
id: 'dataGrid.revertAllChanges', id: 'dataGrid.revertAllChanges',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.revertAllChanges', { defaultMessage: 'Revert all changes' }), name: __t('command.datagrid.revertAllChanges', { defaultMessage: 'Revert all changes' }),
toolbarName: _t('command.datagrid.revertAllChanges.toolbar', { defaultMessage: 'Revert all' }), toolbarName: __t('command.datagrid.revertAllChanges.toolbar', { defaultMessage: 'Revert all' }),
icon: 'icon undo', icon: 'icon undo',
testEnabled: () => getCurrentDataGrid()?.getGrider()?.containsChanges, testEnabled: () => getCurrentDataGrid()?.getGrider()?.containsChanges,
onClick: () => getCurrentDataGrid().revertAllChanges(), onClick: () => getCurrentDataGrid().revertAllChanges(),
@@ -46,9 +46,9 @@
registerCommand({ registerCommand({
id: 'dataGrid.deleteSelectedRows', id: 'dataGrid.deleteSelectedRows',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.deleteSelectedRows', { defaultMessage: 'Delete selected rows' }), name: __t('command.datagrid.deleteSelectedRows', { defaultMessage: 'Delete selected rows' }),
toolbarName: _t('command.datagrid.deleteSelectedRows.toolbar', { defaultMessage: 'Delete row(s)' }), toolbarName: __t('command.datagrid.deleteSelectedRows.toolbar', { defaultMessage: 'Delete row(s)' }),
keyText: isMac() ? 'Command+Backspace' : 'CtrlOrCommand+Delete', keyText: isMac() ? 'Command+Backspace' : 'CtrlOrCommand+Delete',
icon: 'icon minus', icon: 'icon minus',
testEnabled: () => getCurrentDataGrid()?.getGrider()?.editable, testEnabled: () => getCurrentDataGrid()?.getGrider()?.editable,
@@ -57,9 +57,9 @@
registerCommand({ registerCommand({
id: 'dataGrid.insertNewRow', id: 'dataGrid.insertNewRow',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.insertNewRow', { defaultMessage: 'Insert new row' }), name: __t('command.datagrid.insertNewRow', { defaultMessage: 'Insert new row' }),
toolbarName: _t('command.datagrid.insertNewRow.toolbar', { defaultMessage: 'New row' }), toolbarName: __t('command.datagrid.insertNewRow.toolbar', { defaultMessage: 'New row' }),
icon: 'icon add', icon: 'icon add',
keyText: isMac() ? 'Command+I' : 'Insert', keyText: isMac() ? 'Command+I' : 'Insert',
testEnabled: () => getCurrentDataGrid()?.getGrider()?.editable, testEnabled: () => getCurrentDataGrid()?.getGrider()?.editable,
@@ -68,9 +68,9 @@
registerCommand({ registerCommand({
id: 'dataGrid.addNewColumn', id: 'dataGrid.addNewColumn',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.addNewColumn', { defaultMessage: 'Add new column' }), name: __t('command.datagrid.addNewColumn', { defaultMessage: 'Add new column' }),
toolbarName: _t('command.datagrid.addNewColumn.toolbar', { defaultMessage: 'New column' }), toolbarName: __t('command.datagrid.addNewColumn.toolbar', { defaultMessage: 'New column' }),
icon: 'icon add-column', icon: 'icon add-column',
testEnabled: () => getCurrentDataGrid()?.addNewColumnEnabled(), testEnabled: () => getCurrentDataGrid()?.addNewColumnEnabled(),
onClick: () => getCurrentDataGrid().addNewColumn(), onClick: () => getCurrentDataGrid().addNewColumn(),
@@ -78,9 +78,9 @@
registerCommand({ registerCommand({
id: 'dataGrid.cloneRows', id: 'dataGrid.cloneRows',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.cloneRows', { defaultMessage: 'Clone rows' }), name: __t('command.datagrid.cloneRows', { defaultMessage: 'Clone rows' }),
toolbarName: _t('command.datagrid.cloneRows.toolbar', { defaultMessage: 'Clone row(s)' }), toolbarName: __t('command.datagrid.cloneRows.toolbar', { defaultMessage: 'Clone row(s)' }),
keyText: 'CtrlOrCommand+Shift+C', keyText: 'CtrlOrCommand+Shift+C',
testEnabled: () => getCurrentDataGrid()?.getGrider()?.editable, testEnabled: () => getCurrentDataGrid()?.getGrider()?.editable,
onClick: () => getCurrentDataGrid().cloneRows(), onClick: () => getCurrentDataGrid().cloneRows(),
@@ -88,8 +88,8 @@
registerCommand({ registerCommand({
id: 'dataGrid.setNull', id: 'dataGrid.setNull',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.setNull', { defaultMessage: 'Set NULL' }), name: __t('command.datagrid.setNull', { defaultMessage: 'Set NULL' }),
keyText: 'CtrlOrCommand+0', keyText: 'CtrlOrCommand+0',
testEnabled: () => testEnabled: () =>
getCurrentDataGrid()?.getGrider()?.editable && !getCurrentDataGrid()?.getEditorTypes()?.supportFieldRemoval, getCurrentDataGrid()?.getGrider()?.editable && !getCurrentDataGrid()?.getEditorTypes()?.supportFieldRemoval,
@@ -98,8 +98,8 @@
registerCommand({ registerCommand({
id: 'dataGrid.removeField', id: 'dataGrid.removeField',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.removeField', { defaultMessage: 'Remove field' }), name: __t('command.datagrid.removeField', { defaultMessage: 'Remove field' }),
keyText: 'CtrlOrCommand+0', keyText: 'CtrlOrCommand+0',
testEnabled: () => testEnabled: () =>
getCurrentDataGrid()?.getGrider()?.editable && getCurrentDataGrid()?.getEditorTypes()?.supportFieldRemoval, getCurrentDataGrid()?.getGrider()?.editable && getCurrentDataGrid()?.getEditorTypes()?.supportFieldRemoval,
@@ -108,8 +108,8 @@
registerCommand({ registerCommand({
id: 'dataGrid.undo', id: 'dataGrid.undo',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.undo', { defaultMessage: 'Undo' }), name: __t('command.datagrid.undo', { defaultMessage: 'Undo' }),
group: 'undo', group: 'undo',
icon: 'icon undo', icon: 'icon undo',
toolbar: true, toolbar: true,
@@ -120,8 +120,8 @@
registerCommand({ registerCommand({
id: 'dataGrid.redo', id: 'dataGrid.redo',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.redo', { defaultMessage: 'Redo' }), name: __t('command.datagrid.redo', { defaultMessage: 'Redo' }),
group: 'redo', group: 'redo',
icon: 'icon redo', icon: 'icon redo',
toolbar: true, toolbar: true,
@@ -132,16 +132,16 @@
registerCommand({ registerCommand({
id: 'dataGrid.reconnect', id: 'dataGrid.reconnect',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.reconnect', { defaultMessage: 'Reconnect' }), name: __t('command.datagrid.reconnect', { defaultMessage: 'Reconnect' }),
testEnabled: () => getCurrentDataGrid() != null, testEnabled: () => getCurrentDataGrid() != null,
onClick: () => getCurrentDataGrid().reconnect(), onClick: () => getCurrentDataGrid().reconnect(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.copyToClipboard', id: 'dataGrid.copyToClipboard',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.copyToClipboard', { defaultMessage: 'Copy to clipboard' }), name: __t('command.datagrid.copyToClipboard', { defaultMessage: 'Copy to clipboard' }),
keyText: 'CtrlOrCommand+C', keyText: 'CtrlOrCommand+C',
disableHandleKeyText: 'CtrlOrCommand+C', disableHandleKeyText: 'CtrlOrCommand+C',
testEnabled: () => getCurrentDataGrid() != null, testEnabled: () => getCurrentDataGrid() != null,
@@ -150,57 +150,57 @@
registerCommand({ registerCommand({
id: 'dataGrid.editJsonDocument', id: 'dataGrid.editJsonDocument',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
keyText: 'CtrlOrCommand+J', keyText: 'CtrlOrCommand+J',
name: _t('command.datagrid.editJsonDocument', { defaultMessage: 'Edit row as JSON document' }), name: __t('command.datagrid.editJsonDocument', { defaultMessage: 'Edit row as JSON document' }),
testEnabled: () => getCurrentDataGrid()?.editJsonEnabled(), testEnabled: () => getCurrentDataGrid()?.editJsonEnabled(),
onClick: () => getCurrentDataGrid().editJsonDocument(), onClick: () => getCurrentDataGrid().editJsonDocument(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.openSelectionInMap', id: 'dataGrid.openSelectionInMap',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.openSelectionInMap', { defaultMessage: 'Open selection in map' }), name: __t('command.datagrid.openSelectionInMap', { defaultMessage: 'Open selection in map' }),
testEnabled: () => getCurrentDataGrid() != null, testEnabled: () => getCurrentDataGrid() != null,
onClick: () => getCurrentDataGrid().openSelectionInMap(), onClick: () => getCurrentDataGrid().openSelectionInMap(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.viewJsonDocument', id: 'dataGrid.viewJsonDocument',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.viewJsonDocument', { defaultMessage: 'View row as JSON document' }), name: __t('command.datagrid.viewJsonDocument', { defaultMessage: 'View row as JSON document' }),
testEnabled: () => getCurrentDataGrid()?.viewJsonDocumentEnabled(), testEnabled: () => getCurrentDataGrid()?.viewJsonDocumentEnabled(),
onClick: () => getCurrentDataGrid().viewJsonDocument(), onClick: () => getCurrentDataGrid().viewJsonDocument(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.viewJsonValue', id: 'dataGrid.viewJsonValue',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.viewJsonValue', { defaultMessage: 'View cell as JSON document' }), name: __t('command.datagrid.viewJsonValue', { defaultMessage: 'View cell as JSON document' }),
testEnabled: () => getCurrentDataGrid()?.viewJsonValueEnabled(), testEnabled: () => getCurrentDataGrid()?.viewJsonValueEnabled(),
onClick: () => getCurrentDataGrid().viewJsonValue(), onClick: () => getCurrentDataGrid().viewJsonValue(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.openJsonArrayInSheet', id: 'dataGrid.openJsonArrayInSheet',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.openJsonArrayInSheet', { defaultMessage: 'Open array as table' }), name: __t('command.datagrid.openJsonArrayInSheet', { defaultMessage: 'Open array as table' }),
testEnabled: () => getCurrentDataGrid()?.openJsonArrayInSheetEnabled(), testEnabled: () => getCurrentDataGrid()?.openJsonArrayInSheetEnabled(),
onClick: () => getCurrentDataGrid().openJsonArrayInSheet(), onClick: () => getCurrentDataGrid().openJsonArrayInSheet(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.saveCellToFile', id: 'dataGrid.saveCellToFile',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.saveCellToFile', { defaultMessage: 'Save cell to file' }), name: __t('command.datagrid.saveCellToFile', { defaultMessage: 'Save cell to file' }),
testEnabled: () => getCurrentDataGrid()?.saveCellToFileEnabled(), testEnabled: () => getCurrentDataGrid()?.saveCellToFileEnabled(),
onClick: () => getCurrentDataGrid().saveCellToFile(), onClick: () => getCurrentDataGrid().saveCellToFile(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.loadCellFromFile', id: 'dataGrid.loadCellFromFile',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: _t('command.datagrid.loadCellFromFile', { defaultMessage: 'Load cell from file' }), name: __t('command.datagrid.loadCellFromFile', { defaultMessage: 'Load cell from file' }),
testEnabled: () => getCurrentDataGrid()?.loadCellFromFileEnabled(), testEnabled: () => getCurrentDataGrid()?.loadCellFromFileEnabled(),
onClick: () => getCurrentDataGrid().loadCellFromFile(), onClick: () => getCurrentDataGrid().loadCellFromFile(),
}); });
@@ -216,62 +216,62 @@
// //
registerCommand({ registerCommand({
id: 'dataGrid.filterSelected', id: 'dataGrid.filterSelected',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Filter selected value', name: __t('command.datagrid.filterSelected', { defaultMessage : 'Filter selected value'}),
keyText: 'CtrlOrCommand+Shift+F', keyText: 'CtrlOrCommand+Shift+F',
testEnabled: () => getCurrentDataGrid()?.getDisplay().filterable, testEnabled: () => getCurrentDataGrid()?.getDisplay().filterable,
onClick: () => getCurrentDataGrid().filterSelectedValue(), onClick: () => getCurrentDataGrid().filterSelectedValue(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.findColumn', id: 'dataGrid.findColumn',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Find column', name: __t('command.datagrid.findColumn', { defaultMessage: 'Find column'}),
keyText: 'CtrlOrCommand+F', keyText: 'CtrlOrCommand+F',
testEnabled: () => getCurrentDataGrid() != null, testEnabled: () => getCurrentDataGrid() != null,
getSubCommands: () => getCurrentDataGrid().buildFindMenu(), getSubCommands: () => getCurrentDataGrid().buildFindMenu(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.hideColumn', id: 'dataGrid.hideColumn',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Hide column', name: __t('command.datgrid.hideColumn', { defaultMessage: 'Hide column' }),
keyText: isMac() ? 'Alt+Command+F' : 'CtrlOrCommand+H', keyText: isMac() ? 'Alt+Command+F' : 'CtrlOrCommand+H',
testEnabled: () => getCurrentDataGrid()?.canShowLeftPanel(), testEnabled: () => getCurrentDataGrid()?.canShowLeftPanel(),
onClick: () => getCurrentDataGrid().hideColumn(), onClick: () => getCurrentDataGrid().hideColumn(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.clearFilter', id: 'dataGrid.clearFilter',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Clear filter', name: __t('command.datagrid.clearFilter', { defaultMessage : 'Clear filter'}),
keyText: 'CtrlOrCommand+Shift+E', keyText: 'CtrlOrCommand+Shift+E',
testEnabled: () => getCurrentDataGrid()?.clearFilterEnabled(), testEnabled: () => getCurrentDataGrid()?.clearFilterEnabled(),
onClick: () => getCurrentDataGrid().clearFilter(), onClick: () => getCurrentDataGrid().clearFilter(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.generateSqlFromData', id: 'dataGrid.generateSqlFromData',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Generate SQL', name: __t('command.datagrid.generateSql', { defaultMessage: 'Generate SQL'}),
keyText: 'CtrlOrCommand+G', keyText: 'CtrlOrCommand+G',
testEnabled: () => getCurrentDataGrid()?.generateSqlFromDataEnabled(), testEnabled: () => getCurrentDataGrid()?.generateSqlFromDataEnabled(),
onClick: () => getCurrentDataGrid().generateSqlFromData(), onClick: () => getCurrentDataGrid().generateSqlFromData(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.openFreeTable', id: 'dataGrid.openFreeTable',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Edit selection as table', name: __t('command.datagrid.editSelection', { defaultMessage: 'Edit selection as table'}),
testEnabled: () => getCurrentDataGrid() != null, testEnabled: () => getCurrentDataGrid() != null,
onClick: () => getCurrentDataGrid().openFreeTable(), onClick: () => getCurrentDataGrid().openFreeTable(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.newJson', id: 'dataGrid.newJson',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Add JSON document', name: __t('command.datagrid.addJsonDocument', { defaultMessage: 'Add JSON document'}),
testEnabled: () => getCurrentDataGrid()?.addJsonDocumentEnabled(), testEnabled: () => getCurrentDataGrid()?.addJsonDocumentEnabled(),
onClick: () => getCurrentDataGrid().addJsonDocument(), onClick: () => getCurrentDataGrid().addJsonDocument(),
}); });
registerCommand({ registerCommand({
id: 'dataGrid.editCellValue', id: 'dataGrid.editCellValue',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Edit cell value', name: __t('command.datagrid.editCell', { defaultMessage: 'Edit cell value' }),
testEnabled: () => getCurrentDataGrid()?.editCellValueEnabled(), testEnabled: () => getCurrentDataGrid()?.editCellValueEnabled(),
onClick: () => getCurrentDataGrid().editCellValue(), onClick: () => getCurrentDataGrid().editCellValue(),
}); });
@@ -279,8 +279,8 @@
if (isProApp()) { if (isProApp()) {
registerCommand({ registerCommand({
id: 'dataGrid.sendToDataDeploy', id: 'dataGrid.sendToDataDeploy',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Send to data deployer', name: __t('command.datagrid.sendToDataDeployer', { defaultMessage: 'Send to data deployer' }),
testEnabled: () => getCurrentDataGrid()?.sendToDataDeployEnabled(), testEnabled: () => getCurrentDataGrid()?.sendToDataDeployEnabled(),
onClick: () => getCurrentDataGrid().sendToDataDeploy(), onClick: () => getCurrentDataGrid().sendToDataDeploy(),
}); });
@@ -422,7 +422,7 @@
import { openJsonLinesData } from '../utility/openJsonLinesData'; import { openJsonLinesData } from '../utility/openJsonLinesData';
import contextMenuActivator from '../utility/contextMenuActivator'; import contextMenuActivator from '../utility/contextMenuActivator';
import InputTextModal from '../modals/InputTextModal.svelte'; import InputTextModal from '../modals/InputTextModal.svelte';
import { _t } from '../translations'; import { __t, _t, _val } from '../translations';
import { isProApp } from '../utility/proTools'; import { isProApp } from '../utility/proTools';
import SaveArchiveModal from '../modals/SaveArchiveModal.svelte'; import SaveArchiveModal from '../modals/SaveArchiveModal.svelte';
import hasPermission from '../utility/hasPermission'; import hasPermission from '../utility/hasPermission';
@@ -1417,7 +1417,11 @@
function handleGridWheel(event) { function handleGridWheel(event) {
if (event.shiftKey) { if (event.shiftKey) {
if (isMac()) {
scrollHorizontal(event.deltaX, event.deltaY);
} else {
scrollHorizontal(event.deltaY, event.deltaX); scrollHorizontal(event.deltaY, event.deltaX);
}
} else { } else {
scrollHorizontal(event.deltaX, event.deltaY); scrollHorizontal(event.deltaX, event.deltaY);
scrollVertical(event.deltaX, event.deltaY); scrollVertical(event.deltaX, event.deltaY);
@@ -1792,15 +1796,15 @@
{ command: 'dataGrid.refresh' }, { command: 'dataGrid.refresh' },
{ placeTag: 'copy' }, { placeTag: 'copy' },
{ {
text: 'Copy advanced', text: _t('datagrid.copyAdvanced', { defaultMessage: 'Copy advanced'}),
submenu: [ submenu: [
_.keys(copyRowsFormatDefs).map(format => ({ _.keys(copyRowsFormatDefs).map(format => ({
text: copyRowsFormatDefs[format].label, text: _val(copyRowsFormatDefs[format].label),
onClick: () => copyToClipboardCore(format), onClick: () => copyToClipboardCore(format),
})), })),
{ divider: true }, { divider: true },
_.keys(copyRowsFormatDefs).map(format => ({ _.keys(copyRowsFormatDefs).map(format => ({
text: `Set format: ${copyRowsFormatDefs[format].name}`, text: _t('datagrid.setFormat', { defaultMessage: 'Set format: ' }) + (_val(copyRowsFormatDefs[format].name)),
onClick: () => ($copyRowsFormat = format), onClick: () => ($copyRowsFormat = format),
})), })),
@@ -1870,7 +1874,7 @@
return [ return [
menu, menu,
{ {
text: copyRowsFormatDefs[$copyRowsFormat].label, text: _val(copyRowsFormatDefs[$copyRowsFormat].label),
onClick: () => copyToClipboardCore($copyRowsFormat), onClick: () => copyToClipboardCore($copyRowsFormat),
keyText: 'CtrlOrCommand+C', keyText: 'CtrlOrCommand+C',
tag: 'copy', tag: 'copy',

View File

@@ -3,8 +3,8 @@
registerCommand({ registerCommand({
id: 'jslTableGrid.export', id: 'jslTableGrid.export',
category: 'Data grid', category: __t('command.dataGrid', { defaultMessage: 'Data grid' }),
name: 'Export', name: __t('command.dataGrid.export', { defaultMessage: 'Export' }),
icon: 'icon export', icon: 'icon export',
keyText: 'CtrlOrCommand+E', keyText: 'CtrlOrCommand+E',
testEnabled: () => getCurrentEditor() != null, testEnabled: () => getCurrentEditor() != null,
@@ -56,6 +56,7 @@
import LoadingDataGridCore from './LoadingDataGridCore.svelte'; import LoadingDataGridCore from './LoadingDataGridCore.svelte';
import { openImportExportTab } from '../utility/importExportTools'; import { openImportExportTab } from '../utility/importExportTools';
import { __t } from '../translations';
export let jslid; export let jslid;
export let display; export let display;

View File

@@ -11,6 +11,8 @@
import FontIcon from '../icons/FontIcon.svelte'; import FontIcon from '../icons/FontIcon.svelte';
import TokenizedFilteredText from '../widgets/TokenizedFilteredText.svelte'; import TokenizedFilteredText from '../widgets/TokenizedFilteredText.svelte';
import { _t } from '../translations';
export let managerSize; export let managerSize;
export let display: GridDisplay; export let display: GridDisplay;
export let onReferenceClick = ref => {}; export let onReferenceClick = ref => {};
@@ -24,12 +26,12 @@
</script> </script>
<SearchBoxWrapper> <SearchBoxWrapper>
<SearchInput placeholder="Search references" bind:value={filter} /> <SearchInput placeholder={_t('dataGrid.searchReferences', { defaultMessage: 'Search references' })} bind:value={filter} />
<CloseSearchButton bind:filter /> <CloseSearchButton bind:filter />
</SearchBoxWrapper> </SearchBoxWrapper>
<ManagerInnerContainer width={managerSize}> <ManagerInnerContainer width={managerSize}>
{#if foreignKeys.length > 0} {#if foreignKeys.length > 0}
<div class="bold nowrap ml-1">References tables ({foreignKeys.length})</div> <div class="bold nowrap ml-1">{_t('dataGrid.referencesTables', { defaultMessage: 'References tables' })} ({foreignKeys.length})</div>
{#each foreignKeys.filter(fk => filterName(filter, fk.refTableName)) as fk} {#each foreignKeys.filter(fk => filterName(filter, fk.refTableName)) as fk}
<div <div
class="link" class="link"
@@ -53,7 +55,7 @@
{/if} {/if}
{#if dependencies.length > 0} {#if dependencies.length > 0}
<div class="bold nowrap ml-1">Dependent tables ({dependencies.length})</div> <div class="bold nowrap ml-1">{_t('dataGrid.dependentTables', { defaultMessage: 'Dependent tables' })} ({dependencies.length})</div>
{#each dependencies.filter(fk => filterName(filter, fk.pureName)) as fk} {#each dependencies.filter(fk => filterName(filter, fk.pureName)) as fk}
<div <div
class="link" class="link"

View File

@@ -1,18 +1,19 @@
<script context="module" lang="ts"> <script context="module" lang="ts">
import { __t } from '../translations'
const getCurrentEditor = () => getActiveComponent('SqlDataGridCore'); const getCurrentEditor = () => getActiveComponent('SqlDataGridCore');
registerCommand({ registerCommand({
id: 'sqlDataGrid.openQuery', id: 'sqlDataGrid.openQuery',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Open query', name: __t('command.openQuery', { defaultMessage : 'Open query' }),
testEnabled: () => getCurrentEditor() != null && hasPermission('dbops/query'), testEnabled: () => getCurrentEditor() != null && hasPermission('dbops/query'),
onClick: () => getCurrentEditor().openQuery(), onClick: () => getCurrentEditor().openQuery(),
}); });
registerCommand({ registerCommand({
id: 'sqlDataGrid.export', id: 'sqlDataGrid.export',
category: 'Data grid', category: __t('command.datagrid', { defaultMessage: 'Data grid' }),
name: 'Export', name: __t('common.export', { defaultMessage : 'Export' }),
icon: 'icon export', icon: 'icon export',
keyText: 'CtrlOrCommand+E', keyText: 'CtrlOrCommand+E',
testEnabled: () => getCurrentEditor() != null && hasPermission('dbops/export'), testEnabled: () => getCurrentEditor() != null && hasPermission('dbops/export'),

View File

@@ -30,6 +30,7 @@
import SqlFormView from '../formview/SqlFormView.svelte'; import SqlFormView from '../formview/SqlFormView.svelte';
import { getBoolSettingsValue } from '../settings/settingsTools'; import { getBoolSettingsValue } from '../settings/settingsTools';
import { getDictionaryDescription } from '../utility/dictionaryDescriptionTools'; import { getDictionaryDescription } from '../utility/dictionaryDescriptionTools';
import { isProApp } from '../utility/proTools';
export let conid; export let conid;
export let database; export let database;
@@ -82,7 +83,8 @@
extendedDbInfo?.tables?.find(x => x.pureName == pureName && x.schemaName == schemaName) extendedDbInfo?.tables?.find(x => x.pureName == pureName && x.schemaName == schemaName)
?.tablePermissionRole == 'read', ?.tablePermissionRole == 'read',
isRawMode, isRawMode,
$settingsValue $settingsValue,
isProApp()
) )
: null; : null;

View File

@@ -3,9 +3,9 @@
registerCommand({ registerCommand({
id: 'designer.arrange', id: 'designer.arrange',
category: 'Designer', category: __t('command.designer', { defaultMessage: 'Designer' }),
icon: 'icon arrange', icon: 'icon arrange',
name: 'Arrange', name: __t('command.designer.arrange', { defaultMessage: 'Arrange' }),
toolbar: true, toolbar: true,
isRelatedToTab: true, isRelatedToTab: true,
testEnabled: () => getCurrentEditor()?.canArrange(), testEnabled: () => getCurrentEditor()?.canArrange(),
@@ -15,9 +15,9 @@
registerCommand({ registerCommand({
id: 'diagram.export', id: 'diagram.export',
category: 'Designer', category: __t('command.designer', { defaultMessage: 'Designer' }),
toolbarName: 'Export diagram', toolbarName: __t('command.designer.exportDiagram', { defaultMessage: 'Export diagram' }),
name: 'Export diagram', name: __t('command.designer.exportDiagram', { defaultMessage: 'Export diagram' }),
icon: 'icon report', icon: 'icon report',
toolbar: true, toolbar: true,
isRelatedToTab: true, isRelatedToTab: true,
@@ -27,9 +27,9 @@
registerCommand({ registerCommand({
id: 'diagram.deleteSelectedTables', id: 'diagram.deleteSelectedTables',
category: 'Designer', category: __t('command.designer', { defaultMessage: 'Designer' }),
toolbarName: 'Remove', toolbarName: __t('command.designer.remove', { defaultMessage: 'Remove' }),
name: 'Remove selected tables', name: __t('command.designer.removeSelectedTables', { defaultMessage: 'Remove selected tables' }),
icon: 'icon delete', icon: 'icon delete',
toolbar: true, toolbar: true,
isRelatedToTab: true, isRelatedToTab: true,
@@ -67,6 +67,7 @@
import { isProApp } from '../utility/proTools'; import { isProApp } from '../utility/proTools';
import dragScroll from '../utility/dragScroll'; import dragScroll from '../utility/dragScroll';
import FormStyledButton from '../buttons/FormStyledButton.svelte'; import FormStyledButton from '../buttons/FormStyledButton.svelte';
import { __t } from '../translations';
export let value; export let value;
export let onChange; export let onChange;

View File

@@ -5,6 +5,7 @@
import ObjectListControl from '../elements/ObjectListControl.svelte'; import ObjectListControl from '../elements/ObjectListControl.svelte';
import Link from './Link.svelte'; import Link from './Link.svelte';
import { _t } from '../translations';
export let collection; export let collection;
export let title; export let title;
@@ -24,18 +25,18 @@
columns={[ columns={[
{ {
fieldName: 'baseColumns', fieldName: 'baseColumns',
header: 'Base columns', header: _t('foreignKey.baseColumns', { defaultMessage: 'Base columns' }),
slot: 0, slot: 0,
sortable: true, sortable: true,
}, },
{ {
fieldName: 'refTableName', fieldName: 'refTableName',
header: 'Referenced table', header: _t('foreignKey.refTableName', { defaultMessage: 'Referenced table' }),
sortable: true, sortable: true,
}, },
{ {
fieldName: 'refColumns', fieldName: 'refColumns',
header: 'Referenced columns', header: _t('foreignKey.refColumns', { defaultMessage: 'Referenced columns' }),
slot: 1, slot: 1,
sortable: true, sortable: true,
}, },
@@ -60,5 +61,5 @@
<svelte:fragment slot="name" let:row><ConstraintLabel {...row} /></svelte:fragment> <svelte:fragment slot="name" let:row><ConstraintLabel {...row} /></svelte:fragment>
<svelte:fragment slot="0" let:row>{row?.columns.map(x => x.columnName).join(', ')}</svelte:fragment> <svelte:fragment slot="0" let:row>{row?.columns.map(x => x.columnName).join(', ')}</svelte:fragment>
<svelte:fragment slot="1" let:row>{row?.columns.map(x => x.refColumnName).join(', ')}</svelte:fragment> <svelte:fragment slot="1" let:row>{row?.columns.map(x => x.refColumnName).join(', ')}</svelte:fragment>
<svelte:fragment slot="2" let:row><Link onClick={() => onRemove(row)}>Remove</Link></svelte:fragment> <svelte:fragment slot="2" let:row><Link onClick={() => onRemove(row)}>{_t('common.remove', { defaultMessage: 'Remove' })}</Link></svelte:fragment>
</ObjectListControl> </ObjectListControl>

View File

@@ -4,6 +4,7 @@
import Link from './Link.svelte'; import Link from './Link.svelte';
import TableControl from './TableControl.svelte'; import TableControl from './TableControl.svelte';
import { writable } from 'svelte/store'; import { writable } from 'svelte/store';
import { _t } from '../translations';
export let title; export let title;
export let collection; export let collection;
@@ -39,7 +40,7 @@
</span> </span>
<span class="title mr-1">{title}</span> <span class="title mr-1">{title}</span>
{#if onAddNew} {#if onAddNew}
<Link onClick={onAddNew}><FontIcon icon="icon add" /> Add new</Link> <Link onClick={onAddNew}><FontIcon icon="icon add" />{_t('common.addNew', { defaultMessage: 'Add new' })}</Link>
{/if} {/if}
{#if multipleItemsActions && activeMultipleSelection && activeMultipleSelection?.length > 0} {#if multipleItemsActions && activeMultipleSelection && activeMultipleSelection?.length > 0}
{#each multipleItemsActions as item} {#each multipleItemsActions as item}
@@ -65,7 +66,7 @@
columns={_.compact([ columns={_.compact([
!hideDisplayName && { !hideDisplayName && {
fieldName: displayNameFieldName || 'displayName', fieldName: displayNameFieldName || 'displayName',
header: 'Name', header: _t('common.name', { defaultMessage: 'Name' }),
slot: -1, slot: -1,
sortable: true, sortable: true,
filterable: !!displayNameFieldName, filterable: !!displayNameFieldName,

View File

@@ -5,6 +5,8 @@
import { onMount, afterUpdate } from 'svelte'; import { onMount, afterUpdate } from 'svelte';
export let code = ''; export let code = '';
export let inline = false;
export let onClick = null;
let domCode; let domCode;
@@ -29,7 +31,11 @@
The `sql` class hints the language; highlight.js will The `sql` class hints the language; highlight.js will
read it even though we register the grammar explicitly. read it even though we register the grammar explicitly.
--> -->
<pre bind:this={domCode} class="sql">{code}</pre> {#if inline}
<span bind:this={domCode} class="sql" class:clickable={!!onClick} on:click={onClick}>{code}</span>
{:else}
<pre bind:this={domCode} class="sql" class:clickable={!!onClick} on:click={onClick}>{code}</pre>
{/if}
{/key} {/key}
<style> <style>
@@ -38,4 +44,8 @@
padding: 0; padding: 0;
padding: 0.5em; padding: 0.5em;
} }
.clickable {
cursor: pointer;
}
</style> </style>

View File

@@ -27,6 +27,7 @@
import { evaluateCondition } from 'dbgate-sqltree'; import { evaluateCondition } from 'dbgate-sqltree';
import { compileCompoudEvalCondition } from 'dbgate-filterparser'; import { compileCompoudEvalCondition } from 'dbgate-filterparser';
import { chevronExpandIcon } from '../icons/expandIcons'; import { chevronExpandIcon } from '../icons/expandIcons';
import { _val } from '../translations';
export let columns: (TableControlColumn | false)[]; export let columns: (TableControlColumn | false)[];
export let rows = null; export let rows = null;
@@ -368,7 +369,7 @@
{/if} {/if}
{/key} {/key}
{:else} {:else}
{row[col.fieldName] || ''} { _val(row[col.fieldName]) || '' }
{/if} {/if}
</td> </td>
{/each} {/each}

View File

@@ -5,6 +5,7 @@
import { getFormContext } from './FormProviderCore.svelte'; import { getFormContext } from './FormProviderCore.svelte';
import TextField from './TextField.svelte'; import TextField from './TextField.svelte';
import { _t } from '../translations';
export let name; export let name;
export let disabled = false; export let disabled = false;
@@ -29,7 +30,7 @@
setFieldValue(name, e.target['value']); setFieldValue(name, e.target['value']);
} }
}} }}
placeholder={isCrypted ? '(Password is encrypted)' : undefined} placeholder={isCrypted ? _t('common.passwordEncrypted', { defaultMessage: 'Password is encrypted' }) : undefined}
type={isCrypted || showPassword ? 'text' : 'password'} type={isCrypted || showPassword ? 'text' : 'password'}
/> />
{#if !isCrypted} {#if !isCrypted}

View File

@@ -1,6 +1,7 @@
<script lang="ts"> <script lang="ts">
import { getFormContext } from './FormProviderCore.svelte'; import { getFormContext } from './FormProviderCore.svelte';
import TextField from './TextField.svelte'; import TextField from './TextField.svelte';
import { _val } from '../translations';
export let name; export let name;
export let defaultValue; export let defaultValue;
@@ -11,7 +12,7 @@
<TextField <TextField
{...$$restProps} {...$$restProps}
value={$values?.[name] ?? defaultValue} value={$values?.[name] ? _val($values[name]) : defaultValue}
on:input={e => setFieldValue(name, e.target['value'])} on:input={e => setFieldValue(name, e.target['value'])}
on:input={e => { on:input={e => {
if (saveOnInput) { if (saveOnInput) {

View File

@@ -3,8 +3,8 @@
registerCommand({ registerCommand({
id: 'collectionJsonView.expandAll', id: 'collectionJsonView.expandAll',
category: 'Collection data', category: __t('command.collectionData', { defaultMessage: 'Collection data' }),
name: 'Expand all', name: __t('command.collectionData.expandAll', { defaultMessage: 'Expand all' }),
isRelatedToTab: true, isRelatedToTab: true,
icon: 'icon expand-all', icon: 'icon expand-all',
onClick: () => getCurrentEditor().handleExpandAll(), onClick: () => getCurrentEditor().handleExpandAll(),
@@ -12,8 +12,8 @@
}); });
registerCommand({ registerCommand({
id: 'collectionJsonView.collapseAll', id: 'collectionJsonView.collapseAll',
category: 'Collection data', category: __t('command.collectionData', { defaultMessage: 'Collection data' }),
name: 'Collapse all', name: __t('command.collectionData.collapseAll', { defaultMessage: 'Collapse all' }),
isRelatedToTab: true, isRelatedToTab: true,
icon: 'icon collapse-all', icon: 'icon collapse-all',
onClick: () => getCurrentEditor().handleCollapseAll(), onClick: () => getCurrentEditor().handleCollapseAll(),
@@ -37,6 +37,7 @@
import CollectionJsonRow from './CollectionJsonRow.svelte'; import CollectionJsonRow from './CollectionJsonRow.svelte';
import { getIntSettingsValue } from '../settings/settingsTools'; import { getIntSettingsValue } from '../settings/settingsTools';
import invalidateCommands from '../commands/invalidateCommands'; import invalidateCommands from '../commands/invalidateCommands';
import { __t } from '../translations';
export let conid; export let conid;
export let database; export let database;

View File

@@ -14,8 +14,8 @@
registerCommand({ registerCommand({
id: 'dataForm.refresh', id: 'dataForm.refresh',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: _t('common.refresh', { defaultMessage: 'Refresh' }), name: __t('common.refresh', { defaultMessage: 'Refresh' }),
keyText: 'F5 | CtrlOrCommand+R', keyText: 'F5 | CtrlOrCommand+R',
toolbar: true, toolbar: true,
isRelatedToTab: true, isRelatedToTab: true,
@@ -26,8 +26,8 @@
registerCommand({ registerCommand({
id: 'dataForm.copyToClipboard', id: 'dataForm.copyToClipboard',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: 'Copy to clipboard', name: __t('command.dataForm.copyToClipboard', { defaultMessage: 'Copy to clipboard' }),
keyText: 'CtrlOrCommand+C', keyText: 'CtrlOrCommand+C',
disableHandleKeyText: 'CtrlOrCommand+C', disableHandleKeyText: 'CtrlOrCommand+C',
testEnabled: () => getCurrentDataForm() != null, testEnabled: () => getCurrentDataForm() != null,
@@ -36,8 +36,8 @@
registerCommand({ registerCommand({
id: 'dataForm.revertRowChanges', id: 'dataForm.revertRowChanges',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: 'Revert row changes', name: __t('command.dataForm.revertRowChanges', { defaultMessage: 'Revert row changes' }),
keyText: 'CtrlOrCommand+U', keyText: 'CtrlOrCommand+U',
testEnabled: () => getCurrentDataForm()?.getGrider()?.containsChanges, testEnabled: () => getCurrentDataForm()?.getGrider()?.containsChanges,
onClick: () => getCurrentDataForm().getGrider().revertRowChanges(0), onClick: () => getCurrentDataForm().getGrider().revertRowChanges(0),
@@ -45,8 +45,8 @@
registerCommand({ registerCommand({
id: 'dataForm.setNull', id: 'dataForm.setNull',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: 'Set NULL', name: __t('command.dataForm.setNull', { defaultMessage: 'Set NULL' }),
keyText: 'CtrlOrCommand+0', keyText: 'CtrlOrCommand+0',
testEnabled: () => getCurrentDataForm() != null && !getCurrentDataForm()?.getEditorTypes()?.supportFieldRemoval, testEnabled: () => getCurrentDataForm() != null && !getCurrentDataForm()?.getEditorTypes()?.supportFieldRemoval,
onClick: () => getCurrentDataForm().setFixedValue(null), onClick: () => getCurrentDataForm().setFixedValue(null),
@@ -54,8 +54,8 @@
registerCommand({ registerCommand({
id: 'dataForm.removeField', id: 'dataForm.removeField',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: 'Remove field', name: __t('command.dataForm.removeField', { defaultMessage: 'Remove field' }),
keyText: 'CtrlOrCommand+0', keyText: 'CtrlOrCommand+0',
testEnabled: () => getCurrentDataForm() != null && getCurrentDataForm()?.getEditorTypes()?.supportFieldRemoval, testEnabled: () => getCurrentDataForm() != null && getCurrentDataForm()?.getEditorTypes()?.supportFieldRemoval,
onClick: () => getCurrentDataForm().setFixedValue(undefined), onClick: () => getCurrentDataForm().setFixedValue(undefined),
@@ -63,8 +63,8 @@
registerCommand({ registerCommand({
id: 'dataForm.undo', id: 'dataForm.undo',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: 'Undo', name: __t('command.dataForm.undo', { defaultMessage: 'Undo' }),
group: 'undo', group: 'undo',
icon: 'icon undo', icon: 'icon undo',
toolbar: true, toolbar: true,
@@ -75,8 +75,8 @@
registerCommand({ registerCommand({
id: 'dataForm.redo', id: 'dataForm.redo',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: 'Redo', name: __t('command.dataForm.redo', { defaultMessage: 'Redo' }),
group: 'redo', group: 'redo',
icon: 'icon redo', icon: 'icon redo',
toolbar: true, toolbar: true,
@@ -87,16 +87,16 @@
registerCommand({ registerCommand({
id: 'dataForm.reconnect', id: 'dataForm.reconnect',
category: 'Data grid', category: __t('command.dataGrid', { defaultMessage: 'Data grid' }),
name: 'Reconnect', name: __t('command.dataGrid.reconnect', { defaultMessage: 'Reconnect' }),
testEnabled: () => getCurrentDataForm() != null, testEnabled: () => getCurrentDataForm() != null,
onClick: () => getCurrentDataForm().reconnect(), onClick: () => getCurrentDataForm().reconnect(),
}); });
registerCommand({ registerCommand({
id: 'dataForm.filterSelected', id: 'dataForm.filterSelected',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: 'Filter this value', name: __t('command.dataForm.filterSelected', { defaultMessage: 'Filter this value' }),
keyText: 'CtrlOrCommand+Shift+F', keyText: 'CtrlOrCommand+Shift+F',
testEnabled: () => getCurrentDataForm() != null, testEnabled: () => getCurrentDataForm() != null,
onClick: () => getCurrentDataForm().filterSelectedValue(), onClick: () => getCurrentDataForm().filterSelectedValue(),
@@ -104,16 +104,16 @@
registerCommand({ registerCommand({
id: 'dataForm.addToFilter', id: 'dataForm.addToFilter',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: 'Add to filter', name: __t('command.dataForm.addToFilter', { defaultMessage: 'Add to filter' }),
testEnabled: () => getCurrentDataForm() != null, testEnabled: () => getCurrentDataForm() != null,
onClick: () => getCurrentDataForm().addToFilter(), onClick: () => getCurrentDataForm().addToFilter(),
}); });
registerCommand({ registerCommand({
id: 'dataForm.goToFirst', id: 'dataForm.goToFirst',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: 'First', name: __t('command.dataForm.goToFirst', { defaultMessage: 'First' }),
keyText: 'CtrlOrCommand+Home', keyText: 'CtrlOrCommand+Home',
toolbar: true, toolbar: true,
isRelatedToTab: true, isRelatedToTab: true,
@@ -124,8 +124,8 @@
registerCommand({ registerCommand({
id: 'dataForm.goToPrevious', id: 'dataForm.goToPrevious',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: 'Previous', name: __t('command.dataForm.goToPrevious', { defaultMessage: 'Previous' }),
keyText: 'CtrlOrCommand+ArrowUp', keyText: 'CtrlOrCommand+ArrowUp',
toolbar: true, toolbar: true,
isRelatedToTab: true, isRelatedToTab: true,
@@ -136,8 +136,8 @@
registerCommand({ registerCommand({
id: 'dataForm.goToNext', id: 'dataForm.goToNext',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: 'Next', name: __t('command.dataForm.goToNext', { defaultMessage: 'Next' }),
keyText: 'CtrlOrCommand+ArrowDown', keyText: 'CtrlOrCommand+ArrowDown',
toolbar: true, toolbar: true,
isRelatedToTab: true, isRelatedToTab: true,
@@ -148,8 +148,8 @@
registerCommand({ registerCommand({
id: 'dataForm.goToLast', id: 'dataForm.goToLast',
category: 'Data form', category: __t('command.dataForm', { defaultMessage: 'Data form' }),
name: 'Last', name: __t('command.dataForm.goToLast', { defaultMessage: 'Last' }),
keyText: 'CtrlOrCommand+End', keyText: 'CtrlOrCommand+End',
toolbar: true, toolbar: true,
isRelatedToTab: true, isRelatedToTab: true,
@@ -197,7 +197,7 @@
import resizeObserver from '../utility/resizeObserver'; import resizeObserver from '../utility/resizeObserver';
import openReferenceForm from './openReferenceForm'; import openReferenceForm from './openReferenceForm';
import { useSettings } from '../utility/metadataLoaders'; import { useSettings } from '../utility/metadataLoaders';
import { _t } from '../translations'; import { _t, __t } from '../translations';
export let conid; export let conid;
export let database; export let database;
@@ -243,20 +243,16 @@
function getRowCountInfo(allRowCount) { function getRowCountInfo(allRowCount) {
if (rowCountNotAvailable) { if (rowCountNotAvailable) {
return `Row: ${((display.config.formViewRecordNumber || 0) + 1).toLocaleString()} / ???`; return _t('dataForm.rowCount', { defaultMessage: 'Row: {rowCount} / ???', values: { rowCount: ((display.config.formViewRecordNumber || 0) + 1).toLocaleString() } });
} }
if (rowData == null) { if (rowData == null) {
if (allRowCount != null) { if (allRowCount != null) {
return `Out of bounds: ${( return _t('dataForm.outOfBounds', { defaultMessage: 'Out of bounds: {current} / {total}', values: { current: ((display.config.formViewRecordNumber || 0) + 1).toLocaleString(), total: allRowCount.toLocaleString() } });
(display.config.formViewRecordNumber || 0) + 1
).toLocaleString()} / ${allRowCount.toLocaleString()}`;
} }
return 'No data'; return _t('dataForm.noData', { defaultMessage: 'No data' });
} }
if (allRowCount == null || display == null) return 'Loading row count...'; if (allRowCount == null || display == null) return _t('dataForm.loadingRowCount', { defaultMessage: 'Loading row count...' });
return `Row: ${( return _t('dataForm.rowCount', { defaultMessage: 'Row: {current} / {total}', values: { current: ((display.config.formViewRecordNumber || 0) + 1).toLocaleString(), total: allRowCount.toLocaleString() } });
(display.config.formViewRecordNumber || 0) + 1
).toLocaleString()} / ${allRowCount.toLocaleString()}`;
} }
export function getGrider() { export function getGrider() {
@@ -720,7 +716,7 @@
</div> </div>
{#if isLoading} {#if isLoading}
<LoadingInfo wrapper message="Loading data" /> <LoadingInfo wrapper message={_t('common.loadingData', { defaultMessage: 'Loading data' })} />
{/if} {/if}
<style> <style>

View File

@@ -9,6 +9,7 @@
import FormViewFilterColumn from './FormViewFilterColumn.svelte'; import FormViewFilterColumn from './FormViewFilterColumn.svelte';
import { stringFilterBehaviour } from 'dbgate-tools'; import { stringFilterBehaviour } from 'dbgate-tools';
import CheckboxField from '../forms/CheckboxField.svelte'; import CheckboxField from '../forms/CheckboxField.svelte';
import { _t } from '../translations';
// import PrimaryKeyFilterEditor from './PrimaryKeyFilterEditor.svelte'; // import PrimaryKeyFilterEditor from './PrimaryKeyFilterEditor.svelte';
export let managerSize; export let managerSize;
@@ -36,7 +37,7 @@
{#if isFormView} {#if isFormView}
<div class="m-1"> <div class="m-1">
<div>Column name filter</div> <div>{_t('datagrid.columnNameFilter', { defaultMessage: 'Column name filter' })}</div>
<div class="flex"> <div class="flex">
<input <input
type="text" type="text"
@@ -63,7 +64,7 @@
{#if hasMultiColumnFilter} {#if hasMultiColumnFilter}
<div class="m-1"> <div class="m-1">
<div class="space-between"> <div class="space-between">
<span>Multi column filter</span> <span>{_t('dataGrid.multiColumnFilter', { defaultMessage: 'Multi column filter' })}</span>
{#if multiColumnFilter} {#if multiColumnFilter}
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<CheckboxField <CheckboxField

View File

@@ -1,22 +1,31 @@
<script lang="ts"> <script lang="ts">
import JsonUiCountdown from './JsonUiCountdown.svelte';
import JsonUiHeading from './JsonUiHeading.svelte'; import JsonUiHeading from './JsonUiHeading.svelte';
import JsonUiHighlight from './JsonUiHighlight.svelte';
import JsonUiLinkButton from './JsonUiLinkButton.svelte'; import JsonUiLinkButton from './JsonUiLinkButton.svelte';
import JsonUiLinkButtonBlock from './JsonUiLinkButtonBlock.svelte';
import JsonUiMarkdown from './JsonUiMarkdown.svelte';
import JsonUiTextBlock from './JsonUiTextBlock.svelte'; import JsonUiTextBlock from './JsonUiTextBlock.svelte';
import JsonUiTickList from './JsonUiTickList.svelte'; import JsonUiTickList from './JsonUiTickList.svelte';
import { JsonUiBlock } from './jsonuitypes'; import { JsonUiBlock } from './jsonuitypes';
export let blocks: JsonUiBlock[] = []; export let blocks: JsonUiBlock[] = [];
export let passProps = {};
const componentMap = { const componentMap = {
text: JsonUiTextBlock, text: JsonUiTextBlock,
heading: JsonUiHeading, heading: JsonUiHeading,
ticklist: JsonUiTickList, ticklist: JsonUiTickList,
button: JsonUiLinkButton, button: JsonUiLinkButton,
markdown: JsonUiMarkdown,
highlight: JsonUiHighlight,
countdown: JsonUiCountdown,
buttonblock: JsonUiLinkButtonBlock,
} as const; } as const;
</script> </script>
{#each blocks as block, i} {#each blocks as block, i}
{#if block.type in componentMap} {#if block.type in componentMap}
<svelte:component this={componentMap[block.type]} {...block} /> <svelte:component this={componentMap[block.type]} {...block} {...passProps} />
{/if} {/if}
{/each} {/each}

View File

@@ -0,0 +1,87 @@
<script lang="ts">
import { onMount } from 'svelte';
import { openWebLink } from '../utility/simpleTools';
export let colorClass: string = 'premium-gradient';
export let validTo;
export let link;
function formatRemaining(validTo, now) {
let diffMs = validTo.getTime() - now.getTime();
if (diffMs <= 0) return '0 minutes';
const totalMinutes = Math.floor(diffMs / 60000);
const days = Math.floor(totalMinutes / (24 * 60));
const hours = Math.floor((totalMinutes % (24 * 60)) / 60);
const minutes = totalMinutes % 60;
const parts = [];
const en = (n, unit) => ({
num: n,
unit: n == 1 ? unit : unit + 's',
});
if (days) parts.push(en(days, 'day'));
if (hours) parts.push(en(hours, 'hour'));
// Always include minutes to report down to minutes
parts.push(en(minutes, 'minute'));
return parts;
}
let currentDate = new Date();
onMount(() => {
const interval = setInterval(() => {
currentDate = new Date();
}, 5000);
return () => {
clearInterval(interval);
};
});
$: parts = formatRemaining(new Date(validTo), currentDate);
</script>
{#if validTo}
<div
class="countdown {colorClass}"
class:isLink={!!link}
on:click={() => {
if (link) {
openWebLink(link);
}
}}
>
<span class="big">Offer ends in:</span><br />
{#each parts as part}
<span class="part">
<span class="big">{part.num}</span>
{part.unit}
</span>
{/each}
</div>
{/if}
<style>
.countdown {
text-align: center;
margin: 10px;
border: 1px solid;
padding: 5px;
}
.countdown.isLink {
cursor: pointer;
}
.big {
font-size: large;
font-weight: bold;
}
.part {
margin: 0 5px;
}
</style>

View File

@@ -0,0 +1,35 @@
<script lang="ts">
import { openWebLink } from '../utility/simpleTools';
export let text: string;
export let colorClass: string = 'premium-gradient';
export let link: string;
</script>
<div
class="highlight {colorClass}"
class:isLink={!!link}
on:click={() => {
if (link) {
openWebLink(link);
}
}}
>
{text}
</div>
<style>
.highlight {
display: block;
text-align: center;
margin: 10px;
font-size: large;
font-weight: bold;
border: 1px solid;
padding: 5px;
}
.highlight.isLink {
cursor: pointer;
}
</style>

View File

@@ -5,9 +5,6 @@
export let text: string; export let text: string;
export let link: string; export let link: string;
export let colorClass: string = ''; export let colorClass: string = '';
// very light url guard
const safe = /^(https?:)?\/\//i.test(link) || link.startsWith('/');
</script> </script>
<div class="center"> <div class="center">

View File

@@ -0,0 +1,21 @@
<script lang="ts">
import FormStyledButton from '../buttons/FormStyledButton.svelte';
import { openWebLink } from '../utility/simpleTools';
export let text: string;
export let link: string;
export let colorClass: string = '';
export let items: any[] = [];
</script>
<div class="center">
{#each items as item}
<FormStyledButton on:click={() => openWebLink(item.link)} value={item.text} skipWidth {colorClass} />
{/each}
</div>
<style>
.center {
text-align: center;
}
</style>

View File

@@ -0,0 +1,15 @@
<script lang="ts">
import Markdown from '../elements/Markdown.svelte';
export let text: string;
</script>
<div>
<Markdown source={text} />
</div>
<style>
div {
margin: 10px;
}
</style>

View File

@@ -6,6 +6,7 @@
import MacroHeader from './MacroHeader.svelte'; import MacroHeader from './MacroHeader.svelte';
import MacroInfoTab from './MacroInfoTab.svelte'; import MacroInfoTab from './MacroInfoTab.svelte';
import { _t } from '../translations';
const selectedMacro = getContext('selectedMacro') as any; const selectedMacro = getContext('selectedMacro') as any;
@@ -17,7 +18,7 @@
<TabControl <TabControl
tabs={[ tabs={[
{ {
label: 'Macro detail', label: _t('datagrid.macros.detail', { defaultMessage: 'Macro detail' }),
component: MacroInfoTab, component: MacroInfoTab,
props: { props: {
onExecute, onExecute,

View File

@@ -2,6 +2,7 @@
import { getContext } from 'svelte'; import { getContext } from 'svelte';
import FontIcon from '../icons/FontIcon.svelte'; import FontIcon from '../icons/FontIcon.svelte';
import ToolbarButton from '../buttons/ToolbarButton.svelte'; import ToolbarButton from '../buttons/ToolbarButton.svelte';
import { _t } from '../translations';
export let onExecute; export let onExecute;
@@ -16,8 +17,8 @@
</div> </div>
</div> </div>
<div class="buttons"> <div class="buttons">
<ToolbarButton icon="icon run" on:click={onExecute}>Execute</ToolbarButton> <ToolbarButton icon="icon run" on:click={onExecute}>{_t('common.execute', { defaultMessage: 'Execute' })}</ToolbarButton>
<ToolbarButton icon="icon close" on:click={() => ($selectedMacro = null)}>Close</ToolbarButton> <ToolbarButton icon="icon close" on:click={() => ($selectedMacro = null)}>{_t('common.close', { defaultMessage: 'Close' })}</ToolbarButton>
</div> </div>
</div> </div>

View File

@@ -5,6 +5,7 @@
import WidgetTitle from '../widgets/WidgetTitle.svelte'; import WidgetTitle from '../widgets/WidgetTitle.svelte';
import MacroParameters from './MacroParameters.svelte'; import MacroParameters from './MacroParameters.svelte';
import { _t } from '../translations';
const selectedMacro = getContext('selectedMacro') as any; const selectedMacro = getContext('selectedMacro') as any;
@@ -13,23 +14,23 @@
<div class="wrapper"> <div class="wrapper">
<div class="section"> <div class="section">
<WidgetTitle>Execute</WidgetTitle> <WidgetTitle>{_t('common.execute', { defaultMessage: 'Execute' })}</WidgetTitle>
<FormStyledButton value="Execute" on:click={onExecute} /> <FormStyledButton value={_t('common.execute', { defaultMessage: 'Execute' })} on:click={onExecute} />
</div> </div>
<div class="section"> <div class="section">
<WidgetTitle>Parameters</WidgetTitle> <WidgetTitle>{_t('common.parameters', { defaultMessage: 'Parameters' })}</WidgetTitle>
{#if $selectedMacro?.args && $selectedMacro?.args?.length > 0} {#if $selectedMacro?.args && $selectedMacro?.args?.length > 0}
{#key $selectedMacro?.name} {#key $selectedMacro?.name}
<MacroParameters args={$selectedMacro?.args||[]} namePrefix={`${$selectedMacro?.name}#`} /> <MacroParameters args={$selectedMacro?.args||[]} namePrefix={`${$selectedMacro?.name}#`} />
{/key} {/key}
{:else} {:else}
<div class="m-1">This macro has no parameters</div> <div class="m-1">{_t('datagrid.macros.noParameters', { defaultMessage: 'This macro has no parameters' })}</div>
{/if} {/if}
</div> </div>
<div class="section"> <div class="section">
<WidgetTitle>Description</WidgetTitle> <WidgetTitle>{_t('common.description', { defaultMessage: 'Description' })}</WidgetTitle>
<div class="m-1">{$selectedMacro?.description}</div> <div class="m-1">{$selectedMacro?.description}</div>
</div> </div>
</div> </div>

View File

@@ -8,6 +8,7 @@
import SearchBoxWrapper from '../elements/SearchBoxWrapper.svelte'; import SearchBoxWrapper from '../elements/SearchBoxWrapper.svelte';
import SearchInput from '../elements/SearchInput.svelte'; import SearchInput from '../elements/SearchInput.svelte';
import macros from './macros'; import macros from './macros';
import { _t } from '../translations';
let filter = ''; let filter = '';
export let managerSize; export let managerSize;
@@ -16,7 +17,7 @@
<ManagerInnerContainer width={managerSize}> <ManagerInnerContainer width={managerSize}>
<SearchBoxWrapper> <SearchBoxWrapper>
<SearchInput placeholder="Search macros" bind:value={filter} /> <SearchInput placeholder={_t('datagrid.searchMacros', { defaultMessage: "Search macros"})} bind:value={filter} />
</SearchBoxWrapper> </SearchBoxWrapper>
<AppObjectList <AppObjectList
list={_.sortBy(macros, 'title').filter(x => (macroCondition ? macroCondition(x) : true))} list={_.sortBy(macros, 'title').filter(x => (macroCondition ? macroCondition(x) : true))}

View File

@@ -1,37 +1,39 @@
import { __t } from '../translations';
const macros = [ const macros = [
{ {
title: 'Remove diacritics', title: __t('datagrid.macros.removeDiacritics', { defaultMessage: 'Remove diacritics' }),
name: 'removeDiacritics', name: 'removeDiacritics',
group: 'Text', group: __t('datagrid.macros.textGroup', { defaultMessage: 'Text' }),
description: 'Removes diacritics from selected cells', description: __t('datagrid.macros.removeDiacriticsDescription', { defaultMessage: 'Removes diacritics from selected cells' }),
type: 'transformValue', type: 'transformValue',
code: `return modules.lodash.deburr(value)`, code: `return modules.lodash.deburr(value)`,
}, },
{ {
title: 'Search & replace text', title: __t('datagrid.macros.searchReplaceText', { defaultMessage: 'Search & replace text' }),
name: 'stringReplace', name: 'stringReplace',
group: 'Text', group: __t('datagrid.macros.textGroup', { defaultMessage: 'Text' }),
description: 'Search & replace text or regular expression', description: __t('datagrid.macros.searchReplaceTextDescription', { defaultMessage: 'Search & replace text or regular expression' }),
type: 'transformValue', type: 'transformValue',
args: [ args: [
{ {
type: 'text', type: 'text',
label: 'Find', label: __t('datagrid.macros.searchReplaceTextFind', { defaultMessage: 'Find' }),
name: 'find', name: 'find',
}, },
{ {
type: 'text', type: 'text',
label: 'Replace with', label: __t('datagrid.macros.searchReplaceTextReplaceWith', { defaultMessage: 'Replace with' }),
name: 'replace', name: 'replace',
}, },
{ {
type: 'checkbox', type: 'checkbox',
label: 'Case sensitive', label: __t('datagrid.macros.searchReplaceTextCaseSensitive', { defaultMessage: 'Case sensitive' }),
name: 'caseSensitive', name: 'caseSensitive',
}, },
{ {
type: 'checkbox', type: 'checkbox',
label: 'Regular expression', label: __t('datagrid.macros.searchReplaceTextIsRegex', { defaultMessage: 'Regular expression' }),
name: 'isRegex', name: 'isRegex',
}, },
], ],
@@ -42,16 +44,16 @@ return value ? value.toString().replace(new RegExp(rtext, rflags), args.replace
`, `,
}, },
{ {
title: 'Change text case', title: __t('datagrid.macros.changeTextCase', { defaultMessage: 'Change text case' }),
name: 'changeTextCase', name: 'changeTextCase',
group: 'Text', group: __t('datagrid.macros.textGroup', { defaultMessage: 'Text' }),
description: 'Uppercase, lowercase and other case functions', description: __t('datagrid.macros.changeTextCaseDescription', { defaultMessage: 'Uppercase, lowercase and other case functions' }),
type: 'transformValue', type: 'transformValue',
args: [ args: [
{ {
type: 'select', type: 'select',
options: ['toUpper', 'toLower', 'lowerCase', 'upperCase', 'kebabCase', 'snakeCase', 'camelCase', 'startCase'], options: ['toUpper', 'toLower', 'lowerCase', 'upperCase', 'kebabCase', 'snakeCase', 'camelCase', 'startCase'],
label: 'Type', label: __t('datagrid.macros.changeTextCaseType', { defaultMessage: 'Type' }),
name: 'type', name: 'type',
default: 'toUpper', default: 'toUpper',
}, },
@@ -59,81 +61,81 @@ return value ? value.toString().replace(new RegExp(rtext, rflags), args.replace
code: `return modules.lodash[args.type](value)`, code: `return modules.lodash[args.type](value)`,
}, },
{ {
title: 'Pad left', title: __t('datagrid.macros.padLeft', { defaultMessage: 'Pad left' }),
name: 'padLeft', name: 'padLeft',
group: 'Text', group: __t('datagrid.macros.textGroup', { defaultMessage: 'Text' }),
args: [ args: [
{ {
type: 'text', type: 'text',
label: 'Character', label: __t('datagrid.macros.padCharacter', { defaultMessage: 'Character' }),
name: 'character', name: 'character',
default: '0', default: '0',
}, },
{ {
type: 'text', type: 'text',
label: 'Length', label: __t('datagrid.macros.padLength', { defaultMessage: 'Length' }),
name: 'length', name: 'length',
default: '3', default: '3',
}, },
], ],
description: description:
'Returns string of a specified length in which the beginning of the current string is padded with spaces or other character', __t('datagrid.macros.padLeftDescription', { defaultMessage: 'Returns string of a specified length in which the beginning of the current string is padded with spaces or other character' }),
type: 'transformValue', type: 'transformValue',
code: `return modules.lodash.padStart(value, +args.length, args.character)`, code: `return modules.lodash.padStart(value, +args.length, args.character)`,
}, },
{ {
title: 'Pad right', title: __t('datagrid.macros.padRight', { defaultMessage: 'Pad right' }),
name: 'padRight', name: 'padRight',
group: 'Text', group: __t('datagrid.macros.textGroup', { defaultMessage: 'Text' }),
args: [ args: [
{ {
type: 'text', type: 'text',
label: 'Character', label: __t('datagrid.macros.padCharacter', { defaultMessage: 'Character' }),
name: 'character', name: 'character',
default: '0', default: '0',
}, },
{ {
type: 'text', type: 'text',
label: 'Length', label: __t('datagrid.macros.padLength', { defaultMessage: 'Length' }),
name: 'length', name: 'length',
default: '3', default: '3',
}, },
], ],
description: description:
'Returns string of a specified length in which the end of the current string is padded with spaces or other character', __t('datagrid.macros.padRightDescription', { defaultMessage: 'Returns string of a specified length in which the end of the current string is padded with spaces or other character' }),
type: 'transformValue', type: 'transformValue',
code: `return modules.lodash.padEnd(value, +args.length, args.character)`, code: `return modules.lodash.padEnd(value, +args.length, args.character)`,
}, },
{ {
title: 'Trim', title: __t('datagrid.macros.trim', { defaultMessage: 'Trim' }),
name: 'trim', name: 'trim',
group: 'Text', group: __t('datagrid.macros.textGroup', { defaultMessage: 'Text' }),
description: 'Removes leading and trailing whitespace ', description: __t('datagrid.macros.trimDescription', { defaultMessage: 'Removes leading and trailing whitespace' }),
type: 'transformValue', type: 'transformValue',
code: `return modules.lodash.trim(value)`, code: `return modules.lodash.trim(value)`,
}, },
{ {
title: 'Row index', title: __t('datagrid.macros.rowIndex', { defaultMessage: 'Row index' }),
name: 'rowIndex', name: 'rowIndex',
group: 'Tools', group: __t('datagrid.macros.toolsGroup', { defaultMessage: 'Tools' }),
description: 'Index of row from 1 (autoincrement)', description: __t('datagrid.macros.rowIndexDescription', { defaultMessage: 'Index of row from 1 (autoincrement)' }),
type: 'transformValue', type: 'transformValue',
code: `return rowIndex + 1`, code: `return rowIndex + 1`,
}, },
{ {
title: 'Generate UUID', title: __t('datagrid.macros.generateUUID', { defaultMessage: 'Generate UUID' }),
name: 'uuidv1', name: 'uuidv1',
group: 'Tools', group: __t('datagrid.macros.toolsGroup', { defaultMessage: 'Tools' }),
description: 'Generate unique identifier', description: __t('datagrid.macros.generateUUIDDescription', { defaultMessage: 'Generate unique identifier' }),
type: 'transformValue', type: 'transformValue',
args: [ args: [
{ {
type: 'select', type: 'select',
options: [ options: [
{ value: 'uuidv1', name: 'V1 - from timestamp' }, { value: 'uuidv1', name: 'V1 - from timestamp' },
{ value: 'uuidv4', name: 'V4 - random generated' }, { value: 'uuidv4', name: 'V4 - random generated'},
], ],
label: 'Version', label: __t('datagrid.macros.version', { defaultMessage: 'Version' }),
name: 'version', name: 'version',
default: 'uuidv1', default: 'uuidv1',
}, },
@@ -141,26 +143,26 @@ return value ? value.toString().replace(new RegExp(rtext, rflags), args.replace
code: `return modules[args.version]()`, code: `return modules[args.version]()`,
}, },
{ {
title: 'Convert to integer', title: __t('datagrid.macros.toInt', { defaultMessage: 'Convert to integer' }),
name: 'toInt', name: 'toInt',
group: 'Tools', group: __t('datagrid.macros.toolsGroup', { defaultMessage: 'Tools' }),
description: 'Converts to integral number', description: __t('datagrid.macros.toIntDescription', { defaultMessage: 'Converts to integral number' }),
type: 'transformValue', type: 'transformValue',
code: `return modules.lodash.isNaN(parseInt(value)) ? null : parseInt(value)`, code: `return modules.lodash.isNaN(parseInt(value)) ? null : parseInt(value)`,
}, },
{ {
title: 'Convert to number', title: __t('datagrid.macros.toNumber', { defaultMessage: 'Convert to number' }),
name: 'toNumber', name: 'toNumber',
group: 'Tools', group: __t('datagrid.macros.toolsGroup', { defaultMessage: 'Tools' }),
description: 'Converts to number', description: __t('datagrid.macros.toNumberDescription', { defaultMessage: 'Converts to number' }),
type: 'transformValue', type: 'transformValue',
code: `return modules.lodash.isNaN(parseFloat(value)) ? null : parseFloat(value)`, code: `return modules.lodash.isNaN(parseFloat(value)) ? null : parseFloat(value)`,
}, },
{ {
title: 'Convert to boolean', title: __t('datagrid.macros.toBoolean', { defaultMessage: 'Convert to boolean' }),
name: 'toBoolean', name: 'toBoolean',
group: 'Tools', group: __t('datagrid.macros.toolsGroup', { defaultMessage: 'Tools' }),
description: 'Converts to boolean', description: __t('datagrid.macros.toBooleanDescription', { defaultMessage: 'Converts to boolean' }),
type: 'transformValue', type: 'transformValue',
code: ` code: `
if (modules.lodash.isString(value)) { if (modules.lodash.isString(value)) {
@@ -176,10 +178,10 @@ return !!value;
`, `,
}, },
{ {
title: 'Convert to string', title: __t('datagrid.macros.toString', { defaultMessage: 'Convert to string' }),
name: 'toString', name: 'toString',
group: 'Tools', group: __t('datagrid.macros.toolsGroup', { defaultMessage: 'Tools' }),
description: 'Converts to string', description: __t('datagrid.macros.toStringDescription', { defaultMessage: 'Converts to string' }),
type: 'transformValue', type: 'transformValue',
code: ` code: `
if (value==null) return null; if (value==null) return null;
@@ -188,15 +190,15 @@ return !!value;
`, `,
}, },
{ {
title: 'Current date', title: __t('datagrid.macros.currentDate', { defaultMessage: 'Current date' }),
name: 'currentDate', name: 'currentDate',
group: 'Tools', group: __t('datagrid.macros.toolsGroup', { defaultMessage: 'Tools' }),
description: 'Gets current date', description: __t('datagrid.macros.currentDateDescription', { defaultMessage: 'Gets current date' }),
type: 'transformValue', type: 'transformValue',
args: [ args: [
{ {
type: 'text', type: 'text',
label: 'Format', label: __t('datagrid.macros.format', { defaultMessage: 'Format' }),
name: 'format', name: 'format',
default: 'YYYY-MM-DD HH:mm:ss', default: 'YYYY-MM-DD HH:mm:ss',
}, },
@@ -204,10 +206,10 @@ return !!value;
code: `return modules.moment().format(args.format)`, code: `return modules.moment().format(args.format)`,
}, },
{ {
title: 'Duplicate columns', title: __t('datagrid.macros.duplicateColumns', { defaultMessage: 'Duplicate columns' }),
name: 'duplicateColumns', name: 'duplicateColumns',
group: 'Tools', group: __t('datagrid.macros.toolsGroup', { defaultMessage: 'Tools' }),
description: 'Duplicate selected columns', description: __t('datagrid.macros.duplicateColumnsDescription', { defaultMessage: 'Duplicate selected columns' }),
type: 'transformRow', type: 'transformRow',
code: ` code: `
return { return {
@@ -218,22 +220,22 @@ return !!value;
args: [ args: [
{ {
type: 'text', type: 'text',
label: 'Prefix', label: __t('datagrid.macros.prefix', { defaultMessage: 'Prefix' }),
name: 'prefix', name: 'prefix',
}, },
{ {
type: 'text', type: 'text',
label: 'Postfix', label: __t('datagrid.macros.postfix', { defaultMessage: 'Postfix' }),
name: 'postfix', name: 'postfix',
default: '_copy', default: '_copy',
}, },
], ],
}, },
{ {
title: 'Split columns', title: __t('datagrid.macros.splitColumns', { defaultMessage: 'Split columns' }),
name: 'splitColumns', name: 'splitColumns',
group: 'Tools', group: __t('datagrid.macros.toolsGroup', { defaultMessage: 'Tools' }),
description: 'Split selected columns', description: __t('datagrid.macros.splitColumnsDescription', { defaultMessage: 'Split selected columns' }),
type: 'transformRow', type: 'transformRow',
code: ` code: `
const res = {...row}; const res = {...row};
@@ -252,22 +254,22 @@ return !!value;
args: [ args: [
{ {
type: 'text', type: 'text',
label: 'Delimiter', label: __t('datagrid.macros.delimiter', { defaultMessage: 'Delimiter' }),
name: 'delimiter', name: 'delimiter',
default: ',', default: ',',
}, },
], ],
}, },
{ {
title: 'Calculation', title: __t('datagrid.macros.calculation', { defaultMessage: 'Calculation' }),
name: 'calculation', name: 'calculation',
group: 'Tools', group: __t('datagrid.macros.toolsGroup', { defaultMessage: 'Tools' }),
description: 'Custom expression. Use row.column_name for accessing column values, value for original value', description: __t('datagrid.macros.calculationDescription', { defaultMessage: 'Custom expression. Use row.column_name for accessing column values, value for original value' }),
type: 'transformValue', type: 'transformValue',
args: [ args: [
{ {
type: 'text', type: 'text',
label: 'Expression', label: __t('datagrid.macros.expression', { defaultMessage: 'Expression' }),
name: 'expression', name: 'expression',
default: 'value', default: 'value',
}, },
@@ -275,10 +277,10 @@ return !!value;
code: `return eval(args.expression);`, code: `return eval(args.expression);`,
}, },
{ {
title: 'Extract date fields', title: __t('datagrid.macros.extractDateFields', { defaultMessage: 'Extract date fields' }),
name: 'extractDateFields', name: 'extractDateFields',
group: 'Tools', group: __t('datagrid.macros.toolsGroup', { defaultMessage: 'Tools' }),
description: 'Extract yaear, month, day and other date/time fields from selection and adds it as new columns', description: __t('datagrid.macros.extractDateFieldsDescription', { defaultMessage: 'Extract year, month, day and other date/time fields from selection and adds it as new columns' }),
type: 'transformRow', type: 'transformRow',
code: ` code: `
let mom = null; let mom = null;
@@ -311,37 +313,37 @@ return !!value;
args: [ args: [
{ {
type: 'text', type: 'text',
label: 'Year name', label: __t('datagrid.macros.yearName', { defaultMessage: 'Year name' }),
name: 'year', name: 'year',
default: 'year', default: 'year',
}, },
{ {
type: 'text', type: 'text',
label: 'Month name', label: __t('datagrid.macros.monthName', { defaultMessage: 'Month name' }) ,
name: 'month', name: 'month',
default: 'month', default: 'month',
}, },
{ {
type: 'text', type: 'text',
label: 'Day name', label: __t('datagrid.macros.dayName', { defaultMessage: 'Day name' }),
name: 'day', name: 'day',
default: 'day', default: 'day',
}, },
{ {
type: 'text', type: 'text',
label: 'Hour name', label: __t('datagrid.macros.hourName', { defaultMessage: 'Hour name' }),
name: 'hour', name: 'hour',
default: 'hour', default: 'hour',
}, },
{ {
type: 'text', type: 'text',
label: 'Minute name', label: __t('datagrid.macros.minuteName', { defaultMessage: 'Minute name' }),
name: 'minute', name: 'minute',
default: 'minute', default: 'minute',
}, },
{ {
type: 'text', type: 'text',
label: 'Second name', label: __t('datagrid.macros.secondName', { defaultMessage: 'Second name' }),
name: 'second', name: 'second',
default: 'second', default: 'second',
}, },

View File

@@ -9,6 +9,8 @@
import ModalBase from './ModalBase.svelte'; import ModalBase from './ModalBase.svelte';
import { closeCurrentModal } from './modalTools'; import { closeCurrentModal } from './modalTools';
import { commandsCustomized } from '../stores'; import { commandsCustomized } from '../stores';
import { _t } from '../translations';
import _ from 'lodash';
export let tabs; export let tabs;
export let onConfirm; export let onConfirm;
@@ -27,10 +29,10 @@
<FormProvider> <FormProvider>
<ModalBase {...$$restProps}> <ModalBase {...$$restProps}>
<svelte:fragment slot="header">Confirm close tabs</svelte:fragment> <svelte:fragment slot="header">{_t('datagrid.closeTabs.header', { defaultMessage: 'Confirm close tabs' })}</svelte:fragment>
<div> <div>
Following files are modified, really close tabs? After closing, you could reopen them in history {_t('datagrid.closeTabs.modifiedFiles', { defaultMessage: 'Following files are modified, really close tabs? After closing, you could reopen them in history' })}
<FontIcon icon="icon history" /> <FontIcon icon="icon history" />
widget widget
</div> </div>
@@ -41,7 +43,7 @@
<svelte:fragment slot="footer"> <svelte:fragment slot="footer">
<FormSubmit <FormSubmit
value="Close tabs" value={_t('datagrid.closeTabs.close', { defaultMessage: 'Close tabs' })}
on:click={() => { on:click={() => {
closeCurrentModal(); closeCurrentModal();
onConfirm(); onConfirm();
@@ -49,7 +51,7 @@
/> />
<FormStyledButton <FormStyledButton
type="button" type="button"
value="Cancel" value={_t('common.cancel', { defaultMessage: 'Cancel' })}
on:click={() => { on:click={() => {
closeCurrentModal(); closeCurrentModal();
onCancel(); onCancel();

View File

@@ -11,6 +11,7 @@
import KeyboardModal from './KeyboardModal.svelte'; import KeyboardModal from './KeyboardModal.svelte';
import ModalBase from './ModalBase.svelte'; import ModalBase from './ModalBase.svelte';
import { closeCurrentModal, showModal } from './modalTools'; import { closeCurrentModal, showModal } from './modalTools';
import { _t } from '../translations';
export let command; export let command;
@@ -23,16 +24,16 @@
<FormProviderCore {values}> <FormProviderCore {values}>
<ModalBase {...$$restProps}> <ModalBase {...$$restProps}>
<svelte:fragment slot="header">Configure commmand</svelte:fragment> <svelte:fragment slot="header">{_t('commandModal.configure', { defaultMessage: 'Configure command' })}</svelte:fragment>
<FormTextField label="Category" name="category" disabled /> <FormTextField label={_t('commandModal.category', { defaultMessage: 'Category' })} name="category" disabled />
<FormTextField label="Name" name="name" disabled /> <FormTextField label={_t('commandModal.name', { defaultMessage: 'Name' })} name="name" disabled />
<div class="row"> <div class="row">
<FormTextField label="Keyboard shortcut" name="keyText" templateProps={{ noMargin: true }} focused /> <FormTextField label={_t('commandModal.keyboardShortcut', { defaultMessage: 'Keyboard shortcut' })} name="keyText" templateProps={{ noMargin: true }} focused />
<FormStyledButton <FormStyledButton
type="button" type="button"
value="Keyboard" value={_t('commandModal.keyboard', { defaultMessage: 'Keyboard' })}
on:click={handleKeyboard} on:click={handleKeyboard}
data-testid="CommandModal_keyboardButton" data-testid="CommandModal_keyboardButton"
/> />
@@ -56,7 +57,7 @@
/> />
<FormStyledButton <FormStyledButton
type="button" type="button"
value="Reset" value={_t('common.reset', { defaultMessage: 'Reset' })}
on:click={() => { on:click={() => {
closeCurrentModal(); closeCurrentModal();
apiCall('config/update-settings', { apiCall('config/update-settings', {
@@ -64,7 +65,7 @@
}); });
}} }}
/> />
<FormStyledButton type="button" value="Close" on:click={closeCurrentModal} /> <FormStyledButton type="button" value={_t('common.close', { defaultMessage: 'Close' })} on:click={closeCurrentModal} />
</svelte:fragment> </svelte:fragment>
</ModalBase> </ModalBase>
</FormProviderCore> </FormProviderCore>

View File

@@ -13,6 +13,7 @@
import { parseCellValue, safeJsonParse, stringifyCellValue } from 'dbgate-tools'; import { parseCellValue, safeJsonParse, stringifyCellValue } from 'dbgate-tools';
import { showSnackbarError } from '../utility/snackbar'; import { showSnackbarError } from '../utility/snackbar';
import ErrorMessageModal from './ErrorMessageModal.svelte'; import ErrorMessageModal from './ErrorMessageModal.svelte';
import { _t } from '../translations';
export let onSave; export let onSave;
export let value; export let value;
@@ -49,14 +50,14 @@
if (parsed) { if (parsed) {
textValue = JSON.stringify(parsed, null, 2); textValue = JSON.stringify(parsed, null, 2);
} else { } else {
showModal(ErrorMessageModal, { message: 'Not valid JSON' }); showModal(ErrorMessageModal, { message: _t('dataGrid.formatJson.invalid', { defaultMessage: 'Not valid JSON' }) });
} }
} }
</script> </script>
<FormProvider> <FormProvider>
<ModalBase {...$$restProps}> <ModalBase {...$$restProps}>
<div slot="header">Edit cell value</div> <div slot="header">{_t('dataGrid.editCellValue', { defaultMessage: 'Edit cell value' })}</div>
<div class="editor"> <div class="editor">
<AceEditor bind:value={textValue} bind:this={editor} onKeyDown={handleKeyDown} mode={syntaxMode} /> <AceEditor bind:value={textValue} bind:this={editor} onKeyDown={handleKeyDown} mode={syntaxMode} />
@@ -72,21 +73,21 @@
closeCurrentModal(); closeCurrentModal();
}} }}
/> />
<FormStyledButton type="button" value="Cancel" on:click={closeCurrentModal} /> <FormStyledButton type="button" value={_t('common.cancel', { defaultMessage: 'Cancel' })} on:click={closeCurrentModal} />
</div> </div>
<div> <div>
<FormStyledButton type="button" value="Format JSON" on:click={handleFormatJson} /> <FormStyledButton type="button" skipWidth={true} value={_t('dataGrid.formatJson', { defaultMessage: 'Format JSON' })} on:click={handleFormatJson} />
Code highlighting: {_t('dataGrid.codeHighlighting', { defaultMessage: 'Code highlighting:' })}
<SelectField <SelectField
isNative isNative
value={syntaxMode} value={syntaxMode}
on:change={e => (syntaxMode = e.detail)} on:change={e => (syntaxMode = e.detail)}
options={[ options={[
{ value: 'text', label: 'None (raw text)' }, { value: 'text', label: _t('dataGrid.codeHighlighting.none', { defaultMessage: 'None (raw text)' }) },
{ value: 'json', label: 'JSON' }, { value: 'json', label: 'JSON' },
{ value: 'html', label: 'HTML' }, { value: 'html', label: 'HTML'},
{ value: 'xml', label: 'XML' }, { value: 'xml', label: 'XML' },
]} ]}
/> />

View File

@@ -6,8 +6,9 @@
import ModalBase from './ModalBase.svelte'; import ModalBase from './ModalBase.svelte';
import { closeCurrentModal } from './modalTools'; import { closeCurrentModal } from './modalTools';
import { _t } from '../translations';
export let title = 'Error'; export let title = _t('common.error', { defaultMessage: 'Error' });
export let message; export let message;
export let showAsCode = false; export let showAsCode = false;
</script> </script>
@@ -30,7 +31,7 @@
{/if} {/if}
<div slot="footer"> <div slot="footer">
<FormSubmit value="Close" on:click={closeCurrentModal} data-testid="ErrorMessageModal_closeButton" /> <FormSubmit value={_t('common.close', { defaultMessage: 'Close' })} on:click={closeCurrentModal} data-testid="ErrorMessageModal_closeButton" />
</div> </div>
</ModalBase> </ModalBase>
</FormProvider> </FormProvider>

View File

@@ -6,6 +6,7 @@
import FormTextField from '../forms/FormTextField.svelte'; import FormTextField from '../forms/FormTextField.svelte';
import ModalBase from './ModalBase.svelte'; import ModalBase from './ModalBase.svelte';
import { closeCurrentModal } from './modalTools'; import { closeCurrentModal } from './modalTools';
import { _t } from '../translations';
export let header; export let header;
export let value; export let value;
@@ -29,7 +30,7 @@
<svelte:fragment slot="footer"> <svelte:fragment slot="footer">
<FormSubmit value="OK" on:click={e => handleSubmit(e.detail)} data-testid="InputTextModal_ok" /> <FormSubmit value="OK" on:click={e => handleSubmit(e.detail)} data-testid="InputTextModal_ok" />
<FormStyledButton type="button" value="Cancel" on:click={closeCurrentModal} data-testid="InputTextModal_cancel" /> <FormStyledButton type="button" value={_t('common.cancel', { defaultMessage: 'Cancel' })} on:click={closeCurrentModal} data-testid="InputTextModal_cancel" />
</svelte:fragment> </svelte:fragment>
</ModalBase> </ModalBase>
</FormProvider> </FormProvider>

View File

@@ -5,6 +5,7 @@
import keycodes from '../utility/keycodes'; import keycodes from '../utility/keycodes';
import ModalBase from './ModalBase.svelte'; import ModalBase from './ModalBase.svelte';
import { closeCurrentModal } from './modalTools'; import { closeCurrentModal } from './modalTools';
import { _t } from '../translations';
export let onChange; export let onChange;
let value; let value;
@@ -38,7 +39,7 @@
</script> </script>
<ModalBase {...$$restProps} simple> <ModalBase {...$$restProps} simple>
<div class="mb-2">Show desired key combination and press ENTER</div> <div class="mb-2">_{_t('commandModal.showKeyCombination', { defaultMessage: 'Show desired key combination and press ENTER' })}</div>
<div class="largeFormMarker"> <div class="largeFormMarker">
<TextField on:keydown={handleKeyDown} bind:value focused /> <TextField on:keydown={handleKeyDown} bind:value focused />
</div> </div>

View File

@@ -10,6 +10,7 @@
import ErrorMessageModal from './ErrorMessageModal.svelte'; import ErrorMessageModal from './ErrorMessageModal.svelte';
import ModalBase from './ModalBase.svelte'; import ModalBase from './ModalBase.svelte';
import { closeCurrentModal, showModal } from './modalTools'; import { closeCurrentModal, showModal } from './modalTools';
import { _t } from '../translations';
export let driver; export let driver;
export let dbid; export let dbid;
@@ -44,14 +45,14 @@
<FormProvider initialValues={{ name: '' }}> <FormProvider initialValues={{ name: '' }}>
<ModalBase {...$$restProps}> <ModalBase {...$$restProps}>
<svelte:fragment slot="header"> <svelte:fragment slot="header">
Create {driver?.collectionSingularLabel ?? 'collection/container'} {_t('dbObject.createCollection', { defaultMessage: 'Create collection/container'})}
</svelte:fragment> </svelte:fragment>
<FormArgumentList args={driver?.newCollectionFormParams} /> <FormArgumentList args={driver?.newCollectionFormParams} />
<svelte:fragment slot="footer"> <svelte:fragment slot="footer">
<FormSubmit value="OK" on:click={e => handleSubmit(e.detail)} disabled={isSaving} /> <FormSubmit value="OK" on:click={e => handleSubmit(e.detail)} disabled={isSaving} />
<FormStyledButton type="button" value="Cancel" on:click={closeCurrentModal} /> <FormStyledButton type="button" value={_t('common.cancel', { defaultMessage: 'Cancel' })} on:click={closeCurrentModal} />
</svelte:fragment> </svelte:fragment>
</ModalBase> </ModalBase>
</FormProvider> </FormProvider>

View File

@@ -7,6 +7,7 @@
import { isProApp } from '../utility/proTools'; import { isProApp } from '../utility/proTools';
import ModalBase from './ModalBase.svelte'; import ModalBase from './ModalBase.svelte';
import { closeCurrentModal } from './modalTools'; import { closeCurrentModal } from './modalTools';
import { _t } from '../translations';
export let multiTabIndex = undefined; export let multiTabIndex = undefined;
@@ -14,8 +15,8 @@
{ {
icon: 'icon sql-file', icon: 'icon sql-file',
colorClass: 'color-icon-blue', colorClass: 'color-icon-blue',
title: 'Query', title: _t('common.query', { defaultMessage: 'Query' }),
description: 'SQL query editor', description: _t('common.queryEditor', { defaultMessage: 'SQL query editor' }),
action: () => { action: () => {
newQuery({ multiTabIndex }); newQuery({ multiTabIndex });
}, },
@@ -25,47 +26,47 @@
{ {
icon: 'icon connection', icon: 'icon connection',
colorClass: 'color-icon-yellow', colorClass: 'color-icon-yellow',
title: 'Connection', title: _t('common.connection', { defaultMessage: 'Connection' }),
description: 'Database connection stored locally', description: _t('newObject.connectionLocal', { defaultMessage: 'Database connection stored locally' }),
command: 'new.connection', command: 'new.connection',
changeWidget: 'database', changeWidget: 'database',
testid: 'NewObjectModal_connection', testid: 'NewObjectModal_connection',
disabledMessage: 'You are not allowed to create new connections', disabledMessage: _t('newObject.connectionLocalDisabled', { defaultMessage: 'You are not allowed to create new connections' }),
}, },
{ {
icon: 'icon cloud-connection', icon: 'icon cloud-connection',
colorClass: 'color-icon-blue', colorClass: 'color-icon-blue',
title: 'Connection on Cloud', title: _t('common.connectionOnCloud', { defaultMessage: 'Connection on Cloud' }),
description: 'Database connection stored on DbGate Cloud', description: _t('newObject.connectionOnCloudDescription', { defaultMessage: 'Database connection stored on DbGate Cloud' }),
command: 'new.connectionOnCloud', command: 'new.connectionOnCloud',
changeWidget: 'cloud-private', changeWidget: 'cloud-private',
testid: 'NewObjectModal_connectionOnCloud', testid: 'NewObjectModal_connectionOnCloud',
disabledMessage: 'For creating connections on DbGate Cloud, you need to be logged in', disabledMessage: _t('newObject.connectionOnCloudDisabled', { defaultMessage: 'For creating connections on DbGate Cloud, you need to be logged in' }),
}, },
{ {
icon: 'icon query-design', icon: 'icon query-design',
colorClass: 'color-icon-red', colorClass: 'color-icon-red',
title: 'Query Designer', title: _t('common.queryDesigner', { defaultMessage: 'Query Designer' }),
description: 'Design SQL queries visually', description: _t('newObject.queryDesignerDescription', { defaultMessage: 'Design SQL queries visually' }),
command: 'new.queryDesign', command: 'new.queryDesign',
testid: 'NewObjectModal_queryDesign', testid: 'NewObjectModal_queryDesign',
disabledMessage: 'Query Designer is not available for current database', disabledMessage: _t('newObject.queryDesignerDisabled', { defaultMessage: 'Query Designer is not available for current database' }),
isProFeature: true, isProFeature: true,
}, },
{ {
icon: 'icon diagram', icon: 'icon diagram',
colorClass: 'color-icon-blue', colorClass: 'color-icon-blue',
title: 'ER Diagram', title: _t('common.erDiagram', { defaultMessage: 'ER Diagram' }),
description: 'Visualize database structure', description: _t('newObject.erDiagramDescription', { defaultMessage: 'Visualize database structure' }),
command: 'new.diagram', command: 'new.diagram',
testid: 'NewObjectModal_diagram', testid: 'NewObjectModal_diagram',
disabledMessage: 'ER Diagram is not available for current database', disabledMessage: _t('newObject.erDiagramDisabled', { defaultMessage: 'ER Diagram is not available for current database' }),
}, },
{ {
icon: 'icon perspective', icon: 'icon perspective',
colorClass: 'color-icon-yellow', colorClass: 'color-icon-yellow',
title: 'Perspective', title: _t('common.perspective', { defaultMessage: 'Perspective' }),
description: 'Join complex data from multiple databases', description: _t('newObject.perspectiveDescription', { defaultMessage: 'Join complex data from multiple databases' }),
command: 'new.perspective', command: 'new.perspective',
testid: 'NewObjectModal_perspective', testid: 'NewObjectModal_perspective',
isProFeature: true, isProFeature: true,
@@ -73,55 +74,56 @@
{ {
icon: 'icon table', icon: 'icon table',
colorClass: 'color-icon-blue', colorClass: 'color-icon-blue',
title: 'Table', title: _t('common.table', { defaultMessage: 'Table' }),
description: 'Create table in the current database', description: _t('newObject.tableDescription', { defaultMessage: 'Create table in the current database' }),
command: 'new.table', command: 'new.table',
testid: 'NewObjectModal_table', testid: 'NewObjectModal_table',
disabledMessage: 'Table creation is not available for current database', disabledMessage: _t('newObject.tableDisabled', { defaultMessage: 'Table creation is not available for current database' }),
}, },
{ {
icon: 'icon sql-generator', icon: 'icon sql-generator',
colorClass: 'color-icon-green', colorClass: 'color-icon-green',
title: 'SQL Generator', title: _t('common.sqlGenerator', { defaultMessage: 'SQL Generator' }),
description: 'Generate SQL scripts for database objects', description: _t('newObject.sqlGeneratorDescription', { defaultMessage: 'Generate SQL scripts for database objects' }),
command: 'sql.generator', command: 'sql.generator',
testid: 'NewObjectModal_sqlGenerator', testid: 'NewObjectModal_sqlGenerator',
disabledMessage: 'SQL Generator is not available for current database', disabledMessage: _t('newObject.sqlGeneratorDisabled', { defaultMessage: 'SQL Generator is not available for current database' }),
}, },
{ {
icon: 'icon export', icon: 'icon export',
colorClass: 'color-icon-green', colorClass: 'color-icon-green',
title: 'Export database', title: _t('common.exportDatabase', { defaultMessage: 'Export database' }),
description: 'Export to file like CSV, JSON, Excel, or other DB', description: _t('newObject.exportDescription', { defaultMessage: 'Export to file like CSV, JSON, Excel, or other DB' }),
command: 'database.export', command: 'database.export',
isProFeature: true,
testid: 'NewObjectModal_databaseExport', testid: 'NewObjectModal_databaseExport',
disabledMessage: 'Export is not available for current database', disabledMessage: _t('newObject.exportDisabled', { defaultMessage: 'Export is not available for current database' }),
}, },
{ {
icon: 'icon compare', icon: 'icon compare',
colorClass: 'color-icon-red', colorClass: 'color-icon-red',
title: 'Compare database', title: _t('common.compare', { defaultMessage: 'Compare database' }),
description: 'Compare database schemas', description: _t('newObject.compareDescription', { defaultMessage: 'Compare database schemas' }),
command: 'database.compare', command: 'database.compare',
testid: 'NewObjectModal_databaseCompare', testid: 'NewObjectModal_databaseCompare',
disabledMessage: 'Database comparison is not available for current database', disabledMessage: _t('newObject.compareDisabled', { defaultMessage: 'Database comparison is not available for current database' }),
isProFeature: true, isProFeature: true,
}, },
{ {
icon: 'icon ai', icon: 'icon ai',
colorClass: 'color-icon-blue', colorClass: 'color-icon-blue',
title: 'Database Chat', title: _t('common.databaseChat', { defaultMessage: 'Database Chat' }),
description: 'Chat with your database using AI', description: _t('newObject.databaseChatDescription', { defaultMessage: 'Chat with your database using AI' }),
command: 'database.chat', command: 'database.chat',
isProFeature: true, isProFeature: true,
disabledMessage: 'Database chat is not available for current database', disabledMessage: _t('newObject.databaseChatDisabled', { defaultMessage: 'Database chat is not available for current database' }),
testid: 'NewObjectModal_databaseChat', testid: 'NewObjectModal_databaseChat',
}, },
]; ];
</script> </script>
<ModalBase simplefix {...$$restProps}> <ModalBase simplefix {...$$restProps}>
<div class="create-header">Create new</div> <div class="create-header">{_t('common.createNew', { defaultMessage: 'Create new' })}</div>
<div class="wrapper"> <div class="wrapper">
{#each NEW_ITEMS as item} {#each NEW_ITEMS as item}
{@const enabled = item.command {@const enabled = item.command

View File

@@ -10,6 +10,7 @@
import { closeCurrentModal } from './modalTools'; import { closeCurrentModal } from './modalTools';
import FormRadioGroupItem from '../forms/FormRadioGroupItem.svelte'; import FormRadioGroupItem from '../forms/FormRadioGroupItem.svelte';
import FormValues from '../forms/FormValues.svelte'; import FormValues from '../forms/FormValues.svelte';
import { _t } from '../translations';
export let condition1; export let condition1;
export let onFilter; export let onFilter;
@@ -44,10 +45,10 @@
<FormProvider initialValues={{ condition1, condition2: '=', joinOperator: ' ' }} template={FormFieldTemplateLarge}> <FormProvider initialValues={{ condition1, condition2: '=', joinOperator: ' ' }} template={FormFieldTemplateLarge}>
<ModalBase {...$$restProps}> <ModalBase {...$$restProps}>
<div slot="header">Set filter</div> <div slot="header">{_t('filter.setFilter', {defaultMessage: 'Set filter'})}</div>
<div class="largeFormMarker"> <div class="largeFormMarker">
<div class="row">Show rows where</div> <div class="row">{_t('filter.showRowsWhere', {defaultMessage: 'Show rows where'})}</div>
<div class="row"> <div class="row">
<div class="col-6 mr-1"> <div class="col-6 mr-1">
<SetFilterModal_Select {filterBehaviour} name="condition1" /> <SetFilterModal_Select {filterBehaviour} name="condition1" />
@@ -62,9 +63,9 @@
</div> </div>
<div class="row"> <div class="row">
<FormRadioGroupItem name="joinOperator" value=" " text="And" /> <FormRadioGroupItem name="joinOperator" value=" " text={_t('filter.and', {defaultMessage: 'And'})} />
{#if !filterBehaviour.disableOr} {#if !filterBehaviour.disableOr}
<FormRadioGroupItem name="joinOperator" value="," text="Or" /> <FormRadioGroupItem name="joinOperator" value="," text={_t('filter.or', {defaultMessage: 'Or'})} />
{/if} {/if}
</div> </div>
@@ -84,7 +85,7 @@
<div slot="footer"> <div slot="footer">
<FormSubmit value="OK" on:click={handleOk} /> <FormSubmit value="OK" on:click={handleOk} />
<FormButton type="button" value="Close" on:click={closeCurrentModal} /> <FormButton type="button" value={_t('common.close', {defaultMessage: 'Close'})} on:click={closeCurrentModal} />
</div> </div>
</ModalBase> </ModalBase>
</FormProvider> </FormProvider>

View File

@@ -1,56 +1,57 @@
<script lang="ts"> <script lang="ts">
import _ from 'lodash';
import FormSelectFieldRaw from '../forms/FormSelectFieldRaw.svelte'; import FormSelectFieldRaw from '../forms/FormSelectFieldRaw.svelte';
import { _t } from '../translations';
export let name; export let name;
export let filterBehaviour; export let filterBehaviour;
function getOptions() { function getOptions() {
const res = []; const res = [];
if (filterBehaviour.supportEquals) { if (filterBehaviour.supportEquals) {
res.push({ value: '=', label: 'equals' }, { value: '<>', label: 'does not equal' }); res.push({ value: '=', label: _t('filter.modal.equals', {defaultMessage: 'equals'}) }, { value: '<>', label: _t('filter.modal.doesNotEqual', {defaultMessage: 'does not equal'}) });
} };
if (filterBehaviour.supportStringInclusion) { if (filterBehaviour.supportStringInclusion) {
res.push( res.push(
{ value: '+', label: 'contains' }, { value: '+', label: _t('filter.modal.contains', {defaultMessage: 'contains'}) },
{ value: '~', label: 'does not contain' }, { value: '~', label: _t('filter.modal.doesNotContain', {defaultMessage: 'does not contain'}) },
{ value: '^', label: 'begins with' }, { value: '^', label: _t('filter.modal.beginsWith', {defaultMessage: 'begins with'}) },
{ value: '!^', label: 'does not begin with' }, { value: '!^', label: _t('filter.modal.doesNotBeginWith', {defaultMessage: 'does not begin with'}) },
{ value: '$', label: 'ends with' }, { value: '$', label: _t('filter.modal.endsWith', {defaultMessage: 'ends with'}) },
{ value: '!$', label: 'does not end with' } { value: '!$', label: _t('filter.modal.doesNotEndWith', {defaultMessage: 'does not end with'}) }
); );
} }
if (filterBehaviour.supportNumberLikeComparison) { if (filterBehaviour.supportNumberLikeComparison) {
res.push( res.push(
{ value: '<', label: 'is smaller' }, { value: '<', label: _t('filter.isSmaller', {defaultMessage: 'is smaller'}) },
{ value: '>', label: 'is greater' }, { value: '>', label: _t('filter.isGreater', {defaultMessage: 'is greater'}) },
{ value: '<=', label: 'is smaller or equal' }, { value: '<=', label: _t('filter.isSmallerOrEqual', {defaultMessage: 'is smaller or equal'}) },
{ value: '>=', label: 'is greater or equal' } { value: '>=', label: _t('filter.isGreaterOrEqual', {defaultMessage: 'is greater or equal'}) }
); );
} }
if (filterBehaviour.supportDatetimeComparison) { if (filterBehaviour.supportDatetimeComparison) {
res.push( res.push(
{ value: '<', label: 'is before' }, { value: '<', label: _t('filter.isBefore', {defaultMessage: 'is before'}) },
{ value: '>', label: 'is after' }, { value: '>', label: _t('filter.isAfter', {defaultMessage: 'is after'}) },
{ value: '<=', label: 'is before or equal' }, { value: '<=', label: _t('filter.isBeforeOrEqual', {defaultMessage: 'is before or equal'}) },
{ value: '>=', label: 'is after or equal' } { value: '>=', label: _t('filter.isAfterOrEqual', {defaultMessage: 'is after or equal'}) }
); );
} }
if (filterBehaviour.supportNullTesting) { if (filterBehaviour.supportNullTesting) {
res.push({ value: 'NULL', label: 'is NULL' }, { value: 'NOT NULL', label: 'is not NULL' }); res.push({ value: 'NULL', label: _t('filter.modal.isNull', {defaultMessage: 'is NULL'}) }, { value: 'NOT NULL', label: _t('filter.modal.isNotNull', {defaultMessage: 'is not NULL'}) });
} }
if (filterBehaviour.supportExistsTesting) { if (filterBehaviour.supportExistsTesting) {
res.push({ value: 'EXISTS', label: 'field exists' }, { value: 'NOT EXISTS', label: 'field does not exist' }); res.push({ value: 'EXISTS', label: _t('filter.modal.fieldExists', {defaultMessage: 'field exists'}) }, { value: 'NOT EXISTS', label: _t('filter.modal.fieldDoesNotExist', {defaultMessage: 'field does not exist'}) });
} }
if (filterBehaviour.supportSqlCondition) { if (filterBehaviour.supportSqlCondition) {
res.push( res.push(
{ value: 'sql', label: 'SQL condition' }, { value: 'sql', label: _t('filter.modal.sqlCondition', {defaultMessage: 'SQL condition'}) },
{ value: 'sqlRight', label: 'SQL condition - right side only' } { value: 'sqlRight', label: _t('filter.modal.sqlConditionRight', {defaultMessage: 'SQL condition - right side only'}) }
); );
} }

View File

@@ -0,0 +1,59 @@
<script lang='ts'>
import _ from 'lodash';
import FormStyledButton from '../buttons/FormStyledButton.svelte';
import newQuery from '../query/newQuery';
import SqlEditor from '../query/SqlEditor.svelte';
import ModalBase from './ModalBase.svelte';
import { closeCurrentModal } from './modalTools';
import { _t } from '../translations';
export let sql;
export let onConfirm;
export let engine = null;
</script>
<ModalBase {...$$restProps}>
<div slot="header">SQL Script</div>
<div class="editor">
<SqlEditor {engine} value={sql} readOnly />
</div>
<div slot="footer">
<FormStyledButton
type="button"
value={_t('common.close', { defaultMessage: 'Close' })}
on:click={closeCurrentModal}
data-testid="ShowSqlModal_closeButton"
/>
<FormStyledButton
type="button"
value="Open script"
on:click={() => {
newQuery({
initialData: sql,
});
closeCurrentModal();
}}
data-testid="ShowSqlModal_openScriptButton"
/>
</div>
</ModalBase>
<style>
.editor {
position: relative;
height: 30vh;
width: 40vw;
}
.form-margin {
margin: var(--dim-large-form-margin);
}
.flex-wrap {
flex-wrap: wrap;
}
</style>

View File

@@ -16,6 +16,7 @@
import { apiCall } from '../utility/api'; import { apiCall } from '../utility/api';
import ErrorInfo from '../elements/ErrorInfo.svelte'; import ErrorInfo from '../elements/ErrorInfo.svelte';
import { base64ToHex } from 'dbgate-tools'; import { base64ToHex } from 'dbgate-tools';
import { _t } from '../translations';
export let onConfirm; export let onConfirm;
export let conid; export let conid;
@@ -74,15 +75,15 @@
<FormProvider> <FormProvider>
<ModalBase {...$$restProps}> <ModalBase {...$$restProps}>
<svelte:fragment slot="header">Choose value from {field}</svelte:fragment> <svelte:fragment slot="header">{_t('dataGrid.chooseValue', { defaultMessage: 'Choose value from {field}', values: { field } })}</svelte:fragment>
<!-- <FormTextField name="search" label='Search' placeholder="Search" bind:value={search} /> --> <!-- <FormTextField name="search" label='Search' placeholder="Search" bind:value={search} /> -->
<div class="largeFormMarker"> <div class="largeFormMarker">
<SearchInput placeholder="Search" bind:value={search} isDebounced /> <SearchInput placeholder={_t('common.search', { defaultMessage: 'Search' })} bind:value={search} isDebounced />
</div> </div>
{#if isLoading} {#if isLoading}
<LoadingInfo message="Loading data" /> <LoadingInfo message={_t('common.loadingData', { defaultMessage: 'Loading data' })} />
{/if} {/if}
{#if !isLoading && rows} {#if !isLoading && rows}
@@ -112,7 +113,7 @@
}, },
{ {
fieldName: 'value', fieldName: 'value',
header: 'Value', header: _t('dataGrid.value', { defaultMessage: 'Value' }),
formatter: row => (row.value == null ? '(NULL)' : row.value?.$binary?.base64 ? base64ToHex(row.value.$binary.base64) : row.value), formatter: row => (row.value == null ? '(NULL)' : row.value?.$binary?.base64 ? base64ToHex(row.value.$binary.base64) : row.value),
}, },
]} ]}
@@ -147,7 +148,7 @@
}} }}
/> />
{/if} {/if}
<FormStyledButton type="button" value="Close" on:click={closeCurrentModal} /> <FormStyledButton type="button" value={_t('common.close', { defaultMessage: 'Close' })} on:click={closeCurrentModal} />
</svelte:fragment> </svelte:fragment>
</ModalBase> </ModalBase>
</FormProvider> </FormProvider>

View File

@@ -75,7 +75,7 @@
--token-base: #303030; --token-base: #303030;
--token-text: #ddd; --token-text: #ddd;
--token-keyword: white; --token-keyword: #096dd9;
--token-selector-tag: white; --token-selector-tag: white;
--token-literal: white; --token-literal: white;
--token-section: white; --token-section: white;

View File

@@ -4,6 +4,8 @@
import RowsFilterSwitcher from '../forms/RowsFilterSwitcher.svelte'; import RowsFilterSwitcher from '../forms/RowsFilterSwitcher.svelte';
import SearchInput from '../elements/SearchInput.svelte'; import SearchInput from '../elements/SearchInput.svelte';
import { filterName } from 'dbgate-tools'; import { filterName } from 'dbgate-tools';
import InlineButton from '../buttons/InlineButton.svelte';
import FontIcon from '../icons/FontIcon.svelte';
export let items: any[]; export let items: any[];
export let showProcedure = false; export let showProcedure = false;
@@ -12,8 +14,10 @@
export let startLine = 0; export let startLine = 0;
export let onMessageClick = null; export let onMessageClick = null;
export let onExplainError = null; export let onExplainError = null;
export let engine = null;
export let filter = ''; export let filter = '';
export let onClear = null;
$: time0 = items[0] && new Date(items[0].time).getTime(); $: time0 = items[0] && new Date(items[0].time).getTime();
@@ -37,6 +41,17 @@
<div class="main"> <div class="main">
<div class="topbar"> <div class="topbar">
{#if onClear}
<InlineButton
icon="img clear"
on:click={() => {
onClear();
}}
>
<FontIcon icon="icon delete" padRight />
Clear
</InlineButton>
{/if}
<RowsFilterSwitcher <RowsFilterSwitcher
icon="img debug" icon="img debug"
label="Debug" label="Debug"
@@ -92,6 +107,7 @@
previousRow={index > 0 ? items[index - 1] : null} previousRow={index > 0 ? items[index - 1] : null}
{onMessageClick} {onMessageClick}
{onExplainError} {onExplainError}
{engine}
/> />
{/each} {/each}
</table> </table>

View File

@@ -17,6 +17,10 @@
import FontIcon from '../icons/FontIcon.svelte'; import FontIcon from '../icons/FontIcon.svelte';
import { plusExpandIcon } from '../icons/expandIcons'; import { plusExpandIcon } from '../icons/expandIcons';
import InlineButton from '../buttons/InlineButton.svelte'; import InlineButton from '../buttons/InlineButton.svelte';
import SqlHighlighter from '../elements/SqlHighlighter.svelte';
import { showModal } from '../modals/modalTools';
import ShowSqlModal from '../modals/ShowSqlModal.svelte';
import openNewTab from '../utility/openNewTab';
export let row; export let row;
export let index; export let index;
@@ -29,6 +33,7 @@
export let previousRow = null; export let previousRow = null;
export let onMessageClick = null; export let onMessageClick = null;
export let onExplainError = null; export let onExplainError = null;
export let engine = null;
let isExpanded = false; let isExpanded = false;
</script> </script>
@@ -55,10 +60,39 @@
}}><FontIcon icon="img ai" /> Explain</InlineButton }}><FontIcon icon="img ai" /> Explain</InlineButton
> >
{/if} {/if}
{#if row.jslid}
<InlineButton
title="Show data"
inlineBlock
data-testid={`MessageViewRow-showDataButton-${index}`}
on:click={e => {
openNewTab({
title: 'Query data #',
icon: 'img query-data',
tabComponent: 'ArchiveFileTab',
props: {
jslid: row.jslid,
},
});
}}><FontIcon icon="img query-data" /> Show Data</InlineButton
>
{/if}
{#if row.sql}
<SqlHighlighter
code={row.sql.substring(0, 100) + (row.sql.length > 100 ? '...' : '')}
inline
onClick={() => {
showModal(ShowSqlModal, {
sql: row.sql,
engine,
});
}}
/>
{/if}
</td> </td>
<td>{moment(row.time).format('HH:mm:ss')}</td> <td>{moment(row.time).format('HH:mm:ss')}</td>
<td>{formatDuration(new Date(row.time).getTime() - time0)}</td> <td>{formatDuration(new Date(row.time).getTime() - time0)}</td>
<td> {previousRow ? formatDuration(new Date(row.time).getTime() - new Date(previousRow.time).getTime()) : 'n/a'}</td> <td>{previousRow ? formatDuration(new Date(row.time).getTime() - new Date(previousRow.time).getTime()) : 'n/a'}</td>
{#if showProcedure} {#if showProcedure}
<td>{row.procedure || ''}</td> <td>{row.procedure || ''}</td>
{/if} {/if}

View File

@@ -12,12 +12,13 @@
export let showLine = false; export let showLine = false;
export let showCaller = false; export let showCaller = false;
export let eventName; export let eventName;
export let executeNumber; export let executeNumber = null;
export let showNoMessagesAlert = false; export let showNoMessagesAlert = false;
export let startLine = 0; export let startLine = 0;
export let onChangeErrors = null; export let onChangeErrors = null;
export let onMessageClick = null; export let onMessageClick = null;
export let onExplainError = null; export let onExplainError = null;
export let engine = null;
const cachedMessagesRef = createRef([]); const cachedMessagesRef = createRef([]);
const lastErrorMessageCountRef = createRef(0); const lastErrorMessageCountRef = createRef(0);
@@ -43,6 +44,11 @@
return () => {}; return () => {};
}); });
function handleClearMessages() {
cachedMessagesRef.set([]);
displayedMessages = [];
}
$: { $: {
if (executeNumber >= 0) { if (executeNumber >= 0) {
displayedMessages = []; displayedMessages = [];
@@ -79,5 +85,7 @@
{showCaller} {showCaller}
{startLine} {startLine}
{onExplainError} {onExplainError}
{engine}
onClear={executeNumber == null ? handleClearMessages : null}
/> />
{/if} {/if}

View File

@@ -4,6 +4,7 @@
import { getFormContext } from '../forms/FormProviderCore.svelte'; import { getFormContext } from '../forms/FormProviderCore.svelte';
import FormTextAreaField from '../forms/FormTextAreaField.svelte'; import FormTextAreaField from '../forms/FormTextAreaField.svelte';
import FormArgumentList from '../forms/FormArgumentList.svelte'; import FormArgumentList from '../forms/FormArgumentList.svelte';
import { _t } from '../translations';
const { values } = getFormContext(); const { values } = getFormContext();
@@ -16,8 +17,8 @@
$: advancedFields = driver?.getAdvancedConnectionFields ? driver?.getAdvancedConnectionFields() : null; $: advancedFields = driver?.getAdvancedConnectionFields ? driver?.getAdvancedConnectionFields() : null;
</script> </script>
<FormTextAreaField label="Allowed databases, one per line" name="allowedDatabases" disabled={isConnected} rows={8} /> <FormTextAreaField label={_t('connection.allowedDatabases', { defaultMessage: 'Allowed databases, one per line' })} name="allowedDatabases" disabled={isConnected} rows={8} />
<FormTextField label="Allowed databases regular expression" name="allowedDatabasesRegex" disabled={isConnected} /> <FormTextField label={_t('connection.allowedDatabasesRegex', { defaultMessage: 'Allowed databases regular expression' })} name="allowedDatabasesRegex" disabled={isConnected} />
{#if advancedFields} {#if advancedFields}
<FormArgumentList args={advancedFields} /> <FormArgumentList args={advancedFields} />

View File

@@ -87,13 +87,13 @@
</script> </script>
<FormSelectField <FormSelectField
label="Connection type" label={_t('connection.type', { defaultMessage: 'Connection type' })}
name="engine" name="engine"
isNative isNative
disabled={isConnected} disabled={isConnected}
data-testid="ConnectionDriverFields_connectionType" data-testid="ConnectionDriverFields_connectionType"
options={[ options={[
{ label: '(select connection type)', value: '' }, { label: _t('connection.selectType', { defaultMessage: '(select connection type)' })},
..._.sortBy( ..._.sortBy(
$extensions.drivers $extensions.drivers
// .filter(driver => !driver.isElectronOnly || electron) // .filter(driver => !driver.isElectronOnly || electron)
@@ -109,7 +109,7 @@
{#if $authTypes && driver?.showConnectionField('authType', $values, showConnectionFieldArgs) && driver?.authTypeFirst} {#if $authTypes && driver?.showConnectionField('authType', $values, showConnectionFieldArgs) && driver?.authTypeFirst}
{#key $authTypes} {#key $authTypes}
<FormSelectField <FormSelectField
label={driver?.authTypeLabel ?? 'Authentication'} label={driver?.authTypeLabel ?? _t('connection.authentication', { defaultMessage: 'Authentication' })}
data-testid="ConnectionDriverFields_authType" data-testid="ConnectionDriverFields_authType"
name="authType" name="authType"
isNative isNative
@@ -125,7 +125,7 @@
{#if driver?.showConnectionField('clusterNodes', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('clusterNodes', $values, showConnectionFieldArgs)}
<FormClusterNodesField <FormClusterNodesField
label="Cluster nodes" label={_t('connection.clusterNodes', { defaultMessage: 'Cluster nodes' })}
name="clusterNodes" name="clusterNodes"
disabled={isConnected || disabledFields.includes('clusterNodes')} disabled={isConnected || disabledFields.includes('clusterNodes')}
data-testid="ConnectionDriverFields_clusterNodes" data-testid="ConnectionDriverFields_clusterNodes"
@@ -134,7 +134,7 @@
{#if driver?.showConnectionField('autoDetectNatMap', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('autoDetectNatMap', $values, showConnectionFieldArgs)}
<FormCheckboxField <FormCheckboxField
label="Auto detect NAT map (use for Redis Cluster in Docker network)" label={_t('connection.autoDetectNatMap', { defaultMessage: 'Auto detect NAT map (use for Redis Cluster in Docker network)' })}
name="autoDetectNatMap" name="autoDetectNatMap"
disabled={isConnected} disabled={isConnected}
data-testid="ConnectionDriverFields_autoDetectNatMap" data-testid="ConnectionDriverFields_autoDetectNatMap"
@@ -144,13 +144,13 @@
{#if driver?.showConnectionField('databaseFile', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('databaseFile', $values, showConnectionFieldArgs)}
{#if electron && !driver?.dialect?.useServerDatabaseFile} {#if electron && !driver?.dialect?.useServerDatabaseFile}
<FormElectronFileSelector <FormElectronFileSelector
label="Database file" label={_t('connection.databaseFile', { defaultMessage: 'Database file' })}
name="databaseFile" name="databaseFile"
disabled={isConnected || disabledFields.includes('databaseFile')} disabled={isConnected || disabledFields.includes('databaseFile')}
/> />
{:else} {:else}
<FormTextField <FormTextField
label="Database file (path on server)" label={_t('connection.databaseFilePath', { defaultMessage: 'Database file (path on server)' })}
name="databaseFile" name="databaseFile"
disabled={isConnected || disabledFields.includes('databaseFile')} disabled={isConnected || disabledFields.includes('databaseFile')}
/> />
@@ -164,8 +164,8 @@
name="useDatabaseUrl" name="useDatabaseUrl"
matchValueToOption={(value, option) => !!option.value == !!value} matchValueToOption={(value, option) => !!option.value == !!value}
options={[ options={[
{ label: 'Fill database connection details', value: '', default: true }, { label: _t('connection.fillDetails', { defaultMessage: 'Fill database connection details' }), value: '', default: true },
{ label: 'Use database URL', value: '1' }, { label: _t('connection.useUrl', { defaultMessage: 'Use database URL' }), value: '1' },
]} ]}
/> />
</div> </div>
@@ -173,7 +173,7 @@
{#if driver?.showConnectionField('databaseUrl', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('databaseUrl', $values, showConnectionFieldArgs)}
<FormTextField <FormTextField
label="Database URL" label={_t('connection.databaseUrl', { defaultMessage: 'Database URL' })}
name="databaseUrl" name="databaseUrl"
data-testid="ConnectionDriverFields_databaseUrl" data-testid="ConnectionDriverFields_databaseUrl"
placeholder={driver?.databaseUrlPlaceholder} placeholder={driver?.databaseUrlPlaceholder}
@@ -183,7 +183,7 @@
{#if driver?.showConnectionField('localDataCenter', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('localDataCenter', $values, showConnectionFieldArgs)}
<FormTextField <FormTextField
label="Local DataCenter" label={_t('connection.localDataCenter', { defaultMessage: 'Local DataCenter' })}
name="localDataCenter" name="localDataCenter"
data-testid="ConnectionDriverFields_localDataCenter" data-testid="ConnectionDriverFields_localDataCenter"
placeholder={driver?.defaultLocalDataCenter} placeholder={driver?.defaultLocalDataCenter}
@@ -203,7 +203,7 @@
{#if $authTypes && driver?.showConnectionField('authType', $values, showConnectionFieldArgs) && !driver?.authTypeFirst} {#if $authTypes && driver?.showConnectionField('authType', $values, showConnectionFieldArgs) && !driver?.authTypeFirst}
{#key $authTypes} {#key $authTypes}
<FormSelectField <FormSelectField
label={driver?.authTypeLabel ?? 'Authentication'} label={driver?.authTypeLabel ?? _t('connection.authentication', { defaultMessage: 'Authentication' })}
data-testid="ConnectionDriverFields_authType" data-testid="ConnectionDriverFields_authType"
name="authType" name="authType"
isNative isNative
@@ -219,7 +219,7 @@
{#if driver?.showConnectionField('endpoint', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('endpoint', $values, showConnectionFieldArgs)}
<FormTextField <FormTextField
label="Endpoint" label='Endpoint'
name="endpoint" name="endpoint"
disabled={isConnected || disabledFields.includes('endpoint')} disabled={isConnected || disabledFields.includes('endpoint')}
data-testid="ConnectionDriverFields_endpoint" data-testid="ConnectionDriverFields_endpoint"
@@ -228,7 +228,7 @@
{#if driver?.showConnectionField('endpointKey', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('endpointKey', $values, showConnectionFieldArgs)}
<FormTextField <FormTextField
label="Key" label={_t('connection.endpointKey', { defaultMessage: 'Key' })}
name="endpointKey" name="endpointKey"
disabled={isConnected || disabledFields.includes('endpointKey')} disabled={isConnected || disabledFields.includes('endpointKey')}
data-testid="ConnectionDriverFields_endpointKey" data-testid="ConnectionDriverFields_endpointKey"
@@ -237,7 +237,7 @@
{#if driver?.showConnectionField('clientLibraryPath', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('clientLibraryPath', $values, showConnectionFieldArgs)}
<FormTextField <FormTextField
label="Client library path" label={_t('connection.clientLibraryPath', { defaultMessage: 'Client library path' })}
name="clientLibraryPath" name="clientLibraryPath"
disabled={isConnected || disabledFields.includes('clientLibraryPath')} disabled={isConnected || disabledFields.includes('clientLibraryPath')}
data-testid="ConnectionDriverFields_clientLibraryPath" data-testid="ConnectionDriverFields_clientLibraryPath"
@@ -248,7 +248,7 @@
<div class="row"> <div class="row">
<div class="col-9 mr-1"> <div class="col-9 mr-1">
<FormTextField <FormTextField
label="Server" label={_t('connection.server', { defaultMessage: 'Server' })}
name="server" name="server"
disabled={isConnected || disabledFields.includes('server')} disabled={isConnected || disabledFields.includes('server')}
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}
@@ -271,7 +271,7 @@
{#if getCurrentConfig().isDocker} {#if getCurrentConfig().isDocker}
<div class="row"> <div class="row">
<FontIcon icon="img warn" padRight /> <FontIcon icon="img warn" padRight />
Under docker, localhost and 127.0.0.1 will not work, use dockerhost instead { _t('connection.dockerWarning', { defaultMessage: 'Under docker, localhost and 127.0.0.1 will not work, use dockerhost instead' }) }
</div> </div>
{/if} {/if}
{/if} {/if}
@@ -280,7 +280,7 @@
<div class="row"> <div class="row">
<div class="col-9 mr-1"> <div class="col-9 mr-1">
<FormTextField <FormTextField
label={$values.serviceNameType == 'sid' ? 'SID' : 'Service name'} label={$values.serviceNameType == 'sid' ? 'SID' : _t('connection.serviceName', { defaultMessage: 'Service name' })}
name="serviceName" name="serviceName"
disabled={isConnected} disabled={isConnected}
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}
@@ -289,14 +289,14 @@
</div> </div>
<div class="col-3"> <div class="col-3">
<FormSelectField <FormSelectField
label="Choose type" label={_t('connection.chooseType', { defaultMessage: 'Choose type' })}
isNative isNative
name="serviceNameType" name="serviceNameType"
defaultValue="serviceName" defaultValue="serviceName"
disabled={isConnected} disabled={isConnected}
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}
options={[ options={[
{ value: 'serviceName', label: 'Service name' }, { value: 'serviceName', label: _t('connection.serviceName', { defaultMessage: 'Service name' }) },
{ value: 'sid', label: 'SID' }, { value: 'sid', label: 'SID' },
]} ]}
data-testid="ConnectionDriverFields_serviceNameType" data-testid="ConnectionDriverFields_serviceNameType"
@@ -307,7 +307,7 @@
{#if driver?.showConnectionField('socketPath', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('socketPath', $values, showConnectionFieldArgs)}
<FormTextField <FormTextField
label="Socket path" label={_t('connection.socketPath', { defaultMessage: 'Socket path' })}
name="socketPath" name="socketPath"
disabled={isConnected || disabledFields.includes('socketPath')} disabled={isConnected || disabledFields.includes('socketPath')}
placeholder={driver?.defaultSocketPath} placeholder={driver?.defaultSocketPath}
@@ -320,7 +320,7 @@
{#if showUser} {#if showUser}
<div class="col-6 mr-1"> <div class="col-6 mr-1">
<FormTextField <FormTextField
label="User" label={_t('connection.user', { defaultMessage: 'User' })}
name="user" name="user"
disabled={isConnected || disabledFields.includes('user')} disabled={isConnected || disabledFields.includes('user')}
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}
@@ -331,7 +331,7 @@
{#if showPassword} {#if showPassword}
<div class="col-6 mr-1"> <div class="col-6 mr-1">
<FormPasswordField <FormPasswordField
label="Password" label={_t('connection.password', { defaultMessage: 'Password' })}
name="password" name="password"
disabled={isConnected || disabledFields.includes('password')} disabled={isConnected || disabledFields.includes('password')}
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}
@@ -343,7 +343,7 @@
{/if} {/if}
{#if showUser && !showPassword} {#if showUser && !showPassword}
<FormTextField <FormTextField
label="User" label={_t('connection.user', { defaultMessage: 'User' })}
name="user" name="user"
disabled={isConnected || disabledFields.includes('user')} disabled={isConnected || disabledFields.includes('user')}
data-testid="ConnectionDriverFields_user" data-testid="ConnectionDriverFields_user"
@@ -351,7 +351,7 @@
{/if} {/if}
{#if !showUser && showPassword} {#if !showUser && showPassword}
<FormPasswordField <FormPasswordField
label="Password" label={_t('connection.password', { defaultMessage: 'Password' })}
name="password" name="password"
disabled={isConnected || disabledFields.includes('password')} disabled={isConnected || disabledFields.includes('password')}
data-testid="ConnectionDriverFields_password" data-testid="ConnectionDriverFields_password"
@@ -378,7 +378,7 @@
{#if driver?.showConnectionField('accessKeyId', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('accessKeyId', $values, showConnectionFieldArgs)}
<div class="col-6 mr-1"> <div class="col-6 mr-1">
<FormTextField <FormTextField
label="Access Key ID" label={_t('connection.accessKeyId', { defaultMessage: 'Access Key ID' })}
name="accessKeyId" name="accessKeyId"
disabled={isConnected || disabledFields.includes('accessKeyId')} disabled={isConnected || disabledFields.includes('accessKeyId')}
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}
@@ -389,7 +389,7 @@
{#if driver?.showConnectionField('secretAccessKey', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('secretAccessKey', $values, showConnectionFieldArgs)}
<div class="col-6 mr-1"> <div class="col-6 mr-1">
<FormPasswordField <FormPasswordField
label="Secret access key" label={_t('connection.secretAccessKey', { defaultMessage: 'Secret access key' })}
name="secretAccessKey" name="secretAccessKey"
disabled={isConnected || disabledFields.includes('secretAccessKey')} disabled={isConnected || disabledFields.includes('secretAccessKey')}
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}
@@ -401,16 +401,16 @@
{#if !disabledFields.includes('password') && showPasswordMode} {#if !disabledFields.includes('password') && showPasswordMode}
<FormSelectField <FormSelectField
label="Password mode" label={_t('connection.passwordMode', { defaultMessage: 'Password mode' })}
isNative isNative
name="passwordMode" name="passwordMode"
defaultValue="saveEncrypted" defaultValue="saveEncrypted"
disabled={isConnected} disabled={isConnected}
options={[ options={[
{ value: 'saveEncrypted', label: 'Save and encrypt' }, { value: 'saveEncrypted', label: _t('connection.saveEncrypted', { defaultMessage: 'Save and encrypt' }) },
{ value: 'saveRaw', label: 'Save raw (UNSAFE!!)' }, { value: 'saveRaw', label: _t('connection.saveRaw', { defaultMessage: 'Save raw (UNSAFE!!)' }) },
{ value: 'askPassword', label: "Don't save, ask for password" }, { value: 'askPassword', label: _t('connection.askPassword', { defaultMessage: "Don't save, ask for password" }) },
{ value: 'askUser', label: "Don't save, ask for login and password" }, { value: 'askUser', label: _t('connection.askUser', { defaultMessage: "Don't save, ask for login and password" }) },
]} ]}
data-testid="ConnectionDriverFields_passwordMode" data-testid="ConnectionDriverFields_passwordMode"
/> />
@@ -418,7 +418,7 @@
{#if driver?.showConnectionField('treeKeySeparator', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('treeKeySeparator', $values, showConnectionFieldArgs)}
<FormTextField <FormTextField
label="Key separator" label={_t('connection.keySeparator', { defaultMessage: 'Key separator' })}
name="treeKeySeparator" name="treeKeySeparator"
disabled={isConnected} disabled={isConnected}
placeholder=":" placeholder=":"
@@ -428,7 +428,7 @@
{#if driver?.showConnectionField('windowsDomain', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('windowsDomain', $values, showConnectionFieldArgs)}
<FormTextField <FormTextField
label="Domain (specify to use NTLM authentication)" label={_t('connection.windowsDomain', { defaultMessage: 'Domain (specify to use NTLM authentication)' })}
name="windowsDomain" name="windowsDomain"
disabled={isConnected} disabled={isConnected}
data-testid="ConnectionDriverFields_windowsDomain" data-testid="ConnectionDriverFields_windowsDomain"
@@ -437,7 +437,7 @@
{#if driver?.showConnectionField('isReadOnly', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('isReadOnly', $values, showConnectionFieldArgs)}
<FormCheckboxField <FormCheckboxField
label="Is read only" label={_t('connection.isReadOnly', { defaultMessage: 'Is read only' })}
name="isReadOnly" name="isReadOnly"
disabled={isConnected} disabled={isConnected}
data-testid="ConnectionDriverFields_isReadOnly" data-testid="ConnectionDriverFields_isReadOnly"
@@ -446,7 +446,7 @@
{#if driver?.showConnectionField('trustServerCertificate', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('trustServerCertificate', $values, showConnectionFieldArgs)}
<FormCheckboxField <FormCheckboxField
label="Trust server certificate" label={_t('connection.trustServerCertificate', { defaultMessage: 'Trust server certificate' })}
name="trustServerCertificate" name="trustServerCertificate"
disabled={isConnected} disabled={isConnected}
data-testid="ConnectionDriverFields_trustServerCertificate" data-testid="ConnectionDriverFields_trustServerCertificate"
@@ -455,18 +455,18 @@
{#if driver?.showConnectionField('defaultDatabase', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('defaultDatabase', $values, showConnectionFieldArgs)}
<FormDropDownTextField <FormDropDownTextField
label="Default database" label={_t('connection.defaultDatabase', { defaultMessage: 'Default database' })}
name="defaultDatabase" name="defaultDatabase"
disabled={isConnected} disabled={isConnected}
data-testid="ConnectionDriverFields_defaultDatabase" data-testid="ConnectionDriverFields_defaultDatabase"
asyncMenu={createDatabasesMenu} asyncMenu={createDatabasesMenu}
placeholder="(not selected - optional)" placeholder={_t('common.notSelectedOptional', { defaultMessage : "(not selected - optional)"})}
/> />
{/if} {/if}
{#if defaultDatabase && driver?.showConnectionField('singleDatabase', $values, showConnectionFieldArgs)} {#if defaultDatabase && driver?.showConnectionField('singleDatabase', $values, showConnectionFieldArgs)}
<FormCheckboxField <FormCheckboxField
label={`Use only database ${defaultDatabase}`} label={_t('connection.singleDatabase', { defaultMessage: 'Use only database {defaultDatabase}', values: { defaultDatabase } })}
name="singleDatabase" name="singleDatabase"
disabled={isConnected} disabled={isConnected}
data-testid="ConnectionDriverFields_singleDatabase" data-testid="ConnectionDriverFields_singleDatabase"
@@ -475,7 +475,7 @@
{#if driver?.showConnectionField('useSeparateSchemas', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('useSeparateSchemas', $values, showConnectionFieldArgs)}
<FormCheckboxField <FormCheckboxField
label={`Use schemas separately (use this if you have many large schemas)`} label={_t('connection.useSeparateSchemas', { defaultMessage: 'Use schemas separately (use this if you have many large schemas)' })}
name="useSeparateSchemas" name="useSeparateSchemas"
disabled={isConnected} disabled={isConnected}
data-testid="ConnectionDriverFields_useSeparateSchemas" data-testid="ConnectionDriverFields_useSeparateSchemas"
@@ -483,14 +483,14 @@
{/if} {/if}
{#if driver?.showConnectionField('connectionDefinition', $values, showConnectionFieldArgs)} {#if driver?.showConnectionField('connectionDefinition', $values, showConnectionFieldArgs)}
<FormFileInputField disabled={isConnected} label="Service account key JSON" name="connectionDefinition" /> <FormFileInputField disabled={isConnected} label={_t('connection.connectionDefinition', { defaultMessage: 'Service account key JSON' })} name="connectionDefinition" />
{/if} {/if}
{#if driver} {#if driver}
<div class="row"> <div class="row">
<div class="col-6 mr-1"> <div class="col-6 mr-1">
<FormTextField <FormTextField
label="Display name" label={_t('connection.displayName', { defaultMessage: 'Display name' })}
name="displayName" name="displayName"
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}
disabled={isConnected} disabled={isConnected}
@@ -501,7 +501,7 @@
<div class="col-6 mr-1"> <div class="col-6 mr-1">
<FormColorField <FormColorField
useSelector useSelector
label="Color" label={_t('connection.color', { defaultMessage: 'Color' })}
name="connectionColor" name="connectionColor"
emptyLabel="(not selected)" emptyLabel="(not selected)"
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}

View File

@@ -12,6 +12,7 @@
import { usePlatformInfo } from '../utility/metadataLoaders'; import { usePlatformInfo } from '../utility/metadataLoaders';
import FontIcon from '../icons/FontIcon.svelte'; import FontIcon from '../icons/FontIcon.svelte';
import { extensions, openedConnections, openedSingleDatabaseConnections } from '../stores'; import { extensions, openedConnections, openedSingleDatabaseConnections } from '../stores';
import { _t } from '../translations';
const { values, setFieldValue } = getFormContext(); const { values, setFieldValue } = getFormContext();
const electron = getElectron(); const electron = getElectron();
@@ -29,7 +30,7 @@
</script> </script>
<FormCheckboxField <FormCheckboxField
label="Use SSH tunnel" label={_t('connection.sshTunnel.use', {defaultMessage: "Use SSH tunnel"})}
name="useSshTunnel" name="useSshTunnel"
disabled={isConnected} disabled={isConnected}
data-testid="ConnectionSshTunnelFields_useSshTunnel" data-testid="ConnectionSshTunnelFields_useSshTunnel"
@@ -59,13 +60,13 @@
<FormTextField label="Bastion host (Jump host)" name="sshBastionHost" disabled={isConnected || !useSshTunnel} /> <FormTextField label="Bastion host (Jump host)" name="sshBastionHost" disabled={isConnected || !useSshTunnel} />
<FormSelectField <FormSelectField
label="SSH Authentication" label={_t('connection.sshTunnel.authentication', {defaultMessage: "SSH Authentication"})}
name="sshMode" name="sshMode"
isNative isNative
defaultSelectValue="userPassword" defaultSelectValue="userPassword"
disabled={isConnected || !useSshTunnel} disabled={isConnected || !useSshTunnel}
options={[ options={[
{ value: 'userPassword', label: 'Username & password' }, { value: 'userPassword', label: _t('connection.sshTunnel.authMethod.userPassword', {defaultMessage: "Username & password"}) },
{ value: 'agent', label: 'SSH agent' }, { value: 'agent', label: 'SSH agent' },
{ value: 'keyFile', label: 'Key file' }, { value: 'keyFile', label: 'Key file' },
]} ]}
@@ -94,7 +95,7 @@
</div> </div>
<div class="col-6"> <div class="col-6">
<FormPasswordField <FormPasswordField
label="Password" label={_t('connection.password', {defaultMessage: 'Password'})}
name="sshPassword" name="sshPassword"
disabled={isConnected || !useSshTunnel} disabled={isConnected || !useSshTunnel}
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}
@@ -109,7 +110,7 @@
<div class="col-6 mr-1"> <div class="col-6 mr-1">
{#if electron} {#if electron}
<FormElectronFileSelector <FormElectronFileSelector
label="Private key file" label={_t('connection.sshTunnel.privateKeyFile', {defaultMessage: "Private key file"})}
name="sshKeyfile" name="sshKeyfile"
disabled={isConnected || !useSshTunnel} disabled={isConnected || !useSshTunnel}
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}
@@ -118,7 +119,7 @@
/> />
{:else} {:else}
<FormTextField <FormTextField
label="Private key file (path on server)" label={_t('connection.sshTunnel.privateKeyFilePath', {defaultMessage: "Private key file (path on server)"})}
name="sshKeyfile" name="sshKeyfile"
disabled={isConnected || !useSshTunnel} disabled={isConnected || !useSshTunnel}
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}
@@ -129,7 +130,7 @@
</div> </div>
<div class="col-6"> <div class="col-6">
<FormPasswordField <FormPasswordField
label="Key file passphrase" label={_t('connection.sshTunnel.keyFilePassphrase', {defaultMessage: "Key file passphrase"})}
name="sshKeyfilePassword" name="sshKeyfilePassword"
disabled={isConnected || !useSshTunnel} disabled={isConnected || !useSshTunnel}
templateProps={{ noMargin: true }} templateProps={{ noMargin: true }}
@@ -142,9 +143,9 @@
{#if useSshTunnel && $values.sshMode == 'agent'} {#if useSshTunnel && $values.sshMode == 'agent'}
<div class="ml-3 mb-3"> <div class="ml-3 mb-3">
{#if $platformInfo && $platformInfo.sshAuthSock} {#if $platformInfo && $platformInfo.sshAuthSock}
<FontIcon icon="img ok" /> SSH Agent found <FontIcon icon="img ok" /> {_t('connection.sshTunnel.agentFound', {defaultMessage: "SSH Agent found"})}
{:else} {:else}
<FontIcon icon="img error" /> SSH Agent not found <FontIcon icon="img error" /> {_t('connection.sshTunnel.agentNotFound', {defaultMessage: "SSH Agent not found"})}
{/if} {/if}
</div> </div>
{/if} {/if}

Some files were not shown because too many files have changed in this diff Show More