@mavogel/awscdk-rootmail 0.0.334 → 0.0.335

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 (393) hide show
  1. package/.jsii +2 -4
  2. package/CLAUDE.md +14 -30
  3. package/cdk.json +0 -1
  4. package/lib/rootmail.js +1 -1
  5. package/lib/ses-receive.js +1 -1
  6. package/package.json +1 -10
  7. package/lib/index-cli-synth.d.ts +0 -1
  8. package/lib/index-cli-synth.js +0 -68
  9. package/lib/scripts/publish-assets.d.ts +0 -1
  10. package/lib/scripts/publish-assets.js +0 -39
  11. package/node_modules/async-retry/LICENSE.md +0 -21
  12. package/node_modules/async-retry/README.md +0 -53
  13. package/node_modules/async-retry/lib/index.js +0 -61
  14. package/node_modules/async-retry/package.json +0 -55
  15. package/node_modules/asynckit/LICENSE +0 -21
  16. package/node_modules/asynckit/README.md +0 -233
  17. package/node_modules/asynckit/bench.js +0 -76
  18. package/node_modules/asynckit/index.js +0 -6
  19. package/node_modules/asynckit/lib/abort.js +0 -29
  20. package/node_modules/asynckit/lib/async.js +0 -34
  21. package/node_modules/asynckit/lib/defer.js +0 -26
  22. package/node_modules/asynckit/lib/iterate.js +0 -75
  23. package/node_modules/asynckit/lib/readable_asynckit.js +0 -91
  24. package/node_modules/asynckit/lib/readable_parallel.js +0 -25
  25. package/node_modules/asynckit/lib/readable_serial.js +0 -25
  26. package/node_modules/asynckit/lib/readable_serial_ordered.js +0 -29
  27. package/node_modules/asynckit/lib/state.js +0 -37
  28. package/node_modules/asynckit/lib/streamify.js +0 -141
  29. package/node_modules/asynckit/lib/terminator.js +0 -29
  30. package/node_modules/asynckit/package.json +0 -63
  31. package/node_modules/asynckit/parallel.js +0 -43
  32. package/node_modules/asynckit/serial.js +0 -17
  33. package/node_modules/asynckit/serialOrdered.js +0 -75
  34. package/node_modules/asynckit/stream.js +0 -21
  35. package/node_modules/axios/CHANGELOG.md +0 -1416
  36. package/node_modules/axios/LICENSE +0 -7
  37. package/node_modules/axios/MIGRATION_GUIDE.md +0 -877
  38. package/node_modules/axios/README.md +0 -2019
  39. package/node_modules/axios/dist/axios.js +0 -4494
  40. package/node_modules/axios/dist/axios.js.map +0 -1
  41. package/node_modules/axios/dist/axios.min.js +0 -5
  42. package/node_modules/axios/dist/axios.min.js.map +0 -1
  43. package/node_modules/axios/dist/browser/axios.cjs +0 -4273
  44. package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
  45. package/node_modules/axios/dist/esm/axios.js +0 -4293
  46. package/node_modules/axios/dist/esm/axios.js.map +0 -1
  47. package/node_modules/axios/dist/esm/axios.min.js +0 -3
  48. package/node_modules/axios/dist/esm/axios.min.js.map +0 -1
  49. package/node_modules/axios/dist/node/axios.cjs +0 -4811
  50. package/node_modules/axios/dist/node/axios.cjs.map +0 -1
  51. package/node_modules/axios/index.d.cts +0 -716
  52. package/node_modules/axios/index.d.ts +0 -810
  53. package/node_modules/axios/index.js +0 -43
  54. package/node_modules/axios/lib/adapters/README.md +0 -36
  55. package/node_modules/axios/lib/adapters/adapters.js +0 -130
  56. package/node_modules/axios/lib/adapters/fetch.js +0 -338
  57. package/node_modules/axios/lib/adapters/http.js +0 -954
  58. package/node_modules/axios/lib/adapters/xhr.js +0 -222
  59. package/node_modules/axios/lib/axios.js +0 -89
  60. package/node_modules/axios/lib/cancel/CancelToken.js +0 -135
  61. package/node_modules/axios/lib/cancel/CanceledError.js +0 -22
  62. package/node_modules/axios/lib/cancel/isCancel.js +0 -5
  63. package/node_modules/axios/lib/core/Axios.js +0 -277
  64. package/node_modules/axios/lib/core/AxiosError.js +0 -90
  65. package/node_modules/axios/lib/core/AxiosHeaders.js +0 -378
  66. package/node_modules/axios/lib/core/InterceptorManager.js +0 -72
  67. package/node_modules/axios/lib/core/README.md +0 -8
  68. package/node_modules/axios/lib/core/buildFullPath.js +0 -22
  69. package/node_modules/axios/lib/core/dispatchRequest.js +0 -77
  70. package/node_modules/axios/lib/core/mergeConfig.js +0 -107
  71. package/node_modules/axios/lib/core/settle.js +0 -31
  72. package/node_modules/axios/lib/core/transformData.js +0 -28
  73. package/node_modules/axios/lib/defaults/index.js +0 -172
  74. package/node_modules/axios/lib/defaults/transitional.js +0 -8
  75. package/node_modules/axios/lib/env/README.md +0 -3
  76. package/node_modules/axios/lib/env/classes/FormData.js +0 -2
  77. package/node_modules/axios/lib/env/data.js +0 -1
  78. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +0 -156
  79. package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -62
  80. package/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -77
  81. package/node_modules/axios/lib/helpers/README.md +0 -7
  82. package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +0 -29
  83. package/node_modules/axios/lib/helpers/bind.js +0 -14
  84. package/node_modules/axios/lib/helpers/buildURL.js +0 -66
  85. package/node_modules/axios/lib/helpers/callbackify.js +0 -18
  86. package/node_modules/axios/lib/helpers/combineURLs.js +0 -15
  87. package/node_modules/axios/lib/helpers/composeSignals.js +0 -56
  88. package/node_modules/axios/lib/helpers/cookies.js +0 -48
  89. package/node_modules/axios/lib/helpers/deprecatedMethod.js +0 -31
  90. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +0 -73
  91. package/node_modules/axios/lib/helpers/formDataToJSON.js +0 -95
  92. package/node_modules/axios/lib/helpers/formDataToStream.js +0 -118
  93. package/node_modules/axios/lib/helpers/fromDataURI.js +0 -53
  94. package/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -19
  95. package/node_modules/axios/lib/helpers/isAxiosError.js +0 -14
  96. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -16
  97. package/node_modules/axios/lib/helpers/null.js +0 -2
  98. package/node_modules/axios/lib/helpers/parseHeaders.js +0 -69
  99. package/node_modules/axios/lib/helpers/parseProtocol.js +0 -6
  100. package/node_modules/axios/lib/helpers/progressEventReducer.js +0 -51
  101. package/node_modules/axios/lib/helpers/readBlob.js +0 -15
  102. package/node_modules/axios/lib/helpers/resolveConfig.js +0 -70
  103. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +0 -106
  104. package/node_modules/axios/lib/helpers/speedometer.js +0 -55
  105. package/node_modules/axios/lib/helpers/spread.js +0 -28
  106. package/node_modules/axios/lib/helpers/throttle.js +0 -44
  107. package/node_modules/axios/lib/helpers/toFormData.js +0 -241
  108. package/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -19
  109. package/node_modules/axios/lib/helpers/trackStream.js +0 -89
  110. package/node_modules/axios/lib/helpers/validator.js +0 -110
  111. package/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
  112. package/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
  113. package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -4
  114. package/node_modules/axios/lib/platform/browser/index.js +0 -13
  115. package/node_modules/axios/lib/platform/common/utils.js +0 -52
  116. package/node_modules/axios/lib/platform/index.js +0 -7
  117. package/node_modules/axios/lib/platform/node/classes/FormData.js +0 -3
  118. package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +0 -4
  119. package/node_modules/axios/lib/platform/node/index.js +0 -37
  120. package/node_modules/axios/lib/utils.js +0 -919
  121. package/node_modules/axios/package.json +0 -190
  122. package/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
  123. package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
  124. package/node_modules/call-bind-apply-helpers/.nycrc +0 -9
  125. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
  126. package/node_modules/call-bind-apply-helpers/LICENSE +0 -21
  127. package/node_modules/call-bind-apply-helpers/README.md +0 -62
  128. package/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
  129. package/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
  130. package/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
  131. package/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
  132. package/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
  133. package/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
  134. package/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
  135. package/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
  136. package/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
  137. package/node_modules/call-bind-apply-helpers/index.js +0 -15
  138. package/node_modules/call-bind-apply-helpers/package.json +0 -85
  139. package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
  140. package/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
  141. package/node_modules/call-bind-apply-helpers/test/index.js +0 -63
  142. package/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
  143. package/node_modules/combined-stream/License +0 -19
  144. package/node_modules/combined-stream/Readme.md +0 -138
  145. package/node_modules/combined-stream/lib/combined_stream.js +0 -208
  146. package/node_modules/combined-stream/package.json +0 -25
  147. package/node_modules/delayed-stream/.npmignore +0 -1
  148. package/node_modules/delayed-stream/License +0 -19
  149. package/node_modules/delayed-stream/Makefile +0 -7
  150. package/node_modules/delayed-stream/Readme.md +0 -141
  151. package/node_modules/delayed-stream/lib/delayed_stream.js +0 -107
  152. package/node_modules/delayed-stream/package.json +0 -27
  153. package/node_modules/dunder-proto/.eslintrc +0 -5
  154. package/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
  155. package/node_modules/dunder-proto/.nycrc +0 -13
  156. package/node_modules/dunder-proto/CHANGELOG.md +0 -24
  157. package/node_modules/dunder-proto/LICENSE +0 -21
  158. package/node_modules/dunder-proto/README.md +0 -54
  159. package/node_modules/dunder-proto/get.d.ts +0 -5
  160. package/node_modules/dunder-proto/get.js +0 -30
  161. package/node_modules/dunder-proto/package.json +0 -76
  162. package/node_modules/dunder-proto/set.d.ts +0 -5
  163. package/node_modules/dunder-proto/set.js +0 -35
  164. package/node_modules/dunder-proto/test/get.js +0 -34
  165. package/node_modules/dunder-proto/test/index.js +0 -4
  166. package/node_modules/dunder-proto/test/set.js +0 -50
  167. package/node_modules/dunder-proto/tsconfig.json +0 -9
  168. package/node_modules/es-define-property/.eslintrc +0 -13
  169. package/node_modules/es-define-property/.github/FUNDING.yml +0 -12
  170. package/node_modules/es-define-property/.nycrc +0 -9
  171. package/node_modules/es-define-property/CHANGELOG.md +0 -29
  172. package/node_modules/es-define-property/LICENSE +0 -21
  173. package/node_modules/es-define-property/README.md +0 -49
  174. package/node_modules/es-define-property/index.d.ts +0 -3
  175. package/node_modules/es-define-property/index.js +0 -14
  176. package/node_modules/es-define-property/package.json +0 -81
  177. package/node_modules/es-define-property/test/index.js +0 -56
  178. package/node_modules/es-define-property/tsconfig.json +0 -10
  179. package/node_modules/es-errors/.eslintrc +0 -5
  180. package/node_modules/es-errors/.github/FUNDING.yml +0 -12
  181. package/node_modules/es-errors/CHANGELOG.md +0 -40
  182. package/node_modules/es-errors/LICENSE +0 -21
  183. package/node_modules/es-errors/README.md +0 -55
  184. package/node_modules/es-errors/eval.d.ts +0 -3
  185. package/node_modules/es-errors/eval.js +0 -4
  186. package/node_modules/es-errors/index.d.ts +0 -3
  187. package/node_modules/es-errors/index.js +0 -4
  188. package/node_modules/es-errors/package.json +0 -80
  189. package/node_modules/es-errors/range.d.ts +0 -3
  190. package/node_modules/es-errors/range.js +0 -4
  191. package/node_modules/es-errors/ref.d.ts +0 -3
  192. package/node_modules/es-errors/ref.js +0 -4
  193. package/node_modules/es-errors/syntax.d.ts +0 -3
  194. package/node_modules/es-errors/syntax.js +0 -4
  195. package/node_modules/es-errors/test/index.js +0 -19
  196. package/node_modules/es-errors/tsconfig.json +0 -49
  197. package/node_modules/es-errors/type.d.ts +0 -3
  198. package/node_modules/es-errors/type.js +0 -4
  199. package/node_modules/es-errors/uri.d.ts +0 -3
  200. package/node_modules/es-errors/uri.js +0 -4
  201. package/node_modules/es-object-atoms/.eslintrc +0 -16
  202. package/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
  203. package/node_modules/es-object-atoms/CHANGELOG.md +0 -37
  204. package/node_modules/es-object-atoms/LICENSE +0 -21
  205. package/node_modules/es-object-atoms/README.md +0 -63
  206. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
  207. package/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
  208. package/node_modules/es-object-atoms/ToObject.d.ts +0 -7
  209. package/node_modules/es-object-atoms/ToObject.js +0 -10
  210. package/node_modules/es-object-atoms/index.d.ts +0 -3
  211. package/node_modules/es-object-atoms/index.js +0 -4
  212. package/node_modules/es-object-atoms/isObject.d.ts +0 -3
  213. package/node_modules/es-object-atoms/isObject.js +0 -6
  214. package/node_modules/es-object-atoms/package.json +0 -80
  215. package/node_modules/es-object-atoms/test/index.js +0 -38
  216. package/node_modules/es-object-atoms/tsconfig.json +0 -6
  217. package/node_modules/es-set-tostringtag/.eslintrc +0 -13
  218. package/node_modules/es-set-tostringtag/.nycrc +0 -9
  219. package/node_modules/es-set-tostringtag/CHANGELOG.md +0 -67
  220. package/node_modules/es-set-tostringtag/LICENSE +0 -21
  221. package/node_modules/es-set-tostringtag/README.md +0 -53
  222. package/node_modules/es-set-tostringtag/index.d.ts +0 -10
  223. package/node_modules/es-set-tostringtag/index.js +0 -35
  224. package/node_modules/es-set-tostringtag/package.json +0 -78
  225. package/node_modules/es-set-tostringtag/test/index.js +0 -85
  226. package/node_modules/es-set-tostringtag/tsconfig.json +0 -9
  227. package/node_modules/follow-redirects/LICENSE +0 -18
  228. package/node_modules/follow-redirects/README.md +0 -155
  229. package/node_modules/follow-redirects/debug.js +0 -15
  230. package/node_modules/follow-redirects/http.js +0 -1
  231. package/node_modules/follow-redirects/https.js +0 -1
  232. package/node_modules/follow-redirects/index.js +0 -686
  233. package/node_modules/follow-redirects/package.json +0 -58
  234. package/node_modules/form-data/CHANGELOG.md +0 -659
  235. package/node_modules/form-data/License +0 -19
  236. package/node_modules/form-data/README.md +0 -355
  237. package/node_modules/form-data/index.d.ts +0 -62
  238. package/node_modules/form-data/lib/browser.js +0 -4
  239. package/node_modules/form-data/lib/form_data.js +0 -494
  240. package/node_modules/form-data/lib/populate.js +0 -10
  241. package/node_modules/form-data/package.json +0 -82
  242. package/node_modules/function-bind/.eslintrc +0 -21
  243. package/node_modules/function-bind/.github/FUNDING.yml +0 -12
  244. package/node_modules/function-bind/.github/SECURITY.md +0 -3
  245. package/node_modules/function-bind/.nycrc +0 -13
  246. package/node_modules/function-bind/CHANGELOG.md +0 -136
  247. package/node_modules/function-bind/LICENSE +0 -20
  248. package/node_modules/function-bind/README.md +0 -46
  249. package/node_modules/function-bind/implementation.js +0 -84
  250. package/node_modules/function-bind/index.js +0 -5
  251. package/node_modules/function-bind/package.json +0 -87
  252. package/node_modules/function-bind/test/.eslintrc +0 -9
  253. package/node_modules/function-bind/test/index.js +0 -252
  254. package/node_modules/get-intrinsic/.eslintrc +0 -42
  255. package/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
  256. package/node_modules/get-intrinsic/.nycrc +0 -9
  257. package/node_modules/get-intrinsic/CHANGELOG.md +0 -186
  258. package/node_modules/get-intrinsic/LICENSE +0 -21
  259. package/node_modules/get-intrinsic/README.md +0 -71
  260. package/node_modules/get-intrinsic/index.js +0 -378
  261. package/node_modules/get-intrinsic/package.json +0 -97
  262. package/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
  263. package/node_modules/get-proto/.eslintrc +0 -10
  264. package/node_modules/get-proto/.github/FUNDING.yml +0 -12
  265. package/node_modules/get-proto/.nycrc +0 -9
  266. package/node_modules/get-proto/CHANGELOG.md +0 -21
  267. package/node_modules/get-proto/LICENSE +0 -21
  268. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
  269. package/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
  270. package/node_modules/get-proto/README.md +0 -50
  271. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
  272. package/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
  273. package/node_modules/get-proto/index.d.ts +0 -5
  274. package/node_modules/get-proto/index.js +0 -27
  275. package/node_modules/get-proto/package.json +0 -81
  276. package/node_modules/get-proto/test/index.js +0 -68
  277. package/node_modules/get-proto/tsconfig.json +0 -9
  278. package/node_modules/gopd/.eslintrc +0 -16
  279. package/node_modules/gopd/.github/FUNDING.yml +0 -12
  280. package/node_modules/gopd/CHANGELOG.md +0 -45
  281. package/node_modules/gopd/LICENSE +0 -21
  282. package/node_modules/gopd/README.md +0 -40
  283. package/node_modules/gopd/gOPD.d.ts +0 -1
  284. package/node_modules/gopd/gOPD.js +0 -4
  285. package/node_modules/gopd/index.d.ts +0 -5
  286. package/node_modules/gopd/index.js +0 -15
  287. package/node_modules/gopd/package.json +0 -77
  288. package/node_modules/gopd/test/index.js +0 -36
  289. package/node_modules/gopd/tsconfig.json +0 -9
  290. package/node_modules/has-symbols/.eslintrc +0 -11
  291. package/node_modules/has-symbols/.github/FUNDING.yml +0 -12
  292. package/node_modules/has-symbols/.nycrc +0 -9
  293. package/node_modules/has-symbols/CHANGELOG.md +0 -91
  294. package/node_modules/has-symbols/LICENSE +0 -21
  295. package/node_modules/has-symbols/README.md +0 -46
  296. package/node_modules/has-symbols/index.d.ts +0 -3
  297. package/node_modules/has-symbols/index.js +0 -14
  298. package/node_modules/has-symbols/package.json +0 -111
  299. package/node_modules/has-symbols/shams.d.ts +0 -3
  300. package/node_modules/has-symbols/shams.js +0 -45
  301. package/node_modules/has-symbols/test/index.js +0 -22
  302. package/node_modules/has-symbols/test/shams/core-js.js +0 -29
  303. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
  304. package/node_modules/has-symbols/test/tests.js +0 -58
  305. package/node_modules/has-symbols/tsconfig.json +0 -10
  306. package/node_modules/has-tostringtag/.eslintrc +0 -5
  307. package/node_modules/has-tostringtag/.github/FUNDING.yml +0 -12
  308. package/node_modules/has-tostringtag/.nycrc +0 -13
  309. package/node_modules/has-tostringtag/CHANGELOG.md +0 -42
  310. package/node_modules/has-tostringtag/LICENSE +0 -21
  311. package/node_modules/has-tostringtag/README.md +0 -46
  312. package/node_modules/has-tostringtag/index.d.ts +0 -3
  313. package/node_modules/has-tostringtag/index.js +0 -8
  314. package/node_modules/has-tostringtag/package.json +0 -108
  315. package/node_modules/has-tostringtag/shams.d.ts +0 -3
  316. package/node_modules/has-tostringtag/shams.js +0 -8
  317. package/node_modules/has-tostringtag/test/index.js +0 -21
  318. package/node_modules/has-tostringtag/test/shams/core-js.js +0 -31
  319. package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +0 -30
  320. package/node_modules/has-tostringtag/test/tests.js +0 -15
  321. package/node_modules/has-tostringtag/tsconfig.json +0 -49
  322. package/node_modules/hasown/.eslintrc +0 -5
  323. package/node_modules/hasown/.github/FUNDING.yml +0 -12
  324. package/node_modules/hasown/.nycrc +0 -13
  325. package/node_modules/hasown/CHANGELOG.md +0 -40
  326. package/node_modules/hasown/LICENSE +0 -21
  327. package/node_modules/hasown/README.md +0 -40
  328. package/node_modules/hasown/index.d.ts +0 -3
  329. package/node_modules/hasown/index.js +0 -8
  330. package/node_modules/hasown/package.json +0 -92
  331. package/node_modules/hasown/tsconfig.json +0 -6
  332. package/node_modules/math-intrinsics/.eslintrc +0 -16
  333. package/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
  334. package/node_modules/math-intrinsics/CHANGELOG.md +0 -24
  335. package/node_modules/math-intrinsics/LICENSE +0 -21
  336. package/node_modules/math-intrinsics/README.md +0 -50
  337. package/node_modules/math-intrinsics/abs.d.ts +0 -1
  338. package/node_modules/math-intrinsics/abs.js +0 -4
  339. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
  340. package/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
  341. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
  342. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
  343. package/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
  344. package/node_modules/math-intrinsics/constants/maxValue.js +0 -5
  345. package/node_modules/math-intrinsics/floor.d.ts +0 -1
  346. package/node_modules/math-intrinsics/floor.js +0 -4
  347. package/node_modules/math-intrinsics/isFinite.d.ts +0 -3
  348. package/node_modules/math-intrinsics/isFinite.js +0 -12
  349. package/node_modules/math-intrinsics/isInteger.d.ts +0 -3
  350. package/node_modules/math-intrinsics/isInteger.js +0 -16
  351. package/node_modules/math-intrinsics/isNaN.d.ts +0 -1
  352. package/node_modules/math-intrinsics/isNaN.js +0 -6
  353. package/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
  354. package/node_modules/math-intrinsics/isNegativeZero.js +0 -6
  355. package/node_modules/math-intrinsics/max.d.ts +0 -1
  356. package/node_modules/math-intrinsics/max.js +0 -4
  357. package/node_modules/math-intrinsics/min.d.ts +0 -1
  358. package/node_modules/math-intrinsics/min.js +0 -4
  359. package/node_modules/math-intrinsics/mod.d.ts +0 -3
  360. package/node_modules/math-intrinsics/mod.js +0 -9
  361. package/node_modules/math-intrinsics/package.json +0 -86
  362. package/node_modules/math-intrinsics/pow.d.ts +0 -1
  363. package/node_modules/math-intrinsics/pow.js +0 -4
  364. package/node_modules/math-intrinsics/round.d.ts +0 -1
  365. package/node_modules/math-intrinsics/round.js +0 -4
  366. package/node_modules/math-intrinsics/sign.d.ts +0 -3
  367. package/node_modules/math-intrinsics/sign.js +0 -11
  368. package/node_modules/math-intrinsics/test/index.js +0 -192
  369. package/node_modules/math-intrinsics/tsconfig.json +0 -3
  370. package/node_modules/mime-db/HISTORY.md +0 -507
  371. package/node_modules/mime-db/LICENSE +0 -23
  372. package/node_modules/mime-db/README.md +0 -100
  373. package/node_modules/mime-db/db.json +0 -8519
  374. package/node_modules/mime-db/index.js +0 -12
  375. package/node_modules/mime-db/package.json +0 -60
  376. package/node_modules/mime-types/HISTORY.md +0 -397
  377. package/node_modules/mime-types/LICENSE +0 -23
  378. package/node_modules/mime-types/README.md +0 -113
  379. package/node_modules/mime-types/index.js +0 -188
  380. package/node_modules/mime-types/package.json +0 -44
  381. package/node_modules/proxy-from-env/LICENSE +0 -20
  382. package/node_modules/proxy-from-env/README.md +0 -163
  383. package/node_modules/proxy-from-env/index.cjs +0 -105
  384. package/node_modules/proxy-from-env/index.js +0 -103
  385. package/node_modules/proxy-from-env/package.json +0 -43
  386. package/node_modules/retry/License +0 -21
  387. package/node_modules/retry/README.md +0 -227
  388. package/node_modules/retry/example/dns.js +0 -31
  389. package/node_modules/retry/example/stop.js +0 -40
  390. package/node_modules/retry/index.js +0 -1
  391. package/node_modules/retry/lib/retry.js +0 -100
  392. package/node_modules/retry/lib/retry_operation.js +0 -162
  393. package/node_modules/retry/package.json +0 -36
