@aliyun-obv/app-loader
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -168,3 +168,11 @@ var __defProp = Object.defineProperty; | ||
return loader$3.load(id, () => __async(void 0, null, function* () { | ||
var _a2; | ||
try { | ||
if ((_a2 = window == null ? void 0 : window.ALIYUN_SLS_CONSOLE_CONFIG) == null ? void 0 : _a2.isSlsConsole) { | ||
const appConfig = window.ALIYUN_SLS_CONSOLE_CONFIG.appConfig; | ||
if (appConfig) { | ||
return appConfig; | ||
} | ||
console.error(`obviz-app: get app config error in sls console, fall back to default`); | ||
} | ||
const domain = getObvDomain(); | ||
@@ -269,3 +277,3 @@ const getDefaultOptions = { | ||
return __async(this, null, function* () { | ||
var _a2, _b2; | ||
var _a2, _b2, _c2; | ||
try { | ||
@@ -282,4 +290,3 @@ const domain = getSLSdomain(); | ||
const config = (_b2 = (_a2 = data == null ? void 0 : data.data) == null ? void 0 : _a2.ALIYUN_SLS_CONSOLE_CONFIG) != null ? _b2 : {}; | ||
window.ALIYUN_SLS_CONSOLE_CONFIG = __spreadValues({}, config); | ||
window.ALIYUN_SLS_CONSOLE_LINKS = __spreadValues({}, config); | ||
window.ALIYUN_SLS_CONSOLE_CONFIG = __spreadValues(__spreadValues({}, (_c2 = window.ALIYUN_SLS_CONSOLE_CONFIG) != null ? _c2 : {}), config); | ||
return config; | ||
@@ -358,2 +365,6 @@ } else { | ||
return loader.load(id, () => __async(void 0, null, function* () { | ||
var _a2; | ||
if ((_a2 = window == null ? void 0 : window.ALIYUN_SLS_CONSOLE_CONFIG) == null ? void 0 : _a2.isSlsConsole) { | ||
return; | ||
} | ||
const config = yield initSLS(); | ||
@@ -360,0 +371,0 @@ yield loadResource( |
@@ -16,3 +16,3 @@ { | ||
"devDependencies": {}, | ||
"version": "0.3.5" | ||
"version": "0.3.6" | ||
} |
Sorry, the diff of this file is not supported yet
68985
1403