This commit is contained in:
2025-05-12 14:25:25 +02:00
parent ab2db755ef
commit 9e378ca2b7
2719 changed files with 46505 additions and 60181 deletions

View File

@@ -1,4 +1,4 @@
/*! Axios v1.8.4 Copyright (c) 2025 Matt Zabriskie and contributors */
/*! Axios v1.9.0 Copyright (c) 2025 Matt Zabriskie and contributors */
'use strict';
function bind(fn, thisArg) {
@@ -11,6 +11,7 @@ function bind(fn, thisArg) {
const {toString} = Object.prototype;
const {getPrototypeOf} = Object;
const {iterator, toStringTag} = Symbol;
const kindOf = (cache => thing => {
const str = toString.call(thing);
@@ -137,7 +138,7 @@ const isPlainObject = (val) => {
}
const prototype = getPrototypeOf(val);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
};
/**
@@ -488,13 +489,13 @@ const isTypedArray = (TypedArray => {
* @returns {void}
*/
const forEachEntry = (obj, fn) => {
const generator = obj && obj[Symbol.iterator];
const generator = obj && obj[iterator];
const iterator = generator.call(obj);
const _iterator = generator.call(obj);
let result;
while ((result = iterator.next()) && !result.done) {
while ((result = _iterator.next()) && !result.done) {
const pair = result.value;
fn.call(obj, pair[0], pair[1]);
}
@@ -615,7 +616,7 @@ const toFiniteNumber = (value, defaultValue) => {
* @returns {boolean}
*/
function isSpecCompliantForm(thing) {
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
}
const toJSONObject = (obj) => {
@@ -684,6 +685,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
// *********************
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
var utils$1 = {
isArray,
isArrayBuffer,
@@ -739,7 +744,8 @@ var utils$1 = {
isAsyncFn,
isThenable,
setImmediate: _setImmediate,
asap
asap,
isIterable
};
/**
@@ -1724,10 +1730,18 @@ class AxiosHeaders {
setHeaders(header, valueOrRewrite);
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
setHeaders(parseHeaders(header), valueOrRewrite);
} else if (utils$1.isHeaders(header)) {
for (const [key, value] of header.entries()) {
setHeader(value, key, rewrite);
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
let obj = {}, dest, key;
for (const entry of header) {
if (!utils$1.isArray(entry)) {
throw TypeError('Object iterator must return a key-value pair');
}
obj[key = entry[0]] = (dest = obj[key]) ?
(utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
}
setHeaders(obj, valueOrRewrite);
} else {
header != null && setHeader(valueOrRewrite, header, rewrite);
}
@@ -1869,6 +1883,10 @@ class AxiosHeaders {
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
}
getSetCookie() {
return this.get("set-cookie") || [];
}
get [Symbol.toStringTag]() {
return 'AxiosHeaders';
}
@@ -2908,7 +2926,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
} catch (err) {
unsubscribe && unsubscribe();
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
throw Object.assign(
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
{
@@ -3068,7 +3086,7 @@ function dispatchRequest(config) {
});
}
const VERSION = "1.8.4";
const VERSION = "1.9.0";
const validators$1 = {};
@@ -3176,7 +3194,7 @@ const validators = validator.validators;
*/
class Axios {
constructor(instanceConfig) {
this.defaults = instanceConfig;
this.defaults = instanceConfig || {};
this.interceptors = {
request: new InterceptorManager$1(),
response: new InterceptorManager$1()