@aliyun-obv/api 0.3.25 → 0.3.26
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 +9 -7
- package/package.json +1 -1
package/dist/api.es.js
CHANGED
|
@@ -210,9 +210,9 @@ class BaseFetch {
|
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
var _a$1, _b, _c;
|
|
213
|
+
var _a$1, _b$1, _c;
|
|
214
214
|
const isLocal = (_a$1 = window == null ? void 0 : window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _a$1.LOCAL;
|
|
215
|
-
const isPre = ((_b = window == null ? void 0 : window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _b.fEnv) === "pre" || ((_c = window == null ? void 0 : window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _c.ENV) === "pre";
|
|
215
|
+
const isPre = ((_b$1 = window == null ? void 0 : window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _b$1.fEnv) === "pre" || ((_c = window == null ? void 0 : window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _c.ENV) === "pre";
|
|
216
216
|
function is4Service(location2) {
|
|
217
217
|
return location2.hostname.match(
|
|
218
218
|
/(4service|4bjzwy|4finance)(\.console)?(\.aliyun|\.alibabacloud)\.com$/
|
|
@@ -474,6 +474,7 @@ function showCSRFDialog(config) {
|
|
|
474
474
|
var _a;
|
|
475
475
|
commonEasyFetch.get(`${(_a = getSLSdomain()) != null ? _a : ""}/console/ajax/getSecToken.json`).then((res) => {
|
|
476
476
|
if ((res == null ? void 0 : res.code) === "200") {
|
|
477
|
+
window.ALIYUN_SLS_CONSOLE_CONFIG = window.ALIYUN_SLS_CONSOLE_CONFIG || {};
|
|
477
478
|
window.ALIYUN_SLS_CONSOLE_CONFIG.SEC_TOKEN = res.data;
|
|
478
479
|
dialog.hide();
|
|
479
480
|
}
|
|
@@ -550,6 +551,7 @@ function showNeedLoginDialog(config) {
|
|
|
550
551
|
});
|
|
551
552
|
commonEasyFetch.get(`${(_a = getSLSdomain()) != null ? _a : ""}/console/ajax/getSecToken.json`).then((res) => {
|
|
552
553
|
if (res && res.code === "200") {
|
|
554
|
+
window.ALIYUN_SLS_CONSOLE_CONFIG = window.ALIYUN_SLS_CONSOLE_CONFIG || {};
|
|
553
555
|
window.ALIYUN_SLS_CONSOLE_CONFIG.SEC_TOKEN = res.data;
|
|
554
556
|
dialog.hide();
|
|
555
557
|
} else {
|
|
@@ -693,13 +695,13 @@ var __async$7 = (__this, __arguments, generator) => {
|
|
|
693
695
|
step((generator = generator.apply(__this, __arguments)).next());
|
|
694
696
|
});
|
|
695
697
|
};
|
|
696
|
-
var _a;
|
|
697
|
-
let slsAccessToken = window.ALIYUN_SLS_CONSOLE_CONFIG.slsAccessToken;
|
|
698
|
+
var _a, _b;
|
|
699
|
+
let slsAccessToken = (_a = window == null ? void 0 : window.ALIYUN_SLS_CONSOLE_CONFIG) == null ? void 0 : _a.slsAccessToken;
|
|
698
700
|
let slsAccessTokenMode = false;
|
|
699
701
|
const urlQueryObj = urijs(location.search).escapeQuerySpace(false).query(true);
|
|
700
702
|
const supportRefreshToken = urlQueryObj.supportRefreshToken === "true" && window.top !== window.self && parent != null;
|
|
701
703
|
try {
|
|
702
|
-
if (((
|
|
704
|
+
if (((_b = window.ALIYUN_CONSOLE_CONFIG) == null ? void 0 : _b.ENV) === "pre") {
|
|
703
705
|
if (urlQueryObj.slsAccessToken) {
|
|
704
706
|
slsAccessToken = urlQueryObj.slsAccessToken;
|
|
705
707
|
}
|
|
@@ -720,9 +722,9 @@ function waitRefreshToken() {
|
|
|
720
722
|
window.addEventListener(
|
|
721
723
|
"message",
|
|
722
724
|
(event) => {
|
|
723
|
-
var _a2,
|
|
725
|
+
var _a2, _b2, _c;
|
|
724
726
|
try {
|
|
725
|
-
if (((_a2 = event == null ? void 0 : event.data) == null ? void 0 : _a2.type) === "applyAccessToken" && ((
|
|
727
|
+
if (((_a2 = event == null ? void 0 : event.data) == null ? void 0 : _a2.type) === "applyAccessToken" && ((_b2 = event == null ? void 0 : event.data) == null ? void 0 : _b2.ticket) === urlQueryObj.sls_ticket) {
|
|
726
728
|
slsAccessToken = (_c = event == null ? void 0 : event.data) == null ? void 0 : _c.accessToken;
|
|
727
729
|
tokenRefreshing = false;
|
|
728
730
|
const queue = refreshPromisesQueue;
|
package/package.json
CHANGED