diff --git a/package.json b/package.json index ef73fb35..1631b72e 100644 --- a/package.json +++ b/package.json @@ -110,6 +110,7 @@ "@turf/helpers": "^6.5.0", "@vscode/vscode-languagedetection": "^1.0.21", "ace-builds": "^1.4.13", + "async": "^3.2.3", "better-sqlite3": "^7.4.4", "electron-log": "^4.4.1", "electron-store": "^8.0.1", diff --git a/src/main/ipc-handlers/schema.js b/src/main/ipc-handlers/schema.js index 4ea05154..bcb69094 100644 --- a/src/main/ipc-handlers/schema.js +++ b/src/main/ipc-handlers/schema.js @@ -288,6 +288,9 @@ export default connections => { case 'import-progress': event.sender.send('import-progress', payload); break; + case 'query-error': + event.sender.send('query-error', payload); + break; case 'end': importer.kill(); importer = null; diff --git a/src/main/workers/importer.js b/src/main/workers/importer.js index 222d9490..840016d2 100644 --- a/src/main/workers/importer.js +++ b/src/main/workers/importer.js @@ -55,6 +55,13 @@ process.on('message', async ({ type, dbConfig, options }) => { }); }); + importer.on('query-error', state => { + process.send({ + type: 'query-error', + payload: state + }); + }); + importer.run(); } else if (type === 'cancel') diff --git a/src/renderer/components/ModalImportSchema.vue b/src/renderer/components/ModalImportSchema.vue index 729036d3..7fb715c5 100644 --- a/src/renderer/components/ModalImportSchema.vue +++ b/src/renderer/components/ModalImportSchema.vue @@ -13,12 +13,21 @@