publish-microfrontend 1.10.3 → 1.11.0-beta.efd8b71

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.
Files changed (2) hide show
  1. package/lib/index.js +1029 -558
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -20433,7 +20433,7 @@ var require_form_data = __commonJS({
20433
20433
  var path = require("path");
20434
20434
  var http3 = require("http");
20435
20435
  var https2 = require("https");
20436
- var parseUrl = require("url").parse;
20436
+ var parseUrl2 = require("url").parse;
20437
20437
  var fs = require("fs");
20438
20438
  var Stream = require("stream").Stream;
20439
20439
  var crypto2 = require("crypto");
@@ -20686,7 +20686,7 @@ var require_form_data = __commonJS({
20686
20686
  var options;
20687
20687
  var defaults2 = { method: "post" };
20688
20688
  if (typeof params === "string") {
20689
- params = parseUrl(params);
20689
+ params = parseUrl2(params);
20690
20690
  options = populate({
20691
20691
  port: params.port,
20692
20692
  path: params.pathname,
@@ -20738,81 +20738,11 @@ var require_form_data = __commonJS({
20738
20738
  FormData4.prototype.toString = function() {
20739
20739
  return "[object FormData]";
20740
20740
  };
20741
- setToStringTag(FormData4, "FormData");
20741
+ setToStringTag(FormData4.prototype, "FormData");
20742
20742
  module2.exports = FormData4;
20743
20743
  }
20744
20744
  });
20745
20745
 
20746
- // ../../../node_modules/proxy-from-env/index.js
20747
- var require_proxy_from_env = __commonJS({
20748
- "../../../node_modules/proxy-from-env/index.js"(exports2) {
20749
- "use strict";
20750
- var parseUrl = require("url").parse;
20751
- var DEFAULT_PORTS = {
20752
- ftp: 21,
20753
- gopher: 70,
20754
- http: 80,
20755
- https: 443,
20756
- ws: 80,
20757
- wss: 443
20758
- };
20759
- var stringEndsWith = String.prototype.endsWith || function(s) {
20760
- return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
20761
- };
20762
- function getProxyForUrl(url2) {
20763
- var parsedUrl = typeof url2 === "string" ? parseUrl(url2) : url2 || {};
20764
- var proto3 = parsedUrl.protocol;
20765
- var hostname = parsedUrl.host;
20766
- var port = parsedUrl.port;
20767
- if (typeof hostname !== "string" || !hostname || typeof proto3 !== "string") {
20768
- return "";
20769
- }
20770
- proto3 = proto3.split(":", 1)[0];
20771
- hostname = hostname.replace(/:\d*$/, "");
20772
- port = parseInt(port) || DEFAULT_PORTS[proto3] || 0;
20773
- if (!shouldProxy(hostname, port)) {
20774
- return "";
20775
- }
20776
- var proxy = getEnv("npm_config_" + proto3 + "_proxy") || getEnv(proto3 + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
20777
- if (proxy && proxy.indexOf("://") === -1) {
20778
- proxy = proto3 + "://" + proxy;
20779
- }
20780
- return proxy;
20781
- }
20782
- function shouldProxy(hostname, port) {
20783
- var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
20784
- if (!NO_PROXY) {
20785
- return true;
20786
- }
20787
- if (NO_PROXY === "*") {
20788
- return false;
20789
- }
20790
- return NO_PROXY.split(/[,\s]/).every(function(proxy) {
20791
- if (!proxy) {
20792
- return true;
20793
- }
20794
- var parsedProxy = proxy.match(/^(.+):(\d+)$/);
20795
- var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
20796
- var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
20797
- if (parsedProxyPort && parsedProxyPort !== port) {
20798
- return true;
20799
- }
20800
- if (!/^[.*]/.test(parsedProxyHostname)) {
20801
- return hostname !== parsedProxyHostname;
20802
- }
20803
- if (parsedProxyHostname.charAt(0) === "*") {
20804
- parsedProxyHostname = parsedProxyHostname.slice(1);
20805
- }
20806
- return !stringEndsWith.call(hostname, parsedProxyHostname);
20807
- });
20808
- }
20809
- function getEnv(key) {
20810
- return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
20811
- }
20812
- exports2.getProxyForUrl = getProxyForUrl;
20813
- }
20814
- });
20815
-
20816
20746
  // ../../../node_modules/debug/node_modules/ms/index.js
20817
20747
  var require_ms = __commonJS({
20818
20748
  "../../../node_modules/debug/node_modules/ms/index.js"(exports2, module2) {
@@ -21281,6 +21211,11 @@ var require_follow_redirects = __commonJS({
21281
21211
  } catch (error) {
21282
21212
  useNativeURL = error.code === "ERR_INVALID_URL";
21283
21213
  }
21214
+ var sensitiveHeaders = [
21215
+ "Authorization",
21216
+ "Proxy-Authorization",
21217
+ "Cookie"
21218
+ ];
21284
21219
  var preservedUrlFields = [
21285
21220
  "auth",
21286
21221
  "host",
@@ -21345,6 +21280,7 @@ var require_follow_redirects = __commonJS({
21345
21280
  self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
21346
21281
  }
21347
21282
  };
21283
+ this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") + ")$", "i");
21348
21284
  this._performRequest();
21349
21285
  }
21350
21286
  RedirectableRequest.prototype = Object.create(Writable2.prototype);
@@ -21482,6 +21418,9 @@ var require_follow_redirects = __commonJS({
21482
21418
  if (!options.headers) {
21483
21419
  options.headers = {};
21484
21420
  }
21421
+ if (!isArray2(options.sensitiveHeaders)) {
21422
+ options.sensitiveHeaders = [];
21423
+ }
21485
21424
  if (options.host) {
21486
21425
  if (!options.hostname) {
21487
21426
  options.hostname = options.host;
@@ -21579,7 +21518,7 @@ var require_follow_redirects = __commonJS({
21579
21518
  removeMatchingHeaders(/^content-/i, this._options.headers);
21580
21519
  }
21581
21520
  var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
21582
- var currentUrlParts = parseUrl(this._currentUrl);
21521
+ var currentUrlParts = parseUrl2(this._currentUrl);
21583
21522
  var currentHost = currentHostHeader || currentUrlParts.host;
21584
21523
  var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost }));
21585
21524
  var redirectUrl = resolveUrl(location, currentUrl);
@@ -21587,7 +21526,7 @@ var require_follow_redirects = __commonJS({
21587
21526
  this._isRedirect = true;
21588
21527
  spreadUrlObject(redirectUrl, this._options);
21589
21528
  if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
21590
- removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
21529
+ removeMatchingHeaders(this._headerFilter, this._options.headers);
21591
21530
  }
21592
21531
  if (isFunction3(beforeRedirect)) {
21593
21532
  var responseDetails = {
@@ -21618,7 +21557,7 @@ var require_follow_redirects = __commonJS({
21618
21557
  if (isURL(input)) {
21619
21558
  input = spreadUrlObject(input);
21620
21559
  } else if (isString2(input)) {
21621
- input = spreadUrlObject(parseUrl(input));
21560
+ input = spreadUrlObject(parseUrl2(input));
21622
21561
  } else {
21623
21562
  callback = options;
21624
21563
  options = validateUrl(input);
@@ -21654,7 +21593,7 @@ var require_follow_redirects = __commonJS({
21654
21593
  }
21655
21594
  function noop2() {
21656
21595
  }
21657
- function parseUrl(input) {
21596
+ function parseUrl2(input) {
21658
21597
  var parsed;
21659
21598
  if (useNativeURL) {
21660
21599
  parsed = new URL2(input);
@@ -21667,7 +21606,7 @@ var require_follow_redirects = __commonJS({
21667
21606
  return parsed;
21668
21607
  }
21669
21608
  function resolveUrl(relative, base) {
21670
- return useNativeURL ? new URL2(relative, base) : parseUrl(url2.resolve(base, relative));
21609
+ return useNativeURL ? new URL2(relative, base) : parseUrl2(url2.resolve(base, relative));
21671
21610
  }
21672
21611
  function validateUrl(input) {
21673
21612
  if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
@@ -21736,6 +21675,9 @@ var require_follow_redirects = __commonJS({
21736
21675
  var dot = subdomain.length - domain.length - 1;
21737
21676
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
21738
21677
  }
21678
+ function isArray2(value) {
21679
+ return value instanceof Array;
21680
+ }
21739
21681
  function isString2(value) {
21740
21682
  return typeof value === "string" || value instanceof String;
21741
21683
  }
@@ -21748,6 +21690,9 @@ var require_follow_redirects = __commonJS({
21748
21690
  function isURL(value) {
21749
21691
  return URL2 && value instanceof URL2;
21750
21692
  }
21693
+ function escapeRegex(regex2) {
21694
+ return regex2.replace(/[\]\\/()*+?.$]/g, "\\$&");
21695
+ }
21751
21696
  module2.exports = wrap({ http: http3, https: https2 });
21752
21697
  module2.exports.wrap = wrap;
21753
21698
  }
@@ -21795,7 +21740,7 @@ var frameworkKeys = [...frameworkLibs];
21795
21740
  var forceOverwriteKeys = Object.keys(ForceOverwrite).filter((m) => typeof ForceOverwrite[m] === "number");
21796
21741
 
21797
21742
  // src/index.ts
21798
- var import_path4 = require("path");
21743
+ var import_path5 = require("path");
21799
21744
  var import_promises2 = require("fs/promises");
21800
21745
 
21801
21746
  // ../../../node_modules/ora/index.js
@@ -23685,7 +23630,7 @@ function fail(message, ...args2) {
23685
23630
  var import_glob = __toESM(require_glob());
23686
23631
  var import_fs2 = require("fs");
23687
23632
  var import_promises = require("fs/promises");
23688
- var import_path3 = require("path");
23633
+ var import_path4 = require("path");
23689
23634
 
23690
23635
  // ../piral-cli/src/common/MemoryStream.ts
23691
23636
  var import_stream = require("stream");
@@ -23748,8 +23693,8 @@ var isPlainObject = (val) => {
23748
23693
  if (kindOf(val) !== "object") {
23749
23694
  return false;
23750
23695
  }
23751
- const prototype3 = getPrototypeOf(val);
23752
- return (prototype3 === null || prototype3 === Object.prototype || Object.getPrototypeOf(prototype3) === null) && !(toStringTag in val) && !(iterator in val);
23696
+ const prototype2 = getPrototypeOf(val);
23697
+ return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
23753
23698
  };
23754
23699
  var isEmptyObject = (val) => {
23755
23700
  if (!isObject(val) || isBuffer(val)) {
@@ -23763,17 +23708,42 @@ var isEmptyObject = (val) => {
23763
23708
  };
23764
23709
  var isDate = kindOfTest("Date");
23765
23710
  var isFile = kindOfTest("File");
23711
+ var isReactNativeBlob = (value) => {
23712
+ return !!(value && typeof value.uri !== "undefined");
23713
+ };
23714
+ var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
23766
23715
  var isBlob = kindOfTest("Blob");
23767
23716
  var isFileList = kindOfTest("FileList");
23768
23717
  var isStream = (val) => isObject(val) && isFunction(val.pipe);
23718
+ function getGlobal() {
23719
+ if (typeof globalThis !== "undefined") return globalThis;
23720
+ if (typeof self !== "undefined") return self;
23721
+ if (typeof window !== "undefined") return window;
23722
+ if (typeof global !== "undefined") return global;
23723
+ return {};
23724
+ }
23725
+ var G = getGlobal();
23726
+ var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0;
23769
23727
  var isFormData = (thing) => {
23770
- let kind;
23771
- return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
23772
- kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
23728
+ if (!thing) return false;
23729
+ if (FormDataCtor && thing instanceof FormDataCtor) return true;
23730
+ const proto3 = getPrototypeOf(thing);
23731
+ if (!proto3 || proto3 === Object.prototype) return false;
23732
+ if (!isFunction(thing.append)) return false;
23733
+ const kind = kindOf(thing);
23734
+ return kind === "formdata" || // detect form-data instance
23735
+ kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]";
23773
23736
  };
23774
23737
  var isURLSearchParams = kindOfTest("URLSearchParams");
23775
- var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
23776
- var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
23738
+ var [isReadableStream, isRequest, isResponse, isHeaders] = [
23739
+ "ReadableStream",
23740
+ "Request",
23741
+ "Response",
23742
+ "Headers"
23743
+ ].map(kindOfTest);
23744
+ var trim = (str) => {
23745
+ return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
23746
+ };
23777
23747
  function forEach(obj, fn, { allOwnKeys = false } = {}) {
23778
23748
  if (obj === null || typeof obj === "undefined") {
23779
23749
  return;
@@ -23825,6 +23795,9 @@ function merge() {
23825
23795
  const { caseless, skipUndefined } = isContextDefined(this) && this || {};
23826
23796
  const result = {};
23827
23797
  const assignValue = (val, key) => {
23798
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
23799
+ return;
23800
+ }
23828
23801
  const targetKey = caseless && findKey(result, key) || key;
23829
23802
  if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
23830
23803
  result[targetKey] = merge(result[targetKey], val);
@@ -23842,13 +23815,27 @@ function merge() {
23842
23815
  return result;
23843
23816
  }
23844
23817
  var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
23845
- forEach(b, (val, key) => {
23846
- if (thisArg && isFunction(val)) {
23847
- a[key] = bind(val, thisArg);
23848
- } else {
23849
- a[key] = val;
23850
- }
23851
- }, { allOwnKeys });
23818
+ forEach(
23819
+ b,
23820
+ (val, key) => {
23821
+ if (thisArg && isFunction(val)) {
23822
+ Object.defineProperty(a, key, {
23823
+ value: bind(val, thisArg),
23824
+ writable: true,
23825
+ enumerable: true,
23826
+ configurable: true
23827
+ });
23828
+ } else {
23829
+ Object.defineProperty(a, key, {
23830
+ value: val,
23831
+ writable: true,
23832
+ enumerable: true,
23833
+ configurable: true
23834
+ });
23835
+ }
23836
+ },
23837
+ { allOwnKeys }
23838
+ );
23852
23839
  return a;
23853
23840
  };
23854
23841
  var stripBOM = (content) => {
@@ -23857,9 +23844,14 @@ var stripBOM = (content) => {
23857
23844
  }
23858
23845
  return content;
23859
23846
  };
23860
- var inherits = (constructor, superConstructor, props, descriptors2) => {
23861
- constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
23862
- constructor.prototype.constructor = constructor;
23847
+ var inherits = (constructor, superConstructor, props, descriptors) => {
23848
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
23849
+ Object.defineProperty(constructor.prototype, "constructor", {
23850
+ value: constructor,
23851
+ writable: true,
23852
+ enumerable: false,
23853
+ configurable: true
23854
+ });
23863
23855
  Object.defineProperty(constructor, "super", {
23864
23856
  value: superConstructor.prototype
23865
23857
  });
@@ -23930,19 +23922,16 @@ var matchAll = (regExp, str) => {
23930
23922
  };
23931
23923
  var isHTMLForm = kindOfTest("HTMLFormElement");
23932
23924
  var toCamelCase = (str) => {
23933
- return str.toLowerCase().replace(
23934
- /[-_\s]([a-z\d])(\w*)/g,
23935
- function replacer(m, p1, p2) {
23936
- return p1.toUpperCase() + p2;
23937
- }
23938
- );
23925
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
23926
+ return p1.toUpperCase() + p2;
23927
+ });
23939
23928
  };
23940
23929
  var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
23941
23930
  var isRegExp = kindOfTest("RegExp");
23942
23931
  var reduceDescriptors = (obj, reducer) => {
23943
- const descriptors2 = Object.getOwnPropertyDescriptors(obj);
23932
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
23944
23933
  const reducedDescriptors = {};
23945
- forEach(descriptors2, (descriptor, name) => {
23934
+ forEach(descriptors, (descriptor, name) => {
23946
23935
  let ret;
23947
23936
  if ((ret = reducer(descriptor, name, obj)) !== false) {
23948
23937
  reducedDescriptors[name] = ret || descriptor;
@@ -24019,20 +24008,21 @@ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
24019
24008
  return setImmediate;
24020
24009
  }
24021
24010
  return postMessageSupported ? ((token, callbacks) => {
24022
- _global.addEventListener("message", ({ source, data }) => {
24023
- if (source === _global && data === token) {
24024
- callbacks.length && callbacks.shift()();
24025
- }
24026
- }, false);
24011
+ _global.addEventListener(
24012
+ "message",
24013
+ ({ source, data }) => {
24014
+ if (source === _global && data === token) {
24015
+ callbacks.length && callbacks.shift()();
24016
+ }
24017
+ },
24018
+ false
24019
+ );
24027
24020
  return (cb) => {
24028
24021
  callbacks.push(cb);
24029
24022
  _global.postMessage(token, "*");
24030
24023
  };
24031
24024
  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
24032
- })(
24033
- typeof setImmediate === "function",
24034
- isFunction(_global.postMessage)
24035
- );
24025
+ })(typeof setImmediate === "function", isFunction(_global.postMessage));
24036
24026
  var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
24037
24027
  var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
24038
24028
  var utils_default = {
@@ -24054,6 +24044,8 @@ var utils_default = {
24054
24044
  isUndefined,
24055
24045
  isDate,
24056
24046
  isFile,
24047
+ isReactNativeBlob,
24048
+ isReactNative,
24057
24049
  isBlob,
24058
24050
  isRegExp,
24059
24051
  isFunction,
@@ -24097,25 +24089,47 @@ var utils_default = {
24097
24089
  };
24098
24090
 
24099
24091
  // ../../../node_modules/axios/lib/core/AxiosError.js
24100
- function AxiosError(message, code, config, request, response) {
24101
- Error.call(this);
24102
- if (Error.captureStackTrace) {
24103
- Error.captureStackTrace(this, this.constructor);
24104
- } else {
24105
- this.stack = new Error().stack;
24092
+ var AxiosError = class _AxiosError extends Error {
24093
+ static from(error, code, config, request, response, customProps) {
24094
+ const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
24095
+ axiosError.cause = error;
24096
+ axiosError.name = error.name;
24097
+ if (error.status != null && axiosError.status == null) {
24098
+ axiosError.status = error.status;
24099
+ }
24100
+ customProps && Object.assign(axiosError, customProps);
24101
+ return axiosError;
24106
24102
  }
24107
- this.message = message;
24108
- this.name = "AxiosError";
24109
- code && (this.code = code);
24110
- config && (this.config = config);
24111
- request && (this.request = request);
24112
- if (response) {
24113
- this.response = response;
24114
- this.status = response.status ? response.status : null;
24103
+ /**
24104
+ * Create an Error with the specified message, config, error code, request and response.
24105
+ *
24106
+ * @param {string} message The error message.
24107
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
24108
+ * @param {Object} [config] The config.
24109
+ * @param {Object} [request] The request.
24110
+ * @param {Object} [response] The response.
24111
+ *
24112
+ * @returns {Error} The created error.
24113
+ */
24114
+ constructor(message, code, config, request, response) {
24115
+ super(message);
24116
+ Object.defineProperty(this, "message", {
24117
+ value: message,
24118
+ enumerable: true,
24119
+ writable: true,
24120
+ configurable: true
24121
+ });
24122
+ this.name = "AxiosError";
24123
+ this.isAxiosError = true;
24124
+ code && (this.code = code);
24125
+ config && (this.config = config);
24126
+ request && (this.request = request);
24127
+ if (response) {
24128
+ this.response = response;
24129
+ this.status = response.status;
24130
+ }
24115
24131
  }
24116
- }
24117
- utils_default.inherits(AxiosError, Error, {
24118
- toJSON: function toJSON() {
24132
+ toJSON() {
24119
24133
  return {
24120
24134
  // Standard
24121
24135
  message: this.message,
@@ -24134,45 +24148,20 @@ utils_default.inherits(AxiosError, Error, {
24134
24148
  status: this.status
24135
24149
  };
24136
24150
  }
24137
- });
24138
- var prototype = AxiosError.prototype;
24139
- var descriptors = {};
24140
- [
24141
- "ERR_BAD_OPTION_VALUE",
24142
- "ERR_BAD_OPTION",
24143
- "ECONNABORTED",
24144
- "ETIMEDOUT",
24145
- "ERR_NETWORK",
24146
- "ERR_FR_TOO_MANY_REDIRECTS",
24147
- "ERR_DEPRECATED",
24148
- "ERR_BAD_RESPONSE",
24149
- "ERR_BAD_REQUEST",
24150
- "ERR_CANCELED",
24151
- "ERR_NOT_SUPPORT",
24152
- "ERR_INVALID_URL"
24153
- // eslint-disable-next-line func-names
24154
- ].forEach((code) => {
24155
- descriptors[code] = { value: code };
24156
- });
24157
- Object.defineProperties(AxiosError, descriptors);
24158
- Object.defineProperty(prototype, "isAxiosError", { value: true });
24159
- AxiosError.from = (error, code, config, request, response, customProps) => {
24160
- const axiosError = Object.create(prototype);
24161
- utils_default.toFlatObject(error, axiosError, function filter2(obj) {
24162
- return obj !== Error.prototype;
24163
- }, (prop) => {
24164
- return prop !== "isAxiosError";
24165
- });
24166
- const msg = error && error.message ? error.message : "Error";
24167
- const errCode = code == null && error ? error.code : code;
24168
- AxiosError.call(axiosError, msg, errCode, config, request, response);
24169
- if (error && axiosError.cause == null) {
24170
- Object.defineProperty(axiosError, "cause", { value: error, configurable: true });
24171
- }
24172
- axiosError.name = error && error.name || "Error";
24173
- customProps && Object.assign(axiosError, customProps);
24174
- return axiosError;
24175
24151
  };
24152
+ AxiosError.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
24153
+ AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
24154
+ AxiosError.ECONNABORTED = "ECONNABORTED";
24155
+ AxiosError.ETIMEDOUT = "ETIMEDOUT";
24156
+ AxiosError.ERR_NETWORK = "ERR_NETWORK";
24157
+ AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
24158
+ AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
24159
+ AxiosError.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
24160
+ AxiosError.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
24161
+ AxiosError.ERR_CANCELED = "ERR_CANCELED";
24162
+ AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
24163
+ AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
24164
+ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
24176
24165
  var AxiosError_default = AxiosError;
24177
24166
 
24178
24167
  // ../../../node_modules/axios/lib/platform/node/classes/FormData.js
@@ -24204,18 +24193,24 @@ function toFormData(obj, formData, options) {
24204
24193
  throw new TypeError("target must be an object");
24205
24194
  }
24206
24195
  formData = formData || new (FormData_default || FormData)();
24207
- options = utils_default.toFlatObject(options, {
24208
- metaTokens: true,
24209
- dots: false,
24210
- indexes: false
24211
- }, false, function defined(option, source) {
24212
- return !utils_default.isUndefined(source[option]);
24213
- });
24196
+ options = utils_default.toFlatObject(
24197
+ options,
24198
+ {
24199
+ metaTokens: true,
24200
+ dots: false,
24201
+ indexes: false
24202
+ },
24203
+ false,
24204
+ function defined(option, source) {
24205
+ return !utils_default.isUndefined(source[option]);
24206
+ }
24207
+ );
24214
24208
  const metaTokens = options.metaTokens;
24215
24209
  const visitor = options.visitor || defaultVisitor;
24216
24210
  const dots = options.dots;
24217
24211
  const indexes = options.indexes;
24218
24212
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
24213
+ const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
24219
24214
  const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
24220
24215
  if (!utils_default.isFunction(visitor)) {
24221
24216
  throw new TypeError("visitor must be a function");
@@ -24238,6 +24233,10 @@ function toFormData(obj, formData, options) {
24238
24233
  }
24239
24234
  function defaultVisitor(value, key, path) {
24240
24235
  let arr = value;
24236
+ if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
24237
+ formData.append(renderKey(path, key, dots), convertValue(value));
24238
+ return false;
24239
+ }
24241
24240
  if (value && !path && typeof value === "object") {
24242
24241
  if (utils_default.endsWith(key, "{}")) {
24243
24242
  key = metaTokens ? key : key.slice(0, -2);
@@ -24266,22 +24265,22 @@ function toFormData(obj, formData, options) {
24266
24265
  convertValue,
24267
24266
  isVisitable
24268
24267
  });
24269
- function build(value, path) {
24268
+ function build(value, path, depth = 0) {
24270
24269
  if (utils_default.isUndefined(value)) return;
24270
+ if (depth > maxDepth) {
24271
+ throw new AxiosError_default(
24272
+ "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
24273
+ AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
24274
+ );
24275
+ }
24271
24276
  if (stack.indexOf(value) !== -1) {
24272
24277
  throw Error("Circular reference detected in " + path.join("."));
24273
24278
  }
24274
24279
  stack.push(value);
24275
24280
  utils_default.forEach(value, function each(el, key) {
24276
- const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(
24277
- formData,
24278
- el,
24279
- utils_default.isString(key) ? key.trim() : key,
24280
- path,
24281
- exposedHelpers
24282
- );
24281
+ const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers);
24283
24282
  if (result === true) {
24284
- build(el, path ? path.concat(key) : [key]);
24283
+ build(el, path ? path.concat(key) : [key], depth + 1);
24285
24284
  }
24286
24285
  });
24287
24286
  stack.pop();
@@ -24302,10 +24301,9 @@ function encode(str) {
24302
24301
  "(": "%28",
24303
24302
  ")": "%29",
24304
24303
  "~": "%7E",
24305
- "%20": "+",
24306
- "%00": "\0"
24304
+ "%20": "+"
24307
24305
  };
24308
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
24306
+ return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
24309
24307
  return charMap[match];
24310
24308
  });
24311
24309
  }
@@ -24313,11 +24311,11 @@ function AxiosURLSearchParams(params, options) {
24313
24311
  this._pairs = [];
24314
24312
  params && toFormData_default(params, this, options);
24315
24313
  }
24316
- var prototype2 = AxiosURLSearchParams.prototype;
24317
- prototype2.append = function append(name, value) {
24314
+ var prototype = AxiosURLSearchParams.prototype;
24315
+ prototype.append = function append(name, value) {
24318
24316
  this._pairs.push([name, value]);
24319
24317
  };
24320
- prototype2.toString = function toString2(encoder) {
24318
+ prototype.toString = function toString2(encoder) {
24321
24319
  const _encode = encoder ? function(value) {
24322
24320
  return encoder.call(this, value, encode);
24323
24321
  } : encode;
@@ -24336,17 +24334,15 @@ function buildURL(url2, params, options) {
24336
24334
  return url2;
24337
24335
  }
24338
24336
  const _encode = options && options.encode || encode2;
24339
- if (utils_default.isFunction(options)) {
24340
- options = {
24341
- serialize: options
24342
- };
24343
- }
24344
- const serializeFn = options && options.serialize;
24337
+ const _options = utils_default.isFunction(options) ? {
24338
+ serialize: options
24339
+ } : options;
24340
+ const serializeFn = _options && _options.serialize;
24345
24341
  let serializedParams;
24346
24342
  if (serializeFn) {
24347
- serializedParams = serializeFn(params, options);
24343
+ serializedParams = serializeFn(params, _options);
24348
24344
  } else {
24349
- serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, options).toString(_encode);
24345
+ serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams_default(params, _options).toString(_encode);
24350
24346
  }
24351
24347
  if (serializedParams) {
24352
24348
  const hashmarkIndex = url2.indexOf("#");
@@ -24368,6 +24364,7 @@ var InterceptorManager = class {
24368
24364
  *
24369
24365
  * @param {Function} fulfilled The function to handle `then` for a `Promise`
24370
24366
  * @param {Function} rejected The function to handle `reject` for a `Promise`
24367
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
24371
24368
  *
24372
24369
  * @return {Number} An ID used to remove interceptor later
24373
24370
  */
@@ -24426,7 +24423,8 @@ var InterceptorManager_default = InterceptorManager;
24426
24423
  var transitional_default = {
24427
24424
  silentJSONParsing: true,
24428
24425
  forcedJSONParsing: true,
24429
- clarifyTimeoutError: false
24426
+ clarifyTimeoutError: false,
24427
+ legacyInterceptorReqResOrdering: true
24430
24428
  };
24431
24429
 
24432
24430
  // ../../../node_modules/axios/lib/platform/node/index.js
@@ -24531,7 +24529,7 @@ function formDataToJSON(formData) {
24531
24529
  name = !name && utils_default.isArray(target) ? target.length : name;
24532
24530
  if (isLast) {
24533
24531
  if (utils_default.hasOwnProp(target, name)) {
24534
- target[name] = [target[name], value];
24532
+ target[name] = utils_default.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
24535
24533
  } else {
24536
24534
  target[name] = value;
24537
24535
  }
@@ -24558,6 +24556,7 @@ function formDataToJSON(formData) {
24558
24556
  var formDataToJSON_default = formDataToJSON;
24559
24557
 
24560
24558
  // ../../../node_modules/axios/lib/defaults/index.js
24559
+ var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
24561
24560
  function stringifySafely(rawValue, parser, encoder) {
24562
24561
  if (utils_default.isString(rawValue)) {
24563
24562
  try {
@@ -24574,70 +24573,77 @@ function stringifySafely(rawValue, parser, encoder) {
24574
24573
  var defaults = {
24575
24574
  transitional: transitional_default,
24576
24575
  adapter: ["xhr", "http", "fetch"],
24577
- transformRequest: [function transformRequest(data, headers) {
24578
- const contentType = headers.getContentType() || "";
24579
- const hasJSONContentType = contentType.indexOf("application/json") > -1;
24580
- const isObjectPayload = utils_default.isObject(data);
24581
- if (isObjectPayload && utils_default.isHTMLForm(data)) {
24582
- data = new FormData(data);
24583
- }
24584
- const isFormData2 = utils_default.isFormData(data);
24585
- if (isFormData2) {
24586
- return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
24587
- }
24588
- 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)) {
24589
- return data;
24590
- }
24591
- if (utils_default.isArrayBufferView(data)) {
24592
- return data.buffer;
24593
- }
24594
- if (utils_default.isURLSearchParams(data)) {
24595
- headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
24596
- return data.toString();
24597
- }
24598
- let isFileList2;
24599
- if (isObjectPayload) {
24600
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
24601
- return toURLEncodedForm(data, this.formSerializer).toString();
24576
+ transformRequest: [
24577
+ function transformRequest(data, headers) {
24578
+ const contentType = headers.getContentType() || "";
24579
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
24580
+ const isObjectPayload = utils_default.isObject(data);
24581
+ if (isObjectPayload && utils_default.isHTMLForm(data)) {
24582
+ data = new FormData(data);
24583
+ }
24584
+ const isFormData2 = utils_default.isFormData(data);
24585
+ if (isFormData2) {
24586
+ return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
24587
+ }
24588
+ 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)) {
24589
+ return data;
24590
+ }
24591
+ if (utils_default.isArrayBufferView(data)) {
24592
+ return data.buffer;
24593
+ }
24594
+ if (utils_default.isURLSearchParams(data)) {
24595
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
24596
+ return data.toString();
24597
+ }
24598
+ let isFileList2;
24599
+ if (isObjectPayload) {
24600
+ const formSerializer = own(this, "formSerializer");
24601
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
24602
+ return toURLEncodedForm(data, formSerializer).toString();
24603
+ }
24604
+ if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
24605
+ const env3 = own(this, "env");
24606
+ const _FormData = env3 && env3.FormData;
24607
+ return toFormData_default(
24608
+ isFileList2 ? { "files[]": data } : data,
24609
+ _FormData && new _FormData(),
24610
+ formSerializer
24611
+ );
24612
+ }
24602
24613
  }
24603
- if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
24604
- const _FormData = this.env && this.env.FormData;
24605
- return toFormData_default(
24606
- isFileList2 ? { "files[]": data } : data,
24607
- _FormData && new _FormData(),
24608
- this.formSerializer
24609
- );
24614
+ if (isObjectPayload || hasJSONContentType) {
24615
+ headers.setContentType("application/json", false);
24616
+ return stringifySafely(data);
24610
24617
  }
24611
- }
24612
- if (isObjectPayload || hasJSONContentType) {
24613
- headers.setContentType("application/json", false);
24614
- return stringifySafely(data);
24615
- }
24616
- return data;
24617
- }],
24618
- transformResponse: [function transformResponse(data) {
24619
- const transitional2 = this.transitional || defaults.transitional;
24620
- const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
24621
- const JSONRequested = this.responseType === "json";
24622
- if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
24623
24618
  return data;
24624
24619
  }
24625
- if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
24626
- const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
24627
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
24628
- try {
24629
- return JSON.parse(data, this.parseReviver);
24630
- } catch (e) {
24631
- if (strictJSONParsing) {
24632
- if (e.name === "SyntaxError") {
24633
- throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
24620
+ ],
24621
+ transformResponse: [
24622
+ function transformResponse(data) {
24623
+ const transitional2 = own(this, "transitional") || defaults.transitional;
24624
+ const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
24625
+ const responseType = own(this, "responseType");
24626
+ const JSONRequested = responseType === "json";
24627
+ if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
24628
+ return data;
24629
+ }
24630
+ if (data && utils_default.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
24631
+ const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
24632
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
24633
+ try {
24634
+ return JSON.parse(data, own(this, "parseReviver"));
24635
+ } catch (e) {
24636
+ if (strictJSONParsing) {
24637
+ if (e.name === "SyntaxError") {
24638
+ throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, own(this, "response"));
24639
+ }
24640
+ throw e;
24634
24641
  }
24635
- throw e;
24636
24642
  }
24637
24643
  }
24644
+ return data;
24638
24645
  }
24639
- return data;
24640
- }],
24646
+ ],
24641
24647
  /**
24642
24648
  * A timeout in milliseconds to abort a request. If set to 0 (default) a
24643
24649
  * timeout is not created.
@@ -24656,7 +24662,7 @@ var defaults = {
24656
24662
  },
24657
24663
  headers: {
24658
24664
  common: {
24659
- "Accept": "application/json, text/plain, */*",
24665
+ Accept: "application/json, text/plain, */*",
24660
24666
  "Content-Type": void 0
24661
24667
  }
24662
24668
  }
@@ -24713,14 +24719,37 @@ var parseHeaders_default = (rawHeaders) => {
24713
24719
 
24714
24720
  // ../../../node_modules/axios/lib/core/AxiosHeaders.js
24715
24721
  var $internals = /* @__PURE__ */ Symbol("internals");
24722
+ var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
24723
+ function trimSPorHTAB(str) {
24724
+ let start = 0;
24725
+ let end = str.length;
24726
+ while (start < end) {
24727
+ const code = str.charCodeAt(start);
24728
+ if (code !== 9 && code !== 32) {
24729
+ break;
24730
+ }
24731
+ start += 1;
24732
+ }
24733
+ while (end > start) {
24734
+ const code = str.charCodeAt(end - 1);
24735
+ if (code !== 9 && code !== 32) {
24736
+ break;
24737
+ }
24738
+ end -= 1;
24739
+ }
24740
+ return start === 0 && end === str.length ? str : str.slice(start, end);
24741
+ }
24716
24742
  function normalizeHeader(header) {
24717
24743
  return header && String(header).trim().toLowerCase();
24718
24744
  }
24745
+ function sanitizeHeaderValue(str) {
24746
+ return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
24747
+ }
24719
24748
  function normalizeValue(value) {
24720
24749
  if (value === false || value == null) {
24721
24750
  return value;
24722
24751
  }
24723
- return utils_default.isArray(value) ? value.map(normalizeValue) : String(value);
24752
+ return utils_default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
24724
24753
  }
24725
24754
  function parseTokens(str) {
24726
24755
  const tokens = /* @__PURE__ */ Object.create(null);
@@ -24915,11 +24944,11 @@ var AxiosHeaders = class {
24915
24944
  accessors: {}
24916
24945
  };
24917
24946
  const accessors = internals.accessors;
24918
- const prototype3 = this.prototype;
24947
+ const prototype2 = this.prototype;
24919
24948
  function defineAccessor(_header) {
24920
24949
  const lHeader = normalizeHeader(_header);
24921
24950
  if (!accessors[lHeader]) {
24922
- buildAccessors(prototype3, _header);
24951
+ buildAccessors(prototype2, _header);
24923
24952
  accessors[lHeader] = true;
24924
24953
  }
24925
24954
  }
@@ -24927,7 +24956,14 @@ var AxiosHeaders = class {
24927
24956
  return this;
24928
24957
  }
24929
24958
  };
24930
- AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
24959
+ AxiosHeaders.accessor([
24960
+ "Content-Type",
24961
+ "Content-Length",
24962
+ "Accept",
24963
+ "Accept-Encoding",
24964
+ "User-Agent",
24965
+ "Authorization"
24966
+ ]);
24931
24967
  utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
24932
24968
  let mapped = key[0].toUpperCase() + key.slice(1);
24933
24969
  return {
@@ -24959,13 +24995,22 @@ function isCancel(value) {
24959
24995
  }
24960
24996
 
24961
24997
  // ../../../node_modules/axios/lib/cancel/CanceledError.js
24962
- function CanceledError(message, config, request) {
24963
- AxiosError_default.call(this, message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
24964
- this.name = "CanceledError";
24965
- }
24966
- utils_default.inherits(CanceledError, AxiosError_default, {
24967
- __CANCEL__: true
24968
- });
24998
+ var CanceledError = class extends AxiosError_default {
24999
+ /**
25000
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
25001
+ *
25002
+ * @param {string=} message The message.
25003
+ * @param {Object=} config The config.
25004
+ * @param {Object=} request The request.
25005
+ *
25006
+ * @returns {CanceledError} The created error.
25007
+ */
25008
+ constructor(message, config, request) {
25009
+ super(message == null ? "canceled" : message, AxiosError_default.ERR_CANCELED, config, request);
25010
+ this.name = "CanceledError";
25011
+ this.__CANCEL__ = true;
25012
+ }
25013
+ };
24969
25014
  var CanceledError_default = CanceledError;
24970
25015
 
24971
25016
  // ../../../node_modules/axios/lib/core/settle.js
@@ -24974,18 +25019,23 @@ function settle(resolve3, reject, response) {
24974
25019
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
24975
25020
  resolve3(response);
24976
25021
  } else {
24977
- reject(new AxiosError_default(
24978
- "Request failed with status code " + response.status,
24979
- [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
24980
- response.config,
24981
- response.request,
24982
- response
24983
- ));
25022
+ reject(
25023
+ new AxiosError_default(
25024
+ "Request failed with status code " + response.status,
25025
+ [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
25026
+ response.config,
25027
+ response.request,
25028
+ response
25029
+ )
25030
+ );
24984
25031
  }
24985
25032
  }
24986
25033
 
24987
25034
  // ../../../node_modules/axios/lib/helpers/isAbsoluteURL.js
24988
25035
  function isAbsoluteURL(url2) {
25036
+ if (typeof url2 !== "string") {
25037
+ return false;
25038
+ }
24989
25039
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
24990
25040
  }
24991
25041
 
@@ -24997,23 +25047,90 @@ function combineURLs(baseURL, relativeURL) {
24997
25047
  // ../../../node_modules/axios/lib/core/buildFullPath.js
24998
25048
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
24999
25049
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
25000
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
25050
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
25001
25051
  return combineURLs(baseURL, requestedURL);
25002
25052
  }
25003
25053
  return requestedURL;
25004
25054
  }
25005
25055
 
25056
+ // ../../../node_modules/proxy-from-env/index.js
25057
+ var DEFAULT_PORTS = {
25058
+ ftp: 21,
25059
+ gopher: 70,
25060
+ http: 80,
25061
+ https: 443,
25062
+ ws: 80,
25063
+ wss: 443
25064
+ };
25065
+ function parseUrl(urlString) {
25066
+ try {
25067
+ return new URL(urlString);
25068
+ } catch {
25069
+ return null;
25070
+ }
25071
+ }
25072
+ function getProxyForUrl(url2) {
25073
+ var parsedUrl = (typeof url2 === "string" ? parseUrl(url2) : url2) || {};
25074
+ var proto3 = parsedUrl.protocol;
25075
+ var hostname = parsedUrl.host;
25076
+ var port = parsedUrl.port;
25077
+ if (typeof hostname !== "string" || !hostname || typeof proto3 !== "string") {
25078
+ return "";
25079
+ }
25080
+ proto3 = proto3.split(":", 1)[0];
25081
+ hostname = hostname.replace(/:\d*$/, "");
25082
+ port = parseInt(port) || DEFAULT_PORTS[proto3] || 0;
25083
+ if (!shouldProxy(hostname, port)) {
25084
+ return "";
25085
+ }
25086
+ var proxy = getEnv(proto3 + "_proxy") || getEnv("all_proxy");
25087
+ if (proxy && proxy.indexOf("://") === -1) {
25088
+ proxy = proto3 + "://" + proxy;
25089
+ }
25090
+ return proxy;
25091
+ }
25092
+ function shouldProxy(hostname, port) {
25093
+ var NO_PROXY = getEnv("no_proxy").toLowerCase();
25094
+ if (!NO_PROXY) {
25095
+ return true;
25096
+ }
25097
+ if (NO_PROXY === "*") {
25098
+ return false;
25099
+ }
25100
+ return NO_PROXY.split(/[,\s]/).every(function(proxy) {
25101
+ if (!proxy) {
25102
+ return true;
25103
+ }
25104
+ var parsedProxy = proxy.match(/^(.+):(\d+)$/);
25105
+ var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
25106
+ var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
25107
+ if (parsedProxyPort && parsedProxyPort !== port) {
25108
+ return true;
25109
+ }
25110
+ if (!/^[.*]/.test(parsedProxyHostname)) {
25111
+ return hostname !== parsedProxyHostname;
25112
+ }
25113
+ if (parsedProxyHostname.charAt(0) === "*") {
25114
+ parsedProxyHostname = parsedProxyHostname.slice(1);
25115
+ }
25116
+ return !hostname.endsWith(parsedProxyHostname);
25117
+ });
25118
+ }
25119
+ function getEnv(key) {
25120
+ return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
25121
+ }
25122
+
25006
25123
  // ../../../node_modules/axios/lib/adapters/http.js
25007
- var import_proxy_from_env = __toESM(require_proxy_from_env(), 1);
25008
25124
  var import_http = __toESM(require("http"), 1);
25009
25125
  var import_https = __toESM(require("https"), 1);
25010
25126
  var import_http2 = __toESM(require("http2"), 1);
25011
25127
  var import_util3 = __toESM(require("util"), 1);
25128
+ var import_path = require("path");
25012
25129
  var import_follow_redirects = __toESM(require_follow_redirects(), 1);
25013
25130
  var import_zlib = __toESM(require("zlib"), 1);
25014
25131
 
25015
25132
  // ../../../node_modules/axios/lib/env/data.js
25016
- var VERSION = "1.13.2";
25133
+ var VERSION = "1.15.2";
25017
25134
 
25018
25135
  // ../../../node_modules/axios/lib/helpers/parseProtocol.js
25019
25136
  function parseProtocol(url2) {
@@ -25058,16 +25175,21 @@ var import_stream2 = __toESM(require("stream"), 1);
25058
25175
  var kInternals = /* @__PURE__ */ Symbol("internals");
25059
25176
  var AxiosTransformStream = class extends import_stream2.default.Transform {
25060
25177
  constructor(options) {
25061
- options = utils_default.toFlatObject(options, {
25062
- maxRate: 0,
25063
- chunkSize: 64 * 1024,
25064
- minChunkSize: 100,
25065
- timeWindow: 500,
25066
- ticksRate: 2,
25067
- samplesCount: 15
25068
- }, null, (prop, source) => {
25069
- return !utils_default.isUndefined(source[prop]);
25070
- });
25178
+ options = utils_default.toFlatObject(
25179
+ options,
25180
+ {
25181
+ maxRate: 0,
25182
+ chunkSize: 64 * 1024,
25183
+ minChunkSize: 100,
25184
+ timeWindow: 500,
25185
+ ticksRate: 2,
25186
+ samplesCount: 15
25187
+ },
25188
+ null,
25189
+ (prop, source) => {
25190
+ return !utils_default.isUndefined(source[prop]);
25191
+ }
25192
+ );
25071
25193
  super({
25072
25194
  readableHighWaterMark: options.chunkSize
25073
25195
  });
@@ -25150,9 +25272,12 @@ var AxiosTransformStream = class extends import_stream2.default.Transform {
25150
25272
  chunkRemainder = _chunk.subarray(maxChunkSize);
25151
25273
  _chunk = _chunk.subarray(0, maxChunkSize);
25152
25274
  }
25153
- pushChunk(_chunk, chunkRemainder ? () => {
25154
- process.nextTick(_callback, null, chunkRemainder);
25155
- } : _callback);
25275
+ pushChunk(
25276
+ _chunk,
25277
+ chunkRemainder ? () => {
25278
+ process.nextTick(_callback, null, chunkRemainder);
25279
+ } : _callback
25280
+ );
25156
25281
  };
25157
25282
  transformChunk(chunk, function transformNextChunk(err, _chunk) {
25158
25283
  if (err) {
@@ -25204,7 +25329,8 @@ var FormDataPart = class {
25204
25329
  if (isStringValue) {
25205
25330
  value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
25206
25331
  } else {
25207
- headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`;
25332
+ const safeType = String(value.type || "application/octet-stream").replace(/[\r\n]/g, "");
25333
+ headers += `Content-Type: ${safeType}${CRLF}`;
25208
25334
  }
25209
25335
  this.headers = textEncoder.encode(headers + CRLF);
25210
25336
  this.contentLength = isStringValue ? value.byteLength : value.size;
@@ -25223,11 +25349,14 @@ var FormDataPart = class {
25223
25349
  yield CRLF_BYTES;
25224
25350
  }
25225
25351
  static escapeName(name) {
25226
- return String(name).replace(/[\r\n"]/g, (match) => ({
25227
- "\r": "%0D",
25228
- "\n": "%0A",
25229
- '"': "%22"
25230
- })[match]);
25352
+ return String(name).replace(
25353
+ /[\r\n"]/g,
25354
+ (match) => ({
25355
+ "\r": "%0D",
25356
+ "\n": "%0A",
25357
+ '"': "%22"
25358
+ })[match]
25359
+ );
25231
25360
  }
25232
25361
  };
25233
25362
  var formDataToStream = (form, headersHandler, options) => {
@@ -25259,13 +25388,15 @@ var formDataToStream = (form, headersHandler, options) => {
25259
25388
  computedHeaders["Content-Length"] = contentLength;
25260
25389
  }
25261
25390
  headersHandler && headersHandler(computedHeaders);
25262
- return import_stream3.Readable.from((async function* () {
25263
- for (const part of parts) {
25264
- yield boundaryBytes;
25265
- yield* part.encode();
25266
- }
25267
- yield footerBytes;
25268
- })());
25391
+ return import_stream3.Readable.from(
25392
+ (async function* () {
25393
+ for (const part of parts) {
25394
+ yield boundaryBytes;
25395
+ yield* part.encode();
25396
+ }
25397
+ yield footerBytes;
25398
+ })()
25399
+ );
25269
25400
  };
25270
25401
  var formDataToStream_default = formDataToStream;
25271
25402
 
@@ -25306,6 +25437,114 @@ var callbackify = (fn, reducer) => {
25306
25437
  };
25307
25438
  var callbackify_default = callbackify;
25308
25439
 
25440
+ // ../../../node_modules/axios/lib/helpers/shouldBypassProxy.js
25441
+ var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
25442
+ var isIPv4Loopback = (host) => {
25443
+ const parts = host.split(".");
25444
+ if (parts.length !== 4) return false;
25445
+ if (parts[0] !== "127") return false;
25446
+ return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
25447
+ };
25448
+ var isIPv6Loopback = (host) => {
25449
+ if (host === "::1") return true;
25450
+ const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
25451
+ if (v4MappedDotted) return isIPv4Loopback(v4MappedDotted[1]);
25452
+ const v4MappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);
25453
+ if (v4MappedHex) {
25454
+ const high = parseInt(v4MappedHex[1], 16);
25455
+ return high >= 32512 && high <= 32767;
25456
+ }
25457
+ const groups = host.split(":");
25458
+ if (groups.length === 8) {
25459
+ for (let i = 0; i < 7; i++) {
25460
+ if (!/^0+$/.test(groups[i])) return false;
25461
+ }
25462
+ return /^0*1$/.test(groups[7]);
25463
+ }
25464
+ return false;
25465
+ };
25466
+ var isLoopback = (host) => {
25467
+ if (!host) return false;
25468
+ if (LOOPBACK_HOSTNAMES.has(host)) return true;
25469
+ if (isIPv4Loopback(host)) return true;
25470
+ return isIPv6Loopback(host);
25471
+ };
25472
+ var DEFAULT_PORTS2 = {
25473
+ http: 80,
25474
+ https: 443,
25475
+ ws: 80,
25476
+ wss: 443,
25477
+ ftp: 21
25478
+ };
25479
+ var parseNoProxyEntry = (entry) => {
25480
+ let entryHost = entry;
25481
+ let entryPort = 0;
25482
+ if (entryHost.charAt(0) === "[") {
25483
+ const bracketIndex = entryHost.indexOf("]");
25484
+ if (bracketIndex !== -1) {
25485
+ const host = entryHost.slice(1, bracketIndex);
25486
+ const rest = entryHost.slice(bracketIndex + 1);
25487
+ if (rest.charAt(0) === ":" && /^\d+$/.test(rest.slice(1))) {
25488
+ entryPort = Number.parseInt(rest.slice(1), 10);
25489
+ }
25490
+ return [host, entryPort];
25491
+ }
25492
+ }
25493
+ const firstColon = entryHost.indexOf(":");
25494
+ const lastColon = entryHost.lastIndexOf(":");
25495
+ if (firstColon !== -1 && firstColon === lastColon && /^\d+$/.test(entryHost.slice(lastColon + 1))) {
25496
+ entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10);
25497
+ entryHost = entryHost.slice(0, lastColon);
25498
+ }
25499
+ return [entryHost, entryPort];
25500
+ };
25501
+ var normalizeNoProxyHost = (hostname) => {
25502
+ if (!hostname) {
25503
+ return hostname;
25504
+ }
25505
+ if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
25506
+ hostname = hostname.slice(1, -1);
25507
+ }
25508
+ return hostname.replace(/\.+$/, "");
25509
+ };
25510
+ function shouldBypassProxy(location) {
25511
+ let parsed;
25512
+ try {
25513
+ parsed = new URL(location);
25514
+ } catch (_err) {
25515
+ return false;
25516
+ }
25517
+ const noProxy = (process.env.no_proxy || process.env.NO_PROXY || "").toLowerCase();
25518
+ if (!noProxy) {
25519
+ return false;
25520
+ }
25521
+ if (noProxy === "*") {
25522
+ return true;
25523
+ }
25524
+ const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS2[parsed.protocol.split(":", 1)[0]] || 0;
25525
+ const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
25526
+ return noProxy.split(/[\s,]+/).some((entry) => {
25527
+ if (!entry) {
25528
+ return false;
25529
+ }
25530
+ let [entryHost, entryPort] = parseNoProxyEntry(entry);
25531
+ entryHost = normalizeNoProxyHost(entryHost);
25532
+ if (!entryHost) {
25533
+ return false;
25534
+ }
25535
+ if (entryPort && entryPort !== port) {
25536
+ return false;
25537
+ }
25538
+ if (entryHost.charAt(0) === "*") {
25539
+ entryHost = entryHost.slice(1);
25540
+ }
25541
+ if (entryHost.charAt(0) === ".") {
25542
+ return hostname.endsWith(entryHost);
25543
+ }
25544
+ return hostname === entryHost || isLoopback(hostname) && isLoopback(entryHost);
25545
+ });
25546
+ }
25547
+
25309
25548
  // ../../../node_modules/axios/lib/helpers/speedometer.js
25310
25549
  function speedometer(samplesCount, min) {
25311
25550
  samplesCount = samplesCount || 10;
@@ -25382,19 +25621,19 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
25382
25621
  let bytesNotified = 0;
25383
25622
  const _speedometer = speedometer_default(50, 250);
25384
25623
  return throttle_default((e) => {
25385
- const loaded = e.loaded;
25624
+ const rawLoaded = e.loaded;
25386
25625
  const total = e.lengthComputable ? e.total : void 0;
25387
- const progressBytes = loaded - bytesNotified;
25626
+ const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
25627
+ const progressBytes = Math.max(0, loaded - bytesNotified);
25388
25628
  const rate = _speedometer(progressBytes);
25389
- const inRange = loaded <= total;
25390
- bytesNotified = loaded;
25629
+ bytesNotified = Math.max(bytesNotified, loaded);
25391
25630
  const data = {
25392
25631
  loaded,
25393
25632
  total,
25394
25633
  progress: total ? loaded / total : void 0,
25395
25634
  bytes: progressBytes,
25396
25635
  rate: rate ? rate : void 0,
25397
- estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
25636
+ estimated: rate && total ? (total - loaded) / rate : void 0,
25398
25637
  event: e,
25399
25638
  lengthComputable: total != null,
25400
25639
  [isDownloadStream ? "download" : "upload"]: true
@@ -25404,11 +25643,14 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
25404
25643
  };
25405
25644
  var progressEventDecorator = (total, throttled) => {
25406
25645
  const lengthComputable = total != null;
25407
- return [(loaded) => throttled[0]({
25408
- lengthComputable,
25409
- total,
25410
- loaded
25411
- }), throttled[1]];
25646
+ return [
25647
+ (loaded) => throttled[0]({
25648
+ lengthComputable,
25649
+ total,
25650
+ loaded
25651
+ }),
25652
+ throttled[1]
25653
+ ];
25412
25654
  };
25413
25655
  var asyncDecorator = (fn) => (...args2) => utils_default.asap(() => fn(...args2));
25414
25656
 
@@ -25475,6 +25717,8 @@ var brotliOptions = {
25475
25717
  var isBrotliSupported = utils_default.isFunction(import_zlib.default.createBrotliDecompress);
25476
25718
  var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
25477
25719
  var isHttps = /https:?/;
25720
+ var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
25721
+ var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
25478
25722
  var supportedProtocols = platform_default.protocols.map((protocol) => {
25479
25723
  return protocol + ":";
25480
25724
  });
@@ -25487,9 +25731,12 @@ var Http2Sessions = class {
25487
25731
  this.sessions = /* @__PURE__ */ Object.create(null);
25488
25732
  }
25489
25733
  getSession(authority, options) {
25490
- options = Object.assign({
25491
- sessionTimeout: 1e3
25492
- }, options);
25734
+ options = Object.assign(
25735
+ {
25736
+ sessionTimeout: 1e3
25737
+ },
25738
+ options
25739
+ );
25493
25740
  let authoritySessions = this.sessions[authority];
25494
25741
  if (authoritySessions) {
25495
25742
  let len = authoritySessions.length;
@@ -25515,6 +25762,9 @@ var Http2Sessions = class {
25515
25762
  } else {
25516
25763
  entries.splice(i, 1);
25517
25764
  }
25765
+ if (!session.closed) {
25766
+ session.close();
25767
+ }
25518
25768
  return;
25519
25769
  }
25520
25770
  }
@@ -25543,10 +25793,7 @@ var Http2Sessions = class {
25543
25793
  };
25544
25794
  }
25545
25795
  session.once("close", removeSession);
25546
- let entry = [
25547
- session,
25548
- options
25549
- ];
25796
+ let entry = [session, options];
25550
25797
  authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
25551
25798
  return session;
25552
25799
  }
@@ -25563,9 +25810,11 @@ function dispatchBeforeRedirect(options, responseDetails) {
25563
25810
  function setProxy(options, configProxy, location) {
25564
25811
  let proxy = configProxy;
25565
25812
  if (!proxy && proxy !== false) {
25566
- const proxyUrl = import_proxy_from_env.default.getProxyForUrl(location);
25813
+ const proxyUrl = getProxyForUrl(location);
25567
25814
  if (proxyUrl) {
25568
- proxy = new URL(proxyUrl);
25815
+ if (!shouldBypassProxy(location)) {
25816
+ proxy = new URL(proxyUrl);
25817
+ }
25569
25818
  }
25570
25819
  }
25571
25820
  if (proxy) {
@@ -25573,8 +25822,11 @@ function setProxy(options, configProxy, location) {
25573
25822
  proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
25574
25823
  }
25575
25824
  if (proxy.auth) {
25576
- if (proxy.auth.username || proxy.auth.password) {
25825
+ const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password);
25826
+ if (validProxyAuth) {
25577
25827
  proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
25828
+ } else if (typeof proxy.auth === "object") {
25829
+ throw new AxiosError_default("Invalid proxy authorization", AxiosError_default.ERR_BAD_OPTION, { proxy });
25578
25830
  }
25579
25831
  const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
25580
25832
  options.headers["Proxy-Authorization"] = "Basic " + base64;
@@ -25626,15 +25878,10 @@ var resolveFamily = ({ address, family }) => {
25626
25878
  var buildAddressEntry = (address, family) => resolveFamily(utils_default.isObject(address) ? address : { address, family });
25627
25879
  var http2Transport = {
25628
25880
  request(options, cb) {
25629
- const authority = options.protocol + "//" + options.hostname + ":" + (options.port || 80);
25881
+ const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
25630
25882
  const { http2Options, headers } = options;
25631
25883
  const session = http2Sessions.getSession(authority, http2Options);
25632
- const {
25633
- HTTP2_HEADER_SCHEME,
25634
- HTTP2_HEADER_METHOD,
25635
- HTTP2_HEADER_PATH,
25636
- HTTP2_HEADER_STATUS
25637
- } = import_http2.default.constants;
25884
+ const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = import_http2.default.constants;
25638
25885
  const http2Headers = {
25639
25886
  [HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
25640
25887
  [HTTP2_HEADER_METHOD]: options.method,
@@ -25658,8 +25905,15 @@ var http2Transport = {
25658
25905
  };
25659
25906
  var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25660
25907
  return wrapAsync(async function dispatchHttpRequest(resolve3, reject, onDone) {
25661
- let { data, lookup, family, httpVersion = 1, http2Options } = config;
25662
- const { responseType, responseEncoding } = config;
25908
+ const own2 = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
25909
+ let data = own2("data");
25910
+ let lookup = own2("lookup");
25911
+ let family = own2("family");
25912
+ let httpVersion = own2("httpVersion");
25913
+ if (httpVersion === void 0) httpVersion = 1;
25914
+ let http2Options = own2("http2Options");
25915
+ const responseType = own2("responseType");
25916
+ const responseEncoding = own2("responseEncoding");
25663
25917
  const method = config.method.toUpperCase();
25664
25918
  let isDone;
25665
25919
  let rejected = false;
@@ -25687,7 +25941,10 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25687
25941
  const abortEmitter = new import_events.EventEmitter();
25688
25942
  function abort(reason) {
25689
25943
  try {
25690
- abortEmitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config, req) : reason);
25944
+ abortEmitter.emit(
25945
+ "abort",
25946
+ !reason || reason.type ? new CanceledError_default(null, config, req) : reason
25947
+ );
25691
25948
  } catch (err) {
25692
25949
  console.warn("emit error", err);
25693
25950
  }
@@ -25733,11 +25990,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25733
25990
  const dataUrl = String(config.url || fullPath || "");
25734
25991
  const estimated = estimateDataURLDecodedBytes(dataUrl);
25735
25992
  if (estimated > config.maxContentLength) {
25736
- return reject(new AxiosError_default(
25737
- "maxContentLength size of " + config.maxContentLength + " exceeded",
25738
- AxiosError_default.ERR_BAD_RESPONSE,
25739
- config
25740
- ));
25993
+ return reject(
25994
+ new AxiosError_default(
25995
+ "maxContentLength size of " + config.maxContentLength + " exceeded",
25996
+ AxiosError_default.ERR_BAD_RESPONSE,
25997
+ config
25998
+ )
25999
+ );
25741
26000
  }
25742
26001
  }
25743
26002
  let convertedData;
@@ -25773,11 +26032,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25773
26032
  });
25774
26033
  }
25775
26034
  if (supportedProtocols.indexOf(protocol) === -1) {
25776
- return reject(new AxiosError_default(
25777
- "Unsupported protocol " + protocol,
25778
- AxiosError_default.ERR_BAD_REQUEST,
25779
- config
25780
- ));
26035
+ return reject(
26036
+ new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_BAD_REQUEST, config)
26037
+ );
25781
26038
  }
25782
26039
  const headers = AxiosHeaders_default.from(config.headers).normalize();
25783
26040
  headers.set("User-Agent", "axios/" + VERSION, false);
@@ -25787,13 +26044,17 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25787
26044
  let maxDownloadRate = void 0;
25788
26045
  if (utils_default.isSpecCompliantForm(data)) {
25789
26046
  const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
25790
- data = formDataToStream_default(data, (formHeaders) => {
25791
- headers.set(formHeaders);
25792
- }, {
25793
- tag: `axios-${VERSION}-boundary`,
25794
- boundary: userBoundary && userBoundary[1] || void 0
25795
- });
25796
- } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) {
26047
+ data = formDataToStream_default(
26048
+ data,
26049
+ (formHeaders) => {
26050
+ headers.set(formHeaders);
26051
+ },
26052
+ {
26053
+ tag: `axios-${VERSION}-boundary`,
26054
+ boundary: userBoundary && userBoundary[1] || void 0
26055
+ }
26056
+ );
26057
+ } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
25797
26058
  headers.set(data.getHeaders());
25798
26059
  if (!headers.hasContentLength()) {
25799
26060
  try {
@@ -25813,19 +26074,23 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25813
26074
  } else if (utils_default.isString(data)) {
25814
26075
  data = Buffer.from(data, "utf-8");
25815
26076
  } else {
25816
- return reject(new AxiosError_default(
25817
- "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
25818
- AxiosError_default.ERR_BAD_REQUEST,
25819
- config
25820
- ));
26077
+ return reject(
26078
+ new AxiosError_default(
26079
+ "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
26080
+ AxiosError_default.ERR_BAD_REQUEST,
26081
+ config
26082
+ )
26083
+ );
25821
26084
  }
25822
26085
  headers.setContentLength(data.length, false);
25823
26086
  if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
25824
- return reject(new AxiosError_default(
25825
- "Request body larger than maxBodyLength limit",
25826
- AxiosError_default.ERR_BAD_REQUEST,
25827
- config
25828
- ));
26087
+ return reject(
26088
+ new AxiosError_default(
26089
+ "Request body larger than maxBodyLength limit",
26090
+ AxiosError_default.ERR_BAD_REQUEST,
26091
+ config
26092
+ )
26093
+ );
25829
26094
  }
25830
26095
  }
25831
26096
  const contentLength = utils_default.toFiniteNumber(headers.getContentLength());
@@ -25839,21 +26104,31 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25839
26104
  if (!utils_default.isStream(data)) {
25840
26105
  data = import_stream5.default.Readable.from(data, { objectMode: false });
25841
26106
  }
25842
- data = import_stream5.default.pipeline([data, new AxiosTransformStream_default({
25843
- maxRate: utils_default.toFiniteNumber(maxUploadRate)
25844
- })], utils_default.noop);
25845
- onUploadProgress && data.on("progress", flushOnFinish(
25846
- data,
25847
- progressEventDecorator(
25848
- contentLength,
25849
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
26107
+ data = import_stream5.default.pipeline(
26108
+ [
26109
+ data,
26110
+ new AxiosTransformStream_default({
26111
+ maxRate: utils_default.toFiniteNumber(maxUploadRate)
26112
+ })
26113
+ ],
26114
+ utils_default.noop
26115
+ );
26116
+ onUploadProgress && data.on(
26117
+ "progress",
26118
+ flushOnFinish(
26119
+ data,
26120
+ progressEventDecorator(
26121
+ contentLength,
26122
+ progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
26123
+ )
25850
26124
  )
25851
- ));
26125
+ );
25852
26126
  }
25853
26127
  let auth = void 0;
25854
- if (config.auth) {
25855
- const username = config.auth.username || "";
25856
- const password = config.auth.password || "";
26128
+ const configAuth = own2("auth");
26129
+ if (configAuth) {
26130
+ const username = configAuth.username || "";
26131
+ const password = configAuth.password || "";
25857
26132
  auth = username + ":" + password;
25858
26133
  }
25859
26134
  if (!auth && parsed.username) {
@@ -25881,7 +26156,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25881
26156
  "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""),
25882
26157
  false
25883
26158
  );
25884
- const options = {
26159
+ const options = Object.assign(/* @__PURE__ */ Object.create(null), {
25885
26160
  path,
25886
26161
  method,
25887
26162
  headers: headers.toJSON(),
@@ -25890,16 +26165,41 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25890
26165
  protocol,
25891
26166
  family,
25892
26167
  beforeRedirect: dispatchBeforeRedirect,
25893
- beforeRedirects: {},
26168
+ beforeRedirects: /* @__PURE__ */ Object.create(null),
25894
26169
  http2Options
25895
- };
26170
+ });
25896
26171
  !utils_default.isUndefined(lookup) && (options.lookup = lookup);
25897
26172
  if (config.socketPath) {
26173
+ if (typeof config.socketPath !== "string") {
26174
+ return reject(new AxiosError_default(
26175
+ "socketPath must be a string",
26176
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
26177
+ config
26178
+ ));
26179
+ }
26180
+ if (config.allowedSocketPaths != null) {
26181
+ const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
26182
+ const resolvedSocket = (0, import_path.resolve)(config.socketPath);
26183
+ const isAllowed = allowed.some(
26184
+ (entry) => typeof entry === "string" && (0, import_path.resolve)(entry) === resolvedSocket
26185
+ );
26186
+ if (!isAllowed) {
26187
+ return reject(new AxiosError_default(
26188
+ `socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`,
26189
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
26190
+ config
26191
+ ));
26192
+ }
26193
+ }
25898
26194
  options.socketPath = config.socketPath;
25899
26195
  } else {
25900
26196
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
25901
26197
  options.port = parsed.port;
25902
- setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
26198
+ setProxy(
26199
+ options,
26200
+ config.proxy,
26201
+ protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path
26202
+ );
25903
26203
  }
25904
26204
  let transport;
25905
26205
  const isHttpsRequest = isHttps.test(options.protocol);
@@ -25907,16 +26207,18 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25907
26207
  if (isHttp2) {
25908
26208
  transport = http2Transport;
25909
26209
  } else {
25910
- if (config.transport) {
25911
- transport = config.transport;
26210
+ const configTransport = own2("transport");
26211
+ if (configTransport) {
26212
+ transport = configTransport;
25912
26213
  } else if (config.maxRedirects === 0) {
25913
26214
  transport = isHttpsRequest ? import_https.default : import_http.default;
25914
26215
  } else {
25915
26216
  if (config.maxRedirects) {
25916
26217
  options.maxRedirects = config.maxRedirects;
25917
26218
  }
25918
- if (config.beforeRedirect) {
25919
- options.beforeRedirects.config = config.beforeRedirect;
26219
+ const configBeforeRedirect = own2("beforeRedirect");
26220
+ if (configBeforeRedirect) {
26221
+ options.beforeRedirects.config = configBeforeRedirect;
25920
26222
  }
25921
26223
  transport = isHttpsRequest ? httpsFollow : httpFollow;
25922
26224
  }
@@ -25926,9 +26228,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25926
26228
  } else {
25927
26229
  options.maxBodyLength = Infinity;
25928
26230
  }
25929
- if (config.insecureHTTPParser) {
25930
- options.insecureHTTPParser = config.insecureHTTPParser;
25931
- }
26231
+ options.insecureHTTPParser = Boolean(own2("insecureHTTPParser"));
25932
26232
  req = transport.request(options, function handleResponse(res) {
25933
26233
  if (req.destroyed) return;
25934
26234
  const streams = [res];
@@ -25937,13 +26237,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25937
26237
  const transformStream = new AxiosTransformStream_default({
25938
26238
  maxRate: utils_default.toFiniteNumber(maxDownloadRate)
25939
26239
  });
25940
- onDownloadProgress && transformStream.on("progress", flushOnFinish(
25941
- transformStream,
25942
- progressEventDecorator(
25943
- responseLength,
25944
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
26240
+ onDownloadProgress && transformStream.on(
26241
+ "progress",
26242
+ flushOnFinish(
26243
+ transformStream,
26244
+ progressEventDecorator(
26245
+ responseLength,
26246
+ progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
26247
+ )
25945
26248
  )
25946
- ));
26249
+ );
25947
26250
  streams.push(transformStream);
25948
26251
  }
25949
26252
  let responseStream = res;
@@ -25982,6 +26285,28 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25982
26285
  request: lastRequest
25983
26286
  };
25984
26287
  if (responseType === "stream") {
26288
+ if (config.maxContentLength > -1) {
26289
+ const limit = config.maxContentLength;
26290
+ const source = responseStream;
26291
+ async function* enforceMaxContentLength() {
26292
+ let totalResponseBytes = 0;
26293
+ for await (const chunk of source) {
26294
+ totalResponseBytes += chunk.length;
26295
+ if (totalResponseBytes > limit) {
26296
+ throw new AxiosError_default(
26297
+ "maxContentLength size of " + limit + " exceeded",
26298
+ AxiosError_default.ERR_BAD_RESPONSE,
26299
+ config,
26300
+ lastRequest
26301
+ );
26302
+ }
26303
+ yield chunk;
26304
+ }
26305
+ }
26306
+ responseStream = import_stream5.default.Readable.from(enforceMaxContentLength(), {
26307
+ objectMode: false
26308
+ });
26309
+ }
25985
26310
  response.data = responseStream;
25986
26311
  settle(resolve3, reject, response);
25987
26312
  } else {
@@ -25993,12 +26318,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
25993
26318
  if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
25994
26319
  rejected = true;
25995
26320
  responseStream.destroy();
25996
- abort(new AxiosError_default(
25997
- "maxContentLength size of " + config.maxContentLength + " exceeded",
25998
- AxiosError_default.ERR_BAD_RESPONSE,
25999
- config,
26000
- lastRequest
26001
- ));
26321
+ abort(
26322
+ new AxiosError_default(
26323
+ "maxContentLength size of " + config.maxContentLength + " exceeded",
26324
+ AxiosError_default.ERR_BAD_RESPONSE,
26325
+ config,
26326
+ lastRequest
26327
+ )
26328
+ );
26002
26329
  }
26003
26330
  });
26004
26331
  responseStream.on("aborted", function handlerStreamAborted() {
@@ -26053,16 +26380,33 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26053
26380
  });
26054
26381
  req.on("socket", function handleRequestSocket(socket) {
26055
26382
  socket.setKeepAlive(true, 1e3 * 60);
26383
+ if (!socket[kAxiosSocketListener]) {
26384
+ socket.on("error", function handleSocketError(err) {
26385
+ const current2 = socket[kAxiosCurrentReq];
26386
+ if (current2 && !current2.destroyed) {
26387
+ current2.destroy(err);
26388
+ }
26389
+ });
26390
+ socket[kAxiosSocketListener] = true;
26391
+ }
26392
+ socket[kAxiosCurrentReq] = req;
26393
+ req.once("close", function clearCurrentReq() {
26394
+ if (socket[kAxiosCurrentReq] === req) {
26395
+ socket[kAxiosCurrentReq] = null;
26396
+ }
26397
+ });
26056
26398
  });
26057
26399
  if (config.timeout) {
26058
26400
  const timeout = parseInt(config.timeout, 10);
26059
26401
  if (Number.isNaN(timeout)) {
26060
- abort(new AxiosError_default(
26061
- "error trying to parse `config.timeout` to int",
26062
- AxiosError_default.ERR_BAD_OPTION_VALUE,
26063
- config,
26064
- req
26065
- ));
26402
+ abort(
26403
+ new AxiosError_default(
26404
+ "error trying to parse `config.timeout` to int",
26405
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
26406
+ config,
26407
+ req
26408
+ )
26409
+ );
26066
26410
  return;
26067
26411
  }
26068
26412
  req.setTimeout(timeout, function handleRequestTimeout() {
@@ -26072,12 +26416,14 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26072
26416
  if (config.timeoutErrorMessage) {
26073
26417
  timeoutErrorMessage = config.timeoutErrorMessage;
26074
26418
  }
26075
- abort(new AxiosError_default(
26076
- timeoutErrorMessage,
26077
- transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
26078
- config,
26079
- req
26080
- ));
26419
+ abort(
26420
+ new AxiosError_default(
26421
+ timeoutErrorMessage,
26422
+ transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
26423
+ config,
26424
+ req
26425
+ )
26426
+ );
26081
26427
  });
26082
26428
  } else {
26083
26429
  req.setTimeout(0);
@@ -26097,7 +26443,37 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
26097
26443
  abort(new CanceledError_default("Request stream has been aborted", config, req));
26098
26444
  }
26099
26445
  });
26100
- data.pipe(req);
26446
+ let uploadStream = data;
26447
+ if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
26448
+ const limit = config.maxBodyLength;
26449
+ let bytesSent = 0;
26450
+ uploadStream = import_stream5.default.pipeline(
26451
+ [
26452
+ data,
26453
+ new import_stream5.default.Transform({
26454
+ transform(chunk, _enc, cb) {
26455
+ bytesSent += chunk.length;
26456
+ if (bytesSent > limit) {
26457
+ return cb(
26458
+ new AxiosError_default(
26459
+ "Request body larger than maxBodyLength limit",
26460
+ AxiosError_default.ERR_BAD_REQUEST,
26461
+ config,
26462
+ req
26463
+ )
26464
+ );
26465
+ }
26466
+ cb(null, chunk);
26467
+ }
26468
+ })
26469
+ ],
26470
+ utils_default.noop
26471
+ );
26472
+ uploadStream.on("error", (err) => {
26473
+ if (!req.destroyed) req.destroy(err);
26474
+ });
26475
+ }
26476
+ uploadStream.pipe(req);
26101
26477
  } else {
26102
26478
  data && req.write(data);
26103
26479
  req.end();
@@ -26164,7 +26540,13 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
26164
26540
  var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
26165
26541
  function mergeConfig(config1, config2) {
26166
26542
  config2 = config2 || {};
26167
- const config = {};
26543
+ const config = /* @__PURE__ */ Object.create(null);
26544
+ Object.defineProperty(config, "hasOwnProperty", {
26545
+ value: Object.prototype.hasOwnProperty,
26546
+ enumerable: false,
26547
+ writable: true,
26548
+ configurable: true
26549
+ });
26168
26550
  function getMergedValue(target, source, prop, caseless) {
26169
26551
  if (utils_default.isPlainObject(target) && utils_default.isPlainObject(source)) {
26170
26552
  return utils_default.merge.call({ caseless }, target, source);
@@ -26195,9 +26577,9 @@ function mergeConfig(config1, config2) {
26195
26577
  }
26196
26578
  }
26197
26579
  function mergeDirectKeys(a, b, prop) {
26198
- if (prop in config2) {
26580
+ if (utils_default.hasOwnProp(config2, prop)) {
26199
26581
  return getMergedValue(a, b);
26200
- } else if (prop in config1) {
26582
+ } else if (utils_default.hasOwnProp(config1, prop)) {
26201
26583
  return getMergedValue(void 0, a);
26202
26584
  }
26203
26585
  }
@@ -26228,13 +26610,17 @@ function mergeConfig(config1, config2) {
26228
26610
  httpsAgent: defaultToConfig2,
26229
26611
  cancelToken: defaultToConfig2,
26230
26612
  socketPath: defaultToConfig2,
26613
+ allowedSocketPaths: defaultToConfig2,
26231
26614
  responseEncoding: defaultToConfig2,
26232
26615
  validateStatus: mergeDirectKeys,
26233
26616
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
26234
26617
  };
26235
26618
  utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
26236
- const merge2 = mergeMap[prop] || mergeDeepProperties;
26237
- const configValue = merge2(config1[prop], config2[prop], prop);
26619
+ if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
26620
+ const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
26621
+ const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0;
26622
+ const b = utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0;
26623
+ const configValue = merge2(a, b, prop);
26238
26624
  utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
26239
26625
  });
26240
26626
  return config;
@@ -26243,13 +26629,28 @@ function mergeConfig(config1, config2) {
26243
26629
  // ../../../node_modules/axios/lib/helpers/resolveConfig.js
26244
26630
  var resolveConfig_default = (config) => {
26245
26631
  const newConfig = mergeConfig({}, config);
26246
- let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
26632
+ const own2 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
26633
+ const data = own2("data");
26634
+ let withXSRFToken = own2("withXSRFToken");
26635
+ const xsrfHeaderName = own2("xsrfHeaderName");
26636
+ const xsrfCookieName = own2("xsrfCookieName");
26637
+ let headers = own2("headers");
26638
+ const auth = own2("auth");
26639
+ const baseURL = own2("baseURL");
26640
+ const allowAbsoluteUrls = own2("allowAbsoluteUrls");
26641
+ const url2 = own2("url");
26247
26642
  newConfig.headers = headers = AxiosHeaders_default.from(headers);
26248
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
26643
+ newConfig.url = buildURL(
26644
+ buildFullPath(baseURL, url2, allowAbsoluteUrls),
26645
+ config.params,
26646
+ config.paramsSerializer
26647
+ );
26249
26648
  if (auth) {
26250
26649
  headers.set(
26251
26650
  "Authorization",
26252
- "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
26651
+ "Basic " + btoa(
26652
+ (auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")
26653
+ )
26253
26654
  );
26254
26655
  }
26255
26656
  if (utils_default.isFormData(data)) {
@@ -26266,8 +26667,11 @@ var resolveConfig_default = (config) => {
26266
26667
  }
26267
26668
  }
26268
26669
  if (platform_default.hasStandardBrowserEnv) {
26269
- withXSRFToken && utils_default.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
26270
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin_default(newConfig.url)) {
26670
+ if (utils_default.isFunction(withXSRFToken)) {
26671
+ withXSRFToken = withXSRFToken(newConfig);
26672
+ }
26673
+ const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin_default(newConfig.url);
26674
+ if (shouldSendXSRF) {
26271
26675
  const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies_default.read(xsrfCookieName);
26272
26676
  if (xsrfValue) {
26273
26677
  headers.set(xsrfHeaderName, xsrfValue);
@@ -26313,13 +26717,17 @@ var xhr_default = isXHRAdapterSupported && function(config) {
26313
26717
  config,
26314
26718
  request
26315
26719
  };
26316
- settle(function _resolve(value) {
26317
- resolve3(value);
26318
- done();
26319
- }, function _reject(err) {
26320
- reject(err);
26321
- done();
26322
- }, response);
26720
+ settle(
26721
+ function _resolve(value) {
26722
+ resolve3(value);
26723
+ done();
26724
+ },
26725
+ function _reject(err) {
26726
+ reject(err);
26727
+ done();
26728
+ },
26729
+ response
26730
+ );
26323
26731
  request = null;
26324
26732
  }
26325
26733
  if ("onloadend" in request) {
@@ -26355,12 +26763,14 @@ var xhr_default = isXHRAdapterSupported && function(config) {
26355
26763
  if (_config.timeoutErrorMessage) {
26356
26764
  timeoutErrorMessage = _config.timeoutErrorMessage;
26357
26765
  }
26358
- reject(new AxiosError_default(
26359
- timeoutErrorMessage,
26360
- transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
26361
- config,
26362
- request
26363
- ));
26766
+ reject(
26767
+ new AxiosError_default(
26768
+ timeoutErrorMessage,
26769
+ transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
26770
+ config,
26771
+ request
26772
+ )
26773
+ );
26364
26774
  request = null;
26365
26775
  };
26366
26776
  requestData === void 0 && requestHeaders.setContentType(null);
@@ -26400,7 +26810,13 @@ var xhr_default = isXHRAdapterSupported && function(config) {
26400
26810
  }
26401
26811
  const protocol = parseProtocol(_config.url);
26402
26812
  if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
26403
- reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config));
26813
+ reject(
26814
+ new AxiosError_default(
26815
+ "Unsupported protocol " + protocol + ":",
26816
+ AxiosError_default.ERR_BAD_REQUEST,
26817
+ config
26818
+ )
26819
+ );
26404
26820
  return;
26405
26821
  }
26406
26822
  request.send(requestData || null);
@@ -26418,12 +26834,14 @@ var composeSignals = (signals2, timeout) => {
26418
26834
  aborted = true;
26419
26835
  unsubscribe();
26420
26836
  const err = reason instanceof Error ? reason : this.reason;
26421
- controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
26837
+ controller.abort(
26838
+ err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)
26839
+ );
26422
26840
  }
26423
26841
  };
26424
26842
  let timer = timeout && setTimeout(() => {
26425
26843
  timer = null;
26426
- onabort(new AxiosError_default(`timeout ${timeout} of ms exceeded`, AxiosError_default.ETIMEDOUT));
26844
+ onabort(new AxiosError_default(`timeout of ${timeout}ms exceeded`, AxiosError_default.ETIMEDOUT));
26427
26845
  }, timeout);
26428
26846
  const unsubscribe = () => {
26429
26847
  if (signals2) {
@@ -26491,33 +26909,36 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
26491
26909
  onFinish && onFinish(e);
26492
26910
  }
26493
26911
  };
26494
- return new ReadableStream({
26495
- async pull(controller) {
26496
- try {
26497
- const { done: done2, value } = await iterator2.next();
26498
- if (done2) {
26499
- _onFinish();
26500
- controller.close();
26501
- return;
26502
- }
26503
- let len = value.byteLength;
26504
- if (onProgress) {
26505
- let loadedBytes = bytes += len;
26506
- onProgress(loadedBytes);
26912
+ return new ReadableStream(
26913
+ {
26914
+ async pull(controller) {
26915
+ try {
26916
+ const { done: done2, value } = await iterator2.next();
26917
+ if (done2) {
26918
+ _onFinish();
26919
+ controller.close();
26920
+ return;
26921
+ }
26922
+ let len = value.byteLength;
26923
+ if (onProgress) {
26924
+ let loadedBytes = bytes += len;
26925
+ onProgress(loadedBytes);
26926
+ }
26927
+ controller.enqueue(new Uint8Array(value));
26928
+ } catch (err) {
26929
+ _onFinish(err);
26930
+ throw err;
26507
26931
  }
26508
- controller.enqueue(new Uint8Array(value));
26509
- } catch (err) {
26510
- _onFinish(err);
26511
- throw err;
26932
+ },
26933
+ cancel(reason) {
26934
+ _onFinish(reason);
26935
+ return iterator2.return();
26512
26936
  }
26513
26937
  },
26514
- cancel(reason) {
26515
- _onFinish(reason);
26516
- return iterator2.return();
26938
+ {
26939
+ highWaterMark: 2
26517
26940
  }
26518
- }, {
26519
- highWaterMark: 2
26520
- });
26941
+ );
26521
26942
  };
26522
26943
 
26523
26944
  // ../../../node_modules/axios/lib/adapters/fetch.js
@@ -26527,10 +26948,7 @@ var globalFetchAPI = (({ Request, Response }) => ({
26527
26948
  Request,
26528
26949
  Response
26529
26950
  }))(utils_default.global);
26530
- var {
26531
- ReadableStream: ReadableStream2,
26532
- TextEncoder: TextEncoder2
26533
- } = utils_default.global;
26951
+ var { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global;
26534
26952
  var test = (fn, ...args2) => {
26535
26953
  try {
26536
26954
  return !!fn(...args2);
@@ -26539,9 +26957,13 @@ var test = (fn, ...args2) => {
26539
26957
  }
26540
26958
  };
26541
26959
  var factory = (env3) => {
26542
- env3 = utils_default.merge.call({
26543
- skipUndefined: true
26544
- }, globalFetchAPI, env3);
26960
+ env3 = utils_default.merge.call(
26961
+ {
26962
+ skipUndefined: true
26963
+ },
26964
+ globalFetchAPI,
26965
+ env3
26966
+ );
26545
26967
  const { fetch: envFetch, Request, Response } = env3;
26546
26968
  const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
26547
26969
  const isRequestSupported = isFunction2(Request);
@@ -26553,14 +26975,18 @@ var factory = (env3) => {
26553
26975
  const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
26554
26976
  const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
26555
26977
  let duplexAccessed = false;
26556
- const hasContentType = new Request(platform_default.origin, {
26978
+ const request = new Request(platform_default.origin, {
26557
26979
  body: new ReadableStream2(),
26558
26980
  method: "POST",
26559
26981
  get duplex() {
26560
26982
  duplexAccessed = true;
26561
26983
  return "half";
26562
26984
  }
26563
- }).headers.has("Content-Type");
26985
+ });
26986
+ const hasContentType = request.headers.has("Content-Type");
26987
+ if (request.body != null) {
26988
+ request.body.cancel();
26989
+ }
26564
26990
  return duplexAccessed && !hasContentType;
26565
26991
  });
26566
26992
  const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
@@ -26574,7 +27000,11 @@ var factory = (env3) => {
26574
27000
  if (method) {
26575
27001
  return method.call(res);
26576
27002
  }
26577
- throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config);
27003
+ throw new AxiosError_default(
27004
+ `Response type '${type}' is not supported`,
27005
+ AxiosError_default.ERR_NOT_SUPPORT,
27006
+ config
27007
+ );
26578
27008
  });
26579
27009
  });
26580
27010
  })();
@@ -26623,7 +27053,10 @@ var factory = (env3) => {
26623
27053
  } = resolveConfig_default(config);
26624
27054
  let _fetch = envFetch || fetch;
26625
27055
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
26626
- let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
27056
+ let composedSignal = composeSignals_default(
27057
+ [signal, cancelToken && cancelToken.toAbortSignal()],
27058
+ timeout
27059
+ );
26627
27060
  let request = null;
26628
27061
  const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
26629
27062
  composedSignal.unsubscribe();
@@ -26652,6 +27085,12 @@ var factory = (env3) => {
26652
27085
  withCredentials = withCredentials ? "include" : "omit";
26653
27086
  }
26654
27087
  const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
27088
+ if (utils_default.isFormData(data)) {
27089
+ const contentType = headers.getContentType();
27090
+ if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) {
27091
+ headers.delete("content-type");
27092
+ }
27093
+ }
26655
27094
  const resolvedOptions = {
26656
27095
  ...fetchOptions,
26657
27096
  signal: composedSignal,
@@ -26683,7 +27122,10 @@ var factory = (env3) => {
26683
27122
  );
26684
27123
  }
26685
27124
  responseType = responseType || "text";
26686
- let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config);
27125
+ let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](
27126
+ response,
27127
+ config
27128
+ );
26687
27129
  !isStreamResponse && unsubscribe && unsubscribe();
26688
27130
  return await new Promise((resolve3, reject) => {
26689
27131
  settle(resolve3, reject, {
@@ -26699,13 +27141,19 @@ var factory = (env3) => {
26699
27141
  unsubscribe && unsubscribe();
26700
27142
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
26701
27143
  throw Object.assign(
26702
- new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config, request),
27144
+ new AxiosError_default(
27145
+ "Network Error",
27146
+ AxiosError_default.ERR_NETWORK,
27147
+ config,
27148
+ request,
27149
+ err && err.response
27150
+ ),
26703
27151
  {
26704
27152
  cause: err.cause || err
26705
27153
  }
26706
27154
  );
26707
27155
  }
26708
- throw AxiosError_default.from(err, err && err.code, config, request);
27156
+ throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
26709
27157
  }
26710
27158
  };
26711
27159
  };
@@ -26713,11 +27161,7 @@ var seedCache = /* @__PURE__ */ new Map();
26713
27161
  var getFetch = (config) => {
26714
27162
  let env3 = config && config.env || {};
26715
27163
  const { fetch: fetch2, Request, Response } = env3;
26716
- const seeds = [
26717
- Request,
26718
- Response,
26719
- fetch2
26720
- ];
27164
+ const seeds = [Request, Response, fetch2];
26721
27165
  let len = seeds.length, i = len, seed, target, map = seedCache;
26722
27166
  while (i--) {
26723
27167
  seed = seeds[i];
@@ -26806,37 +27250,33 @@ function throwIfCancellationRequested(config) {
26806
27250
  function dispatchRequest(config) {
26807
27251
  throwIfCancellationRequested(config);
26808
27252
  config.headers = AxiosHeaders_default.from(config.headers);
26809
- config.data = transformData.call(
26810
- config,
26811
- config.transformRequest
26812
- );
27253
+ config.data = transformData.call(config, config.transformRequest);
26813
27254
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
26814
27255
  config.headers.setContentType("application/x-www-form-urlencoded", false);
26815
27256
  }
26816
27257
  const adapter2 = adapters_default.getAdapter(config.adapter || defaults_default.adapter, config);
26817
- return adapter2(config).then(function onAdapterResolution(response) {
26818
- throwIfCancellationRequested(config);
26819
- response.data = transformData.call(
26820
- config,
26821
- config.transformResponse,
26822
- response
26823
- );
26824
- response.headers = AxiosHeaders_default.from(response.headers);
26825
- return response;
26826
- }, function onAdapterRejection(reason) {
26827
- if (!isCancel(reason)) {
27258
+ return adapter2(config).then(
27259
+ function onAdapterResolution(response) {
26828
27260
  throwIfCancellationRequested(config);
26829
- if (reason && reason.response) {
26830
- reason.response.data = transformData.call(
26831
- config,
26832
- config.transformResponse,
26833
- reason.response
26834
- );
26835
- reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
27261
+ response.data = transformData.call(config, config.transformResponse, response);
27262
+ response.headers = AxiosHeaders_default.from(response.headers);
27263
+ return response;
27264
+ },
27265
+ function onAdapterRejection(reason) {
27266
+ if (!isCancel(reason)) {
27267
+ throwIfCancellationRequested(config);
27268
+ if (reason && reason.response) {
27269
+ reason.response.data = transformData.call(
27270
+ config,
27271
+ config.transformResponse,
27272
+ reason.response
27273
+ );
27274
+ reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
27275
+ }
26836
27276
  }
27277
+ return Promise.reject(reason);
26837
27278
  }
26838
- return Promise.reject(reason);
26839
- });
27279
+ );
26840
27280
  }
26841
27281
 
26842
27282
  // ../../../node_modules/axios/lib/helpers/validator.js
@@ -26884,12 +27324,15 @@ function assertOptions(options, schema, allowUnknown) {
26884
27324
  let i = keys.length;
26885
27325
  while (i-- > 0) {
26886
27326
  const opt = keys[i];
26887
- const validator = schema[opt];
27327
+ const validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0;
26888
27328
  if (validator) {
26889
27329
  const value = options[opt];
26890
27330
  const result = value === void 0 || validator(value, opt, options);
26891
27331
  if (result !== true) {
26892
- throw new AxiosError_default("option " + opt + " must be " + result, AxiosError_default.ERR_BAD_OPTION_VALUE);
27332
+ throw new AxiosError_default(
27333
+ "option " + opt + " must be " + result,
27334
+ AxiosError_default.ERR_BAD_OPTION_VALUE
27335
+ );
26893
27336
  }
26894
27337
  continue;
26895
27338
  }
@@ -26928,12 +27371,23 @@ var Axios = class {
26928
27371
  if (err instanceof Error) {
26929
27372
  let dummy = {};
26930
27373
  Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
26931
- const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
27374
+ const stack = (() => {
27375
+ if (!dummy.stack) {
27376
+ return "";
27377
+ }
27378
+ const firstNewlineIndex = dummy.stack.indexOf("\n");
27379
+ return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
27380
+ })();
26932
27381
  try {
26933
27382
  if (!err.stack) {
26934
27383
  err.stack = stack;
26935
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
26936
- err.stack += "\n" + stack;
27384
+ } else if (stack) {
27385
+ const firstNewlineIndex = stack.indexOf("\n");
27386
+ const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
27387
+ const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
27388
+ if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
27389
+ err.stack += "\n" + stack;
27390
+ }
26937
27391
  }
26938
27392
  } catch (e) {
26939
27393
  }
@@ -26951,11 +27405,16 @@ var Axios = class {
26951
27405
  config = mergeConfig(this.defaults, config);
26952
27406
  const { transitional: transitional2, paramsSerializer, headers } = config;
26953
27407
  if (transitional2 !== void 0) {
26954
- validator_default.assertOptions(transitional2, {
26955
- silentJSONParsing: validators2.transitional(validators2.boolean),
26956
- forcedJSONParsing: validators2.transitional(validators2.boolean),
26957
- clarifyTimeoutError: validators2.transitional(validators2.boolean)
26958
- }, false);
27408
+ validator_default.assertOptions(
27409
+ transitional2,
27410
+ {
27411
+ silentJSONParsing: validators2.transitional(validators2.boolean),
27412
+ forcedJSONParsing: validators2.transitional(validators2.boolean),
27413
+ clarifyTimeoutError: validators2.transitional(validators2.boolean),
27414
+ legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
27415
+ },
27416
+ false
27417
+ );
26959
27418
  }
26960
27419
  if (paramsSerializer != null) {
26961
27420
  if (utils_default.isFunction(paramsSerializer)) {
@@ -26963,10 +27422,14 @@ var Axios = class {
26963
27422
  serialize: paramsSerializer
26964
27423
  };
26965
27424
  } else {
26966
- validator_default.assertOptions(paramsSerializer, {
26967
- encode: validators2.function,
26968
- serialize: validators2.function
26969
- }, true);
27425
+ validator_default.assertOptions(
27426
+ paramsSerializer,
27427
+ {
27428
+ encode: validators2.function,
27429
+ serialize: validators2.function
27430
+ },
27431
+ true
27432
+ );
26970
27433
  }
26971
27434
  }
26972
27435
  if (config.allowAbsoluteUrls !== void 0) {
@@ -26975,21 +27438,19 @@ var Axios = class {
26975
27438
  } else {
26976
27439
  config.allowAbsoluteUrls = true;
26977
27440
  }
26978
- validator_default.assertOptions(config, {
26979
- baseUrl: validators2.spelling("baseURL"),
26980
- withXsrfToken: validators2.spelling("withXSRFToken")
26981
- }, true);
26982
- config.method = (config.method || this.defaults.method || "get").toLowerCase();
26983
- let contextHeaders = headers && utils_default.merge(
26984
- headers.common,
26985
- headers[config.method]
26986
- );
26987
- headers && utils_default.forEach(
26988
- ["delete", "get", "head", "post", "put", "patch", "common"],
26989
- (method) => {
26990
- delete headers[method];
26991
- }
27441
+ validator_default.assertOptions(
27442
+ config,
27443
+ {
27444
+ baseUrl: validators2.spelling("baseURL"),
27445
+ withXsrfToken: validators2.spelling("withXSRFToken")
27446
+ },
27447
+ true
26992
27448
  );
27449
+ config.method = (config.method || this.defaults.method || "get").toLowerCase();
27450
+ let contextHeaders = headers && utils_default.merge(headers.common, headers[config.method]);
27451
+ headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
27452
+ delete headers[method];
27453
+ });
26993
27454
  config.headers = AxiosHeaders_default.concat(contextHeaders, headers);
26994
27455
  const requestInterceptorChain = [];
26995
27456
  let synchronousRequestInterceptors = true;
@@ -26998,7 +27459,13 @@ var Axios = class {
26998
27459
  return;
26999
27460
  }
27000
27461
  synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
27001
- requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
27462
+ const transitional3 = config.transitional || transitional_default;
27463
+ const legacyInterceptorReqResOrdering = transitional3 && transitional3.legacyInterceptorReqResOrdering;
27464
+ if (legacyInterceptorReqResOrdering) {
27465
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
27466
+ } else {
27467
+ requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
27468
+ }
27002
27469
  });
27003
27470
  const responseInterceptorChain = [];
27004
27471
  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
@@ -27050,24 +27517,28 @@ var Axios = class {
27050
27517
  };
27051
27518
  utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
27052
27519
  Axios.prototype[method] = function(url2, config) {
27053
- return this.request(mergeConfig(config || {}, {
27054
- method,
27055
- url: url2,
27056
- data: (config || {}).data
27057
- }));
27520
+ return this.request(
27521
+ mergeConfig(config || {}, {
27522
+ method,
27523
+ url: url2,
27524
+ data: (config || {}).data
27525
+ })
27526
+ );
27058
27527
  };
27059
27528
  });
27060
27529
  utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
27061
27530
  function generateHTTPMethod(isForm) {
27062
27531
  return function httpMethod(url2, data, config) {
27063
- return this.request(mergeConfig(config || {}, {
27064
- method,
27065
- headers: isForm ? {
27066
- "Content-Type": "multipart/form-data"
27067
- } : {},
27068
- url: url2,
27069
- data
27070
- }));
27532
+ return this.request(
27533
+ mergeConfig(config || {}, {
27534
+ method,
27535
+ headers: isForm ? {
27536
+ "Content-Type": "multipart/form-data"
27537
+ } : {},
27538
+ url: url2,
27539
+ data
27540
+ })
27541
+ );
27071
27542
  };
27072
27543
  }
27073
27544
  Axios.prototype[method] = generateHTTPMethod();
@@ -27391,7 +27862,7 @@ function getTokenInteractively(url2, httpsAgent) {
27391
27862
 
27392
27863
  // src/io.ts
27393
27864
  var import_os2 = require("os");
27394
- var import_path = require("path");
27865
+ var import_path2 = require("path");
27395
27866
  var import_fs = require("fs");
27396
27867
  function streamToFile(source, target) {
27397
27868
  const dest = (0, import_fs.createWriteStream)(target);
@@ -27403,7 +27874,7 @@ function streamToFile(source, target) {
27403
27874
  }
27404
27875
  function getRandomTempFile() {
27405
27876
  const rid = Math.random().toString(36).split(".").pop();
27406
- return (0, import_path.join)((0, import_os2.tmpdir)(), `microfrontend_${rid}.tgz`);
27877
+ return (0, import_path2.join)((0, import_os2.tmpdir)(), `microfrontend_${rid}.tgz`);
27407
27878
  }
27408
27879
 
27409
27880
  // src/http.ts
@@ -27542,16 +28013,16 @@ function postFile(target, scheme, key, file, customFields = {}, customHeaders =
27542
28013
 
27543
28014
  // src/scripts.ts
27544
28015
  var import_child_process = require("child_process");
27545
- var import_path2 = require("path");
28016
+ var import_path3 = require("path");
27546
28017
  function resolveWinPath(specialFolder, subPath) {
27547
28018
  const basePath = process.env[specialFolder];
27548
28019
  if (basePath) {
27549
- return (0, import_path2.resolve)(basePath, subPath);
28020
+ return (0, import_path3.resolve)(basePath, subPath);
27550
28021
  }
27551
28022
  return void 0;
27552
28023
  }
27553
28024
  function runScript(script, cwd = process.cwd(), output = process.stdout) {
27554
- const bin = (0, import_path2.resolve)(cwd, "./node_modules/.bin");
28025
+ const bin = (0, import_path3.resolve)(cwd, "./node_modules/.bin");
27555
28026
  const sep = isWindows ? ";" : ":";
27556
28027
  const env3 = Object.assign({}, process.env);
27557
28028
  if (isWindows) {
@@ -27601,7 +28072,7 @@ function sanitizeCmdArgs(args2) {
27601
28072
 
27602
28073
  // src/utils.ts
27603
28074
  function runNpmProcess(args2, target, output) {
27604
- const cwd = (0, import_path3.resolve)(process.cwd(), target);
28075
+ const cwd = (0, import_path4.resolve)(process.cwd(), target);
27605
28076
  return runCommand("npm", args2, cwd, output);
27606
28077
  }
27607
28078
  async function findTarball(packageRef, target = ".", ...flags) {
@@ -27652,9 +28123,9 @@ async function getCa(cert) {
27652
28123
  if (cert && typeof cert === "string") {
27653
28124
  const statCert = await (0, import_promises.stat)(cert).catch(() => void 0);
27654
28125
  if (statCert?.isFile()) {
27655
- const dir = (0, import_path3.dirname)(cert);
27656
- const file = (0, import_path3.basename)(cert);
27657
- return await (0, import_promises.readFile)((0, import_path3.resolve)(dir, file));
28126
+ const dir = (0, import_path4.dirname)(cert);
28127
+ const file = (0, import_path4.basename)(cert);
28128
+ return await (0, import_promises.readFile)((0, import_path4.resolve)(dir, file));
27658
28129
  }
27659
28130
  }
27660
28131
  return void 0;
@@ -27665,23 +28136,23 @@ async function getFiles(baseDir, sources, from, agent) {
27665
28136
  const allFiles = await Promise.all(sources.map((s) => matchFiles(baseDir, s)));
27666
28137
  const allMatches = allFiles.reduce((result, files) => [...result, ...files], []).filter(onlyUnique);
27667
28138
  if (allMatches.every(isDirectory)) {
27668
- const dirs = allMatches.filter((m) => (0, import_fs2.existsSync)((0, import_path3.resolve)(m, "package.json")));
28139
+ const dirs = allMatches.filter((m) => (0, import_fs2.existsSync)((0, import_path4.resolve)(m, "package.json")));
27669
28140
  const createdFiles = await Promise.all(
27670
28141
  dirs.map(async (dir) => {
27671
- const packagePath = (0, import_path3.resolve)(dir, "package.json");
28142
+ const packagePath = (0, import_path4.resolve)(dir, "package.json");
27672
28143
  const packageContent = await (0, import_promises.readFile)(packagePath, "utf8");
27673
28144
  try {
27674
28145
  const { name, version } = JSON.parse(packageContent);
27675
28146
  const proposedName = `${name.replace("@", "").replace("/", "-")}-${version}.tgz`;
27676
28147
  const previousFiles = await (0, import_promises.readdir)(dir);
27677
28148
  if (previousFiles.includes(proposedName)) {
27678
- return (0, import_path3.resolve)(dir, proposedName);
28149
+ return (0, import_path4.resolve)(dir, proposedName);
27679
28150
  }
27680
28151
  await createPackage(dir);
27681
28152
  const currentFiles = await (0, import_promises.readdir)(dir);
27682
28153
  const tarball = currentFiles.find((m) => !previousFiles.includes(m) && m.endsWith(".tgz"));
27683
28154
  const target = getRandomTempFile();
27684
- const source = (0, import_path3.resolve)(dir, tarball);
28155
+ const source = (0, import_path4.resolve)(dir, tarball);
27685
28156
  await (0, import_promises.copyFile)(source, target);
27686
28157
  await (0, import_promises.rm)(source);
27687
28158
  return target;
@@ -27742,7 +28213,7 @@ async function run() {
27742
28213
  fail("No micro frontends for publishing found: %s.", sources.join(", "));
27743
28214
  }
27744
28215
  for (const file of files) {
27745
- const fileName = (0, import_path4.basename)(file);
28216
+ const fileName = (0, import_path5.basename)(file);
27746
28217
  const content = await (0, import_promises2.readFile)(file);
27747
28218
  if (content) {
27748
28219
  progress(`Publishing "%s" ...`, file, url2);