mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 16:43:59 +00:00
Merge branch 'master' into feature/mongosh
This commit is contained in:
2
.github/workflows/build-app-pro-beta.yaml
vendored
2
.github/workflows/build-app-pro-beta.yaml
vendored
@@ -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: 8a4dc2732a7097b5c4c48b4feb62609111cdf3e0
|
ref: 36b6ce878c3c0a0c9623163c8a8b3bdeefc7da53
|
||||||
- name: Merge dbgate/dbgate-pro
|
- name: Merge dbgate/dbgate-pro
|
||||||
run: |
|
run: |
|
||||||
mkdir ../dbgate-pro
|
mkdir ../dbgate-pro
|
||||||
|
|||||||
2
.github/workflows/build-app-pro.yaml
vendored
2
.github/workflows/build-app-pro.yaml
vendored
@@ -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: 8a4dc2732a7097b5c4c48b4feb62609111cdf3e0
|
ref: 36b6ce878c3c0a0c9623163c8a8b3bdeefc7da53
|
||||||
- name: Merge dbgate/dbgate-pro
|
- name: Merge dbgate/dbgate-pro
|
||||||
run: |
|
run: |
|
||||||
mkdir ../dbgate-pro
|
mkdir ../dbgate-pro
|
||||||
|
|||||||
2
.github/workflows/build-cloud-pro.yaml
vendored
2
.github/workflows/build-cloud-pro.yaml
vendored
@@ -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: 8a4dc2732a7097b5c4c48b4feb62609111cdf3e0
|
ref: 36b6ce878c3c0a0c9623163c8a8b3bdeefc7da53
|
||||||
- name: Merge dbgate/dbgate-pro
|
- name: Merge dbgate/dbgate-pro
|
||||||
run: |
|
run: |
|
||||||
mkdir ../dbgate-pro
|
mkdir ../dbgate-pro
|
||||||
|
|||||||
2
.github/workflows/build-docker-pro.yaml
vendored
2
.github/workflows/build-docker-pro.yaml
vendored
@@ -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: 8a4dc2732a7097b5c4c48b4feb62609111cdf3e0
|
ref: 36b6ce878c3c0a0c9623163c8a8b3bdeefc7da53
|
||||||
- name: Merge dbgate/dbgate-pro
|
- name: Merge dbgate/dbgate-pro
|
||||||
run: |
|
run: |
|
||||||
mkdir ../dbgate-pro
|
mkdir ../dbgate-pro
|
||||||
|
|||||||
2
.github/workflows/build-npm-pro.yaml
vendored
2
.github/workflows/build-npm-pro.yaml
vendored
@@ -32,7 +32,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: 8a4dc2732a7097b5c4c48b4feb62609111cdf3e0
|
ref: 36b6ce878c3c0a0c9623163c8a8b3bdeefc7da53
|
||||||
- name: Merge dbgate/dbgate-pro
|
- name: Merge dbgate/dbgate-pro
|
||||||
run: |
|
run: |
|
||||||
mkdir ../dbgate-pro
|
mkdir ../dbgate-pro
|
||||||
|
|||||||
2
.github/workflows/e2e-pro.yaml
vendored
2
.github/workflows/e2e-pro.yaml
vendored
@@ -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: 8a4dc2732a7097b5c4c48b4feb62609111cdf3e0
|
ref: 36b6ce878c3c0a0c9623163c8a8b3bdeefc7da53
|
||||||
- name: Merge dbgate/dbgate-pro
|
- name: Merge dbgate/dbgate-pro
|
||||||
run: |
|
run: |
|
||||||
mkdir ../dbgate-pro
|
mkdir ../dbgate-pro
|
||||||
|
|||||||
@@ -8,6 +8,12 @@ Builds:
|
|||||||
- linux - application for linux
|
- linux - application for linux
|
||||||
- win - application for Windows
|
- win - application for Windows
|
||||||
|
|
||||||
|
## 6.6.0
|
||||||
|
- ADDED: Database chat - AI powered chatbot, which knows your database (Premium)
|
||||||
|
- ADDED: Firestore support (Premium)
|
||||||
|
- REMOVED: Query AI assistant (replaced by Database Chat) (Premium)
|
||||||
|
- FIXED: Chart permissions were ignored (Premium)
|
||||||
|
|
||||||
## 6.5.6
|
## 6.5.6
|
||||||
- ADDED: New object window - quick access to most common functions
|
- ADDED: New object window - quick access to most common functions
|
||||||
- ADDED: Possibility to disable split query by empty line #1162
|
- ADDED: Possibility to disable split query by empty line #1162
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ DbGate is licensed under GPL-3.0 license and is free to use for any purpose.
|
|||||||
* libSQL/Turso (Premium)
|
* libSQL/Turso (Premium)
|
||||||
* DuckDB
|
* DuckDB
|
||||||
* Firebird
|
* Firebird
|
||||||
|
* Firestore (Premium)
|
||||||
|
|
||||||
|
|
||||||
<a href="https://raw.githubusercontent.com/dbgate/dbgate/master/img/screenshot1.png">
|
<a href="https://raw.githubusercontent.com/dbgate/dbgate/master/img/screenshot1.png">
|
||||||
@@ -81,6 +82,7 @@ DbGate is licensed under GPL-3.0 license and is free to use for any purpose.
|
|||||||
* Archives - backup your data in NDJSON files on local filesystem (or on DbGate server, when using web application)
|
* Archives - backup your data in NDJSON files on local filesystem (or on DbGate server, when using web application)
|
||||||
* NDJSON data viewer and editor - browse NDJSON data, edit data and structure directly on NDJSON files. Works also for big NDSON files
|
* NDJSON data viewer and editor - browse NDJSON data, edit data and structure directly on NDJSON files. Works also for big NDSON files
|
||||||
* Charts, export chart to HTML page
|
* Charts, export chart to HTML page
|
||||||
|
* AI powered database chat
|
||||||
* Show GEO data on map, export map to HTML page
|
* Show GEO data on map, export map to HTML page
|
||||||
* For detailed info, how to run DbGate in docker container, visit [docker hub](https://hub.docker.com/r/dbgate/dbgate)
|
* For detailed info, how to run DbGate in docker container, visit [docker hub](https://hub.docker.com/r/dbgate/dbgate)
|
||||||
* Extensible plugin architecture
|
* Extensible plugin architecture
|
||||||
|
|||||||
@@ -390,7 +390,7 @@ describe('Data browser data', () => {
|
|||||||
cy.get('body').realType('find most popular artist');
|
cy.get('body').realType('find most popular artist');
|
||||||
cy.get('body').realPress('{enter}');
|
cy.get('body').realPress('{enter}');
|
||||||
cy.testid('DatabaseChatTab_executeAllQueries', { timeout: 20000 }).click();
|
cy.testid('DatabaseChatTab_executeAllQueries', { timeout: 20000 }).click();
|
||||||
cy.wait(4000);
|
cy.wait(20000);
|
||||||
// cy.contains('Iron Maiden');
|
// cy.contains('Iron Maiden');
|
||||||
cy.themeshot('database-chat');
|
cy.themeshot('database-chat');
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "6.5.7-beta.4",
|
"version": "6.6.0",
|
||||||
"name": "dbgate-all",
|
"name": "dbgate-all",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/*",
|
"packages/*",
|
||||||
|
|||||||
@@ -674,6 +674,12 @@ module.exports = {
|
|||||||
"columnName": "awsRegion",
|
"columnName": "awsRegion",
|
||||||
"dataType": "varchar(250)",
|
"dataType": "varchar(250)",
|
||||||
"notNull": false
|
"notNull": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pureName": "connections",
|
||||||
|
"columnName": "connectionDefinition",
|
||||||
|
"dataType": "text",
|
||||||
|
"notNull": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"foreignKeys": [],
|
"foreignKeys": [],
|
||||||
|
|||||||
@@ -101,24 +101,26 @@ function decryptObjectPasswordField(obj, field, encryptor = null) {
|
|||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const fieldsToEncrypt = ['password', 'sshPassword', 'sshKeyfilePassword', 'connectionDefinition'];
|
||||||
|
|
||||||
function encryptConnection(connection, encryptor = null) {
|
function encryptConnection(connection, encryptor = null) {
|
||||||
if (connection.passwordMode != 'saveRaw') {
|
if (connection.passwordMode != 'saveRaw') {
|
||||||
connection = encryptObjectPasswordField(connection, 'password', encryptor);
|
for (const field of fieldsToEncrypt) {
|
||||||
connection = encryptObjectPasswordField(connection, 'sshPassword', encryptor);
|
connection = encryptObjectPasswordField(connection, field, encryptor);
|
||||||
connection = encryptObjectPasswordField(connection, 'sshKeyfilePassword', encryptor);
|
}
|
||||||
}
|
}
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
function maskConnection(connection) {
|
function maskConnection(connection) {
|
||||||
if (!connection) return connection;
|
if (!connection) return connection;
|
||||||
return _.omit(connection, ['password', 'sshPassword', 'sshKeyfilePassword']);
|
return _.omit(connection, fieldsToEncrypt);
|
||||||
}
|
}
|
||||||
|
|
||||||
function decryptConnection(connection, encryptor = null) {
|
function decryptConnection(connection) {
|
||||||
connection = decryptObjectPasswordField(connection, 'password', encryptor);
|
for (const field of fieldsToEncrypt) {
|
||||||
connection = decryptObjectPasswordField(connection, 'sshPassword', encryptor);
|
connection = decryptObjectPasswordField(connection, field);
|
||||||
connection = decryptObjectPasswordField(connection, 'sshKeyfilePassword', encryptor);
|
}
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -188,9 +190,9 @@ function recryptObjectPasswordFieldInPlace(obj, field, decryptEncryptor, encrypt
|
|||||||
}
|
}
|
||||||
|
|
||||||
function recryptConnection(connection, decryptEncryptor, encryptEncryptor) {
|
function recryptConnection(connection, decryptEncryptor, encryptEncryptor) {
|
||||||
connection = recryptObjectPasswordField(connection, 'password', decryptEncryptor, encryptEncryptor);
|
for (const field of fieldsToEncrypt) {
|
||||||
connection = recryptObjectPasswordField(connection, 'sshPassword', decryptEncryptor, encryptEncryptor);
|
connection = recryptObjectPasswordField(connection, field, decryptEncryptor, encryptEncryptor);
|
||||||
connection = recryptObjectPasswordField(connection, 'sshKeyfilePassword', decryptEncryptor, encryptEncryptor);
|
}
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
packages/types/engines.d.ts
vendored
2
packages/types/engines.d.ts
vendored
@@ -241,7 +241,7 @@ export interface EngineDriver<TClient = any> extends FilterBehaviourProvider {
|
|||||||
defaultSocketPath?: string;
|
defaultSocketPath?: string;
|
||||||
authTypeLabel?: string;
|
authTypeLabel?: string;
|
||||||
importExportArgs?: any[];
|
importExportArgs?: any[];
|
||||||
connect({ server, port, user, password, database, certificateJson }): Promise<DatabaseHandle<TClient>>;
|
connect({ server, port, user, password, database, connectionDefinition }): Promise<DatabaseHandle<TClient>>;
|
||||||
close(dbhan: DatabaseHandle<TClient>): Promise<any>;
|
close(dbhan: DatabaseHandle<TClient>): Promise<any>;
|
||||||
query(dbhan: DatabaseHandle<TClient>, sql: string, options?: QueryOptions): Promise<QueryResult>;
|
query(dbhan: DatabaseHandle<TClient>, sql: string, options?: QueryOptions): Promise<QueryResult>;
|
||||||
stream(dbhan: DatabaseHandle<TClient>, sql: string, options: StreamOptions);
|
stream(dbhan: DatabaseHandle<TClient>, sql: string, options: StreamOptions);
|
||||||
|
|||||||
@@ -511,7 +511,8 @@ await dbgateApi.executeQuery(${JSON.stringify(
|
|||||||
text: _t('database.exportDbModel', { defaultMessage: 'Export DB model' }),
|
text: _t('database.exportDbModel', { defaultMessage: 'Export DB model' }),
|
||||||
},
|
},
|
||||||
isProApp() &&
|
isProApp() &&
|
||||||
driver?.databaseEngineTypes?.includes('sql') && {
|
driver?.databaseEngineTypes?.includes('sql') &&
|
||||||
|
hasPermission('dbops/chat') && {
|
||||||
onClick: handleDatabaseChat,
|
onClick: handleDatabaseChat,
|
||||||
text: _t('database.databaseChat', { defaultMessage: 'Database chat' }),
|
text: _t('database.databaseChat', { defaultMessage: 'Database chat' }),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -723,7 +723,8 @@ if (isProApp()) {
|
|||||||
icon: 'icon ai',
|
icon: 'icon ai',
|
||||||
testEnabled: () =>
|
testEnabled: () =>
|
||||||
getCurrentDatabase() != null &&
|
getCurrentDatabase() != null &&
|
||||||
findEngineDriver(getCurrentDatabase()?.connection, getExtensions())?.databaseEngineTypes?.includes('sql'),
|
findEngineDriver(getCurrentDatabase()?.connection, getExtensions())?.databaseEngineTypes?.includes('sql') &&
|
||||||
|
hasPermission('dbops/chat'),
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
openNewTab({
|
openNewTab({
|
||||||
title: 'Chat',
|
title: 'Chat',
|
||||||
|
|||||||
@@ -424,6 +424,7 @@
|
|||||||
import { _t } from '../translations';
|
import { _t } 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';
|
||||||
|
|
||||||
export let onLoadNextData = undefined;
|
export let onLoadNextData = undefined;
|
||||||
export let grider = undefined;
|
export let grider = undefined;
|
||||||
@@ -1848,6 +1849,7 @@
|
|||||||
// },
|
// },
|
||||||
isProApp() && { command: 'dataGrid.sendToDataDeploy' },
|
isProApp() && { command: 'dataGrid.sendToDataDeploy' },
|
||||||
isProApp() &&
|
isProApp() &&
|
||||||
|
hasPermission('dbops/charts') &&
|
||||||
onOpenChart && {
|
onOpenChart && {
|
||||||
text: 'Open chart',
|
text: 'Open chart',
|
||||||
onClick: () => onOpenChart(),
|
onClick: () => onOpenChart(),
|
||||||
|
|||||||
58
packages/web/src/forms/FormFileInputField.svelte
Normal file
58
packages/web/src/forms/FormFileInputField.svelte
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import SimpleFilesInput, { ProcessedFile } from '../impexp/SimpleFilesInput.svelte';
|
||||||
|
import { parseFileAsString } from '../utility/parseFileAsString';
|
||||||
|
import { getFormContext } from './FormProviderCore.svelte';
|
||||||
|
import { createEventDispatcher } from 'svelte';
|
||||||
|
|
||||||
|
export let label: string;
|
||||||
|
export let buttonLabel: string = 'Choose File';
|
||||||
|
export let name: string;
|
||||||
|
export let disabled: boolean = false;
|
||||||
|
export let accept: string = '.json,application/json';
|
||||||
|
export let templateProps = {};
|
||||||
|
|
||||||
|
const { template, setFieldValue, values } = getFormContext();
|
||||||
|
const dispatch = createEventDispatcher();
|
||||||
|
|
||||||
|
let fileName: string | null = null;
|
||||||
|
$: hasValue = $values?.[name] != null;
|
||||||
|
$: displayLabel = getDisplayLabel(buttonLabel, hasValue, fileName);
|
||||||
|
|
||||||
|
async function handleFileChange(fileData: ProcessedFile): Promise<void> {
|
||||||
|
const parseResult = await parseFileAsString(fileData.file);
|
||||||
|
|
||||||
|
if (parseResult.success) {
|
||||||
|
fileName = fileData.name;
|
||||||
|
setFieldValue(name, parseResult.data);
|
||||||
|
dispatch('change', {
|
||||||
|
success: true,
|
||||||
|
data: parseResult.data,
|
||||||
|
fileName: fileData.name,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
fileName = null;
|
||||||
|
setFieldValue(name, null);
|
||||||
|
dispatch('change', {
|
||||||
|
success: false,
|
||||||
|
error: parseResult.error,
|
||||||
|
fileName: fileData.name,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDisplayLabel(baseLabel: string, hasValue: boolean, fileName: string | null): string {
|
||||||
|
if (!hasValue) {
|
||||||
|
return baseLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fileName) {
|
||||||
|
return `${baseLabel} (${fileName})`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return `${baseLabel} (JSON loaded)`;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:component this={template} type="file" {label} {disabled} {...templateProps}>
|
||||||
|
<SimpleFilesInput label={displayLabel} {accept} {disabled} onChange={handleFileChange} {...$$restProps} />
|
||||||
|
</svelte:component>
|
||||||
@@ -18,9 +18,7 @@
|
|||||||
import FormDropDownTextField from '../forms/FormDropDownTextField.svelte';
|
import FormDropDownTextField from '../forms/FormDropDownTextField.svelte';
|
||||||
import { getConnectionLabel } from 'dbgate-tools';
|
import { getConnectionLabel } from 'dbgate-tools';
|
||||||
import { _t } from '../translations';
|
import { _t } from '../translations';
|
||||||
import FilesInput from '../impexp/FilesInput.svelte';
|
import FormFileInputField from '../forms/FormFileInputField.svelte';
|
||||||
import SimpleFilesInput from '../impexp/SimpleFilesInput.svelte';
|
|
||||||
import FormJsonFileInputField from '../forms/FormJsonFileInputField.svelte';
|
|
||||||
|
|
||||||
export let getDatabaseList;
|
export let getDatabaseList;
|
||||||
export let currentConnection;
|
export let currentConnection;
|
||||||
@@ -465,8 +463,8 @@
|
|||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if driver?.showConnectionField('certificateJson', $values, showConnectionFieldArgs)}
|
{#if driver?.showConnectionField('connectionDefinition', $values, showConnectionFieldArgs)}
|
||||||
<FormJsonFileInputField disabled={isConnected} label="Service account key JSON" name="certificateJson" />
|
<FormFileInputField disabled={isConnected} label="Service account key JSON" name="connectionDefinition" />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if driver}
|
{#if driver}
|
||||||
|
|||||||
@@ -154,6 +154,7 @@
|
|||||||
import RowsLimitModal from '../modals/RowsLimitModal.svelte';
|
import RowsLimitModal from '../modals/RowsLimitModal.svelte';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import FontIcon from '../icons/FontIcon.svelte';
|
import FontIcon from '../icons/FontIcon.svelte';
|
||||||
|
import hasPermission from '../utility/hasPermission';
|
||||||
|
|
||||||
export let tabid;
|
export let tabid;
|
||||||
export let conid;
|
export let conid;
|
||||||
@@ -794,7 +795,7 @@
|
|||||||
hideDisabled
|
hideDisabled
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{#if isProApp() && visibleResultTabs && !busy}
|
{#if isProApp() && visibleResultTabs && !busy && hasPermission('dbops/charts')}
|
||||||
<ToolStripButton
|
<ToolStripButton
|
||||||
icon="icon chart"
|
icon="icon chart"
|
||||||
data-testid="QueryTab_openChartButton"
|
data-testid="QueryTab_openChartButton"
|
||||||
@@ -805,7 +806,7 @@
|
|||||||
Open chart</ToolStripButton
|
Open chart</ToolStripButton
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
{#if isProApp() && !visibleResultTabs}
|
{#if isProApp() && !visibleResultTabs && hasPermission('dbops/charts')}
|
||||||
<ToolStripButton
|
<ToolStripButton
|
||||||
icon="icon chart"
|
icon="icon chart"
|
||||||
data-testid="QueryTab_detectChartButton"
|
data-testid="QueryTab_detectChartButton"
|
||||||
|
|||||||
@@ -1,26 +1,3 @@
|
|||||||
/**
|
|
||||||
* @template [T = any]
|
|
||||||
* @typedef {Object} FileParseResultSuccess
|
|
||||||
* @property {true} success
|
|
||||||
* @property {T} data
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {Object} FileParseResultError
|
|
||||||
* @property {false} success
|
|
||||||
* @property {string} error
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @template [T = any]
|
|
||||||
* @typedef {FileParseResultSuccess<T> | FileParseResultError} FileParseResult
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @template [T = any]
|
|
||||||
* @param {File} file
|
|
||||||
* @returns {Promise<FileParseResult<T>>}
|
|
||||||
*/
|
|
||||||
export async function parseFileAsJson(file) {
|
export async function parseFileAsJson(file) {
|
||||||
try {
|
try {
|
||||||
const text = await file.text();
|
const text = await file.text();
|
||||||
|
|||||||
15
packages/web/src/utility/parseFileAsString.js
Normal file
15
packages/web/src/utility/parseFileAsString.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
export async function parseFileAsString(file) {
|
||||||
|
try {
|
||||||
|
const text = await file.text();
|
||||||
|
const data = text;
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
data,
|
||||||
|
};
|
||||||
|
} catch (error) {
|
||||||
|
return {
|
||||||
|
success: false,
|
||||||
|
error: error instanceof Error ? error.message : 'Unknown parsing error',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Query designer</li>
|
<li>Query designer</li>
|
||||||
|
<li>AI powered database chat</li>
|
||||||
<li>Unlimited DbGate Cloud storage</li>
|
<li>Unlimited DbGate Cloud storage</li>
|
||||||
<li>Shared cloud folders</li>
|
<li>Shared cloud folders</li>
|
||||||
<li>Charts from query result</li>
|
<li>Charts from query result</li>
|
||||||
@@ -19,8 +20,7 @@
|
|||||||
<li>Backup & restore database</li>
|
<li>Backup & restore database</li>
|
||||||
<li>Advanced ER diagram settings</li>
|
<li>Advanced ER diagram settings</li>
|
||||||
<li>Export database model</li>
|
<li>Export database model</li>
|
||||||
<li>AI assistant</li>
|
<li>Firestore, libSQL, Turso, CosmosDB, Redshift support</li>
|
||||||
<li>libSQL, Turso, CosmosDB, Redshift support</li>
|
|
||||||
<li>Amazon and Azure identity providers</li>
|
<li>Amazon and Azure identity providers</li>
|
||||||
<li>E-mail support</li>
|
<li>E-mail support</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ checkout-and-merge-pro:
|
|||||||
repository: dbgate/dbgate-pro
|
repository: dbgate/dbgate-pro
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
path: dbgate-pro
|
path: dbgate-pro
|
||||||
ref: 8a4dc2732a7097b5c4c48b4feb62609111cdf3e0
|
ref: 36b6ce878c3c0a0c9623163c8a8b3bdeefc7da53
|
||||||
- name: Merge dbgate/dbgate-pro
|
- name: Merge dbgate/dbgate-pro
|
||||||
run: |
|
run: |
|
||||||
mkdir ../dbgate-pro
|
mkdir ../dbgate-pro
|
||||||
|
|||||||
Reference in New Issue
Block a user