piral-cli 1.10.3-beta.8a00ccb → 1.10.3-beta.8a1de4b
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/lib/external/index.js +1046 -575
- package/package.json +2 -2
package/lib/external/index.js
CHANGED
|
@@ -19416,7 +19416,7 @@ var require_form_data = __commonJS({
|
|
|
19416
19416
|
var path3 = require("path");
|
|
19417
19417
|
var http3 = require("http");
|
|
19418
19418
|
var https2 = require("https");
|
|
19419
|
-
var
|
|
19419
|
+
var parseUrl2 = require("url").parse;
|
|
19420
19420
|
var fs3 = require("fs");
|
|
19421
19421
|
var Stream2 = require("stream").Stream;
|
|
19422
19422
|
var crypto2 = require("crypto");
|
|
@@ -19669,7 +19669,7 @@ var require_form_data = __commonJS({
|
|
|
19669
19669
|
var options;
|
|
19670
19670
|
var defaults3 = { method: "post" };
|
|
19671
19671
|
if (typeof params === "string") {
|
|
19672
|
-
params =
|
|
19672
|
+
params = parseUrl2(params);
|
|
19673
19673
|
options = populate({
|
|
19674
19674
|
port: params.port,
|
|
19675
19675
|
path: params.pathname,
|
|
@@ -19721,81 +19721,11 @@ var require_form_data = __commonJS({
|
|
|
19721
19721
|
FormData4.prototype.toString = function() {
|
|
19722
19722
|
return "[object FormData]";
|
|
19723
19723
|
};
|
|
19724
|
-
setToStringTag(FormData4, "FormData");
|
|
19724
|
+
setToStringTag(FormData4.prototype, "FormData");
|
|
19725
19725
|
module2.exports = FormData4;
|
|
19726
19726
|
}
|
|
19727
19727
|
});
|
|
19728
19728
|
|
|
19729
|
-
// ../../../node_modules/proxy-from-env/index.js
|
|
19730
|
-
var require_proxy_from_env = __commonJS({
|
|
19731
|
-
"../../../node_modules/proxy-from-env/index.js"(exports2) {
|
|
19732
|
-
"use strict";
|
|
19733
|
-
var parseUrl = require("url").parse;
|
|
19734
|
-
var DEFAULT_PORTS = {
|
|
19735
|
-
ftp: 21,
|
|
19736
|
-
gopher: 70,
|
|
19737
|
-
http: 80,
|
|
19738
|
-
https: 443,
|
|
19739
|
-
ws: 80,
|
|
19740
|
-
wss: 443
|
|
19741
|
-
};
|
|
19742
|
-
var stringEndsWith = String.prototype.endsWith || function(s3) {
|
|
19743
|
-
return s3.length <= this.length && this.indexOf(s3, this.length - s3.length) !== -1;
|
|
19744
|
-
};
|
|
19745
|
-
function getProxyForUrl(url2) {
|
|
19746
|
-
var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {};
|
|
19747
|
-
var proto4 = parsedUrl.protocol;
|
|
19748
|
-
var hostname = parsedUrl.host;
|
|
19749
|
-
var port = parsedUrl.port;
|
|
19750
|
-
if (typeof hostname !== "string" || !hostname || typeof proto4 !== "string") {
|
|
19751
|
-
return "";
|
|
19752
|
-
}
|
|
19753
|
-
proto4 = proto4.split(":", 1)[0];
|
|
19754
|
-
hostname = hostname.replace(/:\d*$/, "");
|
|
19755
|
-
port = parseInt(port) || DEFAULT_PORTS[proto4] || 0;
|
|
19756
|
-
if (!shouldProxy(hostname, port)) {
|
|
19757
|
-
return "";
|
|
19758
|
-
}
|
|
19759
|
-
var proxy = getEnv("npm_config_" + proto4 + "_proxy") || getEnv(proto4 + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
|
|
19760
|
-
if (proxy && proxy.indexOf("://") === -1) {
|
|
19761
|
-
proxy = proto4 + "://" + proxy;
|
|
19762
|
-
}
|
|
19763
|
-
return proxy;
|
|
19764
|
-
}
|
|
19765
|
-
function shouldProxy(hostname, port) {
|
|
19766
|
-
var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
|
|
19767
|
-
if (!NO_PROXY) {
|
|
19768
|
-
return true;
|
|
19769
|
-
}
|
|
19770
|
-
if (NO_PROXY === "*") {
|
|
19771
|
-
return false;
|
|
19772
|
-
}
|
|
19773
|
-
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
19774
|
-
if (!proxy) {
|
|
19775
|
-
return true;
|
|
19776
|
-
}
|
|
19777
|
-
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
19778
|
-
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
19779
|
-
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
19780
|
-
if (parsedProxyPort && parsedProxyPort !== port) {
|
|
19781
|
-
return true;
|
|
19782
|
-
}
|
|
19783
|
-
if (!/^[.*]/.test(parsedProxyHostname)) {
|
|
19784
|
-
return hostname !== parsedProxyHostname;
|
|
19785
|
-
}
|
|
19786
|
-
if (parsedProxyHostname.charAt(0) === "*") {
|
|
19787
|
-
parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
19788
|
-
}
|
|
19789
|
-
return !stringEndsWith.call(hostname, parsedProxyHostname);
|
|
19790
|
-
});
|
|
19791
|
-
}
|
|
19792
|
-
function getEnv(key) {
|
|
19793
|
-
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
19794
|
-
}
|
|
19795
|
-
exports2.getProxyForUrl = getProxyForUrl;
|
|
19796
|
-
}
|
|
19797
|
-
});
|
|
19798
|
-
|
|
19799
19729
|
// ../../../node_modules/debug/node_modules/ms/index.js
|
|
19800
19730
|
var require_ms = __commonJS({
|
|
19801
19731
|
"../../../node_modules/debug/node_modules/ms/index.js"(exports2, module2) {
|
|
@@ -20264,6 +20194,11 @@ var require_follow_redirects = __commonJS({
|
|
|
20264
20194
|
} catch (error) {
|
|
20265
20195
|
useNativeURL = error.code === "ERR_INVALID_URL";
|
|
20266
20196
|
}
|
|
20197
|
+
var sensitiveHeaders = [
|
|
20198
|
+
"Authorization",
|
|
20199
|
+
"Proxy-Authorization",
|
|
20200
|
+
"Cookie"
|
|
20201
|
+
];
|
|
20267
20202
|
var preservedUrlFields = [
|
|
20268
20203
|
"auth",
|
|
20269
20204
|
"host",
|
|
@@ -20328,6 +20263,7 @@ var require_follow_redirects = __commonJS({
|
|
|
20328
20263
|
self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
|
|
20329
20264
|
}
|
|
20330
20265
|
};
|
|
20266
|
+
this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") + ")$", "i");
|
|
20331
20267
|
this._performRequest();
|
|
20332
20268
|
}
|
|
20333
20269
|
RedirectableRequest.prototype = Object.create(Writable.prototype);
|
|
@@ -20465,6 +20401,9 @@ var require_follow_redirects = __commonJS({
|
|
|
20465
20401
|
if (!options.headers) {
|
|
20466
20402
|
options.headers = {};
|
|
20467
20403
|
}
|
|
20404
|
+
if (!isArray2(options.sensitiveHeaders)) {
|
|
20405
|
+
options.sensitiveHeaders = [];
|
|
20406
|
+
}
|
|
20468
20407
|
if (options.host) {
|
|
20469
20408
|
if (!options.hostname) {
|
|
20470
20409
|
options.hostname = options.host;
|
|
@@ -20562,7 +20501,7 @@ var require_follow_redirects = __commonJS({
|
|
|
20562
20501
|
removeMatchingHeaders(/^content-/i, this._options.headers);
|
|
20563
20502
|
}
|
|
20564
20503
|
var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
|
|
20565
|
-
var currentUrlParts =
|
|
20504
|
+
var currentUrlParts = parseUrl2(this._currentUrl);
|
|
20566
20505
|
var currentHost = currentHostHeader || currentUrlParts.host;
|
|
20567
20506
|
var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost }));
|
|
20568
20507
|
var redirectUrl = resolveUrl(location, currentUrl);
|
|
@@ -20570,7 +20509,7 @@ var require_follow_redirects = __commonJS({
|
|
|
20570
20509
|
this._isRedirect = true;
|
|
20571
20510
|
spreadUrlObject(redirectUrl, this._options);
|
|
20572
20511
|
if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
|
|
20573
|
-
removeMatchingHeaders(
|
|
20512
|
+
removeMatchingHeaders(this._headerFilter, this._options.headers);
|
|
20574
20513
|
}
|
|
20575
20514
|
if (isFunction3(beforeRedirect)) {
|
|
20576
20515
|
var responseDetails = {
|
|
@@ -20601,7 +20540,7 @@ var require_follow_redirects = __commonJS({
|
|
|
20601
20540
|
if (isURL(input)) {
|
|
20602
20541
|
input = spreadUrlObject(input);
|
|
20603
20542
|
} else if (isString2(input)) {
|
|
20604
|
-
input = spreadUrlObject(
|
|
20543
|
+
input = spreadUrlObject(parseUrl2(input));
|
|
20605
20544
|
} else {
|
|
20606
20545
|
callback = options;
|
|
20607
20546
|
options = validateUrl(input);
|
|
@@ -20637,7 +20576,7 @@ var require_follow_redirects = __commonJS({
|
|
|
20637
20576
|
}
|
|
20638
20577
|
function noop2() {
|
|
20639
20578
|
}
|
|
20640
|
-
function
|
|
20579
|
+
function parseUrl2(input) {
|
|
20641
20580
|
var parsed;
|
|
20642
20581
|
if (useNativeURL) {
|
|
20643
20582
|
parsed = new URL2(input);
|
|
@@ -20650,7 +20589,7 @@ var require_follow_redirects = __commonJS({
|
|
|
20650
20589
|
return parsed;
|
|
20651
20590
|
}
|
|
20652
20591
|
function resolveUrl(relative, base) {
|
|
20653
|
-
return useNativeURL ? new URL2(relative, base) :
|
|
20592
|
+
return useNativeURL ? new URL2(relative, base) : parseUrl2(url2.resolve(base, relative));
|
|
20654
20593
|
}
|
|
20655
20594
|
function validateUrl(input) {
|
|
20656
20595
|
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
|
|
@@ -20719,6 +20658,9 @@ var require_follow_redirects = __commonJS({
|
|
|
20719
20658
|
var dot = subdomain.length - domain.length - 1;
|
|
20720
20659
|
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
|
|
20721
20660
|
}
|
|
20661
|
+
function isArray2(value) {
|
|
20662
|
+
return value instanceof Array;
|
|
20663
|
+
}
|
|
20722
20664
|
function isString2(value) {
|
|
20723
20665
|
return typeof value === "string" || value instanceof String;
|
|
20724
20666
|
}
|
|
@@ -20731,6 +20673,9 @@ var require_follow_redirects = __commonJS({
|
|
|
20731
20673
|
function isURL(value) {
|
|
20732
20674
|
return URL2 && value instanceof URL2;
|
|
20733
20675
|
}
|
|
20676
|
+
function escapeRegex(regex2) {
|
|
20677
|
+
return regex2.replace(/[\]\\/()*+?.$]/g, "\\$&");
|
|
20678
|
+
}
|
|
20734
20679
|
module2.exports = wrap2({ http: http3, https: https2 });
|
|
20735
20680
|
module2.exports.wrap = wrap2;
|
|
20736
20681
|
}
|
|
@@ -48613,8 +48558,8 @@ var require_lib5 = __commonJS({
|
|
|
48613
48558
|
};
|
|
48614
48559
|
}
|
|
48615
48560
|
var mergeExports = (obj, exports3) => {
|
|
48616
|
-
const
|
|
48617
|
-
Object.defineProperties(obj,
|
|
48561
|
+
const descriptors = Object.getOwnPropertyDescriptors(exports3);
|
|
48562
|
+
Object.defineProperties(obj, descriptors);
|
|
48618
48563
|
return (
|
|
48619
48564
|
/** @type {A & B} */
|
|
48620
48565
|
Object.freeze(obj)
|
|
@@ -53495,8 +53440,8 @@ var isPlainObject = (val) => {
|
|
|
53495
53440
|
if (kindOf(val) !== "object") {
|
|
53496
53441
|
return false;
|
|
53497
53442
|
}
|
|
53498
|
-
const
|
|
53499
|
-
return (
|
|
53443
|
+
const prototype2 = getPrototypeOf(val);
|
|
53444
|
+
return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
|
|
53500
53445
|
};
|
|
53501
53446
|
var isEmptyObject = (val) => {
|
|
53502
53447
|
if (!isObject(val) || isBuffer(val)) {
|
|
@@ -53510,17 +53455,42 @@ var isEmptyObject = (val) => {
|
|
|
53510
53455
|
};
|
|
53511
53456
|
var isDate = kindOfTest("Date");
|
|
53512
53457
|
var isFile = kindOfTest("File");
|
|
53458
|
+
var isReactNativeBlob = (value) => {
|
|
53459
|
+
return !!(value && typeof value.uri !== "undefined");
|
|
53460
|
+
};
|
|
53461
|
+
var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
|
|
53513
53462
|
var isBlob = kindOfTest("Blob");
|
|
53514
53463
|
var isFileList = kindOfTest("FileList");
|
|
53515
53464
|
var isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
53465
|
+
function getGlobal() {
|
|
53466
|
+
if (typeof globalThis !== "undefined") return globalThis;
|
|
53467
|
+
if (typeof self !== "undefined") return self;
|
|
53468
|
+
if (typeof window !== "undefined") return window;
|
|
53469
|
+
if (typeof global !== "undefined") return global;
|
|
53470
|
+
return {};
|
|
53471
|
+
}
|
|
53472
|
+
var G2 = getGlobal();
|
|
53473
|
+
var FormDataCtor = typeof G2.FormData !== "undefined" ? G2.FormData : void 0;
|
|
53516
53474
|
var isFormData = (thing) => {
|
|
53517
|
-
|
|
53518
|
-
|
|
53519
|
-
|
|
53475
|
+
if (!thing) return false;
|
|
53476
|
+
if (FormDataCtor && thing instanceof FormDataCtor) return true;
|
|
53477
|
+
const proto4 = getPrototypeOf(thing);
|
|
53478
|
+
if (!proto4 || proto4 === Object.prototype) return false;
|
|
53479
|
+
if (!isFunction(thing.append)) return false;
|
|
53480
|
+
const kind = kindOf(thing);
|
|
53481
|
+
return kind === "formdata" || // detect form-data instance
|
|
53482
|
+
kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]";
|
|
53520
53483
|
};
|
|
53521
53484
|
var isURLSearchParams = kindOfTest("URLSearchParams");
|
|
53522
|
-
var [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
53523
|
-
|
|
53485
|
+
var [isReadableStream, isRequest, isResponse, isHeaders] = [
|
|
53486
|
+
"ReadableStream",
|
|
53487
|
+
"Request",
|
|
53488
|
+
"Response",
|
|
53489
|
+
"Headers"
|
|
53490
|
+
].map(kindOfTest);
|
|
53491
|
+
var trim = (str) => {
|
|
53492
|
+
return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
53493
|
+
};
|
|
53524
53494
|
function forEach(obj, fn2, { allOwnKeys = false } = {}) {
|
|
53525
53495
|
if (obj === null || typeof obj === "undefined") {
|
|
53526
53496
|
return;
|
|
@@ -53572,6 +53542,9 @@ function merge() {
|
|
|
53572
53542
|
const { caseless, skipUndefined } = isContextDefined(this) && this || {};
|
|
53573
53543
|
const result = {};
|
|
53574
53544
|
const assignValue = (val, key) => {
|
|
53545
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
53546
|
+
return;
|
|
53547
|
+
}
|
|
53575
53548
|
const targetKey = caseless && findKey(result, key) || key;
|
|
53576
53549
|
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
53577
53550
|
result[targetKey] = merge(result[targetKey], val);
|
|
@@ -53589,13 +53562,27 @@ function merge() {
|
|
|
53589
53562
|
return result;
|
|
53590
53563
|
}
|
|
53591
53564
|
var extend = (a, b2, thisArg, { allOwnKeys } = {}) => {
|
|
53592
|
-
forEach(
|
|
53593
|
-
|
|
53594
|
-
|
|
53595
|
-
|
|
53596
|
-
|
|
53597
|
-
|
|
53598
|
-
|
|
53565
|
+
forEach(
|
|
53566
|
+
b2,
|
|
53567
|
+
(val, key) => {
|
|
53568
|
+
if (thisArg && isFunction(val)) {
|
|
53569
|
+
Object.defineProperty(a, key, {
|
|
53570
|
+
value: bind(val, thisArg),
|
|
53571
|
+
writable: true,
|
|
53572
|
+
enumerable: true,
|
|
53573
|
+
configurable: true
|
|
53574
|
+
});
|
|
53575
|
+
} else {
|
|
53576
|
+
Object.defineProperty(a, key, {
|
|
53577
|
+
value: val,
|
|
53578
|
+
writable: true,
|
|
53579
|
+
enumerable: true,
|
|
53580
|
+
configurable: true
|
|
53581
|
+
});
|
|
53582
|
+
}
|
|
53583
|
+
},
|
|
53584
|
+
{ allOwnKeys }
|
|
53585
|
+
);
|
|
53599
53586
|
return a;
|
|
53600
53587
|
};
|
|
53601
53588
|
var stripBOM = (content) => {
|
|
@@ -53604,9 +53591,14 @@ var stripBOM = (content) => {
|
|
|
53604
53591
|
}
|
|
53605
53592
|
return content;
|
|
53606
53593
|
};
|
|
53607
|
-
var inherits = (constructor, superConstructor, props,
|
|
53608
|
-
constructor.prototype = Object.create(superConstructor.prototype,
|
|
53609
|
-
constructor.prototype
|
|
53594
|
+
var inherits = (constructor, superConstructor, props, descriptors) => {
|
|
53595
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
53596
|
+
Object.defineProperty(constructor.prototype, "constructor", {
|
|
53597
|
+
value: constructor,
|
|
53598
|
+
writable: true,
|
|
53599
|
+
enumerable: false,
|
|
53600
|
+
configurable: true
|
|
53601
|
+
});
|
|
53610
53602
|
Object.defineProperty(constructor, "super", {
|
|
53611
53603
|
value: superConstructor.prototype
|
|
53612
53604
|
});
|
|
@@ -53677,19 +53669,16 @@ var matchAll = (regExp, str) => {
|
|
|
53677
53669
|
};
|
|
53678
53670
|
var isHTMLForm = kindOfTest("HTMLFormElement");
|
|
53679
53671
|
var toCamelCase = (str) => {
|
|
53680
|
-
return str.toLowerCase().replace(
|
|
53681
|
-
|
|
53682
|
-
|
|
53683
|
-
return p1.toUpperCase() + p2;
|
|
53684
|
-
}
|
|
53685
|
-
);
|
|
53672
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m2, p1, p2) {
|
|
53673
|
+
return p1.toUpperCase() + p2;
|
|
53674
|
+
});
|
|
53686
53675
|
};
|
|
53687
53676
|
var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
53688
53677
|
var isRegExp = kindOfTest("RegExp");
|
|
53689
53678
|
var reduceDescriptors = (obj, reducer) => {
|
|
53690
|
-
const
|
|
53679
|
+
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
53691
53680
|
const reducedDescriptors = {};
|
|
53692
|
-
forEach(
|
|
53681
|
+
forEach(descriptors, (descriptor, name) => {
|
|
53693
53682
|
let ret;
|
|
53694
53683
|
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
|
53695
53684
|
reducedDescriptors[name] = ret || descriptor;
|
|
@@ -53766,20 +53755,21 @@ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
53766
53755
|
return setImmediate;
|
|
53767
53756
|
}
|
|
53768
53757
|
return postMessageSupported ? ((token, callbacks) => {
|
|
53769
|
-
_global.addEventListener(
|
|
53770
|
-
|
|
53771
|
-
|
|
53772
|
-
|
|
53773
|
-
|
|
53758
|
+
_global.addEventListener(
|
|
53759
|
+
"message",
|
|
53760
|
+
({ source, data }) => {
|
|
53761
|
+
if (source === _global && data === token) {
|
|
53762
|
+
callbacks.length && callbacks.shift()();
|
|
53763
|
+
}
|
|
53764
|
+
},
|
|
53765
|
+
false
|
|
53766
|
+
);
|
|
53774
53767
|
return (cb) => {
|
|
53775
53768
|
callbacks.push(cb);
|
|
53776
53769
|
_global.postMessage(token, "*");
|
|
53777
53770
|
};
|
|
53778
53771
|
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
53779
|
-
})(
|
|
53780
|
-
typeof setImmediate === "function",
|
|
53781
|
-
isFunction(_global.postMessage)
|
|
53782
|
-
);
|
|
53772
|
+
})(typeof setImmediate === "function", isFunction(_global.postMessage));
|
|
53783
53773
|
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
53784
53774
|
var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
|
53785
53775
|
var utils_default = {
|
|
@@ -53801,6 +53791,8 @@ var utils_default = {
|
|
|
53801
53791
|
isUndefined,
|
|
53802
53792
|
isDate,
|
|
53803
53793
|
isFile,
|
|
53794
|
+
isReactNativeBlob,
|
|
53795
|
+
isReactNative,
|
|
53804
53796
|
isBlob,
|
|
53805
53797
|
isRegExp,
|
|
53806
53798
|
isFunction,
|
|
@@ -53844,25 +53836,47 @@ var utils_default = {
|
|
|
53844
53836
|
};
|
|
53845
53837
|
|
|
53846
53838
|
// ../../../node_modules/axios/lib/core/AxiosError.js
|
|
53847
|
-
|
|
53848
|
-
|
|
53849
|
-
|
|
53850
|
-
|
|
53851
|
-
|
|
53852
|
-
|
|
53839
|
+
var AxiosError = class _AxiosError extends Error {
|
|
53840
|
+
static from(error, code, config, request, response, customProps) {
|
|
53841
|
+
const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
|
|
53842
|
+
axiosError.cause = error;
|
|
53843
|
+
axiosError.name = error.name;
|
|
53844
|
+
if (error.status != null && axiosError.status == null) {
|
|
53845
|
+
axiosError.status = error.status;
|
|
53846
|
+
}
|
|
53847
|
+
customProps && Object.assign(axiosError, customProps);
|
|
53848
|
+
return axiosError;
|
|
53853
53849
|
}
|
|
53854
|
-
|
|
53855
|
-
|
|
53856
|
-
|
|
53857
|
-
|
|
53858
|
-
|
|
53859
|
-
|
|
53860
|
-
|
|
53861
|
-
|
|
53850
|
+
/**
|
|
53851
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
53852
|
+
*
|
|
53853
|
+
* @param {string} message The error message.
|
|
53854
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
53855
|
+
* @param {Object} [config] The config.
|
|
53856
|
+
* @param {Object} [request] The request.
|
|
53857
|
+
* @param {Object} [response] The response.
|
|
53858
|
+
*
|
|
53859
|
+
* @returns {Error} The created error.
|
|
53860
|
+
*/
|
|
53861
|
+
constructor(message, code, config, request, response) {
|
|
53862
|
+
super(message);
|
|
53863
|
+
Object.defineProperty(this, "message", {
|
|
53864
|
+
value: message,
|
|
53865
|
+
enumerable: true,
|
|
53866
|
+
writable: true,
|
|
53867
|
+
configurable: true
|
|
53868
|
+
});
|
|
53869
|
+
this.name = "AxiosError";
|
|
53870
|
+
this.isAxiosError = true;
|
|
53871
|
+
code && (this.code = code);
|
|
53872
|
+
config && (this.config = config);
|
|
53873
|
+
request && (this.request = request);
|
|
53874
|
+
if (response) {
|
|
53875
|
+
this.response = response;
|
|
53876
|
+
this.status = response.status;
|
|
53877
|
+
}
|
|
53862
53878
|
}
|
|
53863
|
-
|
|
53864
|
-
utils_default.inherits(AxiosError, Error, {
|
|
53865
|
-
toJSON: function toJSON() {
|
|
53879
|
+
toJSON() {
|
|
53866
53880
|
return {
|
|
53867
53881
|
// Standard
|
|
53868
53882
|
message: this.message,
|
|
@@ -53881,45 +53895,20 @@ utils_default.inherits(AxiosError, Error, {
|
|
|
53881
53895
|
status: this.status
|
|
53882
53896
|
};
|
|
53883
53897
|
}
|
|
53884
|
-
});
|
|
53885
|
-
var prototype = AxiosError.prototype;
|
|
53886
|
-
var descriptors = {};
|
|
53887
|
-
[
|
|
53888
|
-
"ERR_BAD_OPTION_VALUE",
|
|
53889
|
-
"ERR_BAD_OPTION",
|
|
53890
|
-
"ECONNABORTED",
|
|
53891
|
-
"ETIMEDOUT",
|
|
53892
|
-
"ERR_NETWORK",
|
|
53893
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
53894
|
-
"ERR_DEPRECATED",
|
|
53895
|
-
"ERR_BAD_RESPONSE",
|
|
53896
|
-
"ERR_BAD_REQUEST",
|
|
53897
|
-
"ERR_CANCELED",
|
|
53898
|
-
"ERR_NOT_SUPPORT",
|
|
53899
|
-
"ERR_INVALID_URL"
|
|
53900
|
-
// eslint-disable-next-line func-names
|
|
53901
|
-
].forEach((code) => {
|
|
53902
|
-
descriptors[code] = { value: code };
|
|
53903
|
-
});
|
|
53904
|
-
Object.defineProperties(AxiosError, descriptors);
|
|
53905
|
-
Object.defineProperty(prototype, "isAxiosError", { value: true });
|
|
53906
|
-
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
53907
|
-
const axiosError = Object.create(prototype);
|
|
53908
|
-
utils_default.toFlatObject(error, axiosError, function filter4(obj) {
|
|
53909
|
-
return obj !== Error.prototype;
|
|
53910
|
-
}, (prop) => {
|
|
53911
|
-
return prop !== "isAxiosError";
|
|
53912
|
-
});
|
|
53913
|
-
const msg = error && error.message ? error.message : "Error";
|
|
53914
|
-
const errCode = code == null && error ? error.code : code;
|
|
53915
|
-
AxiosError.call(axiosError, msg, errCode, config, request, response);
|
|
53916
|
-
if (error && axiosError.cause == null) {
|
|
53917
|
-
Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
|
|
53918
|
-
}
|
|
53919
|
-
axiosError.name = error && error.name || "Error";
|
|
53920
|
-
customProps && Object.assign(axiosError, customProps);
|
|
53921
|
-
return axiosError;
|
|
53922
53898
|
};
|
|
53899
|
+
AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
53900
|
+
AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
53901
|
+
AxiosError.ECONNABORTED = "ECONNABORTED";
|
|
53902
|
+
AxiosError.ETIMEDOUT = "ETIMEDOUT";
|
|
53903
|
+
AxiosError.ERR_NETWORK = "ERR_NETWORK";
|
|
53904
|
+
AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
53905
|
+
AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
53906
|
+
AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
53907
|
+
AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
53908
|
+
AxiosError.ERR_CANCELED = "ERR_CANCELED";
|
|
53909
|
+
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
53910
|
+
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
53911
|
+
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
53923
53912
|
var AxiosError_default = AxiosError;
|
|
53924
53913
|
|
|
53925
53914
|
// ../../../node_modules/axios/lib/platform/node/classes/FormData.js
|
|
@@ -53951,18 +53940,24 @@ function toFormData(obj, formData, options) {
|
|
|
53951
53940
|
throw new TypeError("target must be an object");
|
|
53952
53941
|
}
|
|
53953
53942
|
formData = formData || new (FormData_default || FormData)();
|
|
53954
|
-
options = utils_default.toFlatObject(
|
|
53955
|
-
|
|
53956
|
-
|
|
53957
|
-
|
|
53958
|
-
|
|
53959
|
-
|
|
53960
|
-
|
|
53943
|
+
options = utils_default.toFlatObject(
|
|
53944
|
+
options,
|
|
53945
|
+
{
|
|
53946
|
+
metaTokens: true,
|
|
53947
|
+
dots: false,
|
|
53948
|
+
indexes: false
|
|
53949
|
+
},
|
|
53950
|
+
false,
|
|
53951
|
+
function defined(option, source) {
|
|
53952
|
+
return !utils_default.isUndefined(source[option]);
|
|
53953
|
+
}
|
|
53954
|
+
);
|
|
53961
53955
|
const metaTokens = options.metaTokens;
|
|
53962
53956
|
const visitor = options.visitor || defaultVisitor;
|
|
53963
53957
|
const dots = options.dots;
|
|
53964
53958
|
const indexes = options.indexes;
|
|
53965
53959
|
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
53960
|
+
const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
|
|
53966
53961
|
const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
|
|
53967
53962
|
if (!utils_default.isFunction(visitor)) {
|
|
53968
53963
|
throw new TypeError("visitor must be a function");
|
|
@@ -53985,6 +53980,10 @@ function toFormData(obj, formData, options) {
|
|
|
53985
53980
|
}
|
|
53986
53981
|
function defaultVisitor(value, key, path3) {
|
|
53987
53982
|
let arr = value;
|
|
53983
|
+
if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
|
|
53984
|
+
formData.append(renderKey(path3, key, dots), convertValue(value));
|
|
53985
|
+
return false;
|
|
53986
|
+
}
|
|
53988
53987
|
if (value && !path3 && typeof value === "object") {
|
|
53989
53988
|
if (utils_default.endsWith(key, "{}")) {
|
|
53990
53989
|
key = metaTokens ? key : key.slice(0, -2);
|
|
@@ -54013,22 +54012,22 @@ function toFormData(obj, formData, options) {
|
|
|
54013
54012
|
convertValue,
|
|
54014
54013
|
isVisitable
|
|
54015
54014
|
});
|
|
54016
|
-
function build(value, path3) {
|
|
54015
|
+
function build(value, path3, depth = 0) {
|
|
54017
54016
|
if (utils_default.isUndefined(value)) return;
|
|
54017
|
+
if (depth > maxDepth) {
|
|
54018
|
+
throw new AxiosError_default(
|
|
54019
|
+
"Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
|
|
54020
|
+
AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
54021
|
+
);
|
|
54022
|
+
}
|
|
54018
54023
|
if (stack.indexOf(value) !== -1) {
|
|
54019
54024
|
throw Error("Circular reference detected in " + path3.join("."));
|
|
54020
54025
|
}
|
|
54021
54026
|
stack.push(value);
|
|
54022
54027
|
utils_default.forEach(value, function each(el, key) {
|
|
54023
|
-
const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(
|
|
54024
|
-
formData,
|
|
54025
|
-
el,
|
|
54026
|
-
utils_default.isString(key) ? key.trim() : key,
|
|
54027
|
-
path3,
|
|
54028
|
-
exposedHelpers
|
|
54029
|
-
);
|
|
54028
|
+
const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path3, exposedHelpers);
|
|
54030
54029
|
if (result === true) {
|
|
54031
|
-
build(el, path3 ? path3.concat(key) : [key]);
|
|
54030
|
+
build(el, path3 ? path3.concat(key) : [key], depth + 1);
|
|
54032
54031
|
}
|
|
54033
54032
|
});
|
|
54034
54033
|
stack.pop();
|
|
@@ -54049,10 +54048,9 @@ function encode(str) {
|
|
|
54049
54048
|
"(": "%28",
|
|
54050
54049
|
")": "%29",
|
|
54051
54050
|
"~": "%7E",
|
|
54052
|
-
"%20": "+"
|
|
54053
|
-
"%00": "\0"
|
|
54051
|
+
"%20": "+"
|
|
54054
54052
|
};
|
|
54055
|
-
return encodeURIComponent(str).replace(/[!'()~]|%20
|
|
54053
|
+
return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match2) {
|
|
54056
54054
|
return charMap[match2];
|
|
54057
54055
|
});
|
|
54058
54056
|
}
|
|
@@ -54060,11 +54058,11 @@ function AxiosURLSearchParams(params, options) {
|
|
|
54060
54058
|
this._pairs = [];
|
|
54061
54059
|
params && toFormData_default(params, this, options);
|
|
54062
54060
|
}
|
|
54063
|
-
var
|
|
54064
|
-
|
|
54061
|
+
var prototype = AxiosURLSearchParams.prototype;
|
|
54062
|
+
prototype.append = function append(name, value) {
|
|
54065
54063
|
this._pairs.push([name, value]);
|
|
54066
54064
|
};
|
|
54067
|
-
|
|
54065
|
+
prototype.toString = function toString2(encoder) {
|
|
54068
54066
|
const _encode = encoder ? function(value) {
|
|
54069
54067
|
return encoder.call(this, value, encode);
|
|
54070
54068
|
} : encode;
|
|
@@ -54083,17 +54081,15 @@ function buildURL(url2, params, options) {
|
|
|
54083
54081
|
return url2;
|
|
54084
54082
|
}
|
|
54085
54083
|
const _encode = options && options.encode || encode2;
|
|
54086
|
-
|
|
54087
|
-
options
|
|
54088
|
-
|
|
54089
|
-
|
|
54090
|
-
}
|
|
54091
|
-
const serializeFn = options && options.serialize;
|
|
54084
|
+
const _options = utils_default.isFunction(options) ? {
|
|
54085
|
+
serialize: options
|
|
54086
|
+
} : options;
|
|
54087
|
+
const serializeFn = _options && _options.serialize;
|
|
54092
54088
|
let serializedParams;
|
|
54093
54089
|
if (serializeFn) {
|
|
54094
|
-
serializedParams = serializeFn(params,
|
|
54090
|
+
serializedParams = serializeFn(params, _options);
|
|
54095
54091
|
} else {
|
|
54096
|
-
serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params,
|
|
54092
|
+
serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode);
|
|
54097
54093
|
}
|
|
54098
54094
|
if (serializedParams) {
|
|
54099
54095
|
const hashmarkIndex = url2.indexOf("#");
|
|
@@ -54115,6 +54111,7 @@ var InterceptorManager = class {
|
|
|
54115
54111
|
*
|
|
54116
54112
|
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
54117
54113
|
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
54114
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
54118
54115
|
*
|
|
54119
54116
|
* @return {Number} An ID used to remove interceptor later
|
|
54120
54117
|
*/
|
|
@@ -54173,7 +54170,8 @@ var InterceptorManager_default = InterceptorManager;
|
|
|
54173
54170
|
var transitional_default = {
|
|
54174
54171
|
silentJSONParsing: true,
|
|
54175
54172
|
forcedJSONParsing: true,
|
|
54176
|
-
clarifyTimeoutError: false
|
|
54173
|
+
clarifyTimeoutError: false,
|
|
54174
|
+
legacyInterceptorReqResOrdering: true
|
|
54177
54175
|
};
|
|
54178
54176
|
|
|
54179
54177
|
// ../../../node_modules/axios/lib/platform/node/index.js
|
|
@@ -54278,7 +54276,7 @@ function formDataToJSON(formData) {
|
|
|
54278
54276
|
name = !name && utils_default.isArray(target) ? target.length : name;
|
|
54279
54277
|
if (isLast) {
|
|
54280
54278
|
if (utils_default.hasOwnProp(target, name)) {
|
|
54281
|
-
target[name] = [target[name], value];
|
|
54279
|
+
target[name] = utils_default.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
|
|
54282
54280
|
} else {
|
|
54283
54281
|
target[name] = value;
|
|
54284
54282
|
}
|
|
@@ -54305,6 +54303,7 @@ function formDataToJSON(formData) {
|
|
|
54305
54303
|
var formDataToJSON_default = formDataToJSON;
|
|
54306
54304
|
|
|
54307
54305
|
// ../../../node_modules/axios/lib/defaults/index.js
|
|
54306
|
+
var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
|
|
54308
54307
|
function stringifySafely(rawValue, parser, encoder) {
|
|
54309
54308
|
if (utils_default.isString(rawValue)) {
|
|
54310
54309
|
try {
|
|
@@ -54321,70 +54320,77 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
54321
54320
|
var defaults = {
|
|
54322
54321
|
transitional: transitional_default,
|
|
54323
54322
|
adapter: ["xhr", "http", "fetch"],
|
|
54324
|
-
transformRequest: [
|
|
54325
|
-
|
|
54326
|
-
|
|
54327
|
-
|
|
54328
|
-
|
|
54329
|
-
|
|
54330
|
-
|
|
54331
|
-
|
|
54332
|
-
|
|
54333
|
-
|
|
54334
|
-
|
|
54335
|
-
|
|
54336
|
-
|
|
54337
|
-
|
|
54338
|
-
|
|
54339
|
-
|
|
54340
|
-
|
|
54341
|
-
|
|
54342
|
-
|
|
54343
|
-
|
|
54344
|
-
|
|
54345
|
-
|
|
54346
|
-
|
|
54347
|
-
if (
|
|
54348
|
-
|
|
54323
|
+
transformRequest: [
|
|
54324
|
+
function transformRequest(data, headers) {
|
|
54325
|
+
const contentType = headers.getContentType() || "";
|
|
54326
|
+
const hasJSONContentType = contentType.indexOf("application/json") > -1;
|
|
54327
|
+
const isObjectPayload = utils_default.isObject(data);
|
|
54328
|
+
if (isObjectPayload && utils_default.isHTMLForm(data)) {
|
|
54329
|
+
data = new FormData(data);
|
|
54330
|
+
}
|
|
54331
|
+
const isFormData2 = utils_default.isFormData(data);
|
|
54332
|
+
if (isFormData2) {
|
|
54333
|
+
return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
|
|
54334
|
+
}
|
|
54335
|
+
if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
|
|
54336
|
+
return data;
|
|
54337
|
+
}
|
|
54338
|
+
if (utils_default.isArrayBufferView(data)) {
|
|
54339
|
+
return data.buffer;
|
|
54340
|
+
}
|
|
54341
|
+
if (utils_default.isURLSearchParams(data)) {
|
|
54342
|
+
headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
|
|
54343
|
+
return data.toString();
|
|
54344
|
+
}
|
|
54345
|
+
let isFileList2;
|
|
54346
|
+
if (isObjectPayload) {
|
|
54347
|
+
const formSerializer = own(this, "formSerializer");
|
|
54348
|
+
if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
|
|
54349
|
+
return toURLEncodedForm(data, formSerializer).toString();
|
|
54350
|
+
}
|
|
54351
|
+
if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
|
|
54352
|
+
const env4 = own(this, "env");
|
|
54353
|
+
const _FormData = env4 && env4.FormData;
|
|
54354
|
+
return toFormData_default(
|
|
54355
|
+
isFileList2 ? { "files[]": data } : data,
|
|
54356
|
+
_FormData && new _FormData(),
|
|
54357
|
+
formSerializer
|
|
54358
|
+
);
|
|
54359
|
+
}
|
|
54349
54360
|
}
|
|
54350
|
-
if (
|
|
54351
|
-
|
|
54352
|
-
return
|
|
54353
|
-
isFileList2 ? { "files[]": data } : data,
|
|
54354
|
-
_FormData && new _FormData(),
|
|
54355
|
-
this.formSerializer
|
|
54356
|
-
);
|
|
54361
|
+
if (isObjectPayload || hasJSONContentType) {
|
|
54362
|
+
headers.setContentType("application/json", false);
|
|
54363
|
+
return stringifySafely(data);
|
|
54357
54364
|
}
|
|
54358
|
-
}
|
|
54359
|
-
if (isObjectPayload || hasJSONContentType) {
|
|
54360
|
-
headers.setContentType("application/json", false);
|
|
54361
|
-
return stringifySafely(data);
|
|
54362
|
-
}
|
|
54363
|
-
return data;
|
|
54364
|
-
}],
|
|
54365
|
-
transformResponse: [function transformResponse(data) {
|
|
54366
|
-
const transitional2 = this.transitional || defaults.transitional;
|
|
54367
|
-
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
54368
|
-
const JSONRequested = this.responseType === "json";
|
|
54369
|
-
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
|
|
54370
54365
|
return data;
|
|
54371
54366
|
}
|
|
54372
|
-
|
|
54373
|
-
|
|
54374
|
-
|
|
54375
|
-
|
|
54376
|
-
|
|
54377
|
-
|
|
54378
|
-
|
|
54379
|
-
|
|
54380
|
-
|
|
54367
|
+
],
|
|
54368
|
+
transformResponse: [
|
|
54369
|
+
function transformResponse(data) {
|
|
54370
|
+
const transitional2 = own(this, "transitional") || defaults.transitional;
|
|
54371
|
+
const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
|
|
54372
|
+
const responseType = own(this, "responseType");
|
|
54373
|
+
const JSONRequested = responseType === "json";
|
|
54374
|
+
if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
|
|
54375
|
+
return data;
|
|
54376
|
+
}
|
|
54377
|
+
if (data && utils_default.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
|
|
54378
|
+
const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
|
|
54379
|
+
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
54380
|
+
try {
|
|
54381
|
+
return JSON.parse(data, own(this, "parseReviver"));
|
|
54382
|
+
} catch (e) {
|
|
54383
|
+
if (strictJSONParsing) {
|
|
54384
|
+
if (e.name === "SyntaxError") {
|
|
54385
|
+
throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, own(this, "response"));
|
|
54386
|
+
}
|
|
54387
|
+
throw e;
|
|
54381
54388
|
}
|
|
54382
|
-
throw e;
|
|
54383
54389
|
}
|
|
54384
54390
|
}
|
|
54391
|
+
return data;
|
|
54385
54392
|
}
|
|
54386
|
-
|
|
54387
|
-
}],
|
|
54393
|
+
],
|
|
54388
54394
|
/**
|
|
54389
54395
|
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
54390
54396
|
* timeout is not created.
|
|
@@ -54403,7 +54409,7 @@ var defaults = {
|
|
|
54403
54409
|
},
|
|
54404
54410
|
headers: {
|
|
54405
54411
|
common: {
|
|
54406
|
-
|
|
54412
|
+
Accept: "application/json, text/plain, */*",
|
|
54407
54413
|
"Content-Type": void 0
|
|
54408
54414
|
}
|
|
54409
54415
|
}
|
|
@@ -54460,14 +54466,37 @@ var parseHeaders_default = (rawHeaders) => {
|
|
|
54460
54466
|
|
|
54461
54467
|
// ../../../node_modules/axios/lib/core/AxiosHeaders.js
|
|
54462
54468
|
var $internals = /* @__PURE__ */ Symbol("internals");
|
|
54469
|
+
var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
54470
|
+
function trimSPorHTAB(str) {
|
|
54471
|
+
let start = 0;
|
|
54472
|
+
let end = str.length;
|
|
54473
|
+
while (start < end) {
|
|
54474
|
+
const code = str.charCodeAt(start);
|
|
54475
|
+
if (code !== 9 && code !== 32) {
|
|
54476
|
+
break;
|
|
54477
|
+
}
|
|
54478
|
+
start += 1;
|
|
54479
|
+
}
|
|
54480
|
+
while (end > start) {
|
|
54481
|
+
const code = str.charCodeAt(end - 1);
|
|
54482
|
+
if (code !== 9 && code !== 32) {
|
|
54483
|
+
break;
|
|
54484
|
+
}
|
|
54485
|
+
end -= 1;
|
|
54486
|
+
}
|
|
54487
|
+
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
54488
|
+
}
|
|
54463
54489
|
function normalizeHeader(header) {
|
|
54464
54490
|
return header && String(header).trim().toLowerCase();
|
|
54465
54491
|
}
|
|
54492
|
+
function sanitizeHeaderValue(str) {
|
|
54493
|
+
return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
|
|
54494
|
+
}
|
|
54466
54495
|
function normalizeValue(value) {
|
|
54467
54496
|
if (value === false || value == null) {
|
|
54468
54497
|
return value;
|
|
54469
54498
|
}
|
|
54470
|
-
return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
54499
|
+
return utils_default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
|
|
54471
54500
|
}
|
|
54472
54501
|
function parseTokens(str) {
|
|
54473
54502
|
const tokens = /* @__PURE__ */ Object.create(null);
|
|
@@ -54662,11 +54691,11 @@ var AxiosHeaders = class {
|
|
|
54662
54691
|
accessors: {}
|
|
54663
54692
|
};
|
|
54664
54693
|
const accessors = internals.accessors;
|
|
54665
|
-
const
|
|
54694
|
+
const prototype2 = this.prototype;
|
|
54666
54695
|
function defineAccessor(_header) {
|
|
54667
54696
|
const lHeader = normalizeHeader(_header);
|
|
54668
54697
|
if (!accessors[lHeader]) {
|
|
54669
|
-
buildAccessors(
|
|
54698
|
+
buildAccessors(prototype2, _header);
|
|
54670
54699
|
accessors[lHeader] = true;
|
|
54671
54700
|
}
|
|
54672
54701
|
}
|
|
@@ -54674,7 +54703,14 @@ var AxiosHeaders = class {
|
|
|
54674
54703
|
return this;
|
|
54675
54704
|
}
|
|
54676
54705
|
};
|
|
54677
|
-
AxiosHeaders.accessor([
|
|
54706
|
+
AxiosHeaders.accessor([
|
|
54707
|
+
"Content-Type",
|
|
54708
|
+
"Content-Length",
|
|
54709
|
+
"Accept",
|
|
54710
|
+
"Accept-Encoding",
|
|
54711
|
+
"User-Agent",
|
|
54712
|
+
"Authorization"
|
|
54713
|
+
]);
|
|
54678
54714
|
utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
|
|
54679
54715
|
let mapped = key[0].toUpperCase() + key.slice(1);
|
|
54680
54716
|
return {
|
|
@@ -54706,13 +54742,22 @@ function isCancel(value) {
|
|
|
54706
54742
|
}
|
|
54707
54743
|
|
|
54708
54744
|
// ../../../node_modules/axios/lib/cancel/CanceledError.js
|
|
54709
|
-
|
|
54710
|
-
|
|
54711
|
-
|
|
54712
|
-
|
|
54713
|
-
|
|
54714
|
-
|
|
54715
|
-
}
|
|
54745
|
+
var CanceledError = class extends AxiosError_default {
|
|
54746
|
+
/**
|
|
54747
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
54748
|
+
*
|
|
54749
|
+
* @param {string=} message The message.
|
|
54750
|
+
* @param {Object=} config The config.
|
|
54751
|
+
* @param {Object=} request The request.
|
|
54752
|
+
*
|
|
54753
|
+
* @returns {CanceledError} The created error.
|
|
54754
|
+
*/
|
|
54755
|
+
constructor(message, config, request) {
|
|
54756
|
+
super(message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
|
|
54757
|
+
this.name = "CanceledError";
|
|
54758
|
+
this.__CANCEL__ = true;
|
|
54759
|
+
}
|
|
54760
|
+
};
|
|
54716
54761
|
var CanceledError_default = CanceledError;
|
|
54717
54762
|
|
|
54718
54763
|
// ../../../node_modules/axios/lib/core/settle.js
|
|
@@ -54721,18 +54766,23 @@ function settle(resolve6, reject, response) {
|
|
|
54721
54766
|
if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
|
|
54722
54767
|
resolve6(response);
|
|
54723
54768
|
} else {
|
|
54724
|
-
reject(
|
|
54725
|
-
|
|
54726
|
-
|
|
54727
|
-
|
|
54728
|
-
|
|
54729
|
-
|
|
54730
|
-
|
|
54769
|
+
reject(
|
|
54770
|
+
new AxiosError_default(
|
|
54771
|
+
"Request failed with status code " + response.status,
|
|
54772
|
+
[AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
54773
|
+
response.config,
|
|
54774
|
+
response.request,
|
|
54775
|
+
response
|
|
54776
|
+
)
|
|
54777
|
+
);
|
|
54731
54778
|
}
|
|
54732
54779
|
}
|
|
54733
54780
|
|
|
54734
54781
|
// ../../../node_modules/axios/lib/helpers/isAbsoluteURL.js
|
|
54735
54782
|
function isAbsoluteURL(url2) {
|
|
54783
|
+
if (typeof url2 !== "string") {
|
|
54784
|
+
return false;
|
|
54785
|
+
}
|
|
54736
54786
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
|
|
54737
54787
|
}
|
|
54738
54788
|
|
|
@@ -54744,23 +54794,90 @@ function combineURLs(baseURL, relativeURL) {
|
|
|
54744
54794
|
// ../../../node_modules/axios/lib/core/buildFullPath.js
|
|
54745
54795
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
54746
54796
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
54747
|
-
if (baseURL && (isRelativeUrl || allowAbsoluteUrls
|
|
54797
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
54748
54798
|
return combineURLs(baseURL, requestedURL);
|
|
54749
54799
|
}
|
|
54750
54800
|
return requestedURL;
|
|
54751
54801
|
}
|
|
54752
54802
|
|
|
54803
|
+
// ../../../node_modules/proxy-from-env/index.js
|
|
54804
|
+
var DEFAULT_PORTS = {
|
|
54805
|
+
ftp: 21,
|
|
54806
|
+
gopher: 70,
|
|
54807
|
+
http: 80,
|
|
54808
|
+
https: 443,
|
|
54809
|
+
ws: 80,
|
|
54810
|
+
wss: 443
|
|
54811
|
+
};
|
|
54812
|
+
function parseUrl(urlString) {
|
|
54813
|
+
try {
|
|
54814
|
+
return new URL(urlString);
|
|
54815
|
+
} catch {
|
|
54816
|
+
return null;
|
|
54817
|
+
}
|
|
54818
|
+
}
|
|
54819
|
+
function getProxyForUrl(url2) {
|
|
54820
|
+
var parsedUrl = (typeof url2 === "string" ? parseUrl(url2) : url2) || {};
|
|
54821
|
+
var proto4 = parsedUrl.protocol;
|
|
54822
|
+
var hostname = parsedUrl.host;
|
|
54823
|
+
var port = parsedUrl.port;
|
|
54824
|
+
if (typeof hostname !== "string" || !hostname || typeof proto4 !== "string") {
|
|
54825
|
+
return "";
|
|
54826
|
+
}
|
|
54827
|
+
proto4 = proto4.split(":", 1)[0];
|
|
54828
|
+
hostname = hostname.replace(/:\d*$/, "");
|
|
54829
|
+
port = parseInt(port) || DEFAULT_PORTS[proto4] || 0;
|
|
54830
|
+
if (!shouldProxy(hostname, port)) {
|
|
54831
|
+
return "";
|
|
54832
|
+
}
|
|
54833
|
+
var proxy = getEnv(proto4 + "_proxy") || getEnv("all_proxy");
|
|
54834
|
+
if (proxy && proxy.indexOf("://") === -1) {
|
|
54835
|
+
proxy = proto4 + "://" + proxy;
|
|
54836
|
+
}
|
|
54837
|
+
return proxy;
|
|
54838
|
+
}
|
|
54839
|
+
function shouldProxy(hostname, port) {
|
|
54840
|
+
var NO_PROXY = getEnv("no_proxy").toLowerCase();
|
|
54841
|
+
if (!NO_PROXY) {
|
|
54842
|
+
return true;
|
|
54843
|
+
}
|
|
54844
|
+
if (NO_PROXY === "*") {
|
|
54845
|
+
return false;
|
|
54846
|
+
}
|
|
54847
|
+
return NO_PROXY.split(/[,\s]/).every(function(proxy) {
|
|
54848
|
+
if (!proxy) {
|
|
54849
|
+
return true;
|
|
54850
|
+
}
|
|
54851
|
+
var parsedProxy = proxy.match(/^(.+):(\d+)$/);
|
|
54852
|
+
var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
|
|
54853
|
+
var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
|
|
54854
|
+
if (parsedProxyPort && parsedProxyPort !== port) {
|
|
54855
|
+
return true;
|
|
54856
|
+
}
|
|
54857
|
+
if (!/^[.*]/.test(parsedProxyHostname)) {
|
|
54858
|
+
return hostname !== parsedProxyHostname;
|
|
54859
|
+
}
|
|
54860
|
+
if (parsedProxyHostname.charAt(0) === "*") {
|
|
54861
|
+
parsedProxyHostname = parsedProxyHostname.slice(1);
|
|
54862
|
+
}
|
|
54863
|
+
return !hostname.endsWith(parsedProxyHostname);
|
|
54864
|
+
});
|
|
54865
|
+
}
|
|
54866
|
+
function getEnv(key) {
|
|
54867
|
+
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
54868
|
+
}
|
|
54869
|
+
|
|
54753
54870
|
// ../../../node_modules/axios/lib/adapters/http.js
|
|
54754
|
-
var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
|
|
54755
54871
|
var import_http = __toESM(require("http"), 1);
|
|
54756
54872
|
var import_https = __toESM(require("https"), 1);
|
|
54757
54873
|
var import_http2 = __toESM(require("http2"), 1);
|
|
54758
54874
|
var import_util2 = __toESM(require("util"), 1);
|
|
54875
|
+
var import_path4 = require("path");
|
|
54759
54876
|
var import_follow_redirects = __toESM(require_follow_redirects(), 1);
|
|
54760
54877
|
var import_zlib2 = __toESM(require("zlib"), 1);
|
|
54761
54878
|
|
|
54762
54879
|
// ../../../node_modules/axios/lib/env/data.js
|
|
54763
|
-
var VERSION = "1.
|
|
54880
|
+
var VERSION = "1.15.2";
|
|
54764
54881
|
|
|
54765
54882
|
// ../../../node_modules/axios/lib/helpers/parseProtocol.js
|
|
54766
54883
|
function parseProtocol(url2) {
|
|
@@ -54805,16 +54922,21 @@ var import_stream = __toESM(require("stream"), 1);
|
|
|
54805
54922
|
var kInternals = /* @__PURE__ */ Symbol("internals");
|
|
54806
54923
|
var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
54807
54924
|
constructor(options) {
|
|
54808
|
-
options = utils_default.toFlatObject(
|
|
54809
|
-
|
|
54810
|
-
|
|
54811
|
-
|
|
54812
|
-
|
|
54813
|
-
|
|
54814
|
-
|
|
54815
|
-
|
|
54816
|
-
|
|
54817
|
-
|
|
54925
|
+
options = utils_default.toFlatObject(
|
|
54926
|
+
options,
|
|
54927
|
+
{
|
|
54928
|
+
maxRate: 0,
|
|
54929
|
+
chunkSize: 64 * 1024,
|
|
54930
|
+
minChunkSize: 100,
|
|
54931
|
+
timeWindow: 500,
|
|
54932
|
+
ticksRate: 2,
|
|
54933
|
+
samplesCount: 15
|
|
54934
|
+
},
|
|
54935
|
+
null,
|
|
54936
|
+
(prop, source) => {
|
|
54937
|
+
return !utils_default.isUndefined(source[prop]);
|
|
54938
|
+
}
|
|
54939
|
+
);
|
|
54818
54940
|
super({
|
|
54819
54941
|
readableHighWaterMark: options.chunkSize
|
|
54820
54942
|
});
|
|
@@ -54897,9 +55019,12 @@ var AxiosTransformStream = class extends import_stream.default.Transform {
|
|
|
54897
55019
|
chunkRemainder = _chunk.subarray(maxChunkSize);
|
|
54898
55020
|
_chunk = _chunk.subarray(0, maxChunkSize);
|
|
54899
55021
|
}
|
|
54900
|
-
pushChunk(
|
|
54901
|
-
|
|
54902
|
-
|
|
55022
|
+
pushChunk(
|
|
55023
|
+
_chunk,
|
|
55024
|
+
chunkRemainder ? () => {
|
|
55025
|
+
process.nextTick(_callback, null, chunkRemainder);
|
|
55026
|
+
} : _callback
|
|
55027
|
+
);
|
|
54903
55028
|
};
|
|
54904
55029
|
transformChunk(chunk, function transformNextChunk(err, _chunk) {
|
|
54905
55030
|
if (err) {
|
|
@@ -54951,7 +55076,8 @@ var FormDataPart = class {
|
|
|
54951
55076
|
if (isStringValue) {
|
|
54952
55077
|
value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
|
|
54953
55078
|
} else {
|
|
54954
|
-
|
|
55079
|
+
const safeType = String(value.type || "application/octet-stream").replace(/[\r\n]/g, "");
|
|
55080
|
+
headers += `Content-Type: ${safeType}${CRLF}`;
|
|
54955
55081
|
}
|
|
54956
55082
|
this.headers = textEncoder.encode(headers + CRLF);
|
|
54957
55083
|
this.contentLength = isStringValue ? value.byteLength : value.size;
|
|
@@ -54970,11 +55096,14 @@ var FormDataPart = class {
|
|
|
54970
55096
|
yield CRLF_BYTES;
|
|
54971
55097
|
}
|
|
54972
55098
|
static escapeName(name) {
|
|
54973
|
-
return String(name).replace(
|
|
54974
|
-
|
|
54975
|
-
|
|
54976
|
-
|
|
54977
|
-
|
|
55099
|
+
return String(name).replace(
|
|
55100
|
+
/[\r\n"]/g,
|
|
55101
|
+
(match2) => ({
|
|
55102
|
+
"\r": "%0D",
|
|
55103
|
+
"\n": "%0A",
|
|
55104
|
+
'"': "%22"
|
|
55105
|
+
})[match2]
|
|
55106
|
+
);
|
|
54978
55107
|
}
|
|
54979
55108
|
};
|
|
54980
55109
|
var formDataToStream = (form, headersHandler, options) => {
|
|
@@ -55006,13 +55135,15 @@ var formDataToStream = (form, headersHandler, options) => {
|
|
|
55006
55135
|
computedHeaders["Content-Length"] = contentLength;
|
|
55007
55136
|
}
|
|
55008
55137
|
headersHandler && headersHandler(computedHeaders);
|
|
55009
|
-
return import_stream2.Readable.from(
|
|
55010
|
-
|
|
55011
|
-
|
|
55012
|
-
|
|
55013
|
-
|
|
55014
|
-
|
|
55015
|
-
|
|
55138
|
+
return import_stream2.Readable.from(
|
|
55139
|
+
(async function* () {
|
|
55140
|
+
for (const part of parts) {
|
|
55141
|
+
yield boundaryBytes;
|
|
55142
|
+
yield* part.encode();
|
|
55143
|
+
}
|
|
55144
|
+
yield footerBytes;
|
|
55145
|
+
})()
|
|
55146
|
+
);
|
|
55016
55147
|
};
|
|
55017
55148
|
var formDataToStream_default = formDataToStream;
|
|
55018
55149
|
|
|
@@ -55053,6 +55184,114 @@ var callbackify = (fn2, reducer) => {
|
|
|
55053
55184
|
};
|
|
55054
55185
|
var callbackify_default = callbackify;
|
|
55055
55186
|
|
|
55187
|
+
// ../../../node_modules/axios/lib/helpers/shouldBypassProxy.js
|
|
55188
|
+
var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
|
|
55189
|
+
var isIPv4Loopback = (host) => {
|
|
55190
|
+
const parts = host.split(".");
|
|
55191
|
+
if (parts.length !== 4) return false;
|
|
55192
|
+
if (parts[0] !== "127") return false;
|
|
55193
|
+
return parts.every((p2) => /^\d+$/.test(p2) && Number(p2) >= 0 && Number(p2) <= 255);
|
|
55194
|
+
};
|
|
55195
|
+
var isIPv6Loopback = (host) => {
|
|
55196
|
+
if (host === "::1") return true;
|
|
55197
|
+
const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
|
|
55198
|
+
if (v4MappedDotted) return isIPv4Loopback(v4MappedDotted[1]);
|
|
55199
|
+
const v4MappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);
|
|
55200
|
+
if (v4MappedHex) {
|
|
55201
|
+
const high = parseInt(v4MappedHex[1], 16);
|
|
55202
|
+
return high >= 32512 && high <= 32767;
|
|
55203
|
+
}
|
|
55204
|
+
const groups = host.split(":");
|
|
55205
|
+
if (groups.length === 8) {
|
|
55206
|
+
for (let i = 0; i < 7; i++) {
|
|
55207
|
+
if (!/^0+$/.test(groups[i])) return false;
|
|
55208
|
+
}
|
|
55209
|
+
return /^0*1$/.test(groups[7]);
|
|
55210
|
+
}
|
|
55211
|
+
return false;
|
|
55212
|
+
};
|
|
55213
|
+
var isLoopback = (host) => {
|
|
55214
|
+
if (!host) return false;
|
|
55215
|
+
if (LOOPBACK_HOSTNAMES.has(host)) return true;
|
|
55216
|
+
if (isIPv4Loopback(host)) return true;
|
|
55217
|
+
return isIPv6Loopback(host);
|
|
55218
|
+
};
|
|
55219
|
+
var DEFAULT_PORTS2 = {
|
|
55220
|
+
http: 80,
|
|
55221
|
+
https: 443,
|
|
55222
|
+
ws: 80,
|
|
55223
|
+
wss: 443,
|
|
55224
|
+
ftp: 21
|
|
55225
|
+
};
|
|
55226
|
+
var parseNoProxyEntry = (entry) => {
|
|
55227
|
+
let entryHost = entry;
|
|
55228
|
+
let entryPort = 0;
|
|
55229
|
+
if (entryHost.charAt(0) === "[") {
|
|
55230
|
+
const bracketIndex = entryHost.indexOf("]");
|
|
55231
|
+
if (bracketIndex !== -1) {
|
|
55232
|
+
const host = entryHost.slice(1, bracketIndex);
|
|
55233
|
+
const rest = entryHost.slice(bracketIndex + 1);
|
|
55234
|
+
if (rest.charAt(0) === ":" && /^\d+$/.test(rest.slice(1))) {
|
|
55235
|
+
entryPort = Number.parseInt(rest.slice(1), 10);
|
|
55236
|
+
}
|
|
55237
|
+
return [host, entryPort];
|
|
55238
|
+
}
|
|
55239
|
+
}
|
|
55240
|
+
const firstColon = entryHost.indexOf(":");
|
|
55241
|
+
const lastColon = entryHost.lastIndexOf(":");
|
|
55242
|
+
if (firstColon !== -1 && firstColon === lastColon && /^\d+$/.test(entryHost.slice(lastColon + 1))) {
|
|
55243
|
+
entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10);
|
|
55244
|
+
entryHost = entryHost.slice(0, lastColon);
|
|
55245
|
+
}
|
|
55246
|
+
return [entryHost, entryPort];
|
|
55247
|
+
};
|
|
55248
|
+
var normalizeNoProxyHost = (hostname) => {
|
|
55249
|
+
if (!hostname) {
|
|
55250
|
+
return hostname;
|
|
55251
|
+
}
|
|
55252
|
+
if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
|
|
55253
|
+
hostname = hostname.slice(1, -1);
|
|
55254
|
+
}
|
|
55255
|
+
return hostname.replace(/\.+$/, "");
|
|
55256
|
+
};
|
|
55257
|
+
function shouldBypassProxy(location) {
|
|
55258
|
+
let parsed;
|
|
55259
|
+
try {
|
|
55260
|
+
parsed = new URL(location);
|
|
55261
|
+
} catch (_err) {
|
|
55262
|
+
return false;
|
|
55263
|
+
}
|
|
55264
|
+
const noProxy = (process.env.no_proxy || process.env.NO_PROXY || "").toLowerCase();
|
|
55265
|
+
if (!noProxy) {
|
|
55266
|
+
return false;
|
|
55267
|
+
}
|
|
55268
|
+
if (noProxy === "*") {
|
|
55269
|
+
return true;
|
|
55270
|
+
}
|
|
55271
|
+
const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0;
|
|
55272
|
+
const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
|
|
55273
|
+
return noProxy.split(/[\s,]+/).some((entry) => {
|
|
55274
|
+
if (!entry) {
|
|
55275
|
+
return false;
|
|
55276
|
+
}
|
|
55277
|
+
let [entryHost, entryPort] = parseNoProxyEntry(entry);
|
|
55278
|
+
entryHost = normalizeNoProxyHost(entryHost);
|
|
55279
|
+
if (!entryHost) {
|
|
55280
|
+
return false;
|
|
55281
|
+
}
|
|
55282
|
+
if (entryPort && entryPort !== port) {
|
|
55283
|
+
return false;
|
|
55284
|
+
}
|
|
55285
|
+
if (entryHost.charAt(0) === "*") {
|
|
55286
|
+
entryHost = entryHost.slice(1);
|
|
55287
|
+
}
|
|
55288
|
+
if (entryHost.charAt(0) === ".") {
|
|
55289
|
+
return hostname.endsWith(entryHost);
|
|
55290
|
+
}
|
|
55291
|
+
return hostname === entryHost || isLoopback(hostname) && isLoopback(entryHost);
|
|
55292
|
+
});
|
|
55293
|
+
}
|
|
55294
|
+
|
|
55056
55295
|
// ../../../node_modules/axios/lib/helpers/speedometer.js
|
|
55057
55296
|
function speedometer(samplesCount, min) {
|
|
55058
55297
|
samplesCount = samplesCount || 10;
|
|
@@ -55129,19 +55368,19 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
55129
55368
|
let bytesNotified = 0;
|
|
55130
55369
|
const _speedometer = speedometer_default(50, 250);
|
|
55131
55370
|
return throttle_default((e) => {
|
|
55132
|
-
const
|
|
55371
|
+
const rawLoaded = e.loaded;
|
|
55133
55372
|
const total = e.lengthComputable ? e.total : void 0;
|
|
55134
|
-
const
|
|
55373
|
+
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
55374
|
+
const progressBytes = Math.max(0, loaded - bytesNotified);
|
|
55135
55375
|
const rate = _speedometer(progressBytes);
|
|
55136
|
-
|
|
55137
|
-
bytesNotified = loaded;
|
|
55376
|
+
bytesNotified = Math.max(bytesNotified, loaded);
|
|
55138
55377
|
const data = {
|
|
55139
55378
|
loaded,
|
|
55140
55379
|
total,
|
|
55141
55380
|
progress: total ? loaded / total : void 0,
|
|
55142
55381
|
bytes: progressBytes,
|
|
55143
55382
|
rate: rate ? rate : void 0,
|
|
55144
|
-
estimated: rate && total
|
|
55383
|
+
estimated: rate && total ? (total - loaded) / rate : void 0,
|
|
55145
55384
|
event: e,
|
|
55146
55385
|
lengthComputable: total != null,
|
|
55147
55386
|
[isDownloadStream ? "download" : "upload"]: true
|
|
@@ -55151,11 +55390,14 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
|
|
|
55151
55390
|
};
|
|
55152
55391
|
var progressEventDecorator = (total, throttled) => {
|
|
55153
55392
|
const lengthComputable = total != null;
|
|
55154
|
-
return [
|
|
55155
|
-
|
|
55156
|
-
|
|
55157
|
-
|
|
55158
|
-
|
|
55393
|
+
return [
|
|
55394
|
+
(loaded) => throttled[0]({
|
|
55395
|
+
lengthComputable,
|
|
55396
|
+
total,
|
|
55397
|
+
loaded
|
|
55398
|
+
}),
|
|
55399
|
+
throttled[1]
|
|
55400
|
+
];
|
|
55159
55401
|
};
|
|
55160
55402
|
var asyncDecorator = (fn2) => (...args) => utils_default.asap(() => fn2(...args));
|
|
55161
55403
|
|
|
@@ -55222,6 +55464,8 @@ var brotliOptions = {
|
|
|
55222
55464
|
var isBrotliSupported = utils_default.isFunction(import_zlib2.default.createBrotliDecompress);
|
|
55223
55465
|
var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
|
|
55224
55466
|
var isHttps = /https:?/;
|
|
55467
|
+
var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
|
|
55468
|
+
var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
|
|
55225
55469
|
var supportedProtocols = platform_default.protocols.map((protocol) => {
|
|
55226
55470
|
return protocol + ":";
|
|
55227
55471
|
});
|
|
@@ -55234,9 +55478,12 @@ var Http2Sessions = class {
|
|
|
55234
55478
|
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
55235
55479
|
}
|
|
55236
55480
|
getSession(authority, options) {
|
|
55237
|
-
options = Object.assign(
|
|
55238
|
-
|
|
55239
|
-
|
|
55481
|
+
options = Object.assign(
|
|
55482
|
+
{
|
|
55483
|
+
sessionTimeout: 1e3
|
|
55484
|
+
},
|
|
55485
|
+
options
|
|
55486
|
+
);
|
|
55240
55487
|
let authoritySessions = this.sessions[authority];
|
|
55241
55488
|
if (authoritySessions) {
|
|
55242
55489
|
let len = authoritySessions.length;
|
|
@@ -55262,6 +55509,9 @@ var Http2Sessions = class {
|
|
|
55262
55509
|
} else {
|
|
55263
55510
|
entries.splice(i, 1);
|
|
55264
55511
|
}
|
|
55512
|
+
if (!session.closed) {
|
|
55513
|
+
session.close();
|
|
55514
|
+
}
|
|
55265
55515
|
return;
|
|
55266
55516
|
}
|
|
55267
55517
|
}
|
|
@@ -55290,10 +55540,7 @@ var Http2Sessions = class {
|
|
|
55290
55540
|
};
|
|
55291
55541
|
}
|
|
55292
55542
|
session.once("close", removeSession);
|
|
55293
|
-
let entry = [
|
|
55294
|
-
session,
|
|
55295
|
-
options
|
|
55296
|
-
];
|
|
55543
|
+
let entry = [session, options];
|
|
55297
55544
|
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
55298
55545
|
return session;
|
|
55299
55546
|
}
|
|
@@ -55310,9 +55557,11 @@ function dispatchBeforeRedirect(options, responseDetails) {
|
|
|
55310
55557
|
function setProxy(options, configProxy, location) {
|
|
55311
55558
|
let proxy = configProxy;
|
|
55312
55559
|
if (!proxy && proxy !== false) {
|
|
55313
|
-
const proxyUrl =
|
|
55560
|
+
const proxyUrl = getProxyForUrl(location);
|
|
55314
55561
|
if (proxyUrl) {
|
|
55315
|
-
|
|
55562
|
+
if (!shouldBypassProxy(location)) {
|
|
55563
|
+
proxy = new URL(proxyUrl);
|
|
55564
|
+
}
|
|
55316
55565
|
}
|
|
55317
55566
|
}
|
|
55318
55567
|
if (proxy) {
|
|
@@ -55320,8 +55569,11 @@ function setProxy(options, configProxy, location) {
|
|
|
55320
55569
|
proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
|
|
55321
55570
|
}
|
|
55322
55571
|
if (proxy.auth) {
|
|
55323
|
-
|
|
55572
|
+
const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password);
|
|
55573
|
+
if (validProxyAuth) {
|
|
55324
55574
|
proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
|
|
55575
|
+
} else if (typeof proxy.auth === "object") {
|
|
55576
|
+
throw new AxiosError_default("Invalid proxy authorization", AxiosError_default.ERR_BAD_OPTION, { proxy });
|
|
55325
55577
|
}
|
|
55326
55578
|
const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
|
|
55327
55579
|
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
@@ -55373,15 +55625,10 @@ var resolveFamily = ({ address, family }) => {
|
|
|
55373
55625
|
var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
|
|
55374
55626
|
var http2Transport = {
|
|
55375
55627
|
request(options, cb) {
|
|
55376
|
-
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
|
|
55628
|
+
const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
|
|
55377
55629
|
const { http2Options, headers } = options;
|
|
55378
55630
|
const session = http2Sessions.getSession(authority, http2Options);
|
|
55379
|
-
const {
|
|
55380
|
-
HTTP2_HEADER_SCHEME,
|
|
55381
|
-
HTTP2_HEADER_METHOD,
|
|
55382
|
-
HTTP2_HEADER_PATH,
|
|
55383
|
-
HTTP2_HEADER_STATUS
|
|
55384
|
-
} = import_http2.default.constants;
|
|
55631
|
+
const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = import_http2.default.constants;
|
|
55385
55632
|
const http2Headers = {
|
|
55386
55633
|
[HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
|
|
55387
55634
|
[HTTP2_HEADER_METHOD]: options.method,
|
|
@@ -55405,8 +55652,15 @@ var http2Transport = {
|
|
|
55405
55652
|
};
|
|
55406
55653
|
var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
55407
55654
|
return wrapAsync(async function dispatchHttpRequest(resolve6, reject, onDone) {
|
|
55408
|
-
|
|
55409
|
-
|
|
55655
|
+
const own2 = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
|
|
55656
|
+
let data = own2("data");
|
|
55657
|
+
let lookup = own2("lookup");
|
|
55658
|
+
let family = own2("family");
|
|
55659
|
+
let httpVersion = own2("httpVersion");
|
|
55660
|
+
if (httpVersion === void 0) httpVersion = 1;
|
|
55661
|
+
let http2Options = own2("http2Options");
|
|
55662
|
+
const responseType = own2("responseType");
|
|
55663
|
+
const responseEncoding = own2("responseEncoding");
|
|
55410
55664
|
const method = config.method.toUpperCase();
|
|
55411
55665
|
let isDone;
|
|
55412
55666
|
let rejected = false;
|
|
@@ -55434,7 +55688,10 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55434
55688
|
const abortEmitter = new import_events3.EventEmitter();
|
|
55435
55689
|
function abort(reason) {
|
|
55436
55690
|
try {
|
|
55437
|
-
abortEmitter.emit(
|
|
55691
|
+
abortEmitter.emit(
|
|
55692
|
+
"abort",
|
|
55693
|
+
!reason || reason.type ? new CanceledError_default(null, config, req) : reason
|
|
55694
|
+
);
|
|
55438
55695
|
} catch (err) {
|
|
55439
55696
|
console.warn("emit error", err);
|
|
55440
55697
|
}
|
|
@@ -55480,11 +55737,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55480
55737
|
const dataUrl = String(config.url || fullPath || "");
|
|
55481
55738
|
const estimated = estimateDataURLDecodedBytes(dataUrl);
|
|
55482
55739
|
if (estimated > config.maxContentLength) {
|
|
55483
|
-
return reject(
|
|
55484
|
-
|
|
55485
|
-
|
|
55486
|
-
|
|
55487
|
-
|
|
55740
|
+
return reject(
|
|
55741
|
+
new AxiosError_default(
|
|
55742
|
+
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
55743
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
55744
|
+
config
|
|
55745
|
+
)
|
|
55746
|
+
);
|
|
55488
55747
|
}
|
|
55489
55748
|
}
|
|
55490
55749
|
let convertedData;
|
|
@@ -55520,11 +55779,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55520
55779
|
});
|
|
55521
55780
|
}
|
|
55522
55781
|
if (supportedProtocols.indexOf(protocol) === -1) {
|
|
55523
|
-
return reject(
|
|
55524
|
-
"Unsupported protocol " + protocol,
|
|
55525
|
-
|
|
55526
|
-
config
|
|
55527
|
-
));
|
|
55782
|
+
return reject(
|
|
55783
|
+
new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_BAD_REQUEST, config)
|
|
55784
|
+
);
|
|
55528
55785
|
}
|
|
55529
55786
|
const headers = AxiosHeaders_default.from(config.headers).normalize();
|
|
55530
55787
|
headers.set("User-Agent", "axios/" + VERSION, false);
|
|
@@ -55534,13 +55791,17 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55534
55791
|
let maxDownloadRate = void 0;
|
|
55535
55792
|
if (utils_default.isSpecCompliantForm(data)) {
|
|
55536
55793
|
const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
|
|
55537
|
-
data = formDataToStream_default(
|
|
55538
|
-
|
|
55539
|
-
|
|
55540
|
-
|
|
55541
|
-
|
|
55542
|
-
|
|
55543
|
-
|
|
55794
|
+
data = formDataToStream_default(
|
|
55795
|
+
data,
|
|
55796
|
+
(formHeaders) => {
|
|
55797
|
+
headers.set(formHeaders);
|
|
55798
|
+
},
|
|
55799
|
+
{
|
|
55800
|
+
tag: `axios-${VERSION}-boundary`,
|
|
55801
|
+
boundary: userBoundary && userBoundary[1] || void 0
|
|
55802
|
+
}
|
|
55803
|
+
);
|
|
55804
|
+
} else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
|
|
55544
55805
|
headers.set(data.getHeaders());
|
|
55545
55806
|
if (!headers.hasContentLength()) {
|
|
55546
55807
|
try {
|
|
@@ -55560,19 +55821,23 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55560
55821
|
} else if (utils_default.isString(data)) {
|
|
55561
55822
|
data = Buffer.from(data, "utf-8");
|
|
55562
55823
|
} else {
|
|
55563
|
-
return reject(
|
|
55564
|
-
|
|
55565
|
-
|
|
55566
|
-
|
|
55567
|
-
|
|
55824
|
+
return reject(
|
|
55825
|
+
new AxiosError_default(
|
|
55826
|
+
"Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
|
|
55827
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
55828
|
+
config
|
|
55829
|
+
)
|
|
55830
|
+
);
|
|
55568
55831
|
}
|
|
55569
55832
|
headers.setContentLength(data.length, false);
|
|
55570
55833
|
if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
|
|
55571
|
-
return reject(
|
|
55572
|
-
|
|
55573
|
-
|
|
55574
|
-
|
|
55575
|
-
|
|
55834
|
+
return reject(
|
|
55835
|
+
new AxiosError_default(
|
|
55836
|
+
"Request body larger than maxBodyLength limit",
|
|
55837
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
55838
|
+
config
|
|
55839
|
+
)
|
|
55840
|
+
);
|
|
55576
55841
|
}
|
|
55577
55842
|
}
|
|
55578
55843
|
const contentLength = utils_default.toFiniteNumber(headers.getContentLength());
|
|
@@ -55586,21 +55851,31 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55586
55851
|
if (!utils_default.isStream(data)) {
|
|
55587
55852
|
data = import_stream4.default.Readable.from(data, { objectMode: false });
|
|
55588
55853
|
}
|
|
55589
|
-
data = import_stream4.default.pipeline(
|
|
55590
|
-
|
|
55591
|
-
|
|
55592
|
-
|
|
55593
|
-
|
|
55594
|
-
|
|
55595
|
-
|
|
55596
|
-
|
|
55854
|
+
data = import_stream4.default.pipeline(
|
|
55855
|
+
[
|
|
55856
|
+
data,
|
|
55857
|
+
new AxiosTransformStream_default({
|
|
55858
|
+
maxRate: utils_default.toFiniteNumber(maxUploadRate)
|
|
55859
|
+
})
|
|
55860
|
+
],
|
|
55861
|
+
utils_default.noop
|
|
55862
|
+
);
|
|
55863
|
+
onUploadProgress && data.on(
|
|
55864
|
+
"progress",
|
|
55865
|
+
flushOnFinish(
|
|
55866
|
+
data,
|
|
55867
|
+
progressEventDecorator(
|
|
55868
|
+
contentLength,
|
|
55869
|
+
progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
|
|
55870
|
+
)
|
|
55597
55871
|
)
|
|
55598
|
-
)
|
|
55872
|
+
);
|
|
55599
55873
|
}
|
|
55600
55874
|
let auth = void 0;
|
|
55601
|
-
|
|
55602
|
-
|
|
55603
|
-
const
|
|
55875
|
+
const configAuth = own2("auth");
|
|
55876
|
+
if (configAuth) {
|
|
55877
|
+
const username = configAuth.username || "";
|
|
55878
|
+
const password = configAuth.password || "";
|
|
55604
55879
|
auth = username + ":" + password;
|
|
55605
55880
|
}
|
|
55606
55881
|
if (!auth && parsed.username) {
|
|
@@ -55628,7 +55903,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55628
55903
|
"gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""),
|
|
55629
55904
|
false
|
|
55630
55905
|
);
|
|
55631
|
-
const options = {
|
|
55906
|
+
const options = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
55632
55907
|
path: path3,
|
|
55633
55908
|
method,
|
|
55634
55909
|
headers: headers.toJSON(),
|
|
@@ -55637,16 +55912,41 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55637
55912
|
protocol,
|
|
55638
55913
|
family,
|
|
55639
55914
|
beforeRedirect: dispatchBeforeRedirect,
|
|
55640
|
-
beforeRedirects:
|
|
55915
|
+
beforeRedirects: /* @__PURE__ */ Object.create(null),
|
|
55641
55916
|
http2Options
|
|
55642
|
-
};
|
|
55917
|
+
});
|
|
55643
55918
|
!utils_default.isUndefined(lookup) && (options.lookup = lookup);
|
|
55644
55919
|
if (config.socketPath) {
|
|
55920
|
+
if (typeof config.socketPath !== "string") {
|
|
55921
|
+
return reject(new AxiosError_default(
|
|
55922
|
+
"socketPath must be a string",
|
|
55923
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
55924
|
+
config
|
|
55925
|
+
));
|
|
55926
|
+
}
|
|
55927
|
+
if (config.allowedSocketPaths != null) {
|
|
55928
|
+
const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
|
|
55929
|
+
const resolvedSocket = (0, import_path4.resolve)(config.socketPath);
|
|
55930
|
+
const isAllowed = allowed.some(
|
|
55931
|
+
(entry) => typeof entry === "string" && (0, import_path4.resolve)(entry) === resolvedSocket
|
|
55932
|
+
);
|
|
55933
|
+
if (!isAllowed) {
|
|
55934
|
+
return reject(new AxiosError_default(
|
|
55935
|
+
`socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`,
|
|
55936
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
55937
|
+
config
|
|
55938
|
+
));
|
|
55939
|
+
}
|
|
55940
|
+
}
|
|
55645
55941
|
options.socketPath = config.socketPath;
|
|
55646
55942
|
} else {
|
|
55647
55943
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
55648
55944
|
options.port = parsed.port;
|
|
55649
|
-
setProxy(
|
|
55945
|
+
setProxy(
|
|
55946
|
+
options,
|
|
55947
|
+
config.proxy,
|
|
55948
|
+
protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path
|
|
55949
|
+
);
|
|
55650
55950
|
}
|
|
55651
55951
|
let transport;
|
|
55652
55952
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
@@ -55654,16 +55954,18 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55654
55954
|
if (isHttp2) {
|
|
55655
55955
|
transport = http2Transport;
|
|
55656
55956
|
} else {
|
|
55657
|
-
|
|
55658
|
-
|
|
55957
|
+
const configTransport = own2("transport");
|
|
55958
|
+
if (configTransport) {
|
|
55959
|
+
transport = configTransport;
|
|
55659
55960
|
} else if (config.maxRedirects === 0) {
|
|
55660
55961
|
transport = isHttpsRequest ? import_https.default : import_http.default;
|
|
55661
55962
|
} else {
|
|
55662
55963
|
if (config.maxRedirects) {
|
|
55663
55964
|
options.maxRedirects = config.maxRedirects;
|
|
55664
55965
|
}
|
|
55665
|
-
|
|
55666
|
-
|
|
55966
|
+
const configBeforeRedirect = own2("beforeRedirect");
|
|
55967
|
+
if (configBeforeRedirect) {
|
|
55968
|
+
options.beforeRedirects.config = configBeforeRedirect;
|
|
55667
55969
|
}
|
|
55668
55970
|
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
55669
55971
|
}
|
|
@@ -55673,9 +55975,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55673
55975
|
} else {
|
|
55674
55976
|
options.maxBodyLength = Infinity;
|
|
55675
55977
|
}
|
|
55676
|
-
|
|
55677
|
-
options.insecureHTTPParser = config.insecureHTTPParser;
|
|
55678
|
-
}
|
|
55978
|
+
options.insecureHTTPParser = Boolean(own2("insecureHTTPParser"));
|
|
55679
55979
|
req = transport.request(options, function handleResponse(res) {
|
|
55680
55980
|
if (req.destroyed) return;
|
|
55681
55981
|
const streams = [res];
|
|
@@ -55684,13 +55984,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55684
55984
|
const transformStream = new AxiosTransformStream_default({
|
|
55685
55985
|
maxRate: utils_default.toFiniteNumber(maxDownloadRate)
|
|
55686
55986
|
});
|
|
55687
|
-
onDownloadProgress && transformStream.on(
|
|
55688
|
-
|
|
55689
|
-
|
|
55690
|
-
|
|
55691
|
-
|
|
55987
|
+
onDownloadProgress && transformStream.on(
|
|
55988
|
+
"progress",
|
|
55989
|
+
flushOnFinish(
|
|
55990
|
+
transformStream,
|
|
55991
|
+
progressEventDecorator(
|
|
55992
|
+
responseLength,
|
|
55993
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
|
|
55994
|
+
)
|
|
55692
55995
|
)
|
|
55693
|
-
)
|
|
55996
|
+
);
|
|
55694
55997
|
streams.push(transformStream);
|
|
55695
55998
|
}
|
|
55696
55999
|
let responseStream = res;
|
|
@@ -55729,6 +56032,28 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55729
56032
|
request: lastRequest
|
|
55730
56033
|
};
|
|
55731
56034
|
if (responseType === "stream") {
|
|
56035
|
+
if (config.maxContentLength > -1) {
|
|
56036
|
+
const limit = config.maxContentLength;
|
|
56037
|
+
const source = responseStream;
|
|
56038
|
+
async function* enforceMaxContentLength() {
|
|
56039
|
+
let totalResponseBytes = 0;
|
|
56040
|
+
for await (const chunk of source) {
|
|
56041
|
+
totalResponseBytes += chunk.length;
|
|
56042
|
+
if (totalResponseBytes > limit) {
|
|
56043
|
+
throw new AxiosError_default(
|
|
56044
|
+
"maxContentLength size of " + limit + " exceeded",
|
|
56045
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
56046
|
+
config,
|
|
56047
|
+
lastRequest
|
|
56048
|
+
);
|
|
56049
|
+
}
|
|
56050
|
+
yield chunk;
|
|
56051
|
+
}
|
|
56052
|
+
}
|
|
56053
|
+
responseStream = import_stream4.default.Readable.from(enforceMaxContentLength(), {
|
|
56054
|
+
objectMode: false
|
|
56055
|
+
});
|
|
56056
|
+
}
|
|
55732
56057
|
response.data = responseStream;
|
|
55733
56058
|
settle(resolve6, reject, response);
|
|
55734
56059
|
} else {
|
|
@@ -55740,12 +56065,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55740
56065
|
if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
|
|
55741
56066
|
rejected = true;
|
|
55742
56067
|
responseStream.destroy();
|
|
55743
|
-
abort(
|
|
55744
|
-
|
|
55745
|
-
|
|
55746
|
-
|
|
55747
|
-
|
|
55748
|
-
|
|
56068
|
+
abort(
|
|
56069
|
+
new AxiosError_default(
|
|
56070
|
+
"maxContentLength size of " + config.maxContentLength + " exceeded",
|
|
56071
|
+
AxiosError_default.ERR_BAD_RESPONSE,
|
|
56072
|
+
config,
|
|
56073
|
+
lastRequest
|
|
56074
|
+
)
|
|
56075
|
+
);
|
|
55749
56076
|
}
|
|
55750
56077
|
});
|
|
55751
56078
|
responseStream.on("aborted", function handlerStreamAborted() {
|
|
@@ -55800,16 +56127,33 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55800
56127
|
});
|
|
55801
56128
|
req.on("socket", function handleRequestSocket(socket) {
|
|
55802
56129
|
socket.setKeepAlive(true, 1e3 * 60);
|
|
56130
|
+
if (!socket[kAxiosSocketListener]) {
|
|
56131
|
+
socket.on("error", function handleSocketError(err) {
|
|
56132
|
+
const current = socket[kAxiosCurrentReq];
|
|
56133
|
+
if (current && !current.destroyed) {
|
|
56134
|
+
current.destroy(err);
|
|
56135
|
+
}
|
|
56136
|
+
});
|
|
56137
|
+
socket[kAxiosSocketListener] = true;
|
|
56138
|
+
}
|
|
56139
|
+
socket[kAxiosCurrentReq] = req;
|
|
56140
|
+
req.once("close", function clearCurrentReq() {
|
|
56141
|
+
if (socket[kAxiosCurrentReq] === req) {
|
|
56142
|
+
socket[kAxiosCurrentReq] = null;
|
|
56143
|
+
}
|
|
56144
|
+
});
|
|
55803
56145
|
});
|
|
55804
56146
|
if (config.timeout) {
|
|
55805
56147
|
const timeout2 = parseInt(config.timeout, 10);
|
|
55806
56148
|
if (Number.isNaN(timeout2)) {
|
|
55807
|
-
abort(
|
|
55808
|
-
|
|
55809
|
-
|
|
55810
|
-
|
|
55811
|
-
|
|
55812
|
-
|
|
56149
|
+
abort(
|
|
56150
|
+
new AxiosError_default(
|
|
56151
|
+
"error trying to parse `config.timeout` to int",
|
|
56152
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE,
|
|
56153
|
+
config,
|
|
56154
|
+
req
|
|
56155
|
+
)
|
|
56156
|
+
);
|
|
55813
56157
|
return;
|
|
55814
56158
|
}
|
|
55815
56159
|
req.setTimeout(timeout2, function handleRequestTimeout() {
|
|
@@ -55819,12 +56163,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55819
56163
|
if (config.timeoutErrorMessage) {
|
|
55820
56164
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
55821
56165
|
}
|
|
55822
|
-
abort(
|
|
55823
|
-
|
|
55824
|
-
|
|
55825
|
-
|
|
55826
|
-
|
|
55827
|
-
|
|
56166
|
+
abort(
|
|
56167
|
+
new AxiosError_default(
|
|
56168
|
+
timeoutErrorMessage,
|
|
56169
|
+
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
56170
|
+
config,
|
|
56171
|
+
req
|
|
56172
|
+
)
|
|
56173
|
+
);
|
|
55828
56174
|
});
|
|
55829
56175
|
} else {
|
|
55830
56176
|
req.setTimeout(0);
|
|
@@ -55844,7 +56190,37 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
55844
56190
|
abort(new CanceledError_default("Request stream has been aborted", config, req));
|
|
55845
56191
|
}
|
|
55846
56192
|
});
|
|
55847
|
-
data
|
|
56193
|
+
let uploadStream = data;
|
|
56194
|
+
if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
|
|
56195
|
+
const limit = config.maxBodyLength;
|
|
56196
|
+
let bytesSent = 0;
|
|
56197
|
+
uploadStream = import_stream4.default.pipeline(
|
|
56198
|
+
[
|
|
56199
|
+
data,
|
|
56200
|
+
new import_stream4.default.Transform({
|
|
56201
|
+
transform(chunk, _enc, cb) {
|
|
56202
|
+
bytesSent += chunk.length;
|
|
56203
|
+
if (bytesSent > limit) {
|
|
56204
|
+
return cb(
|
|
56205
|
+
new AxiosError_default(
|
|
56206
|
+
"Request body larger than maxBodyLength limit",
|
|
56207
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
56208
|
+
config,
|
|
56209
|
+
req
|
|
56210
|
+
)
|
|
56211
|
+
);
|
|
56212
|
+
}
|
|
56213
|
+
cb(null, chunk);
|
|
56214
|
+
}
|
|
56215
|
+
})
|
|
56216
|
+
],
|
|
56217
|
+
utils_default.noop
|
|
56218
|
+
);
|
|
56219
|
+
uploadStream.on("error", (err) => {
|
|
56220
|
+
if (!req.destroyed) req.destroy(err);
|
|
56221
|
+
});
|
|
56222
|
+
}
|
|
56223
|
+
uploadStream.pipe(req);
|
|
55848
56224
|
} else {
|
|
55849
56225
|
data && req.write(data);
|
|
55850
56226
|
req.end();
|
|
@@ -55911,7 +56287,13 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
|
|
|
55911
56287
|
var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
|
|
55912
56288
|
function mergeConfig(config1, config2) {
|
|
55913
56289
|
config2 = config2 || {};
|
|
55914
|
-
const config =
|
|
56290
|
+
const config = /* @__PURE__ */ Object.create(null);
|
|
56291
|
+
Object.defineProperty(config, "hasOwnProperty", {
|
|
56292
|
+
value: Object.prototype.hasOwnProperty,
|
|
56293
|
+
enumerable: false,
|
|
56294
|
+
writable: true,
|
|
56295
|
+
configurable: true
|
|
56296
|
+
});
|
|
55915
56297
|
function getMergedValue(target, source, prop, caseless) {
|
|
55916
56298
|
if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
|
|
55917
56299
|
return utils_default.merge.call({ caseless }, target, source);
|
|
@@ -55942,9 +56324,9 @@ function mergeConfig(config1, config2) {
|
|
|
55942
56324
|
}
|
|
55943
56325
|
}
|
|
55944
56326
|
function mergeDirectKeys(a, b2, prop) {
|
|
55945
|
-
if (prop
|
|
56327
|
+
if (utils_default.hasOwnProp(config2, prop)) {
|
|
55946
56328
|
return getMergedValue(a, b2);
|
|
55947
|
-
} else if (prop
|
|
56329
|
+
} else if (utils_default.hasOwnProp(config1, prop)) {
|
|
55948
56330
|
return getMergedValue(void 0, a);
|
|
55949
56331
|
}
|
|
55950
56332
|
}
|
|
@@ -55975,13 +56357,17 @@ function mergeConfig(config1, config2) {
|
|
|
55975
56357
|
httpsAgent: defaultToConfig2,
|
|
55976
56358
|
cancelToken: defaultToConfig2,
|
|
55977
56359
|
socketPath: defaultToConfig2,
|
|
56360
|
+
allowedSocketPaths: defaultToConfig2,
|
|
55978
56361
|
responseEncoding: defaultToConfig2,
|
|
55979
56362
|
validateStatus: mergeDirectKeys,
|
|
55980
56363
|
headers: (a, b2, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b2), prop, true)
|
|
55981
56364
|
};
|
|
55982
56365
|
utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
|
55983
|
-
|
|
55984
|
-
const
|
|
56366
|
+
if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
|
|
56367
|
+
const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
|
|
56368
|
+
const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0;
|
|
56369
|
+
const b2 = utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0;
|
|
56370
|
+
const configValue = merge2(a, b2, prop);
|
|
55985
56371
|
utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
55986
56372
|
});
|
|
55987
56373
|
return config;
|
|
@@ -55990,13 +56376,28 @@ function mergeConfig(config1, config2) {
|
|
|
55990
56376
|
// ../../../node_modules/axios/lib/helpers/resolveConfig.js
|
|
55991
56377
|
var resolveConfig_default = (config) => {
|
|
55992
56378
|
const newConfig = mergeConfig({}, config);
|
|
55993
|
-
|
|
56379
|
+
const own2 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
|
|
56380
|
+
const data = own2("data");
|
|
56381
|
+
let withXSRFToken = own2("withXSRFToken");
|
|
56382
|
+
const xsrfHeaderName = own2("xsrfHeaderName");
|
|
56383
|
+
const xsrfCookieName = own2("xsrfCookieName");
|
|
56384
|
+
let headers = own2("headers");
|
|
56385
|
+
const auth = own2("auth");
|
|
56386
|
+
const baseURL = own2("baseURL");
|
|
56387
|
+
const allowAbsoluteUrls = own2("allowAbsoluteUrls");
|
|
56388
|
+
const url2 = own2("url");
|
|
55994
56389
|
newConfig.headers = headers = AxiosHeaders_default.from(headers);
|
|
55995
|
-
newConfig.url = buildURL(
|
|
56390
|
+
newConfig.url = buildURL(
|
|
56391
|
+
buildFullPath(baseURL, url2, allowAbsoluteUrls),
|
|
56392
|
+
config.params,
|
|
56393
|
+
config.paramsSerializer
|
|
56394
|
+
);
|
|
55996
56395
|
if (auth) {
|
|
55997
56396
|
headers.set(
|
|
55998
56397
|
"Authorization",
|
|
55999
|
-
"Basic " + btoa(
|
|
56398
|
+
"Basic " + btoa(
|
|
56399
|
+
(auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")
|
|
56400
|
+
)
|
|
56000
56401
|
);
|
|
56001
56402
|
}
|
|
56002
56403
|
if (utils_default.isFormData(data)) {
|
|
@@ -56013,8 +56414,11 @@ var resolveConfig_default = (config) => {
|
|
|
56013
56414
|
}
|
|
56014
56415
|
}
|
|
56015
56416
|
if (platform_default.hasStandardBrowserEnv) {
|
|
56016
|
-
|
|
56017
|
-
|
|
56417
|
+
if (utils_default.isFunction(withXSRFToken)) {
|
|
56418
|
+
withXSRFToken = withXSRFToken(newConfig);
|
|
56419
|
+
}
|
|
56420
|
+
const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin_default(newConfig.url);
|
|
56421
|
+
if (shouldSendXSRF) {
|
|
56018
56422
|
const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
|
|
56019
56423
|
if (xsrfValue) {
|
|
56020
56424
|
headers.set(xsrfHeaderName, xsrfValue);
|
|
@@ -56060,13 +56464,17 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
56060
56464
|
config,
|
|
56061
56465
|
request
|
|
56062
56466
|
};
|
|
56063
|
-
settle(
|
|
56064
|
-
|
|
56065
|
-
|
|
56066
|
-
|
|
56067
|
-
|
|
56068
|
-
|
|
56069
|
-
|
|
56467
|
+
settle(
|
|
56468
|
+
function _resolve(value) {
|
|
56469
|
+
resolve6(value);
|
|
56470
|
+
done();
|
|
56471
|
+
},
|
|
56472
|
+
function _reject(err) {
|
|
56473
|
+
reject(err);
|
|
56474
|
+
done();
|
|
56475
|
+
},
|
|
56476
|
+
response
|
|
56477
|
+
);
|
|
56070
56478
|
request = null;
|
|
56071
56479
|
}
|
|
56072
56480
|
if ("onloadend" in request) {
|
|
@@ -56102,12 +56510,14 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
56102
56510
|
if (_config.timeoutErrorMessage) {
|
|
56103
56511
|
timeoutErrorMessage = _config.timeoutErrorMessage;
|
|
56104
56512
|
}
|
|
56105
|
-
reject(
|
|
56106
|
-
|
|
56107
|
-
|
|
56108
|
-
|
|
56109
|
-
|
|
56110
|
-
|
|
56513
|
+
reject(
|
|
56514
|
+
new AxiosError_default(
|
|
56515
|
+
timeoutErrorMessage,
|
|
56516
|
+
transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
|
|
56517
|
+
config,
|
|
56518
|
+
request
|
|
56519
|
+
)
|
|
56520
|
+
);
|
|
56111
56521
|
request = null;
|
|
56112
56522
|
};
|
|
56113
56523
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
@@ -56147,7 +56557,13 @@ var xhr_default = isXHRAdapterSupported && function(config) {
|
|
|
56147
56557
|
}
|
|
56148
56558
|
const protocol = parseProtocol(_config.url);
|
|
56149
56559
|
if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
|
|
56150
|
-
reject(
|
|
56560
|
+
reject(
|
|
56561
|
+
new AxiosError_default(
|
|
56562
|
+
"Unsupported protocol " + protocol + ":",
|
|
56563
|
+
AxiosError_default.ERR_BAD_REQUEST,
|
|
56564
|
+
config
|
|
56565
|
+
)
|
|
56566
|
+
);
|
|
56151
56567
|
return;
|
|
56152
56568
|
}
|
|
56153
56569
|
request.send(requestData || null);
|
|
@@ -56165,12 +56581,14 @@ var composeSignals = (signals3, timeout2) => {
|
|
|
56165
56581
|
aborted = true;
|
|
56166
56582
|
unsubscribe();
|
|
56167
56583
|
const err = reason instanceof Error ? reason : this.reason;
|
|
56168
|
-
controller.abort(
|
|
56584
|
+
controller.abort(
|
|
56585
|
+
err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)
|
|
56586
|
+
);
|
|
56169
56587
|
}
|
|
56170
56588
|
};
|
|
56171
56589
|
let timer = timeout2 && setTimeout(() => {
|
|
56172
56590
|
timer = null;
|
|
56173
|
-
onabort(new AxiosError_default(`timeout ${timeout2}
|
|
56591
|
+
onabort(new AxiosError_default(`timeout of ${timeout2}ms exceeded`, AxiosError_default.ETIMEDOUT));
|
|
56174
56592
|
}, timeout2);
|
|
56175
56593
|
const unsubscribe = () => {
|
|
56176
56594
|
if (signals3) {
|
|
@@ -56238,33 +56656,36 @@ var trackStream = (stream5, chunkSize, onProgress, onFinish) => {
|
|
|
56238
56656
|
onFinish && onFinish(e);
|
|
56239
56657
|
}
|
|
56240
56658
|
};
|
|
56241
|
-
return new ReadableStream(
|
|
56242
|
-
|
|
56243
|
-
|
|
56244
|
-
|
|
56245
|
-
|
|
56246
|
-
|
|
56247
|
-
|
|
56248
|
-
|
|
56249
|
-
|
|
56250
|
-
|
|
56251
|
-
|
|
56252
|
-
|
|
56253
|
-
|
|
56659
|
+
return new ReadableStream(
|
|
56660
|
+
{
|
|
56661
|
+
async pull(controller) {
|
|
56662
|
+
try {
|
|
56663
|
+
const { done: done2, value } = await iterator2.next();
|
|
56664
|
+
if (done2) {
|
|
56665
|
+
_onFinish();
|
|
56666
|
+
controller.close();
|
|
56667
|
+
return;
|
|
56668
|
+
}
|
|
56669
|
+
let len = value.byteLength;
|
|
56670
|
+
if (onProgress) {
|
|
56671
|
+
let loadedBytes = bytes += len;
|
|
56672
|
+
onProgress(loadedBytes);
|
|
56673
|
+
}
|
|
56674
|
+
controller.enqueue(new Uint8Array(value));
|
|
56675
|
+
} catch (err) {
|
|
56676
|
+
_onFinish(err);
|
|
56677
|
+
throw err;
|
|
56254
56678
|
}
|
|
56255
|
-
|
|
56256
|
-
|
|
56257
|
-
_onFinish(
|
|
56258
|
-
|
|
56679
|
+
},
|
|
56680
|
+
cancel(reason) {
|
|
56681
|
+
_onFinish(reason);
|
|
56682
|
+
return iterator2.return();
|
|
56259
56683
|
}
|
|
56260
56684
|
},
|
|
56261
|
-
|
|
56262
|
-
|
|
56263
|
-
return iterator2.return();
|
|
56685
|
+
{
|
|
56686
|
+
highWaterMark: 2
|
|
56264
56687
|
}
|
|
56265
|
-
|
|
56266
|
-
highWaterMark: 2
|
|
56267
|
-
});
|
|
56688
|
+
);
|
|
56268
56689
|
};
|
|
56269
56690
|
|
|
56270
56691
|
// ../../../node_modules/axios/lib/adapters/fetch.js
|
|
@@ -56274,10 +56695,7 @@ var globalFetchAPI = (({ Request, Response }) => ({
|
|
|
56274
56695
|
Request,
|
|
56275
56696
|
Response
|
|
56276
56697
|
}))(utils_default.global);
|
|
56277
|
-
var {
|
|
56278
|
-
ReadableStream: ReadableStream2,
|
|
56279
|
-
TextEncoder: TextEncoder2
|
|
56280
|
-
} = utils_default.global;
|
|
56698
|
+
var { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global;
|
|
56281
56699
|
var test = (fn2, ...args) => {
|
|
56282
56700
|
try {
|
|
56283
56701
|
return !!fn2(...args);
|
|
@@ -56286,9 +56704,13 @@ var test = (fn2, ...args) => {
|
|
|
56286
56704
|
}
|
|
56287
56705
|
};
|
|
56288
56706
|
var factory = (env4) => {
|
|
56289
|
-
env4 = utils_default.merge.call(
|
|
56290
|
-
|
|
56291
|
-
|
|
56707
|
+
env4 = utils_default.merge.call(
|
|
56708
|
+
{
|
|
56709
|
+
skipUndefined: true
|
|
56710
|
+
},
|
|
56711
|
+
globalFetchAPI,
|
|
56712
|
+
env4
|
|
56713
|
+
);
|
|
56292
56714
|
const { fetch: envFetch, Request, Response } = env4;
|
|
56293
56715
|
const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
|
|
56294
56716
|
const isRequestSupported = isFunction2(Request);
|
|
@@ -56300,14 +56722,18 @@ var factory = (env4) => {
|
|
|
56300
56722
|
const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
56301
56723
|
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
56302
56724
|
let duplexAccessed = false;
|
|
56303
|
-
const
|
|
56725
|
+
const request = new Request(platform_default.origin, {
|
|
56304
56726
|
body: new ReadableStream2(),
|
|
56305
56727
|
method: "POST",
|
|
56306
56728
|
get duplex() {
|
|
56307
56729
|
duplexAccessed = true;
|
|
56308
56730
|
return "half";
|
|
56309
56731
|
}
|
|
56310
|
-
})
|
|
56732
|
+
});
|
|
56733
|
+
const hasContentType = request.headers.has("Content-Type");
|
|
56734
|
+
if (request.body != null) {
|
|
56735
|
+
request.body.cancel();
|
|
56736
|
+
}
|
|
56311
56737
|
return duplexAccessed && !hasContentType;
|
|
56312
56738
|
});
|
|
56313
56739
|
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
|
|
@@ -56321,7 +56747,11 @@ var factory = (env4) => {
|
|
|
56321
56747
|
if (method) {
|
|
56322
56748
|
return method.call(res);
|
|
56323
56749
|
}
|
|
56324
|
-
throw new AxiosError_default(
|
|
56750
|
+
throw new AxiosError_default(
|
|
56751
|
+
`Response type '${type}' is not supported`,
|
|
56752
|
+
AxiosError_default.ERR_NOT_SUPPORT,
|
|
56753
|
+
config
|
|
56754
|
+
);
|
|
56325
56755
|
});
|
|
56326
56756
|
});
|
|
56327
56757
|
})();
|
|
@@ -56370,7 +56800,10 @@ var factory = (env4) => {
|
|
|
56370
56800
|
} = resolveConfig_default(config);
|
|
56371
56801
|
let _fetch = envFetch || fetch;
|
|
56372
56802
|
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
56373
|
-
let composedSignal = composeSignals_default(
|
|
56803
|
+
let composedSignal = composeSignals_default(
|
|
56804
|
+
[signal, cancelToken && cancelToken.toAbortSignal()],
|
|
56805
|
+
timeout2
|
|
56806
|
+
);
|
|
56374
56807
|
let request = null;
|
|
56375
56808
|
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
56376
56809
|
composedSignal.unsubscribe();
|
|
@@ -56399,6 +56832,12 @@ var factory = (env4) => {
|
|
|
56399
56832
|
withCredentials = withCredentials ? "include" : "omit";
|
|
56400
56833
|
}
|
|
56401
56834
|
const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
|
|
56835
|
+
if (utils_default.isFormData(data)) {
|
|
56836
|
+
const contentType = headers.getContentType();
|
|
56837
|
+
if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) {
|
|
56838
|
+
headers.delete("content-type");
|
|
56839
|
+
}
|
|
56840
|
+
}
|
|
56402
56841
|
const resolvedOptions = {
|
|
56403
56842
|
...fetchOptions,
|
|
56404
56843
|
signal: composedSignal,
|
|
@@ -56430,7 +56869,10 @@ var factory = (env4) => {
|
|
|
56430
56869
|
);
|
|
56431
56870
|
}
|
|
56432
56871
|
responseType = responseType || "text";
|
|
56433
|
-
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](
|
|
56872
|
+
let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](
|
|
56873
|
+
response,
|
|
56874
|
+
config
|
|
56875
|
+
);
|
|
56434
56876
|
!isStreamResponse && unsubscribe && unsubscribe();
|
|
56435
56877
|
return await new Promise((resolve6, reject) => {
|
|
56436
56878
|
settle(resolve6, reject, {
|
|
@@ -56446,13 +56888,19 @@ var factory = (env4) => {
|
|
|
56446
56888
|
unsubscribe && unsubscribe();
|
|
56447
56889
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
56448
56890
|
throw Object.assign(
|
|
56449
|
-
new AxiosError_default(
|
|
56891
|
+
new AxiosError_default(
|
|
56892
|
+
"Network Error",
|
|
56893
|
+
AxiosError_default.ERR_NETWORK,
|
|
56894
|
+
config,
|
|
56895
|
+
request,
|
|
56896
|
+
err && err.response
|
|
56897
|
+
),
|
|
56450
56898
|
{
|
|
56451
56899
|
cause: err.cause || err
|
|
56452
56900
|
}
|
|
56453
56901
|
);
|
|
56454
56902
|
}
|
|
56455
|
-
throw AxiosError_default.from(err, err && err.code, config, request);
|
|
56903
|
+
throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
|
|
56456
56904
|
}
|
|
56457
56905
|
};
|
|
56458
56906
|
};
|
|
@@ -56460,11 +56908,7 @@ var seedCache = /* @__PURE__ */ new Map();
|
|
|
56460
56908
|
var getFetch = (config) => {
|
|
56461
56909
|
let env4 = config && config.env || {};
|
|
56462
56910
|
const { fetch: fetch2, Request, Response } = env4;
|
|
56463
|
-
const seeds = [
|
|
56464
|
-
Request,
|
|
56465
|
-
Response,
|
|
56466
|
-
fetch2
|
|
56467
|
-
];
|
|
56911
|
+
const seeds = [Request, Response, fetch2];
|
|
56468
56912
|
let len = seeds.length, i = len, seed, target, map = seedCache;
|
|
56469
56913
|
while (i--) {
|
|
56470
56914
|
seed = seeds[i];
|
|
@@ -56553,37 +56997,33 @@ function throwIfCancellationRequested(config) {
|
|
|
56553
56997
|
function dispatchRequest(config) {
|
|
56554
56998
|
throwIfCancellationRequested(config);
|
|
56555
56999
|
config.headers = AxiosHeaders_default.from(config.headers);
|
|
56556
|
-
config.data = transformData.call(
|
|
56557
|
-
config,
|
|
56558
|
-
config.transformRequest
|
|
56559
|
-
);
|
|
57000
|
+
config.data = transformData.call(config, config.transformRequest);
|
|
56560
57001
|
if (["post", "put", "patch"].indexOf(config.method) !== -1) {
|
|
56561
57002
|
config.headers.setContentType("application/x-www-form-urlencoded", false);
|
|
56562
57003
|
}
|
|
56563
57004
|
const adapter2 = adapters_default.getAdapter(config.adapter || defaults_default.adapter, config);
|
|
56564
|
-
return adapter2(config).then(
|
|
56565
|
-
|
|
56566
|
-
response.data = transformData.call(
|
|
56567
|
-
config,
|
|
56568
|
-
config.transformResponse,
|
|
56569
|
-
response
|
|
56570
|
-
);
|
|
56571
|
-
response.headers = AxiosHeaders_default.from(response.headers);
|
|
56572
|
-
return response;
|
|
56573
|
-
}, function onAdapterRejection(reason) {
|
|
56574
|
-
if (!isCancel(reason)) {
|
|
57005
|
+
return adapter2(config).then(
|
|
57006
|
+
function onAdapterResolution(response) {
|
|
56575
57007
|
throwIfCancellationRequested(config);
|
|
56576
|
-
|
|
56577
|
-
|
|
56578
|
-
|
|
56579
|
-
|
|
56580
|
-
|
|
56581
|
-
|
|
56582
|
-
|
|
57008
|
+
response.data = transformData.call(config, config.transformResponse, response);
|
|
57009
|
+
response.headers = AxiosHeaders_default.from(response.headers);
|
|
57010
|
+
return response;
|
|
57011
|
+
},
|
|
57012
|
+
function onAdapterRejection(reason) {
|
|
57013
|
+
if (!isCancel(reason)) {
|
|
57014
|
+
throwIfCancellationRequested(config);
|
|
57015
|
+
if (reason && reason.response) {
|
|
57016
|
+
reason.response.data = transformData.call(
|
|
57017
|
+
config,
|
|
57018
|
+
config.transformResponse,
|
|
57019
|
+
reason.response
|
|
57020
|
+
);
|
|
57021
|
+
reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
|
|
57022
|
+
}
|
|
56583
57023
|
}
|
|
57024
|
+
return Promise.reject(reason);
|
|
56584
57025
|
}
|
|
56585
|
-
|
|
56586
|
-
});
|
|
57026
|
+
);
|
|
56587
57027
|
}
|
|
56588
57028
|
|
|
56589
57029
|
// ../../../node_modules/axios/lib/helpers/validator.js
|
|
@@ -56631,12 +57071,15 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
56631
57071
|
let i = keys.length;
|
|
56632
57072
|
while (i-- > 0) {
|
|
56633
57073
|
const opt = keys[i];
|
|
56634
|
-
const validator = schema[opt];
|
|
57074
|
+
const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0;
|
|
56635
57075
|
if (validator) {
|
|
56636
57076
|
const value = options[opt];
|
|
56637
57077
|
const result = value === void 0 || validator(value, opt, options);
|
|
56638
57078
|
if (result !== true) {
|
|
56639
|
-
throw new AxiosError_default(
|
|
57079
|
+
throw new AxiosError_default(
|
|
57080
|
+
"option " + opt + " must be " + result,
|
|
57081
|
+
AxiosError_default.ERR_BAD_OPTION_VALUE
|
|
57082
|
+
);
|
|
56640
57083
|
}
|
|
56641
57084
|
continue;
|
|
56642
57085
|
}
|
|
@@ -56675,12 +57118,23 @@ var Axios = class {
|
|
|
56675
57118
|
if (err instanceof Error) {
|
|
56676
57119
|
let dummy = {};
|
|
56677
57120
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
56678
|
-
const stack =
|
|
57121
|
+
const stack = (() => {
|
|
57122
|
+
if (!dummy.stack) {
|
|
57123
|
+
return "";
|
|
57124
|
+
}
|
|
57125
|
+
const firstNewlineIndex = dummy.stack.indexOf("\n");
|
|
57126
|
+
return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
|
|
57127
|
+
})();
|
|
56679
57128
|
try {
|
|
56680
57129
|
if (!err.stack) {
|
|
56681
57130
|
err.stack = stack;
|
|
56682
|
-
} else if (stack
|
|
56683
|
-
|
|
57131
|
+
} else if (stack) {
|
|
57132
|
+
const firstNewlineIndex = stack.indexOf("\n");
|
|
57133
|
+
const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
|
|
57134
|
+
const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
|
|
57135
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
57136
|
+
err.stack += "\n" + stack;
|
|
57137
|
+
}
|
|
56684
57138
|
}
|
|
56685
57139
|
} catch (e) {
|
|
56686
57140
|
}
|
|
@@ -56698,11 +57152,16 @@ var Axios = class {
|
|
|
56698
57152
|
config = mergeConfig(this.defaults, config);
|
|
56699
57153
|
const { transitional: transitional2, paramsSerializer, headers } = config;
|
|
56700
57154
|
if (transitional2 !== void 0) {
|
|
56701
|
-
validator_default.assertOptions(
|
|
56702
|
-
|
|
56703
|
-
|
|
56704
|
-
|
|
56705
|
-
|
|
57155
|
+
validator_default.assertOptions(
|
|
57156
|
+
transitional2,
|
|
57157
|
+
{
|
|
57158
|
+
silentJSONParsing: validators2.transitional(validators2.boolean),
|
|
57159
|
+
forcedJSONParsing: validators2.transitional(validators2.boolean),
|
|
57160
|
+
clarifyTimeoutError: validators2.transitional(validators2.boolean),
|
|
57161
|
+
legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
|
|
57162
|
+
},
|
|
57163
|
+
false
|
|
57164
|
+
);
|
|
56706
57165
|
}
|
|
56707
57166
|
if (paramsSerializer != null) {
|
|
56708
57167
|
if (utils_default.isFunction(paramsSerializer)) {
|
|
@@ -56710,10 +57169,14 @@ var Axios = class {
|
|
|
56710
57169
|
serialize: paramsSerializer
|
|
56711
57170
|
};
|
|
56712
57171
|
} else {
|
|
56713
|
-
validator_default.assertOptions(
|
|
56714
|
-
|
|
56715
|
-
|
|
56716
|
-
|
|
57172
|
+
validator_default.assertOptions(
|
|
57173
|
+
paramsSerializer,
|
|
57174
|
+
{
|
|
57175
|
+
encode: validators2.function,
|
|
57176
|
+
serialize: validators2.function
|
|
57177
|
+
},
|
|
57178
|
+
true
|
|
57179
|
+
);
|
|
56717
57180
|
}
|
|
56718
57181
|
}
|
|
56719
57182
|
if (config.allowAbsoluteUrls !== void 0) {
|
|
@@ -56722,21 +57185,19 @@ var Axios = class {
|
|
|
56722
57185
|
} else {
|
|
56723
57186
|
config.allowAbsoluteUrls = true;
|
|
56724
57187
|
}
|
|
56725
|
-
validator_default.assertOptions(
|
|
56726
|
-
|
|
56727
|
-
|
|
56728
|
-
|
|
56729
|
-
|
|
56730
|
-
|
|
56731
|
-
|
|
56732
|
-
headers[config.method]
|
|
56733
|
-
);
|
|
56734
|
-
headers && utils_default.forEach(
|
|
56735
|
-
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
56736
|
-
(method) => {
|
|
56737
|
-
delete headers[method];
|
|
56738
|
-
}
|
|
57188
|
+
validator_default.assertOptions(
|
|
57189
|
+
config,
|
|
57190
|
+
{
|
|
57191
|
+
baseUrl: validators2.spelling("baseURL"),
|
|
57192
|
+
withXsrfToken: validators2.spelling("withXSRFToken")
|
|
57193
|
+
},
|
|
57194
|
+
true
|
|
56739
57195
|
);
|
|
57196
|
+
config.method = (config.method || this.defaults.method || "get").toLowerCase();
|
|
57197
|
+
let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
|
|
57198
|
+
headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
|
|
57199
|
+
delete headers[method];
|
|
57200
|
+
});
|
|
56740
57201
|
config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
|
|
56741
57202
|
const requestInterceptorChain = [];
|
|
56742
57203
|
let synchronousRequestInterceptors = true;
|
|
@@ -56745,7 +57206,13 @@ var Axios = class {
|
|
|
56745
57206
|
return;
|
|
56746
57207
|
}
|
|
56747
57208
|
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
|
|
56748
|
-
|
|
57209
|
+
const transitional3 = config.transitional || transitional_default;
|
|
57210
|
+
const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering;
|
|
57211
|
+
if (legacyInterceptorReqResOrdering) {
|
|
57212
|
+
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
|
|
57213
|
+
} else {
|
|
57214
|
+
requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
|
|
57215
|
+
}
|
|
56749
57216
|
});
|
|
56750
57217
|
const responseInterceptorChain = [];
|
|
56751
57218
|
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
|
@@ -56797,24 +57264,28 @@ var Axios = class {
|
|
|
56797
57264
|
};
|
|
56798
57265
|
utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
|
|
56799
57266
|
Axios.prototype[method] = function(url2, config) {
|
|
56800
|
-
return this.request(
|
|
56801
|
-
|
|
56802
|
-
|
|
56803
|
-
|
|
56804
|
-
|
|
57267
|
+
return this.request(
|
|
57268
|
+
mergeConfig(config || {}, {
|
|
57269
|
+
method,
|
|
57270
|
+
url: url2,
|
|
57271
|
+
data: (config || {}).data
|
|
57272
|
+
})
|
|
57273
|
+
);
|
|
56805
57274
|
};
|
|
56806
57275
|
});
|
|
56807
57276
|
utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
|
|
56808
57277
|
function generateHTTPMethod(isForm) {
|
|
56809
57278
|
return function httpMethod(url2, data, config) {
|
|
56810
|
-
return this.request(
|
|
56811
|
-
|
|
56812
|
-
|
|
56813
|
-
|
|
56814
|
-
|
|
56815
|
-
|
|
56816
|
-
|
|
56817
|
-
|
|
57279
|
+
return this.request(
|
|
57280
|
+
mergeConfig(config || {}, {
|
|
57281
|
+
method,
|
|
57282
|
+
headers: isForm ? {
|
|
57283
|
+
"Content-Type": "multipart/form-data"
|
|
57284
|
+
} : {},
|
|
57285
|
+
url: url2,
|
|
57286
|
+
data
|
|
57287
|
+
})
|
|
57288
|
+
);
|
|
56818
57289
|
};
|
|
56819
57290
|
}
|
|
56820
57291
|
Axios.prototype[method] = generateHTTPMethod();
|
|
@@ -68842,7 +69313,7 @@ var optArg = (opt = {}) => optArgT(opt);
|
|
|
68842
69313
|
var optArgSync = (opt = {}) => optArgT(opt);
|
|
68843
69314
|
|
|
68844
69315
|
// ../../../node_modules/rimraf/dist/esm/path-arg.js
|
|
68845
|
-
var
|
|
69316
|
+
var import_path5 = require("path");
|
|
68846
69317
|
var import_util3 = require("util");
|
|
68847
69318
|
var pathArg = (path3, opt = {}) => {
|
|
68848
69319
|
const type = typeof path3;
|
|
@@ -68862,8 +69333,8 @@ var pathArg = (path3, opt = {}) => {
|
|
|
68862
69333
|
code: "ERR_INVALID_ARG_VALUE"
|
|
68863
69334
|
});
|
|
68864
69335
|
}
|
|
68865
|
-
path3 = (0,
|
|
68866
|
-
const { root } = (0,
|
|
69336
|
+
path3 = (0, import_path5.resolve)(path3);
|
|
69337
|
+
const { root } = (0, import_path5.parse)(path3);
|
|
68867
69338
|
if (path3 === root && opt.preserveRoot !== false) {
|
|
68868
69339
|
const msg = "refusing to remove root directory without preserveRoot:false";
|
|
68869
69340
|
throw Object.assign(new Error(msg), {
|
|
@@ -68873,7 +69344,7 @@ var pathArg = (path3, opt = {}) => {
|
|
|
68873
69344
|
}
|
|
68874
69345
|
if (process.platform === "win32") {
|
|
68875
69346
|
const badWinChars = /[*|"<>?:]/;
|
|
68876
|
-
const { root: root2 } = (0,
|
|
69347
|
+
const { root: root2 } = (0, import_path5.parse)(path3);
|
|
68877
69348
|
if (badWinChars.test(path3.substring(root2.length))) {
|
|
68878
69349
|
throw Object.assign(new Error("Illegal characters in path."), {
|
|
68879
69350
|
path: path3,
|
|
@@ -68903,7 +69374,7 @@ var promises = {
|
|
|
68903
69374
|
};
|
|
68904
69375
|
|
|
68905
69376
|
// ../../../node_modules/rimraf/dist/esm/rimraf-posix.js
|
|
68906
|
-
var
|
|
69377
|
+
var import_path6 = require("path");
|
|
68907
69378
|
|
|
68908
69379
|
// ../../../node_modules/rimraf/dist/esm/readdir-or-error.js
|
|
68909
69380
|
var { readdir: readdir2 } = promises;
|
|
@@ -68968,11 +69439,11 @@ var rimrafPosixDir = async (path3, opt, ent) => {
|
|
|
68968
69439
|
await ignoreENOENT(unlink(path3));
|
|
68969
69440
|
return true;
|
|
68970
69441
|
}
|
|
68971
|
-
const removedAll = (await Promise.all(entries.map((ent2) => rimrafPosixDir((0,
|
|
69442
|
+
const removedAll = (await Promise.all(entries.map((ent2) => rimrafPosixDir((0, import_path6.resolve)(path3, ent2.name), opt, ent2)))).every((v2) => v2 === true);
|
|
68972
69443
|
if (!removedAll) {
|
|
68973
69444
|
return false;
|
|
68974
69445
|
}
|
|
68975
|
-
if (opt.preserveRoot === false && path3 === (0,
|
|
69446
|
+
if (opt.preserveRoot === false && path3 === (0, import_path6.parse)(path3).root) {
|
|
68976
69447
|
return false;
|
|
68977
69448
|
}
|
|
68978
69449
|
if (opt.filter && !await opt.filter(path3, ent)) {
|
|
@@ -69001,10 +69472,10 @@ var rimrafPosixDirSync = (path3, opt, ent) => {
|
|
|
69001
69472
|
}
|
|
69002
69473
|
let removedAll = true;
|
|
69003
69474
|
for (const ent2 of entries) {
|
|
69004
|
-
const p2 = (0,
|
|
69475
|
+
const p2 = (0, import_path6.resolve)(path3, ent2.name);
|
|
69005
69476
|
removedAll = rimrafPosixDirSync(p2, opt, ent2) && removedAll;
|
|
69006
69477
|
}
|
|
69007
|
-
if (opt.preserveRoot === false && path3 === (0,
|
|
69478
|
+
if (opt.preserveRoot === false && path3 === (0, import_path6.parse)(path3).root) {
|
|
69008
69479
|
return false;
|
|
69009
69480
|
}
|
|
69010
69481
|
if (!removedAll) {
|
|
@@ -69018,7 +69489,7 @@ var rimrafPosixDirSync = (path3, opt, ent) => {
|
|
|
69018
69489
|
};
|
|
69019
69490
|
|
|
69020
69491
|
// ../../../node_modules/rimraf/dist/esm/rimraf-windows.js
|
|
69021
|
-
var
|
|
69492
|
+
var import_path9 = require("path");
|
|
69022
69493
|
|
|
69023
69494
|
// ../../../node_modules/rimraf/dist/esm/fix-eperm.js
|
|
69024
69495
|
var { chmod } = promises;
|
|
@@ -69103,11 +69574,11 @@ var retryBusySync = (fn2) => {
|
|
|
69103
69574
|
};
|
|
69104
69575
|
|
|
69105
69576
|
// ../../../node_modules/rimraf/dist/esm/rimraf-move-remove.js
|
|
69106
|
-
var
|
|
69577
|
+
var import_path8 = require("path");
|
|
69107
69578
|
|
|
69108
69579
|
// ../../../node_modules/rimraf/dist/esm/default-tmp.js
|
|
69109
69580
|
var import_os = require("os");
|
|
69110
|
-
var
|
|
69581
|
+
var import_path7 = require("path");
|
|
69111
69582
|
var { stat } = promises;
|
|
69112
69583
|
var isDirSync = (path3) => {
|
|
69113
69584
|
try {
|
|
@@ -69118,26 +69589,26 @@ var isDirSync = (path3) => {
|
|
|
69118
69589
|
};
|
|
69119
69590
|
var isDir = (path3) => stat(path3).then((st2) => st2.isDirectory(), () => false);
|
|
69120
69591
|
var win32DefaultTmp = async (path3) => {
|
|
69121
|
-
const { root } = (0,
|
|
69592
|
+
const { root } = (0, import_path7.parse)(path3);
|
|
69122
69593
|
const tmp = (0, import_os.tmpdir)();
|
|
69123
|
-
const { root: tmpRoot } = (0,
|
|
69594
|
+
const { root: tmpRoot } = (0, import_path7.parse)(tmp);
|
|
69124
69595
|
if (root.toLowerCase() === tmpRoot.toLowerCase()) {
|
|
69125
69596
|
return tmp;
|
|
69126
69597
|
}
|
|
69127
|
-
const driveTmp = (0,
|
|
69598
|
+
const driveTmp = (0, import_path7.resolve)(root, "/temp");
|
|
69128
69599
|
if (await isDir(driveTmp)) {
|
|
69129
69600
|
return driveTmp;
|
|
69130
69601
|
}
|
|
69131
69602
|
return root;
|
|
69132
69603
|
};
|
|
69133
69604
|
var win32DefaultTmpSync = (path3) => {
|
|
69134
|
-
const { root } = (0,
|
|
69605
|
+
const { root } = (0, import_path7.parse)(path3);
|
|
69135
69606
|
const tmp = (0, import_os.tmpdir)();
|
|
69136
|
-
const { root: tmpRoot } = (0,
|
|
69607
|
+
const { root: tmpRoot } = (0, import_path7.parse)(tmp);
|
|
69137
69608
|
if (root.toLowerCase() === tmpRoot.toLowerCase()) {
|
|
69138
69609
|
return tmp;
|
|
69139
69610
|
}
|
|
69140
|
-
const driveTmp = (0,
|
|
69611
|
+
const driveTmp = (0, import_path7.resolve)(root, "/temp");
|
|
69141
69612
|
if (isDirSync(driveTmp)) {
|
|
69142
69613
|
return driveTmp;
|
|
69143
69614
|
}
|
|
@@ -69150,7 +69621,7 @@ var defaultTmpSync = process.platform === "win32" ? win32DefaultTmpSync : posixD
|
|
|
69150
69621
|
|
|
69151
69622
|
// ../../../node_modules/rimraf/dist/esm/rimraf-move-remove.js
|
|
69152
69623
|
var { lstat: lstat3, rename, unlink: unlink2, rmdir: rmdir2 } = promises;
|
|
69153
|
-
var uniqueFilename = (path3) => `.${(0,
|
|
69624
|
+
var uniqueFilename = (path3) => `.${(0, import_path8.basename)(path3)}.${Math.random()}`;
|
|
69154
69625
|
var unlinkFixEPERM = fixEPERM(unlink2);
|
|
69155
69626
|
var unlinkFixEPERMSync = fixEPERMSync(import_fs8.unlinkSync);
|
|
69156
69627
|
var rimrafMoveRemove = async (path3, opt) => {
|
|
@@ -69162,7 +69633,7 @@ var rimrafMoveRemoveDir = async (path3, opt, ent) => {
|
|
|
69162
69633
|
if (!opt.tmp) {
|
|
69163
69634
|
return rimrafMoveRemoveDir(path3, { ...opt, tmp: await defaultTmp(path3) }, ent);
|
|
69164
69635
|
}
|
|
69165
|
-
if (path3 === opt.tmp && (0,
|
|
69636
|
+
if (path3 === opt.tmp && (0, import_path8.parse)(path3).root !== path3) {
|
|
69166
69637
|
throw new Error("cannot delete temp directory used for deletion");
|
|
69167
69638
|
}
|
|
69168
69639
|
const entries = ent.isDirectory() ? await readdirOrError(path3) : null;
|
|
@@ -69181,11 +69652,11 @@ var rimrafMoveRemoveDir = async (path3, opt, ent) => {
|
|
|
69181
69652
|
await ignoreENOENT(tmpUnlink(path3, opt.tmp, unlinkFixEPERM));
|
|
69182
69653
|
return true;
|
|
69183
69654
|
}
|
|
69184
|
-
const removedAll = (await Promise.all(entries.map((ent2) => rimrafMoveRemoveDir((0,
|
|
69655
|
+
const removedAll = (await Promise.all(entries.map((ent2) => rimrafMoveRemoveDir((0, import_path8.resolve)(path3, ent2.name), opt, ent2)))).every((v2) => v2 === true);
|
|
69185
69656
|
if (!removedAll) {
|
|
69186
69657
|
return false;
|
|
69187
69658
|
}
|
|
69188
|
-
if (opt.preserveRoot === false && path3 === (0,
|
|
69659
|
+
if (opt.preserveRoot === false && path3 === (0, import_path8.parse)(path3).root) {
|
|
69189
69660
|
return false;
|
|
69190
69661
|
}
|
|
69191
69662
|
if (opt.filter && !await opt.filter(path3, ent)) {
|
|
@@ -69195,7 +69666,7 @@ var rimrafMoveRemoveDir = async (path3, opt, ent) => {
|
|
|
69195
69666
|
return true;
|
|
69196
69667
|
};
|
|
69197
69668
|
var tmpUnlink = async (path3, tmp, rm2) => {
|
|
69198
|
-
const tmpFile = (0,
|
|
69669
|
+
const tmpFile = (0, import_path8.resolve)(tmp, uniqueFilename(path3));
|
|
69199
69670
|
await rename(path3, tmpFile);
|
|
69200
69671
|
return await rm2(tmpFile);
|
|
69201
69672
|
};
|
|
@@ -69209,7 +69680,7 @@ var rimrafMoveRemoveDirSync = (path3, opt, ent) => {
|
|
|
69209
69680
|
return rimrafMoveRemoveDirSync(path3, { ...opt, tmp: defaultTmpSync(path3) }, ent);
|
|
69210
69681
|
}
|
|
69211
69682
|
const tmp = opt.tmp;
|
|
69212
|
-
if (path3 === opt.tmp && (0,
|
|
69683
|
+
if (path3 === opt.tmp && (0, import_path8.parse)(path3).root !== path3) {
|
|
69213
69684
|
throw new Error("cannot delete temp directory used for deletion");
|
|
69214
69685
|
}
|
|
69215
69686
|
const entries = ent.isDirectory() ? readdirOrErrorSync(path3) : null;
|
|
@@ -69230,13 +69701,13 @@ var rimrafMoveRemoveDirSync = (path3, opt, ent) => {
|
|
|
69230
69701
|
}
|
|
69231
69702
|
let removedAll = true;
|
|
69232
69703
|
for (const ent2 of entries) {
|
|
69233
|
-
const p2 = (0,
|
|
69704
|
+
const p2 = (0, import_path8.resolve)(path3, ent2.name);
|
|
69234
69705
|
removedAll = rimrafMoveRemoveDirSync(p2, opt, ent2) && removedAll;
|
|
69235
69706
|
}
|
|
69236
69707
|
if (!removedAll) {
|
|
69237
69708
|
return false;
|
|
69238
69709
|
}
|
|
69239
|
-
if (opt.preserveRoot === false && path3 === (0,
|
|
69710
|
+
if (opt.preserveRoot === false && path3 === (0, import_path8.parse)(path3).root) {
|
|
69240
69711
|
return false;
|
|
69241
69712
|
}
|
|
69242
69713
|
if (opt.filter && !opt.filter(path3, ent)) {
|
|
@@ -69246,7 +69717,7 @@ var rimrafMoveRemoveDirSync = (path3, opt, ent) => {
|
|
|
69246
69717
|
return true;
|
|
69247
69718
|
};
|
|
69248
69719
|
var tmpUnlinkSync = (path3, tmp, rmSync2) => {
|
|
69249
|
-
const tmpFile = (0,
|
|
69720
|
+
const tmpFile = (0, import_path8.resolve)(tmp, uniqueFilename(path3));
|
|
69250
69721
|
(0, import_fs8.renameSync)(path3, tmpFile);
|
|
69251
69722
|
return rmSync2(tmpFile);
|
|
69252
69723
|
};
|
|
@@ -69311,11 +69782,11 @@ var rimrafWindowsDir = async (path3, opt, ent, state = START) => {
|
|
|
69311
69782
|
return true;
|
|
69312
69783
|
}
|
|
69313
69784
|
const s3 = state === START ? CHILD : state;
|
|
69314
|
-
const removedAll = (await Promise.all(entries.map((ent2) => rimrafWindowsDir((0,
|
|
69785
|
+
const removedAll = (await Promise.all(entries.map((ent2) => rimrafWindowsDir((0, import_path9.resolve)(path3, ent2.name), opt, ent2, s3)))).every((v2) => v2 === true);
|
|
69315
69786
|
if (state === START) {
|
|
69316
69787
|
return rimrafWindowsDir(path3, opt, ent, FINISH);
|
|
69317
69788
|
} else if (state === FINISH) {
|
|
69318
|
-
if (opt.preserveRoot === false && path3 === (0,
|
|
69789
|
+
if (opt.preserveRoot === false && path3 === (0, import_path9.parse)(path3).root) {
|
|
69319
69790
|
return false;
|
|
69320
69791
|
}
|
|
69321
69792
|
if (!removedAll) {
|
|
@@ -69348,13 +69819,13 @@ var rimrafWindowsDirSync = (path3, opt, ent, state = START) => {
|
|
|
69348
69819
|
let removedAll = true;
|
|
69349
69820
|
for (const ent2 of entries) {
|
|
69350
69821
|
const s3 = state === START ? CHILD : state;
|
|
69351
|
-
const p2 = (0,
|
|
69822
|
+
const p2 = (0, import_path9.resolve)(path3, ent2.name);
|
|
69352
69823
|
removedAll = rimrafWindowsDirSync(p2, opt, ent2, s3) && removedAll;
|
|
69353
69824
|
}
|
|
69354
69825
|
if (state === START) {
|
|
69355
69826
|
return rimrafWindowsDirSync(path3, opt, ent, FINISH);
|
|
69356
69827
|
} else if (state === FINISH) {
|
|
69357
|
-
if (opt.preserveRoot === false && path3 === (0,
|
|
69828
|
+
if (opt.preserveRoot === false && path3 === (0, import_path9.parse)(path3).root) {
|
|
69358
69829
|
return false;
|
|
69359
69830
|
}
|
|
69360
69831
|
if (!removedAll) {
|