@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
  var FormData$1 = require('form-data');
@@ -417,7 +417,10 @@ function merge(...objs) {
417
417
  if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
418
418
  return;
419
419
  }
420
- const targetKey = caseless && findKey(result, key) || key;
420
+
421
+ // findKey lowercases the key, so caseless lookup only applies to strings —
422
+ // symbol keys are identity-matched.
423
+ const targetKey = caseless && typeof key === 'string' && findKey(result, key) || key;
421
424
  // Read via own-prop only — a bare `result[targetKey]` walks the prototype
422
425
  // chain, so a polluted Object.prototype value could surface here and get
423
426
  // copied into the merged result.
@@ -433,7 +436,21 @@ function merge(...objs) {
433
436
  }
434
437
  };
435
438
  for (let i = 0, l = objs.length; i < l; i++) {
436
- objs[i] && forEach(objs[i], assignValue);
439
+ const source = objs[i];
440
+ if (!source || isBuffer(source)) {
441
+ continue;
442
+ }
443
+ forEach(source, assignValue);
444
+ if (typeof source !== 'object' || isArray(source)) {
445
+ continue;
446
+ }
447
+ const symbols = Object.getOwnPropertySymbols(source);
448
+ for (let j = 0; j < symbols.length; j++) {
449
+ const symbol = symbols[j];
450
+ if (propertyIsEnumerable.call(source, symbol)) {
451
+ assignValue(source[symbol], symbol);
452
+ }
453
+ }
437
454
  }
438
455
  return result;
439
456
  }
