🔧
This commit is contained in:
46
node_modules/axios/dist/node/axios.cjs
generated
vendored
46
node_modules/axios/dist/node/axios.cjs
generated
vendored
@@ -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';
|
||||
|
||||
const FormData$1 = require('form-data');
|
||||
@@ -36,6 +36,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);
|
||||
@@ -162,7 +163,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);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -513,13 +514,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]);
|
||||
}
|
||||
@@ -640,7 +641,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) => {
|
||||
@@ -709,6 +710,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
|
||||
|
||||
// *********************
|
||||
|
||||
|
||||
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
||||
|
||||
|
||||
const utils$1 = {
|
||||
isArray,
|
||||
isArrayBuffer,
|
||||
@@ -764,7 +769,8 @@ const utils$1 = {
|
||||
isAsyncFn,
|
||||
isThenable,
|
||||
setImmediate: _setImmediate,
|
||||
asap
|
||||
asap,
|
||||
isIterable
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1767,10 +1773,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);
|
||||
}
|
||||
@@ -1912,6 +1926,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';
|
||||
}
|
||||
@@ -2084,7 +2102,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
||||
return requestedURL;
|
||||
}
|
||||
|
||||
const VERSION = "1.8.4";
|
||||
const VERSION = "1.9.0";
|
||||
|
||||
function parseProtocol(url) {
|
||||
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
||||
@@ -2366,7 +2384,7 @@ const formDataToStream = (form, headersHandler, options) => {
|
||||
}
|
||||
|
||||
const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);
|
||||
const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);
|
||||
const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF);
|
||||
let contentLength = footerBytes.byteLength;
|
||||
|
||||
const parts = Array.from(form.entries()).map(([name, value]) => {
|
||||
@@ -3967,7 +3985,7 @@ const 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),
|
||||
{
|
||||
@@ -4233,7 +4251,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()
|
||||
|
||||
2
node_modules/axios/dist/node/axios.cjs.map
generated
vendored
2
node_modules/axios/dist/node/axios.cjs.map
generated
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user