mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-25 17:46:00 +00:00
SYNC: fix BE
This commit is contained in:
committed by
Diflow
parent
9230a2ab73
commit
e97c7ed32e
@@ -4,7 +4,7 @@ const { pluginsdir, packagedPluginsDir, getPluginBackendPath } = require('../uti
|
||||
const platformInfo = require('../utility/platformInfo');
|
||||
const authProxy = require('../utility/authProxy');
|
||||
const { getLogger } = require('dbgate-tools');
|
||||
const { isProApp } = require('../utility/checkLicense');
|
||||
//
|
||||
const logger = getLogger('requirePlugin');
|
||||
|
||||
const loadedPlugins = {};
|
||||
@@ -13,7 +13,10 @@ const dbgateEnv = {
|
||||
dbgateApi: null,
|
||||
platformInfo,
|
||||
authProxy,
|
||||
isProApp: isProApp()
|
||||
isProApp: () =>{
|
||||
const { isProApp } = require('../utility/checkLicense');
|
||||
return isProApp();
|
||||
}
|
||||
};
|
||||
function requirePlugin(packageName, requiredPlugin = null) {
|
||||
if (!packageName) throw new Error('Missing packageName in plugin');
|
||||
|
||||
@@ -186,7 +186,7 @@ const driver = {
|
||||
// saveScriptToDatabase({ conid: connection._id, database: name }, `db.createCollection('${newCollection}')`);
|
||||
},
|
||||
async stream(dbhan, sql, options) {
|
||||
if (isProApp) {
|
||||
if (isProApp()) {
|
||||
const { NodeDriverServiceProvider } = require('@mongosh/service-provider-node-driver');
|
||||
const { ElectronRuntime } = require('@mongosh/browser-runtime-electron');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user