@zuplo/cli 6.70.61 → 6.70.62

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 (60) hide show
  1. package/node_modules/@zuplo/core/package.json +1 -1
  2. package/node_modules/@zuplo/graphql/package.json +1 -1
  3. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  4. package/node_modules/@zuplo/otel/package.json +1 -1
  5. package/node_modules/@zuplo/runtime/out/esm/chunk-HYUYKNAF.js +370 -0
  6. package/node_modules/@zuplo/runtime/out/esm/chunk-HYUYKNAF.js.map +1 -0
  7. package/node_modules/@zuplo/runtime/out/esm/chunk-LGEY3NNC.js +26 -0
  8. package/node_modules/@zuplo/runtime/out/esm/chunk-LGEY3NNC.js.map +1 -0
  9. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  10. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  11. package/node_modules/@zuplo/runtime/out/esm/mocks/index.js +1 -1
  12. package/node_modules/@zuplo/runtime/out/types/index.d.ts +3 -1
  13. package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +3 -1
  14. package/node_modules/@zuplo/runtime/out/types/mocks/index.d.ts +3 -1
  15. package/node_modules/@zuplo/runtime/package.json +1 -1
  16. package/node_modules/axios/CHANGELOG.md +42 -0
  17. package/node_modules/axios/README.md +237 -237
  18. package/node_modules/axios/dist/axios.js +113 -21
  19. package/node_modules/axios/dist/axios.min.js +2 -2
  20. package/node_modules/axios/dist/axios.min.js.map +1 -1
  21. package/node_modules/axios/dist/browser/axios.cjs +121 -15
  22. package/node_modules/axios/dist/esm/axios.js +121 -15
  23. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  24. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  25. package/node_modules/axios/dist/node/axios.cjs +249 -107
  26. package/node_modules/axios/index.d.cts +8 -3
  27. package/node_modules/axios/index.d.ts +4 -1
  28. package/node_modules/axios/lib/adapters/fetch.js +79 -0
  29. package/node_modules/axios/lib/adapters/http.js +62 -118
  30. package/node_modules/axios/lib/core/Axios.js +1 -0
  31. package/node_modules/axios/lib/core/AxiosHeaders.js +2 -2
  32. package/node_modules/axios/lib/defaults/transitional.js +1 -0
  33. package/node_modules/axios/lib/env/data.js +1 -1
  34. package/node_modules/axios/lib/helpers/Http2Sessions.js +119 -0
  35. package/node_modules/axios/lib/helpers/buildURL.js +1 -1
  36. package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
  37. package/node_modules/axios/lib/helpers/resolveConfig.js +12 -6
  38. package/node_modules/axios/lib/helpers/toFormData.js +1 -1
  39. package/node_modules/axios/lib/utils.js +23 -2
  40. package/node_modules/axios/package.json +29 -13
  41. package/node_modules/thread-stream/.claude/settings.local.json +15 -0
  42. package/node_modules/thread-stream/CLAUDE.md +64 -0
  43. package/node_modules/thread-stream/README.md +2 -1
  44. package/node_modules/thread-stream/index.js +41 -13
  45. package/node_modules/thread-stream/lib/indexes.js +3 -1
  46. package/node_modules/thread-stream/lib/worker.js +20 -8
  47. package/node_modules/thread-stream/package.json +1 -1
  48. package/node_modules/thread-stream/test/base.test.js +61 -88
  49. package/node_modules/thread-stream/test/message-without-code.js +19 -0
  50. package/node_modules/thread-stream/test/watch-mode.test.js +28 -0
  51. package/package.json +6 -6
  52. package/node_modules/@zuplo/runtime/out/esm/chunk-4SACVMDH.js +0 -26
  53. package/node_modules/@zuplo/runtime/out/esm/chunk-4SACVMDH.js.map +0 -1
  54. package/node_modules/@zuplo/runtime/out/esm/chunk-6WKYPMAI.js +0 -322
  55. package/node_modules/@zuplo/runtime/out/esm/chunk-6WKYPMAI.js.map +0 -1
  56. package/node_modules/axios/dist/axios.js.map +0 -1
  57. package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
  58. package/node_modules/axios/dist/esm/axios.js.map +0 -1
  59. package/node_modules/axios/dist/node/axios.cjs.map +0 -1
  60. /package/node_modules/@zuplo/runtime/out/esm/{chunk-6WKYPMAI.js.LEGAL.txt → chunk-HYUYKNAF.js.LEGAL.txt} +0 -0
