@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.
Files changed (2) hide show
  1. package/dist/api.es.js +7 -4
  2. 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, _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.1"
19
19
  }