@st-gr/sail-proxy 0.9.2 → 0.9.3

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 (213) hide show
  1. package/bundled/gateway/node_modules/.package-lock.json +132 -83
  2. package/bundled/gateway/node_modules/axios/CHANGELOG.md +0 -42
  3. package/bundled/gateway/node_modules/axios/README.md +237 -237
  4. package/bundled/gateway/node_modules/axios/dist/axios.js +21 -113
  5. package/bundled/gateway/node_modules/axios/dist/axios.js.map +1 -0
  6. package/bundled/gateway/node_modules/axios/dist/axios.min.js +2 -2
  7. package/bundled/gateway/node_modules/axios/dist/axios.min.js.map +1 -1
  8. package/bundled/gateway/node_modules/axios/dist/browser/axios.cjs +15 -121
  9. package/bundled/gateway/node_modules/axios/dist/browser/axios.cjs.map +1 -0
  10. package/bundled/gateway/node_modules/axios/dist/esm/axios.js +15 -121
  11. package/bundled/gateway/node_modules/axios/dist/esm/axios.js.map +1 -0
  12. package/bundled/gateway/node_modules/axios/dist/esm/axios.min.js +2 -2
  13. package/bundled/gateway/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  14. package/bundled/gateway/node_modules/axios/dist/node/axios.cjs +107 -249
  15. package/bundled/gateway/node_modules/axios/dist/node/axios.cjs.map +1 -0
  16. package/bundled/gateway/node_modules/axios/index.d.cts +3 -8
  17. package/bundled/gateway/node_modules/axios/index.d.ts +1 -4
  18. package/bundled/gateway/node_modules/axios/lib/adapters/fetch.js +0 -79
  19. package/bundled/gateway/node_modules/axios/lib/adapters/http.js +118 -62
  20. package/bundled/gateway/node_modules/axios/lib/core/Axios.js +0 -1
  21. package/bundled/gateway/node_modules/axios/lib/core/AxiosHeaders.js +2 -2
  22. package/bundled/gateway/node_modules/axios/lib/defaults/transitional.js +0 -1
  23. package/bundled/gateway/node_modules/axios/lib/env/data.js +1 -1
  24. package/bundled/gateway/node_modules/axios/lib/helpers/buildURL.js +1 -1
  25. package/bundled/gateway/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
  26. package/bundled/gateway/node_modules/axios/lib/helpers/resolveConfig.js +6 -12
  27. package/bundled/gateway/node_modules/axios/lib/helpers/toFormData.js +1 -1
  28. package/bundled/gateway/node_modules/axios/lib/utils.js +2 -23
  29. package/bundled/gateway/node_modules/axios/package.json +13 -29
  30. package/bundled/gateway/node_modules/body-parser/HISTORY.md +0 -14
  31. package/bundled/gateway/node_modules/body-parser/SECURITY.md +25 -0
  32. package/bundled/gateway/node_modules/body-parser/lib/types/json.js +5 -1
  33. package/bundled/gateway/node_modules/body-parser/lib/types/urlencoded.js +15 -7
  34. package/bundled/gateway/node_modules/body-parser/node_modules/qs/.editorconfig +46 -0
  35. package/bundled/gateway/node_modules/body-parser/node_modules/qs/.eslintrc +38 -0
  36. package/bundled/gateway/node_modules/body-parser/node_modules/qs/.github/FUNDING.yml +12 -0
  37. package/bundled/gateway/node_modules/body-parser/node_modules/qs/.nycrc +13 -0
  38. package/bundled/gateway/node_modules/body-parser/node_modules/qs/CHANGELOG.md +600 -0
  39. package/bundled/gateway/node_modules/body-parser/node_modules/qs/LICENSE.md +29 -0
  40. package/bundled/gateway/node_modules/body-parser/node_modules/qs/README.md +709 -0
  41. package/bundled/gateway/node_modules/body-parser/node_modules/qs/dist/qs.js +90 -0
  42. package/bundled/gateway/node_modules/body-parser/node_modules/qs/lib/formats.js +23 -0
  43. package/bundled/gateway/node_modules/body-parser/node_modules/qs/lib/index.js +11 -0
  44. package/bundled/gateway/node_modules/body-parser/node_modules/qs/lib/parse.js +296 -0
  45. package/bundled/gateway/node_modules/body-parser/node_modules/qs/lib/stringify.js +351 -0
  46. package/bundled/gateway/node_modules/body-parser/node_modules/qs/lib/utils.js +265 -0
  47. package/bundled/gateway/node_modules/body-parser/node_modules/qs/package.json +91 -0
  48. package/bundled/gateway/node_modules/body-parser/node_modules/qs/test/empty-keys-cases.js +267 -0
  49. package/bundled/gateway/node_modules/body-parser/node_modules/qs/test/parse.js +1170 -0
  50. package/bundled/gateway/node_modules/body-parser/node_modules/qs/test/stringify.js +1298 -0
  51. package/bundled/gateway/node_modules/body-parser/node_modules/qs/test/utils.js +136 -0
  52. package/bundled/gateway/node_modules/body-parser/package.json +10 -9
  53. package/bundled/gateway/node_modules/cookie/index.js +35 -24
  54. package/bundled/gateway/node_modules/cookie/package.json +1 -1
  55. package/bundled/gateway/node_modules/cookie-signature/History.md +1 -5
  56. package/bundled/gateway/node_modules/cookie-signature/index.js +6 -6
  57. package/bundled/gateway/node_modules/cookie-signature/package.json +2 -2
  58. package/bundled/gateway/node_modules/express/History.md +0 -43
  59. package/bundled/gateway/node_modules/express/lib/response.js +0 -1
  60. package/bundled/gateway/node_modules/express/lib/utils.js +1 -2
  61. package/bundled/gateway/node_modules/express/node_modules/qs/.editorconfig +43 -0
  62. package/bundled/gateway/node_modules/express/node_modules/qs/.eslintrc +38 -0
  63. package/bundled/gateway/node_modules/express/node_modules/qs/.github/FUNDING.yml +12 -0
  64. package/bundled/gateway/node_modules/express/node_modules/qs/.nycrc +13 -0
  65. package/bundled/gateway/node_modules/express/node_modules/qs/CHANGELOG.md +546 -0
  66. package/bundled/gateway/node_modules/express/node_modules/qs/LICENSE.md +29 -0
  67. package/bundled/gateway/node_modules/express/node_modules/qs/README.md +625 -0
  68. package/bundled/gateway/node_modules/express/node_modules/qs/dist/qs.js +2054 -0
  69. package/bundled/gateway/node_modules/express/node_modules/qs/lib/formats.js +23 -0
  70. package/bundled/gateway/node_modules/express/node_modules/qs/lib/index.js +11 -0
  71. package/bundled/gateway/node_modules/express/node_modules/qs/lib/parse.js +263 -0
  72. package/bundled/gateway/node_modules/express/node_modules/qs/lib/stringify.js +326 -0
  73. package/bundled/gateway/node_modules/express/node_modules/qs/lib/utils.js +252 -0
  74. package/bundled/gateway/node_modules/express/node_modules/qs/package.json +77 -0
  75. package/bundled/gateway/node_modules/express/node_modules/qs/test/parse.js +855 -0
  76. package/bundled/gateway/node_modules/express/node_modules/qs/test/stringify.js +909 -0
  77. package/bundled/gateway/node_modules/express/node_modules/qs/test/utils.js +136 -0
  78. package/bundled/gateway/node_modules/express/package.json +17 -21
  79. package/bundled/gateway/node_modules/finalhandler/HISTORY.md +0 -21
  80. package/bundled/gateway/node_modules/finalhandler/README.md +2 -2
  81. package/bundled/gateway/node_modules/finalhandler/index.js +2 -7
  82. package/bundled/gateway/node_modules/finalhandler/node_modules/encodeurl/HISTORY.md +14 -0
  83. package/bundled/gateway/node_modules/finalhandler/node_modules/encodeurl/LICENSE +22 -0
  84. package/bundled/gateway/node_modules/finalhandler/node_modules/encodeurl/README.md +128 -0
  85. package/bundled/gateway/node_modules/finalhandler/node_modules/encodeurl/index.js +60 -0
  86. package/bundled/gateway/node_modules/finalhandler/node_modules/encodeurl/package.json +40 -0
  87. package/bundled/gateway/node_modules/finalhandler/package.json +9 -10
  88. package/bundled/gateway/node_modules/http-errors/HISTORY.md +0 -6
  89. package/bundled/gateway/node_modules/http-errors/index.js +3 -4
  90. package/bundled/gateway/node_modules/http-errors/package.json +8 -12
  91. package/bundled/gateway/node_modules/qs/CHANGELOG.md +0 -16
  92. package/bundled/gateway/node_modules/qs/README.md +1 -1
  93. package/bundled/gateway/node_modules/qs/dist/qs.js +15 -15
  94. package/bundled/gateway/node_modules/qs/eslint.config.mjs +0 -1
  95. package/bundled/gateway/node_modules/qs/lib/parse.js +24 -54
  96. package/bundled/gateway/node_modules/qs/lib/stringify.js +4 -11
  97. package/bundled/gateway/node_modules/qs/package.json +3 -3
  98. package/bundled/gateway/node_modules/qs/test/parse.js +0 -135
  99. package/bundled/gateway/node_modules/qs/test/stringify.js +0 -138
  100. package/bundled/gateway/node_modules/qs/test/utils.js +3 -31
  101. package/bundled/gateway/node_modules/raw-body/HISTORY.md +308 -0
  102. package/bundled/gateway/node_modules/raw-body/SECURITY.md +24 -0
  103. package/bundled/gateway/node_modules/raw-body/package.json +7 -5
  104. package/bundled/gateway/node_modules/send/HISTORY.md +7 -19
  105. package/bundled/gateway/node_modules/send/node_modules/encodeurl/HISTORY.md +14 -0
  106. package/bundled/gateway/node_modules/send/node_modules/encodeurl/LICENSE +22 -0
  107. package/bundled/gateway/node_modules/send/node_modules/encodeurl/README.md +128 -0
  108. package/bundled/gateway/node_modules/send/node_modules/encodeurl/index.js +60 -0
  109. package/bundled/gateway/node_modules/send/node_modules/encodeurl/package.json +40 -0
  110. package/bundled/gateway/node_modules/send/package.json +6 -6
  111. package/bundled/gateway/node_modules/serve-static/HISTORY.md +0 -16
  112. package/bundled/gateway/node_modules/serve-static/node_modules/encodeurl/HISTORY.md +14 -0
  113. package/bundled/gateway/node_modules/serve-static/node_modules/encodeurl/LICENSE +22 -0
  114. package/bundled/gateway/node_modules/serve-static/node_modules/encodeurl/README.md +128 -0
  115. package/bundled/gateway/node_modules/serve-static/node_modules/encodeurl/index.js +60 -0
  116. package/bundled/gateway/node_modules/serve-static/node_modules/encodeurl/package.json +40 -0
  117. package/bundled/gateway/node_modules/serve-static/package.json +3 -3
  118. package/bundled/gateway/node_modules/statuses/HISTORY.md +0 -5
  119. package/bundled/gateway/node_modules/statuses/README.md +0 -3
  120. package/bundled/gateway/node_modules/statuses/package.json +7 -7
  121. package/bundled/gateway/package-lock.json +137 -88
  122. package/bundled/gateway/package.json +23 -5
  123. package/bundled/ollama/node_modules/.package-lock.json +104 -85
  124. package/bundled/ollama/node_modules/axios/CHANGELOG.md +0 -42
  125. package/bundled/ollama/node_modules/axios/README.md +237 -237
  126. package/bundled/ollama/node_modules/axios/dist/axios.js +21 -113
  127. package/bundled/ollama/node_modules/axios/dist/axios.js.map +1 -0
  128. package/bundled/ollama/node_modules/axios/dist/axios.min.js +2 -2
  129. package/bundled/ollama/node_modules/axios/dist/axios.min.js.map +1 -1
  130. package/bundled/ollama/node_modules/axios/dist/browser/axios.cjs +15 -121
  131. package/bundled/ollama/node_modules/axios/dist/browser/axios.cjs.map +1 -0
  132. package/bundled/ollama/node_modules/axios/dist/esm/axios.js +15 -121
  133. package/bundled/ollama/node_modules/axios/dist/esm/axios.js.map +1 -0
  134. package/bundled/ollama/node_modules/axios/dist/esm/axios.min.js +2 -2
  135. package/bundled/ollama/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  136. package/bundled/ollama/node_modules/axios/dist/node/axios.cjs +107 -249
  137. package/bundled/ollama/node_modules/axios/dist/node/axios.cjs.map +1 -0
  138. package/bundled/ollama/node_modules/axios/index.d.cts +3 -8
  139. package/bundled/ollama/node_modules/axios/index.d.ts +1 -4
  140. package/bundled/ollama/node_modules/axios/lib/adapters/fetch.js +0 -79
  141. package/bundled/ollama/node_modules/axios/lib/adapters/http.js +118 -62
  142. package/bundled/ollama/node_modules/axios/lib/core/Axios.js +0 -1
  143. package/bundled/ollama/node_modules/axios/lib/core/AxiosHeaders.js +2 -2
  144. package/bundled/ollama/node_modules/axios/lib/defaults/transitional.js +0 -1
  145. package/bundled/ollama/node_modules/axios/lib/env/data.js +1 -1
  146. package/bundled/ollama/node_modules/axios/lib/helpers/buildURL.js +1 -1
  147. package/bundled/ollama/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
  148. package/bundled/ollama/node_modules/axios/lib/helpers/resolveConfig.js +6 -12
  149. package/bundled/ollama/node_modules/axios/lib/helpers/toFormData.js +1 -1
  150. package/bundled/ollama/node_modules/axios/lib/utils.js +2 -23
  151. package/bundled/ollama/node_modules/axios/package.json +13 -29
  152. package/bundled/ollama/node_modules/body-parser/HISTORY.md +0 -14
  153. package/bundled/ollama/node_modules/body-parser/SECURITY.md +25 -0
  154. package/bundled/ollama/node_modules/body-parser/lib/types/json.js +5 -1
  155. package/bundled/ollama/node_modules/body-parser/lib/types/urlencoded.js +15 -7
  156. package/bundled/ollama/node_modules/body-parser/package.json +10 -9
  157. package/bundled/ollama/node_modules/cookie/index.js +35 -24
  158. package/bundled/ollama/node_modules/cookie/package.json +1 -1
  159. package/bundled/ollama/node_modules/cookie-signature/History.md +1 -5
  160. package/bundled/ollama/node_modules/cookie-signature/index.js +6 -6
  161. package/bundled/ollama/node_modules/cookie-signature/package.json +2 -2
  162. package/bundled/ollama/node_modules/express/History.md +0 -43
  163. package/bundled/ollama/node_modules/express/lib/response.js +0 -1
  164. package/bundled/ollama/node_modules/express/lib/utils.js +1 -2
  165. package/bundled/ollama/node_modules/express/package.json +17 -21
  166. package/bundled/ollama/node_modules/finalhandler/HISTORY.md +0 -21
  167. package/bundled/ollama/node_modules/finalhandler/README.md +2 -2
  168. package/bundled/ollama/node_modules/finalhandler/index.js +2 -7
  169. package/bundled/ollama/node_modules/finalhandler/node_modules/encodeurl/HISTORY.md +14 -0
  170. package/bundled/ollama/node_modules/finalhandler/node_modules/encodeurl/LICENSE +22 -0
  171. package/bundled/ollama/node_modules/finalhandler/node_modules/encodeurl/README.md +128 -0
  172. package/bundled/ollama/node_modules/finalhandler/node_modules/encodeurl/index.js +60 -0
  173. package/bundled/ollama/node_modules/finalhandler/node_modules/encodeurl/package.json +40 -0
  174. package/bundled/ollama/node_modules/finalhandler/package.json +9 -10
  175. package/bundled/ollama/node_modules/http-errors/HISTORY.md +0 -6
  176. package/bundled/ollama/node_modules/http-errors/index.js +3 -4
  177. package/bundled/ollama/node_modules/http-errors/package.json +8 -12
  178. package/bundled/ollama/node_modules/qs/CHANGELOG.md +0 -16
  179. package/bundled/ollama/node_modules/qs/README.md +1 -1
  180. package/bundled/ollama/node_modules/qs/dist/qs.js +15 -15
  181. package/bundled/ollama/node_modules/qs/eslint.config.mjs +0 -1
  182. package/bundled/ollama/node_modules/qs/lib/parse.js +24 -54
  183. package/bundled/ollama/node_modules/qs/lib/stringify.js +4 -11
  184. package/bundled/ollama/node_modules/qs/package.json +3 -3
  185. package/bundled/ollama/node_modules/qs/test/parse.js +0 -135
  186. package/bundled/ollama/node_modules/qs/test/stringify.js +0 -138
  187. package/bundled/ollama/node_modules/qs/test/utils.js +3 -31
  188. package/bundled/ollama/node_modules/raw-body/HISTORY.md +308 -0
  189. package/bundled/ollama/node_modules/raw-body/SECURITY.md +24 -0
  190. package/bundled/ollama/node_modules/raw-body/package.json +7 -5
  191. package/bundled/ollama/node_modules/send/HISTORY.md +7 -19
  192. package/bundled/ollama/node_modules/send/node_modules/encodeurl/HISTORY.md +14 -0
  193. package/bundled/ollama/node_modules/send/node_modules/encodeurl/LICENSE +22 -0
  194. package/bundled/ollama/node_modules/send/node_modules/encodeurl/README.md +128 -0
  195. package/bundled/ollama/node_modules/send/node_modules/encodeurl/index.js +60 -0
  196. package/bundled/ollama/node_modules/send/node_modules/encodeurl/package.json +40 -0
  197. package/bundled/ollama/node_modules/send/package.json +6 -6
  198. package/bundled/ollama/node_modules/serve-static/HISTORY.md +0 -16
  199. package/bundled/ollama/node_modules/serve-static/node_modules/encodeurl/HISTORY.md +14 -0
  200. package/bundled/ollama/node_modules/serve-static/node_modules/encodeurl/LICENSE +22 -0
  201. package/bundled/ollama/node_modules/serve-static/node_modules/encodeurl/README.md +128 -0
  202. package/bundled/ollama/node_modules/serve-static/node_modules/encodeurl/index.js +60 -0
  203. package/bundled/ollama/node_modules/serve-static/node_modules/encodeurl/package.json +40 -0
  204. package/bundled/ollama/node_modules/serve-static/package.json +3 -3
  205. package/bundled/ollama/node_modules/statuses/HISTORY.md +0 -5
  206. package/bundled/ollama/node_modules/statuses/README.md +0 -3
  207. package/bundled/ollama/node_modules/statuses/package.json +7 -7
  208. package/bundled/ollama/package-lock.json +107 -88
  209. package/bundled/ollama/package.json +24 -4
  210. package/node_modules/@sap-llm-gateway/service-key-parser/package.json +1 -1
  211. package/package.json +2 -2
  212. package/bundled/gateway/node_modules/axios/lib/helpers/Http2Sessions.js +0 -119
  213. package/bundled/ollama/node_modules/axios/lib/helpers/Http2Sessions.js +0 -119