@@ -1,4 +1,4 @@
1
- /*! Axios v1.16.1 Copyright (c) 2026 Matt Zabriskie and contributors */
1
+ /*! Axios v1.17.0 Copyright (c) 2026 Matt Zabriskie and contributors */
2
2
  'use strict';
3
3
 
4
4
  /**
@@ -424,7 +424,9 @@ function merge(...objs) {
424
424
  return;
425
425
  }
426
426
 
427
- const targetKey = (caseless && findKey(result, key)) || key;
427
+ // findKey lowercases the key, so caseless lookup only applies to strings —
428
+ // symbol keys are identity-matched.
429
+ const targetKey = (caseless && typeof key === 'string' && findKey(result, key)) || key;
428
430
  // Read via own-prop only — a bare `result[targetKey]` walks the prototype
429
431
  // chain, so a polluted Object.prototype value could surface here and get
430
432
  // copied into the merged result.
@@ -441,7 +443,24 @@ function merge(...objs) {
441
443
  };
442
444
 
443
445
  for (let i = 0, l = objs.length; i < l; i++) {
444
- objs[i] && forEach(objs[i], assignValue);
446
+ const source = objs[i];
447
+ if (!source || isBuffer(source)) {
448
+ continue;
449
+ }
450
+
451
+ forEach(source, assignValue);
452
+
453
+ if (typeof source !== 'object' || isArray(source)) {
454
+ continue;
455
+ }
456
+
457
+ const symbols = Object.getOwnPropertySymbols(source);
458
+ for (let j = 0; j < symbols.length; j++) {
459
+ const symbol = symbols[j];
460
+ if (propertyIsEnumerable.call(source, symbol)) {
461
+ assignValue(source[symbol], symbol);
462
+ }
463
+ }
445
464
  }
446
465
  return result;
447
466
  }
@@ -670,6 +689,8 @@ const hasOwnProperty = (
670
689
  hasOwnProperty.call(obj, prop)
671
690
  )(Object.prototype);
672
691
 
692
+ const { propertyIsEnumerable } = Object.prototype;
693
+
673
694
  /**
674
695
  * Determine if a value is a RegExp object
675
696
  *
@@ -1151,7 +1172,7 @@ class AxiosHeaders {
1151
1172
  const lHeader = normalizeHeader(_header);
1152
1173
 
1153
1174
  if (!lHeader) {
1154
- throw new Error('header name must be a non-empty string');
1175
+ return;
1155
1176
  }
1156
1177
 
1157
1178
  const key = utils$1.findKey(self, lHeader);
@@ -1179,7 +1200,7 @@ class AxiosHeaders {
1179
1200
  key;
1180
1201
  for (const entry of header) {
1181
1202
  if (!utils$1.isArray(entry)) {
1182
- throw TypeError('Object iterator must return a key-value pair');
1203
+ throw new TypeError('Object iterator must return a key-value pair');
1183
1204
  }
1184
1205
 
1185
1206
  obj[(key = entry[0])] = (dest = obj[key])
@@ -1794,7 +1815,7 @@ function toFormData(obj, formData, options) {
1794
1815
  }
1795
1816
 
1796
1817
  if (stack.indexOf(value) !== -1) {
1797
- throw Error('Circular reference detected in ' + path.join('.'));
1818
+ throw new Error('Circular reference detected in ' + path.join('.'));
1798
1819
  }
1799
1820
 
1800
1821
  stack.push(value);
@@ -2011,6 +2032,7 @@ var transitionalDefaults = {
2011
2032
  forcedJSONParsing: true,
2012
2033
  clarifyTimeoutError: false,
2013
2034
  legacyInterceptorReqResOrdering: true,
2035
+ advertiseZstdAcceptEncoding: false,
2014
2036
  };
2015
2037
 
2016
2038
  var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
@@ -2845,12 +2867,12 @@ function setFormDataHeaders(headers, formHeaders, policy) {
2845
2867
  *
2846
2868
  * @returns {string} UTF-8 bytes as a Latin-1 string
2847
2869
  */
2848
- const encodeUTF8 = (str) =>
2870
+ const encodeUTF8$1 = (str) =>
2849
2871
  encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>
2850
2872
  String.fromCharCode(parseInt(hex, 16))
2851
2873
  );
2852
2874
 
