multiauth refactor

This commit is contained in:
Jan Prochazka
2024-08-07 16:28:24 +02:00
parent e179b0f20b
commit 5f14da3844
10 changed files with 98 additions and 63 deletions

View File

@@ -13,8 +13,7 @@ const isDocker = fs.existsSync('/home/dbgate-docker/public');
const isDevMode = process.env.DEVMODE == '1';
const isNpmDist = !!global['IS_NPM_DIST'];
const isForkedApi = processArgs.isForkedApi;
const licenseError = checkLicense();
const isLicenseValid = licenseError == null;
const checkedLicense = checkLicense();
// function moduleAvailable(name) {
// try {
@@ -33,8 +32,8 @@ const platformInfo = {
isElectronBundle: isElectron() && !isDevMode,
isForkedApi,
isElectron: isElectron(),
isLicenseValid,
licenseError,
checkedLicense,
isLicenseValid: checkedLicense?.status == 'ok',
isDevMode,
isNpmDist,
isSnap: process.env.ELECTRON_SNAP == 'true',