@zuplo/cli 6.69.4 → 6.69.5

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 (333) hide show
  1. package/dist/__tests__/integration/jest-mocks-setup.js +29 -10
  2. package/dist/__tests__/integration/jest-mocks-setup.js.map +1 -1
  3. package/dist/cmds/custom-domain/index.d.ts.map +1 -1
  4. package/dist/cmds/custom-domain/index.js +6 -10
  5. package/dist/cmds/custom-domain/index.js.map +1 -1
  6. package/dist/cmds/mtls-certificates/index.d.ts.map +1 -1
  7. package/dist/cmds/mtls-certificates/index.js +8 -12
  8. package/dist/cmds/mtls-certificates/index.js.map +1 -1
  9. package/dist/cmds/open-api/index.d.ts.map +1 -1
  10. package/dist/cmds/open-api/index.js +2 -5
  11. package/dist/cmds/open-api/index.js.map +1 -1
  12. package/dist/cmds/project/index.d.ts.map +1 -1
  13. package/dist/cmds/project/index.js +2 -5
  14. package/dist/cmds/project/index.js.map +1 -1
  15. package/dist/cmds/proxies/index.d.ts +4 -4
  16. package/dist/cmds/proxies/index.d.ts.map +1 -1
  17. package/dist/cmds/proxies/index.js +6 -10
  18. package/dist/cmds/proxies/index.js.map +1 -1
  19. package/dist/cmds/source/index.d.ts.map +1 -1
  20. package/dist/cmds/source/index.js +2 -9
  21. package/dist/cmds/source/index.js.map +1 -1
  22. package/dist/cmds/source/migrate.d.ts +4 -4
  23. package/dist/cmds/source/migrate.d.ts.map +1 -1
  24. package/dist/cmds/source/migrate.js +3 -6
  25. package/dist/cmds/source/migrate.js.map +1 -1
  26. package/dist/cmds/tunnel/index.d.ts.map +1 -1
  27. package/dist/cmds/tunnel/index.js +8 -12
  28. package/dist/cmds/tunnel/index.js.map +1 -1
  29. package/dist/cmds/tunnel/services/index.d.ts.map +1 -1
  30. package/dist/cmds/tunnel/services/index.js +2 -5
  31. package/dist/cmds/tunnel/services/index.js.map +1 -1
  32. package/dist/cmds/variable/index.d.ts.map +1 -1
  33. package/dist/cmds/variable/index.js +2 -5
  34. package/dist/cmds/variable/index.js.map +1 -1
  35. package/dist/common/handler.d.ts +4 -1
  36. package/dist/common/handler.d.ts.map +1 -1
  37. package/dist/common/handler.js +11 -2
  38. package/dist/common/handler.js.map +1 -1
  39. package/dist/common/middleware/get-environment-param.d.ts.map +1 -1
  40. package/dist/common/middleware/get-environment-param.js +2 -18
  41. package/dist/common/middleware/get-environment-param.js.map +1 -1
  42. package/dist/common/utils/build-environment-prompt-choices.d.ts +13 -0
  43. package/dist/common/utils/build-environment-prompt-choices.d.ts.map +1 -0
  44. package/dist/common/utils/build-environment-prompt-choices.js +66 -0
  45. package/dist/common/utils/build-environment-prompt-choices.js.map +1 -0
  46. package/dist/common/utils/build-environment-prompt-choices.test.d.ts +2 -0
  47. package/dist/common/utils/build-environment-prompt-choices.test.d.ts.map +1 -0
  48. package/dist/common/utils/build-environment-prompt-choices.test.js +97 -0
  49. package/dist/common/utils/build-environment-prompt-choices.test.js.map +1 -0
  50. package/dist/common/utils/pretty-print-environment-prompt.d.ts +1 -4
  51. package/dist/common/utils/pretty-print-environment-prompt.d.ts.map +1 -1
  52. package/dist/common/utils/pretty-print-environment-prompt.js +3 -8
  53. package/dist/common/utils/pretty-print-environment-prompt.js.map +1 -1
  54. package/dist/common/utils/pretty-print-environment-prompt.test.js +15 -17
  55. package/dist/common/utils/pretty-print-environment-prompt.test.js.map +1 -1
  56. package/dist/common/utils/sort-environments-for-prompt.d.ts +5 -0
  57. package/dist/common/utils/sort-environments-for-prompt.d.ts.map +1 -0
  58. package/dist/common/utils/sort-environments-for-prompt.js +27 -0
  59. package/dist/common/utils/sort-environments-for-prompt.js.map +1 -0
  60. package/dist/common/utils/sort-environments-for-prompt.test.d.ts +2 -0
  61. package/dist/common/utils/sort-environments-for-prompt.test.d.ts.map +1 -0
  62. package/dist/common/utils/sort-environments-for-prompt.test.js +82 -0
  63. package/dist/common/utils/sort-environments-for-prompt.test.js.map +1 -0
  64. package/dist/tsconfig.tsbuildinfo +1 -1
  65. package/node_modules/@fastify/proxy-addr/node_modules/ipaddr.js/README.md +1 -5
  66. package/node_modules/@fastify/proxy-addr/node_modules/ipaddr.js/ipaddr.min.js +1 -1
  67. package/node_modules/@fastify/proxy-addr/node_modules/ipaddr.js/lib/ipaddr.js +21 -6
  68. package/node_modules/@fastify/proxy-addr/node_modules/ipaddr.js/package.json +1 -1
  69. package/node_modules/@zuplo/core/index.minified.js +141 -137
  70. package/node_modules/@zuplo/core/package.json +1 -1
  71. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/.github/workflows/ci.yml +1 -1
  72. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/.github/workflows/lock-threads.yml +19 -0
  73. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/LICENSE +1 -3
  74. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/benchmark/bench-cmp-lib.js +60 -44
  75. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/index.js +2 -2
  76. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/package.json +7 -7
  77. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/anyof.test.js +20 -0
  78. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/array.test.js +22 -0
  79. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/debug-mode.test.js +21 -0
  80. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/if-then-else.test.js +72 -0
  81. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/invalidSchema.test.js +20 -0
  82. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/issue-836.test.js +183 -0
  83. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/json-add-comma.test.js +57 -57
  84. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/oneof.test.js +20 -0
  85. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/ref.test.js +31 -0
  86. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/test/typebox.test.js +1 -1
  87. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/types/{index.test-d.ts → index.tst.ts} +17 -17
  88. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +1 -0
  89. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +1 -0
  90. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +5 -0
  91. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
  92. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +1380 -0
  93. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -0
  94. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.js +1686 -0
  95. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -0
  96. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
  97. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +7 -0
  98. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +12 -0
  99. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -0
  100. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/perf.js +11 -0
  101. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -0
  102. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +1 -0
  103. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
  104. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +2 -2
  105. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +4 -7
  106. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.d.ts +2 -3
  107. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -1
  108. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.js +10 -16
  109. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.js.map +1 -1
  110. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
  111. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/index.min.js.map +4 -4
  112. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.d.ts.map +1 -0
  113. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +1 -0
  114. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +5 -0
  115. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
  116. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.d.ts +1380 -0
  117. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -0
  118. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.js +1686 -0
  119. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -0
  120. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
  121. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +7 -0
  122. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +12 -0
  123. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -0
  124. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/perf.js +11 -0
  125. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -0
  126. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/perf.d.ts +12 -0
  127. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -0
  128. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/perf.js +11 -0
  129. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -0
  130. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +1 -0
  131. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +1 -0
  132. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +1 -1
  133. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +1 -1
  134. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.d.ts +2 -3
  135. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -1
  136. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.js +9 -15
  137. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -1
  138. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
  139. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/index.min.js.map +4 -4
  140. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/perf.d.ts +12 -0
  141. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -0
  142. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/perf.js +8 -0
  143. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -0
  144. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -1
  145. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +1 -1
  146. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.d.ts +2 -3
  147. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -1
  148. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.js +9 -15
  149. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.js.map +1 -1
  150. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.min.js +1 -1
  151. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/index.min.js.map +4 -4
  152. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.ts.map +1 -0
  153. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +1 -0
  154. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +1 -1
  155. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +2 -3
  156. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.d.ts +2 -3
  157. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -1
  158. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.js +9 -15
  159. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.js.map +1 -1
  160. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
  161. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/index.min.js.map +4 -4
  162. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/perf.d.ts +12 -0
  163. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -0
  164. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/perf.js +8 -0
  165. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -0
  166. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/perf.d.ts +12 -0
  167. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -0
  168. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/perf.js +8 -0
  169. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/perf.js.map +1 -0
  170. package/node_modules/@zuplo/editor/node_modules/lru-cache/package.json +44 -16
  171. package/node_modules/@zuplo/graphql/package.json +1 -1
  172. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  173. package/node_modules/@zuplo/otel/package.json +1 -1
  174. package/node_modules/@zuplo/runtime/out/esm/index.js +54 -54
  175. package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
  176. package/node_modules/@zuplo/runtime/out/types/index.d.ts +4 -0
  177. package/node_modules/@zuplo/runtime/package.json +1 -1
  178. package/node_modules/axios/CHANGELOG.md +32 -6
  179. package/node_modules/axios/README.md +356 -20
  180. package/node_modules/axios/dist/axios.js +1389 -1071
  181. package/node_modules/axios/dist/axios.js.map +1 -1
  182. package/node_modules/axios/dist/axios.min.js +3 -3
  183. package/node_modules/axios/dist/axios.min.js.map +1 -1
  184. package/node_modules/axios/dist/browser/axios.cjs +1486 -1123
  185. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  186. package/node_modules/axios/dist/esm/axios.js +1488 -1124
  187. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  188. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  189. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  190. package/node_modules/axios/dist/node/axios.cjs +1230 -871
  191. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  192. package/node_modules/axios/index.d.cts +25 -13
  193. package/node_modules/axios/index.d.ts +21 -4
  194. package/node_modules/axios/index.js +2 -0
  195. package/node_modules/axios/lib/adapters/adapters.js +4 -2
  196. package/node_modules/axios/lib/adapters/fetch.js +126 -10
  197. package/node_modules/axios/lib/adapters/http.js +178 -59
  198. package/node_modules/axios/lib/adapters/xhr.js +6 -2
  199. package/node_modules/axios/lib/core/Axios.js +7 -3
  200. package/node_modules/axios/lib/core/AxiosError.js +86 -1
  201. package/node_modules/axios/lib/core/AxiosHeaders.js +3 -0
  202. package/node_modules/axios/lib/core/dispatchRequest.js +19 -7
  203. package/node_modules/axios/lib/core/mergeConfig.js +6 -3
  204. package/node_modules/axios/lib/core/settle.js +7 -11
  205. package/node_modules/axios/lib/defaults/index.js +1 -1
  206. package/node_modules/axios/lib/env/data.js +1 -1
  207. package/node_modules/axios/lib/helpers/buildURL.js +1 -1
  208. package/node_modules/axios/lib/helpers/cookies.js +14 -2
  209. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +28 -1
  210. package/node_modules/axios/lib/helpers/formDataToStream.js +1 -1
  211. package/node_modules/axios/lib/helpers/parseProtocol.js +1 -1
  212. package/node_modules/axios/lib/helpers/resolveConfig.js +33 -17
  213. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +26 -1
  214. package/node_modules/axios/lib/helpers/validator.js +1 -1
  215. package/node_modules/axios/lib/utils.js +27 -15
  216. package/node_modules/axios/package.json +17 -24
  217. package/node_modules/fast-uri/.github/workflows/ci.yml +12 -7
  218. package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
  219. package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +1 -1
  220. package/node_modules/fast-uri/LICENSE +1 -3
  221. package/node_modules/fast-uri/README.md +13 -4
  222. package/node_modules/fast-uri/index.js +90 -24
  223. package/node_modules/fast-uri/lib/utils.js +129 -22
  224. package/node_modules/fast-uri/package.json +3 -4
  225. package/node_modules/fast-uri/test/equal.test.js +9 -0
  226. package/node_modules/fast-uri/test/parse.test.js +5 -0
  227. package/node_modules/fast-uri/test/resolve.test.js +9 -0
  228. package/node_modules/fast-uri/test/security-normalization.test.js +39 -0
  229. package/node_modules/fast-uri/test/security.test.js +133 -0
  230. package/node_modules/is-core-module/CHANGELOG.md +244 -113
  231. package/node_modules/is-core-module/README.md +1 -1
  232. package/node_modules/is-core-module/core.json +12 -12
  233. package/node_modules/is-core-module/package.json +5 -5
  234. package/node_modules/is-core-module/test/index.js +101 -0
  235. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +1 -0
  236. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +1 -0
  237. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +5 -0
  238. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
  239. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +1380 -0
  240. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -0
  241. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.js +1686 -0
  242. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -0
  243. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
  244. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +7 -0
  245. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +12 -0
  246. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -0
  247. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/perf.js +11 -0
  248. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -0
  249. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +1 -0
  250. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
  251. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +2 -2
  252. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +4 -7
  253. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.d.ts +2 -3
  254. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -1
  255. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.js +10 -16
  256. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.js.map +1 -1
  257. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.min.js +1 -1
  258. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/index.min.js.map +4 -4
  259. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.d.ts.map +1 -0
  260. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +1 -0
  261. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +5 -0
  262. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
  263. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.d.ts +1380 -0
  264. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -0
  265. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.js +1686 -0
  266. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -0
  267. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
  268. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +7 -0
  269. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +12 -0
  270. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -0
  271. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/perf.js +11 -0
  272. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -0
  273. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/perf.d.ts +12 -0
  274. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -0
  275. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/perf.js +11 -0
  276. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -0
  277. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +1 -0
  278. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +1 -0
  279. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +1 -1
  280. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +1 -1
  281. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.d.ts +2 -3
  282. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -1
  283. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.js +9 -15
  284. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -1
  285. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.min.js +1 -1
  286. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/index.min.js.map +4 -4
  287. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/perf.d.ts +12 -0
  288. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -0
  289. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/perf.js +8 -0
  290. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -0
  291. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -1
  292. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +1 -1
  293. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.d.ts +2 -3
  294. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -1
  295. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.js +9 -15
  296. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.js.map +1 -1
  297. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.min.js +1 -1
  298. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/index.min.js.map +4 -4
  299. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.ts.map +1 -0
  300. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +1 -0
  301. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +1 -1
  302. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +2 -3
  303. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.d.ts +2 -3
  304. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -1
  305. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.js +9 -15
  306. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.js.map +1 -1
  307. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.min.js +1 -1
  308. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/index.min.js.map +4 -4
  309. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/perf.d.ts +12 -0
  310. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -0
  311. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/perf.js +8 -0
  312. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -0
  313. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/perf.d.ts +12 -0
  314. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -0
  315. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/perf.js +8 -0
  316. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/perf.js.map +1 -0
  317. package/node_modules/rimraf/node_modules/lru-cache/package.json +44 -16
  318. package/package.json +6 -6
  319. package/node_modules/@zuplo/editor/node_modules/fast-json-stringify/.github/stale.yml +0 -21
  320. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts.map +0 -1
  321. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js.map +0 -1
  322. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.mts.map +0 -1
  323. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.mjs.map +0 -1
  324. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.mts.map +0 -1
  325. package/node_modules/@zuplo/editor/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.mjs.map +0 -1
  326. package/node_modules/fast-uri/.github/.stale.yml +0 -21
  327. package/node_modules/fast-uri/.github/tests_checker.yml +0 -8
  328. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts.map +0 -1
  329. package/node_modules/rimraf/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js.map +0 -1
  330. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.mts.map +0 -1
  331. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.mjs.map +0 -1
  332. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.mts.map +0 -1
  333. package/node_modules/rimraf/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.mjs.map +0 -1