2853
- var resolveConfig = (config) => {
2875
+ function resolveConfig(config) {
2854
2876
  const newConfig = mergeConfig({}, config);
2855
2877
 
2856
2878
  // Read only own properties to prevent prototype pollution gadgets
@@ -2871,8 +2893,8 @@ var resolveConfig = (config) => {
2871
2893
 
2872
2894
  newConfig.url = buildURL(
2873
2895
  buildFullPath(baseURL, url, allowAbsoluteUrls),
2874
- config.params,
2875
- config.paramsSerializer
2896
+ own('params'),
2897
+ own('paramsSerializer')
2876
2898
  );
2877
2899
 
2878
2900
  // HTTP basic authentication
@@ -2880,13 +2902,17 @@ var resolveConfig = (config) => {
2880
2902
  headers.set(
2881
2903
  'Authorization',
2882
2904
  'Basic ' +
2883
- btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8(auth.password) : ''))
2905
+ btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8$1(auth.password) : ''))
2884
2906
  );
2885
2907
  }
2886
2908
 
2887
2909
  if (utils$1.isFormData(data)) {
2888
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2889
- headers.setContentType(undefined); // browser handles it
2910
+ if (
2911
+ platform.hasStandardBrowserEnv ||
2912
+ platform.hasStandardBrowserWebWorkerEnv ||
2913
+ utils$1.isReactNative(data)
2914
+ ) {
2915
+ headers.setContentType(undefined); // browser/web worker/RN handles it
2890
2916
  } else if (utils$1.isFunction(data.getHeaders)) {
2891
2917
  // Node.js FormData (like form-data package)
2892
2918
  setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
@@ -2918,7 +2944,7 @@ var resolveConfig = (config) => {
2918
2944
  }
2919
2945
 
2920
2946
  return newConfig;
2921
- };
2947
+ }
2922
2948
 
2923
2949
  const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
2924
2950
 
@@ -3379,12 +3405,41 @@ function estimateDataURLDecodedBytes(url) {
3379
3405
  return bytes;
3380
3406
  }
3381
3407
 
3382
- const VERSION = "1.16.1";
3408
+ const VERSION = "1.17.0";
3383
3409
 
3384
3410
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
3385
3411
 
3386
3412
  const { isFunction } = utils$1;
3387
3413
 
