@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
@@ -47,6 +47,20 @@ const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);
47
47
  const { http: httpFollow, https: httpsFollow } = followRedirects;
48
48
 
49
49
  const isHttps = /https:?/;
50
+ const FORM_DATA_CONTENT_HEADERS = ['content-type', 'content-length'];
51
+
52
+ function setFormDataHeaders(headers, formHeaders, policy) {
53
+ if (policy !== 'content-only') {
54
+ headers.set(formHeaders);
55
+ return;
56
+ }
57
+
58
+ Object.entries(formHeaders).forEach(([key, val]) => {
59
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
60
+ headers.set(key, val);
61
+ }
62
+ });
63
+ }
50
64
 
51
65
  // Symbols used to bind a single 'error' listener to a pooled socket and track
52
66
  // the request currently owning that socket across keep-alive reuse (issue #10780).
@@ -57,6 +71,22 @@ const supportedProtocols = platform.protocols.map((protocol) => {
57
71
  return protocol + ':';
58
72
  });
59
73
 
74
+ // Node's WHATWG URL parser returns `username` and `password` percent-encoded.
75
+ // Decode before composing the `auth` option so credentials such as
76
+ // `my%40email.com:pass` are sent as `my@email.com:pass`. Falls back to the
77
+ // original value for malformed input so a bad encoding never throws.
78
+ const decodeURIComponentSafe = (value) => {
79
+ if (!utils.isString(value)) {
80
+ return value;
81
+ }
82
+
83
+ try {
84
+ return decodeURIComponent(value);
85
+ } catch (error) {
86
+ return value;
87
+ }
88
+ };
89
+
60
90
  const flushOnFinish = (stream, [throttled, flush]) => {
61
91
  stream.on('end', flush).on('error', flush);
62
92
 
@@ -176,12 +206,12 @@ const http2Sessions = new Http2Sessions();
176
206
  *
177
207
  * @returns {Object<string, any>}
178
208
  */
179
- function dispatchBeforeRedirect(options, responseDetails) {
209
+ function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
180
210
  if (options.beforeRedirects.proxy) {
181
211
  options.beforeRedirects.proxy(options);
182
212
  }
183
213
  if (options.beforeRedirects.config) {
184
- options.beforeRedirects.config(options, responseDetails);
214
+ options.beforeRedirects.config(options, responseDetails, requestDetails);
185
215
  }
186
216
  }
187
217
 
@@ -194,7 +224,7 @@ function dispatchBeforeRedirect(options, responseDetails) {
194
224
  *
195
225
  * @returns {http.ClientRequestArgs}
196
226
  */
197
- function setProxy(options, configProxy, location) {
227
+ function setProxy(options, configProxy, location, isRedirect) {
198
228
  let proxy = configProxy;
199
229
  if (!proxy && proxy !== false) {
200
230
  const proxyUrl = getProxyForUrl(location);
@@ -204,43 +234,87 @@ function setProxy(options, configProxy, location) {
204
234
  }
205
235
  }
206
236
  }
237
+ // On redirect re-invocation, strip any stale Proxy-Authorization header carried
238
+ // over from the prior request (e.g. new target no longer uses a proxy, or uses
239
+ // a different proxy). Skip on the initial request so user-supplied headers are
240
+ // preserved. Header names are case-insensitive, so remove every case variant.
241
+ if (isRedirect && options.headers) {
242
+ for (const name of Object.keys(options.headers)) {
243
+ if (name.toLowerCase() === 'proxy-authorization') {
244
+ delete options.headers[name];
245
+ }
246
+ }
247
+ }
207
248
  if (proxy) {
249
+ // Read proxy fields without traversing the prototype chain. URL instances expose
250
+ // username/password/hostname/host/port/protocol via getters on URL.prototype (so
251
+ // direct reads are shielded), but plain object proxies — and the `auth` field
252
+ // (which URL does not expose) — must be guarded so a polluted Object.prototype
253
+ // (e.g. Object.prototype.auth = { username, password }) cannot inject
254
+ // attacker-controlled credentials into the Proxy-Authorization header or
255
+ // redirect proxying to an attacker-controlled host.
256
+ const isProxyURL = proxy instanceof URL;
257
+ const readProxyField = (key) =>
258
+ isProxyURL || utils.hasOwnProp(proxy, key) ? proxy[key] : undefined;
259
+
260
+ const proxyUsername = readProxyField('username');
261
+ const proxyPassword = readProxyField('password');
262
+ let proxyAuth = utils.hasOwnProp(proxy, 'auth') ? proxy.auth : undefined;
263
+
208
264
  // Basic proxy authorization
209
- if (proxy.username) {
210
- proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');
265
+ if (proxyUsername) {
266
+ proxyAuth = (proxyUsername || '') + ':' + (proxyPassword || '');
211
267
  }
212
268
 
213
- if (proxy.auth) {
214
- // Support proxy auth object form
215
- const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password);
269
+ if (proxyAuth) {
270
+ // Support proxy auth object form. Read sub-fields via own-prop checks so a
271
+ // plain object inheriting from polluted Object.prototype cannot leak creds.
272
+ const authIsObject = typeof proxyAuth === 'object';
273
+ const authUsername =
274
+ authIsObject && utils.hasOwnProp(proxyAuth, 'username') ? proxyAuth.username : undefined;
275
+ const authPassword =
276
+ authIsObject && utils.hasOwnProp(proxyAuth, 'password') ? proxyAuth.password : undefined;
277
+ const validProxyAuth = Boolean(authUsername || authPassword);
216
278
 
217
279
  if (validProxyAuth) {
218
- proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || '');
219
- } else if (typeof proxy.auth === 'object') {
280
+ proxyAuth = (authUsername || '') + ':' + (authPassword || '');
281
+ } else if (authIsObject) {
220
282
  throw new AxiosError('Invalid proxy authorization', AxiosError.ERR_BAD_OPTION, { proxy });
221
283
  }
222
284
 
223
- const base64 = Buffer.from(proxy.auth, 'utf8').toString('base64');
285
+ const base64 = Buffer.from(proxyAuth, 'utf8').toString('base64');
224
286
 
225
287
  options.headers['Proxy-Authorization'] = 'Basic ' + base64;
226
288
  }
227
289
 
228
- options.headers.host = options.hostname + (options.port ? ':' + options.port : '');
229
- const proxyHost = proxy.hostname || proxy.host;
290
+ // Preserve a user-supplied Host header (case-insensitive) so callers can override
291
+ // the value forwarded to the proxy; otherwise default to the request URL's host.
292
+ let hasUserHostHeader = false;
293
+ for (const name of Object.keys(options.headers)) {
294
+ if (name.toLowerCase() === 'host') {
295
+ hasUserHostHeader = true;
296
+ break;
297
+ }
298
+ }
299
+ if (!hasUserHostHeader) {
300
+ options.headers.host = options.hostname + (options.port ? ':' + options.port : '');
301
+ }
302
+ const proxyHost = readProxyField('hostname') || readProxyField('host');
230
303
  options.hostname = proxyHost;
231
304
  // Replace 'host' since options is not a URL object
232
305
  options.host = proxyHost;
233
- options.port = proxy.port;
306
+ options.port = readProxyField('port');
234
307
  options.path = location;
235
- if (proxy.protocol) {
236
- options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;
308
+ const proxyProtocol = readProxyField('protocol');
309
+ if (proxyProtocol) {
310
+ options.protocol = proxyProtocol.includes(':') ? proxyProtocol : `${proxyProtocol}:`;
237
311
  }
238
312
  }
239
313
 
240
314
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
241
315
  // Configure proxy for redirected request, passing the original config proxy to apply
242
316
  // the exact same logic as if the redirected request was performed by axios directly.
243
- setProxy(redirectOptions, configProxy, redirectOptions.href);
317
+ setProxy(redirectOptions, configProxy, redirectOptions.href, true);
244
318
  };
245
319
  }
246
320
 
@@ -352,6 +426,7 @@ export default isHttpAdapterSupported &&
352
426
  let isDone;
353
427
  let rejected = false;
354
428
  let req;
429
+ let connectPhaseTimer;
355
430
 
356
431
  httpVersion = +httpVersion;
357
432
 
@@ -396,9 +471,34 @@ export default isHttpAdapterSupported &&
396
471
  }
397
472
  }