@@ -1,954 +0,0 @@
1
- import utils from '../utils.js';
2
- import settle from '../core/settle.js';
3
- import buildFullPath from '../core/buildFullPath.js';
4
- import buildURL from '../helpers/buildURL.js';
5
- import { getProxyForUrl } from 'proxy-from-env';
6
- import http from 'http';
7
- import https from 'https';
8
- import http2 from 'http2';
9
- import util from 'util';
10
- import followRedirects from 'follow-redirects';
11
- import zlib from 'zlib';
12
- import { VERSION } from '../env/data.js';
13
- import transitionalDefaults from '../defaults/transitional.js';
14
- import AxiosError from '../core/AxiosError.js';
15
- import CanceledError from '../cancel/CanceledError.js';
16
- import platform from '../platform/index.js';
17
- import fromDataURI from '../helpers/fromDataURI.js';
18
- import stream from 'stream';
19
- import AxiosHeaders from '../core/AxiosHeaders.js';
20
- import AxiosTransformStream from '../helpers/AxiosTransformStream.js';
21
- import { EventEmitter } from 'events';
22
- import formDataToStream from '../helpers/formDataToStream.js';
23
- import readBlob from '../helpers/readBlob.js';
24
- import ZlibHeaderTransformStream from '../helpers/ZlibHeaderTransformStream.js';
25
- import callbackify from '../helpers/callbackify.js';
26
- import shouldBypassProxy from '../helpers/shouldBypassProxy.js';
27
- import {
28
- progressEventReducer,
29
- progressEventDecorator,
30
- asyncDecorator,
31
- } from '../helpers/progressEventReducer.js';
32
- import estimateDataURLDecodedBytes from '../helpers/estimateDataURLDecodedBytes.js';
33
-
34
- const zlibOptions = {
35
- flush: zlib.constants.Z_SYNC_FLUSH,
36
- finishFlush: zlib.constants.Z_SYNC_FLUSH,
37
- };
38
-
39
- const brotliOptions = {
40
- flush: zlib.constants.BROTLI_OPERATION_FLUSH,
41
- finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH,
42
- };
43
-
44
- const isBrotliSupported = utils.isFunction(zlib.createBrotliDecompress);
45
-
46
- const { http: httpFollow, https: httpsFollow } = followRedirects;
47
-
48
- const isHttps = /https:?/;
49
-
50
- const supportedProtocols = platform.protocols.map((protocol) => {
51
- return protocol + ':';
52
- });
53
-
54
- const flushOnFinish = (stream, [throttled, flush]) => {
55
- stream.on('end', flush).on('error', flush);
56
-
57
- return throttled;
58
- };
59
-
60
- class Http2Sessions {
61
- constructor() {
62
- this.sessions = Object.create(null);
63
- }
64
-
65
- getSession(authority, options) {
66
- options = Object.assign(
67
- {
68
- sessionTimeout: 1000,
69
- },
70
- options
71
- );
72
-
73
- let authoritySessions = this.sessions[authority];
74
-
75
- if (authoritySessions) {
76
- let len = authoritySessions.length;
77
-
78
- for (let i = 0; i < len; i++) {
79
- const [sessionHandle, sessionOptions] = authoritySessions[i];
80
- if (
81
- !sessionHandle.destroyed &&
82
- !sessionHandle.closed &&
83
- util.isDeepStrictEqual(sessionOptions, options)
84
- ) {
85
- return sessionHandle;
86
- }
87
- }
88
- }
89
-
90
- const session = http2.connect(authority, options);
91
-
92
- let removed;
93
-
94
- const removeSession = () => {
95
- if (removed) {
96
- return;
97
- }
98
-
99
- removed = true;
100
-
101
- let entries = authoritySessions,
102
- len = entries.length,
103
- i = len;
104
-
105
- while (i--) {
106
- if (entries[i][0] === session) {
107
- if (len === 1) {
108
- delete this.sessions[authority];
109
- } else {
110
- entries.splice(i, 1);
111
- }
112
- if (!session.closed) {
113
- session.close();
114
- }
115
- return;
116
- }
117
- }
118
- };
119
-
120
- const originalRequestFn = session.request;
121
-
122
- const { sessionTimeout } = options;
123
-
124
- if (sessionTimeout != null) {
125
- let timer;
126
- let streamsCount = 0;
127
-
128
- session.request = function () {
129
- const stream = originalRequestFn.apply(this, arguments);
130
-
131
- streamsCount++;
132
-
133
- if (timer) {
134
- clearTimeout(timer);
135
- timer = null;
136
- }
137
-
138
- stream.once('close', () => {
139
- if (!--streamsCount) {
140
- timer = setTimeout(() => {
141
- timer = null;
142
- removeSession();
143
- }, sessionTimeout);
144
- }
145
- });
146
-
147
- return stream;
148
- };
149
- }
150
-
151
- session.once('close', removeSession);
152
-
153
- let entry = [session, options];
154
-
155
- authoritySessions
156
- ? authoritySessions.push(entry)
157
- : (authoritySessions = this.sessions[authority] = [entry]);
158
-
159
- return session;
160
- }
161
- }
162
-
163
- const http2Sessions = new Http2Sessions();
164
-
165
- /**
166
- * If the proxy or config beforeRedirects functions are defined, call them with the options
167
- * object.
168
- *
169
- * @param {Object<string, any>} options - The options object that was passed to the request.
170
- *
171
- * @returns {Object<string, any>}
172
- */
173
- function dispatchBeforeRedirect(options, responseDetails) {
174
- if (options.beforeRedirects.proxy) {
175
- options.beforeRedirects.proxy(options);
176
- }
177
- if (options.beforeRedirects.config) {
178
- options.beforeRedirects.config(options, responseDetails);
179
- }
180
- }
181
-
182
- /**
183
- * If the proxy or config afterRedirects functions are defined, call them with the options
184
- *
185
- * @param {http.ClientRequestArgs} options
186
- * @param {AxiosProxyConfig} configProxy configuration from Axios options object
187
- * @param {string} location
188
- *
189
- * @returns {http.ClientRequestArgs}
190
- */
191
- function setProxy(options, configProxy, location) {
192
- let proxy = configProxy;
193
- if (!proxy && proxy !== false) {
194
- const proxyUrl = getProxyForUrl(location);
195
- if (proxyUrl) {
196
- if (!shouldBypassProxy(location)) {
197
- proxy = new URL(proxyUrl);
198
- }
199
- }
200
- }
201
- if (proxy) {
202
- // Basic proxy authorization
203
- if (proxy.username) {
204
- proxy.auth = (proxy.username || '') + ':' + (proxy.password || '');
205
- }
206
-
207
- if (proxy.auth) {
208
- // Support proxy auth object form
209
- const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password);
210
-
211
- if (validProxyAuth) {
212
- proxy.auth = (proxy.auth.username || '') + ':' + (proxy.auth.password || '');
213
- } else if (typeof proxy.auth === 'object') {
214
- throw new AxiosError('Invalid proxy authorization', AxiosError.ERR_BAD_OPTION, { proxy });
215
- }
216
-
217
- const base64 = Buffer.from(proxy.auth, 'utf8').toString('base64');
218
-
219
- options.headers['Proxy-Authorization'] = 'Basic ' + base64;
220
- }
221
-
222
- options.headers.host = options.hostname + (options.port ? ':' + options.port : '');
223
- const proxyHost = proxy.hostname || proxy.host;
224
- options.hostname = proxyHost;
225
- // Replace 'host' since options is not a URL object
226
- options.host = proxyHost;
227
- options.port = proxy.port;
228
- options.path = location;
229
- if (proxy.protocol) {
230
- options.protocol = proxy.protocol.includes(':') ? proxy.protocol : `${proxy.protocol}:`;
231
- }
232
- }
233
-
234
- options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
235
- // Configure proxy for redirected request, passing the original config proxy to apply
236
- // the exact same logic as if the redirected request was performed by axios directly.
237
- setProxy(redirectOptions, configProxy, redirectOptions.href);
238
- };
239
- }
240
-
241
- const isHttpAdapterSupported =
242
- typeof process !== 'undefined' && utils.kindOf(process) === 'process';
243
-
244
- // temporary hotfix
245
-
246
- const wrapAsync = (asyncExecutor) => {
247
- return new Promise((resolve, reject) => {
248
- let onDone;
249
- let isDone;
250
-
251
- const done = (value, isRejected) => {
252
- if (isDone) return;
253
- isDone = true;
254
- onDone && onDone(value, isRejected);
255
- };
256
-
257
- const _resolve = (value) => {
258
- done(value);
259
- resolve(value);
260
- };
261
-
262
- const _reject = (reason) => {
263
- done(reason, true);
264
- reject(reason);
265
- };
266
-
267
- asyncExecutor(_resolve, _reject, (onDoneHandler) => (onDone = onDoneHandler)).catch(_reject);
268
- });
269
- };
270
-
271
- const resolveFamily = ({ address, family }) => {
272
- if (!utils.isString(address)) {
273
- throw TypeError('address must be a string');
274
- }
275
- return {
276
- address,
277
- family: family || (address.indexOf('.') < 0 ? 6 : 4),
278
- };
279
- };
280
-
281
- const buildAddressEntry = (address, family) =>
282
- resolveFamily(utils.isObject(address) ? address : { address, family });
283
-
284
- const http2Transport = {
285
- request(options, cb) {
286
- const authority =
287
- options.protocol +
288
- '//' +
289
- options.hostname +
290
- ':' +
291
- (options.port || (options.protocol === 'https:' ? 443 : 80));
292
-
293
- const { http2Options, headers } = options;
294
-
295
- const session = http2Sessions.getSession(authority, http2Options);
296
-
297
- const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } =
298
- http2.constants;
299
-
300
- const http2Headers = {
301
- [HTTP2_HEADER_SCHEME]: options.protocol.replace(':', ''),
302
- [HTTP2_HEADER_METHOD]: options.method,
303
- [HTTP2_HEADER_PATH]: options.path,
304
- };
305
-
306
- utils.forEach(headers, (header, name) => {
307
- name.charAt(0) !== ':' && (http2Headers[name] = header);
308
- });
309
-
310
- const req = session.request(http2Headers);
311
-
312
- req.once('response', (responseHeaders) => {
313
- const response = req; //duplex
314
-
315
- responseHeaders = Object.assign({}, responseHeaders);
316
-
317
- const status = responseHeaders[HTTP2_HEADER_STATUS];
318
-
319
- delete responseHeaders[HTTP2_HEADER_STATUS];
320
-
321
- response.headers = responseHeaders;
322
-
323
- response.statusCode = +status;
324
-
325
- cb(response);
326
- });
327
-
328
- return req;
329
- },
330
- };
331
-
332
- /*eslint consistent-return:0*/
333
- export default isHttpAdapterSupported &&
334
- function httpAdapter(config) {
335
- return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
336
- let { data, lookup, family, httpVersion = 1, http2Options } = config;
337
- const { responseType, responseEncoding } = config;
338
- const method = config.method.toUpperCase();
339
- let isDone;
340
- let rejected = false;
341
- let req;
342
-
343
- httpVersion = +httpVersion;
344
-
345
- if (Number.isNaN(httpVersion)) {
346
- throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
347
- }
348
-
349
- if (httpVersion !== 1 && httpVersion !== 2) {
350
- throw TypeError(`Unsupported protocol version '${httpVersion}'`);
351
- }
352
-
353
- const isHttp2 = httpVersion === 2;
354
-
355
- if (lookup) {
356
- const _lookup = callbackify(lookup, (value) => (utils.isArray(value) ? value : [value]));
357
- // hotfix to support opt.all option which is required for node 20.x
358
- lookup = (hostname, opt, cb) => {
359
- _lookup(hostname, opt, (err, arg0, arg1) => {
360
- if (err) {
361
- return cb(err);
362
- }
363
-
364
- const addresses = utils.isArray(arg0)
365
- ? arg0.map((addr) => buildAddressEntry(addr))
366
- : [buildAddressEntry(arg0, arg1)];
367
-
368
- opt.all ? cb(err, addresses) : cb(err, addresses[0].address, addresses[0].family);
369
- });
370
- };
371
- }
372
-
373
- const abortEmitter = new EventEmitter();
374
-
375
- function abort(reason) {
376
- try {
377
- abortEmitter.emit(
378
- 'abort',
379
- !reason || reason.type ? new CanceledError(null, config, req) : reason
380
- );
381
- } catch (err) {
382
- console.warn('emit error', err);
383
- }
384
- }
385
-
386
- abortEmitter.once('abort', reject);
387
-
388
- const onFinished = () => {
389
- if (config.cancelToken) {
390
- config.cancelToken.unsubscribe(abort);
391
- }
392
-
393
- if (config.signal) {
394
- config.signal.removeEventListener('abort', abort);
395
- }
396
-
397
- abortEmitter.removeAllListeners();
398
- };
399
-
400
- if (config.cancelToken || config.signal) {
401
- config.cancelToken && config.cancelToken.subscribe(abort);
402
- if (config.signal) {
403
- config.signal.aborted ? abort() : config.signal.addEventListener('abort', abort);
404
- }
405
- }
406
-
407
- onDone((response, isRejected) => {
408
- isDone = true;
409
-
410
- if (isRejected) {
411
- rejected = true;
412
- onFinished();
413
- return;
414
- }
415
-
416
- const { data } = response;
417
-
418
- if (data instanceof stream.Readable || data instanceof stream.Duplex) {
419
- const offListeners = stream.finished(data, () => {
420
- offListeners();
421
- onFinished();
422
- });
423
- } else {
424
- onFinished();
425
- }
426
- });
427
-
428
- // Parse url
429
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
430
- const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);
431
- const protocol = parsed.protocol || supportedProtocols[0];
432
-
433
- if (protocol === 'data:') {
434
- // Apply the same semantics as HTTP: only enforce if a finite, non-negative cap is set.
435
- if (config.maxContentLength > -1) {
436
- // Use the exact string passed to fromDataURI (config.url); fall back to fullPath if needed.
437
- const dataUrl = String(config.url || fullPath || '');
438
- const estimated = estimateDataURLDecodedBytes(dataUrl);
439
-
440
- if (estimated > config.maxContentLength) {
441
- return reject(
442
- new AxiosError(
443
- 'maxContentLength size of ' + config.maxContentLength + ' exceeded',
444
- AxiosError.ERR_BAD_RESPONSE,
445
- config
446
- )
447
- );
448
- }
449
- }
450
-
451
- let convertedData;
452
-
453
- if (method !== 'GET') {
454
- return settle(resolve, reject, {
455
- status: 405,
456
- statusText: 'method not allowed',
457
- headers: {},
458
- config,
459
- });
460
- }
461
-
462
- try {
463
- convertedData = fromDataURI(config.url, responseType === 'blob', {
464
- Blob: config.env && config.env.Blob,
465
- });
466
- } catch (err) {
467
- throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);
468
- }
469
-
470
- if (responseType === 'text') {
471
- convertedData = convertedData.toString(responseEncoding);
472
-
473
- if (!responseEncoding || responseEncoding === 'utf8') {
474
- convertedData = utils.stripBOM(convertedData);
475
- }
476
- } else if (responseType === 'stream') {
477
- convertedData = stream.Readable.from(convertedData);
478
- }
479
-
480
- return settle(resolve, reject, {
481
- data: convertedData,
482
- status: 200,
483
- statusText: 'OK',
484
- headers: new AxiosHeaders(),
485
- config,
486
- });
487
- }
488
-
489
- if (supportedProtocols.indexOf(protocol) === -1) {
490
- return reject(
491
- new AxiosError('Unsupported protocol ' + protocol, AxiosError.ERR_BAD_REQUEST, config)
492
- );
493
- }
494
-
495
- const headers = AxiosHeaders.from(config.headers).normalize();
496
-
497
- // Set User-Agent (required by some servers)
498
- // See https://github.com/axios/axios/issues/69
499
- // User-Agent is specified; handle case where no UA header is desired
500
- // Only set header if it hasn't been set in config
501
- headers.set('User-Agent', 'axios/' + VERSION, false);
502
-
503
- const { onUploadProgress, onDownloadProgress } = config;
504
- const maxRate = config.maxRate;
505
- let maxUploadRate = undefined;
506
- let maxDownloadRate = undefined;
507
-
508
- // support for spec compliant FormData objects
509
- if (utils.isSpecCompliantForm(data)) {
510
- const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
511
-
512
- data = formDataToStream(
513
- data,
514
- (formHeaders) => {
515
- headers.set(formHeaders);
516
- },
517
- {
518
- tag: `axios-${VERSION}-boundary`,
519
- boundary: (userBoundary && userBoundary[1]) || undefined,
520
- }
521
- );
522
- // support for https://www.npmjs.com/package/form-data api
523
- } else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {
524
- headers.set(data.getHeaders());
525
-
526
- if (!headers.hasContentLength()) {
527
- try {
528
- const knownLength = await util.promisify(data.getLength).call(data);
529
- Number.isFinite(knownLength) &&
530
- knownLength >= 0 &&
531
- headers.setContentLength(knownLength);
532
- /*eslint no-empty:0*/
533
- } catch (e) {}
534
- }
535
- } else if (utils.isBlob(data) || utils.isFile(data)) {
536
- data.size && headers.setContentType(data.type || 'application/octet-stream');
537
- headers.setContentLength(data.size || 0);
538
- data = stream.Readable.from(readBlob(data));
539
- } else if (data && !utils.isStream(data)) {
540
- if (Buffer.isBuffer(data)) {
541
- // Nothing to do...
542
- } else if (utils.isArrayBuffer(data)) {
543
- data = Buffer.from(new Uint8Array(data));
544
- } else if (utils.isString(data)) {
545
- data = Buffer.from(data, 'utf-8');
546
- } else {
547
- return reject(
548
- new AxiosError(
549
- 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',
550
- AxiosError.ERR_BAD_REQUEST,
551
- config
552
- )
553
- );
554
- }
555
-
556
- // Add Content-Length header if data exists
557
- headers.setContentLength(data.length, false);
558
-
559
- if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
560
- return reject(
561
- new AxiosError(
562
- 'Request body larger than maxBodyLength limit',
563
- AxiosError.ERR_BAD_REQUEST,
564
- config
565
- )
566
- );
567
- }
568
- }
569
-
570
- const contentLength = utils.toFiniteNumber(headers.getContentLength());
571
-
572
- if (utils.isArray(maxRate)) {
573
- maxUploadRate = maxRate[0];
574
- maxDownloadRate = maxRate[1];
575
- } else {
576
- maxUploadRate = maxDownloadRate = maxRate;
577
- }
578
-
579
- if (data && (onUploadProgress || maxUploadRate)) {
580
- if (!utils.isStream(data)) {
581
- data = stream.Readable.from(data, { objectMode: false });
582
- }
583
-
584
- data = stream.pipeline(
585
- [
586
- data,
587
- new AxiosTransformStream({
588
- maxRate: utils.toFiniteNumber(maxUploadRate),
589
- }),
590
- ],
591
- utils.noop
592
- );
593
-
594
- onUploadProgress &&
595
- data.on(
596
- 'progress',
597
- flushOnFinish(
598
- data,
599
- progressEventDecorator(
600
- contentLength,
601
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
602
- )
603
- )
604
- );
605
- }
606
-
607
- // HTTP basic authentication
608
- let auth = undefined;
609
- if (config.auth) {
610
- const username = config.auth.username || '';
611
- const password = config.auth.password || '';
612
- auth = username + ':' + password;
613
- }
614
-
615
- if (!auth && parsed.username) {
616
- const urlUsername = parsed.username;
617
- const urlPassword = parsed.password;
618
- auth = urlUsername + ':' + urlPassword;
619
- }
620
-
621
- auth && headers.delete('authorization');
622
-
623
- let path;
624
-
625
- try {
626
- path = buildURL(
627
- parsed.pathname + parsed.search,
628
- config.params,
629
- config.paramsSerializer
630
- ).replace(/^\?/, '');
631
- } catch (err) {
632
- const customErr = new Error(err.message);
633
- customErr.config = config;
634
- customErr.url = config.url;
635
- customErr.exists = true;
636
- return reject(customErr);
637
- }
638
-
639
- headers.set(
640
- 'Accept-Encoding',
641
- 'gzip, compress, deflate' + (isBrotliSupported ? ', br' : ''),
642
- false
643
- );
644
-
645
- const options = {
646
- path,
647
- method: method,
648
- headers: headers.toJSON(),
649
- agents: { http: config.httpAgent, https: config.httpsAgent },
650
- auth,
651
- protocol,
652
- family,
653
- beforeRedirect: dispatchBeforeRedirect,
654
- beforeRedirects: {},
655
- http2Options,
656
- };
657
-
658
- // cacheable-lookup integration hotfix
659
- !utils.isUndefined(lookup) && (options.lookup = lookup);
660
-
661
- if (config.socketPath) {
662
- options.socketPath = config.socketPath;
663
- } else {
664
- options.hostname = parsed.hostname.startsWith('[')
665
- ? parsed.hostname.slice(1, -1)
666
- : parsed.hostname;
667
- options.port = parsed.port;
668
- setProxy(
669
- options,
670
- config.proxy,
671
- protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path
672
- );
673
- }
674
- let transport;
675
- const isHttpsRequest = isHttps.test(options.protocol);
676
- options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
677
-
678
- if (isHttp2) {
679
- transport = http2Transport;
680
- } else {
681
- if (config.transport) {
682
- transport = config.transport;
683
- } else if (config.maxRedirects === 0) {
684
- transport = isHttpsRequest ? https : http;
685
- } else {
686
- if (config.maxRedirects) {
687
- options.maxRedirects = config.maxRedirects;
688
- }
689
- if (config.beforeRedirect) {
690
- options.beforeRedirects.config = config.beforeRedirect;
691
- }
692
- transport = isHttpsRequest ? httpsFollow : httpFollow;
693
- }
694
- }
695
-
696
- if (config.maxBodyLength > -1) {
697
- options.maxBodyLength = config.maxBodyLength;
698
- } else {
699
- // follow-redirects does not skip comparison, so it should always succeed for axios -1 unlimited
700
- options.maxBodyLength = Infinity;
701
- }
702
-
703
- if (config.insecureHTTPParser) {
704
- options.insecureHTTPParser = config.insecureHTTPParser;
705
- }
706
-
707
- // Create the request
708
- req = transport.request(options, function handleResponse(res) {
709
- if (req.destroyed) return;
710
-
711
- const streams = [res];
712
-
713
- const responseLength = utils.toFiniteNumber(res.headers['content-length']);
714
-
715
- if (onDownloadProgress || maxDownloadRate) {
716
- const transformStream = new AxiosTransformStream({
717
- maxRate: utils.toFiniteNumber(maxDownloadRate),
718
- });
719
-
720
- onDownloadProgress &&
721
- transformStream.on(
722
- 'progress',
723
- flushOnFinish(
724
- transformStream,
725
- progressEventDecorator(
726
- responseLength,
727
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
728
- )
729
- )
730
- );
731
-
732
- streams.push(transformStream);
733
- }
734
-
735
- // decompress the response body transparently if required
736
- let responseStream = res;
737
-
738
- // return the last request in case of redirects
739
- const lastRequest = res.req || req;
740
-
741
- // if decompress disabled we should not decompress
742
- if (config.decompress !== false && res.headers['content-encoding']) {
743
- // if no content, but headers still say that it is encoded,
744
- // remove the header not confuse downstream operations
745
- if (method === 'HEAD' || res.statusCode === 204) {
746
- delete res.headers['content-encoding'];
747
- }
748
-
749
- switch ((res.headers['content-encoding'] || '').toLowerCase()) {
750
- /*eslint default-case:0*/
751
- case 'gzip':
752
- case 'x-gzip':
753
- case 'compress':
754
- case 'x-compress':
755
- // add the unzipper to the body stream processing pipeline
756
- streams.push(zlib.createUnzip(zlibOptions));
757
-
758
- // remove the content-encoding in order to not confuse downstream operations
759
- delete res.headers['content-encoding'];
760
- break;
761
- case 'deflate':
762
- streams.push(new ZlibHeaderTransformStream());
763
-
764
- // add the unzipper to the body stream processing pipeline
765
- streams.push(zlib.createUnzip(zlibOptions));
766
-
767
- // remove the content-encoding in order to not confuse downstream operations
768
- delete res.headers['content-encoding'];
769
- break;
770
- case 'br':
771
- if (isBrotliSupported) {
772
- streams.push(zlib.createBrotliDecompress(brotliOptions));
773
- delete res.headers['content-encoding'];
774
- }
775
- }
776
- }
777
-
778
- responseStream = streams.length > 1 ? stream.pipeline(streams, utils.noop) : streams[0];
779
-
780
- const response = {
781
- status: res.statusCode,
782
- statusText: res.statusMessage,
783
- headers: new AxiosHeaders(res.headers),
784
- config,
785
- request: lastRequest,
786
- };
787
-
788
- if (responseType === 'stream') {
789
- response.data = responseStream;
790
- settle(resolve, reject, response);
791
- } else {
792
- const responseBuffer = [];
793
- let totalResponseBytes = 0;
794
-
795
- responseStream.on('data', function handleStreamData(chunk) {
796
- responseBuffer.push(chunk);
797
- totalResponseBytes += chunk.length;
798
-
799
- // make sure the content length is not over the maxContentLength if specified
800
- if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
801
- // stream.destroy() emit aborted event before calling reject() on Node.js v16
802
- rejected = true;
803
- responseStream.destroy();
804
- abort(
805
- new AxiosError(
806
- 'maxContentLength size of ' + config.maxContentLength + ' exceeded',
807
- AxiosError.ERR_BAD_RESPONSE,
808
- config,
809
- lastRequest
810
- )
811
- );
812
- }
813
- });
814
-
815
- responseStream.on('aborted', function handlerStreamAborted() {
816
- if (rejected) {
817
- return;
818
- }
819
-
820
- const err = new AxiosError(
821
- 'stream has been aborted',
822
- AxiosError.ERR_BAD_RESPONSE,
823
- config,
824
- lastRequest
825
- );
826
- responseStream.destroy(err);
827
- reject(err);
828
- });
829
-
830
- responseStream.on('error', function handleStreamError(err) {
831
- if (req.destroyed) return;
832
- reject(AxiosError.from(err, null, config, lastRequest));
833
- });
834
-
835
- responseStream.on('end', function handleStreamEnd() {
836
- try {
837
- let responseData =
838
- responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
839
- if (responseType !== 'arraybuffer') {
840
- responseData = responseData.toString(responseEncoding);
841
- if (!responseEncoding || responseEncoding === 'utf8') {
842
- responseData = utils.stripBOM(responseData);
843
- }
844
- }
845
- response.data = responseData;
846
- } catch (err) {
847
- return reject(AxiosError.from(err, null, config, response.request, response));
848
- }
849
- settle(resolve, reject, response);
850
- });
851
- }
852
-
853
- abortEmitter.once('abort', (err) => {
854
- if (!responseStream.destroyed) {
855
- responseStream.emit('error', err);
856
- responseStream.destroy();
857
- }
858
- });
859
- });
860
-
861
- abortEmitter.once('abort', (err) => {
862
- if (req.close) {
863
- req.close();
864
- } else {
865
- req.destroy(err);
866
- }
867
- });
868
-
869
- // Handle errors
870
- req.on('error', function handleRequestError(err) {
871
- reject(AxiosError.from(err, null, config, req));
872
- });
873
-
874
- // set tcp keep alive to prevent drop connection by peer
875
- req.on('socket', function handleRequestSocket(socket) {
876
- // default interval of sending ack packet is 1 minute
877
- socket.setKeepAlive(true, 1000 * 60);
878
- });
879
-
880
- // Handle request timeout
881
- if (config.timeout) {
882
- // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
883
- const timeout = parseInt(config.timeout, 10);
884
-
885
- if (Number.isNaN(timeout)) {
886
- abort(
887
- new AxiosError(
888
- 'error trying to parse `config.timeout` to int',
889
- AxiosError.ERR_BAD_OPTION_VALUE,
890
- config,
891
- req
892
- )
893
- );
894
-
895
- return;
896
- }
897
-
898
- // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.
899
- // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET.
900
- // 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.
901
- // And then these socket which be hang up will devouring CPU little by little.
902
- // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.
903
- req.setTimeout(timeout, function handleRequestTimeout() {
904
- if (isDone) return;
905
- let timeoutErrorMessage = config.timeout
906
- ? 'timeout of ' + config.timeout + 'ms exceeded'
907
- : 'timeout exceeded';
908
- const transitional = config.transitional || transitionalDefaults;
909
- if (config.timeoutErrorMessage) {
910
- timeoutErrorMessage = config.timeoutErrorMessage;
911
- }
912
- abort(
913
- new AxiosError(
914
- timeoutErrorMessage,
915
- transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
916
- config,
917
- req
918
- )
919
- );
920
- });
921
- } else {
922
- // explicitly reset the socket timeout value for a possible `keep-alive` request
923
- req.setTimeout(0);
924
- }
925
-
926
- // Send the request
927
- if (utils.isStream(data)) {
928
- let ended = false;
929
- let errored = false;
930
-
931
- data.on('end', () => {
932
- ended = true;
933
- });
934
-
935
- data.once('error', (err) => {
936
- errored = true;
937
- req.destroy(err);
938
- });
939
-
940
- data.on('close', () => {
941
- if (!ended && !errored) {
942
- abort(new CanceledError('Request stream has been aborted', config, req));
943
- }
944
- });
945
-
946
- data.pipe(req);
947
- } else {
948
- data && req.write(data);
949
- req.end();
950
- }
951
- });
952
- };
953
-
954
- export const __setProxy = setProxy;