3414
+ /**
3415
+ * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
3416
+ * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
3417
+ *
3418
+ * @param {string} str The string to encode
3419
+ *
3420
+ * @returns {string} UTF-8 bytes as a Latin-1 string
3421
+ */
3422
+ const encodeUTF8 = (str) =>
3423
+ encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>
3424
+ String.fromCharCode(parseInt(hex, 16))
3425
+ );
3426
+
3427
+ // Node's WHATWG URL parser returns `username` and `password` percent-encoded.
3428
+ // Decode before composing the `auth` option so credentials such as
3429
+ // `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the
3430
+ // original value for malformed input so a bad encoding never throws.
3431
+ const decodeURIComponentSafe = (value) => {
3432
+ if (!utils$1.isString(value)) {
3433
+ return value;
3434
+ }
3435
+
3436
+ try {
3437
+ return decodeURIComponent(value);
3438
+ } catch (error) {
3439
+ return value;
3440
+ }
3441
+ };
3442
+
3388
3443
  const test = (fn, ...args) => {
3389
3444
  try {
3390
3445
  return !!fn(...args);
@@ -3393,6 +3448,15 @@ const test = (fn, ...args) => {
3393
3448
  }
3394
3449
  };
3395
3450
 
3451
+ const maybeWithAuthCredentials = (url) => {
3452
+ const protocolIndex = url.indexOf('://');
3453
+ let urlToCheck = url;
3454
+ if (protocolIndex !== -1) {
3455
+ urlToCheck = urlToCheck.slice(protocolIndex + 3);
3456
+ }
3457
+ return urlToCheck.includes('@') || urlToCheck.includes(':');
3458
+ };
3459
+
3396
3460
  const factory = (env) => {
3397
3461
  const globalObject =
3398
3462
  utils$1.global !== undefined && utils$1.global !== null
@@ -3540,6 +3604,7 @@ const factory = (env) => {
3540
3604
 
3541
3605
  const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
3542
3606
  const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
3607
+ const own = (key) => (utils$1.hasOwnProp(config, key) ? config[key] : undefined);
3543
3608
 
3544
3609
  let _fetch = envFetch || fetch;
3545
3610
 
@@ -3562,6 +3627,46 @@ const factory = (env) => {
3562
3627
  let requestContentLength;
3563
3628
 
3564
3629
  try {
3630
+ // HTTP basic authentication
3631
+ let auth = undefined;
3632
+ const configAuth = own('auth');
3633
+
3634
+ if (configAuth) {
3635
+ const username = configAuth.username || '';
3636
+ const password = configAuth.password || '';
3637
+ auth = {
3638
+ username,
3639
+ password
3640
+ };
3641
+ }
3642
+
3643
+ if (maybeWithAuthCredentials(url)) {
3644
+ const parsedURL = new URL(url, platform.origin);
3645
+
3646
+ if (!auth && (parsedURL.username || parsedURL.password)) {
3647
+ const urlUsername = decodeURIComponentSafe(parsedURL.username);
3648
+ const urlPassword = decodeURIComponentSafe(parsedURL.password);
3649
+ auth = {
3650
+ username: urlUsername,
3651
+ password: urlPassword
3652
+ };
3653
+ }
3654
+
3655
+ if (parsedURL.username || parsedURL.password) {
3656
+ parsedURL.username = '';
3657
+ parsedURL.password = '';
3658
+ url = parsedURL.href;
3659
+ }
3660
+ }
3661
+
3662
+ if (auth) {
3663
+ headers.delete('authorization');
3664
+ headers.set(
3665
+ 'Authorization',
3666
+ 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || '')))
3667
+ );
3668
+ }
3669
+
3565
3670
  // Enforce maxContentLength for data: URLs up-front so we never materialize
3566
3671
  // an oversized payload. The HTTP adapter applies the same check (see http.js
3567
3672
  // "if (protocol === 'data:')" branch).
@@ -4243,6 +4348,7 @@ class Axios {
4243
4348
  forcedJSONParsing: validators.transitional(validators.boolean),
4244
4349
  clarifyTimeoutError: validators.transitional(validators.boolean),
4245
4350
  legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
4351
+ advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
4246
4352
  },
4247
4353
  false
4248
4354
  );
@@ -1,4 +1,4 @@
1
- /*! Axios v1.16.1 Copyright (c) 2026 Matt Zabriskie and contributors */
1
+ /*! Axios v1.17.0 Copyright (c) 2026 Matt Zabriskie and contributors */
2
2
  /**
3
3
  * Create a bound version of a function with a specified `this` context
4
4
  *
@@ -422,7 +422,9 @@ function merge(...objs) {
422
422
  return;
423
423
  }
424
424
 
425
- const targetKey = (caseless && findKey(result, key)) || key;
425
+ // findKey lowercases the key, so caseless lookup only applies to strings —
426
+ // symbol keys are identity-matched.
427
+ const targetKey = (caseless && typeof key === 'string' && findKey(result, key)) || key;
426
428
  // Read via own-prop only — a bare `result[targetKey]` walks the prototype
427
429
  // chain, so a polluted Object.prototype value could surface here and get
428
430
  // copied into the merged result.
@@ -439,7 +441,24 @@ function merge(...objs) {
439
441
  };
440
442
 
441
443
  for (let i = 0, l = objs.length; i < l; i++) {
442
- objs[i] && forEach(objs[i], assignValue);
444
+ const source = objs[i];
445
+ if (!source || isBuffer(source)) {
446
+ continue;
447
+ }
448
+
449
+ forEach(source, assignValue);
450
+
451
+ if (typeof source !== 'object' || isArray(source)) {
452
+ continue;
453
+ }
454
+
455
+ const symbols = Object.getOwnPropertySymbols(source);
456
+ for (let j = 0; j < symbols.length; j++) {
457
+ const symbol = symbols[j];
458
+ if (propertyIsEnumerable.call(source, symbol)) {
459
+ assignValue(source[symbol], symbol);
460
+ }
461
+ }
443
462
  }
444
463
  return result;
445
464
  }
@@ -668,6 +687,8 @@ const hasOwnProperty = (
668
687
  hasOwnProperty.call(obj, prop)
669
688
  )(Object.prototype);
670
689
 
690
+ const { propertyIsEnumerable } = Object.prototype;
691
+
671
692
  /**
672
693
  * Determine if a value is a RegExp object
673
694
  *
@@ -1149,7 +1170,7 @@ let AxiosHeaders$1 = class AxiosHeaders {
1149
1170
  const lHeader = normalizeHeader(_header);
1150
1171
 
1151
1172
  if (!lHeader) {
1152
- throw new Error('header name must be a non-empty string');
1173
+ return;
1153
1174
  }
1154
1175
 
1155
1176
  const key = utils$1.findKey(self, lHeader);
@@ -1177,7 +1198,7 @@ let AxiosHeaders$1 = class AxiosHeaders {
1177
1198
  key;
1178
1199
  for (const entry of header) {
1179
1200
  if (!utils$1.isArray(entry)) {
1180
- throw TypeError('Object iterator must return a key-value pair');
1201
+ throw new TypeError('Object iterator must return a key-value pair');
1181
1202
  }
1182
1203
 
1183
1204
  obj[(key = entry[0])] = (dest = obj[key])
@@ -1792,7 +1813,7 @@ function toFormData$1(obj, formData, options) {
1792
1813
  }
1793
1814
 
1794
1815
  if (stack.indexOf(value) !== -1) {
1795
- throw Error('Circular reference detected in ' + path.join('.'));
1816
+ throw new Error('Circular reference detected in ' + path.join('.'));
1796
1817
  }
1797
1818
 
1798
1819
  stack.push(value);
@@ -2009,6 +2030,7 @@ var transitionalDefaults = {
2009
2030
  forcedJSONParsing: true,
2010
2031
  clarifyTimeoutError: false,
2011
2032
  legacyInterceptorReqResOrdering: true,
2033
+ advertiseZstdAcceptEncoding: false,
2012
2034
  };
2013
2035
 
2014
2036
  var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
@@ -2843,12 +2865,12 @@ function setFormDataHeaders(headers, formHeaders, policy) {
2843
2865
  *
2844
2866
  * @returns {string} UTF-8 bytes as a Latin-1 string
2845
2867
  */
2846
- const encodeUTF8 = (str) =>
2868
+ const encodeUTF8$1 = (str) =>
2847
2869
  encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>
2848
2870
  String.fromCharCode(parseInt(hex, 16))
2849
2871
  );