398
473
 
474
+ function clearConnectPhaseTimer() {
475
+ if (connectPhaseTimer) {
476
+ clearTimeout(connectPhaseTimer);
477
+ connectPhaseTimer = null;
478
+ }
479
+ }
480
+
481
+ function createTimeoutError() {
482
+ let timeoutErrorMessage = config.timeout
483
+ ? 'timeout of ' + config.timeout + 'ms exceeded'
484
+ : 'timeout exceeded';
485
+ const transitional = config.transitional || transitionalDefaults;
486
+ if (config.timeoutErrorMessage) {
487
+ timeoutErrorMessage = config.timeoutErrorMessage;
488
+ }
489
+ return new AxiosError(
490
+ timeoutErrorMessage,
491
+ transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
492
+ config,
493
+ req
494
+ );
495
+ }
496
+
399
497
  abortEmitter.once('abort', reject);
400
498
 
401
499
  const onFinished = () => {
500
+ clearConnectPhaseTimer();
501
+
402
502
  if (config.cancelToken) {
403
503
  config.cancelToken.unsubscribe(abort);
404
504
  }
@@ -419,6 +519,7 @@ export default isHttpAdapterSupported &&
419
519
 
420
520
  onDone((response, isRejected) => {
421
521
  isDone = true;
522
+ clearConnectPhaseTimer();
422
523
 
423
524
  if (isRejected) {
424
525
  rejected = true;
@@ -533,9 +634,12 @@ export default isHttpAdapterSupported &&
533
634
  }
534
635
  );
535
636
  // support for https://www.npmjs.com/package/form-data api
536
- } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders) &&
537
- data.getHeaders !== Object.prototype.getHeaders) {
538
- headers.set(data.getHeaders());
637
+ } else if (
638
+ utils.isFormData(data) &&
639
+ utils.isFunction(data.getHeaders) &&
640
+ data.getHeaders !== Object.prototype.getHeaders
641
+ ) {
642
+ setFormDataHeaders(headers, data.getHeaders(), own('formDataHeaderPolicy'));
539
643
 
540
644
  if (!headers.hasContentLength()) {
541
645
  try {
@@ -628,8 +732,8 @@ export default isHttpAdapterSupported &&
628
732
  }
629
733
 
630
734
  if (!auth && parsed.username) {
631
- const urlUsername = parsed.username;
632
- const urlPassword = parsed.password;
735
+ const urlUsername = decodeURIComponentSafe(parsed.username);
736
+ const urlPassword = decodeURIComponentSafe(parsed.password);
633
737
  auth = urlUsername + ':' + urlPassword;
634
738
  }
635
739
 
@@ -659,7 +763,6 @@ export default isHttpAdapterSupported &&
659
763
 
660
764
  // Null-prototype to block prototype pollution gadgets on properties read
661
765
  // directly by Node's http.request (e.g. insecureHTTPParser, lookup).
662
- // See GHSA-q8qp-cvcw-x6jj.
663
766
  const options = Object.assign(Object.create(null), {
664
767
  path,
665
768
  method: method,
@@ -678,11 +781,9 @@ export default isHttpAdapterSupported &&
678
781
 
679
782
  if (config.socketPath) {
680
783
  if (typeof config.socketPath !== 'string') {
681
- return reject(new AxiosError(
682
- 'socketPath must be a string',
683
- AxiosError.ERR_BAD_OPTION_VALUE,
684
- config
685
- ));
784
+ return reject(
785
+ new AxiosError('socketPath must be a string', AxiosError.ERR_BAD_OPTION_VALUE, config)
786
+ );
686
787
  }
687
788
 
688
789
  if (config.allowedSocketPaths != null) {
@@ -696,11 +797,13 @@ export default isHttpAdapterSupported &&
696
797
  );
697
798
 
698
799
  if (!isAllowed) {
699
- return reject(new AxiosError(
700
- `socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`,
701
- AxiosError.ERR_BAD_OPTION_VALUE,
702
- config
703
- ));
800
+ return reject(
801
+ new AxiosError(
802
+ `socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`,
803
+ AxiosError.ERR_BAD_OPTION_VALUE,
804
+ config
805
+ )
806
+ );
704
807
  }
705
808
  }
706
809
 
@@ -717,6 +820,7 @@ export default isHttpAdapterSupported &&
717
820
  );
718
821
  }
719
822
  let transport;
823
+ let isNativeTransport = false;
720
824
  const isHttpsRequest = isHttps.test(options.protocol);
721
825
  options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
722
826
 
@@ -728,6 +832,7 @@ export default isHttpAdapterSupported &&
728
832
  transport = configTransport;
729
833
  } else if (config.maxRedirects === 0) {
730
834
  transport = isHttpsRequest ? https : http;
835
+ isNativeTransport = true;
731
836
  } else {
732
837
  if (config.maxRedirects) {
733
838
  options.maxRedirects = config.maxRedirects;
@@ -749,11 +854,13 @@ export default isHttpAdapterSupported &&
749
854
 
750
855
  // Always set an explicit own value so a polluted
751
856
  // Object.prototype.insecureHTTPParser cannot enable the lenient parser
752
- // through Node's internal options copy (GHSA-q8qp-cvcw-x6jj).
857
+ // through Node's internal options copy
753
858
  options.insecureHTTPParser = Boolean(own('insecureHTTPParser'));
754
859
 
755
860
  // Create the request
756
861
  req = transport.request(options, function handleResponse(res) {
862
+ clearConnectPhaseTimer();
863
+
757
864
  if (req.destroyed) return;
758
865
 
759
866
  const streams = [res];
@@ -835,7 +942,7 @@ export default isHttpAdapterSupported &&
835
942
 
836
943
  if (responseType === 'stream') {
837
944
  // Enforce maxContentLength on streamed responses; previously this
838
- // was applied only to buffered responses. See GHSA-vf2m-468p-8v99.
945
+ // was applied only to buffered responses.
839
946
  if (config.maxContentLength > -1) {
840
947
  const limit = config.maxContentLength;
841
948
  const source = responseStream;
@@ -893,15 +1000,16 @@ export default isHttpAdapterSupported &&
893
1000
  'stream has been aborted',
894
1001
  AxiosError.ERR_BAD_RESPONSE,
895
1002
  config,
896
- lastRequest
1003
+ lastRequest,
1004
+ response
897
1005
  );
898
1006
  responseStream.destroy(err);
899
1007
  reject(err);
900
1008
  });
901
1009
 
902
1010
  responseStream.on('error', function handleStreamError(err) {
903
- if (req.destroyed) return;
904
- reject(AxiosError.from(err, null, config, lastRequest));
1011
+ if (rejected) return;
1012
+ reject(AxiosError.from(err, null, config, lastRequest, response));
905
1013
  });
906
1014
 
907
1015
  responseStream.on('end', function handleStreamEnd() {
@@ -944,6 +1052,16 @@ export default isHttpAdapterSupported &&
944
1052
  });
945
1053
 
946
1054
  // set tcp keep alive to prevent drop connection by peer
1055
+ // Track every socket bound to this outer RedirectableRequest so a single
1056
+ // 'close' listener can release ownership on all of them. follow-redirects
1057
+ // re-emits the 'socket' event for each hop's native request onto the same
1058
+ // outer request, so attaching per-request listeners inside this handler
1059
+ // would accumulate across hops and trigger MaxListenersExceededWarning at
1060
+ // >= 11 redirects. Clearing only the last-bound socket would leave stale
1061
+ // kAxiosCurrentReq refs on earlier hop sockets returned to the keep-alive
1062
+ // pool, causing an idle-pool 'error' to be attributed to a closed req.
1063
+ const boundSockets = new Set();
1064
+
947
1065
  req.on('socket', function handleRequestSocket(socket) {
948
1066
  // default interval of sending ack packet is 1 minute
949
1067
  socket.setKeepAlive(true, 1000 * 60);
@@ -964,12 +1082,18 @@ export default isHttpAdapterSupported &&
964
1082
  }
965
1083
 
966
1084
  socket[kAxiosCurrentReq] = req;
1085
+ boundSockets.add(socket);
1086
+ });
967
1087
 
968
- req.once('close', function clearCurrentReq() {
1088
+ req.once('close', function clearCurrentReq() {
1089
+ clearConnectPhaseTimer();
1090
+
1091
+ for (const socket of boundSockets) {
969
1092
  if (socket[kAxiosCurrentReq] === req) {
970
1093
  socket[kAxiosCurrentReq] = null;
971
1094
  }
972
- });
1095
+ }
1096
+ boundSockets.clear();
973
1097
  });
974
1098
 
975
1099
  // Handle request timeout
@@ -990,29 +1114,24 @@ export default isHttpAdapterSupported &&
990
1114
  return;
991
1115
  }
992
1116
 
1117
+ const handleTimeout = function handleTimeout() {
1118
+ if (isDone) return;
1119
+ abort(createTimeoutError());
1120
+ };
1121
+
1122
+ if (isNativeTransport && timeout > 0) {
1123
+ // Native ClientRequest#setTimeout starts from the socket lifecycle and
1124
+ // may not fire while TCP connect is still pending. Mirror the
1125
+ // follow-redirects wall-clock timer for the maxRedirects === 0 path.
1126
+ connectPhaseTimer = setTimeout(handleTimeout, timeout);
1127
+ }
1128
+
993
1129
  // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.
994
1130
  // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET.
995
1131
  // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.
996
1132
  // And then these socket which be hang up will devouring CPU little by little.
997
1133
  // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.
998
- req.setTimeout(timeout, function handleRequestTimeout() {
999
- if (isDone) return;
1000
- let timeoutErrorMessage = config.timeout
1001
- ? 'timeout of ' + config.timeout + 'ms exceeded'
1002
- : 'timeout exceeded';
1003
- const transitional = config.transitional || transitionalDefaults;
1004
- if (config.timeoutErrorMessage) {
1005
- timeoutErrorMessage = config.timeoutErrorMessage;
1006
- }
1007
- abort(
1008
- new AxiosError(
1009
- timeoutErrorMessage,
1010
- transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
1011
- config,
1012
- req
1013
- )
1014
- );
1015
- });
1134
+ req.setTimeout(timeout, handleTimeout);
1016
1135
  } else {
1017
1136
  // explicitly reset the socket timeout value for a possible `keep-alive` request
1018
1137
  req.setTimeout(0);
@@ -1040,7 +1159,7 @@ export default isHttpAdapterSupported &&
1040
1159
 
1041
1160
  // Enforce maxBodyLength for streamed uploads on the native http/https
1042
1161
  // transport (maxRedirects === 0); follow-redirects enforces it on the
1043
- // other path. See GHSA-5c9x-8gcm-mpgx.
1162
+ // other path.
1044
1163
  let uploadStream = data;
1045
1164
  if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
1046
1165
  const limit = config.maxBodyLength;
@@ -91,7 +91,7 @@ export default isXHRAdapterSupported &&
91
91
  // will return status as 0 even though it's a successful request
92
92
  if (
93
93
  request.status === 0 &&
94
- !(request.responseURL && request.responseURL.indexOf('file:') === 0)
94
+ !(request.responseURL && request.responseURL.startsWith('file:'))
95
95
  ) {
96
96
  return;
97
97
  }
@@ -108,6 +108,7 @@ export default isXHRAdapterSupported &&
108
108
  }
109
109
 
110
110
  reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
111
+ done();
111
112
 
112
113
  // Clean up request
113
114
  request = null;
@@ -123,6 +124,7 @@ export default isXHRAdapterSupported &&
123
124
  // attach the underlying event for consumers who want details
124
125
  err.event = event || null;
125
126
  reject(err);
127
+ done();
126
128
  request = null;
127
129
  };
