@aliyun-obv/api 0.4.0-beta.0 → 0.4.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.es.js +7 -4
- package/package.json +1 -1
package/dist/api.es.js
CHANGED
|
@@ -298,7 +298,7 @@ function getProdConfig(isObv, suffix) {
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
function getConsoleDomain(isObv = true) {
|
|
301
|
-
var _a, _b, _c, _d, _e, _f
|
|
301
|
+
var _a, _b, _c, _d, _e, _f;
|
|
302
302
|
if ((_a = window == null ? void 0 : window.__CONSOLE_OBVIZ_DOMAIN__) == null ? void 0 : _a.getConsoleDomain) {
|
|
303
303
|
return window.__CONSOLE_OBVIZ_DOMAIN__.getConsoleDomain();
|
|
304
304
|
}
|
|
@@ -309,12 +309,15 @@ function getConsoleDomain(isObv = true) {
|
|
|
309
309
|
if (((_b = window == null ? void 0 : window.ALIYUN_SLS_CONSOLE_CONFIG) == null ? void 0 : _b.isSlsConsole) || ((_c = window == null ? void 0 : window.ALIYUN_OBSERVABILITY_CONSOLE_CONFIG) == null ? void 0 : _c.isCmsConsole) || host.includes("sls") && host.includes("console.aliyun.com")) {
|
|
310
310
|
return void 0;
|
|
311
311
|
}
|
|
312
|
+
const windowDomain = (_f = (_d = window == null ? void 0 : window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _d.SLS_CONSOLE_DOMAIN) != null ? _f : (_e = window == null ? void 0 : window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _e.CMS_CONSOLE_DOMAIN;
|
|
313
|
+
if (windowDomain) {
|
|
314
|
+
return `https://${windowDomain}`;
|
|
315
|
+
}
|
|
312
316
|
const hostSuffix = window.location.hostname.includes("alibabacloud") ? "console.alibabacloud.com" : "console.aliyun.com";
|
|
313
|
-
const suffix = (_g = (_f = (_d = window == null ? void 0 : window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _d.SLS_CONSOLE_DOMAIN) != null ? _f : (_e = window == null ? void 0 : window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _e.CMS_CONSOLE_DOMAIN) != null ? _g : hostSuffix;
|
|
314
317
|
if (isPre()) {
|
|
315
|
-
return getPreConfig(isObv,
|
|
318
|
+
return getPreConfig(isObv, hostSuffix);
|
|
316
319
|
}
|
|
317
|
-
return getProdConfig(isObv,
|
|
320
|
+
return getProdConfig(isObv, hostSuffix);
|
|
318
321
|
}
|
|
319
322
|
function getSLSdomain() {
|
|
320
323
|
return getConsoleDomain(false);
|
package/package.json
CHANGED