@unicom-cloud/axios 0.1.1 → 0.1.2
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/chunk/{Turrizj0.js → g6FYfJ02.js} +2 -2
- package/chunk/{CBBFLbi8.js → xVYu0pcc.js} +39 -24
- package/index.js +1 -1
- package/lib/axios.js +3 -3
- package/lib/utils.js +2 -2
- package/mock-adapter/LICENSE +20 -0
- package/mock-adapter/index.js +2 -2
- package/mock-adapter/request.js +2 -2
- package/mock-adapter/utils.js +3 -3
- package/package.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
/* 2025-11-
|
|
1
|
+
/* 2025-11-19 09:59:53 */
|
|
2
2
|
function R(e, t) {
|
|
3
3
|
return function() {
|
|
4
4
|
return e.apply(t, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString: T } = Object.prototype, { getPrototypeOf:
|
|
7
|
+
const { toString: T } = Object.prototype, { getPrototypeOf: h } = Object, { iterator: g, toStringTag: P } = Symbol, b = /* @__PURE__ */ ((e) => (t) => {
|
|
8
8
|
const n = T.call(t);
|
|
9
9
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)), f = (e) => (e = e.toLowerCase(), (t) =>
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), f = (e) => (e = e.toLowerCase(), (t) => b(t) === e), O = (e) => (t) => typeof t === e, { isArray: p } = Array, a = O("undefined");
|
|
11
11
|
function d(e) {
|
|
12
12
|
return e !== null && !a(e) && e.constructor !== null && !a(e.constructor) && c(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
13
|
}
|
|
14
|
-
const
|
|
14
|
+
const S = f("ArrayBuffer");
|
|
15
15
|
function M(e) {
|
|
16
16
|
let t;
|
|
17
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
17
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && S(e.buffer), t;
|
|
18
18
|
}
|
|
19
|
-
const k =
|
|
20
|
-
if (
|
|
19
|
+
const k = O("string"), c = O("function"), B = O("number"), y = (e) => e !== null && typeof e == "object", U = (e) => e === !0 || e === !1, w = (e) => {
|
|
20
|
+
if (b(e) !== "object")
|
|
21
21
|
return !1;
|
|
22
|
-
const t =
|
|
23
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
22
|
+
const t = h(e);
|
|
23
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(P in e) && !(g in e);
|
|
24
24
|
}, N = (e) => {
|
|
25
25
|
if (!y(e) || d(e))
|
|
26
26
|
return !1;
|
|
@@ -31,7 +31,7 @@ const k = F("string"), c = F("function"), P = F("number"), y = (e) => e !== null
|
|
|
31
31
|
}
|
|
32
32
|
}, I = f("Date"), V = f("File"), _ = f("Blob"), q = f("FileList"), H = (e) => y(e) && c(e.pipe), z = (e) => {
|
|
33
33
|
let t;
|
|
34
|
-
return e && (typeof FormData == "function" && e instanceof FormData || c(e.append) && ((t =
|
|
34
|
+
return e && (typeof FormData == "function" && e instanceof FormData || c(e.append) && ((t = b(e)) === "formdata" || // detect form-data instance
|
|
35
35
|
t === "object" && c(e.toString) && e.toString() === "[object FormData]"));
|
|
36
36
|
}, J = f("URLSearchParams"), [K, $, W, G] = [
|
|
37
37
|
"ReadableStream",
|
|
@@ -67,10 +67,10 @@ function E(e, t) {
|
|
|
67
67
|
return null;
|
|
68
68
|
}
|
|
69
69
|
const u = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, L = (e) => !a(e) && e !== u;
|
|
70
|
-
function
|
|
70
|
+
function F() {
|
|
71
71
|
const { caseless: e, skipUndefined: t } = L(this) && this || {}, n = {}, r = (s, o) => {
|
|
72
72
|
const i = e && E(n, o) || o;
|
|
73
|
-
w(n[i]) && w(s) ? n[i] =
|
|
73
|
+
w(n[i]) && w(s) ? n[i] = F(n[i], s) : w(s) ? n[i] = F({}, s) : p(s) ? n[i] = s.slice() : (!t || !a(s)) && (n[i] = s);
|
|
74
74
|
};
|
|
75
75
|
for (let s = 0, o = arguments.length; s < o; s++)
|
|
76
76
|
arguments[s] && m(arguments[s], r);
|
|
@@ -79,14 +79,29 @@ function h() {
|
|
|
79
79
|
const X = (e, t, n, { allOwnKeys: r } = {}) => (m(
|
|
80
80
|
t,
|
|
81
81
|
(s, o) => {
|
|
82
|
-
n && c(s) ? e
|
|
82
|
+
n && c(s) ? Object.defineProperty(e, o, {
|
|
83
|
+
value: R(s, n),
|
|
84
|
+
writable: !0,
|
|
85
|
+
enumerable: !0,
|
|
86
|
+
configurable: !0
|
|
87
|
+
}) : Object.defineProperty(e, o, {
|
|
88
|
+
value: s,
|
|
89
|
+
writable: !0,
|
|
90
|
+
enumerable: !0,
|
|
91
|
+
configurable: !0
|
|
92
|
+
});
|
|
83
93
|
},
|
|
84
94
|
{ allOwnKeys: r }
|
|
85
95
|
), e), Y = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Z = (e, t, n, r) => {
|
|
86
96
|
e.prototype = Object.create(
|
|
87
97
|
t.prototype,
|
|
88
98
|
r
|
|
89
|
-
),
|
|
99
|
+
), Object.defineProperty(e.prototype, "constructor", {
|
|
100
|
+
value: e,
|
|
101
|
+
writable: !0,
|
|
102
|
+
enumerable: !1,
|
|
103
|
+
configurable: !0
|
|
104
|
+
}), Object.defineProperty(e, "super", {
|
|
90
105
|
value: t.prototype
|
|
91
106
|
}), n && Object.assign(e.prototype, n);
|
|
92
107
|
}, j = (e, t, n, r) => {
|
|
@@ -96,7 +111,7 @@ const X = (e, t, n, { allOwnKeys: r } = {}) => (m(
|
|
|
96
111
|
do {
|
|
97
112
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
98
113
|
i = s[o], (!r || r(i, e, t)) && !l[i] && (t[i] = e[i], l[i] = !0);
|
|
99
|
-
e = n !== !1 &&
|
|
114
|
+
e = n !== !1 && h(e);
|
|
100
115
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
101
116
|
return t;
|
|
102
117
|
}, v = (e, t, n) => {
|
|
@@ -107,12 +122,12 @@ const X = (e, t, n, { allOwnKeys: r } = {}) => (m(
|
|
|
107
122
|
if (!e) return null;
|
|
108
123
|
if (p(e)) return e;
|
|
109
124
|
let t = e.length;
|
|
110
|
-
if (!
|
|
125
|
+
if (!B(t)) return null;
|
|
111
126
|
const n = new Array(t);
|
|
112
127
|
for (; t-- > 0; )
|
|
113
128
|
n[t] = e[t];
|
|
114
129
|
return n;
|
|
115
|
-
}, te = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
130
|
+
}, te = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && h(Uint8Array)), ne = (e, t) => {
|
|
116
131
|
const r = (e && e[g]).call(e);
|
|
117
132
|
let s;
|
|
118
133
|
for (; (s = r.next()) && !s.done; ) {
|
|
@@ -158,7 +173,7 @@ const X = (e, t, n, { allOwnKeys: r } = {}) => (m(
|
|
|
158
173
|
}, le = () => {
|
|
159
174
|
}, ue = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
160
175
|
function ae(e) {
|
|
161
|
-
return !!(e && c(e.append) && e[
|
|
176
|
+
return !!(e && c(e.append) && e[P] === "FormData" && e[g]);
|
|
162
177
|
}
|
|
163
178
|
const pe = (e) => {
|
|
164
179
|
const t = new Array(10), n = (r, s) => {
|
|
@@ -171,8 +186,8 @@ const pe = (e) => {
|
|
|
171
186
|
t[s] = r;
|
|
172
187
|
const o = p(r) ? [] : {};
|
|
173
188
|
return m(r, (i, l) => {
|
|
174
|
-
const
|
|
175
|
-
!a(
|
|
189
|
+
const A = n(i, s + 1);
|
|
190
|
+
!a(A) && (o[l] = A);
|
|
176
191
|
}), t[s] = void 0, o;
|
|
177
192
|
}
|
|
178
193
|
}
|
|
@@ -189,12 +204,12 @@ const pe = (e) => {
|
|
|
189
204
|
r.push(s), u.postMessage(n, "*");
|
|
190
205
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", c(u.postMessage)), me = typeof queueMicrotask < "u" ? queueMicrotask.bind(u) : typeof process < "u" && process.nextTick || D, we = (e) => e != null && c(e[g]), ge = {
|
|
191
206
|
isArray: p,
|
|
192
|
-
isArrayBuffer:
|
|
207
|
+
isArrayBuffer: S,
|
|
193
208
|
isBuffer: d,
|
|
194
209
|
isFormData: z,
|
|
195
210
|
isArrayBufferView: M,
|
|
196
211
|
isString: k,
|
|
197
|
-
isNumber:
|
|
212
|
+
isNumber: B,
|
|
198
213
|
isBoolean: U,
|
|
199
214
|
isObject: y,
|
|
200
215
|
isPlainObject: w,
|
|
@@ -214,13 +229,13 @@ const pe = (e) => {
|
|
|
214
229
|
isTypedArray: te,
|
|
215
230
|
isFileList: q,
|
|
216
231
|
forEach: m,
|
|
217
|
-
merge:
|
|
232
|
+
merge: F,
|
|
218
233
|
extend: X,
|
|
219
234
|
trim: Q,
|
|
220
235
|
stripBOM: Y,
|
|
221
236
|
inherits: Z,
|
|
222
237
|
toFlatObject: j,
|
|
223
|
-
kindOf:
|
|
238
|
+
kindOf: b,
|
|
224
239
|
kindOfTest: f,
|
|
225
240
|
endsWith: v,
|
|
226
241
|
toArray: ee,
|
package/index.js
CHANGED
package/lib/axios.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/* 2025-11-
|
|
2
|
-
import { A as b } from "../chunk/
|
|
3
|
-
import { A as i, b as ze } from "../chunk/
|
|
1
|
+
/* 2025-11-19 09:59:53 */
|
|
2
|
+
import { A as b } from "../chunk/g6FYfJ02.js";
|
|
3
|
+
import { A as i, b as ze } from "../chunk/xVYu0pcc.js";
|
|
4
4
|
const $e = i.toObjectSet([
|
|
5
5
|
"age",
|
|
6
6
|
"authorization",
|
package/lib/utils.js
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Colin Timmermans
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/mock-adapter/index.js
CHANGED
package/mock-adapter/request.js
CHANGED
package/mock-adapter/utils.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* 2025-11-
|
|
1
|
+
/* 2025-11-19 09:59:53 */
|
|
2
2
|
import S from "lodash/isArrayBuffer.js";
|
|
3
3
|
import O from "lodash/isBuffer.js";
|
|
4
4
|
import d from "lodash/isEqual.js";
|
|
5
|
-
import { A as m } from "../chunk/
|
|
6
|
-
import { A as o } from "../chunk/
|
|
5
|
+
import { A as m } from "../chunk/g6FYfJ02.js";
|
|
6
|
+
import { A as o } from "../chunk/xVYu0pcc.js";
|
|
7
7
|
function p(t, r) {
|
|
8
8
|
const n = t.length;
|
|
9
9
|
for (let e = 0; e < n; e++) {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@unicom-cloud/axios","version":"0.1.
|
|
1
|
+
{"name":"@unicom-cloud/axios","version":"0.1.2","dependencies":{"@unicom-cloud/utils":"^0.1.0"},"peerDependencies":{},"type":"module","types":"index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
|