2850
2872
 
2851
- var resolveConfig = (config) => {
2873
+ function resolveConfig(config) {
2852
2874
  const newConfig = mergeConfig$1({}, config);
2853
2875
 
2854
2876
  // Read only own properties to prevent prototype pollution gadgets
@@ -2869,8 +2891,8 @@ var resolveConfig = (config) => {
2869
2891
 
2870
2892
  newConfig.url = buildURL(
2871
2893
  buildFullPath(baseURL, url, allowAbsoluteUrls),
2872
- config.params,
2873
- config.paramsSerializer
2894
+ own('params'),
2895
+ own('paramsSerializer')
2874
2896
  );
2875
2897
 
2876
2898
  // HTTP basic authentication
@@ -2878,13 +2900,17 @@ var resolveConfig = (config) => {
2878
2900
  headers.set(
2879
2901
  'Authorization',
2880
2902
  'Basic ' +
2881
- btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8(auth.password) : ''))
2903
+ btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8$1(auth.password) : ''))
2882
2904
  );
2883
2905
  }
2884
2906
 
2885
2907
  if (utils$1.isFormData(data)) {
2886
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2887
- headers.setContentType(undefined); // browser handles it
2908
+ if (
2909
+ platform.hasStandardBrowserEnv ||
2910
+ platform.hasStandardBrowserWebWorkerEnv ||
2911
+ utils$1.isReactNative(data)
2912
+ ) {
2913
+ headers.setContentType(undefined); // browser/web worker/RN handles it
2888
2914
  } else if (utils$1.isFunction(data.getHeaders)) {
2889
2915
  // Node.js FormData (like form-data package)
2890
2916
  setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
@@ -2916,7 +2942,7 @@ var resolveConfig = (config) => {
2916
2942
  }
2917
2943
 
2918
2944
  return newConfig;
2919
- };
2945
+ }
2920
2946
 
2921
2947
  const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
2922
2948
 
@@ -3377,12 +3403,41 @@ function estimateDataURLDecodedBytes(url) {
3377
3403
  return bytes;
3378
3404
  }
3379
3405
 
3380
- const VERSION$1 = "1.16.1";
3406
+ const VERSION$1 = "1.17.0";
3381
3407
 
