mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
fix(Flatpak): import/export schema not working
This commit is contained in:
@@ -1,9 +1,8 @@
|
|||||||
import { ChildProcess, fork } from 'child_process';
|
import { ChildProcess, fork, spawn } from 'child_process';
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import * as workers from 'common/interfaces/workers';
|
import * as workers from 'common/interfaces/workers';
|
||||||
import { dialog, ipcMain } from 'electron';
|
import { dialog, ipcMain } from 'electron';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
|
||||||
|
|
||||||
import { validateSender } from '../libs/misc/validateSender';
|
import { validateSender } from '../libs/misc/validateSender';
|
||||||
|
|
||||||
@@ -209,11 +208,6 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
|
|
||||||
return new Promise((resolve/*, reject */) => {
|
return new Promise((resolve/*, reject */) => {
|
||||||
(async () => {
|
(async () => {
|
||||||
if (isFlatpak) {
|
|
||||||
resolve({ status: 'error', response: 'Temporarily unavailable on Flatpak' });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fs.existsSync(rest.outputFile)) { // If file exists ask for replace
|
if (fs.existsSync(rest.outputFile)) { // If file exists ask for replace
|
||||||
const result = await dialog.showMessageBox({
|
const result = await dialog.showMessageBox({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
@@ -234,11 +228,20 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Init exporter process
|
// Init exporter process
|
||||||
exporter = fork(isDevelopment ? './dist/exporter.js' : './exporter.js', [], {
|
if (isFlatpak) {
|
||||||
execArgv: isDevelopment ? ['--inspect=9224'] : undefined
|
exporter = spawn('flatpak-spawn', ['--watch-bus', '--host', 'node', './exporter.js'], {
|
||||||
});
|
shell: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
exporter = fork(isDevelopment ? './dist/exporter.js' : './exporter.js', [], {
|
||||||
|
execArgv: isDevelopment ? ['--inspect=9224'] : undefined,
|
||||||
|
silent: true
|
||||||
|
});
|
||||||
|
// exporter = spawn('node', [isDevelopment ? '--inspect=9224' : '', isDevelopment ? './dist/exporter.js' : './exporter.js']);
|
||||||
|
}
|
||||||
|
|
||||||
exporter.send({
|
exporter.stdin.write(JSON.stringify({
|
||||||
type: 'init',
|
type: 'init',
|
||||||
client: {
|
client: {
|
||||||
name: type,
|
name: type,
|
||||||
@@ -246,18 +249,31 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
},
|
},
|
||||||
tables,
|
tables,
|
||||||
options: rest
|
options: rest
|
||||||
});
|
}));
|
||||||
|
|
||||||
// Exporter message listener
|
// Exporter message listener
|
||||||
exporter.on('message', ({ type, payload }: workers.WorkerIpcMessage) => {
|
exporter.stdout.on('data', (buff: Buffer) => {
|
||||||
|
let message;
|
||||||
|
try { // Ignore non-JSON data (console.log output)
|
||||||
|
message = JSON.parse(buff.toString());
|
||||||
|
}
|
||||||
|
catch (_) {
|
||||||
|
if (process.env.NODE_ENV === 'development') console.log('EXPORTER:', buff.toString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { type, payload } = message as workers.WorkerIpcMessage;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'export-progress':
|
case 'export-progress':
|
||||||
event.sender.send('export-progress', payload);
|
event.sender.send('export-progress', payload);
|
||||||
break;
|
break;
|
||||||
case 'end':
|
case 'end':
|
||||||
setTimeout(() => { // Ensures that writing process has finished
|
setTimeout(() => { // Ensures that writing process has finished
|
||||||
exporter.kill();
|
if (exporter) {
|
||||||
exporter = null;
|
exporter.kill();
|
||||||
|
exporter = null;
|
||||||
|
}
|
||||||
}, 2000);
|
}, 2000);
|
||||||
resolve({ status: 'success', response: payload });
|
resolve({ status: 'success', response: payload });
|
||||||
break;
|
break;
|
||||||
@@ -274,7 +290,7 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
exporter.on('exit', code => {
|
exporter.on('close', code => {
|
||||||
exporter = null;
|
exporter = null;
|
||||||
resolve({ status: 'error', response: `Operation ended with code: ${code}` });
|
resolve({ status: 'error', response: `Operation ended with code: ${code}` });
|
||||||
});
|
});
|
||||||
@@ -298,7 +314,7 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
|
|
||||||
if (result.response === 1) {
|
if (result.response === 1) {
|
||||||
willAbort = true;
|
willAbort = true;
|
||||||
exporter.send({ type: 'cancel' });
|
exporter.stdin.write(JSON.stringify({ type: 'cancel' }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -315,26 +331,40 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
|
|
||||||
return new Promise((resolve/*, reject */) => {
|
return new Promise((resolve/*, reject */) => {
|
||||||
(async () => {
|
(async () => {
|
||||||
if (isFlatpak) {
|
|
||||||
resolve({ status: 'warning', response: 'Temporarily unavailable on Flatpak' });
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const dbConfig = await connections[options.uid].getDbConfig();
|
const dbConfig = await connections[options.uid].getDbConfig();
|
||||||
|
|
||||||
// Init importer process
|
// Init importer process
|
||||||
importer = fork(isDevelopment ? './dist/importer.js' : path.resolve(__dirname, './importer.js'), [], {
|
if (isFlatpak) {
|
||||||
execArgv: isDevelopment ? ['--inspect=9224'] : undefined
|
importer = spawn('flatpak-spawn', ['--watch-bus', 'node', './importer.js'], {
|
||||||
});
|
cwd: __dirname
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
importer = fork(isDevelopment ? './dist/importer.js' : './importer.js', [], {
|
||||||
|
execArgv: isDevelopment ? ['--inspect=9224'] : undefined,
|
||||||
|
silent: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
importer.send({
|
importer.stdin.write(JSON.stringify({
|
||||||
type: 'init',
|
type: 'init',
|
||||||
dbConfig,
|
dbConfig,
|
||||||
options
|
options
|
||||||
});
|
}));
|
||||||
|
|
||||||
// Importer message listener
|
// Importer message listener
|
||||||
importer.on('message', ({ type, payload }: workers.WorkerIpcMessage) => {
|
importer.stdout.on('data', (buff: Buffer) => {
|
||||||
|
let message;
|
||||||
|
try { // Ignore non-JSON data (console.log output)
|
||||||
|
message = JSON.parse(buff.toString());
|
||||||
|
}
|
||||||
|
catch (_) {
|
||||||
|
if (process.env.NODE_ENV === 'development') console.log('IMPORTER:', buff.toString());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { type, payload } = message as workers.WorkerIpcMessage;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 'import-progress':
|
case 'import-progress':
|
||||||
event.sender.send('import-progress', payload);
|
event.sender.send('import-progress', payload);
|
||||||
@@ -362,7 +392,7 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
importer.on('exit', code => {
|
importer.on('close', code => {
|
||||||
importer = null;
|
importer = null;
|
||||||
resolve({ status: 'error', response: `Operation ended with code: ${code}` });
|
resolve({ status: 'error', response: `Operation ended with code: ${code}` });
|
||||||
});
|
});
|
||||||
@@ -386,7 +416,7 @@ export default (connections: {[key: string]: antares.Client}) => {
|
|||||||
|
|
||||||
if (result.response === 1) {
|
if (result.response === 1) {
|
||||||
willAbort = true;
|
willAbort = true;
|
||||||
importer.send({ type: 'cancel' });
|
importer.stdin.write(JSON.stringify({ type: 'cancel' }));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -10,7 +10,7 @@ const queryLogger = ({ sql, cUid }: {sql: string; cUid: string}) => {
|
|||||||
const mainWindow = require('electron').webContents.fromId(1);
|
const mainWindow = require('electron').webContents.fromId(1);
|
||||||
mainWindow.send('query-log', { cUid, sql: escapedSql, date: new Date() });
|
mainWindow.send('query-log', { cUid, sql: escapedSql, date: new Date() });
|
||||||
}
|
}
|
||||||
if (process.env.NODE_ENV === 'development') console.log(escapedSql);
|
if (process.env.NODE_ENV === 'development' && process.type === 'browser') console.log(escapedSql);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
import * as exporter from 'common/interfaces/exporter';
|
import * as exporter from 'common/interfaces/exporter';
|
||||||
import { valueToSqlString } from 'common/libs/sqlUtils';
|
import { valueToSqlString } from 'common/libs/sqlUtils';
|
||||||
import * as mysql from 'mysql2/promise';
|
|
||||||
|
|
||||||
import { MySQLClient } from '../../clients/MySQLClient';
|
import { MySQLClient } from '../../clients/MySQLClient';
|
||||||
import { SqlExporter } from './SqlExporter';
|
import { SqlExporter } from './SqlExporter';
|
||||||
@@ -334,12 +333,10 @@ CREATE TABLE \`${view.Name}\`(
|
|||||||
}
|
}
|
||||||
|
|
||||||
async _queryStream (sql: string) {
|
async _queryStream (sql: string) {
|
||||||
if (process.env.NODE_ENV === 'development') console.log('EXPORTER:', sql);
|
const connection = await this._client.getConnection();
|
||||||
const isPool = 'getConnection' in this._client._connection;
|
|
||||||
const connection = isPool ? await (this._client._connection as mysql.Pool).getConnection() : this._client._connection;
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const stream = (connection as any).connection.query(sql).stream();
|
const stream = (connection as any).connection.query(sql).stream();
|
||||||
const dispose = () => (connection as mysql.PoolConnection).release();
|
const dispose = () => connection.end();
|
||||||
|
|
||||||
stream.on('end', dispose);
|
stream.on('end', dispose);
|
||||||
stream.on('error', dispose);
|
stream.on('error', dispose);
|
||||||
|
@@ -425,7 +425,6 @@ SET row_security = off;\n\n\n`;
|
|||||||
}
|
}
|
||||||
|
|
||||||
async _queryStream (sql: string) {
|
async _queryStream (sql: string) {
|
||||||
if (process.env.NODE_ENV === 'development') console.log('EXPORTER:', sql);
|
|
||||||
const connection = await this._client.getConnection();
|
const connection = await this._client.getConnection();
|
||||||
const query = new QueryStream(sql, null);
|
const query = new QueryStream(sql, null);
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
@@ -33,8 +33,8 @@ export default class MySQLImporter extends BaseImporter {
|
|||||||
parser.on('error', reject);
|
parser.on('error', reject);
|
||||||
|
|
||||||
parser.on('close', async () => {
|
parser.on('close', async () => {
|
||||||
console.log('TOTAL QUERIES', queryCount);
|
// console.log('TOTAL QUERIES', queryCount);
|
||||||
console.log('import end');
|
// console.log('import end');
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -33,8 +33,8 @@ export default class PostgreSQLImporter extends BaseImporter {
|
|||||||
parser.on('error', reject);
|
parser.on('error', reject);
|
||||||
|
|
||||||
parser.on('close', async () => {
|
parser.on('close', async () => {
|
||||||
console.log('TOTAL QUERIES', queryCount);
|
// console.log('TOTAL QUERIES', queryCount);
|
||||||
console.log('import end');
|
// console.log('import end');
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import * as log from 'electron-log/main';
|
import * as log from 'electron-log/main';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
import { nextTick } from 'process';
|
||||||
|
|
||||||
import { MySQLClient } from '../libs/clients/MySQLClient';
|
import { MySQLClient } from '../libs/clients/MySQLClient';
|
||||||
import { PostgreSQLClient } from '../libs/clients/PostgreSQLClient';
|
import { PostgreSQLClient } from '../libs/clients/PostgreSQLClient';
|
||||||
@@ -10,10 +11,12 @@ import PostgreSQLExporter from '../libs/exporters/sql/PostgreSQLExporter';
|
|||||||
let exporter: antares.Exporter;
|
let exporter: antares.Exporter;
|
||||||
|
|
||||||
log.transports.file.fileName = 'workers.log';
|
log.transports.file.fileName = 'workers.log';
|
||||||
|
log.transports.console = null;
|
||||||
log.errorHandler.startCatching();
|
log.errorHandler.startCatching();
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
process.stdin.on('data', async buff => {
|
||||||
process.on('message', async ({ type, client, tables, options }: any) => {
|
const { type, client, tables, options } = JSON.parse(buff.toString());
|
||||||
|
|
||||||
if (type === 'init') {
|
if (type === 'init') {
|
||||||
try {
|
try {
|
||||||
const connection = await ClientsFactory.getClient({
|
const connection = await ClientsFactory.getClient({
|
||||||
@@ -32,49 +35,53 @@ process.on('message', async ({ type, client, tables, options }: any) => {
|
|||||||
exporter = new PostgreSQLExporter(connection as PostgreSQLClient, tables, options);
|
exporter = new PostgreSQLExporter(connection as PostgreSQLClient, tables, options);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
process.send({
|
process.stdout.write(JSON.stringify({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
payload: `"${client.name}" exporter not aviable`
|
payload: `"${client.name}" exporter not aviable`
|
||||||
});
|
}));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
exporter.once('error', err => {
|
exporter.once('error', err => {
|
||||||
log.error(err.toString());
|
log.error(err.toString());
|
||||||
process.send({
|
process.stdout.write(JSON.stringify({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
payload: err.toString()
|
payload: err.toString()
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
exporter.once('end', () => {
|
exporter.once('end', () => {
|
||||||
process.send({
|
nextTick(() => {
|
||||||
type: 'end',
|
process.stdout.write(JSON.stringify({
|
||||||
payload: { cancelled: exporter.isCancelled }
|
type: 'end',
|
||||||
|
payload: { cancelled: exporter.isCancelled }
|
||||||
|
}));
|
||||||
|
connection.destroy();
|
||||||
});
|
});
|
||||||
connection.destroy();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
exporter.once('cancel', () => {
|
exporter.once('cancel', () => {
|
||||||
fs.unlinkSync(exporter.outputFile);
|
nextTick(() => {
|
||||||
process.send({ type: 'cancel' });
|
fs.unlinkSync(exporter.outputFile);
|
||||||
|
process.stdout.write(JSON.stringify({ type: 'cancel' }));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
exporter.on('progress', state => {
|
exporter.on('progress', state => {
|
||||||
process.send({
|
process.stdout.write(JSON.stringify({
|
||||||
type: 'export-progress',
|
type: 'export-progress',
|
||||||
payload: state
|
payload: state
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
exporter.run();
|
exporter.run();
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
log.error(err.toString());
|
log.error(err.toString());
|
||||||
process.send({
|
process.stdout.write(JSON.stringify({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
payload: err.toString()
|
payload: err.toString()
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (type === 'cancel')
|
else if (type === 'cancel')
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
import SSHConfig from '@fabio286/ssh2-promise/lib/sshConfig';
|
|
||||||
import * as antares from 'common/interfaces/antares';
|
import * as antares from 'common/interfaces/antares';
|
||||||
import { ImportOptions } from 'common/interfaces/importer';
|
|
||||||
import * as log from 'electron-log/main';
|
import * as log from 'electron-log/main';
|
||||||
import * as mysql from 'mysql2';
|
import * as mysql from 'mysql2';
|
||||||
import * as pg from 'pg';
|
import * as pg from 'pg';
|
||||||
@@ -13,16 +11,12 @@ import PostgreSQLImporter from '../libs/importers/sql/PostgreSQLImporter';
|
|||||||
let importer: antares.Importer;
|
let importer: antares.Importer;
|
||||||
|
|
||||||
log.transports.file.fileName = 'workers.log';
|
log.transports.file.fileName = 'workers.log';
|
||||||
|
log.transports.console = null;
|
||||||
log.errorHandler.startCatching();
|
log.errorHandler.startCatching();
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
process.stdin.on('data', async (buff: Buffer) => {
|
||||||
process.on('message', async ({ type, dbConfig, options }: {
|
const { type, dbConfig, options } = JSON.parse(buff.toString());
|
||||||
type: string;
|
|
||||||
dbConfig: mysql.ConnectionOptions & { schema: string; ssl?: mysql.SslOptions; ssh?: SSHConfig; readonly: boolean }
|
|
||||||
| pg.ClientConfig & { schema: string; ssl?: mysql.SslOptions; ssh?: SSHConfig; readonly: boolean }
|
|
||||||
| { databasePath: string; readonly: boolean };
|
|
||||||
options: ImportOptions;
|
|
||||||
}) => {
|
|
||||||
if (type === 'init') {
|
if (type === 'init') {
|
||||||
try {
|
try {
|
||||||
const connection = await ClientsFactory.getClient({
|
const connection = await ClientsFactory.getClient({
|
||||||
@@ -45,54 +39,54 @@ process.on('message', async ({ type, dbConfig, options }: {
|
|||||||
importer = new PostgreSQLImporter(pool as unknown as pg.PoolClient, options);
|
importer = new PostgreSQLImporter(pool as unknown as pg.PoolClient, options);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
process.send({
|
process.stdout.write(JSON.stringify({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
payload: `"${options.type}" importer not aviable`
|
payload: `"${options.type}" importer not aviable`
|
||||||
});
|
}));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
importer.once('error', err => {
|
importer.once('error', err => {
|
||||||
log.error(err.toString());
|
log.error(err.toString());
|
||||||
process.send({
|
process.stdout.write(JSON.stringify({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
payload: err.toString()
|
payload: err.toString()
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
importer.once('end', () => {
|
importer.once('end', () => {
|
||||||
process.send({
|
process.stdout.write(JSON.stringify({
|
||||||
type: 'end',
|
type: 'end',
|
||||||
payload: { cancelled: importer.isCancelled }
|
payload: { cancelled: importer.isCancelled }
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
importer.once('cancel', () => {
|
importer.once('cancel', () => {
|
||||||
process.send({ type: 'cancel' });
|
process.stdout.write(JSON.stringify({ type: 'cancel' }));
|
||||||
});
|
});
|
||||||
|
|
||||||
importer.on('progress', state => {
|
importer.on('progress', state => {
|
||||||
process.send({
|
process.stdout.write(JSON.stringify({
|
||||||
type: 'import-progress',
|
type: 'import-progress',
|
||||||
payload: state
|
payload: state
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
importer.on('query-error', state => {
|
importer.on('query-error', state => {
|
||||||
process.send({
|
process.stdout.write(JSON.stringify({
|
||||||
type: 'query-error',
|
type: 'query-error',
|
||||||
payload: state
|
payload: state
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
importer.run();
|
importer.run();
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
log.error(err.toString());
|
log.error(err.toString());
|
||||||
process.send({
|
process.stdout.write(JSON.stringify({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
payload: err.toString()
|
payload: err.toString()
|
||||||
});
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (type === 'cancel')
|
else if (type === 'cancel')
|
||||||
|
@@ -2,9 +2,18 @@ import * as Store from 'electron-store';
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
const persistentStore = new Store({ name: 'notes' });
|
const persistentStore = new Store({ name: 'notes' });
|
||||||
|
|
||||||
|
export interface ConnectionNote {
|
||||||
|
uid: string;
|
||||||
|
note: string;
|
||||||
|
date: Date;
|
||||||
|
}
|
||||||
|
|
||||||
export const useScratchpadStore = defineStore('scratchpad', {
|
export const useScratchpadStore = defineStore('scratchpad', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
notes: persistentStore.get('notes', '# HOW TO SUPPORT ANTARES\n\n- [ ] Leave a star to Antares [GitHub repo](https://github.com/antares-sql/antares)\n- [ ] Send feedbacks and advices\n- [ ] Report for bugs\n- [ ] If you enjoy, share Antares with friends\n\n# ABOUT SCRATCHPAD\n\nThis is a scratchpad where you can save your **personal notes**. It supports `markdown` format, but you are free to use plain text.\nThis content is just a placeholder, feel free to clear it to make space for your notes.\n') as string
|
/** Global notes */
|
||||||
|
notes: persistentStore.get('notes', '# HOW TO SUPPORT ANTARES\n\n- [ ] Leave a star to Antares [GitHub repo](https://github.com/antares-sql/antares)\n- [ ] Send feedbacks and advices\n- [ ] Report for bugs\n- [ ] If you enjoy, share Antares with friends\n\n# ABOUT SCRATCHPAD\n\nThis is a scratchpad where you can save your **personal notes**. It supports `markdown` format, but you are free to use plain text.\nThis content is just a placeholder, feel free to clear it to make space for your notes.\n') as string,
|
||||||
|
/** Connection specific notes */
|
||||||
|
connectionNotes: persistentStore.get('connectionNotes', {}) as {[k: string]: ConnectionNote}
|
||||||
}),
|
}),
|
||||||
actions: {
|
actions: {
|
||||||
changeNotes (notes: string) {
|
changeNotes (notes: string) {
|
||||||
|
Reference in New Issue
Block a user