@@ -1,4 +1,4 @@
1
- /*! Axios v1.17.0 Copyright (c) 2026 Matt Zabriskie and contributors */
1
+ /*! Axios v1.16.1 Copyright (c) 2026 Matt Zabriskie and contributors */
2
2
  'use strict';
3
3
 
4
4
  var FormData$1 = require('form-data');
@@ -417,10 +417,7 @@ function merge(...objs) {
417
417
  if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
418
418
  return;
419
419
  }
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;
420
+ const targetKey = caseless && findKey(result, key) || key;
424
421
  // Read via own-prop only — a bare `result[targetKey]` walks the prototype
425
422
  // chain, so a polluted Object.prototype value could surface here and get
426
423
  // copied into the merged result.
@@ -436,21 +433,7 @@ function merge(...objs) {
436
433
  }
437
434
  };
438
435
  for (let i = 0, l = objs.length; i < l; i++) {
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
- }
436
+ objs[i] && forEach(objs[i], assignValue);
454
437
  }
455
438
  return result;
456
439
  }
@@ -667,9 +650,6 @@ const toCamelCase = str => {
667
650
  const hasOwnProperty = (({
668
651
  hasOwnProperty
669
652
  }) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
670
- const {
671
- propertyIsEnumerable
672
- } = Object.prototype;
673
653
 
674
654
  /**
675
655
  * Determine if a value is a RegExp object
@@ -1054,7 +1034,7 @@ class AxiosHeaders {
1054
1034
  function setHeader(_value, _header, _rewrite) {
1055
1035
  const lHeader = normalizeHeader(_header);
1056
1036
  if (!lHeader) {
1057
- return;
1037
+ throw new Error('header name must be a non-empty string');
1058
1038
  }
1059
1039
  const key = utils$1.findKey(self, lHeader);
1060
1040
  if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) {
@@ -1072,7 +1052,7 @@ class AxiosHeaders {
1072
1052
  key;
1073
1053
  for (const entry of header) {
1074
1054
  if (!utils$1.isArray(entry)) {
1075
- throw new TypeError('Object iterator must return a key-value pair');
1055
+ throw TypeError('Object iterator must return a key-value pair');
1076
1056
  }
1077
1057
  obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
1078
1058
  }
@@ -1550,7 +1530,7 @@ function toFormData(obj, formData, options) {
1550
1530
  throw new AxiosError('Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
1551
1531
  }
1552
1532
  if (stack.indexOf(value) !== -1) {
1553
- throw new Error('Circular reference detected in ' + path.join('.'));
1533
+ throw Error('Circular reference detected in ' + path.join('.'));
1554
1534
  }
1555
1535
  stack.push(value);
1556
1536
  utils$1.forEach(value, function each(el, key) {
@@ -1732,8 +1712,7 @@ var transitionalDefaults = {
1732
1712
  silentJSONParsing: true,
1733
1713
  forcedJSONParsing: true,
1734
1714
  clarifyTimeoutError: false,
1735
- legacyInterceptorReqResOrdering: true,
1736
- advertiseZstdAcceptEncoding: false
1715
+ legacyInterceptorReqResOrdering: true
1737
1716
  };
1738
1717
 
1739
1718
  var URLSearchParams = url.URLSearchParams;
@@ -2234,7 +2213,7 @@ function getEnv(key) {
2234
2213
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || '';
2235
2214
  }
2236
2215
 
2237
- const VERSION = "1.17.0";
2216
+ const VERSION = "1.16.1";
2238
2217
 
2239
2218
  function parseProtocol(url) {
2240
2219
  const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
@@ -2473,10 +2452,10 @@ const formDataToStream = (form, headersHandler, options) => {
2473
2452
  boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET)
2474
2453
  } = options || {};
2475
2454
  if (!utils$1.isFormData(form)) {
2476
- throw new TypeError('FormData instance required');
2455
+ throw TypeError('FormData instance required');
2477
2456
  }
2478
2457
  if (boundary.length < 1 || boundary.length > 70) {
2479
- throw new Error('boundary must be 1-70 characters long');
2458
+ throw Error('boundary must be 1-70 characters long');
2480
2459
  }
2481
2460
  const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);
2482
2461
  const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF);
@@ -2526,84 +2505,6 @@ class ZlibHeaderTransformStream extends stream.Transform {
2526
2505
  }
2527
2506
  }
2528
2507
 
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
-
2607
2508
  const callbackify = (fn, reducer) => {
2608
2509
  return utils$1.isAsyncFn(fn) ? function (...args) {
2609
2510
  const cb = args.pop();
@@ -2969,14 +2870,7 @@ const brotliOptions = {
2969
2870
  flush: zlib.constants.BROTLI_OPERATION_FLUSH,
2970
2871
  finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
2971
2872
  };
2972
- const zstdOptions = {
2973
- flush: zlib.constants.ZSTD_e_flush,
2974
- finishFlush: zlib.constants.ZSTD_e_flush
2975
- };
2976
2873
  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' : '');
2980
2874
  const {
2981
2875
  http: httpFollow,
2982
2876
  https: httpsFollow
@@ -3024,19 +2918,6 @@ function getTunnelingAgent(agentOptions, userHttpsAgent) {
3024
2918
  ...agentOptions
3025
2919
  } : agentOptions;
3026
2920
  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
- }
3040
2921
  agent[kAxiosInstalledTunnel] = true;
3041
2922
  cache.set(key, agent);
3042
2923
  return agent;
@@ -3049,7 +2930,7 @@ const supportedProtocols = platform.protocols.map(protocol => {
3049
2930
  // Decode before composing the `auth` option so credentials such as
3050
2931
  // `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the
3051
2932
  // original value for malformed input so a bad encoding never throws.
3052
- const decodeURIComponentSafe$1 = value => {
2933
+ const decodeURIComponentSafe = value => {
3053
2934
  if (!utils$1.isString(value)) {
3054
2935
  return value;
3055
2936
  }
@@ -3063,11 +2944,84 @@ const flushOnFinish = (stream, [throttled, flush]) => {
3063
2944
  stream.on('end', flush).on('error', flush);
3064
2945
  return throttled;
3065
2946
  };
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
+ }
3066
3020
  const http2Sessions = new Http2Sessions();
3067
3021
 
3068
3022
  /**
3069
- * If the proxy, auth, or config beforeRedirects functions are defined, call them
3070
- * with the options object.
3023
+ * If the proxy or config beforeRedirects functions are defined, call them with the options
3024
+ * object.
3071
3025
  *
3072
3026
  * @param {Object<string, any>} options - The options object that was passed to the request.
3073
3027
  *
@@ -3077,9 +3031,6 @@ function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
3077
3031
  if (options.beforeRedirects.proxy) {
3078
3032
  options.beforeRedirects.proxy(options);
3079
3033
  }
3080
- if (options.beforeRedirects.auth) {
3081
- options.beforeRedirects.auth(options);
3082
- }
3083
3034
  if (options.beforeRedirects.config) {
3084
3035
  options.beforeRedirects.config(options, responseDetails, requestDetails);
3085
3036
  }
@@ -3315,7 +3266,6 @@ const http2Transport = {
3315
3266
  var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3316
3267
  return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
3317
3268
  const own = key => utils$1.hasOwnProp(config, key) ? config[key] : undefined;
3318
- const transitional = own('transitional') || transitionalDefaults;
3319
3269
  let data = own('data');
3320
3270
  let lookup = own('lookup');
3321
3271
  let family = own('family');
@@ -3355,7 +3305,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3355
3305
  try {
3356
3306
  abortEmitter.emit('abort', !reason || reason.type ? new CanceledError(null, config, req) : reason);
3357
3307
  } catch (err) {
3358
- // ignore emit errors
3308
+ console.warn('emit error', err);
3359
3309
  }
3360
3310
  }
3361
3311
  function clearConnectPhaseTimer() {
@@ -3366,6 +3316,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3366
3316
  }
3367
3317
  function createTimeoutError() {
3368
3318
  let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
3319
+ const transitional = config.transitional || transitionalDefaults;
3369
3320
  if (config.timeoutErrorMessage) {
3370
3321
  timeoutErrorMessage = config.timeoutErrorMessage;
3371
3322
  }
@@ -3538,9 +3489,9 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3538
3489
  const password = configAuth.password || '';
3539
3490
  auth = username + ':' + password;
3540
3491
  }
3541
- if (!auth && (parsed.username || parsed.password)) {
3542
- const urlUsername = decodeURIComponentSafe$1(parsed.username);
3543
- const urlPassword = decodeURIComponentSafe$1(parsed.password);
3492
+ if (!auth && parsed.username) {
3493
+ const urlUsername = decodeURIComponentSafe(parsed.username);
3494
+ const urlPassword = decodeURIComponentSafe(parsed.password);
3544
3495
  auth = urlUsername + ':' + urlPassword;
3545
3496
  }
3546
3497
  auth && headers.delete('authorization');
@@ -3554,7 +3505,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3554
3505
  customErr.exists = true;
3555
3506
  return reject(customErr);
3556
3507
  }
3557
- headers.set('Accept-Encoding', utils$1.hasOwnProp(transitional, 'advertiseZstdAcceptEncoding') && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false);
3508
+ headers.set('Accept-Encoding', 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''), false);
3558
3509
 
3559
3510
  // Null-prototype to block prototype pollution gadgets on properties read
3560
3511
  // directly by Node's http.request (e.g. insecureHTTPParser, lookup).
@@ -3576,21 +3527,19 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3576
3527
 
3577
3528
  // cacheable-lookup integration hotfix
3578
3529
  !utils$1.isUndefined(lookup) && (options.lookup = lookup);
3579
- const socketPath = own('socketPath');
3580
- if (socketPath) {
3581
- if (typeof socketPath !== 'string') {
3530
+ if (config.socketPath) {
3531
+ if (typeof config.socketPath !== 'string') {
3582
3532
  return reject(new AxiosError('socketPath must be a string', AxiosError.ERR_BAD_OPTION_VALUE, config));
3583
3533
  }
3584
- const allowedSocketPaths = own('allowedSocketPaths');
3585
- if (allowedSocketPaths != null) {
3586
- const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
3587
- const resolvedSocket = path.resolve(socketPath);
3534
+ if (config.allowedSocketPaths != null) {
3535
+ const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
3536
+ const resolvedSocket = path.resolve(config.socketPath);
3588
3537
  const isAllowed = allowed.some(entry => typeof entry === 'string' && path.resolve(entry) === resolvedSocket);
3589
3538
  if (!isAllowed) {
3590
- return reject(new AxiosError(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
3539
+ return reject(new AxiosError(`socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
3591
3540
  }
3592
3541
  }
3593
- options.socketPath = socketPath;
3542
+ options.socketPath = config.socketPath;
3594
3543
  } else {
3595
3544
  options.hostname = parsed.hostname.startsWith('[') ? parsed.hostname.slice(1, -1) : parsed.hostname;
3596
3545
  options.port = parsed.port;
@@ -3621,23 +3570,6 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3621
3570
  if (configBeforeRedirect) {
3622
3571
  options.beforeRedirects.config = configBeforeRedirect;
3623
3572
  }
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
- }
3641
3573
  transport = isHttpsRequest ? httpsFollow : httpFollow;
3642
3574
  }
3643
3575
  }
@@ -3706,13 +3638,6 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3706
3638
  streams.push(zlib.createBrotliDecompress(brotliOptions));
3707
3639
  delete res.headers['content-encoding'];
3708
3640
  }
3709
- break;
3710
- case 'zstd':
3711
- if (isZstdSupported) {
3712
- streams.push(zlib.createZstdDecompress(zstdOptions));
3713
- delete res.headers['content-encoding'];
3714
- }
3715
- break;
3716
3641
  }
3717
3642
  }
3718
3643
  responseStream = streams.length > 1 ? stream.pipeline(streams, utils$1.noop) : streams[0];
@@ -4124,8 +4049,8 @@ function setFormDataHeaders(headers, formHeaders, policy) {
4124
4049
  *
4125
4050
  * @returns {string} UTF-8 bytes as a Latin-1 string
4126
4051
  */
4127
- const encodeUTF8$1 = str => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
4128
- function resolveConfig(config) {
4052
+ const encodeUTF8 = str => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
4053
+ var resolveConfig = config => {
4129
4054
  const newConfig = mergeConfig({}, config);
4130
4055
 
4131
4056
  // Read only own properties to prevent prototype pollution gadgets
@@ -4141,15 +4066,15 @@ function resolveConfig(config) {
4141
4066
  const allowAbsoluteUrls = own('allowAbsoluteUrls');
4142
4067
  const url = own('url');
4143
4068
  newConfig.headers = headers = AxiosHeaders.from(headers);
4144
- newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls), own('params'), own('paramsSerializer'));
4069
+ newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls), config.params, config.paramsSerializer);
4145
4070
 
4146
4071
  // HTTP basic authentication
4147
4072
  if (auth) {
4148
- headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8$1(auth.password) : '')));
4073
+ headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? encodeUTF8(auth.password) : '')));
4149
4074
  }
