refactor: Remove hasValidLicense check from static apps list
This commit is contained in:
@@ -5,7 +5,6 @@ import cloneDeep from 'lodash/cloneDeep.js';
|
|||||||
import addAuthenticationSteps from './add-authentication-steps.js';
|
import addAuthenticationSteps from './add-authentication-steps.js';
|
||||||
import addReconnectionSteps from './add-reconnection-steps.js';
|
import addReconnectionSteps from './add-reconnection-steps.js';
|
||||||
import { fileURLToPath, pathToFileURL } from 'url';
|
import { fileURLToPath, pathToFileURL } from 'url';
|
||||||
import { hasValidLicense } from './license.ee.js';
|
|
||||||
|
|
||||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||||
|
|
||||||
@@ -17,7 +16,7 @@ const apps = fs
|
|||||||
const indexPath = join(__dirname, '../apps', dirent.name, 'index.js');
|
const indexPath = join(__dirname, '../apps', dirent.name, 'index.js');
|
||||||
const indexEePath = join(__dirname, '../apps', dirent.name, 'index.ee.js');
|
const indexEePath = join(__dirname, '../apps', dirent.name, 'index.ee.js');
|
||||||
|
|
||||||
if (fs.existsSync(indexEePath) && hasValidLicense()) {
|
if (fs.existsSync(indexEePath)) {
|
||||||
apps[dirent.name] = import(pathToFileURL(indexEePath));
|
apps[dirent.name] = import(pathToFileURL(indexEePath));
|
||||||
} else {
|
} else {
|
||||||
apps[dirent.name] = import(pathToFileURL(indexPath));
|
apps[dirent.name] = import(pathToFileURL(indexPath));
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ class App {
|
|||||||
|
|
||||||
for (const dir of directories) {
|
for (const dir of directories) {
|
||||||
const appData = await getApp(dir, true);
|
const appData = await getApp(dir, true);
|
||||||
|
|
||||||
if (!appData.enterprise) {
|
if (!appData.enterprise) {
|
||||||
nonEnterpriseApps.push(dir);
|
nonEnterpriseApps.push(dir);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user