@robot-admin/request-core 0.2.0 → 0.4.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.
- package/CHANGELOG.md +109 -0
- package/LICENSE +21 -0
- package/README.md +248 -357
- package/SECURITY.md +14 -0
- package/dist/axios.cjs +134 -809
- package/dist/axios.cjs.map +1 -1
- package/dist/axios.d.cts +55 -220
- package/dist/axios.d.ts +55 -220
- package/dist/axios.js +2 -790
- package/dist/axios.js.map +1 -1
- package/dist/chunk-2JXH7SIL.js +711 -0
- package/dist/chunk-2JXH7SIL.js.map +1 -0
- package/dist/chunk-56QOEWUS.js +8 -0
- package/dist/chunk-56QOEWUS.js.map +1 -0
- package/dist/chunk-DUP3Y4DN.js +320 -0
- package/dist/chunk-DUP3Y4DN.js.map +1 -0
- package/dist/chunk-JGFRUAZT.cjs +1007 -0
- package/dist/chunk-JGFRUAZT.cjs.map +1 -0
- package/dist/chunk-KHI6XQRN.cjs +717 -0
- package/dist/chunk-KHI6XQRN.cjs.map +1 -0
- package/dist/chunk-OAZ5BUBU.js +969 -0
- package/dist/chunk-OAZ5BUBU.js.map +1 -0
- package/dist/chunk-QSDNDTOZ.js +28 -0
- package/dist/chunk-QSDNDTOZ.js.map +1 -0
- package/dist/chunk-UHXBAFY6.cjs +323 -0
- package/dist/chunk-UHXBAFY6.cjs.map +1 -0
- package/dist/chunk-WUZ43MLM.cjs +30 -0
- package/dist/chunk-WUZ43MLM.cjs.map +1 -0
- package/dist/chunk-WXHQXPS4.cjs +10 -0
- package/dist/chunk-WXHQXPS4.cjs.map +1 -0
- package/dist/crud.cjs +12 -484
- package/dist/crud.cjs.map +1 -1
- package/dist/crud.d.cts +8 -269
- package/dist/crud.d.ts +8 -269
- package/dist/crud.js +4 -487
- package/dist/crud.js.map +1 -1
- package/dist/index.cjs +136 -1302
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -165
- package/dist/index.d.ts +7 -165
- package/dist/index.js +5 -1283
- package/dist/index.js.map +1 -1
- package/dist/naive.cjs +14 -0
- package/dist/naive.cjs.map +1 -0
- package/dist/naive.d.cts +9 -0
- package/dist/naive.d.ts +9 -0
- package/dist/naive.js +5 -0
- package/dist/naive.js.map +1 -0
- package/dist/types-BRDRqYFs.d.cts +197 -0
- package/dist/types-BVJhlSuh.d.cts +310 -0
- package/dist/types-BVJhlSuh.d.ts +310 -0
- package/dist/types-CUyibJZX.d.ts +197 -0
- package/dist/vue.cjs +93 -0
- package/dist/vue.cjs.map +1 -0
- package/dist/vue.d.cts +38 -0
- package/dist/vue.d.ts +38 -0
- package/dist/vue.js +71 -0
- package/dist/vue.js.map +1 -0
- package/package.json +60 -16
package/dist/axios.cjs
CHANGED
|
@@ -1,816 +1,141 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkUHXBAFY6_cjs = require('./chunk-UHXBAFY6.cjs');
|
|
4
|
+
var chunkJGFRUAZT_cjs = require('./chunk-JGFRUAZT.cjs');
|
|
4
5
|
|
|
5
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
6
6
|
|
|
7
|
-
var axios__default = /*#__PURE__*/_interopDefault(axios);
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
function
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
if (data != null) {
|
|
142
|
-
parts.push(sortedStringify(data));
|
|
143
|
-
}
|
|
144
|
-
if (headers) {
|
|
145
|
-
const authHeaders = {};
|
|
146
|
-
const authKeys = ["authorization", "x-tenant-id", "x-user-id"];
|
|
147
|
-
const lowerHeaders = {};
|
|
148
|
-
const headerSource = typeof headers.toJSON === "function" ? headers.toJSON() : headers;
|
|
149
|
-
for (const [k, v] of Object.entries(headerSource)) {
|
|
150
|
-
lowerHeaders[String(k).toLowerCase()] = v;
|
|
151
|
-
}
|
|
152
|
-
for (const key of authKeys) {
|
|
153
|
-
if (lowerHeaders[key] != null) {
|
|
154
|
-
authHeaders[key] = String(lowerHeaders[key]);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
if (Object.keys(authHeaders).length > 0) {
|
|
158
|
-
parts.push(sortedStringify(authHeaders));
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
return parts.join("|");
|
|
162
|
-
}
|
|
163
|
-
var MemoryCache = class {
|
|
164
|
-
constructor() {
|
|
165
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
166
|
-
this.maxSize = 1e3;
|
|
167
|
-
// 最大缓存数量
|
|
168
|
-
this.accessOrder = /* @__PURE__ */ new Set();
|
|
169
|
-
}
|
|
170
|
-
// 记录访问顺序
|
|
171
|
-
/**
|
|
172
|
-
* 获取缓存
|
|
173
|
-
*/
|
|
174
|
-
get(key) {
|
|
175
|
-
const item = this.cache.get(key);
|
|
176
|
-
if (!item) return null;
|
|
177
|
-
if (Date.now() > item.expireAt) {
|
|
178
|
-
this.cache.delete(key);
|
|
179
|
-
this.accessOrder.delete(key);
|
|
180
|
-
return null;
|
|
181
|
-
}
|
|
182
|
-
this.accessOrder.delete(key);
|
|
183
|
-
this.accessOrder.add(key);
|
|
184
|
-
return item.data;
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* 设置缓存
|
|
188
|
-
*/
|
|
189
|
-
set(key, data, ttl) {
|
|
190
|
-
if (!Number.isFinite(ttl) || ttl < 0) {
|
|
191
|
-
throw new RangeError("\u7F13\u5B58 TTL \u5FC5\u987B\u662F\u5927\u4E8E\u6216\u7B49\u4E8E 0 \u7684\u6709\u9650\u6570\u503C");
|
|
192
|
-
}
|
|
193
|
-
if (this.maxSize === 0) return;
|
|
194
|
-
if (this.cache.size >= this.maxSize && !this.cache.has(key)) {
|
|
195
|
-
this.evictOldest();
|
|
196
|
-
}
|
|
197
|
-
const expireAt = Date.now() + ttl;
|
|
198
|
-
this.cache.set(key, {
|
|
199
|
-
data,
|
|
200
|
-
expireAt
|
|
201
|
-
});
|
|
202
|
-
this.accessOrder.delete(key);
|
|
203
|
-
this.accessOrder.add(key);
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* 删除缓存
|
|
207
|
-
*/
|
|
208
|
-
delete(key) {
|
|
209
|
-
this.accessOrder.delete(key);
|
|
210
|
-
return this.cache.delete(key);
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* 清空所有缓存
|
|
214
|
-
*/
|
|
215
|
-
clear() {
|
|
216
|
-
this.cache.clear();
|
|
217
|
-
this.accessOrder.clear();
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* 清理过期缓存
|
|
221
|
-
*/
|
|
222
|
-
cleanup() {
|
|
223
|
-
const now = Date.now();
|
|
224
|
-
const entries = Array.from(this.cache.entries());
|
|
225
|
-
for (const [key, item] of entries) {
|
|
226
|
-
if (now > item.expireAt) {
|
|
227
|
-
this.cache.delete(key);
|
|
228
|
-
this.accessOrder.delete(key);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* 获取缓存大小
|
|
234
|
-
*/
|
|
235
|
-
get size() {
|
|
236
|
-
return this.cache.size;
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* 设置最大缓存大小
|
|
240
|
-
*/
|
|
241
|
-
setMaxSize(size) {
|
|
242
|
-
if (!Number.isInteger(size) || size < 0) {
|
|
243
|
-
throw new RangeError("\u7F13\u5B58\u6700\u5927\u5BB9\u91CF\u5FC5\u987B\u662F\u5927\u4E8E\u6216\u7B49\u4E8E 0 \u7684\u6574\u6570");
|
|
244
|
-
}
|
|
245
|
-
this.maxSize = size;
|
|
246
|
-
while (this.cache.size > this.maxSize) {
|
|
247
|
-
this.evictOldest();
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* 清理最旧的缓存(LRU)
|
|
252
|
-
*/
|
|
253
|
-
evictOldest() {
|
|
254
|
-
const oldestKey = this.accessOrder.values().next().value;
|
|
255
|
-
if (oldestKey) {
|
|
256
|
-
this.cache.delete(oldestKey);
|
|
257
|
-
this.accessOrder.delete(oldestKey);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
var globalCache = new MemoryCache();
|
|
262
|
-
function delay(ms, signal) {
|
|
263
|
-
if (signal?.aborted) {
|
|
264
|
-
return Promise.reject(createAbortError(signal.reason));
|
|
265
|
-
}
|
|
266
|
-
return new Promise((resolve, reject) => {
|
|
267
|
-
const timer = setTimeout(() => {
|
|
268
|
-
signal?.removeEventListener?.("abort", onAbort);
|
|
269
|
-
resolve();
|
|
270
|
-
}, Math.max(0, Number.isFinite(ms) ? ms : 0));
|
|
271
|
-
const onAbort = () => {
|
|
272
|
-
clearTimeout(timer);
|
|
273
|
-
signal?.removeEventListener?.("abort", onAbort);
|
|
274
|
-
reject(createAbortError(signal?.reason));
|
|
275
|
-
};
|
|
276
|
-
signal?.addEventListener?.("abort", onAbort, { once: true });
|
|
277
|
-
});
|
|
278
|
-
}
|
|
279
|
-
function createAbortError(reason) {
|
|
280
|
-
if (reason instanceof Error) return reason;
|
|
281
|
-
return Object.assign(new Error("canceled"), {
|
|
282
|
-
name: "AbortError",
|
|
283
|
-
code: "ERR_CANCELED",
|
|
284
|
-
reason
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
function isNetworkError(error) {
|
|
288
|
-
return !error.response && Boolean(error.code) && error.code !== "ECONNABORTED" && error.code !== "ERR_CANCELED" && error.message !== "canceled" && error.message !== "Request aborted" && error.message !== "Request cancelled";
|
|
289
|
-
}
|
|
290
|
-
function isTimeoutError(error) {
|
|
291
|
-
return error?.code === "ECONNABORTED" || error?.code === "ETIMEDOUT";
|
|
292
|
-
}
|
|
293
|
-
function isRetryableStatus(status, retryableStatusCodes) {
|
|
294
|
-
return retryableStatusCodes.includes(status);
|
|
295
|
-
}
|
|
296
|
-
function normalizeConfig(config, defaults) {
|
|
297
|
-
if (config === true) {
|
|
298
|
-
return { ...defaults, enabled: true };
|
|
299
|
-
}
|
|
300
|
-
if (config === false) {
|
|
301
|
-
return { ...defaults, enabled: false };
|
|
302
|
-
}
|
|
303
|
-
if (config && typeof config === "object") {
|
|
304
|
-
const definedEntries = Object.entries(config).filter(
|
|
305
|
-
([, value]) => value !== void 0
|
|
306
|
-
);
|
|
307
|
-
return { ...defaults, ...Object.fromEntries(definedEntries) };
|
|
308
|
-
}
|
|
309
|
-
return defaults;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
// src/axios/plugins/dedupe.ts
|
|
313
|
-
var DEFAULT_DEDUPE_CONFIG = {
|
|
314
|
-
enabled: true,
|
|
315
|
-
keyGenerator: generateRequestKey
|
|
316
|
-
};
|
|
317
|
-
var pendingRequests = /* @__PURE__ */ new Map();
|
|
318
|
-
var CLEANUP_INTERVAL = 3e4;
|
|
319
|
-
var REQUEST_TIMEOUT = 5 * 60 * 1e3;
|
|
320
|
-
var cleanupTimer = null;
|
|
321
|
-
function cleanupExpiredRequests() {
|
|
322
|
-
const now = Date.now();
|
|
323
|
-
Array.from(pendingRequests.entries()).forEach(([key, controller]) => {
|
|
324
|
-
const startTime = controller._startTime || now;
|
|
325
|
-
if (now - startTime > REQUEST_TIMEOUT) {
|
|
326
|
-
try {
|
|
327
|
-
controller.abort();
|
|
328
|
-
} catch (error) {
|
|
329
|
-
console.warn("Abort error:", error);
|
|
330
|
-
}
|
|
331
|
-
pendingRequests.delete(key);
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
|
-
stopCleanupTimerIfIdle();
|
|
335
|
-
}
|
|
336
|
-
function startCleanupTimer() {
|
|
337
|
-
if (cleanupTimer) return;
|
|
338
|
-
cleanupTimer = setInterval(cleanupExpiredRequests, CLEANUP_INTERVAL);
|
|
339
|
-
cleanupTimer.unref?.();
|
|
340
|
-
}
|
|
341
|
-
function stopCleanupTimerIfIdle() {
|
|
342
|
-
if (pendingRequests.size === 0 && cleanupTimer) {
|
|
343
|
-
clearInterval(cleanupTimer);
|
|
344
|
-
cleanupTimer = null;
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
function removePendingRequest(config) {
|
|
348
|
-
const requestKey = config.__requestKey;
|
|
349
|
-
const controller = config.__abortController;
|
|
350
|
-
if (requestKey && controller && pendingRequests.get(requestKey) === controller) {
|
|
351
|
-
pendingRequests.delete(requestKey);
|
|
352
|
-
}
|
|
353
|
-
stopCleanupTimerIfIdle();
|
|
354
|
-
}
|
|
355
|
-
function onRequest(config) {
|
|
356
|
-
const enhancedConfig = config;
|
|
357
|
-
const dedupeConfig = normalizeConfig(
|
|
358
|
-
enhancedConfig.dedupe,
|
|
359
|
-
DEFAULT_DEDUPE_CONFIG
|
|
360
|
-
);
|
|
361
|
-
if (!dedupeConfig.enabled) {
|
|
362
|
-
return config;
|
|
363
|
-
}
|
|
364
|
-
if (config.__fromCache) {
|
|
365
|
-
return config;
|
|
366
|
-
}
|
|
367
|
-
const keyGenerator = dedupeConfig.keyGenerator || DEFAULT_DEDUPE_CONFIG.keyGenerator;
|
|
368
|
-
const requestKey = keyGenerator(config);
|
|
369
|
-
const existing = pendingRequests.get(requestKey);
|
|
370
|
-
if (existing) {
|
|
371
|
-
try {
|
|
372
|
-
existing.abort();
|
|
373
|
-
} catch (error) {
|
|
374
|
-
console.warn("Abort existing request error:", error);
|
|
375
|
-
}
|
|
376
|
-
pendingRequests.delete(requestKey);
|
|
377
|
-
}
|
|
378
|
-
const controller = ensureSharedAbortController(enhancedConfig);
|
|
379
|
-
if (!controller) return config;
|
|
380
|
-
enhancedConfig.__requestKey = requestKey;
|
|
381
|
-
pendingRequests.set(requestKey, controller);
|
|
382
|
-
startCleanupTimer();
|
|
383
|
-
return config;
|
|
384
|
-
}
|
|
385
|
-
function onResponse(response) {
|
|
386
|
-
const config = response.config;
|
|
387
|
-
removePendingRequest(config);
|
|
388
|
-
return response;
|
|
389
|
-
}
|
|
390
|
-
function onResponseError(error) {
|
|
391
|
-
const config = error.config;
|
|
392
|
-
if (config) {
|
|
393
|
-
removePendingRequest(config);
|
|
394
|
-
}
|
|
395
|
-
return Promise.reject(error);
|
|
396
|
-
}
|
|
397
|
-
function setupDedupePlugin(instance) {
|
|
398
|
-
instance.interceptors.request.use(onRequest);
|
|
399
|
-
instance.interceptors.response.use(onResponse, onResponseError);
|
|
400
|
-
}
|
|
401
|
-
function cancelAllPendingRequests() {
|
|
402
|
-
pendingRequests.forEach((controller) => {
|
|
403
|
-
try {
|
|
404
|
-
controller.abort();
|
|
405
|
-
} catch (error) {
|
|
406
|
-
console.warn("Error aborting pending request:", error);
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
pendingRequests.clear();
|
|
410
|
-
stopCleanupTimerIfIdle();
|
|
411
|
-
}
|
|
412
|
-
function getPendingRequestCount() {
|
|
413
|
-
return pendingRequests.size;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
// src/axios/plugins/cache.ts
|
|
417
|
-
var DEFAULT_CACHE_CONFIG = {
|
|
418
|
-
enabled: false,
|
|
419
|
-
ttl: 5 * 60 * 1e3,
|
|
420
|
-
// 5 分钟
|
|
421
|
-
forceUpdate: false
|
|
422
|
-
};
|
|
423
|
-
function shouldUseCache(config, cacheConfig) {
|
|
424
|
-
if (config.method?.toUpperCase() !== "GET") {
|
|
425
|
-
return false;
|
|
426
|
-
}
|
|
427
|
-
if (!cacheConfig.enabled) {
|
|
428
|
-
return false;
|
|
429
|
-
}
|
|
430
|
-
if (cacheConfig.forceUpdate) {
|
|
431
|
-
return false;
|
|
432
|
-
}
|
|
433
|
-
return true;
|
|
434
|
-
}
|
|
435
|
-
function createCacheResponse(cachedData, config) {
|
|
436
|
-
return {
|
|
437
|
-
data: cachedData.data,
|
|
438
|
-
status: cachedData.status,
|
|
439
|
-
statusText: `${cachedData.statusText} (from cache)`,
|
|
440
|
-
headers: cachedData.headers,
|
|
441
|
-
config
|
|
442
|
-
};
|
|
443
|
-
}
|
|
444
|
-
function tryGetFromCache(config, cacheConfig) {
|
|
445
|
-
if (!shouldUseCache(config, cacheConfig)) {
|
|
446
|
-
return null;
|
|
447
|
-
}
|
|
448
|
-
const requestKey = generateRequestKey(config);
|
|
449
|
-
const cachedData = globalCache.get(requestKey);
|
|
450
|
-
if (cachedData) {
|
|
451
|
-
return createCacheResponse(cachedData, config);
|
|
452
|
-
}
|
|
453
|
-
return null;
|
|
454
|
-
}
|
|
455
|
-
function saveToCache(response, config, cacheConfig) {
|
|
456
|
-
if (config.method?.toUpperCase() === "GET" && cacheConfig.enabled && response.status === 200) {
|
|
457
|
-
const requestKey = generateRequestKey(config);
|
|
458
|
-
const ttl = cacheConfig.ttl ?? DEFAULT_CACHE_CONFIG.ttl;
|
|
459
|
-
const cachedResponse = {
|
|
460
|
-
data: response.data,
|
|
461
|
-
status: response.status,
|
|
462
|
-
statusText: response.statusText,
|
|
463
|
-
headers: { ...response.headers }
|
|
464
|
-
};
|
|
465
|
-
globalCache.set(requestKey, cachedResponse, ttl);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
function onRequest2(config) {
|
|
469
|
-
const enhancedConfig = config;
|
|
470
|
-
const cacheConfig = normalizeConfig(
|
|
471
|
-
enhancedConfig.cache,
|
|
472
|
-
DEFAULT_CACHE_CONFIG
|
|
473
|
-
);
|
|
474
|
-
const cachedResponse = tryGetFromCache(config, cacheConfig);
|
|
475
|
-
if (cachedResponse) {
|
|
476
|
-
config.__fromCache = true;
|
|
477
|
-
return Promise.reject({
|
|
478
|
-
__fromCache: true,
|
|
479
|
-
__cachedResponse: cachedResponse,
|
|
480
|
-
config
|
|
481
|
-
});
|
|
482
|
-
}
|
|
483
|
-
return config;
|
|
484
|
-
}
|
|
485
|
-
function onResponse2(response) {
|
|
486
|
-
const config = response.config;
|
|
487
|
-
if (config.__fromCache) {
|
|
488
|
-
return config.__cachedResponse;
|
|
489
|
-
}
|
|
490
|
-
const cacheConfig = normalizeConfig(
|
|
491
|
-
config.cache,
|
|
492
|
-
DEFAULT_CACHE_CONFIG
|
|
493
|
-
);
|
|
494
|
-
saveToCache(response, response.config, cacheConfig);
|
|
495
|
-
return response;
|
|
496
|
-
}
|
|
497
|
-
function onResponseError2(error) {
|
|
498
|
-
if (error.__fromCache) {
|
|
499
|
-
return Promise.resolve(error.__cachedResponse);
|
|
500
|
-
}
|
|
501
|
-
return Promise.reject(error);
|
|
502
|
-
}
|
|
503
|
-
function setupCachePlugin(instance) {
|
|
504
|
-
instance.interceptors.request.use(onRequest2);
|
|
505
|
-
instance.interceptors.response.use(onResponse2, onResponseError2);
|
|
506
|
-
}
|
|
507
|
-
function clearAllCache() {
|
|
508
|
-
globalCache.clear();
|
|
509
|
-
}
|
|
510
|
-
function clearCache(config) {
|
|
511
|
-
const requestKey = generateRequestKey(config);
|
|
512
|
-
return globalCache.delete(requestKey);
|
|
513
|
-
}
|
|
514
|
-
function cleanupExpiredCache() {
|
|
515
|
-
globalCache.cleanup();
|
|
516
|
-
}
|
|
517
|
-
function getCacheSize() {
|
|
518
|
-
return globalCache.size;
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
// src/axios/plugins/retry.ts
|
|
522
|
-
var DEFAULT_RETRY_CONFIG = {
|
|
523
|
-
enabled: false,
|
|
524
|
-
count: 3,
|
|
525
|
-
delay: 1e3,
|
|
526
|
-
exponentialBackoff: true,
|
|
527
|
-
jitter: true,
|
|
528
|
-
retryableStatusCodes: [408, 429, 500, 502, 503, 504],
|
|
529
|
-
// 默认仅重试幂等方法,避免对 POST 等非幂等请求重复执行造成副作用(重复扣款/重复创建)
|
|
530
|
-
retryableMethods: ["GET", "HEAD", "OPTIONS", "PUT", "DELETE"]
|
|
531
|
-
};
|
|
532
|
-
function isCancelError(error) {
|
|
533
|
-
return error?.name === "CanceledError" || error?.name === "AbortError" || error?.code === "ERR_CANCELED";
|
|
534
|
-
}
|
|
535
|
-
function shouldRetry(error, retryConfig) {
|
|
536
|
-
if (!retryConfig.enabled) {
|
|
537
|
-
return false;
|
|
538
|
-
}
|
|
539
|
-
const config = error.config;
|
|
540
|
-
const currentRetryCount = config.__retryCount ?? 0;
|
|
541
|
-
if (currentRetryCount >= retryConfig.count) {
|
|
542
|
-
return false;
|
|
543
|
-
}
|
|
544
|
-
if (isCancelError(error)) {
|
|
545
|
-
return false;
|
|
546
|
-
}
|
|
547
|
-
const method = (config.method || "get").toUpperCase();
|
|
548
|
-
if (!retryConfig.retryableMethods.some(
|
|
549
|
-
(retryableMethod) => retryableMethod.toUpperCase() === method
|
|
550
|
-
)) {
|
|
551
|
-
return false;
|
|
552
|
-
}
|
|
553
|
-
if (isNetworkError(error)) {
|
|
554
|
-
return true;
|
|
555
|
-
}
|
|
556
|
-
if (isTimeoutError(error)) {
|
|
557
|
-
return true;
|
|
558
|
-
}
|
|
559
|
-
if (error.response?.status) {
|
|
560
|
-
return isRetryableStatus(
|
|
561
|
-
error.response.status,
|
|
562
|
-
retryConfig.retryableStatusCodes
|
|
563
|
-
);
|
|
564
|
-
}
|
|
565
|
-
return false;
|
|
566
|
-
}
|
|
567
|
-
function getRetryDelay(retryCount, retryConfig) {
|
|
568
|
-
let calculated;
|
|
569
|
-
if (!retryConfig.exponentialBackoff) {
|
|
570
|
-
calculated = retryConfig.delay;
|
|
571
|
-
} else {
|
|
572
|
-
calculated = retryConfig.delay * Math.pow(2, retryCount - 1);
|
|
573
|
-
}
|
|
574
|
-
if (retryConfig.jitter) {
|
|
575
|
-
const factor = 0.75 + Math.random() * 0.5;
|
|
576
|
-
calculated = Math.round(calculated * factor);
|
|
577
|
-
}
|
|
578
|
-
return Math.min(Math.max(0, calculated), 3e4);
|
|
579
|
-
}
|
|
580
|
-
function setupRetryPlugin(instance) {
|
|
581
|
-
const onResponseError4 = async (error) => {
|
|
582
|
-
const config = error.config;
|
|
583
|
-
if (!config) {
|
|
584
|
-
return Promise.reject(error);
|
|
585
|
-
}
|
|
586
|
-
const retryConfig = normalizeConfig(
|
|
587
|
-
config.retry,
|
|
588
|
-
DEFAULT_RETRY_CONFIG
|
|
589
|
-
);
|
|
590
|
-
if (!shouldRetry(error, retryConfig)) {
|
|
591
|
-
return Promise.reject(error);
|
|
592
|
-
}
|
|
593
|
-
config.__retryCount = (config.__retryCount ?? 0) + 1;
|
|
594
|
-
const retryDelay = getRetryDelay(config.__retryCount, retryConfig);
|
|
595
|
-
try {
|
|
596
|
-
await delay(retryDelay, config.signal);
|
|
597
|
-
} catch (abortError) {
|
|
598
|
-
const error_ = Object.assign(new Error("canceled"), {
|
|
599
|
-
name: "CanceledError",
|
|
600
|
-
code: "ERR_CANCELED",
|
|
601
|
-
config,
|
|
602
|
-
cause: abortError
|
|
603
|
-
});
|
|
604
|
-
return Promise.reject(error_);
|
|
605
|
-
}
|
|
606
|
-
const retryConfig_ = { ...config };
|
|
607
|
-
delete retryConfig_.__cancelId;
|
|
608
|
-
delete retryConfig_.__requestKey;
|
|
609
|
-
return instance.request(retryConfig_);
|
|
610
|
-
};
|
|
611
|
-
instance.interceptors.response.use(void 0, onResponseError4);
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
// src/axios/plugins/response.ts
|
|
615
|
-
function setupResponsePlugin(instance) {
|
|
616
|
-
instance.interceptors.response.use(
|
|
617
|
-
(response) => {
|
|
618
|
-
cleanupAbortContext(response.config);
|
|
619
|
-
return response;
|
|
620
|
-
},
|
|
621
|
-
(error) => {
|
|
622
|
-
cleanupAbortContext(error?.config);
|
|
623
|
-
return Promise.reject(error);
|
|
624
|
-
}
|
|
625
|
-
);
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
// src/axios/plugins/cancel.ts
|
|
629
|
-
var DEFAULT_CANCEL_CONFIG = {
|
|
630
|
-
enabled: true,
|
|
631
|
-
whitelist: []
|
|
632
|
-
};
|
|
633
|
-
var cancelableRequests = /* @__PURE__ */ new Map();
|
|
634
|
-
var requestId = 0;
|
|
635
|
-
var CLEANUP_INTERVAL2 = 3e4;
|
|
636
|
-
var REQUEST_TIMEOUT2 = 3e5;
|
|
637
|
-
var cleanupTimer2 = null;
|
|
638
|
-
function cleanupExpiredRequests2() {
|
|
639
|
-
const now = Date.now();
|
|
640
|
-
const expiredKeys = [];
|
|
641
|
-
for (const [key, controller] of cancelableRequests.entries()) {
|
|
642
|
-
const requestStartTime = controller._startTime || now;
|
|
643
|
-
if (now - requestStartTime > REQUEST_TIMEOUT2) {
|
|
644
|
-
expiredKeys.push(key);
|
|
645
|
-
try {
|
|
646
|
-
controller.abort();
|
|
647
|
-
} catch (error) {
|
|
648
|
-
console.warn("Error aborting expired request:", error);
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
expiredKeys.forEach((key) => cancelableRequests.delete(key));
|
|
653
|
-
stopCleanupTimerIfIdle2();
|
|
654
|
-
}
|
|
655
|
-
function startCleanupTimer2() {
|
|
656
|
-
if (cleanupTimer2) return;
|
|
657
|
-
cleanupTimer2 = setInterval(cleanupExpiredRequests2, CLEANUP_INTERVAL2);
|
|
658
|
-
cleanupTimer2.unref?.();
|
|
659
|
-
}
|
|
660
|
-
function stopCleanupTimer() {
|
|
661
|
-
if (cleanupTimer2) {
|
|
662
|
-
clearInterval(cleanupTimer2);
|
|
663
|
-
cleanupTimer2 = null;
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
function stopCleanupTimerIfIdle2() {
|
|
667
|
-
if (cancelableRequests.size === 0) stopCleanupTimer();
|
|
668
|
-
}
|
|
669
|
-
function isInWhitelist(url, whitelist) {
|
|
670
|
-
return whitelist.some((pattern) => pattern.test(url));
|
|
671
|
-
}
|
|
672
|
-
function onRequest3(config) {
|
|
673
|
-
const enhancedConfig = config;
|
|
674
|
-
const cancelConfig = normalizeConfig(
|
|
675
|
-
enhancedConfig.cancel,
|
|
676
|
-
DEFAULT_CANCEL_CONFIG
|
|
677
|
-
);
|
|
678
|
-
if (!cancelConfig.enabled) {
|
|
679
|
-
return config;
|
|
680
|
-
}
|
|
681
|
-
if (config.__fromCache) {
|
|
682
|
-
return config;
|
|
683
|
-
}
|
|
684
|
-
const url = config.url || "";
|
|
685
|
-
if (isInWhitelist(url, cancelConfig.whitelist)) {
|
|
686
|
-
return config;
|
|
687
|
-
}
|
|
688
|
-
const activeController = ensureSharedAbortController(enhancedConfig);
|
|
689
|
-
if (!activeController) return config;
|
|
690
|
-
const id = `request_${++requestId}`;
|
|
691
|
-
enhancedConfig.__cancelId = id;
|
|
692
|
-
cancelableRequests.set(id, activeController);
|
|
693
|
-
startCleanupTimer2();
|
|
694
|
-
return config;
|
|
695
|
-
}
|
|
696
|
-
function onResponse3(response) {
|
|
697
|
-
const config = response.config;
|
|
698
|
-
const cancelId = config.__cancelId;
|
|
699
|
-
if (cancelId) {
|
|
700
|
-
cancelableRequests.delete(cancelId);
|
|
701
|
-
stopCleanupTimerIfIdle2();
|
|
702
|
-
}
|
|
703
|
-
return response;
|
|
704
|
-
}
|
|
705
|
-
function onResponseError3(error) {
|
|
706
|
-
const config = error.config;
|
|
707
|
-
const cancelId = config?.__cancelId;
|
|
708
|
-
if (cancelId) {
|
|
709
|
-
cancelableRequests.delete(cancelId);
|
|
710
|
-
stopCleanupTimerIfIdle2();
|
|
711
|
-
}
|
|
712
|
-
return Promise.reject(error);
|
|
713
|
-
}
|
|
714
|
-
function setupCancelPlugin(instance) {
|
|
715
|
-
instance.interceptors.request.use(onRequest3);
|
|
716
|
-
instance.interceptors.response.use(onResponse3, onResponseError3);
|
|
717
|
-
}
|
|
718
|
-
function cancelAllRequests() {
|
|
719
|
-
cancelableRequests.forEach((controller) => {
|
|
720
|
-
try {
|
|
721
|
-
controller.abort();
|
|
722
|
-
} catch (error) {
|
|
723
|
-
console.warn("Error aborting request:", error);
|
|
724
|
-
}
|
|
725
|
-
});
|
|
726
|
-
cancelableRequests.clear();
|
|
727
|
-
stopCleanupTimer();
|
|
728
|
-
}
|
|
729
|
-
function getCancelableRequestCount() {
|
|
730
|
-
return cancelableRequests.size;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
// src/axios/plugins/index.ts
|
|
734
|
-
function setupPlugins(instance) {
|
|
735
|
-
setupCachePlugin(instance);
|
|
736
|
-
setupCancelPlugin(instance);
|
|
737
|
-
setupDedupePlugin(instance);
|
|
738
|
-
setupRetryPlugin(instance);
|
|
739
|
-
setupResponsePlugin(instance);
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
// src/axios/service.ts
|
|
743
|
-
var globalService = null;
|
|
744
|
-
function setGlobalAxiosInstance(instance) {
|
|
745
|
-
globalService = instance;
|
|
746
|
-
}
|
|
747
|
-
function getGlobalAxiosInstance() {
|
|
748
|
-
if (!globalService) {
|
|
749
|
-
throw new Error(
|
|
750
|
-
"Axios instance not initialized. Please call createRequestCore() or setGlobalAxiosInstance() first."
|
|
751
|
-
);
|
|
752
|
-
}
|
|
753
|
-
return globalService;
|
|
754
|
-
}
|
|
755
|
-
new Proxy({}, {
|
|
756
|
-
get(_target, prop) {
|
|
757
|
-
return getGlobalAxiosInstance()[prop];
|
|
758
|
-
}
|
|
759
|
-
});
|
|
760
|
-
async function getData(url, config) {
|
|
761
|
-
const response = await getGlobalAxiosInstance().get(url, config);
|
|
762
|
-
return response.data;
|
|
763
|
-
}
|
|
764
|
-
async function postData(url, data, config) {
|
|
765
|
-
const response = await getGlobalAxiosInstance().post(url, data, config);
|
|
766
|
-
return response.data;
|
|
767
|
-
}
|
|
768
|
-
async function putData(url, data, config) {
|
|
769
|
-
const response = await getGlobalAxiosInstance().put(url, data, config);
|
|
770
|
-
return response.data;
|
|
771
|
-
}
|
|
772
|
-
async function deleteData(url, config) {
|
|
773
|
-
const response = await getGlobalAxiosInstance().delete(url, config);
|
|
774
|
-
return response.data;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
// src/axios/request.ts
|
|
778
|
-
function createAxiosInstance(config = {}) {
|
|
779
|
-
const instance = axios__default.default.create({
|
|
780
|
-
timeout: 5e3,
|
|
781
|
-
headers: {
|
|
782
|
-
"Content-Type": "application/json"
|
|
783
|
-
},
|
|
784
|
-
...config
|
|
785
|
-
});
|
|
786
|
-
setupPlugins(instance);
|
|
787
|
-
return instance;
|
|
788
|
-
}
|
|
789
|
-
var onReLoginSuccess = () => {
|
|
790
|
-
resolveReLogin();
|
|
791
|
-
};
|
|
792
|
-
var onReLoginCancel = () => {
|
|
793
|
-
rejectReLogin(new Error("\u91CD\u65B0\u767B\u5F55\u5DF2\u53D6\u6D88"));
|
|
794
|
-
};
|
|
795
|
-
|
|
796
|
-
exports.cancelAllPendingRequests = cancelAllPendingRequests;
|
|
797
|
-
exports.cancelAllRequests = cancelAllRequests;
|
|
798
|
-
exports.cleanupExpiredCache = cleanupExpiredCache;
|
|
799
|
-
exports.clearAllCache = clearAllCache;
|
|
800
|
-
exports.clearCache = clearCache;
|
|
801
|
-
exports.createAxiosInstance = createAxiosInstance;
|
|
802
|
-
exports.deleteData = deleteData;
|
|
803
|
-
exports.getCacheSize = getCacheSize;
|
|
804
|
-
exports.getCancelableRequestCount = getCancelableRequestCount;
|
|
805
|
-
exports.getData = getData;
|
|
806
|
-
exports.getGlobalAxiosInstance = getGlobalAxiosInstance;
|
|
807
|
-
exports.getPendingRequestCount = getPendingRequestCount;
|
|
808
|
-
exports.getReLoginPromise = getReLoginPromise;
|
|
809
|
-
exports.onReLoginCancel = onReLoginCancel;
|
|
810
|
-
exports.onReLoginSuccess = onReLoginSuccess;
|
|
811
|
-
exports.postData = postData;
|
|
812
|
-
exports.putData = putData;
|
|
813
|
-
exports.setGlobalAxiosInstance = setGlobalAxiosInstance;
|
|
814
|
-
exports.waitForReLogin = waitForReLogin;
|
|
8
|
+
Object.defineProperty(exports, "createRequestClient", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkUHXBAFY6_cjs.createRequestClient; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "setDefaultRequestClient", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkUHXBAFY6_cjs.setDefaultRequestClient; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "MemoryCache", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkJGFRUAZT_cjs.MemoryCache; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "RequestError", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkJGFRUAZT_cjs.RequestError; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "cancelAllPendingRequests", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkJGFRUAZT_cjs.cancelAllPendingRequests; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "cancelAllRequests", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkJGFRUAZT_cjs.cancelAllRequests; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "cancelRequestScope", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkJGFRUAZT_cjs.cancelRequestScope; }
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "cleanupExpiredCache", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () { return chunkJGFRUAZT_cjs.cleanupExpiredCache; }
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "clearAllCache", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () { return chunkJGFRUAZT_cjs.clearAllCache; }
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "clearCache", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function () { return chunkJGFRUAZT_cjs.clearCache; }
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "clearCacheByPrefix", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () { return chunkJGFRUAZT_cjs.clearCacheByPrefix; }
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "clearCacheByTag", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return chunkJGFRUAZT_cjs.clearCacheByTag; }
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "createAxiosInstance", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return chunkJGFRUAZT_cjs.createAxiosInstance; }
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "createRequestCore", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return chunkJGFRUAZT_cjs.createRequestCore; }
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "deleteData", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return chunkJGFRUAZT_cjs.deleteData; }
|
|
67
|
+
});
|
|
68
|
+
Object.defineProperty(exports, "generateRequestKey", {
|
|
69
|
+
enumerable: true,
|
|
70
|
+
get: function () { return chunkJGFRUAZT_cjs.generateRequestKey; }
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "getCacheSize", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () { return chunkJGFRUAZT_cjs.getCacheSize; }
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(exports, "getCancelableRequestCount", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () { return chunkJGFRUAZT_cjs.getCancelableRequestCount; }
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "getData", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function () { return chunkJGFRUAZT_cjs.getData; }
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "getGlobalAxiosInstance", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () { return chunkJGFRUAZT_cjs.getGlobalAxiosInstance; }
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "getGlobalConfig", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function () { return chunkJGFRUAZT_cjs.getGlobalConfig; }
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, "getPendingRequestCount", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function () { return chunkJGFRUAZT_cjs.getPendingRequestCount; }
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "getReLoginPromise", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () { return chunkJGFRUAZT_cjs.getReLoginPromise; }
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, "isCanceledError", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function () { return chunkJGFRUAZT_cjs.isCanceledError; }
|
|
103
|
+
});
|
|
104
|
+
Object.defineProperty(exports, "isRequestError", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function () { return chunkJGFRUAZT_cjs.isRequestError; }
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "normalizeRequestError", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () { return chunkJGFRUAZT_cjs.normalizeRequestError; }
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(exports, "onReLoginCancel", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function () { return chunkJGFRUAZT_cjs.onReLoginCancel; }
|
|
115
|
+
});
|
|
116
|
+
Object.defineProperty(exports, "onReLoginSuccess", {
|
|
117
|
+
enumerable: true,
|
|
118
|
+
get: function () { return chunkJGFRUAZT_cjs.onReLoginSuccess; }
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "patchData", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () { return chunkJGFRUAZT_cjs.patchData; }
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(exports, "postData", {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
get: function () { return chunkJGFRUAZT_cjs.postData; }
|
|
127
|
+
});
|
|
128
|
+
Object.defineProperty(exports, "putData", {
|
|
129
|
+
enumerable: true,
|
|
130
|
+
get: function () { return chunkJGFRUAZT_cjs.putData; }
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "setGlobalAxiosInstance", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () { return chunkJGFRUAZT_cjs.setGlobalAxiosInstance; }
|
|
135
|
+
});
|
|
136
|
+
Object.defineProperty(exports, "waitForReLogin", {
|
|
137
|
+
enumerable: true,
|
|
138
|
+
get: function () { return chunkJGFRUAZT_cjs.waitForReLogin; }
|
|
139
|
+
});
|
|
815
140
|
//# sourceMappingURL=axios.cjs.map
|
|
816
141
|
//# sourceMappingURL=axios.cjs.map
|