@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.
Files changed (2) hide show
  1. package/dist/api.es.js +13 -10
  2. 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://log4finance.${suffix}`;
284
+ return `https://cmsnext.${suffix}`;
285
285
  }
286
286
  if (is4Service(window.location)) {
287
- return `https://sls4service.${suffix}`;
287
+ return `https://cmsnext4service.${suffix}`;
288
288
  }
289
- return `https://sls.${suffix}`;
289
+ return `https://cmsnext.${suffix}`;
290
290
  } else {
291
291
  if (is4Finance(window.location)) {
292
- return `https://cmsnext.${suffix}`;
292
+ return `https://log4finance.${suffix}`;
293
293
  }
294
294
  if (is4Service(window.location)) {
295
- return `https://cmsnext4service.${suffix}`;
295
+ return `https://sls4service.${suffix}`;
296
296
  }
297
- return `https://cmsnext.${suffix}`;
297
+ return `https://sls.${suffix}`;
298
298
  }
299
299
  }
300
300
  function getConsoleDomain(isObv = true) {
301
- var _a, _b, _c, _d, _e, _f, _g;
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, suffix);
318
+ return getPreConfig(isObv, hostSuffix);
316
319
  }
317
- return getProdConfig(isObv, suffix);
320
+ return getProdConfig(isObv, hostSuffix);
318
321
  }
319
322
  function getSLSdomain() {
320
323
  return getConsoleDomain(false);
package/package.json CHANGED
@@ -15,5 +15,5 @@
15
15
  "styled-components": "^5.2.0",
16
16
  "urijs": "^1.19.1"
17
17
  },
18
- "version": "0.4.0-beta.0"
18
+ "version": "0.4.0-beta.2"
19
19
  }