From c0d0a0061525735b4a26294fff828eeb1e60ae57 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Mon, 8 Feb 2021 19:21:35 +0100 Subject: [PATCH] try to fix electron export --- packages/api/src/index.js | 4 ++-- packages/dbgate/bin/dbgate.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 packages/dbgate/bin/dbgate.js diff --git a/packages/api/src/index.js b/packages/api/src/index.js index be318b74..8f740c07 100644 --- a/packages/api/src/index.js +++ b/packages/api/src/index.js @@ -1,5 +1,4 @@ const shell = require('./shell'); -const main = require('./main'); const argument = process.argv[2]; if (argument && argument.endsWith('Process')) { @@ -8,11 +7,12 @@ if (argument && argument.endsWith('Process')) { const module = proc[argument]; module.start(); } else if (!module['parent'] && !process.argv.includes('--checkParent')) { + const main = require('./main'); main.start(argument); } module.exports = { ...shell, - mainModule: main, + getMainModule: () => require('./main'), }; diff --git a/packages/dbgate/bin/dbgate.js b/packages/dbgate/bin/dbgate.js old mode 100644 new mode 100755 index 3e9a13a2..be7f1240 --- a/packages/dbgate/bin/dbgate.js +++ b/packages/dbgate/bin/dbgate.js @@ -2,4 +2,4 @@ const dbgateApi = require('dbgate-api'); -dbgateApi.mainModule.start('startNodeWeb'); +dbgateApi.getMainModule().start('startNodeWeb');