@@ -1,7 +1,3 @@
1
- interface RawAxiosHeaders {
2
- [key: string]: axios.AxiosHeaderValue;
3
- }
4
-
5
1
  type MethodsHeaders = Partial<
6
2
  {
7
3
  [Key in axios.Method as Lowercase<Key>]: AxiosHeaders;
@@ -44,7 +40,7 @@ type CommonResponseHeaderKey = CommonResponseHeadersList | Lowercase<CommonRespo
44
40
  type BrowserProgressEvent = any;
45
41
 
46
42
  declare class AxiosHeaders {
47
- constructor(headers?: RawAxiosHeaders | AxiosHeaders | string);
43
+ constructor(headers?: axios.RawAxiosHeaders | AxiosHeaders | string);
48
44
 
49
45
  [key: string]: any;
50
46
 
@@ -53,7 +49,7 @@ declare class AxiosHeaders {
53
49
  value?: axios.AxiosHeaderValue,
54
50
  rewrite?: boolean | AxiosHeaderMatcher
55
51
  ): AxiosHeaders;
56
- set(headers?: RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
52
+ set(headers?: axios.RawAxiosHeaders | AxiosHeaders | string, rewrite?: boolean): AxiosHeaders;
57
53
 
58
54
  get(headerName: string, parser: RegExp): RegExpExecArray | null;
59
55
  get(headerName: string, matcher?: true | AxiosHeaderParser): axios.AxiosHeaderValue;
@@ -67,17 +63,17 @@ declare class AxiosHeaders {
67
63
  normalize(format: boolean): AxiosHeaders;
68
64
 
69
65
  concat(
70
- ...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
66
+ ...targets: Array<AxiosHeaders | axios.RawAxiosHeaders | string | undefined | null>
71
67
  ): AxiosHeaders;
72
68
 
73
- toJSON(asStrings?: boolean): RawAxiosHeaders;
69
+ toJSON(asStrings?: boolean): axios.RawAxiosHeaders;
74
70
 
75
- static from(thing?: AxiosHeaders | RawAxiosHeaders | string): AxiosHeaders;
71
+ static from(thing?: AxiosHeaders | axios.RawAxiosHeaders | string): AxiosHeaders;
76
72
 
77
73
  static accessor(header: string | string[]): AxiosHeaders;
78
74
 
79
75
  static concat(
80
- ...targets: Array<AxiosHeaders | RawAxiosHeaders | string | undefined | null>
76
+ ...targets: Array<AxiosHeaders | axios.RawAxiosHeaders | string | undefined | null>
81
77
  ): AxiosHeaders;
82
78
 
83
79
  setContentType(value: ContentType, rewrite?: boolean | AxiosHeaderMatcher): AxiosHeaders;
@@ -162,6 +158,7 @@ declare class AxiosError<T = unknown, D = any> extends Error {
162
158
  static readonly ERR_CANCELED = 'ERR_CANCELED';
163
159
  static readonly ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
164
160
  static readonly ECONNABORTED = 'ECONNABORTED';
161
+ static readonly ECONNREFUSED = 'ECONNREFUSED';
165
162
  static readonly ETIMEDOUT = 'ETIMEDOUT';
166
163
  }
167
164
 
@@ -224,6 +221,11 @@ declare class Axios {
224
221
  data?: D,
225
222
  config?: axios.AxiosRequestConfig<D>
226
223
  ): Promise<R>;
224
+ query<T = any, R = axios.AxiosResponse<T>, D = any>(
225
+ url: string,
226
+ data?: D,
227
+ config?: axios.AxiosRequestConfig<D>
228
+ ): Promise<R>;
227
229
  }
228
230
 
229
231
  declare enum HttpStatusCode {
@@ -297,6 +299,10 @@ type InternalAxiosError<T = unknown, D = any> = AxiosError<T, D>;
297
299
  declare namespace axios {
298
300
  type AxiosError<T = unknown, D = any> = InternalAxiosError<T, D>;
299
301
 
302
+ interface RawAxiosHeaders {
303
+ [key: string]: AxiosHeaderValue;
304
+ }
305
+
300
306
  type RawAxiosRequestHeaders = Partial<
301
307
  RawAxiosHeaders & {
302
308
  [Key in CommonRequestHeadersList]: AxiosHeaderValue;
@@ -358,7 +364,8 @@ declare namespace axios {
358
364
  | 'PATCH'
359
365
  | 'PURGE'
360
366
  | 'LINK'
361
- | 'UNLINK';
367
+ | 'UNLINK'
368
+ | 'QUERY';
362
369
 
363
370
  type Method = (UppercaseMethod | Lowercase<UppercaseMethod>) & {};
364
371
 
@@ -494,7 +501,8 @@ declare namespace axios {
494
501
  maxRate?: number | [MaxUploadRate, MaxDownloadRate];
495
502
  beforeRedirect?: (
496
503
  options: Record<string, any>,
497
- responseDetails: { headers: Record<string, string>; statusCode: HttpStatusCode }
504
+ responseDetails: { headers: Record<string, string>; statusCode: HttpStatusCode },
505
+ requestDetails: { headers: Record<string, string>; url: string; method: string },
498
506
  ) => void;
499
507
  socketPath?: string | null;
500
508
  allowedSocketPaths?: string | string[] | null;
@@ -502,7 +510,7 @@ declare namespace axios {
502
510
  httpAgent?: any;
503
511
  httpsAgent?: any;
504
512
  proxy?: AxiosProxyConfig | false;
505
- cancelToken?: CancelToken;
513
+ cancelToken?: CancelToken | undefined;
506
514
  decompress?: boolean;
507
515
  transitional?: TransitionalOptions;
508
516
  signal?: GenericAbortSignal;
@@ -536,6 +544,7 @@ declare namespace axios {
536
544
  | LookupAddress
537
545
  >);
538
546
  withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
547
+ parseReviver?: (this: any, key: string, value: any, context?: { source: string }) => any;
539
548
  fetchOptions?:
540
549
  | Omit<RequestInit, 'body' | 'headers' | 'method' | 'signal'>
541
550
  | Record<string, any>;
@@ -543,6 +552,8 @@ declare namespace axios {
543
552
  http2Options?: Record<string, any> & {
544
553
  sessionTimeout?: number;
545
554
  };
555
+ formDataHeaderPolicy?: 'legacy' | 'content-only';
556
+ redact?: string[];
546
557
  }
547
558
 
548
559
  // Alias
@@ -564,6 +575,7 @@ declare namespace axios {
564
575
  purge?: RawAxiosRequestHeaders;
565
576
  link?: RawAxiosRequestHeaders;
566
577
  unlink?: RawAxiosRequestHeaders;
578
+ query?: RawAxiosRequestHeaders;
567
579
  }
568
580
 
569
581
  interface AxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> {
@@ -3,7 +3,7 @@ type StringLiteralsOrString<Literals extends string> = Literals | (string & {});
3
3
 
4
4
  export type AxiosHeaderValue = AxiosHeaders | string | string[] | number | boolean | null;
5
5
 
6
- interface RawAxiosHeaders {
6
+ export interface RawAxiosHeaders {
7
7
  [key: string]: AxiosHeaderValue;
8
8
  }
9
9
 
@@ -243,7 +243,8 @@ type UppercaseMethod =
243
243
  | 'PATCH'
244
244
  | 'PURGE'
245
245
  | 'LINK'
246
- | 'UNLINK';
246
+ | 'UNLINK'
247
+ | 'QUERY';
247
248
 
248
249
  export type Method = (UppercaseMethod | Lowercase<UppercaseMethod>) & {};
249
250
 
@@ -394,7 +395,12 @@ export interface AxiosRequestConfig<D = any> {
394
395
  responseDetails: {
395
396
  headers: Record<string, string>;
396
397
  statusCode: HttpStatusCode;
397
- }
398
+ },
399
+ requestDetails: {
400
+ headers: Record<string, string>;
401
+ url: string;
402
+ method: string;
403
+ },
398
404
  ) => void;
399
405
  socketPath?: string | null;
400
406
  allowedSocketPaths?: string | string[] | null;
@@ -435,12 +441,14 @@ export interface AxiosRequestConfig<D = any> {
435
441
  [address: LookupAddressEntry | LookupAddressEntry[], family?: AddressFamily] | LookupAddress
436
442
  >);
437
443
  withXSRFToken?: boolean | ((config: InternalAxiosRequestConfig) => boolean | undefined);
438
- parseReviver?: (this: any, key: string, value: any) => any;
444
+ parseReviver?: (this: any, key: string, value: any, context?: { source: string }) => any;
439
445
  fetchOptions?: Omit<RequestInit, 'body' | 'headers' | 'method' | 'signal'> | Record<string, any>;
440
446
  httpVersion?: 1 | 2;
441
447
  http2Options?: Record<string, any> & {
442
448
  sessionTimeout?: number;
443
449
  };
450
+ formDataHeaderPolicy?: 'legacy' | 'content-only';
451
+ redact?: string[];
444
452
  }
445
453
 
446
454
  // Alias
@@ -462,6 +470,7 @@ export interface HeadersDefaults {
462
470
  purge?: RawAxiosRequestHeaders;
463
471
  link?: RawAxiosRequestHeaders;
464
472
  unlink?: RawAxiosRequestHeaders;
473
+ query?: RawAxiosRequestHeaders;
465
474
  }
466
475
 
467
476
  export interface AxiosDefaults<D = any> extends Omit<AxiosRequestConfig<D>, 'headers'> {
@@ -519,6 +528,7 @@ export class AxiosError<T = unknown, D = any> extends Error {
519
528
  static readonly ERR_CANCELED = 'ERR_CANCELED';
520
529
  static readonly ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
521
530
  static readonly ECONNABORTED = 'ECONNABORTED';
531
+ static readonly ECONNREFUSED = 'ECONNREFUSED';
522
532
  static readonly ETIMEDOUT = 'ETIMEDOUT';
523
533
  }
524
534
 
@@ -644,6 +654,11 @@ export class Axios {
644
654
  data?: D,
645
655
  config?: AxiosRequestConfig<D>
646
656
  ): Promise<R>;
657
+ query<T = any, R = AxiosResponse<T>, D = any>(
658
+ url: string,
659
+ data?: D,
660
+ config?: AxiosRequestConfig<D>
661
+ ): Promise<R>;
647
662
  }
648
663
 
649
664
  export interface AxiosInstance extends Axios {
@@ -693,6 +708,8 @@ export function mergeConfig<D = any>(
693
708
  config2: AxiosRequestConfig<D>
694
709
  ): AxiosRequestConfig<D>;
695
710
 
711
+ export function create(config?: CreateAxiosDefaults): AxiosInstance;
712
+
696
713
  export interface AxiosStatic extends AxiosInstance {
697
714
  Cancel: CancelStatic;
698
715
  CancelToken: CancelTokenStatic;
@@ -20,10 +20,12 @@ const {
20
20
  formToJSON,
21
21
  getAdapter,
22
22
  mergeConfig,
23
+ create,
23
24
  } = axios;
24
25
 
25
26
  export {
26
27
  axios as default,
28
+ create,
27
29
  Axios,
28
30
  AxiosError,
29
31
  CanceledError,
@@ -25,11 +25,13 @@ const knownAdapters = {
25
25
  utils.forEach(knownAdapters, (fn, value) => {
26
26
  if (fn) {
27
27
  try {
28
- Object.defineProperty(fn, 'name', { value });
28
+ // Null-proto descriptors so a polluted Object.prototype.get cannot turn
29
+ // these data descriptors into accessor descriptors on the way in.
30
+ Object.defineProperty(fn, 'name', { __proto__: null, value });
29
31
  } catch (e) {
30
32
  // eslint-disable-next-line no-empty
31
33
  }
32
- Object.defineProperty(fn, 'adapterName', { value });
34
+ Object.defineProperty(fn, 'adapterName', { __proto__: null, value });
33
35
  }
34
36
  });
35
37
 
@@ -11,18 +11,13 @@ import {
11
11
  } from '../helpers/progressEventReducer.js';
12
12
  import resolveConfig from '../helpers/resolveConfig.js';
13
13
  import settle from '../core/settle.js';
14
+ import estimateDataURLDecodedBytes from '../helpers/estimateDataURLDecodedBytes.js';
15
+ import { VERSION } from '../env/data.js';
14
16
 
15
17
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
16
18
 
17
19
  const { isFunction } = utils;
18
20
 
19
- const globalFetchAPI = (({ Request, Response }) => ({
20
- Request,
21
- Response,
22
- }))(utils.global);
23
-
24
- const { ReadableStream, TextEncoder } = utils.global;
25
-
26
21
  const test = (fn, ...args) => {
27
22
  try {
28
23
  return !!fn(...args);
@@ -32,11 +27,17 @@ const test = (fn, ...args) => {
32
27
  };
33
28
 
34
29
  const factory = (env) => {
30
+ const globalObject = utils.global ?? globalThis;
31
+ const { ReadableStream, TextEncoder } = globalObject;
32
+
35
33
  env = utils.merge.call(
36
34
  {
37
35
  skipUndefined: true,
38
36
  },
39
- globalFetchAPI,
37
+ {
38
+ Request: globalObject.Request,
39
+ Response: globalObject.Response,
40
+ },
40
41
  env
41
42
  );
42
43
 
@@ -163,8 +164,13 @@ const factory = (env) => {
163
164
  headers,
164
165
  withCredentials = 'same-origin',
165
166
  fetchOptions,
167
+ maxContentLength,
168
+ maxBodyLength,
166
169
  } = resolveConfig(config);
167
170
 
171
+ const hasMaxContentLength = utils.isNumber(maxContentLength) && maxContentLength > -1;
172
+ const hasMaxBodyLength = utils.isNumber(maxBodyLength) && maxBodyLength > -1;
173
+
168
174
  let _fetch = envFetch || fetch;
169
175
 
170
176
  responseType = responseType ? (responseType + '').toLowerCase() : 'text';
@@ -186,6 +192,41 @@ const factory = (env) => {
186
192
  let requestContentLength;
187
193
 
188
194
  try {
195
+ // Enforce maxContentLength for data: URLs up-front so we never materialize
196
+ // an oversized payload. The HTTP adapter applies the same check (see http.js
197
+ // "if (protocol === 'data:')" branch).
198
+ if (hasMaxContentLength && typeof url === 'string' && url.startsWith('data:')) {
199
+ const estimated = estimateDataURLDecodedBytes(url);
200
+ if (estimated > maxContentLength) {
201
+ throw new AxiosError(
202
+ 'maxContentLength size of ' + maxContentLength + ' exceeded',
203
+ AxiosError.ERR_BAD_RESPONSE,
204
+ config,
205
+ request
206
+ );
207
+ }
208
+ }
209
+
210
+ // Enforce maxBodyLength against the outbound request body before dispatch.
211
+ // Mirrors http.js behavior (ERR_BAD_REQUEST / 'Request body larger than
212
+ // maxBodyLength limit'). Skip when the body length cannot be determined
213
+ // (e.g. a live ReadableStream supplied by the caller).
214
+ if (hasMaxBodyLength && method !== 'get' && method !== 'head') {
215
+ const outboundLength = await resolveBodyLength(headers, data);
216
+ if (
217
+ typeof outboundLength === 'number' &&
218
+ isFinite(outboundLength) &&
219
+ outboundLength > maxBodyLength
220
+ ) {
221
+ throw new AxiosError(
222
+ 'Request body larger than maxBodyLength limit',
223
+ AxiosError.ERR_BAD_REQUEST,
224
+ config,
225
+ request
226
+ );
227
+ }
228
+ }
229
+
189
230
  if (
190
231
  onUploadProgress &&
191
232
  supportsRequestStream &&
@@ -236,6 +277,9 @@ const factory = (env) => {
236
277
  }
237
278
  }
238
279
 
280
+ // Set User-Agent header if not already set (fetch defaults to 'node' in Node.js)
281
+ headers.set('User-Agent', 'axios/' + VERSION, false);
282
+
239
283
  const resolvedOptions = {
240
284
  ...fetchOptions,
241
285
  signal: composedSignal,
@@ -252,10 +296,28 @@ const factory = (env) => {
252
296
  ? _fetch(request, fetchOptions)
253
297
  : _fetch(url, resolvedOptions));
254
298
 
299
+ // Cheap pre-check: if the server honestly declares a content-length that
300
+ // already exceeds the cap, reject before we start streaming.
301
+ if (hasMaxContentLength) {
302
+ const declaredLength = utils.toFiniteNumber(response.headers.get('content-length'));
303
+ if (declaredLength != null && declaredLength > maxContentLength) {
304
+ throw new AxiosError(
305
+ 'maxContentLength size of ' + maxContentLength + ' exceeded',
306
+ AxiosError.ERR_BAD_RESPONSE,
307
+ config,
308
+ request
309
+ );
310
+ }
311
+ }
312
+
255
313
  const isStreamResponse =
256
314
  supportsResponseStream && (responseType === 'stream' || responseType === 'response');
257
315
 
258
- if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
316
+ if (
317
+ supportsResponseStream &&
318
+ response.body &&
319
+ (onDownloadProgress || hasMaxContentLength || (isStreamResponse && unsubscribe))
320
+ ) {
259
321
  const options = {};
260
322
 
261
323
  ['status', 'statusText', 'headers'].forEach((prop) => {
@@ -272,8 +334,24 @@ const factory = (env) => {
272
334
  )) ||
273
335
  [];
274
336
 
337
+ let bytesRead = 0;
338
+ const onChunkProgress = (loadedBytes) => {
339
+ if (hasMaxContentLength) {
340
+ bytesRead = loadedBytes;
341
+ if (bytesRead > maxContentLength) {
342
+ throw new AxiosError(
343
+ 'maxContentLength size of ' + maxContentLength + ' exceeded',
344
+ AxiosError.ERR_BAD_RESPONSE,
345
+ config,
346
+ request
347
+ );
348
+ }
349
+ }
350
+ onProgress && onProgress(loadedBytes);
351
+ };
352
+
275
353
  response = new Response(
276
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
354
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
277
355
  flush && flush();
278
356
  unsubscribe && unsubscribe();
279
357
  }),
@@ -288,6 +366,33 @@ const factory = (env) => {
288
366
  config
289
367
  );
290
368
 
369
+ // Fallback enforcement for environments without ReadableStream support
370
+ // (legacy runtimes). Detect materialized size from typed output; skip
371
+ // streams/Response passthrough since the user will read those themselves.
372
+ if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
373
+ let materializedSize;
374
+ if (responseData != null) {
375
+ if (typeof responseData.byteLength === 'number') {
376
+ materializedSize = responseData.byteLength;
377
+ } else if (typeof responseData.size === 'number') {
378
+ materializedSize = responseData.size;
379
+ } else if (typeof responseData === 'string') {
380
+ materializedSize =
381
+ typeof TextEncoder === 'function'
382
+ ? new TextEncoder().encode(responseData).byteLength
383
+ : responseData.length;
384
+ }
385
+ }
386
+ if (typeof materializedSize === 'number' && materializedSize > maxContentLength) {
387
+ throw new AxiosError(
388
+ 'maxContentLength size of ' + maxContentLength + ' exceeded',
389
+ AxiosError.ERR_BAD_RESPONSE,
390
+ config,
391
+ request
392
+ );
393
+ }
394
+ }
395
+
291
396
  !isStreamResponse && unsubscribe && unsubscribe();
292
397
 
293
398
  return await new Promise((resolve, reject) => {
@@ -303,6 +408,17 @@ const factory = (env) => {
303
408
  } catch (err) {
304
409
  unsubscribe && unsubscribe();
305
410
 
411
+ // Safari can surface fetch aborts as a DOMException-like object whose
412
+ // branded getters throw. Prefer our composed signal reason before reading
413
+ // the caught error, preserving timeout vs cancellation semantics.
414
+ if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {
415
+ const canceledError = composedSignal.reason;
416
+ canceledError.config = config;
417
+ request && (canceledError.request = request);
418
+ err !== canceledError && (canceledError.cause = err);
419
+ throw canceledError;
420
+ }
421
+
306
422
  if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
307
423
  throw Object.assign(
308
424
  new AxiosError(