@@ -650,6 +667,9 @@ const toCamelCase = str => {
650
667
  const hasOwnProperty = (({
651
668
  hasOwnProperty
652
669
  }) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
670
+ const {
671
+ propertyIsEnumerable
672
+ } = Object.prototype;
653
673
 
654
674
  /**
655
675
  * Determine if a value is a RegExp object
@@ -1034,7 +1054,7 @@ class AxiosHeaders {
1034
1054
  function setHeader(_value, _header, _rewrite) {
1035
1055
  const lHeader = normalizeHeader(_header);
1036
1056
  if (!lHeader) {
1037
- throw new Error('header name must be a non-empty string');
1057
+ return;
1038
1058
  }
1039
1059
  const key = utils$1.findKey(self, lHeader);
1040
1060
  if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) {
@@ -1052,7 +1072,7 @@ class AxiosHeaders {
1052
1072
  key;
1053
1073
  for (const entry of header) {
1054
1074
  if (!utils$1.isArray(entry)) {
1055
- throw TypeError('Object iterator must return a key-value pair');
1075
+ throw new TypeError('Object iterator must return a key-value pair');
1056
1076
  }
1057
1077
  obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
1058
1078
  }
@@ -1530,7 +1550,7 @@ function toFormData(obj, formData, options) {
1530
1550
  throw new AxiosError('Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
1531
1551
  }
1532
1552
  if (stack.indexOf(value) !== -1) {
1533
- throw Error('Circular reference detected in ' + path.join('.'));
1553
+ throw new Error('Circular reference detected in ' + path.join('.'));
1534
1554
  }
1535
1555
  stack.push(value);
1536
1556
  utils$1.forEach(value, function each(el, key) {
@@ -1712,7 +1732,8 @@ var transitionalDefaults = {
1712
1732
  silentJSONParsing: true,
1713
1733
  forcedJSONParsing: true,
1714
1734
  clarifyTimeoutError: false,
1715
- legacyInterceptorReqResOrdering: true
1735
+ legacyInterceptorReqResOrdering: true,
1736
+ advertiseZstdAcceptEncoding: false
1716
1737
  };
1717
1738
 
1718
1739
  var URLSearchParams = url.URLSearchParams;
@@ -2213,7 +2234,7 @@ function getEnv(key) {
2213
2234
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || '';
2214
2235
  }
2215
2236
 
2216
- const VERSION = "1.16.1";
2237
+ const VERSION = "1.17.0";
2217
2238
 
2218
2239
  function parseProtocol(url) {
2219
2240
  const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
@@ -2452,10 +2473,10 @@ const formDataToStream = (form, headersHandler, options) => {
2452
2473
  boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET)
2453
2474
  } = options || {};
2454
2475
  if (!utils$1.isFormData(form)) {
2455
- throw TypeError('FormData instance required');
2476
+ throw new TypeError('FormData instance required');
2456
2477
  }
2457
2478
  if (boundary.length < 1 || boundary.length > 70) {
2458
- throw Error('boundary must be 1-70 characters long');
2479
+ throw new Error('boundary must be 1-70 characters long');
2459
2480
  }
2460
2481
  const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);
2461
2482
  const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF);
@@ -2505,6 +2526,84 @@ class ZlibHeaderTransformStream extends stream.Transform {
2505
2526
  }
2506
2527
  }
2507
2528
 
2529
+ class Http2Sessions {
2530
+ constructor() {
2531
+ this.sessions = Object.create(null);
2532
+ }
2533
+ getSession(authority, options) {
2534
+ options = Object.assign({
2535
+ sessionTimeout: 1000
2536
+ }, options);
2537
+ let authoritySessions = this.sessions[authority];
2538
+ if (authoritySessions) {
2539
+ let len = authoritySessions.length;
2540
+ for (let i = 0; i < len; i++) {
2541
+ const [sessionHandle, sessionOptions] = authoritySessions[i];
2542
+ if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
2543
+ return sessionHandle;
2544
+ }
2545
+ }
2546
+ }
2547
+ const session = http2.connect(authority, options);
2548
+ let removed;
2549
+ let timer;
2550
+ const removeSession = () => {
2551
+ if (removed) {
2552
+ return;
2553
+ }
2554
+ removed = true;
2555
+ if (timer) {
2556
+ clearTimeout(timer);
2557
+ timer = null;
2558
+ }
2559
+ let entries = authoritySessions,
2560
+ len = entries.length,
2561
+ i = len;
2562
+ while (i--) {
2563
+ if (entries[i][0] === session) {
2564
+ if (len === 1) {
2565
+ delete this.sessions[authority];
2566
+ } else {
2567
+ entries.splice(i, 1);
2568
+ }
2569
+ if (!session.closed) {
2570
+ session.close();
2571
+ }
2572
+ return;
2573
+ }
2574
+ }
2575
+ };
2576
+ const originalRequestFn = session.request;
2577
+ const {
2578
+ sessionTimeout
2579
+ } = options;
2580
+ if (sessionTimeout != null) {
2581
+ let streamsCount = 0;
2582
+ session.request = function () {
2583
+ const stream = originalRequestFn.apply(this, arguments);
2584
+ streamsCount++;
2585
+ if (timer) {
2586
+ clearTimeout(timer);
2587
+ timer = null;
2588
+ }
2589
+ stream.once('close', () => {
2590
+ if (! --streamsCount) {
2591
+ timer = setTimeout(() => {
2592
+ timer = null;
2593
+ removeSession();
2594
+ }, sessionTimeout);
2595
+ }
2596
+ });
2597
+ return stream;
2598
+ };
2599
+ }
2600
+ session.once('close', removeSession);
2601
+ let entry = [session, options];
2602
+ authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
2603
+ return session;
2604
+ }
2605
+ }
2606
+
2508
2607
  const callbackify = (fn, reducer) => {
2509
2608
  return utils$1.isAsyncFn(fn) ? function (...args) {
2510
2609
  const cb = args.pop();
@@ -2870,7 +2969,14 @@ const brotliOptions = {
2870
2969
  flush: zlib.constants.BROTLI_OPERATION_FLUSH,
2871
2970
  finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
2872
2971
  };
2972
+ const zstdOptions = {
2973
+ flush: zlib.constants.ZSTD_e_flush,
2974
+ finishFlush: zlib.constants.ZSTD_e_flush
2975
+ };
2873
2976
  const isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress);
2977
+ const isZstdSupported = utils$1.isFunction(zlib.createZstdDecompress);
2978
+ const ACCEPT_ENCODING = 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : '');
2979
+ const ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ', zstd' : '');
2874
2980
  const {
2875
2981
  http: httpFollow,
2876
2982
  https: httpsFollow
@@ -2918,6 +3024,19 @@ function getTunnelingAgent(agentOptions, userHttpsAgent) {
2918
3024
  ...agentOptions
2919
3025
  } : agentOptions;
2920
3026
  agent = new HttpsProxyAgent(merged);
3027
+ if (userHttpsAgent && userHttpsAgent.options) {
3028
+ const originTLSOptions = {
3029
+ ...userHttpsAgent.options
3030
+ };
3031
+ const callback = agent.callback;
3032
+ agent.callback = function axiosTunnelingAgentCallback(req, opts) {
3033
+ // HttpsProxyAgent v5 reads callback opts for the post-CONNECT origin TLS upgrade.
3034
+ return callback.call(this, req, {
3035
+ ...originTLSOptions,
3036
+ ...opts
3037
+ });
3038
+ };
3039
+ }
2921
3040
  agent[kAxiosInstalledTunnel] = true;
2922
3041
  cache.set(key, agent);
2923
3042
  return agent;
@@ -2930,7 +3049,7 @@ const supportedProtocols = platform.protocols.map(protocol => {
2930
3049
  // Decode before composing the `auth` option so credentials such as
2931
3050
  // `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the
2932
3051
  // original value for malformed input so a bad encoding never throws.
2933
- const decodeURIComponentSafe = value => {
3052
+ const decodeURIComponentSafe$1 = value => {
2934
3053
  if (!utils$1.isString(value)) {
2935
3054
  return value;
2936
3055
  }
@@ -2944,84 +3063,11 @@ const flushOnFinish = (stream, [throttled, flush]) => {
2944
3063
  stream.on('end', flush).on('error', flush);
2945
3064
  return throttled;
2946
3065
  };
2947
- class Http2Sessions {
2948
- constructor() {
2949
- this.sessions = Object.create(null);
2950
- }
2951
- getSession(authority, options) {
2952
- options = Object.assign({
2953
- sessionTimeout: 1000
2954
- }, options);
2955
- let authoritySessions = this.sessions[authority];
2956
- if (authoritySessions) {
2957
- let len = authoritySessions.length;
2958
- for (let i = 0; i < len; i++) {
2959
- const [sessionHandle, sessionOptions] = authoritySessions[i];
2960
- if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
2961
- return sessionHandle;
2962
- }
2963
- }
2964
- }
2965
- const session = http2.connect(authority, options);
2966
- let removed;
2967
- const removeSession = () => {
2968
- if (removed) {
2969
- return;
2970
- }
2971
- removed = true;
2972
- let entries = authoritySessions,
2973
- len = entries.length,
2974
- i = len;
2975
- while (i--) {
2976
- if (entries[i][0] === session) {
2977
- if (len === 1) {
2978
- delete this.sessions[authority];
2979
- } else {
2980
- entries.splice(i, 1);
2981
- }
2982
- if (!session.closed) {
2983
- session.close();
2984
- }
2985
- return;
2986
- }
2987
- }
2988
- };
2989
- const originalRequestFn = session.request;
2990
- const {
2991
- sessionTimeout
2992
- } = options;
2993
- if (sessionTimeout != null) {
2994
- let timer;
2995
- let streamsCount = 0;
2996
- session.request = function () {
2997
- const stream = originalRequestFn.apply(this, arguments);
2998
- streamsCount++;
2999
- if (timer) {
3000
- clearTimeout(timer);
3001
- timer = null;
3002
- }
3003
- stream.once('close', () => {
3004
- if (! --streamsCount) {
3005
- timer = setTimeout(() => {
3006
- timer = null;
3007
- removeSession();
3008
- }, sessionTimeout);
3009
- }
3010
- });
3011
- return stream;
3012
- };
3013
- }
3014
- session.once('close', removeSession);
3015
- let entry = [session, options];
3016
- authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
3017
- return session;
3018
- }
3019
- }
3020
3066
  const http2Sessions = new Http2Sessions();
3021
3067
 
3022
3068
  /**
3023
- * If the proxy or config beforeRedirects functions are defined, call them with the options
3024
- * object.
3069
+ * If the proxy, auth, or config beforeRedirects functions are defined, call them
3070
+ * with the options object.
3025
3071
  *
3026
3072
  * @param {Object<string, any>} options - The options object that was passed to the request.
3027
3073
  *
@@ -3031,6 +3077,9 @@ function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
3031
3077
  if (options.beforeRedirects.proxy) {
3032
3078
  options.beforeRedirects.proxy(options);
3033
3079
  }
3080
+ if (options.beforeRedirects.auth) {
3081
+ options.beforeRedirects.auth(options);
3082
+ }
3034
3083
  if (options.beforeRedirects.config) {
3035
3084
  options.beforeRedirects.config(options, responseDetails, requestDetails);
3036
3085
  }
@@ -3266,6 +3315,7 @@ const http2Transport = {
3266
3315
  var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3267
3316
  return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
3268
3317
  const own = key => utils$1.hasOwnProp(config, key) ? config[key] : undefined;
3318
+ const transitional = own('transitional') || transitionalDefaults;
3269
3319
  let data = own('data');
3270
3320
  let lookup = own('lookup');
3271
3321
  let family = own('family');
@@ -3305,7 +3355,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3305
3355
  try {
3306
3356
  abortEmitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
3307
3357
  } catch (err) {
3308
- console.warn('emit error', err);
3358
+ // ignore emit errors
3309
3359
  }
3310
3360
  }
3311
3361
  function clearConnectPhaseTimer() {
@@ -3316,7 +3366,6 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3316
3366
  }
3317
3367
  function createTimeoutError() {
3318
3368
  let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
3319
- const transitional = config.transitional || transitionalDefaults;
3320
3369
  if (config.timeoutErrorMessage) {
3321
3370
  timeoutErrorMessage = config.timeoutErrorMessage;
3322
3371
  }
@@ -3489,9 +3538,9 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3489
3538
  const password = configAuth.password || '';
3490
3539
  auth = username + ':' + password;
3491
3540
  }
3492
- if (!auth && parsed.username) {
3493
- const urlUsername = decodeURIComponentSafe(parsed.username);
3494
- const urlPassword = decodeURIComponentSafe(parsed.password);
3541
+ if (!auth && (parsed.username || parsed.password)) {
3542
+ const urlUsername = decodeURIComponentSafe$1(parsed.username);
3543
+ const urlPassword = decodeURIComponentSafe$1(parsed.password);
3495
3544
  auth = urlUsername + ':' + urlPassword;
3496
3545
  }
3497
3546
  auth && headers.delete('authorization');
@@ -3505,7 +3554,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3505
3554
  customErr.exists = true;
3506
3555
  return reject(customErr);
3507
3556
  }
3508
- headers.set('Accept-Encoding', 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false);
3557
+ headers.set('Accept-Encoding', utils$1.hasOwnProp(transitional, 'advertiseZstdAcceptEncoding') && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false);
3509
3558
 
3510
3559
  // Null-prototype to block prototype pollution gadgets on properties read
3511
3560
  // directly by Node's http.request (e.g. insecureHTTPParser, lookup).
@@ -3527,19 +3576,21 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3527
3576
 
3528
3577
  // cacheable-lookup integration hotfix
3529
3578
  !utils$1.isUndefined(lookup) && (options.lookup = lookup);
3530
- if (config.socketPath) {
3531
- if (typeof config.socketPath !== 'string') {
3579
+ const socketPath = own('socketPath');
3580
+ if (socketPath) {
3581
+ if (typeof socketPath !== 'string') {
3532
3582
  return reject(new AxiosError('socketPath must be a string', AxiosError.ERR_BAD_OPTION_VALUE, config));
3533
3583
  }
3534
- if (config.allowedSocketPaths != null) {
3535
- const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
3536
- const resolvedSocket = path.resolve(config.socketPath);
3584
+ const allowedSocketPaths = own('allowedSocketPaths');
3585
+ if (allowedSocketPaths != null) {
3586
+ const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
3587
+ const resolvedSocket = path.resolve(socketPath);
3537
3588
  const isAllowed = allowed.some(entry => typeof entry === 'string' && path.resolve(entry) === resolvedSocket);
3538
3589
  if (!isAllowed) {
3539
- return reject(new AxiosError(`socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
3590
+ return reject(new AxiosError(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
3540
3591
  }
3541
3592
  }
3542
- options.socketPath = config.socketPath;
3593
+ options.socketPath = socketPath;
3543
3594
  } else {
3544
3595
  options.hostname = parsed.hostname.startsWith('[') ? parsed.hostname.slice(1, -1) : parsed.hostname;
3545
3596
  options.port = parsed.port;
@@ -3570,6 +3621,23 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3570
3621
  if (configBeforeRedirect) {
3571
3622
  options.beforeRedirects.config = configBeforeRedirect;
3572
3623
  }
3624
+ if (auth) {
3625
+ // Restore HTTP Basic credentials on same-origin redirects only.
3626
+ // follow-redirects >= 1.15.8 strips Authorization on every redirect (see #6929);
3627
+ // cross-origin stripping is the documented mitigation for T-R2 in THREATMODEL.md
3628
+ // and is preserved by deliberately not restoring on origin change.
3629
+ const requestOrigin = parsed.origin;
3630
+ const authToRestore = auth;
3631
+ options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) {
3632
+ try {
3633
+ if (new URL(redirectOptions.href).origin === requestOrigin) {
3634
+ redirectOptions.auth = authToRestore;
3635
+ }
3636
+ } catch (e) {
3637
+ // ignore malformed URL: leaving auth stripped is fail-safe
3638
+ }
3639
+ };
3640
+ }
3573
3641
  transport = isHttpsRequest ? httpsFollow : httpFollow;
3574
3642
  }
3575
3643
  }
@@ -3638,6 +3706,13 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3638
3706
  streams.push(zlib.createBrotliDecompress(brotliOptions));
3639
3707
  delete res.headers['content-encoding'];
3640
3708
  }
3709
+ break;
3710
+ case 'zstd':
3711
+ if (isZstdSupported) {
3712
+ streams.push(zlib.createZstdDecompress(zstdOptions));
3713
+ delete res.headers['content-encoding'];
3714
+ }
3715
+ break;
3641
3716
  }
3642
3717
  }
3643
3718
  responseStream = streams.length > 1 ? stream.pipeline(streams, utils$1.noop) : streams[0];
@@ -4049,8 +4124,8 @@ function setFormDataHeaders(headers, formHeaders, policy) {
4049
4124
  *
4050
4125
  * @returns {string} UTF-8 bytes as a Latin-1 string
4051
4126
  */
4052
- const encodeUTF8 = str => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
4053
- var resolveConfig = config => {
4127
+ const encodeUTF8$1 = str => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
4128
+ function resolveConfig(config) {
4054
4129
  const newConfig = mergeConfig({}, config);
4055
4130
 
4056
4131
  // Read only own properties to prevent prototype pollution gadgets
@@ -4066,15 +4141,15 @@ var resolveConfig = config => {
4066
4141
  const allowAbsoluteUrls = own('allowAbsoluteUrls');
4067
4142
  const url = own('url');
4068
4143
  newConfig.headers = headers = AxiosHeaders.from(headers);
4069
- newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls), config.params, config.paramsSerializer);
4144
+ newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls), own('params'), own('paramsSerializer'));
4070
4145
 
4071
4146
  // HTTP basic authentication
4072
4147
  if (auth) {
4073
- headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8(auth.password) : '')));
4148
+ headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8$1(auth.password) : '')));
4074
4149
  }