3382
3408
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
3383
3409
 
3384
3410
  const { isFunction } = utils$1;
3385
3411
 
3412
+ /**
3413
+ * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
3414
+ * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
3415
+ *
3416
+ * @param {string} str The string to encode
3417
+ *
3418
+ * @returns {string} UTF-8 bytes as a Latin-1 string
3419
+ */
3420
+ const encodeUTF8 = (str) =>
3421
+ encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) =>
3422
+ String.fromCharCode(parseInt(hex, 16))
3423
+ );
3424
+
3425
+ // Node's WHATWG URL parser returns `username` and `password` percent-encoded.
3426
+ // Decode before composing the `auth` option so credentials such as
3427
+ // `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the
3428
+ // original value for malformed input so a bad encoding never throws.
3429
+ const decodeURIComponentSafe = (value) => {
3430
+ if (!utils$1.isString(value)) {
3431
+ return value;
3432
+ }
3433
+
3434
+ try {
3435
+ return decodeURIComponent(value);
3436
+ } catch (error) {
3437
+ return value;
3438
+ }
3439
+ };
3440
+
3386
3441
  const test = (fn, ...args) => {
3387
3442
  try {
3388
3443
  return !!fn(...args);
@@ -3391,6 +3446,15 @@ const test = (fn, ...args) => {
3391
3446
  }
3392
3447
  };
3393
3448
 
3449
+ const maybeWithAuthCredentials = (url) => {
3450
+ const protocolIndex = url.indexOf('://');
3451
+ let urlToCheck = url;
3452
+ if (protocolIndex !== -1) {
3453
+ urlToCheck = urlToCheck.slice(protocolIndex + 3);
3454
+ }
3455
+ return urlToCheck.includes('@') || urlToCheck.includes(':');
3456
+ };
3457
+
3394
3458
  const factory = (env) => {
3395
3459
  const globalObject =
3396
3460
  utils$1.global !== undefined && utils$1.global !== null
@@ -3538,6 +3602,7 @@ const factory = (env) => {
3538
3602
 
3539
3603
  const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
3540
3604
  const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
3605
+ const own = (key) => (utils$1.hasOwnProp(config, key) ? config[key] : undefined);
3541
3606
 
3542
3607
  let _fetch = envFetch || fetch;
3543
3608
 
@@ -3560,6 +3625,46 @@ const factory = (env) => {
3560
3625
  let requestContentLength;
3561
3626
 
3562
3627
  try {
3628
+ // HTTP basic authentication
3629
+ let auth = undefined;
3630
+ const configAuth = own('auth');
3631
+
3632
+ if (configAuth) {
3633
+ const username = configAuth.username || '';
3634
+ const password = configAuth.password || '';
3635
+ auth = {
3636
+ username,
3637
+ password
3638
+ };
3639
+ }
3640
+
3641
+ if (maybeWithAuthCredentials(url)) {
3642
+ const parsedURL = new URL(url, platform.origin);
3643
+
3644
+ if (!auth && (parsedURL.username || parsedURL.password)) {
3645
+ const urlUsername = decodeURIComponentSafe(parsedURL.username);
3646
+ const urlPassword = decodeURIComponentSafe(parsedURL.password);
3647
+ auth = {
3648
+ username: urlUsername,
3649
+ password: urlPassword
3650
+ };
3651
+ }
3652
+
3653
+ if (parsedURL.username || parsedURL.password) {
3654
+ parsedURL.username = '';
3655
+ parsedURL.password = '';
3656
+ url = parsedURL.href;
3657
+ }
3658
+ }
3659
+
3660
+ if (auth) {
3661
+ headers.delete('authorization');
3662
+ headers.set(
3663
+ 'Authorization',
3664
+ 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || '')))
3665
+ );
3666
+ }
3667
+
3563
3668
  // Enforce maxContentLength for data: URLs up-front so we never materialize
3564
3669
  // an oversized payload. The HTTP adapter applies the same check (see http.js
3565
3670
  // "if (protocol === 'data:')" branch).
@@ -4241,6 +4346,7 @@ let Axios$1 = class Axios {
4241
4346
  forcedJSONParsing: validators.transitional(validators.boolean),
4242
4347
  clarifyTimeoutError: validators.transitional(validators.boolean),
4243
4348
  legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
4349
+ advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
4244
4350
  },
4245
4351
  false
4246
4352
  );