@lark-apaas/client-toolkit 1.2.10-alpha.20 → 1.2.10-alpha.21
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.
|
@@ -139,8 +139,7 @@ class ApiProxy {
|
|
|
139
139
|
...config,
|
|
140
140
|
headers: {
|
|
141
141
|
...this.defaultConfig.headers,
|
|
142
|
-
...config.headers
|
|
143
|
-
'X-Page-Route': 'undefined' != typeof window ? window.location?.pathname || '/' : '/'
|
|
142
|
+
...config.headers
|
|
144
143
|
}
|
|
145
144
|
};
|
|
146
145
|
const requestKey = this.generateRequestKey(mergedConfig);
|
|
@@ -16,7 +16,7 @@ async function createTracker() {
|
|
|
16
16
|
const userIDEncrypt = userID && '0' !== userID ? encryptTea(userID) : void 0;
|
|
17
17
|
const tenantIDEncrypt = tenantID && '0' !== tenantID ? encryptTea(tenantID) : void 0;
|
|
18
18
|
window.collectEvent('init', {
|
|
19
|
-
app_id:
|
|
19
|
+
app_id: 672575,
|
|
20
20
|
channel: 'cn',
|
|
21
21
|
disable_auto_pv: false,
|
|
22
22
|
enable_ab_test: false,
|
package/lib/utils/axiosConfig.js
CHANGED
|
@@ -54,7 +54,7 @@ async function logResponse(ok, responseOrError) {
|
|
|
54
54
|
logTraceID
|
|
55
55
|
};
|
|
56
56
|
if (stacktrace) logMeta.stacktrace = stacktrace;
|
|
57
|
-
logger.
|
|
57
|
+
logger.debug({
|
|
58
58
|
level: ok,
|
|
59
59
|
args: [
|
|
60
60
|
parts.join(''),
|
|
@@ -110,7 +110,7 @@ async function logResponse(ok, responseOrError) {
|
|
|
110
110
|
const stacktrace = await requestStacktraceMap.get(requestUUID);
|
|
111
111
|
const logMeta = {};
|
|
112
112
|
if (stacktrace) logMeta.stacktrace = stacktrace;
|
|
113
|
-
logger.
|
|
113
|
+
logger.debug({
|
|
114
114
|
level: 'error',
|
|
115
115
|
args: [
|
|
116
116
|
parts.join(''),
|
|
@@ -120,7 +120,7 @@ async function logResponse(ok, responseOrError) {
|
|
|
120
120
|
});
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
logger.
|
|
123
|
+
logger.debug({
|
|
124
124
|
level: 'error',
|
|
125
125
|
args: [
|
|
126
126
|
'请求失败:无响应对象或配置信息'
|
|
@@ -234,7 +234,6 @@ function initAxiosConfig(axiosInstance) {
|
|
|
234
234
|
config._startTime = config._startTime || Date.now();
|
|
235
235
|
const csrfToken = window.csrfToken;
|
|
236
236
|
if (csrfToken) config.headers['X-Suda-Csrf-Token'] = csrfToken;
|
|
237
|
-
if ('undefined' != typeof window && window.location?.pathname) config.headers['X-Page-Route'] = window.location.pathname;
|
|
238
237
|
return config;
|
|
239
238
|
}, (error)=>Promise.reject(error));
|
|
240
239
|
instance.interceptors.response.use((response)=>response, (error)=>{
|
|
@@ -242,8 +241,8 @@ function initAxiosConfig(axiosInstance) {
|
|
|
242
241
|
if (error.response?.status === 403) {
|
|
243
242
|
const method = (error.config?.method || 'GET').toUpperCase();
|
|
244
243
|
const url = (error.config?.url || '').split('?')[0];
|
|
245
|
-
logger.
|
|
246
|
-
level: '
|
|
244
|
+
logger.debug({
|
|
245
|
+
level: 'warning',
|
|
247
246
|
args: [
|
|
248
247
|
`请求被拒绝(403):${method} ${url}`,
|
|
249
248
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lark-apaas/client-toolkit",
|
|
3
|
-
"version": "1.2.10-alpha.
|
|
3
|
+
"version": "1.2.10-alpha.21",
|
|
4
4
|
"types": "./lib/index.d.ts",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -93,10 +93,10 @@
|
|
|
93
93
|
"dependencies": {
|
|
94
94
|
"@ant-design/colors": "^7.2.1",
|
|
95
95
|
"@ant-design/cssinjs": "^1.24.0",
|
|
96
|
-
"@data-loom/js": "0.4.
|
|
96
|
+
"@data-loom/js": "0.4.4",
|
|
97
97
|
"@lark-apaas/auth-sdk": "^0.1.0",
|
|
98
98
|
"@lark-apaas/client-capability": "^0.1.3",
|
|
99
|
-
"@lark-apaas/miaoda-inspector": "
|
|
99
|
+
"@lark-apaas/miaoda-inspector": "1.0.14-alpha.8",
|
|
100
100
|
"@lark-apaas/observable-web": "^1.0.1",
|
|
101
101
|
"@radix-ui/react-avatar": "^1.1.10",
|
|
102
102
|
"@radix-ui/react-popover": "^1.1.15",
|