4150
4075
  if (utils$1.isFormData(data)) {
4151
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
4152
- headers.setContentType(undefined); // browser/web worker/RN handles it
4076
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
4077
+ headers.setContentType(undefined); // browser handles it
4153
4078
  } else if (utils$1.isFunction(data.getHeaders)) {
4154
4079
  // Node.js FormData (like form-data package)
4155
4080
  setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
@@ -4177,7 +4102,7 @@ function resolveConfig(config) {
4177
4102
  }
4178
4103
  }
4179
4104
  return newConfig;
4180
- }
4105
+ };
4181
4106
 
4182
4107
  const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
4183
4108
  var xhrAdapter = isXHRAdapterSupported && function (config) {
@@ -4478,31 +4403,6 @@ const DEFAULT_CHUNK_SIZE = 64 * 1024;
4478
4403
  const {
4479
4404
  isFunction
4480
4405
  } = 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
- };
4506
4406
  const test = (fn, ...args) => {
4507
4407
  try {
4508
4408
  return !!fn(...args);
@@ -4510,14 +4410,6 @@ const test = (fn, ...args) => {
4510
4410
  return false;
4511
4411
  }
4512
4412
  };
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
- };
4521
4413
  const factory = env => {
4522
4414
  const globalObject = utils$1.global !== undefined && utils$1.global !== null ? utils$1.global : globalThis;
4523
4415
  const {
@@ -4621,7 +4513,6 @@ const factory = env => {
4621
4513
  } = resolveConfig(config);
4622
4514
  const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
4623
4515
  const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
4624
- const own = key => utils$1.hasOwnProp(config, key) ? config[key] : undefined;
4625
4516
  let _fetch = envFetch || fetch;
4626
4517
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
4627
4518
  let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
@@ -4631,38 +4522,6 @@ const factory = env => {
4631
4522
  });
4632
4523
  let requestContentLength;
4633
4524
  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
-
4666
4525
  // Enforce maxContentLength for data: URLs up-front so we never materialize
4667
4526
  // an oversized payload. The HTTP adapter applies the same check (see http.js
4668
4527
  // "if (protocol === 'data:')" branch).
@@ -5179,8 +5038,7 @@ class Axios {
5179
5038
  silentJSONParsing: validators.transitional(validators.boolean),
5180
5039
  forcedJSONParsing: validators.transitional(validators.boolean),
5181
5040
  clarifyTimeoutError: validators.transitional(validators.boolean),
5182
- legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
5183
- advertiseZstdAcceptEncoding: validators.transitional(validators.boolean)
5041
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
5184
5042
  }, false);
5185
5043
  }
5186
5044
  if (paramsSerializer != null) {