@rsdoctor/cli 1.3.7 → 1.3.9
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.
- package/dist/index.cjs +80 -80
- package/dist/index.js +80 -80
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -1640,7 +1640,7 @@ var __webpack_modules__ = {
|
|
|
1640
1640
|
},
|
|
1641
1641
|
"./package.json": function(module) {
|
|
1642
1642
|
"use strict";
|
|
1643
|
-
module.exports = JSON.parse('{"name":"@rsdoctor/cli","version":"1.3.
|
|
1643
|
+
module.exports = JSON.parse('{"name":"@rsdoctor/cli","version":"1.3.9","repository":{"type":"git","url":"https://github.com/web-infra-dev/rsdoctor","directory":"packages/cli"},"bin":{"rsdoctor":"./bin/rsdoctor"},"files":["bin","dist"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.cjs"}},"license":"MIT","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"dev":"npm run start","build":"rslib build","start":"rslib build -w","test":"rstest run"},"type":"module","dependencies":{"ora":"^5.4.1","@rsdoctor/core":"workspace:*","@rsdoctor/sdk":"workspace:*","@rsdoctor/types":"workspace:*","@rsdoctor/utils":"workspace:*","@rsdoctor/graph":"workspace:*"},"devDependencies":{"@rsdoctor/client":"workspace:*","cac":"^6.7.14","typescript":"^5.9.2","axios":"^1.12.2","picocolors":"^1.1.1"},"peerDependencies":{"@rsdoctor/client":"workspace:*"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}');
|
|
1644
1644
|
}
|
|
1645
1645
|
}, __webpack_module_cache__ = {};
|
|
1646
1646
|
function __webpack_require__(moduleId) {
|
|
@@ -2201,10 +2201,10 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2201
2201
|
asap,
|
|
2202
2202
|
isIterable: (thing)=>null != thing && isFunction(thing[utils_iterator])
|
|
2203
2203
|
};
|
|
2204
|
-
function
|
|
2204
|
+
function AxiosError(message, code, config, request, response) {
|
|
2205
2205
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = Error().stack, this.message = message, this.name = 'AxiosError', code && (this.code = code), config && (this.config = config), request && (this.request = request), response && (this.response = response, this.status = response.status ? response.status : null);
|
|
2206
2206
|
}
|
|
2207
|
-
utils.inherits(
|
|
2207
|
+
utils.inherits(AxiosError, Error, {
|
|
2208
2208
|
toJSON: function() {
|
|
2209
2209
|
return {
|
|
2210
2210
|
message: this.message,
|
|
@@ -2221,7 +2221,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2221
2221
|
};
|
|
2222
2222
|
}
|
|
2223
2223
|
});
|
|
2224
|
-
let AxiosError_prototype =
|
|
2224
|
+
let AxiosError_prototype = AxiosError.prototype, AxiosError_descriptors = {};
|
|
2225
2225
|
[
|
|
2226
2226
|
'ERR_BAD_OPTION_VALUE',
|
|
2227
2227
|
'ERR_BAD_OPTION',
|
|
@@ -2239,15 +2239,15 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2239
2239
|
AxiosError_descriptors[code] = {
|
|
2240
2240
|
value: code
|
|
2241
2241
|
};
|
|
2242
|
-
}), Object.defineProperties(
|
|
2242
|
+
}), Object.defineProperties(AxiosError, AxiosError_descriptors), Object.defineProperty(AxiosError_prototype, 'isAxiosError', {
|
|
2243
2243
|
value: !0
|
|
2244
|
-
}),
|
|
2244
|
+
}), AxiosError.from = (error, code, config, request, response, customProps)=>{
|
|
2245
2245
|
let axiosError = Object.create(AxiosError_prototype);
|
|
2246
2246
|
utils.toFlatObject(error, axiosError, function(obj) {
|
|
2247
2247
|
return obj !== Error.prototype;
|
|
2248
2248
|
}, (prop)=>'isAxiosError' !== prop);
|
|
2249
2249
|
let msg = error && error.message ? error.message : 'Error', errCode = null == code && error ? error.code : code;
|
|
2250
|
-
return
|
|
2250
|
+
return AxiosError.call(axiosError, msg, errCode, config, request, response), error && null == axiosError.cause && Object.defineProperty(axiosError, 'cause', {
|
|
2251
2251
|
value: error,
|
|
2252
2252
|
configurable: !0
|
|
2253
2253
|
}), axiosError.name = error && error.name || 'Error', customProps && Object.assign(axiosError, customProps), axiosError;
|
|
@@ -2281,7 +2281,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2281
2281
|
if (null === value) return '';
|
|
2282
2282
|
if (utils.isDate(value)) return value.toISOString();
|
|
2283
2283
|
if (utils.isBoolean(value)) return value.toString();
|
|
2284
|
-
if (!useBlob && utils.isBlob(value)) throw new
|
|
2284
|
+
if (!useBlob && utils.isBlob(value)) throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
2285
2285
|
return utils.isArrayBuffer(value) || utils.isTypedArray(value) ? useBlob && 'function' == typeof Blob ? new Blob([
|
|
2286
2286
|
value
|
|
2287
2287
|
]) : Buffer.from(value) : value;
|
|
@@ -2330,10 +2330,10 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2330
2330
|
return charMap[match];
|
|
2331
2331
|
});
|
|
2332
2332
|
}
|
|
2333
|
-
function
|
|
2333
|
+
function AxiosURLSearchParams(params, options) {
|
|
2334
2334
|
this._pairs = [], params && helpers_toFormData(params, this, options);
|
|
2335
2335
|
}
|
|
2336
|
-
let AxiosURLSearchParams_prototype =
|
|
2336
|
+
let AxiosURLSearchParams_prototype = AxiosURLSearchParams.prototype;
|
|
2337
2337
|
function buildURL_encode(val) {
|
|
2338
2338
|
return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+');
|
|
2339
2339
|
}
|
|
@@ -2345,7 +2345,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2345
2345
|
serialize: options
|
|
2346
2346
|
});
|
|
2347
2347
|
let serializeFn = options && options.serialize;
|
|
2348
|
-
if (serializedParams = serializeFn ? serializeFn(params, options) : utils.isURLSearchParams(params) ? params.toString() : new
|
|
2348
|
+
if (serializedParams = serializeFn ? serializeFn(params, options) : utils.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode)) {
|
|
2349
2349
|
let hashmarkIndex = url.indexOf("#");
|
|
2350
2350
|
-1 !== hashmarkIndex && (url = url.slice(0, hashmarkIndex)), url += (-1 === url.indexOf('?') ? '?' : '&') + serializedParams;
|
|
2351
2351
|
}
|
|
@@ -2499,7 +2499,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2499
2499
|
return JSON.parse(data, this.parseReviver);
|
|
2500
2500
|
} catch (e) {
|
|
2501
2501
|
if (!silentJSONParsing && JSONRequested) {
|
|
2502
|
-
if ('SyntaxError' === e.name) throw
|
|
2502
|
+
if ('SyntaxError' === e.name) throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
|
|
2503
2503
|
throw e;
|
|
2504
2504
|
}
|
|
2505
2505
|
}
|
|
@@ -2568,7 +2568,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2568
2568
|
if (utils.isRegExp(filter)) return filter.test(value);
|
|
2569
2569
|
}
|
|
2570
2570
|
}
|
|
2571
|
-
class
|
|
2571
|
+
class AxiosHeaders {
|
|
2572
2572
|
constructor(headers){
|
|
2573
2573
|
headers && this.set(headers);
|
|
2574
2574
|
}
|
|
@@ -2720,7 +2720,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2720
2720
|
}
|
|
2721
2721
|
}
|
|
2722
2722
|
function transformData(fns, response) {
|
|
2723
|
-
let config = this || defaults_defaults, context = response || config, headers =
|
|
2723
|
+
let config = this || defaults_defaults, context = response || config, headers = AxiosHeaders.from(context.headers), data = context.data;
|
|
2724
2724
|
return utils.forEach(fns, function(fn) {
|
|
2725
2725
|
data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
|
|
2726
2726
|
}), headers.normalize(), data;
|
|
@@ -2729,13 +2729,13 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2729
2729
|
return !!(value && value.__CANCEL__);
|
|
2730
2730
|
}
|
|
2731
2731
|
function CanceledError(message, config, request) {
|
|
2732
|
-
|
|
2732
|
+
AxiosError.call(this, null == message ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request), this.name = 'CanceledError';
|
|
2733
2733
|
}
|
|
2734
2734
|
function settle(resolve, reject, response) {
|
|
2735
2735
|
let validateStatus = response.config.validateStatus;
|
|
2736
|
-
!response.status || !validateStatus || validateStatus(response.status) ? resolve(response) : reject(new
|
|
2737
|
-
|
|
2738
|
-
|
|
2736
|
+
!response.status || !validateStatus || validateStatus(response.status) ? resolve(response) : reject(new AxiosError('Request failed with status code ' + response.status, [
|
|
2737
|
+
AxiosError.ERR_BAD_REQUEST,
|
|
2738
|
+
AxiosError.ERR_BAD_RESPONSE
|
|
2739
2739
|
][Math.floor(response.status / 100) - 4], response.config, response.request, response));
|
|
2740
2740
|
}
|
|
2741
2741
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
@@ -2743,14 +2743,14 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2743
2743
|
let isRelativeUrl = (url = requestedURL, !/^([a-z][a-z\d+\-.]*:)?\/\//i.test(url));
|
|
2744
2744
|
return baseURL && (isRelativeUrl || !1 == allowAbsoluteUrls) ? (baseURL1 = baseURL, (relativeURL = requestedURL) ? baseURL1.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL1) : requestedURL;
|
|
2745
2745
|
}
|
|
2746
|
-
|
|
2746
|
+
AxiosHeaders.accessor([
|
|
2747
2747
|
'Content-Type',
|
|
2748
2748
|
'Content-Length',
|
|
2749
2749
|
'Accept',
|
|
2750
2750
|
'Accept-Encoding',
|
|
2751
2751
|
'User-Agent',
|
|
2752
2752
|
'Authorization'
|
|
2753
|
-
]), utils.reduceDescriptors(
|
|
2753
|
+
]), utils.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key)=>{
|
|
2754
2754
|
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
2755
2755
|
return {
|
|
2756
2756
|
get: ()=>value,
|
|
@@ -2758,7 +2758,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2758
2758
|
this[mapped] = headerValue;
|
|
2759
2759
|
}
|
|
2760
2760
|
};
|
|
2761
|
-
}), utils.freezeMethods(
|
|
2761
|
+
}), utils.freezeMethods(AxiosHeaders), utils.inherits(CanceledError, AxiosError, {
|
|
2762
2762
|
__CANCEL__: !0
|
|
2763
2763
|
});
|
|
2764
2764
|
var proxy_from_env = __webpack_require__("../../node_modules/.pnpm/proxy-from-env@1.1.0/node_modules/proxy-from-env/index.js"), external_http_ = __webpack_require__("http"), external_https_ = __webpack_require__("https"), external_util_ = __webpack_require__("util"), follow_redirects = __webpack_require__("../../node_modules/.pnpm/follow-redirects@1.15.9/node_modules/follow-redirects/index.js");
|
|
@@ -2770,7 +2770,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2770
2770
|
let DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
|
|
2771
2771
|
var external_stream_ = __webpack_require__("stream");
|
|
2772
2772
|
let kInternals = Symbol('internals');
|
|
2773
|
-
class
|
|
2773
|
+
class AxiosTransformStream extends external_stream_.Transform {
|
|
2774
2774
|
constructor(options){
|
|
2775
2775
|
super({
|
|
2776
2776
|
readableHighWaterMark: (options = utils.toFlatObject(options, {
|
|
@@ -2830,7 +2830,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2830
2830
|
});
|
|
2831
2831
|
}
|
|
2832
2832
|
}
|
|
2833
|
-
let { asyncIterator } = Symbol,
|
|
2833
|
+
let { asyncIterator } = Symbol, readBlob = async function*(blob) {
|
|
2834
2834
|
blob.stream ? yield* blob.stream() : blob.arrayBuffer ? yield await blob.arrayBuffer() : blob[asyncIterator] ? yield* blob[asyncIterator]() : yield blob;
|
|
2835
2835
|
}, BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_', textEncoder = 'function' == typeof TextEncoder ? new TextEncoder() : new external_util_.TextEncoder(), CRLF_BYTES = textEncoder.encode('\r\n');
|
|
2836
2836
|
class FormDataPart {
|
|
@@ -2842,7 +2842,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2842
2842
|
async *encode() {
|
|
2843
2843
|
yield this.headers;
|
|
2844
2844
|
let { value } = this;
|
|
2845
|
-
utils.isTypedArray(value) ? yield value : yield*
|
|
2845
|
+
utils.isTypedArray(value) ? yield value : yield* readBlob(value), yield CRLF_BYTES;
|
|
2846
2846
|
}
|
|
2847
2847
|
static escapeName(name) {
|
|
2848
2848
|
return String(name).replace(/[\r\n"]/g, (match)=>({
|
|
@@ -2875,7 +2875,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2875
2875
|
let passed = startedAt && now - startedAt;
|
|
2876
2876
|
return passed ? Math.round(1000 * bytesCount / passed) : void 0;
|
|
2877
2877
|
};
|
|
2878
|
-
},
|
|
2878
|
+
}, helpers_throttle = function(fn, freq) {
|
|
2879
2879
|
let lastArgs, timer, timestamp = 0, threshold = 1000 / freq, invoke = (args, now = Date.now())=>{
|
|
2880
2880
|
timestamp = now, lastArgs = null, timer && (clearTimeout(timer), timer = null), fn(...args);
|
|
2881
2881
|
};
|
|
@@ -2890,7 +2890,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2890
2890
|
];
|
|
2891
2891
|
}, progressEventReducer = (listener, isDownloadStream, freq = 3)=>{
|
|
2892
2892
|
let bytesNotified = 0, _speedometer = helpers_speedometer(50, 250);
|
|
2893
|
-
return
|
|
2893
|
+
return helpers_throttle((e)=>{
|
|
2894
2894
|
let loaded = e.loaded, total = e.lengthComputable ? e.total : void 0, progressBytes = loaded - bytesNotified, rate = _speedometer(progressBytes);
|
|
2895
2895
|
bytesNotified = loaded, listener({
|
|
2896
2896
|
loaded,
|
|
@@ -2989,7 +2989,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
2989
2989
|
return bytes > 0 ? bytes : 0;
|
|
2990
2990
|
}
|
|
2991
2991
|
return Buffer.byteLength(body, 'utf8');
|
|
2992
|
-
}(String(config.url || fullPath || '')) > config.maxContentLength) return reject(new
|
|
2992
|
+
}(String(config.url || fullPath || '')) > config.maxContentLength) return reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config));
|
|
2993
2993
|
if ('GET' !== method) return settle(resolve, reject, {
|
|
2994
2994
|
status: 405,
|
|
2995
2995
|
statusText: 'method not allowed',
|
|
@@ -3002,10 +3002,10 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3002
3002
|
if (void 0 === asBlob && _Blob && (asBlob = !0), 'data' === protocol) {
|
|
3003
3003
|
uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
|
|
3004
3004
|
let match = DATA_URL_PATTERN.exec(uri);
|
|
3005
|
-
if (!match) throw new
|
|
3005
|
+
if (!match) throw new AxiosError('Invalid URL', AxiosError.ERR_INVALID_URL);
|
|
3006
3006
|
let mime = match[1], isBase64 = match[2], body = match[3], buffer = Buffer.from(decodeURIComponent(body), isBase64 ? 'base64' : 'utf8');
|
|
3007
3007
|
if (asBlob) {
|
|
3008
|
-
if (!_Blob) throw new
|
|
3008
|
+
if (!_Blob) throw new AxiosError('Blob is not supported', AxiosError.ERR_NOT_SUPPORT);
|
|
3009
3009
|
return new _Blob([
|
|
3010
3010
|
buffer
|
|
3011
3011
|
], {
|
|
@@ -3014,23 +3014,23 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3014
3014
|
}
|
|
3015
3015
|
return buffer;
|
|
3016
3016
|
}
|
|
3017
|
-
throw new
|
|
3017
|
+
throw new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_NOT_SUPPORT);
|
|
3018
3018
|
}(config.url, 'blob' === responseType, {
|
|
3019
3019
|
Blob: config.env && config.env.Blob
|
|
3020
3020
|
});
|
|
3021
3021
|
} catch (err) {
|
|
3022
|
-
throw
|
|
3022
|
+
throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);
|
|
3023
3023
|
}
|
|
3024
3024
|
return 'text' === responseType ? (convertedData = convertedData.toString(responseEncoding), responseEncoding && 'utf8' !== responseEncoding || (convertedData = utils.stripBOM(convertedData))) : 'stream' === responseType && (convertedData = external_stream_.Readable.from(convertedData)), settle(resolve, reject, {
|
|
3025
3025
|
data: convertedData,
|
|
3026
3026
|
status: 200,
|
|
3027
3027
|
statusText: 'OK',
|
|
3028
|
-
headers: new
|
|
3028
|
+
headers: new AxiosHeaders(),
|
|
3029
3029
|
config
|
|
3030
3030
|
});
|
|
3031
3031
|
}
|
|
3032
|
-
if (-1 === supportedProtocols.indexOf(protocol)) return reject(new
|
|
3033
|
-
let headers =
|
|
3032
|
+
if (-1 === supportedProtocols.indexOf(protocol)) return reject(new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_BAD_REQUEST, config));
|
|
3033
|
+
let headers = AxiosHeaders.from(config.headers).normalize();
|
|
3034
3034
|
headers.set('User-Agent', "axios/1.12.2", !1);
|
|
3035
3035
|
let { onUploadProgress, onDownloadProgress } = config, maxRate = config.maxRate;
|
|
3036
3036
|
if (utils.isSpecCompliantForm(data)) {
|
|
@@ -3062,22 +3062,22 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3062
3062
|
let knownLength = await external_util_.promisify(data.getLength).call(data);
|
|
3063
3063
|
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
|
|
3064
3064
|
} catch (e) {}
|
|
3065
|
-
} else if (utils.isBlob(data) || utils.isFile(data)) data.size && headers.setContentType(data.type || 'application/octet-stream'), headers.setContentLength(data.size || 0), data = external_stream_.Readable.from(
|
|
3065
|
+
} else if (utils.isBlob(data) || utils.isFile(data)) data.size && headers.setContentType(data.type || 'application/octet-stream'), headers.setContentLength(data.size || 0), data = external_stream_.Readable.from(readBlob(data));
|
|
3066
3066
|
else if (data && !utils.isStream(data)) {
|
|
3067
3067
|
if (Buffer.isBuffer(data)) ;
|
|
3068
3068
|
else if (utils.isArrayBuffer(data)) data = Buffer.from(new Uint8Array(data));
|
|
3069
3069
|
else {
|
|
3070
|
-
if (!utils.isString(data)) return reject(new
|
|
3070
|
+
if (!utils.isString(data)) return reject(new AxiosError('Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream', AxiosError.ERR_BAD_REQUEST, config));
|
|
3071
3071
|
data = Buffer.from(data, 'utf-8');
|
|
3072
3072
|
}
|
|
3073
|
-
if (headers.setContentLength(data.length, !1), config.maxBodyLength > -1 && data.length > config.maxBodyLength) return reject(new
|
|
3073
|
+
if (headers.setContentLength(data.length, !1), config.maxBodyLength > -1 && data.length > config.maxBodyLength) return reject(new AxiosError('Request body larger than maxBodyLength limit', AxiosError.ERR_BAD_REQUEST, config));
|
|
3074
3074
|
}
|
|
3075
3075
|
let contentLength = utils.toFiniteNumber(headers.getContentLength());
|
|
3076
3076
|
utils.isArray(maxRate) ? (maxUploadRate = maxRate[0], maxDownloadRate = maxRate[1]) : maxUploadRate = maxDownloadRate = maxRate, data && (onUploadProgress || maxUploadRate) && (utils.isStream(data) || (data = external_stream_.Readable.from(data, {
|
|
3077
3077
|
objectMode: !1
|
|
3078
3078
|
})), data = external_stream_.pipeline([
|
|
3079
3079
|
data,
|
|
3080
|
-
new
|
|
3080
|
+
new AxiosTransformStream({
|
|
3081
3081
|
maxRate: utils.toFiniteNumber(maxUploadRate)
|
|
3082
3082
|
})
|
|
3083
3083
|
], utils.noop), onUploadProgress && data.on('progress', flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), !1, 3))))), config.auth && (auth = (config.auth.username || '') + ':' + (config.auth.password || '')), !auth && parsed.username && (auth = parsed.username + ':' + parsed.password), auth && headers.delete('authorization');
|
|
@@ -3129,7 +3129,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3129
3129
|
res
|
|
3130
3130
|
], responseLength = +res.headers['content-length'];
|
|
3131
3131
|
if (onDownloadProgress || maxDownloadRate) {
|
|
3132
|
-
let transformStream = new
|
|
3132
|
+
let transformStream = new AxiosTransformStream({
|
|
3133
3133
|
maxRate: utils.toFiniteNumber(maxDownloadRate)
|
|
3134
3134
|
});
|
|
3135
3135
|
onDownloadProgress && transformStream.on('progress', flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), !0, 3)))), streams.push(transformStream);
|
|
@@ -3154,7 +3154,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3154
3154
|
}), response = {
|
|
3155
3155
|
status: res.statusCode,
|
|
3156
3156
|
statusText: res.statusMessage,
|
|
3157
|
-
headers: new
|
|
3157
|
+
headers: new AxiosHeaders(res.headers),
|
|
3158
3158
|
config,
|
|
3159
3159
|
request: lastRequest
|
|
3160
3160
|
};
|
|
@@ -3162,19 +3162,19 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3162
3162
|
else {
|
|
3163
3163
|
let responseBuffer = [], totalResponseBytes = 0;
|
|
3164
3164
|
responseStream.on('data', function(chunk) {
|
|
3165
|
-
responseBuffer.push(chunk), totalResponseBytes += chunk.length, config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength && (rejected = !0, responseStream.destroy(), reject(new
|
|
3165
|
+
responseBuffer.push(chunk), totalResponseBytes += chunk.length, config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength && (rejected = !0, responseStream.destroy(), reject(new AxiosError('maxContentLength size of ' + config.maxContentLength + ' exceeded', AxiosError.ERR_BAD_RESPONSE, config, lastRequest)));
|
|
3166
3166
|
}), responseStream.on('aborted', function() {
|
|
3167
3167
|
if (rejected) return;
|
|
3168
|
-
let err = new
|
|
3168
|
+
let err = new AxiosError('stream has been aborted', AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
|
|
3169
3169
|
responseStream.destroy(err), reject(err);
|
|
3170
3170
|
}), responseStream.on('error', function(err) {
|
|
3171
|
-
req.destroyed || reject(
|
|
3171
|
+
req.destroyed || reject(AxiosError.from(err, null, config, lastRequest));
|
|
3172
3172
|
}), responseStream.on('end', function() {
|
|
3173
3173
|
try {
|
|
3174
3174
|
let responseData = 1 === responseBuffer.length ? responseBuffer[0] : Buffer.concat(responseBuffer);
|
|
3175
3175
|
'arraybuffer' !== responseType && (responseData = responseData.toString(responseEncoding), responseEncoding && 'utf8' !== responseEncoding || (responseData = utils.stripBOM(responseData))), response.data = responseData;
|
|
3176
3176
|
} catch (err) {
|
|
3177
|
-
return reject(
|
|
3177
|
+
return reject(AxiosError.from(err, null, config, response.request, response));
|
|
3178
3178
|
}
|
|
3179
3179
|
settle(resolve, reject, response);
|
|
3180
3180
|
});
|
|
@@ -3185,16 +3185,16 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3185
3185
|
}), emitter.once('abort', (err)=>{
|
|
3186
3186
|
reject(err), req.destroy(err);
|
|
3187
3187
|
}), req.on('error', function(err) {
|
|
3188
|
-
reject(
|
|
3188
|
+
reject(AxiosError.from(err, null, config, req));
|
|
3189
3189
|
}), req.on('socket', function(socket) {
|
|
3190
3190
|
socket.setKeepAlive(!0, 60000);
|
|
3191
3191
|
}), config.timeout) {
|
|
3192
3192
|
let timeout = parseInt(config.timeout, 10);
|
|
3193
|
-
if (Number.isNaN(timeout)) return void reject(new
|
|
3193
|
+
if (Number.isNaN(timeout)) return void reject(new AxiosError('error trying to parse `config.timeout` to int', AxiosError.ERR_BAD_OPTION_VALUE, config, req));
|
|
3194
3194
|
req.setTimeout(timeout, function() {
|
|
3195
3195
|
if (isDone) return;
|
|
3196
3196
|
let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded', transitional = config.transitional || defaults_transitional;
|
|
3197
|
-
config.timeoutErrorMessage && (timeoutErrorMessage = config.timeoutErrorMessage), reject(new
|
|
3197
|
+
config.timeoutErrorMessage && (timeoutErrorMessage = config.timeoutErrorMessage), reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req)), abort();
|
|
3198
3198
|
});
|
|
3199
3199
|
}
|
|
3200
3200
|
if (utils.isStream(data)) {
|
|
@@ -3235,7 +3235,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3235
3235
|
write () {},
|
|
3236
3236
|
read: ()=>null,
|
|
3237
3237
|
remove () {}
|
|
3238
|
-
}, headersToObject = (thing)=>thing instanceof
|
|
3238
|
+
}, headersToObject = (thing)=>thing instanceof AxiosHeaders ? {
|
|
3239
3239
|
...thing
|
|
3240
3240
|
} : thing;
|
|
3241
3241
|
function mergeConfig(config1, config2) {
|
|
@@ -3299,7 +3299,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3299
3299
|
}
|
|
3300
3300
|
let resolveConfig = (config)=>{
|
|
3301
3301
|
let newConfig = mergeConfig({}, config), { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
3302
|
-
if (newConfig.headers = headers =
|
|
3302
|
+
if (newConfig.headers = headers = AxiosHeaders.from(headers), newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer), auth && headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))), utils.isFormData(data)) {
|
|
3303
3303
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) headers.setContentType(void 0);
|
|
3304
3304
|
else if (utils.isFunction(data.getHeaders)) {
|
|
3305
3305
|
let formHeaders = data.getHeaders(), allowedHeaders = [
|
|
@@ -3318,14 +3318,14 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3318
3318
|
return newConfig;
|
|
3319
3319
|
}, xhr = 'undefined' != typeof XMLHttpRequest && function(config) {
|
|
3320
3320
|
return new Promise(function(resolve, reject) {
|
|
3321
|
-
let onCanceled, uploadThrottled, downloadThrottled, flushUpload, flushDownload, _config = resolveConfig(config), requestData = _config.data, requestHeaders =
|
|
3321
|
+
let onCanceled, uploadThrottled, downloadThrottled, flushUpload, flushDownload, _config = resolveConfig(config), requestData = _config.data, requestHeaders = AxiosHeaders.from(_config.headers).normalize(), { responseType, onUploadProgress, onDownloadProgress } = _config;
|
|
3322
3322
|
function done() {
|
|
3323
3323
|
flushUpload && flushUpload(), flushDownload && flushDownload(), _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled), _config.signal && _config.signal.removeEventListener('abort', onCanceled);
|
|
3324
3324
|
}
|
|
3325
3325
|
let request = new XMLHttpRequest();
|
|
3326
3326
|
function onloadend() {
|
|
3327
3327
|
if (!request) return;
|
|
3328
|
-
let responseHeaders =
|
|
3328
|
+
let responseHeaders = AxiosHeaders.from('getAllResponseHeaders' in request && request.getAllResponseHeaders());
|
|
3329
3329
|
settle(function(value) {
|
|
3330
3330
|
resolve(value), done();
|
|
3331
3331
|
}, function(err) {
|
|
@@ -3342,20 +3342,20 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3342
3342
|
request.open(_config.method.toUpperCase(), _config.url, !0), request.timeout = _config.timeout, 'onloadend' in request ? request.onloadend = onloadend : request.onreadystatechange = function() {
|
|
3343
3343
|
!request || 4 !== request.readyState || (0 !== request.status || request.responseURL && 0 === request.responseURL.indexOf('file:')) && setTimeout(onloadend);
|
|
3344
3344
|
}, request.onabort = function() {
|
|
3345
|
-
request && (reject(new
|
|
3345
|
+
request && (reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request)), request = null);
|
|
3346
3346
|
}, request.onerror = function(event) {
|
|
3347
|
-
let err = new
|
|
3347
|
+
let err = new AxiosError(event && event.message ? event.message : 'Network Error', AxiosError.ERR_NETWORK, config, request);
|
|
3348
3348
|
err.event = event || null, reject(err), request = null;
|
|
3349
3349
|
}, request.ontimeout = function() {
|
|
3350
3350
|
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded', transitional = _config.transitional || defaults_transitional;
|
|
3351
|
-
_config.timeoutErrorMessage && (timeoutErrorMessage = _config.timeoutErrorMessage), reject(new
|
|
3351
|
+
_config.timeoutErrorMessage && (timeoutErrorMessage = _config.timeoutErrorMessage), reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request)), request = null;
|
|
3352
3352
|
}, void 0 === requestData && requestHeaders.setContentType(null), 'setRequestHeader' in request && utils.forEach(requestHeaders.toJSON(), function(val, key) {
|
|
3353
3353
|
request.setRequestHeader(key, val);
|
|
3354
3354
|
}), utils.isUndefined(_config.withCredentials) || (request.withCredentials = !!_config.withCredentials), responseType && 'json' !== responseType && (request.responseType = _config.responseType), onDownloadProgress && ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, !0), request.addEventListener('progress', downloadThrottled)), onUploadProgress && request.upload && ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress), request.upload.addEventListener('progress', uploadThrottled), request.upload.addEventListener('loadend', flushUpload)), (_config.cancelToken || _config.signal) && (onCanceled = (cancel)=>{
|
|
3355
3355
|
request && (reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel), request.abort(), request = null);
|
|
3356
3356
|
}, _config.cancelToken && _config.cancelToken.subscribe(onCanceled), _config.signal && (_config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled)));
|
|
3357
3357
|
let protocol = parseProtocol(_config.url);
|
|
3358
|
-
protocol && -1 === platform.protocols.indexOf(protocol) ? reject(new
|
|
3358
|
+
protocol && -1 === platform.protocols.indexOf(protocol) ? reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config)) : request.send(requestData || null);
|
|
3359
3359
|
});
|
|
3360
3360
|
}, streamChunk = function*(chunk, chunkSize) {
|
|
3361
3361
|
let end, len = chunk.byteLength;
|
|
@@ -3438,7 +3438,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3438
3438
|
resolvers[type] || (resolvers[type] = (res, config)=>{
|
|
3439
3439
|
let method = res && res[type];
|
|
3440
3440
|
if (method) return method.call(res);
|
|
3441
|
-
throw new
|
|
3441
|
+
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
3442
3442
|
});
|
|
3443
3443
|
});
|
|
3444
3444
|
let getBodyLength = async (body)=>{
|
|
@@ -3466,10 +3466,10 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3466
3466
|
if (!aborted) {
|
|
3467
3467
|
aborted = !0, unsubscribe();
|
|
3468
3468
|
let err = reason instanceof Error ? reason : this.reason;
|
|
3469
|
-
controller.abort(err instanceof
|
|
3469
|
+
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
3470
3470
|
}
|
|
3471
3471
|
}, timer = timeout && setTimeout(()=>{
|
|
3472
|
-
timer = null, onabort(new
|
|
3472
|
+
timer = null, onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
|
|
3473
3473
|
}, timeout), unsubscribe = ()=>{
|
|
3474
3474
|
signals && (timer && clearTimeout(timer), timer = null, signals.forEach((signal)=>{
|
|
3475
3475
|
signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
|
|
@@ -3528,7 +3528,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3528
3528
|
return !isStreamResponse && unsubscribe && unsubscribe(), await new Promise((resolve, reject)=>{
|
|
3529
3529
|
settle(resolve, reject, {
|
|
3530
3530
|
data: responseData,
|
|
3531
|
-
headers:
|
|
3531
|
+
headers: AxiosHeaders.from(response.headers),
|
|
3532
3532
|
status: response.status,
|
|
3533
3533
|
statusText: response.statusText,
|
|
3534
3534
|
config,
|
|
@@ -3536,10 +3536,10 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3536
3536
|
});
|
|
3537
3537
|
});
|
|
3538
3538
|
} catch (err) {
|
|
3539
|
-
if (unsubscribe && unsubscribe(), err && 'TypeError' === err.name && /Load failed|fetch/i.test(err.message)) throw Object.assign(new
|
|
3539
|
+
if (unsubscribe && unsubscribe(), err && 'TypeError' === err.name && /Load failed|fetch/i.test(err.message)) throw Object.assign(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), {
|
|
3540
3540
|
cause: err.cause || err
|
|
3541
3541
|
});
|
|
3542
|
-
throw
|
|
3542
|
+
throw AxiosError.from(err, err && err.code, config, request);
|
|
3543
3543
|
}
|
|
3544
3544
|
};
|
|
3545
3545
|
}, seedCache = new Map(), getFetch = (config)=>{
|
|
@@ -3577,13 +3577,13 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3577
3577
|
], rejectedReasons = {};
|
|
3578
3578
|
for(let i = 0; i < length; i++){
|
|
3579
3579
|
let id;
|
|
3580
|
-
if (adapter = nameOrAdapter = adapters[i], !isResolvedHandle(nameOrAdapter) && void 0 === (adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()])) throw new
|
|
3580
|
+
if (adapter = nameOrAdapter = adapters[i], !isResolvedHandle(nameOrAdapter) && void 0 === (adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()])) throw new AxiosError(`Unknown adapter '${id}'`);
|
|
3581
3581
|
if (adapter && (utils.isFunction(adapter) || (adapter = adapter.get(config)))) break;
|
|
3582
3582
|
rejectedReasons[id || '#' + i] = adapter;
|
|
3583
3583
|
}
|
|
3584
3584
|
if (!adapter) {
|
|
3585
3585
|
let reasons = Object.entries(rejectedReasons).map(([id, state])=>`adapter ${id} ` + (!1 === state ? 'is not supported by the environment' : 'is not available in the build'));
|
|
3586
|
-
throw new
|
|
3586
|
+
throw new AxiosError("There is no suitable adapter to dispatch the request " + (length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified'), 'ERR_NOT_SUPPORT');
|
|
3587
3587
|
}
|
|
3588
3588
|
return adapter;
|
|
3589
3589
|
};
|
|
@@ -3591,14 +3591,14 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3591
3591
|
if (config.cancelToken && config.cancelToken.throwIfRequested(), config.signal && config.signal.aborted) throw new CanceledError(null, config);
|
|
3592
3592
|
}
|
|
3593
3593
|
function dispatchRequest(config) {
|
|
3594
|
-
return throwIfCancellationRequested(config), config.headers =
|
|
3594
|
+
return throwIfCancellationRequested(config), config.headers = AxiosHeaders.from(config.headers), config.data = transformData.call(config, config.transformRequest), -1 !== [
|
|
3595
3595
|
'post',
|
|
3596
3596
|
'put',
|
|
3597
3597
|
'patch'
|
|
3598
3598
|
].indexOf(config.method) && config.headers.setContentType('application/x-www-form-urlencoded', !1), adapters_adapters_getAdapter(config.adapter || defaults_defaults.adapter, config)(config).then(function(response) {
|
|
3599
|
-
return throwIfCancellationRequested(config), response.data = transformData.call(config, config.transformResponse, response), response.headers =
|
|
3599
|
+
return throwIfCancellationRequested(config), response.data = transformData.call(config, config.transformResponse, response), response.headers = AxiosHeaders.from(response.headers), response;
|
|
3600
3600
|
}, function(reason) {
|
|
3601
|
-
return !isCancel(reason) && (throwIfCancellationRequested(config), reason && reason.response && (reason.response.data = transformData.call(config, config.transformResponse, reason.response), reason.response.headers =
|
|
3601
|
+
return !isCancel(reason) && (throwIfCancellationRequested(config), reason && reason.response && (reason.response.data = transformData.call(config, config.transformResponse, reason.response), reason.response.headers = AxiosHeaders.from(reason.response.headers))), Promise.reject(reason);
|
|
3602
3602
|
});
|
|
3603
3603
|
}
|
|
3604
3604
|
let validators = {};
|
|
@@ -3620,26 +3620,26 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3620
3620
|
return "[Axios v1.12.2] Transitional option '" + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
3621
3621
|
}
|
|
3622
3622
|
return (value, opt, opts)=>{
|
|
3623
|
-
if (!1 === validator) throw new
|
|
3623
|
+
if (!1 === validator) throw new AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED);
|
|
3624
3624
|
return version && !deprecatedWarnings[opt] && (deprecatedWarnings[opt] = !0, console.warn(formatMessage(opt, ' has been deprecated since v' + version + ' and will be removed in the near future'))), !validator || validator(value, opt, opts);
|
|
3625
3625
|
};
|
|
3626
3626
|
}, validators.spelling = function(correctSpelling) {
|
|
3627
3627
|
return (value, opt)=>(console.warn(`${opt} is likely a misspelling of ${correctSpelling}`), !0);
|
|
3628
3628
|
};
|
|
3629
3629
|
let helpers_validator_assertOptions = function(options, schema, allowUnknown) {
|
|
3630
|
-
if ('object' != typeof options) throw new
|
|
3630
|
+
if ('object' != typeof options) throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
|
|
3631
3631
|
let keys = Object.keys(options), i = keys.length;
|
|
3632
3632
|
for(; i-- > 0;){
|
|
3633
3633
|
let opt = keys[i], validator = schema[opt];
|
|
3634
3634
|
if (validator) {
|
|
3635
3635
|
let value = options[opt], result = void 0 === value || validator(value, opt, options);
|
|
3636
|
-
if (!0 !== result) throw new
|
|
3636
|
+
if (!0 !== result) throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
|
|
3637
3637
|
continue;
|
|
3638
3638
|
}
|
|
3639
|
-
if (!0 !== allowUnknown) throw new
|
|
3639
|
+
if (!0 !== allowUnknown) throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
|
|
3640
3640
|
}
|
|
3641
3641
|
}, helpers_validator_validators = validators, Axios_validators = helpers_validator_validators;
|
|
3642
|
-
class
|
|
3642
|
+
class Axios {
|
|
3643
3643
|
constructor(instanceConfig){
|
|
3644
3644
|
this.defaults = instanceConfig || {}, this.interceptors = {
|
|
3645
3645
|
request: new core_InterceptorManager(),
|
|
@@ -3689,7 +3689,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3689
3689
|
'common'
|
|
3690
3690
|
], (method)=>{
|
|
3691
3691
|
delete headers[method];
|
|
3692
|
-
}), config.headers =
|
|
3692
|
+
}), config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
3693
3693
|
let requestInterceptorChain = [], synchronousRequestInterceptors = !0;
|
|
3694
3694
|
this.interceptors.request.forEach(function(interceptor) {
|
|
3695
3695
|
('function' != typeof interceptor.runWhen || !1 !== interceptor.runWhen(config)) && (synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous, requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected));
|
|
@@ -3736,7 +3736,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3736
3736
|
'head',
|
|
3737
3737
|
'options'
|
|
3738
3738
|
], function(method) {
|
|
3739
|
-
|
|
3739
|
+
Axios.prototype[method] = function(url, config) {
|
|
3740
3740
|
return this.request(mergeConfig(config || {}, {
|
|
3741
3741
|
method,
|
|
3742
3742
|
url,
|
|
@@ -3760,9 +3760,9 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3760
3760
|
}));
|
|
3761
3761
|
};
|
|
3762
3762
|
}
|
|
3763
|
-
|
|
3763
|
+
Axios.prototype[method] = generateHTTPMethod(), Axios.prototype[method + 'Form'] = generateHTTPMethod(!0);
|
|
3764
3764
|
});
|
|
3765
|
-
class
|
|
3765
|
+
class CancelToken {
|
|
3766
3766
|
constructor(executor){
|
|
3767
3767
|
let resolvePromise;
|
|
3768
3768
|
if ('function' != typeof executor) throw TypeError('executor must be a function.');
|
|
@@ -3808,7 +3808,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3808
3808
|
static source() {
|
|
3809
3809
|
let cancel;
|
|
3810
3810
|
return {
|
|
3811
|
-
token: new
|
|
3811
|
+
token: new CancelToken(function(c) {
|
|
3812
3812
|
cancel = c;
|
|
3813
3813
|
}),
|
|
3814
3814
|
cancel
|
|
@@ -3884,8 +3884,8 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3884
3884
|
HttpStatusCode[value] = key;
|
|
3885
3885
|
});
|
|
3886
3886
|
let axios = function createInstance(defaultConfig) {
|
|
3887
|
-
let context = new
|
|
3888
|
-
return utils.extend(instance,
|
|
3887
|
+
let context = new Axios(defaultConfig), instance = bind(Axios.prototype.request, context);
|
|
3888
|
+
return utils.extend(instance, Axios.prototype, context, {
|
|
3889
3889
|
allOwnKeys: !0
|
|
3890
3890
|
}), utils.extend(instance, context, null, {
|
|
3891
3891
|
allOwnKeys: !0
|
|
@@ -3893,7 +3893,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3893
3893
|
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
3894
3894
|
}, instance;
|
|
3895
3895
|
}(defaults_defaults);
|
|
3896
|
-
axios.Axios =
|
|
3896
|
+
axios.Axios = Axios, axios.CanceledError = CanceledError, axios.CancelToken = CancelToken, axios.isCancel = isCancel, axios.VERSION = "1.12.2", axios.toFormData = helpers_toFormData, axios.AxiosError = AxiosError, axios.Cancel = axios.CanceledError, axios.all = function(promises) {
|
|
3897
3897
|
return Promise.all(promises);
|
|
3898
3898
|
}, axios.spread = function(callback) {
|
|
3899
3899
|
return function(arr) {
|
|
@@ -3901,7 +3901,7 @@ ${section.body}` : section.body).join("\n\n"));
|
|
|
3901
3901
|
};
|
|
3902
3902
|
}, axios.isAxiosError = function(payload) {
|
|
3903
3903
|
return utils.isObject(payload) && !0 === payload.isAxiosError;
|
|
3904
|
-
}, axios.mergeConfig = mergeConfig, axios.AxiosHeaders =
|
|
3904
|
+
}, axios.mergeConfig = mergeConfig, axios.AxiosHeaders = AxiosHeaders, axios.formToJSON = (thing)=>helpers_formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing), axios.getAdapter = adapters_adapters_getAdapter, axios.HttpStatusCode = HttpStatusCode, axios.default = axios;
|
|
3905
3905
|
var external_path_ = __webpack_require__("path"), external_path_default = __webpack_require__.n(external_path_);
|
|
3906
3906
|
let external_node_fs_namespaceObject = require("node:fs");
|
|
3907
3907
|
var external_node_fs_default = __webpack_require__.n(external_node_fs_namespaceObject);
|