mirror of
https://github.com/hashicorp/setup-terraform.git
synced 2025-12-16 00:22:34 +00:00
Bump axios from 1.7.4 to 1.8.2 (#471)
* Bump axios from 1.7.4 to 1.8.2 Bumps [axios](https://github.com/axios/axios) from 1.7.4 to 1.8.2. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.7.4...v1.8.2) --- updated-dependencies: - dependency-name: axios dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * chore: build dist/index.js --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ansgar Mertens <ansgar@hashicorp.com>
This commit is contained in:
parent
0c8c41f96f
commit
2f1b53ffa5
2 changed files with 195 additions and 172 deletions
354
dist/index.js
vendored
354
dist/index.js
vendored
|
|
@ -43779,10 +43779,11 @@ module.exports = require("zlib");
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
// Axios v1.7.4 Copyright (c) 2024 Matt Zabriskie and contributors
|
/*! Axios v1.8.2 Copyright (c) 2025 Matt Zabriskie and contributors */
|
||||||
|
|
||||||
|
|
||||||
const FormData$1 = __nccwpck_require__(6454);
|
const FormData$1 = __nccwpck_require__(6454);
|
||||||
|
const crypto = __nccwpck_require__(6982);
|
||||||
const url = __nccwpck_require__(7016);
|
const url = __nccwpck_require__(7016);
|
||||||
const proxyFromEnv = __nccwpck_require__(7777);
|
const proxyFromEnv = __nccwpck_require__(7777);
|
||||||
const http = __nccwpck_require__(8611);
|
const http = __nccwpck_require__(8611);
|
||||||
|
|
@ -43796,7 +43797,9 @@ const events = __nccwpck_require__(4434);
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||||
|
|
||||||
const FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1);
|
const FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1);
|
||||||
|
const crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
|
||||||
const url__default = /*#__PURE__*/_interopDefaultLegacy(url);
|
const url__default = /*#__PURE__*/_interopDefaultLegacy(url);
|
||||||
|
const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv);
|
||||||
const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
||||||
const https__default = /*#__PURE__*/_interopDefaultLegacy(https);
|
const https__default = /*#__PURE__*/_interopDefaultLegacy(https);
|
||||||
const util__default = /*#__PURE__*/_interopDefaultLegacy(util);
|
const util__default = /*#__PURE__*/_interopDefaultLegacy(util);
|
||||||
|
|
@ -44410,26 +44413,6 @@ const toFiniteNumber = (value, defaultValue) => {
|
||||||
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
|
||||||
|
|
||||||
const DIGIT = '0123456789';
|
|
||||||
|
|
||||||
const ALPHABET = {
|
|
||||||
DIGIT,
|
|
||||||
ALPHA,
|
|
||||||
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
||||||
};
|
|
||||||
|
|
||||||
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
||||||
let str = '';
|
|
||||||
const {length} = alphabet;
|
|
||||||
while (size--) {
|
|
||||||
str += alphabet[Math.random() * length|0];
|
|
||||||
}
|
|
||||||
|
|
||||||
return str;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the thing is a FormData object, return true, otherwise return false.
|
* If the thing is a FormData object, return true, otherwise return false.
|
||||||
*
|
*
|
||||||
|
|
@ -44557,8 +44540,6 @@ const utils$1 = {
|
||||||
findKey,
|
findKey,
|
||||||
global: _global,
|
global: _global,
|
||||||
isContextDefined,
|
isContextDefined,
|
||||||
ALPHABET,
|
|
||||||
generateString,
|
|
||||||
isSpecCompliantForm,
|
isSpecCompliantForm,
|
||||||
toJSONObject,
|
toJSONObject,
|
||||||
isAsyncFn,
|
isAsyncFn,
|
||||||
|
|
@ -44592,7 +44573,10 @@ function AxiosError(message, code, config, request, response) {
|
||||||
code && (this.code = code);
|
code && (this.code = code);
|
||||||
config && (this.config = config);
|
config && (this.config = config);
|
||||||
request && (this.request = request);
|
request && (this.request = request);
|
||||||
response && (this.response = response);
|
if (response) {
|
||||||
|
this.response = response;
|
||||||
|
this.status = response.status ? response.status : null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
utils$1.inherits(AxiosError, Error, {
|
utils$1.inherits(AxiosError, Error, {
|
||||||
|
|
@ -44612,7 +44596,7 @@ utils$1.inherits(AxiosError, Error, {
|
||||||
// Axios
|
// Axios
|
||||||
config: utils$1.toJSONObject(this.config),
|
config: utils$1.toJSONObject(this.config),
|
||||||
code: this.code,
|
code: this.code,
|
||||||
status: this.response && this.response.status ? this.response.status : null
|
status: this.status
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -44949,7 +44933,7 @@ function encode(val) {
|
||||||
*
|
*
|
||||||
* @param {string} url The base of the url (e.g., http://www.google.com)
|
* @param {string} url The base of the url (e.g., http://www.google.com)
|
||||||
* @param {object} [params] The params to be appended
|
* @param {object} [params] The params to be appended
|
||||||
* @param {?object} options
|
* @param {?(object|Function)} options
|
||||||
*
|
*
|
||||||
* @returns {string} The formatted url
|
* @returns {string} The formatted url
|
||||||
*/
|
*/
|
||||||
|
|
@ -44961,6 +44945,12 @@ function buildURL(url, params, options) {
|
||||||
|
|
||||||
const _encode = options && options.encode || encode;
|
const _encode = options && options.encode || encode;
|
||||||
|
|
||||||
|
if (utils$1.isFunction(options)) {
|
||||||
|
options = {
|
||||||
|
serialize: options
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const serializeFn = options && options.serialize;
|
const serializeFn = options && options.serialize;
|
||||||
|
|
||||||
let serializedParams;
|
let serializedParams;
|
||||||
|
|
@ -45061,6 +45051,29 @@ const transitionalDefaults = {
|
||||||
|
|
||||||
const URLSearchParams = url__default["default"].URLSearchParams;
|
const URLSearchParams = url__default["default"].URLSearchParams;
|
||||||
|
|
||||||
|
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
||||||
|
|
||||||
|
const DIGIT = '0123456789';
|
||||||
|
|
||||||
|
const ALPHABET = {
|
||||||
|
DIGIT,
|
||||||
|
ALPHA,
|
||||||
|
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
||||||
|
};
|
||||||
|
|
||||||
|
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
||||||
|
let str = '';
|
||||||
|
const {length} = alphabet;
|
||||||
|
const randomValues = new Uint32Array(size);
|
||||||
|
crypto__default["default"].randomFillSync(randomValues);
|
||||||
|
for (let i = 0; i < size; i++) {
|
||||||
|
str += alphabet[randomValues[i] % length];
|
||||||
|
}
|
||||||
|
|
||||||
|
return str;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
const platform$1 = {
|
const platform$1 = {
|
||||||
isNode: true,
|
isNode: true,
|
||||||
classes: {
|
classes: {
|
||||||
|
|
@ -45068,11 +45081,15 @@ const platform$1 = {
|
||||||
FormData: FormData__default["default"],
|
FormData: FormData__default["default"],
|
||||||
Blob: typeof Blob !== 'undefined' && Blob || null
|
Blob: typeof Blob !== 'undefined' && Blob || null
|
||||||
},
|
},
|
||||||
|
ALPHABET,
|
||||||
|
generateString,
|
||||||
protocols: [ 'http', 'https', 'file', 'data' ]
|
protocols: [ 'http', 'https', 'file', 'data' ]
|
||||||
};
|
};
|
||||||
|
|
||||||
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
||||||
|
|
||||||
|
const _navigator = typeof navigator === 'object' && navigator || undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if we're running in a standard browser environment
|
* Determine if we're running in a standard browser environment
|
||||||
*
|
*
|
||||||
|
|
@ -45090,10 +45107,8 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde
|
||||||
*
|
*
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
const hasStandardBrowserEnv = (
|
const hasStandardBrowserEnv = hasBrowserEnv &&
|
||||||
(product) => {
|
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
|
||||||
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
|
|
||||||
})(typeof navigator !== 'undefined' && navigator.product);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if we're running in a standard browser webWorker environment
|
* Determine if we're running in a standard browser webWorker environment
|
||||||
|
|
@ -45120,6 +45135,7 @@ const utils = /*#__PURE__*/Object.freeze({
|
||||||
hasBrowserEnv: hasBrowserEnv,
|
hasBrowserEnv: hasBrowserEnv,
|
||||||
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
||||||
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
hasStandardBrowserEnv: hasStandardBrowserEnv,
|
||||||
|
navigator: _navigator,
|
||||||
origin: origin
|
origin: origin
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -45841,14 +45857,15 @@ function combineURLs(baseURL, relativeURL) {
|
||||||
*
|
*
|
||||||
* @returns {string} The combined full path
|
* @returns {string} The combined full path
|
||||||
*/
|
*/
|
||||||
function buildFullPath(baseURL, requestedURL) {
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
||||||
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
||||||
|
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
|
||||||
return combineURLs(baseURL, requestedURL);
|
return combineURLs(baseURL, requestedURL);
|
||||||
}
|
}
|
||||||
return requestedURL;
|
return requestedURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION = "1.7.4";
|
const VERSION = "1.8.2";
|
||||||
|
|
||||||
function parseProtocol(url) {
|
function parseProtocol(url) {
|
||||||
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
||||||
|
|
@ -46058,9 +46075,9 @@ const readBlob = async function* (blob) {
|
||||||
|
|
||||||
const readBlob$1 = readBlob;
|
const readBlob$1 = readBlob;
|
||||||
|
|
||||||
const BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + '-_';
|
const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_';
|
||||||
|
|
||||||
const textEncoder = new util.TextEncoder();
|
const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util__default["default"].TextEncoder();
|
||||||
|
|
||||||
const CRLF = '\r\n';
|
const CRLF = '\r\n';
|
||||||
const CRLF_BYTES = textEncoder.encode(CRLF);
|
const CRLF_BYTES = textEncoder.encode(CRLF);
|
||||||
|
|
@ -46118,7 +46135,7 @@ const formDataToStream = (form, headersHandler, options) => {
|
||||||
const {
|
const {
|
||||||
tag = 'form-data-boundary',
|
tag = 'form-data-boundary',
|
||||||
size = 25,
|
size = 25,
|
||||||
boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET)
|
boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET)
|
||||||
} = options || {};
|
} = options || {};
|
||||||
|
|
||||||
if(!utils$1.isFormData(form)) {
|
if(!utils$1.isFormData(form)) {
|
||||||
|
|
@ -46398,7 +46415,7 @@ function dispatchBeforeRedirect(options, responseDetails) {
|
||||||
function setProxy(options, configProxy, location) {
|
function setProxy(options, configProxy, location) {
|
||||||
let proxy = configProxy;
|
let proxy = configProxy;
|
||||||
if (!proxy && proxy !== false) {
|
if (!proxy && proxy !== false) {
|
||||||
const proxyUrl = proxyFromEnv.getProxyForUrl(location);
|
const proxyUrl = proxyFromEnv__default["default"].getProxyForUrl(location);
|
||||||
if (proxyUrl) {
|
if (proxyUrl) {
|
||||||
proxy = new URL(proxyUrl);
|
proxy = new URL(proxyUrl);
|
||||||
}
|
}
|
||||||
|
|
@ -46543,8 +46560,8 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse url
|
// Parse url
|
||||||
const fullPath = buildFullPath(config.baseURL, config.url);
|
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
||||||
const parsed = new URL(fullPath, utils$1.hasBrowserEnv ? platform.origin : undefined);
|
const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);
|
||||||
const protocol = parsed.protocol || supportedProtocols[0];
|
const protocol = parsed.protocol || supportedProtocols[0];
|
||||||
|
|
||||||
if (protocol === 'data:') {
|
if (protocol === 'data:') {
|
||||||
|
|
@ -46629,7 +46646,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (utils$1.isBlob(data)) {
|
} else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
|
||||||
data.size && headers.setContentType(data.type || 'application/octet-stream');
|
data.size && headers.setContentType(data.type || 'application/octet-stream');
|
||||||
headers.setContentLength(data.size || 0);
|
headers.setContentLength(data.size || 0);
|
||||||
data = stream__default["default"].Readable.from(readBlob$1(data));
|
data = stream__default["default"].Readable.from(readBlob$1(data));
|
||||||
|
|
@ -46740,7 +46757,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||||
if (config.socketPath) {
|
if (config.socketPath) {
|
||||||
options.socketPath = config.socketPath;
|
options.socketPath = config.socketPath;
|
||||||
} else {
|
} else {
|
||||||
options.hostname = parsed.hostname;
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
||||||
options.port = parsed.port;
|
options.port = parsed.port;
|
||||||
setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
|
setProxy(options, config.proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
|
||||||
}
|
}
|
||||||
|
|
@ -46882,7 +46899,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const err = new AxiosError(
|
const err = new AxiosError(
|
||||||
'maxContentLength size of ' + config.maxContentLength + ' exceeded',
|
'stream has been aborted',
|
||||||
AxiosError.ERR_BAD_RESPONSE,
|
AxiosError.ERR_BAD_RESPONSE,
|
||||||
config,
|
config,
|
||||||
lastRequest
|
lastRequest
|
||||||
|
|
@ -47005,68 +47022,18 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const isURLSameOrigin = platform.hasStandardBrowserEnv ?
|
const isURLSameOrigin = platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
|
||||||
|
url = new URL(url, platform.origin);
|
||||||
|
|
||||||
// Standard browser envs have full support of the APIs needed to test
|
return (
|
||||||
// whether the request URL is of the same origin as current location.
|
origin.protocol === url.protocol &&
|
||||||
(function standardBrowserEnv() {
|
origin.host === url.host &&
|
||||||
const msie = /(msie|trident)/i.test(navigator.userAgent);
|
(isMSIE || origin.port === url.port)
|
||||||
const urlParsingNode = document.createElement('a');
|
);
|
||||||
let originURL;
|
})(
|
||||||
|
new URL(platform.origin),
|
||||||
/**
|
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
||||||
* Parse a URL to discover its components
|
) : () => true;
|
||||||
*
|
|
||||||
* @param {String} url The URL to be parsed
|
|
||||||
* @returns {Object}
|
|
||||||
*/
|
|
||||||
function resolveURL(url) {
|
|
||||||
let href = url;
|
|
||||||
|
|
||||||
if (msie) {
|
|
||||||
// IE needs attribute set twice to normalize properties
|
|
||||||
urlParsingNode.setAttribute('href', href);
|
|
||||||
href = urlParsingNode.href;
|
|
||||||
}
|
|
||||||
|
|
||||||
urlParsingNode.setAttribute('href', href);
|
|
||||||
|
|
||||||
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
|
|
||||||
return {
|
|
||||||
href: urlParsingNode.href,
|
|
||||||
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
|
||||||
host: urlParsingNode.host,
|
|
||||||
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
|
||||||
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
|
||||||
hostname: urlParsingNode.hostname,
|
|
||||||
port: urlParsingNode.port,
|
|
||||||
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
|
||||||
urlParsingNode.pathname :
|
|
||||||
'/' + urlParsingNode.pathname
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
originURL = resolveURL(window.location.href);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determine if a URL shares the same origin as the current location
|
|
||||||
*
|
|
||||||
* @param {String} requestURL The URL to test
|
|
||||||
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
||||||
*/
|
|
||||||
return function isURLSameOrigin(requestURL) {
|
|
||||||
const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
||||||
return (parsed.protocol === originURL.protocol &&
|
|
||||||
parsed.host === originURL.host);
|
|
||||||
};
|
|
||||||
})() :
|
|
||||||
|
|
||||||
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
||||||
(function nonStandardBrowserEnv() {
|
|
||||||
return function isURLSameOrigin() {
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
|
|
||||||
const cookies = platform.hasStandardBrowserEnv ?
|
const cookies = platform.hasStandardBrowserEnv ?
|
||||||
|
|
||||||
|
|
@ -47123,7 +47090,7 @@ function mergeConfig(config1, config2) {
|
||||||
config2 = config2 || {};
|
config2 = config2 || {};
|
||||||
const config = {};
|
const config = {};
|
||||||
|
|
||||||
function getMergedValue(target, source, caseless) {
|
function getMergedValue(target, source, prop, caseless) {
|
||||||
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
||||||
return utils$1.merge.call({caseless}, target, source);
|
return utils$1.merge.call({caseless}, target, source);
|
||||||
} else if (utils$1.isPlainObject(source)) {
|
} else if (utils$1.isPlainObject(source)) {
|
||||||
|
|
@ -47135,11 +47102,11 @@ function mergeConfig(config1, config2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line consistent-return
|
// eslint-disable-next-line consistent-return
|
||||||
function mergeDeepProperties(a, b, caseless) {
|
function mergeDeepProperties(a, b, prop , caseless) {
|
||||||
if (!utils$1.isUndefined(b)) {
|
if (!utils$1.isUndefined(b)) {
|
||||||
return getMergedValue(a, b, caseless);
|
return getMergedValue(a, b, prop , caseless);
|
||||||
} else if (!utils$1.isUndefined(a)) {
|
} else if (!utils$1.isUndefined(a)) {
|
||||||
return getMergedValue(undefined, a, caseless);
|
return getMergedValue(undefined, a, prop , caseless);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -47197,7 +47164,7 @@ function mergeConfig(config1, config2) {
|
||||||
socketPath: defaultToConfig2,
|
socketPath: defaultToConfig2,
|
||||||
responseEncoding: defaultToConfig2,
|
responseEncoding: defaultToConfig2,
|
||||||
validateStatus: mergeDirectKeys,
|
validateStatus: mergeDirectKeys,
|
||||||
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
||||||
};
|
};
|
||||||
|
|
||||||
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
||||||
|
|
@ -47445,45 +47412,46 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const composeSignals = (signals, timeout) => {
|
const composeSignals = (signals, timeout) => {
|
||||||
let controller = new AbortController();
|
const {length} = (signals = signals ? signals.filter(Boolean) : []);
|
||||||
|
|
||||||
let aborted;
|
if (timeout || length) {
|
||||||
|
let controller = new AbortController();
|
||||||
|
|
||||||
const onabort = function (cancel) {
|
let aborted;
|
||||||
if (!aborted) {
|
|
||||||
aborted = true;
|
|
||||||
unsubscribe();
|
|
||||||
const err = cancel instanceof Error ? cancel : this.reason;
|
|
||||||
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
let timer = timeout && setTimeout(() => {
|
const onabort = function (reason) {
|
||||||
onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
|
if (!aborted) {
|
||||||
}, timeout);
|
aborted = true;
|
||||||
|
unsubscribe();
|
||||||
|
const err = reason instanceof Error ? reason : this.reason;
|
||||||
|
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const unsubscribe = () => {
|
let timer = timeout && setTimeout(() => {
|
||||||
if (signals) {
|
|
||||||
timer && clearTimeout(timer);
|
|
||||||
timer = null;
|
timer = null;
|
||||||
signals.forEach(signal => {
|
onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
|
||||||
signal &&
|
}, timeout);
|
||||||
(signal.removeEventListener ? signal.removeEventListener('abort', onabort) : signal.unsubscribe(onabort));
|
|
||||||
});
|
|
||||||
signals = null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
signals.forEach((signal) => signal && signal.addEventListener && signal.addEventListener('abort', onabort));
|
const unsubscribe = () => {
|
||||||
|
if (signals) {
|
||||||
|
timer && clearTimeout(timer);
|
||||||
|
timer = null;
|
||||||
|
signals.forEach(signal => {
|
||||||
|
signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
|
||||||
|
});
|
||||||
|
signals = null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const {signal} = controller;
|
signals.forEach((signal) => signal.addEventListener('abort', onabort));
|
||||||
|
|
||||||
signal.unsubscribe = unsubscribe;
|
const {signal} = controller;
|
||||||
|
|
||||||
return [signal, () => {
|
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
||||||
timer && clearTimeout(timer);
|
|
||||||
timer = null;
|
return signal;
|
||||||
}];
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const composeSignals$1 = composeSignals;
|
const composeSignals$1 = composeSignals;
|
||||||
|
|
@ -47506,14 +47474,34 @@ const streamChunk = function* (chunk, chunkSize) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const readBytes = async function* (iterable, chunkSize, encode) {
|
const readBytes = async function* (iterable, chunkSize) {
|
||||||
for await (const chunk of iterable) {
|
for await (const chunk of readStream(iterable)) {
|
||||||
yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : (await encode(String(chunk))), chunkSize);
|
yield* streamChunk(chunk, chunkSize);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const trackStream = (stream, chunkSize, onProgress, onFinish, encode) => {
|
const readStream = async function* (stream) {
|
||||||
const iterator = readBytes(stream, chunkSize, encode);
|
if (stream[Symbol.asyncIterator]) {
|
||||||
|
yield* stream;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const reader = stream.getReader();
|
||||||
|
try {
|
||||||
|
for (;;) {
|
||||||
|
const {done, value} = await reader.read();
|
||||||
|
if (done) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
yield value;
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
await reader.cancel();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
||||||
|
const iterator = readBytes(stream, chunkSize);
|
||||||
|
|
||||||
let bytes = 0;
|
let bytes = 0;
|
||||||
let done;
|
let done;
|
||||||
|
|
@ -47616,7 +47604,11 @@ const getBodyLength = async (body) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(utils$1.isSpecCompliantForm(body)) {
|
if(utils$1.isSpecCompliantForm(body)) {
|
||||||
return (await new Request(body).arrayBuffer()).byteLength;
|
const _request = new Request(platform.origin, {
|
||||||
|
method: 'POST',
|
||||||
|
body,
|
||||||
|
});
|
||||||
|
return (await _request.arrayBuffer()).byteLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
|
if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
|
||||||
|
|
@ -47656,18 +47648,13 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
||||||
|
|
||||||
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
||||||
|
|
||||||
let [composedSignal, stopTimeout] = (signal || cancelToken || timeout) ?
|
let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
||||||
composeSignals$1([signal, cancelToken], timeout) : [];
|
|
||||||
|
|
||||||
let finished, request;
|
let request;
|
||||||
|
|
||||||
const onFinish = () => {
|
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
||||||
!finished && setTimeout(() => {
|
composedSignal.unsubscribe();
|
||||||
composedSignal && composedSignal.unsubscribe();
|
});
|
||||||
});
|
|
||||||
|
|
||||||
finished = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
let requestContentLength;
|
let requestContentLength;
|
||||||
|
|
||||||
|
|
@ -47694,7 +47681,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
||||||
progressEventReducer(asyncDecorator(onUploadProgress))
|
progressEventReducer(asyncDecorator(onUploadProgress))
|
||||||
);
|
);
|
||||||
|
|
||||||
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush, encodeText);
|
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -47702,6 +47689,9 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
||||||
withCredentials = withCredentials ? 'include' : 'omit';
|
withCredentials = withCredentials ? 'include' : 'omit';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Cloudflare Workers throws when credentials are defined
|
||||||
|
// see https://github.com/cloudflare/workerd/issues/902
|
||||||
|
const isCredentialsSupported = "credentials" in Request.prototype;
|
||||||
request = new Request(url, {
|
request = new Request(url, {
|
||||||
...fetchOptions,
|
...fetchOptions,
|
||||||
signal: composedSignal,
|
signal: composedSignal,
|
||||||
|
|
@ -47709,14 +47699,14 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
||||||
headers: headers.normalize().toJSON(),
|
headers: headers.normalize().toJSON(),
|
||||||
body: data,
|
body: data,
|
||||||
duplex: "half",
|
duplex: "half",
|
||||||
credentials: withCredentials
|
credentials: isCredentialsSupported ? withCredentials : undefined
|
||||||
});
|
});
|
||||||
|
|
||||||
let response = await fetch(request);
|
let response = await fetch(request);
|
||||||
|
|
||||||
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
||||||
|
|
||||||
if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
|
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
||||||
const options = {};
|
const options = {};
|
||||||
|
|
||||||
['status', 'statusText', 'headers'].forEach(prop => {
|
['status', 'statusText', 'headers'].forEach(prop => {
|
||||||
|
|
@ -47733,8 +47723,8 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
||||||
response = new Response(
|
response = new Response(
|
||||||
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
||||||
flush && flush();
|
flush && flush();
|
||||||
isStreamResponse && onFinish();
|
unsubscribe && unsubscribe();
|
||||||
}, encodeText),
|
}),
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -47743,9 +47733,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
||||||
|
|
||||||
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
|
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
|
||||||
|
|
||||||
!isStreamResponse && onFinish();
|
!isStreamResponse && unsubscribe && unsubscribe();
|
||||||
|
|
||||||
stopTimeout && stopTimeout();
|
|
||||||
|
|
||||||
return await new Promise((resolve, reject) => {
|
return await new Promise((resolve, reject) => {
|
||||||
settle(resolve, reject, {
|
settle(resolve, reject, {
|
||||||
|
|
@ -47758,7 +47746,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
onFinish();
|
unsubscribe && unsubscribe();
|
||||||
|
|
||||||
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
|
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
|
||||||
throw Object.assign(
|
throw Object.assign(
|
||||||
|
|
@ -47969,6 +47957,14 @@ validators$1.transitional = function transitional(validator, version, message) {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
validators$1.spelling = function spelling(correctSpelling) {
|
||||||
|
return (value, opt) => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Assert object's properties type
|
* Assert object's properties type
|
||||||
*
|
*
|
||||||
|
|
@ -48038,9 +48034,9 @@ class Axios {
|
||||||
return await this._request(configOrUrl, config);
|
return await this._request(configOrUrl, config);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof Error) {
|
if (err instanceof Error) {
|
||||||
let dummy;
|
let dummy = {};
|
||||||
|
|
||||||
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());
|
||||||
|
|
||||||
// slice off the Error: ... line
|
// slice off the Error: ... line
|
||||||
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
||||||
|
|
@ -48095,6 +48091,18 @@ class Axios {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set config.allowAbsoluteUrls
|
||||||
|
if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
|
||||||
|
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
||||||
|
} else {
|
||||||
|
config.allowAbsoluteUrls = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
validator.assertOptions(config, {
|
||||||
|
baseUrl: validators.spelling('baseURL'),
|
||||||
|
withXsrfToken: validators.spelling('withXSRFToken')
|
||||||
|
}, true);
|
||||||
|
|
||||||
// Set config.method
|
// Set config.method
|
||||||
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
||||||
|
|
||||||
|
|
@ -48185,7 +48193,7 @@ class Axios {
|
||||||
|
|
||||||
getUri(config) {
|
getUri(config) {
|
||||||
config = mergeConfig(this.defaults, config);
|
config = mergeConfig(this.defaults, config);
|
||||||
const fullPath = buildFullPath(config.baseURL, config.url);
|
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
||||||
return buildURL(fullPath, config.params, config.paramsSerializer);
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -48325,6 +48333,20 @@ class CancelToken {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
toAbortSignal() {
|
||||||
|
const controller = new AbortController();
|
||||||
|
|
||||||
|
const abort = (err) => {
|
||||||
|
controller.abort(err);
|
||||||
|
};
|
||||||
|
|
||||||
|
this.subscribe(abort);
|
||||||
|
|
||||||
|
controller.signal.unsubscribe = () => this.unsubscribe(abort);
|
||||||
|
|
||||||
|
return controller.signal;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
||||||
* cancels the `CancelToken`.
|
* cancels the `CancelToken`.
|
||||||
|
|
|
||||||
13
package-lock.json
generated
13
package-lock.json
generated
|
|
@ -1929,9 +1929,10 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/axios": {
|
"node_modules/axios": {
|
||||||
"version": "1.7.4",
|
"version": "1.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz",
|
||||||
"integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==",
|
"integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==",
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.15.6",
|
"follow-redirects": "^1.15.6",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
|
|
@ -8291,9 +8292,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"axios": {
|
"axios": {
|
||||||
"version": "1.7.4",
|
"version": "1.8.2",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.8.2.tgz",
|
||||||
"integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==",
|
"integrity": "sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"follow-redirects": "^1.15.6",
|
"follow-redirects": "^1.15.6",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue