@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.
@@ -1,5 +1,5 @@
1
- /* 2025-11-14 09:03:18 */
2
- import { A as N } from "./CBBFLbi8.js";
1
+ /* 2025-11-19 09:59:53 */
2
+ import { A as N } from "./xVYu0pcc.js";
3
3
  class R extends Error {
4
4
  static from(E, t, _, i, s, O) {
5
5
  const e = new R(
@@ -1,26 +1,26 @@
1
- /* 2025-11-14 09:03:18 */
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: A } = Object, { iterator: g, toStringTag: S } = Symbol, O = /* @__PURE__ */ ((e) => (t) => {
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) => O(t) === e), F = (e) => (t) => typeof t === e, { isArray: p } = Array, a = F("undefined");
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 B = f("ArrayBuffer");
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 && B(e.buffer), t;
17
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && S(e.buffer), t;
18
18
  }
19
- const k = F("string"), c = F("function"), P = F("number"), y = (e) => e !== null && typeof e == "object", U = (e) => e === !0 || e === !1, w = (e) => {
20
- if (O(e) !== "object")
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 = A(e);
23
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(S in e) && !(g in e);
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 = O(e)) === "formdata" || // detect form-data instance
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 h() {
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] = h(n[i], s) : w(s) ? n[i] = h({}, s) : p(s) ? n[i] = s.slice() : (!t || !a(s)) && (n[i] = s);
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[o] = R(s, n) : e[o] = s;
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
- ), e.prototype.constructor = e, Object.defineProperty(e, "super", {
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 && A(e);
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 (!P(t)) return null;
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" && A(Uint8Array)), ne = (e, t) => {
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[S] === "FormData" && e[g]);
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 b = n(i, s + 1);
175
- !a(b) && (o[l] = b);
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: B,
207
+ isArrayBuffer: S,
193
208
  isBuffer: d,
194
209
  isFormData: z,
195
210
  isArrayBufferView: M,
196
211
  isString: k,
197
- isNumber: P,
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: h,
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: O,
238
+ kindOf: b,
224
239
  kindOfTest: f,
225
240
  endsWith: v,
226
241
  toArray: ee,
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* 2025-11-14 09:03:18 */
1
+ /* 2025-11-19 09:59:53 */
2
2
  import o from "./lib/axios.js";
3
3
  const {
4
4
  Axios: e,
package/lib/axios.js CHANGED
@@ -1,6 +1,6 @@
1
- /* 2025-11-14 09:03:18 */
2
- import { A as b } from "../chunk/Turrizj0.js";
3
- import { A as i, b as ze } from "../chunk/CBBFLbi8.js";
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
@@ -1,5 +1,5 @@
1
- /* 2025-11-14 09:03:18 */
2
- import { A as f } from "../chunk/CBBFLbi8.js";
1
+ /* 2025-11-19 09:59:53 */
2
+ import { A as f } from "../chunk/xVYu0pcc.js";
3
3
  export {
4
4
  f as default
5
5
  };
@@ -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.
@@ -1,5 +1,5 @@
1
- /* 2025-11-14 09:03:18 */
2
- import { A as E } from "../chunk/CBBFLbi8.js";
1
+ /* 2025-11-19 09:59:53 */
2
+ import { A as E } from "../chunk/xVYu0pcc.js";
3
3
  import { request as w } from "./request.js";
4
4
  import i from "./utils.js";
5
5
  const A = [
@@ -1,5 +1,5 @@
1
- /* 2025-11-14 09:03:18 */
2
- import { A as l } from "../chunk/CBBFLbi8.js";
1
+ /* 2025-11-19 09:59:53 */
2
+ import { A as l } from "../chunk/xVYu0pcc.js";
3
3
  import a from "./utils.js";
4
4
  function u(s, e) {
5
5
  let t = e.baseURL;
@@ -1,9 +1,9 @@
1
- /* 2025-11-14 09:03:18 */
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/Turrizj0.js";
6
- import { A as o } from "../chunk/CBBFLbi8.js";
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","dependencies":{"@unicom-cloud/utils":"latest"},"peerDependencies":{},"type":"module","types":"index.d.ts","main":"./index.js","publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"}}
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"}}