4075
4150
  if (utils$1.isFormData(data)) {
4076
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
4077
- headers.setContentType(undefined); // browser handles it
4151
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
4152
+ headers.setContentType(undefined); // browser/web worker/RN handles it
4078
4153
  } else if (utils$1.isFunction(data.getHeaders)) {
4079
4154
  // Node.js FormData (like form-data package)
4080
4155
  setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
@@ -4102,7 +4177,7 @@ var resolveConfig = config => {
4102
4177
  }
4103
4178
  }
4104
4179
  return newConfig;
4105
- };
4180
+ }
4106
4181
 
4107
4182
  const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
4108
4183
  var xhrAdapter = isXHRAdapterSupported && function (config) {
@@ -4403,6 +4478,31 @@ const DEFAULT_CHUNK_SIZE = 64 * 1024;
4403
4478
  const {
4404
4479
  isFunction
4405
4480
  } = utils$1;
4481
+
4482
+ /**
4483
+ * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
4484
+ * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
4485
+ *
4486
+ * @param {string} str The string to encode
4487
+ *
4488
+ * @returns {string} UTF-8 bytes as a Latin-1 string
4489
+ */
4490
+ const encodeUTF8 = str => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
4491
+
4492
+ // Node's WHATWG URL parser returns `username` and `password` percent-encoded.
4493
+ // Decode before composing the `auth` option so credentials such as
4494
+ // `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the
4495
+ // original value for malformed input so a bad encoding never throws.
4496
+ const decodeURIComponentSafe = value => {
4497
+ if (!utils$1.isString(value)) {
4498
+ return value;
4499
+ }
4500
+ try {
4501
+ return decodeURIComponent(value);
4502
+ } catch (error) {
4503
+ return value;
4504
+ }
4505
+ };
4406
4506
  const test = (fn, ...args) => {
4407
4507
  try {
4408
4508
  return !!fn(...args);
@@ -4410,6 +4510,14 @@ const test = (fn, ...args) => {
4410
4510
  return false;
4411
4511
  }
4412
4512
  };
4513
+ const maybeWithAuthCredentials = url => {
4514
+ const protocolIndex = url.indexOf('://');
4515
+ let urlToCheck = url;
4516
+ if (protocolIndex !== -1) {
4517
+ urlToCheck = urlToCheck.slice(protocolIndex + 3);
4518
+ }
4519
+ return urlToCheck.includes('@') || urlToCheck.includes(':');
4520
+ };
4413
4521
  const factory = env => {
4414
4522
  const globalObject = utils$1.global !== undefined && utils$1.global !== null ? utils$1.global : globalThis;
4415
4523
  const {
@@ -4513,6 +4621,7 @@ const factory = env => {
4513
4621
  } = resolveConfig(config);
4514
4622
  const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
4515
4623
  const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
4624
+ const own = key => utils$1.hasOwnProp(config, key) ? config[key] : undefined;
4516
4625
  let _fetch = envFetch || fetch;
4517
4626
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
4518
4627
  let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
@@ -4522,6 +4631,38 @@ const factory = env => {
4522
4631
  });
4523
4632
  let requestContentLength;
4524
4633
  try {
4634
+ // HTTP basic authentication
4635
+ let auth = undefined;
4636
+ const configAuth = own('auth');
4637
+ if (configAuth) {
4638
+ const username = configAuth.username || '';
4639
+ const password = configAuth.password || '';
4640
+ auth = {
4641
+ username,
4642
+ password
4643
+ };
4644
+ }
4645
+ if (maybeWithAuthCredentials(url)) {
4646
+ const parsedURL = new URL(url, platform.origin);
4647
+ if (!auth && (parsedURL.username || parsedURL.password)) {
4648
+ const urlUsername = decodeURIComponentSafe(parsedURL.username);
4649
+ const urlPassword = decodeURIComponentSafe(parsedURL.password);
4650
+ auth = {
4651
+ username: urlUsername,
4652
+ password: urlPassword
4653
+ };
4654
+ }
4655
+ if (parsedURL.username || parsedURL.password) {
4656
+ parsedURL.username = '';
4657
+ parsedURL.password = '';
4658
+ url = parsedURL.href;
4659
+ }
4660
+ }
4661
+ if (auth) {
4662
+ headers.delete('authorization');
4663
+ headers.set('Authorization', 'Basic ' + btoa(encodeUTF8((auth.username || '') + ':' + (auth.password || ''))));
4664
+ }
4665
+
4525
4666
  // Enforce maxContentLength for data: URLs up-front so we never materialize
4526
4667
  // an oversized payload. The HTTP adapter applies the same check (see http.js
4527
4668
  // "if (protocol === 'data:')" branch).
@@ -5038,7 +5179,8 @@ class Axios {
5038
5179
  silentJSONParsing: validators.transitional(validators.boolean),
5039
5180
  forcedJSONParsing: validators.transitional(validators.boolean),
5040
5181
  clarifyTimeoutError: validators.transitional(validators.boolean),
5041
- legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
5182
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
5183
+ advertiseZstdAcceptEncoding: validators.transitional(validators.boolean)
5042
5184
  }, false);
5043
5185
  }
5044
5186
  if (paramsSerializer != null) {
@@ -66,7 +66,9 @@ declare class AxiosHeaders {
66
66
  ...targets: Array<AxiosHeaders | axios.RawAxiosHeaders | string | undefined | null>
67
67
  ): AxiosHeaders;
68
68
 
69
- toJSON(asStrings?: boolean): axios.RawAxiosHeaders;
69
+ toJSON(asStrings: true): Record<string, string>;
70
+ toJSON(asStrings?: false): Record<string, string | string[]>;
71
+ toJSON(asStrings?: boolean): Record<string, string | string[]>;
70
72
 
71
73
  static from(thing?: AxiosHeaders | axios.RawAxiosHeaders | string): AxiosHeaders;
72
74
 
@@ -162,7 +164,9 @@ declare class AxiosError<T = unknown, D = any> extends Error {
162
164
  static readonly ETIMEDOUT = 'ETIMEDOUT';
163
165
  }
164
166
 
165
- declare class CanceledError<T> extends AxiosError<T> {}
167
+ declare class CanceledError<T> extends AxiosError<T> {
168
+ readonly name: 'CanceledError';
169
+ }
166
170
 
167
171
  declare class Axios {
168
172
  constructor(config?: axios.AxiosRequestConfig);
@@ -392,6 +396,7 @@ declare namespace axios {
392
396
  forcedJSONParsing?: boolean;
393
397
  clarifyTimeoutError?: boolean;
394
398
  legacyInterceptorReqResOrdering?: boolean;
399
+ advertiseZstdAcceptEncoding?: boolean;
395
400
  }
396
401
 
397
402
  interface GenericAbortSignal {
@@ -691,7 +696,7 @@ declare namespace axios {
691
696
  CanceledError: typeof CanceledError;
692
697
  HttpStatusCode: typeof HttpStatusCode;
693
698
  readonly VERSION: string;
694
- isCancel(value: any): value is Cancel;
699
+ isCancel<T = any>(value: any): value is CanceledError<T>;
695
700
  all<T>(values: Array<T | Promise<T>>): Promise<T[]>;
696
701
  spread<T, R>(callback: (...args: T[]) => R): (array: T[]) => R;
697
702
  isAxiosError<T = any, D = any>(payload: any): payload is AxiosError<T, D>;
@@ -47,7 +47,9 @@ export class AxiosHeaders {
47
47
  ...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
48
48
  ): AxiosHeaders;
49
49
 
50
- toJSON(asStrings?: boolean): RawAxiosHeaders;
50
+ toJSON(asStrings: true): Record<string, string>;
51
+ toJSON(asStrings?: false): Record<string, string | string[]>;
52
+ toJSON(asStrings?: boolean): Record<string, string | string[]>;
51
53
 
52
54
  static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
53
55
 
@@ -281,6 +283,7 @@ export interface TransitionalOptions {
281
283
  forcedJSONParsing?: boolean;
282
284
  clarifyTimeoutError?: boolean;
283
285
  legacyInterceptorReqResOrdering?: boolean;
286
+ advertiseZstdAcceptEncoding?: boolean;
284
287
  }
285
288
 
286
289
  export interface GenericAbortSignal {