128
130
 
@@ -143,6 +145,7 @@ export default isXHRAdapterSupported &&
143
145
  request
144
146
  )
145
147
  );
148
+ done();
146
149
 
147
150
  // Clean up request
148
151
  request = null;
@@ -192,6 +195,7 @@ export default isXHRAdapterSupported &&
192
195
  }
193
196
  reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
194
197
  request.abort();
198
+ done();
195
199
  request = null;
196
200
  };
197
201
 
@@ -205,7 +209,7 @@ export default isXHRAdapterSupported &&
205
209
 
206
210
  const protocol = parseProtocol(_config.url);
207
211
 
208
- if (protocol && platform.protocols.indexOf(protocol) === -1) {
212
+ if (protocol && !platform.protocols.includes(protocol)) {
209
213
  reject(
210
214
  new AxiosError(
211
215
  'Unsupported protocol ' + protocol + ':',
@@ -148,7 +148,7 @@ class Axios {
148
148
  let contextHeaders = headers && utils.merge(headers.common, headers[config.method]);
149
149
 
150
150
  headers &&
151
- utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], (method) => {
151
+ utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'query', 'common'], (method) => {
152
152
  delete headers[method];
153
153
  });
154
154
 
@@ -251,7 +251,7 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
251
251
  };
252
252
  });
