axios 1.6.4 → 1.6.6
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.
Potentially problematic release.
This version of axios might be problematic. Click here for more details.
- package/CHANGELOG.md +26 -0
- package/README.md +6 -1
- package/dist/axios.js +366 -3
- package/dist/axios.js.map +1 -1
- package/dist/axios.min.js +1 -1
- package/dist/axios.min.js.map +1 -1
- package/dist/browser/axios.cjs +24 -3
- package/dist/browser/axios.cjs.map +1 -1
- package/dist/esm/axios.js +24 -3
- package/dist/esm/axios.js.map +1 -1
- package/dist/esm/axios.min.js +1 -1
- package/dist/esm/axios.min.js.map +1 -1
- package/dist/node/axios.cjs +30 -5
- package/dist/node/axios.cjs.map +1 -1
- package/index.d.cts +1 -1
- package/index.d.ts +1 -1
- package/lib/adapters/http.js +6 -2
- package/lib/core/Axios.js +22 -1
- package/lib/env/data.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [1.6.6](https://github.com/axios/axios/compare/v1.6.5...v1.6.6) (2024-01-24)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* fixed missed dispatchBeforeRedirect argument ([#5778](https://github.com/axios/axios/issues/5778)) ([a1938ff](https://github.com/axios/axios/commit/a1938ff073fcb0f89011f001dfbc1fa1dc995e39))
|
9
|
+
* wrap errors to improve async stack trace ([#5987](https://github.com/axios/axios/issues/5987)) ([123f354](https://github.com/axios/axios/commit/123f354b920f154a209ea99f76b7b2ef3d9ebbab))
|
10
|
+
|
11
|
+
### Contributors to this release
|
12
|
+
|
13
|
+
- <img src="https://avatars.githubusercontent.com/u/1186084?v=4&s=18" alt="avatar" width="18"/> [Ilya Priven](https://github.com/ikonst "+91/-8 (#5987 )")
|
14
|
+
- <img src="https://avatars.githubusercontent.com/u/1884246?v=4&s=18" alt="avatar" width="18"/> [Zao Soula](https://github.com/zaosoula "+6/-6 (#5778 )")
|
15
|
+
|
16
|
+
## [1.6.5](https://github.com/axios/axios/compare/v1.6.4...v1.6.5) (2024-01-05)
|
17
|
+
|
18
|
+
|
19
|
+
### Bug Fixes
|
20
|
+
|
21
|
+
* **ci:** refactor notify action as a job of publish action; ([#6176](https://github.com/axios/axios/issues/6176)) ([0736f95](https://github.com/axios/axios/commit/0736f95ce8776366dc9ca569f49ba505feb6373c))
|
22
|
+
* **dns:** fixed lookup error handling; ([#6175](https://github.com/axios/axios/issues/6175)) ([f4f2b03](https://github.com/axios/axios/commit/f4f2b039dd38eb4829e8583caede4ed6d2dd59be))
|
23
|
+
|
24
|
+
### Contributors to this release
|
25
|
+
|
26
|
+
- <img src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+41/-6 (#6176 #6175 )")
|
27
|
+
- <img src="https://avatars.githubusercontent.com/u/4814473?v=4&s=18" alt="avatar" width="18"/> [Jay](https://github.com/jasonsaayman "+6/-1 ()")
|
28
|
+
|
3
29
|
## [1.6.4](https://github.com/axios/axios/compare/v1.6.3...v1.6.4) (2024-01-03)
|
4
30
|
|
5
31
|
|
package/README.md
CHANGED
@@ -11,7 +11,12 @@
|
|
11
11
|
<img width="400px" src="https://github.com/axios/axios/assets/4814473/75c37f4d-36e6-44f5-a068-3edd77c00a10" />
|
12
12
|
</picture>
|
13
13
|
</a>
|
14
|
-
|
14
|
+
|
15
|
+
<p align="center">Alloy is the integration development platform that makes it simple and <br>fast for SaaS companies to launch critical user-facing integrations.</p>
|
16
|
+
<p align="center">
|
17
|
+
<a href="https://runalloy.com/signup?utm_source=github&utm_medium=referral&utm_campaign=11823_axios"><b>Sign up free</b></a> •
|
18
|
+
<a href="https://docs.runalloy.com/docs?utm_source=github&utm_medium=referral&utm_campaign=11823_axios"><b>Documentation</b></a>
|
19
|
+
</p>
|
15
20
|
<br><br>
|
16
21
|
</div>
|
17
22
|
|
package/dist/axios.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// Axios v1.6.
|
1
|
+
// Axios v1.6.6 Copyright (c) 2024 Matt Zabriskie and contributors
|
2
2
|
(function (global, factory) {
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
@@ -26,6 +26,297 @@
|
|
26
26
|
}
|
27
27
|
return target;
|
28
28
|
}
|
29
|
+
function _regeneratorRuntime() {
|
30
|
+
_regeneratorRuntime = function () {
|
31
|
+
return exports;
|
32
|
+
};
|
33
|
+
var exports = {},
|
34
|
+
Op = Object.prototype,
|
35
|
+
hasOwn = Op.hasOwnProperty,
|
36
|
+
$Symbol = "function" == typeof Symbol ? Symbol : {},
|
37
|
+
iteratorSymbol = $Symbol.iterator || "@@iterator",
|
38
|
+
asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
|
39
|
+
toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
40
|
+
function define(obj, key, value) {
|
41
|
+
return Object.defineProperty(obj, key, {
|
42
|
+
value: value,
|
43
|
+
enumerable: !0,
|
44
|
+
configurable: !0,
|
45
|
+
writable: !0
|
46
|
+
}), obj[key];
|
47
|
+
}
|
48
|
+
try {
|
49
|
+
define({}, "");
|
50
|
+
} catch (err) {
|
51
|
+
define = function (obj, key, value) {
|
52
|
+
return obj[key] = value;
|
53
|
+
};
|
54
|
+
}
|
55
|
+
function wrap(innerFn, outerFn, self, tryLocsList) {
|
56
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
|
57
|
+
generator = Object.create(protoGenerator.prototype),
|
58
|
+
context = new Context(tryLocsList || []);
|
59
|
+
return generator._invoke = function (innerFn, self, context) {
|
60
|
+
var state = "suspendedStart";
|
61
|
+
return function (method, arg) {
|
62
|
+
if ("executing" === state) throw new Error("Generator is already running");
|
63
|
+
if ("completed" === state) {
|
64
|
+
if ("throw" === method) throw arg;
|
65
|
+
return doneResult();
|
66
|
+
}
|
67
|
+
for (context.method = method, context.arg = arg;;) {
|
68
|
+
var delegate = context.delegate;
|
69
|
+
if (delegate) {
|
70
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
71
|
+
if (delegateResult) {
|
72
|
+
if (delegateResult === ContinueSentinel) continue;
|
73
|
+
return delegateResult;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
77
|
+
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
78
|
+
context.dispatchException(context.arg);
|
79
|
+
} else "return" === context.method && context.abrupt("return", context.arg);
|
80
|
+
state = "executing";
|
81
|
+
var record = tryCatch(innerFn, self, context);
|
82
|
+
if ("normal" === record.type) {
|
83
|
+
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
84
|
+
return {
|
85
|
+
value: record.arg,
|
86
|
+
done: context.done
|
87
|
+
};
|
88
|
+
}
|
89
|
+
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
90
|
+
}
|
91
|
+
};
|
92
|
+
}(innerFn, self, context), generator;
|
93
|
+
}
|
94
|
+
function tryCatch(fn, obj, arg) {
|
95
|
+
try {
|
96
|
+
return {
|
97
|
+
type: "normal",
|
98
|
+
arg: fn.call(obj, arg)
|
99
|
+
};
|
100
|
+
} catch (err) {
|
101
|
+
return {
|
102
|
+
type: "throw",
|
103
|
+
arg: err
|
104
|
+
};
|
105
|
+
}
|
106
|
+
}
|
107
|
+
exports.wrap = wrap;
|
108
|
+
var ContinueSentinel = {};
|
109
|
+
function Generator() {}
|
110
|
+
function GeneratorFunction() {}
|
111
|
+
function GeneratorFunctionPrototype() {}
|
112
|
+
var IteratorPrototype = {};
|
113
|
+
define(IteratorPrototype, iteratorSymbol, function () {
|
114
|
+
return this;
|
115
|
+
});
|
116
|
+
var getProto = Object.getPrototypeOf,
|
117
|
+
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
118
|
+
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
119
|
+
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
120
|
+
function defineIteratorMethods(prototype) {
|
121
|
+
["next", "throw", "return"].forEach(function (method) {
|
122
|
+
define(prototype, method, function (arg) {
|
123
|
+
return this._invoke(method, arg);
|
124
|
+
});
|
125
|
+
});
|
126
|
+
}
|
127
|
+
function AsyncIterator(generator, PromiseImpl) {
|
128
|
+
function invoke(method, arg, resolve, reject) {
|
129
|
+
var record = tryCatch(generator[method], generator, arg);
|
130
|
+
if ("throw" !== record.type) {
|
131
|
+
var result = record.arg,
|
132
|
+
value = result.value;
|
133
|
+
return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
134
|
+
invoke("next", value, resolve, reject);
|
135
|
+
}, function (err) {
|
136
|
+
invoke("throw", err, resolve, reject);
|
137
|
+
}) : PromiseImpl.resolve(value).then(function (unwrapped) {
|
138
|
+
result.value = unwrapped, resolve(result);
|
139
|
+
}, function (error) {
|
140
|
+
return invoke("throw", error, resolve, reject);
|
141
|
+
});
|
142
|
+
}
|
143
|
+
reject(record.arg);
|
144
|
+
}
|
145
|
+
var previousPromise;
|
146
|
+
this._invoke = function (method, arg) {
|
147
|
+
function callInvokeWithMethodAndArg() {
|
148
|
+
return new PromiseImpl(function (resolve, reject) {
|
149
|
+
invoke(method, arg, resolve, reject);
|
150
|
+
});
|
151
|
+
}
|
152
|
+
return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
153
|
+
};
|
154
|
+
}
|
155
|
+
function maybeInvokeDelegate(delegate, context) {
|
156
|
+
var method = delegate.iterator[context.method];
|
157
|
+
if (undefined === method) {
|
158
|
+
if (context.delegate = null, "throw" === context.method) {
|
159
|
+
if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
|
160
|
+
context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
|
161
|
+
}
|
162
|
+
return ContinueSentinel;
|
163
|
+
}
|
164
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
165
|
+
if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
|
166
|
+
var info = record.arg;
|
167
|
+
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
168
|
+
}
|
169
|
+
function pushTryEntry(locs) {
|
170
|
+
var entry = {
|
171
|
+
tryLoc: locs[0]
|
172
|
+
};
|
173
|
+
1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
|
174
|
+
}
|
175
|
+
function resetTryEntry(entry) {
|
176
|
+
var record = entry.completion || {};
|
177
|
+
record.type = "normal", delete record.arg, entry.completion = record;
|
178
|
+
}
|
179
|
+
function Context(tryLocsList) {
|
180
|
+
this.tryEntries = [{
|
181
|
+
tryLoc: "root"
|
182
|
+
}], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
|
183
|
+
}
|
184
|
+
function values(iterable) {
|
185
|
+
if (iterable) {
|
186
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
187
|
+
if (iteratorMethod) return iteratorMethod.call(iterable);
|
188
|
+
if ("function" == typeof iterable.next) return iterable;
|
189
|
+
if (!isNaN(iterable.length)) {
|
190
|
+
var i = -1,
|
191
|
+
next = function next() {
|
192
|
+
for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
|
193
|
+
return next.value = undefined, next.done = !0, next;
|
194
|
+
};
|
195
|
+
return next.next = next;
|
196
|
+
}
|
197
|
+
}
|
198
|
+
return {
|
199
|
+
next: doneResult
|
200
|
+
};
|
201
|
+
}
|
202
|
+
function doneResult() {
|
203
|
+
return {
|
204
|
+
value: undefined,
|
205
|
+
done: !0
|
206
|
+
};
|
207
|
+
}
|
208
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
|
209
|
+
var ctor = "function" == typeof genFun && genFun.constructor;
|
210
|
+
return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
|
211
|
+
}, exports.mark = function (genFun) {
|
212
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
|
213
|
+
}, exports.awrap = function (arg) {
|
214
|
+
return {
|
215
|
+
__await: arg
|
216
|
+
};
|
217
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
218
|
+
return this;
|
219
|
+
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
220
|
+
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
221
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
222
|
+
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
223
|
+
return result.done ? result.value : iter.next();
|
224
|
+
});
|
225
|
+
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
226
|
+
return this;
|
227
|
+
}), define(Gp, "toString", function () {
|
228
|
+
return "[object Generator]";
|
229
|
+
}), exports.keys = function (object) {
|
230
|
+
var keys = [];
|
231
|
+
for (var key in object) keys.push(key);
|
232
|
+
return keys.reverse(), function next() {
|
233
|
+
for (; keys.length;) {
|
234
|
+
var key = keys.pop();
|
235
|
+
if (key in object) return next.value = key, next.done = !1, next;
|
236
|
+
}
|
237
|
+
return next.done = !0, next;
|
238
|
+
};
|
239
|
+
}, exports.values = values, Context.prototype = {
|
240
|
+
constructor: Context,
|
241
|
+
reset: function (skipTempReset) {
|
242
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
243
|
+
},
|
244
|
+
stop: function () {
|
245
|
+
this.done = !0;
|
246
|
+
var rootRecord = this.tryEntries[0].completion;
|
247
|
+
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
248
|
+
return this.rval;
|
249
|
+
},
|
250
|
+
dispatchException: function (exception) {
|
251
|
+
if (this.done) throw exception;
|
252
|
+
var context = this;
|
253
|
+
function handle(loc, caught) {
|
254
|
+
return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
|
255
|
+
}
|
256
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
257
|
+
var entry = this.tryEntries[i],
|
258
|
+
record = entry.completion;
|
259
|
+
if ("root" === entry.tryLoc) return handle("end");
|
260
|
+
if (entry.tryLoc <= this.prev) {
|
261
|
+
var hasCatch = hasOwn.call(entry, "catchLoc"),
|
262
|
+
hasFinally = hasOwn.call(entry, "finallyLoc");
|
263
|
+
if (hasCatch && hasFinally) {
|
264
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
265
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
266
|
+
} else if (hasCatch) {
|
267
|
+
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
268
|
+
} else {
|
269
|
+
if (!hasFinally) throw new Error("try statement without catch or finally");
|
270
|
+
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
271
|
+
}
|
272
|
+
}
|
273
|
+
}
|
274
|
+
},
|
275
|
+
abrupt: function (type, arg) {
|
276
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
277
|
+
var entry = this.tryEntries[i];
|
278
|
+
if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
|
279
|
+
var finallyEntry = entry;
|
280
|
+
break;
|
281
|
+
}
|
282
|
+
}
|
283
|
+
finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
|
284
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
285
|
+
return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
|
286
|
+
},
|
287
|
+
complete: function (record, afterLoc) {
|
288
|
+
if ("throw" === record.type) throw record.arg;
|
289
|
+
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
290
|
+
},
|
291
|
+
finish: function (finallyLoc) {
|
292
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
293
|
+
var entry = this.tryEntries[i];
|
294
|
+
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
295
|
+
}
|
296
|
+
},
|
297
|
+
catch: function (tryLoc) {
|
298
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
299
|
+
var entry = this.tryEntries[i];
|
300
|
+
if (entry.tryLoc === tryLoc) {
|
301
|
+
var record = entry.completion;
|
302
|
+
if ("throw" === record.type) {
|
303
|
+
var thrown = record.arg;
|
304
|
+
resetTryEntry(entry);
|
305
|
+
}
|
306
|
+
return thrown;
|
307
|
+
}
|
308
|
+
}
|
309
|
+
throw new Error("illegal catch attempt");
|
310
|
+
},
|
311
|
+
delegateYield: function (iterable, resultName, nextLoc) {
|
312
|
+
return this.delegate = {
|
313
|
+
iterator: values(iterable),
|
314
|
+
resultName: resultName,
|
315
|
+
nextLoc: nextLoc
|
316
|
+
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
317
|
+
}
|
318
|
+
}, exports;
|
319
|
+
}
|
29
320
|
function _typeof(obj) {
|
30
321
|
"@babel/helpers - typeof";
|
31
322
|
|
@@ -35,6 +326,36 @@
|
|
35
326
|
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
36
327
|
}, _typeof(obj);
|
37
328
|
}
|
329
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
330
|
+
try {
|
331
|
+
var info = gen[key](arg);
|
332
|
+
var value = info.value;
|
333
|
+
} catch (error) {
|
334
|
+
reject(error);
|
335
|
+
return;
|
336
|
+
}
|
337
|
+
if (info.done) {
|
338
|
+
resolve(value);
|
339
|
+
} else {
|
340
|
+
Promise.resolve(value).then(_next, _throw);
|
341
|
+
}
|
342
|
+
}
|
343
|
+
function _asyncToGenerator(fn) {
|
344
|
+
return function () {
|
345
|
+
var self = this,
|
346
|
+
args = arguments;
|
347
|
+
return new Promise(function (resolve, reject) {
|
348
|
+
var gen = fn.apply(self, args);
|
349
|
+
function _next(value) {
|
350
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
351
|
+
}
|
352
|
+
function _throw(err) {
|
353
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
354
|
+
}
|
355
|
+
_next(undefined);
|
356
|
+
});
|
357
|
+
};
|
358
|
+
}
|
38
359
|
function _classCallCheck(instance, Constructor) {
|
39
360
|
if (!(instance instanceof Constructor)) {
|
40
361
|
throw new TypeError("Cannot call a class as a function");
|
@@ -2520,7 +2841,7 @@
|
|
2520
2841
|
return config;
|
2521
2842
|
}
|
2522
2843
|
|
2523
|
-
var VERSION = "1.6.
|
2844
|
+
var VERSION = "1.6.6";
|
2524
2845
|
|
2525
2846
|
var validators$1 = {};
|
2526
2847
|
|
@@ -2626,7 +2947,49 @@
|
|
2626
2947
|
*/
|
2627
2948
|
_createClass(Axios, [{
|
2628
2949
|
key: "request",
|
2629
|
-
value: function
|
2950
|
+
value: function () {
|
2951
|
+
var _request2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(configOrUrl, config) {
|
2952
|
+
var dummy;
|
2953
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
2954
|
+
while (1) {
|
2955
|
+
switch (_context.prev = _context.next) {
|
2956
|
+
case 0:
|
2957
|
+
_context.prev = 0;
|
2958
|
+
_context.next = 3;
|
2959
|
+
return this._request(configOrUrl, config);
|
2960
|
+
case 3:
|
2961
|
+
return _context.abrupt("return", _context.sent);
|
2962
|
+
case 6:
|
2963
|
+
_context.prev = 6;
|
2964
|
+
_context.t0 = _context["catch"](0);
|
2965
|
+
dummy = {};
|
2966
|
+
if (Error.captureStackTrace) {
|
2967
|
+
Error.captureStackTrace(dummy);
|
2968
|
+
} else {
|
2969
|
+
dummy.stack = new Error().stack;
|
2970
|
+
}
|
2971
|
+
// slice off the Error: ... line
|
2972
|
+
dummy.stack = dummy.stack.replace(/^.+\n/, '');
|
2973
|
+
// match without the 2 top stack lines
|
2974
|
+
if (!_context.t0.stack.endsWith(dummy.stack.replace(/^.+\n.+\n/, ''))) {
|
2975
|
+
_context.t0.stack += '\n' + dummy.stack;
|
2976
|
+
}
|
2977
|
+
throw _context.t0;
|
2978
|
+
case 13:
|
2979
|
+
case "end":
|
2980
|
+
return _context.stop();
|
2981
|
+
}
|
2982
|
+
}
|
2983
|
+
}, _callee, this, [[0, 6]]);
|
2984
|
+
}));
|
2985
|
+
function request(_x, _x2) {
|
2986
|
+
return _request2.apply(this, arguments);
|
2987
|
+
}
|
2988
|
+
return request;
|
2989
|
+
}()
|
2990
|
+
}, {
|
2991
|
+
key: "_request",
|
2992
|
+
value: function _request(configOrUrl, config) {
|
2630
2993
|
/*eslint no-param-reassign:0*/
|
2631
2994
|
// Allow for axios('example/url'[, config]) a la fetch API
|
2632
2995
|
if (typeof configOrUrl === 'string') {
|