@aliyun-obv/api 0.0.54 → 0.0.56
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 +14 -2
- package/package.json +3 -3
package/dist/api.es.js
CHANGED
|
@@ -701,9 +701,21 @@ var __async$3 = (__this, __arguments, generator) => {
|
|
|
701
701
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
702
702
|
});
|
|
703
703
|
};
|
|
704
|
+
function getSlsBaseUrl() {
|
|
705
|
+
var _a, _b;
|
|
706
|
+
const host = window.location.host;
|
|
707
|
+
if (host.includes("sls") && host.includes("console.aliyun.com")) {
|
|
708
|
+
return void 0;
|
|
709
|
+
}
|
|
710
|
+
if (((_a = window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _a.ENV) === "pre" || ((_b = window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _b.fEnv) === "pre") {
|
|
711
|
+
return `https://pre-sls.console.aliyun.com`;
|
|
712
|
+
}
|
|
713
|
+
return `https://sls.console.aliyun.com`;
|
|
714
|
+
}
|
|
704
715
|
const slsEasyFetch = new BaseFetch(finalFetch);
|
|
705
716
|
slsEasyFetch.defaults.postDefaultInit.headers["Content-Type"] = "application/x-www-form-urlencoded";
|
|
706
717
|
slsEasyFetch.defaults.postDefaultInit.headers["Accept"] = "application/json";
|
|
718
|
+
slsEasyFetch.defaults.baseURL = getSlsBaseUrl();
|
|
707
719
|
slsEasyFetch.defaults.errorHandler = errorHandler;
|
|
708
720
|
slsEasyFetch.defaults.beforeRequest = (url, params, init, options) => __async$3(void 0, null, function* () {
|
|
709
721
|
var _a;
|
|
@@ -765,11 +777,11 @@ slsEasyFetch.defaults.afterResponse = (r, options) => __async$3(void 0, null, fu
|
|
|
765
777
|
});
|
|
766
778
|
|
|
767
779
|
function getBaseUrl() {
|
|
768
|
-
var _a, _b;
|
|
780
|
+
var _a, _b, _c;
|
|
769
781
|
if ((_a = window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _a.LOCAL) {
|
|
770
782
|
return `http://pre-observability:${window.location.port}`;
|
|
771
783
|
}
|
|
772
|
-
if (((_b = window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _b.ENV) === "pre") {
|
|
784
|
+
if (((_b = window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _b.ENV) === "pre" || ((_c = window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _c.fEnv) === "pre") {
|
|
773
785
|
return `https://pre-observability.console.aliyun.com`;
|
|
774
786
|
}
|
|
775
787
|
return `https://observability.console.aliyun.com`;
|
package/package.json
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"urijs": "^1.19.1",
|
|
11
11
|
"lodash": "^4.17.21",
|
|
12
12
|
"@alicloud/console-base-error-prompt-proxy": "^1.9.12",
|
|
13
|
-
"@aliyun-obv/i18n": "0.0.
|
|
14
|
-
"@aliyun-obv/utils": "0.0.
|
|
13
|
+
"@aliyun-obv/i18n": "0.0.56",
|
|
14
|
+
"@aliyun-obv/utils": "0.0.56",
|
|
15
15
|
"@alifd/next": "^1.27.11",
|
|
16
16
|
"styled-components": "^5.2.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {},
|
|
19
|
-
"version": "0.0.
|
|
19
|
+
"version": "0.0.56"
|
|
20
20
|
}
|