diff --git a/src/main/ipc-handlers/schema.ts b/src/main/ipc-handlers/schema.ts index 826635bd..7871c86d 100644 --- a/src/main/ipc-handlers/schema.ts +++ b/src/main/ipc-handlers/schema.ts @@ -237,7 +237,7 @@ export default (connections: {[key: string]: antares.Client}) => { }, tables, options: rest - })); + }); // Exporter message listener exporter.stdout.on('data', (buff: Buffer) => { @@ -328,7 +328,7 @@ export default (connections: {[key: string]: antares.Client}) => { type: 'init', dbConfig, options - })); + }); // Importer message listener importer.stdout.on('data', (buff: Buffer) => { diff --git a/src/main/workers/exporter.ts b/src/main/workers/exporter.ts index 599b480b..feb0de75 100644 --- a/src/main/workers/exporter.ts +++ b/src/main/workers/exporter.ts @@ -39,7 +39,7 @@ const exportHandler = async (data: any) => { parentPort.postMessage({ type: 'error', payload: `"${client.name}" exporter not aviable` - })); + }); return; } @@ -48,7 +48,7 @@ const exportHandler = async (data: any) => { parentPort.postMessage({ type: 'error', payload: err.toString() - })); + }); }); exporter.once('end', () => { @@ -67,7 +67,7 @@ const exportHandler = async (data: any) => { parentPort.postMessage({ type: 'export-progress', payload: state - })); + }); }); exporter.run(); @@ -77,7 +77,7 @@ const exportHandler = async (data: any) => { parentPort.postMessage({ type: 'error', payload: err.toString() - })); + }); } } else if (type === 'cancel') diff --git a/src/main/workers/importer.ts b/src/main/workers/importer.ts index 0d7992ab..5003d924 100644 --- a/src/main/workers/importer.ts +++ b/src/main/workers/importer.ts @@ -1,4 +1,6 @@ +import SSHConfig from '@fabio286/ssh2-promise/lib/sshConfig'; import * as antares from 'common/interfaces/antares'; +import { ImportOptions } from 'common/interfaces/importer'; import * as log from 'electron-log/main'; import * as mysql from 'mysql2'; import * as pg from 'pg'; @@ -48,7 +50,7 @@ const importHandler = async (data: { parentPort.postMessage({ type: 'error', payload: `"${options.type}" importer not aviable` - })); + }); return; } @@ -57,14 +59,14 @@ const importHandler = async (data: { parentPort.postMessage({ type: 'error', payload: err.toString() - })); + }); }); importer.once('end', () => { parentPort.postMessage({ type: 'end', payload: { cancelled: importer.isCancelled } - })); + }); }); importer.once('cancel', () => { @@ -75,14 +77,14 @@ const importHandler = async (data: { parentPort.postMessage({ type: 'import-progress', payload: state - })); + }); }); importer.on('query-error', state => { parentPort.postMessage({ type: 'query-error', payload: state - })); + }); }); importer.run(); @@ -92,7 +94,7 @@ const importHandler = async (data: { parentPort.postMessage({ type: 'error', payload: err.toString() - })); + }); } } else if (type === 'cancel')