253
253
 
254
- utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
254
+ utils.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) {
255
255
  function generateHTTPMethod(isForm) {
256
256
  return function httpMethod(url, data, config) {
257
257
  return this.request(
@@ -271,7 +271,11 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
271
271
 
272
272
  Axios.prototype[method] = generateHTTPMethod();
273
273
 
274
- Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
274
+ // QUERY is a safe/idempotent read method; multipart form bodies don't fit
275
+ // its semantics, so no queryForm shorthand is generated.
276
+ if (method !== 'query') {
277
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
278
+ }
275
279
  });
276
280
 
277
281
  export default Axios;
@@ -1,6 +1,76 @@
1
1
  'use strict';
2
2
 
3
3
  import utils from '../utils.js';
4
+ import AxiosHeaders from './AxiosHeaders.js';
5
+
6
+ const REDACTED = '[REDACTED ****]';
7
+
8
+ function hasOwnOrPrototypeToJSON(source) {
9
+ if (utils.hasOwnProp(source, 'toJSON')) {
10
+ return true;
11
+ }
12
+
13
+ let prototype = Object.getPrototypeOf(source);
14
+
15
+ while (prototype && prototype !== Object.prototype) {
16
+ if (utils.hasOwnProp(prototype, 'toJSON')) {
17
+ return true;
18
+ }
19
+
20
+ prototype = Object.getPrototypeOf(prototype);
21
+ }
22
+
23
+ return false;
24
+ }
25
+
26
+ // Build a plain-object snapshot of `config` and replace the value of any key
27
+ // (case-insensitive) listed in `redactKeys` with REDACTED. Walks through arrays
28
+ // and AxiosHeaders, and short-circuits on circular references.
29
+ function redactConfig(config, redactKeys) {
30
+ const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
31
+ const seen = [];
32
+
33
+ const visit = (source) => {
34
+ if (source === null || typeof source !== 'object') return source;
35
+ if (utils.isBuffer(source)) return source;
36
+ if (seen.indexOf(source) !== -1) return undefined;
37
+
38
+ if (source instanceof AxiosHeaders) {
39
+ source = source.toJSON();
40
+ }
41
+
42
+ seen.push(source);
43
+
44
+ let result;
45
+ if (utils.isArray(source)) {
46
+ result = [];
47
+ source.forEach((v, i) => {
48
+ const reducedValue = visit(v);
49
+ if (!utils.isUndefined(reducedValue)) {
50
+ result[i] = reducedValue;
51
+ }
52
+ });
53
+ } else {
54
+ if (!utils.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
55
+ seen.pop();
56
+ return source;
57
+ }
58
+
59
+ result = Object.create(null);
60
+ for (const [key, value] of Object.entries(source)) {
61
+ const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
62
+ if (!utils.isUndefined(reducedValue)) {
63
+ result[key] = reducedValue;
64
+ }
65
+ }
66
+ }
67
+
68
+ seen.pop();
69
+ return result;
70
+ };
71
+
72
+ return visit(config);
73
+ }
4
74
 
5
75
  class AxiosError extends Error {
6
76
  static from(error, code, config, request, response, customProps) {
@@ -35,6 +105,9 @@ class AxiosError extends Error {
35
105
  // The native Error constructor sets message as non-enumerable,
36
106
  // but axios < v1.13.3 had it as enumerable
37
107
  Object.defineProperty(this, 'message', {
108
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
109
+ // this data descriptor into an accessor descriptor on the way in.
110
+ __proto__: null,
38
111
  value: message,
39
112
  enumerable: true,
40
113
  writable: true,
@@ -53,6 +126,17 @@ class AxiosError extends Error {
53
126
  }
54
127
 
55
128
  toJSON() {
129
+ // Opt-in redaction: when the request config carries a `redact` array, the
130
+ // value of any matching key (case-insensitive, at any depth) is replaced
131
+ // with REDACTED in the serialized snapshot. Undefined or empty leaves the
132
+ // existing serialization behavior unchanged.
133
+ const config = this.config;
134
+ const redactKeys = config && utils.hasOwnProp(config, 'redact') ? config.redact : undefined;
135
+ const serializedConfig =
136
+ utils.isArray(redactKeys) && redactKeys.length > 0
137
+ ? redactConfig(config, redactKeys)
138
+ : utils.toJSONObject(config);
139
+
56
140
  return {
57
141
  // Standard
58
142
  message: this.message,
@@ -66,7 +150,7 @@ class AxiosError extends Error {
66
150
  columnNumber: this.columnNumber,
67
151
  stack: this.stack,
68
152
  // Axios
69
- config: utils.toJSONObject(this.config),
153
+ config: serializedConfig,
70
154
  code: this.code,
71
155
  status: this.status,
72
156
  };
@@ -78,6 +162,7 @@ AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
78
162
  AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
79
163
  AxiosError.ECONNABORTED = 'ECONNABORTED';
80
164
  AxiosError.ETIMEDOUT = 'ETIMEDOUT';
165
+ AxiosError.ECONNREFUSED = 'ECONNREFUSED';
81
166
  AxiosError.ERR_NETWORK = 'ERR_NETWORK';
82
167
  AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
83
168
  AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
@@ -98,6 +98,9 @@ function buildAccessors(obj, header) {
98
98
 
99
99
  ['get', 'set', 'has'].forEach((methodName) => {
100
100
  Object.defineProperty(obj, methodName + accessorName, {
101
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
102
+ // this data descriptor into an accessor descriptor on the way in.
103
+ __proto__: null,
101
104
  value: function (arg1, arg2, arg3) {
102
105
  return this[methodName].call(this, header, arg1, arg2, arg3);
103
106
  },
@@ -49,8 +49,15 @@ export default function dispatchRequest(config) {
49
49
  function onAdapterResolution(response) {
50
50
  throwIfCancellationRequested(config);
51
51
 
52
- // Transform response data
53
- response.data = transformData.call(config, config.transformResponse, response);
52
+ // Expose the current response on config so that transformResponse can
53
+ // attach it to any AxiosError it throws (e.g. on JSON parse failure).
54
+ // We clean it up afterwards to avoid polluting the config object.
55
+ config.response = response;
56
+ try {
57
+ response.data = transformData.call(config, config.transformResponse, response);
58
+ } finally {
59
+ delete config.response;
60
+ }
54
61
 
55
62
  response.headers = AxiosHeaders.from(response.headers);
56
63
 
@@ -62,11 +69,16 @@ export default function dispatchRequest(config) {
62
69
 
63
70
  // Transform response data
64
71
  if (reason && reason.response) {
65
- reason.response.data = transformData.call(
66
- config,
67
- config.transformResponse,
68
- reason.response
69
- );
72
+ config.response = reason.response;
73
+ try {
74
+ reason.response.data = transformData.call(
75
+ config,
76
+ config.transformResponse,
77
+ reason.response
78
+ );
79
+ } finally {
80
+ delete config.response;
81
+ }
70
82
  reason.response.headers = AxiosHeaders.from(reason.response.headers);
71
83
  }
72
84
  }