@aliyun-obv/api 0.4.0-beta.0 → 0.4.0-beta.2
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 +13 -10
- package/package.json +1 -1
package/dist/api.es.js
CHANGED
|
@@ -281,24 +281,24 @@ function getPreConfig(isObv, suffix) {
|
|
|
281
281
|
function getProdConfig(isObv, suffix) {
|
|
282
282
|
if (isObv) {
|
|
283
283
|
if (is4Finance(window.location)) {
|
|
284
|
-
return `https://
|
|
284
|
+
return `https://cmsnext.${suffix}`;
|
|
285
285
|
}
|
|
286
286
|
if (is4Service(window.location)) {
|
|
287
|
-
return `https://
|
|
287
|
+
return `https://cmsnext4service.${suffix}`;
|
|
288
288
|
}
|
|
289
|
-
return `https://
|
|
289
|
+
return `https://cmsnext.${suffix}`;
|
|
290
290
|
} else {
|
|
291
291
|
if (is4Finance(window.location)) {
|
|
292
|
-
return `https://
|
|
292
|
+
return `https://log4finance.${suffix}`;
|
|
293
293
|
}
|
|
294
294
|
if (is4Service(window.location)) {
|
|
295
|
-
return `https://
|
|
295
|
+
return `https://sls4service.${suffix}`;
|
|
296
296
|
}
|
|
297
|
-
return `https://
|
|
297
|
+
return `https://sls.${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