@veecode-platform/backstage-plugin-about-backend-dynamic 1.0.1

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 (1388) hide show
  1. package/README.md +5 -0
  2. package/dist/.config-schema.json +1 -0
  3. package/dist/api/AboutApi.cjs.js +47 -0
  4. package/dist/api/AboutApi.cjs.js.map +1 -0
  5. package/dist/configSchema.json +1 -0
  6. package/dist/index.cjs.js +14 -0
  7. package/dist/index.cjs.js.map +1 -0
  8. package/dist/index.d.ts +38 -0
  9. package/dist/plugin.cjs.js +23 -0
  10. package/dist/plugin.cjs.js.map +1 -0
  11. package/dist/service/router.cjs.js +24 -0
  12. package/dist/service/router.cjs.js.map +1 -0
  13. package/node_modules/@colors/colors/LICENSE +26 -0
  14. package/node_modules/@colors/colors/README.md +219 -0
  15. package/node_modules/@colors/colors/examples/normal-usage.js +83 -0
  16. package/node_modules/@colors/colors/examples/safe-string.js +80 -0
  17. package/node_modules/@colors/colors/index.d.ts +184 -0
  18. package/node_modules/@colors/colors/lib/colors.js +211 -0
  19. package/node_modules/@colors/colors/lib/custom/trap.js +46 -0
  20. package/node_modules/@colors/colors/lib/custom/zalgo.js +110 -0
  21. package/node_modules/@colors/colors/lib/extendStringPrototype.js +110 -0
  22. package/node_modules/@colors/colors/lib/index.js +13 -0
  23. package/node_modules/@colors/colors/lib/maps/america.js +10 -0
  24. package/node_modules/@colors/colors/lib/maps/rainbow.js +12 -0
  25. package/node_modules/@colors/colors/lib/maps/random.js +11 -0
  26. package/node_modules/@colors/colors/lib/maps/zebra.js +5 -0
  27. package/node_modules/@colors/colors/lib/styles.js +95 -0
  28. package/node_modules/@colors/colors/lib/system/has-flag.js +35 -0
  29. package/node_modules/@colors/colors/lib/system/supports-colors.js +151 -0
  30. package/node_modules/@colors/colors/package.json +45 -0
  31. package/node_modules/@colors/colors/safe.d.ts +64 -0
  32. package/node_modules/@colors/colors/safe.js +10 -0
  33. package/node_modules/@colors/colors/themes/generic-logging.js +12 -0
  34. package/node_modules/@dabh/diagnostics/CHANGELOG.md +26 -0
  35. package/node_modules/@dabh/diagnostics/LICENSE +20 -0
  36. package/node_modules/@dabh/diagnostics/README.md +473 -0
  37. package/node_modules/@dabh/diagnostics/adapters/hash.js +11 -0
  38. package/node_modules/@dabh/diagnostics/adapters/index.js +18 -0
  39. package/node_modules/@dabh/diagnostics/adapters/localstorage.js +11 -0
  40. package/node_modules/@dabh/diagnostics/adapters/process.env.js +11 -0
  41. package/node_modules/@dabh/diagnostics/browser/development.js +35 -0
  42. package/node_modules/@dabh/diagnostics/browser/index.js +8 -0
  43. package/node_modules/@dabh/diagnostics/browser/override.js +6 -0
  44. package/node_modules/@dabh/diagnostics/browser/production.js +24 -0
  45. package/node_modules/@dabh/diagnostics/diagnostics.js +212 -0
  46. package/node_modules/@dabh/diagnostics/logger/console.js +19 -0
  47. package/node_modules/@dabh/diagnostics/modifiers/namespace-ansi.js +20 -0
  48. package/node_modules/@dabh/diagnostics/modifiers/namespace.js +32 -0
  49. package/node_modules/@dabh/diagnostics/node/development.js +36 -0
  50. package/node_modules/@dabh/diagnostics/node/index.js +8 -0
  51. package/node_modules/@dabh/diagnostics/node/override.js +21 -0
  52. package/node_modules/@dabh/diagnostics/node/production.js +24 -0
  53. package/node_modules/@dabh/diagnostics/package.json +64 -0
  54. package/node_modules/@so-ric/colorspace/CHANGELOG.md +9 -0
  55. package/node_modules/@so-ric/colorspace/LICENSE.md +20 -0
  56. package/node_modules/@so-ric/colorspace/README.md +46 -0
  57. package/node_modules/@so-ric/colorspace/dist/index.cjs.js +2071 -0
  58. package/node_modules/@so-ric/colorspace/index.js +29 -0
  59. package/node_modules/@so-ric/colorspace/package.json +45 -0
  60. package/node_modules/@so-ric/colorspace/rollup.config.js +25 -0
  61. package/node_modules/@types/body-parser/LICENSE +21 -0
  62. package/node_modules/@types/body-parser/README.md +15 -0
  63. package/node_modules/@types/body-parser/index.d.ts +95 -0
  64. package/node_modules/@types/body-parser/package.json +64 -0
  65. package/node_modules/@types/connect/LICENSE +21 -0
  66. package/node_modules/@types/connect/README.md +15 -0
  67. package/node_modules/@types/connect/index.d.ts +91 -0
  68. package/node_modules/@types/connect/package.json +32 -0
  69. package/node_modules/@types/express/LICENSE +21 -0
  70. package/node_modules/@types/express/README.md +15 -0
  71. package/node_modules/@types/express/index.d.ts +128 -0
  72. package/node_modules/@types/express/package.json +46 -0
  73. package/node_modules/@types/express-serve-static-core/LICENSE +21 -0
  74. package/node_modules/@types/express-serve-static-core/README.md +15 -0
  75. package/node_modules/@types/express-serve-static-core/index.d.ts +1281 -0
  76. package/node_modules/@types/express-serve-static-core/package.json +51 -0
  77. package/node_modules/@types/http-errors/LICENSE +21 -0
  78. package/node_modules/@types/http-errors/README.md +15 -0
  79. package/node_modules/@types/http-errors/index.d.ts +77 -0
  80. package/node_modules/@types/http-errors/package.json +36 -0
  81. package/node_modules/@types/node/LICENSE +21 -0
  82. package/node_modules/@types/node/README.md +15 -0
  83. package/node_modules/@types/node/assert/strict.d.ts +105 -0
  84. package/node_modules/@types/node/assert.d.ts +955 -0
  85. package/node_modules/@types/node/async_hooks.d.ts +623 -0
  86. package/node_modules/@types/node/buffer.buffer.d.ts +466 -0
  87. package/node_modules/@types/node/buffer.d.ts +1810 -0
  88. package/node_modules/@types/node/child_process.d.ts +1428 -0
  89. package/node_modules/@types/node/cluster.d.ts +486 -0
  90. package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
  91. package/node_modules/@types/node/console.d.ts +151 -0
  92. package/node_modules/@types/node/constants.d.ts +20 -0
  93. package/node_modules/@types/node/crypto.d.ts +4065 -0
  94. package/node_modules/@types/node/dgram.d.ts +564 -0
  95. package/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
  96. package/node_modules/@types/node/dns/promises.d.ts +503 -0
  97. package/node_modules/@types/node/dns.d.ts +922 -0
  98. package/node_modules/@types/node/domain.d.ts +166 -0
  99. package/node_modules/@types/node/events.d.ts +1054 -0
  100. package/node_modules/@types/node/fs/promises.d.ts +1329 -0
  101. package/node_modules/@types/node/fs.d.ts +4676 -0
  102. package/node_modules/@types/node/globals.d.ts +150 -0
  103. package/node_modules/@types/node/globals.typedarray.d.ts +101 -0
  104. package/node_modules/@types/node/http.d.ts +2167 -0
  105. package/node_modules/@types/node/http2.d.ts +2480 -0
  106. package/node_modules/@types/node/https.d.ts +405 -0
  107. package/node_modules/@types/node/index.d.ts +115 -0
  108. package/node_modules/@types/node/inspector/promises.d.ts +41 -0
  109. package/node_modules/@types/node/inspector.d.ts +224 -0
  110. package/node_modules/@types/node/inspector.generated.d.ts +4226 -0
  111. package/node_modules/@types/node/module.d.ts +819 -0
  112. package/node_modules/@types/node/net.d.ts +933 -0
  113. package/node_modules/@types/node/os.d.ts +507 -0
  114. package/node_modules/@types/node/package.json +155 -0
  115. package/node_modules/@types/node/path/posix.d.ts +8 -0
  116. package/node_modules/@types/node/path/win32.d.ts +8 -0
  117. package/node_modules/@types/node/path.d.ts +187 -0
  118. package/node_modules/@types/node/perf_hooks.d.ts +643 -0
  119. package/node_modules/@types/node/process.d.ts +2161 -0
  120. package/node_modules/@types/node/punycode.d.ts +117 -0
  121. package/node_modules/@types/node/querystring.d.ts +152 -0
  122. package/node_modules/@types/node/quic.d.ts +910 -0
  123. package/node_modules/@types/node/readline/promises.d.ts +161 -0
  124. package/node_modules/@types/node/readline.d.ts +541 -0
  125. package/node_modules/@types/node/repl.d.ts +415 -0
  126. package/node_modules/@types/node/sea.d.ts +162 -0
  127. package/node_modules/@types/node/sqlite.d.ts +955 -0
  128. package/node_modules/@types/node/stream/consumers.d.ts +38 -0
  129. package/node_modules/@types/node/stream/promises.d.ts +211 -0
  130. package/node_modules/@types/node/stream/web.d.ts +296 -0
  131. package/node_modules/@types/node/stream.d.ts +1760 -0
  132. package/node_modules/@types/node/string_decoder.d.ts +67 -0
  133. package/node_modules/@types/node/test/reporters.d.ts +96 -0
  134. package/node_modules/@types/node/test.d.ts +2240 -0
  135. package/node_modules/@types/node/timers/promises.d.ts +108 -0
  136. package/node_modules/@types/node/timers.d.ts +159 -0
  137. package/node_modules/@types/node/tls.d.ts +1198 -0
  138. package/node_modules/@types/node/trace_events.d.ts +197 -0
  139. package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
  140. package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
  141. package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
  142. package/node_modules/@types/node/ts5.6/index.d.ts +117 -0
  143. package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
  144. package/node_modules/@types/node/ts5.7/index.d.ts +117 -0
  145. package/node_modules/@types/node/tty.d.ts +250 -0
  146. package/node_modules/@types/node/url.d.ts +519 -0
  147. package/node_modules/@types/node/util/types.d.ts +558 -0
  148. package/node_modules/@types/node/util.d.ts +1662 -0
  149. package/node_modules/@types/node/v8.d.ts +983 -0
  150. package/node_modules/@types/node/vm.d.ts +1208 -0
  151. package/node_modules/@types/node/wasi.d.ts +202 -0
  152. package/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
  153. package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
  154. package/node_modules/@types/node/web-globals/console.d.ts +9 -0
  155. package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
  156. package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  157. package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
  158. package/node_modules/@types/node/web-globals/events.d.ts +106 -0
  159. package/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
  160. package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
  161. package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
  162. package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
  163. package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
  164. package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  165. package/node_modules/@types/node/web-globals/streams.d.ts +115 -0
  166. package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
  167. package/node_modules/@types/node/web-globals/url.d.ts +24 -0
  168. package/node_modules/@types/node/worker_threads.d.ts +717 -0
  169. package/node_modules/@types/node/zlib.d.ts +618 -0
  170. package/node_modules/@types/qs/LICENSE +21 -0
  171. package/node_modules/@types/qs/README.md +15 -0
  172. package/node_modules/@types/qs/index.d.ts +82 -0
  173. package/node_modules/@types/qs/package.json +66 -0
  174. package/node_modules/@types/range-parser/LICENSE +21 -0
  175. package/node_modules/@types/range-parser/README.md +53 -0
  176. package/node_modules/@types/range-parser/index.d.ts +34 -0
  177. package/node_modules/@types/range-parser/package.json +25 -0
  178. package/node_modules/@types/send/LICENSE +21 -0
  179. package/node_modules/@types/send/README.md +15 -0
  180. package/node_modules/@types/send/index.d.ts +187 -0
  181. package/node_modules/@types/send/package.json +38 -0
  182. package/node_modules/@types/serve-static/LICENSE +21 -0
  183. package/node_modules/@types/serve-static/README.md +15 -0
  184. package/node_modules/@types/serve-static/index.d.ts +116 -0
  185. package/node_modules/@types/serve-static/package.json +44 -0
  186. package/node_modules/@types/triple-beam/LICENSE +21 -0
  187. package/node_modules/@types/triple-beam/README.md +36 -0
  188. package/node_modules/@types/triple-beam/index.d.ts +17 -0
  189. package/node_modules/@types/triple-beam/package.json +25 -0
  190. package/node_modules/accepts/HISTORY.md +243 -0
  191. package/node_modules/accepts/LICENSE +23 -0
  192. package/node_modules/accepts/README.md +140 -0
  193. package/node_modules/accepts/index.js +238 -0
  194. package/node_modules/accepts/package.json +47 -0
  195. package/node_modules/array-flatten/LICENSE +21 -0
  196. package/node_modules/array-flatten/README.md +43 -0
  197. package/node_modules/array-flatten/array-flatten.js +64 -0
  198. package/node_modules/array-flatten/package.json +39 -0
  199. package/node_modules/async/CHANGELOG.md +351 -0
  200. package/node_modules/async/LICENSE +19 -0
  201. package/node_modules/async/README.md +59 -0
  202. package/node_modules/async/all.js +119 -0
  203. package/node_modules/async/allLimit.js +46 -0
  204. package/node_modules/async/allSeries.js +45 -0
  205. package/node_modules/async/any.js +122 -0
  206. package/node_modules/async/anyLimit.js +47 -0
  207. package/node_modules/async/anySeries.js +46 -0
  208. package/node_modules/async/apply.js +11 -0
  209. package/node_modules/async/applyEach.js +57 -0
  210. package/node_modules/async/applyEachSeries.js +37 -0
  211. package/node_modules/async/asyncify.js +118 -0
  212. package/node_modules/async/auto.js +333 -0
  213. package/node_modules/async/autoInject.js +182 -0
  214. package/node_modules/async/bower.json +17 -0
  215. package/node_modules/async/cargo.js +63 -0
  216. package/node_modules/async/cargoQueue.js +71 -0
  217. package/node_modules/async/compose.js +55 -0
  218. package/node_modules/async/concat.js +115 -0
  219. package/node_modules/async/concatLimit.js +60 -0
  220. package/node_modules/async/concatSeries.js +41 -0
  221. package/node_modules/async/constant.js +14 -0
  222. package/node_modules/async/detect.js +96 -0
  223. package/node_modules/async/detectLimit.js +48 -0
  224. package/node_modules/async/detectSeries.js +47 -0
  225. package/node_modules/async/dir.js +43 -0
  226. package/node_modules/async/dist/async.js +6061 -0
  227. package/node_modules/async/dist/async.min.js +1 -0
  228. package/node_modules/async/dist/async.mjs +5948 -0
  229. package/node_modules/async/doDuring.js +68 -0
  230. package/node_modules/async/doUntil.js +46 -0
  231. package/node_modules/async/doWhilst.js +68 -0
  232. package/node_modules/async/during.js +78 -0
  233. package/node_modules/async/each.js +129 -0
  234. package/node_modules/async/eachLimit.js +50 -0
  235. package/node_modules/async/eachOf.js +185 -0
  236. package/node_modules/async/eachOfLimit.js +47 -0
  237. package/node_modules/async/eachOfSeries.js +39 -0
  238. package/node_modules/async/eachSeries.js +44 -0
  239. package/node_modules/async/ensureAsync.js +67 -0
  240. package/node_modules/async/every.js +119 -0
  241. package/node_modules/async/everyLimit.js +46 -0
  242. package/node_modules/async/everySeries.js +45 -0
  243. package/node_modules/async/filter.js +93 -0
  244. package/node_modules/async/filterLimit.js +45 -0
  245. package/node_modules/async/filterSeries.js +43 -0
  246. package/node_modules/async/find.js +96 -0
  247. package/node_modules/async/findLimit.js +48 -0
  248. package/node_modules/async/findSeries.js +47 -0
  249. package/node_modules/async/flatMap.js +115 -0
  250. package/node_modules/async/flatMapLimit.js +60 -0
  251. package/node_modules/async/flatMapSeries.js +41 -0
  252. package/node_modules/async/foldl.js +153 -0
  253. package/node_modules/async/foldr.js +41 -0
  254. package/node_modules/async/forEach.js +129 -0
  255. package/node_modules/async/forEachLimit.js +50 -0
  256. package/node_modules/async/forEachOf.js +185 -0
  257. package/node_modules/async/forEachOfLimit.js +47 -0
  258. package/node_modules/async/forEachOfSeries.js +39 -0
  259. package/node_modules/async/forEachSeries.js +44 -0
  260. package/node_modules/async/forever.js +68 -0
  261. package/node_modules/async/groupBy.js +108 -0
  262. package/node_modules/async/groupByLimit.js +71 -0
  263. package/node_modules/async/groupBySeries.js +36 -0
  264. package/node_modules/async/index.js +588 -0
  265. package/node_modules/async/inject.js +153 -0
  266. package/node_modules/async/internal/DoublyLinkedList.js +92 -0
  267. package/node_modules/async/internal/Heap.js +120 -0
  268. package/node_modules/async/internal/applyEach.js +29 -0
  269. package/node_modules/async/internal/asyncEachOfLimit.js +75 -0
  270. package/node_modules/async/internal/awaitify.js +28 -0
  271. package/node_modules/async/internal/breakLoop.js +10 -0
  272. package/node_modules/async/internal/consoleFunc.js +31 -0
  273. package/node_modules/async/internal/createTester.js +40 -0
  274. package/node_modules/async/internal/eachOfLimit.js +90 -0
  275. package/node_modules/async/internal/filter.js +55 -0
  276. package/node_modules/async/internal/getIterator.js +11 -0
  277. package/node_modules/async/internal/initialParams.js +14 -0
  278. package/node_modules/async/internal/isArrayLike.js +10 -0
  279. package/node_modules/async/internal/iterator.js +57 -0
  280. package/node_modules/async/internal/map.js +30 -0
  281. package/node_modules/async/internal/once.js +17 -0
  282. package/node_modules/async/internal/onlyOnce.js +15 -0
  283. package/node_modules/async/internal/parallel.js +34 -0
  284. package/node_modules/async/internal/promiseCallback.js +23 -0
  285. package/node_modules/async/internal/queue.js +294 -0
  286. package/node_modules/async/internal/range.js +14 -0
  287. package/node_modules/async/internal/reject.js +26 -0
  288. package/node_modules/async/internal/setImmediate.js +34 -0
  289. package/node_modules/async/internal/withoutIndex.js +10 -0
  290. package/node_modules/async/internal/wrapAsync.js +34 -0
  291. package/node_modules/async/log.js +41 -0
  292. package/node_modules/async/map.js +142 -0
  293. package/node_modules/async/mapLimit.js +45 -0
  294. package/node_modules/async/mapSeries.js +44 -0
  295. package/node_modules/async/mapValues.js +152 -0
  296. package/node_modules/async/mapValuesLimit.js +61 -0
  297. package/node_modules/async/mapValuesSeries.js +37 -0
  298. package/node_modules/async/memoize.js +91 -0
  299. package/node_modules/async/nextTick.js +52 -0
  300. package/node_modules/async/package.json +75 -0
  301. package/node_modules/async/parallel.js +180 -0
  302. package/node_modules/async/parallelLimit.js +41 -0
  303. package/node_modules/async/priorityQueue.js +60 -0
  304. package/node_modules/async/queue.js +24 -0
  305. package/node_modules/async/race.js +67 -0
  306. package/node_modules/async/reduce.js +153 -0
  307. package/node_modules/async/reduceRight.js +41 -0
  308. package/node_modules/async/reflect.js +78 -0
  309. package/node_modules/async/reflectAll.js +93 -0
  310. package/node_modules/async/reject.js +87 -0
  311. package/node_modules/async/rejectLimit.js +45 -0
  312. package/node_modules/async/rejectSeries.js +43 -0
  313. package/node_modules/async/retry.js +159 -0
  314. package/node_modules/async/retryable.js +77 -0
  315. package/node_modules/async/select.js +93 -0
  316. package/node_modules/async/selectLimit.js +45 -0
  317. package/node_modules/async/selectSeries.js +43 -0
  318. package/node_modules/async/seq.js +79 -0
  319. package/node_modules/async/series.js +186 -0
  320. package/node_modules/async/setImmediate.js +45 -0
  321. package/node_modules/async/some.js +122 -0
  322. package/node_modules/async/someLimit.js +47 -0
  323. package/node_modules/async/someSeries.js +46 -0
  324. package/node_modules/async/sortBy.js +190 -0
  325. package/node_modules/async/timeout.js +89 -0
  326. package/node_modules/async/times.js +50 -0
  327. package/node_modules/async/timesLimit.js +43 -0
  328. package/node_modules/async/timesSeries.js +32 -0
  329. package/node_modules/async/transform.js +173 -0
  330. package/node_modules/async/tryEach.js +78 -0
  331. package/node_modules/async/unmemoize.js +25 -0
  332. package/node_modules/async/until.js +61 -0
  333. package/node_modules/async/waterfall.js +105 -0
  334. package/node_modules/async/whilst.js +78 -0
  335. package/node_modules/async/wrapSync.js +118 -0
  336. package/node_modules/async-function/.eslintrc +16 -0
  337. package/node_modules/async-function/.github/FUNDING.yml +12 -0
  338. package/node_modules/async-function/.nycrc +9 -0
  339. package/node_modules/async-function/CHANGELOG.md +16 -0
  340. package/node_modules/async-function/LICENSE +21 -0
  341. package/node_modules/async-function/README.md +51 -0
  342. package/node_modules/async-function/index.d.mts +3 -0
  343. package/node_modules/async-function/index.d.ts +13 -0
  344. package/node_modules/async-function/index.js +8 -0
  345. package/node_modules/async-function/index.mjs +4 -0
  346. package/node_modules/async-function/legacy.js +18 -0
  347. package/node_modules/async-function/package.json +86 -0
  348. package/node_modules/async-function/require.mjs +5 -0
  349. package/node_modules/async-function/test/index.js +40 -0
  350. package/node_modules/async-function/tsconfig.json +9 -0
  351. package/node_modules/async-generator-function/.eslintrc +26 -0
  352. package/node_modules/async-generator-function/.github/FUNDING.yml +12 -0
  353. package/node_modules/async-generator-function/.nycrc +9 -0
  354. package/node_modules/async-generator-function/CHANGELOG.md +15 -0
  355. package/node_modules/async-generator-function/LICENSE +21 -0
  356. package/node_modules/async-generator-function/README.md +52 -0
  357. package/node_modules/async-generator-function/index.d.mts +3 -0
  358. package/node_modules/async-generator-function/index.d.ts +22 -0
  359. package/node_modules/async-generator-function/index.js +8 -0
  360. package/node_modules/async-generator-function/index.mjs +4 -0
  361. package/node_modules/async-generator-function/legacy.js +18 -0
  362. package/node_modules/async-generator-function/package.json +87 -0
  363. package/node_modules/async-generator-function/require.mjs +5 -0
  364. package/node_modules/async-generator-function/test/index.js +40 -0
  365. package/node_modules/async-generator-function/tsconfig.json +9 -0
  366. package/node_modules/body-parser/HISTORY.md +672 -0
  367. package/node_modules/body-parser/LICENSE +23 -0
  368. package/node_modules/body-parser/README.md +476 -0
  369. package/node_modules/body-parser/SECURITY.md +25 -0
  370. package/node_modules/body-parser/index.js +156 -0
  371. package/node_modules/body-parser/lib/read.js +205 -0
  372. package/node_modules/body-parser/lib/types/json.js +247 -0
  373. package/node_modules/body-parser/lib/types/raw.js +101 -0
  374. package/node_modules/body-parser/lib/types/text.js +121 -0
  375. package/node_modules/body-parser/lib/types/urlencoded.js +307 -0
  376. package/node_modules/body-parser/package.json +56 -0
  377. package/node_modules/bytes/History.md +97 -0
  378. package/node_modules/bytes/LICENSE +23 -0
  379. package/node_modules/bytes/Readme.md +152 -0
  380. package/node_modules/bytes/index.js +170 -0
  381. package/node_modules/bytes/package.json +42 -0
  382. package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
  383. package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  384. package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
  385. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  386. package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
  387. package/node_modules/call-bind-apply-helpers/README.md +62 -0
  388. package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  389. package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
  390. package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  391. package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
  392. package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  393. package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
  394. package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  395. package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
  396. package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
  397. package/node_modules/call-bind-apply-helpers/index.js +15 -0
  398. package/node_modules/call-bind-apply-helpers/package.json +85 -0
  399. package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  400. package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  401. package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
  402. package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  403. package/node_modules/call-bound/.eslintrc +13 -0
  404. package/node_modules/call-bound/.github/FUNDING.yml +12 -0
  405. package/node_modules/call-bound/.nycrc +9 -0
  406. package/node_modules/call-bound/CHANGELOG.md +42 -0
  407. package/node_modules/call-bound/LICENSE +21 -0
  408. package/node_modules/call-bound/README.md +53 -0
  409. package/node_modules/call-bound/index.d.ts +94 -0
  410. package/node_modules/call-bound/index.js +19 -0
  411. package/node_modules/call-bound/package.json +99 -0
  412. package/node_modules/call-bound/test/index.js +61 -0
  413. package/node_modules/call-bound/tsconfig.json +10 -0
  414. package/node_modules/color/LICENSE +21 -0
  415. package/node_modules/color/README.md +183 -0
  416. package/node_modules/color/index.d.ts +135 -0
  417. package/node_modules/color/index.js +496 -0
  418. package/node_modules/color/package.json +52 -0
  419. package/node_modules/color-convert/LICENSE +22 -0
  420. package/node_modules/color-convert/README.md +165 -0
  421. package/node_modules/color-convert/conversions.js +980 -0
  422. package/node_modules/color-convert/index.d.ts +744 -0
  423. package/node_modules/color-convert/index.js +81 -0
  424. package/node_modules/color-convert/package.json +58 -0
  425. package/node_modules/color-convert/route.js +98 -0
  426. package/node_modules/color-name/LICENSE +8 -0
  427. package/node_modules/color-name/README.md +11 -0
  428. package/node_modules/color-name/index.js +153 -0
  429. package/node_modules/color-name/package.json +32 -0
  430. package/node_modules/color-string/LICENSE +21 -0
  431. package/node_modules/color-string/README.md +60 -0
  432. package/node_modules/color-string/index.d.ts +23 -0
  433. package/node_modules/color-string/index.js +231 -0
  434. package/node_modules/color-string/package.json +47 -0
  435. package/node_modules/content-disposition/HISTORY.md +60 -0
  436. package/node_modules/content-disposition/LICENSE +22 -0
  437. package/node_modules/content-disposition/README.md +142 -0
  438. package/node_modules/content-disposition/index.js +458 -0
  439. package/node_modules/content-disposition/package.json +44 -0
  440. package/node_modules/content-type/HISTORY.md +29 -0
  441. package/node_modules/content-type/LICENSE +22 -0
  442. package/node_modules/content-type/README.md +94 -0
  443. package/node_modules/content-type/index.js +225 -0
  444. package/node_modules/content-type/package.json +42 -0
  445. package/node_modules/cookie/LICENSE +24 -0
  446. package/node_modules/cookie/README.md +317 -0
  447. package/node_modules/cookie/SECURITY.md +25 -0
  448. package/node_modules/cookie/index.js +334 -0
  449. package/node_modules/cookie/package.json +44 -0
  450. package/node_modules/cookie-signature/.npmignore +4 -0
  451. package/node_modules/cookie-signature/History.md +38 -0
  452. package/node_modules/cookie-signature/Readme.md +42 -0
  453. package/node_modules/cookie-signature/index.js +51 -0
  454. package/node_modules/cookie-signature/package.json +18 -0
  455. package/node_modules/debug/.coveralls.yml +1 -0
  456. package/node_modules/debug/.eslintrc +11 -0
  457. package/node_modules/debug/.npmignore +9 -0
  458. package/node_modules/debug/.travis.yml +14 -0
  459. package/node_modules/debug/CHANGELOG.md +362 -0
  460. package/node_modules/debug/LICENSE +19 -0
  461. package/node_modules/debug/Makefile +50 -0
  462. package/node_modules/debug/README.md +312 -0
  463. package/node_modules/debug/component.json +19 -0
  464. package/node_modules/debug/karma.conf.js +70 -0
  465. package/node_modules/debug/node.js +1 -0
  466. package/node_modules/debug/node_modules/ms/index.js +152 -0
  467. package/node_modules/debug/node_modules/ms/license.md +21 -0
  468. package/node_modules/debug/node_modules/ms/package.json +37 -0
  469. package/node_modules/debug/node_modules/ms/readme.md +51 -0
  470. package/node_modules/debug/package.json +49 -0
  471. package/node_modules/debug/src/browser.js +185 -0
  472. package/node_modules/debug/src/debug.js +202 -0
  473. package/node_modules/debug/src/index.js +10 -0
  474. package/node_modules/debug/src/inspector-log.js +15 -0
  475. package/node_modules/debug/src/node.js +248 -0
  476. package/node_modules/depd/History.md +103 -0
  477. package/node_modules/depd/LICENSE +22 -0
  478. package/node_modules/depd/Readme.md +280 -0
  479. package/node_modules/depd/index.js +538 -0
  480. package/node_modules/depd/lib/browser/index.js +77 -0
  481. package/node_modules/depd/package.json +45 -0
  482. package/node_modules/destroy/LICENSE +23 -0
  483. package/node_modules/destroy/README.md +63 -0
  484. package/node_modules/destroy/index.js +209 -0
  485. package/node_modules/destroy/package.json +48 -0
  486. package/node_modules/dunder-proto/.eslintrc +5 -0
  487. package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
  488. package/node_modules/dunder-proto/.nycrc +13 -0
  489. package/node_modules/dunder-proto/CHANGELOG.md +24 -0
  490. package/node_modules/dunder-proto/LICENSE +21 -0
  491. package/node_modules/dunder-proto/README.md +54 -0
  492. package/node_modules/dunder-proto/get.d.ts +5 -0
  493. package/node_modules/dunder-proto/get.js +30 -0
  494. package/node_modules/dunder-proto/package.json +76 -0
  495. package/node_modules/dunder-proto/set.d.ts +5 -0
  496. package/node_modules/dunder-proto/set.js +35 -0
  497. package/node_modules/dunder-proto/test/get.js +34 -0
  498. package/node_modules/dunder-proto/test/index.js +4 -0
  499. package/node_modules/dunder-proto/test/set.js +50 -0
  500. package/node_modules/dunder-proto/tsconfig.json +9 -0
  501. package/node_modules/ee-first/LICENSE +22 -0
  502. package/node_modules/ee-first/README.md +80 -0
  503. package/node_modules/ee-first/index.js +95 -0
  504. package/node_modules/ee-first/package.json +29 -0
  505. package/node_modules/enabled/.travis.yml +9 -0
  506. package/node_modules/enabled/LICENSE +20 -0
  507. package/node_modules/enabled/README.md +68 -0
  508. package/node_modules/enabled/index.js +34 -0
  509. package/node_modules/enabled/package.json +33 -0
  510. package/node_modules/enabled/test.js +39 -0
  511. package/node_modules/encodeurl/LICENSE +22 -0
  512. package/node_modules/encodeurl/README.md +109 -0
  513. package/node_modules/encodeurl/index.js +60 -0
  514. package/node_modules/encodeurl/package.json +40 -0
  515. package/node_modules/es-define-property/.eslintrc +13 -0
  516. package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  517. package/node_modules/es-define-property/.nycrc +9 -0
  518. package/node_modules/es-define-property/CHANGELOG.md +29 -0
  519. package/node_modules/es-define-property/LICENSE +21 -0
  520. package/node_modules/es-define-property/README.md +49 -0
  521. package/node_modules/es-define-property/index.d.ts +3 -0
  522. package/node_modules/es-define-property/index.js +14 -0
  523. package/node_modules/es-define-property/package.json +81 -0
  524. package/node_modules/es-define-property/test/index.js +56 -0
  525. package/node_modules/es-define-property/tsconfig.json +10 -0
  526. package/node_modules/es-errors/.eslintrc +5 -0
  527. package/node_modules/es-errors/.github/FUNDING.yml +12 -0
  528. package/node_modules/es-errors/CHANGELOG.md +40 -0
  529. package/node_modules/es-errors/LICENSE +21 -0
  530. package/node_modules/es-errors/README.md +55 -0
  531. package/node_modules/es-errors/eval.d.ts +3 -0
  532. package/node_modules/es-errors/eval.js +4 -0
  533. package/node_modules/es-errors/index.d.ts +3 -0
  534. package/node_modules/es-errors/index.js +4 -0
  535. package/node_modules/es-errors/package.json +80 -0
  536. package/node_modules/es-errors/range.d.ts +3 -0
  537. package/node_modules/es-errors/range.js +4 -0
  538. package/node_modules/es-errors/ref.d.ts +3 -0
  539. package/node_modules/es-errors/ref.js +4 -0
  540. package/node_modules/es-errors/syntax.d.ts +3 -0
  541. package/node_modules/es-errors/syntax.js +4 -0
  542. package/node_modules/es-errors/test/index.js +19 -0
  543. package/node_modules/es-errors/tsconfig.json +49 -0
  544. package/node_modules/es-errors/type.d.ts +3 -0
  545. package/node_modules/es-errors/type.js +4 -0
  546. package/node_modules/es-errors/uri.d.ts +3 -0
  547. package/node_modules/es-errors/uri.js +4 -0
  548. package/node_modules/es-object-atoms/.eslintrc +16 -0
  549. package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
  550. package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
  551. package/node_modules/es-object-atoms/LICENSE +21 -0
  552. package/node_modules/es-object-atoms/README.md +63 -0
  553. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  554. package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  555. package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  556. package/node_modules/es-object-atoms/ToObject.js +10 -0
  557. package/node_modules/es-object-atoms/index.d.ts +3 -0
  558. package/node_modules/es-object-atoms/index.js +4 -0
  559. package/node_modules/es-object-atoms/isObject.d.ts +3 -0
  560. package/node_modules/es-object-atoms/isObject.js +6 -0
  561. package/node_modules/es-object-atoms/package.json +80 -0
  562. package/node_modules/es-object-atoms/test/index.js +38 -0
  563. package/node_modules/es-object-atoms/tsconfig.json +6 -0
  564. package/node_modules/escape-html/LICENSE +24 -0
  565. package/node_modules/escape-html/Readme.md +43 -0
  566. package/node_modules/escape-html/index.js +78 -0
  567. package/node_modules/escape-html/package.json +24 -0
  568. package/node_modules/etag/HISTORY.md +83 -0
  569. package/node_modules/etag/LICENSE +22 -0
  570. package/node_modules/etag/README.md +159 -0
  571. package/node_modules/etag/index.js +131 -0
  572. package/node_modules/etag/package.json +47 -0
  573. package/node_modules/express/History.md +3656 -0
  574. package/node_modules/express/LICENSE +24 -0
  575. package/node_modules/express/Readme.md +260 -0
  576. package/node_modules/express/index.js +11 -0
  577. package/node_modules/express/lib/application.js +661 -0
  578. package/node_modules/express/lib/express.js +116 -0
  579. package/node_modules/express/lib/middleware/init.js +43 -0
  580. package/node_modules/express/lib/middleware/query.js +47 -0
  581. package/node_modules/express/lib/request.js +525 -0
  582. package/node_modules/express/lib/response.js +1179 -0
  583. package/node_modules/express/lib/router/index.js +673 -0
  584. package/node_modules/express/lib/router/layer.js +181 -0
  585. package/node_modules/express/lib/router/route.js +230 -0
  586. package/node_modules/express/lib/utils.js +303 -0
  587. package/node_modules/express/lib/view.js +182 -0
  588. package/node_modules/express/package.json +102 -0
  589. package/node_modules/express-promise-router/.changeset/README.md +8 -0
  590. package/node_modules/express-promise-router/.changeset/config.json +9 -0
  591. package/node_modules/express-promise-router/.eslintrc.json +13 -0
  592. package/node_modules/express-promise-router/.github/renovate.json5 +14 -0
  593. package/node_modules/express-promise-router/.github/workflows/test.yml +24 -0
  594. package/node_modules/express-promise-router/.prettierrc.yaml +2 -0
  595. package/node_modules/express-promise-router/CHANGELOG.md +82 -0
  596. package/node_modules/express-promise-router/LICENSE +21 -0
  597. package/node_modules/express-promise-router/README.md +182 -0
  598. package/node_modules/express-promise-router/index.d.ts +7 -0
  599. package/node_modules/express-promise-router/lib/express-promise-router.js +131 -0
  600. package/node_modules/express-promise-router/package.json +86 -0
  601. package/node_modules/express-promise-router/test/.eslintrc +8 -0
  602. package/node_modules/express-promise-router/test/babel.test.js +35 -0
  603. package/node_modules/express-promise-router/test/commonjs.test.js +35 -0
  604. package/node_modules/express-promise-router/test/express-promise-router.nested-route.test.js +18 -0
  605. package/node_modules/express-promise-router/test/express-promise-router.route.test.js +353 -0
  606. package/node_modules/express-promise-router/test/express-promise-router.test.js +401 -0
  607. package/node_modules/express-promise-router/test/test-resources/.eslintrc +6 -0
  608. package/node_modules/express-promise-router/test/test-resources/babel-base-case.js +12 -0
  609. package/node_modules/express-promise-router/test/test-resources/commonjs-base-case.js +12 -0
  610. package/node_modules/express-promise-router/test/test-resources/typescript-base-case.ts +13 -0
  611. package/node_modules/express-promise-router/test/tracing.test.js +36 -0
  612. package/node_modules/express-promise-router/test/typescript.test.js +53 -0
  613. package/node_modules/express-promise-router/test/util/http-utils.js +14 -0
  614. package/node_modules/express-promise-router/test/util/launch-utils.js +40 -0
  615. package/node_modules/fecha/LICENSE +22 -0
  616. package/node_modules/fecha/README.md +320 -0
  617. package/node_modules/fecha/dist/fecha.min.js +2 -0
  618. package/node_modules/fecha/dist/fecha.min.js.map +1 -0
  619. package/node_modules/fecha/lib/fecha.d.ts +52 -0
  620. package/node_modules/fecha/lib/fecha.js +403 -0
  621. package/node_modules/fecha/lib/fecha.js.map +1 -0
  622. package/node_modules/fecha/lib/fecha.umd.js +418 -0
  623. package/node_modules/fecha/lib/fecha.umd.js.map +1 -0
  624. package/node_modules/fecha/package.json +55 -0
  625. package/node_modules/fecha/src/fecha.ts +524 -0
  626. package/node_modules/finalhandler/HISTORY.md +210 -0
  627. package/node_modules/finalhandler/LICENSE +22 -0
  628. package/node_modules/finalhandler/README.md +147 -0
  629. package/node_modules/finalhandler/SECURITY.md +25 -0
  630. package/node_modules/finalhandler/index.js +341 -0
  631. package/node_modules/finalhandler/package.json +47 -0
  632. package/node_modules/fn.name/.gitattributes +1 -0
  633. package/node_modules/fn.name/.travis.yml +10 -0
  634. package/node_modules/fn.name/LICENSE +22 -0
  635. package/node_modules/fn.name/README.md +42 -0
  636. package/node_modules/fn.name/index.js +42 -0
  637. package/node_modules/fn.name/package.json +37 -0
  638. package/node_modules/fn.name/test.js +73 -0
  639. package/node_modules/forwarded/HISTORY.md +21 -0
  640. package/node_modules/forwarded/LICENSE +22 -0
  641. package/node_modules/forwarded/README.md +57 -0
  642. package/node_modules/forwarded/index.js +90 -0
  643. package/node_modules/forwarded/package.json +45 -0
  644. package/node_modules/fresh/HISTORY.md +70 -0
  645. package/node_modules/fresh/LICENSE +23 -0
  646. package/node_modules/fresh/README.md +119 -0
  647. package/node_modules/fresh/index.js +137 -0
  648. package/node_modules/fresh/package.json +46 -0
  649. package/node_modules/fs-extra/LICENSE +15 -0
  650. package/node_modules/fs-extra/README.md +294 -0
  651. package/node_modules/fs-extra/lib/copy/copy-sync.js +176 -0
  652. package/node_modules/fs-extra/lib/copy/copy.js +180 -0
  653. package/node_modules/fs-extra/lib/copy/index.js +7 -0
  654. package/node_modules/fs-extra/lib/empty/index.js +39 -0
  655. package/node_modules/fs-extra/lib/ensure/file.js +66 -0
  656. package/node_modules/fs-extra/lib/ensure/index.js +23 -0
  657. package/node_modules/fs-extra/lib/ensure/link.js +64 -0
  658. package/node_modules/fs-extra/lib/ensure/symlink-paths.js +101 -0
  659. package/node_modules/fs-extra/lib/ensure/symlink-type.js +34 -0
  660. package/node_modules/fs-extra/lib/ensure/symlink.js +67 -0
  661. package/node_modules/fs-extra/lib/esm.mjs +68 -0
  662. package/node_modules/fs-extra/lib/fs/index.js +146 -0
  663. package/node_modules/fs-extra/lib/index.js +16 -0
  664. package/node_modules/fs-extra/lib/json/index.js +16 -0
  665. package/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
  666. package/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
  667. package/node_modules/fs-extra/lib/json/output-json.js +12 -0
  668. package/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
  669. package/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
  670. package/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
  671. package/node_modules/fs-extra/lib/move/index.js +7 -0
  672. package/node_modules/fs-extra/lib/move/move-sync.js +55 -0
  673. package/node_modules/fs-extra/lib/move/move.js +59 -0
  674. package/node_modules/fs-extra/lib/output-file/index.js +31 -0
  675. package/node_modules/fs-extra/lib/path-exists/index.js +12 -0
  676. package/node_modules/fs-extra/lib/remove/index.js +17 -0
  677. package/node_modules/fs-extra/lib/util/async.js +29 -0
  678. package/node_modules/fs-extra/lib/util/stat.js +159 -0
  679. package/node_modules/fs-extra/lib/util/utimes.js +36 -0
  680. package/node_modules/fs-extra/package.json +71 -0
  681. package/node_modules/function-bind/.eslintrc +21 -0
  682. package/node_modules/function-bind/.github/FUNDING.yml +12 -0
  683. package/node_modules/function-bind/.github/SECURITY.md +3 -0
  684. package/node_modules/function-bind/.nycrc +13 -0
  685. package/node_modules/function-bind/CHANGELOG.md +136 -0
  686. package/node_modules/function-bind/LICENSE +20 -0
  687. package/node_modules/function-bind/README.md +46 -0
  688. package/node_modules/function-bind/implementation.js +84 -0
  689. package/node_modules/function-bind/index.js +5 -0
  690. package/node_modules/function-bind/package.json +87 -0
  691. package/node_modules/function-bind/test/.eslintrc +9 -0
  692. package/node_modules/function-bind/test/index.js +252 -0
  693. package/node_modules/generator-function/.eslintrc +16 -0
  694. package/node_modules/generator-function/.github/FUNDING.yml +12 -0
  695. package/node_modules/generator-function/.nycrc +9 -0
  696. package/node_modules/generator-function/CHANGELOG.md +27 -0
  697. package/node_modules/generator-function/LICENSE.md +7 -0
  698. package/node_modules/generator-function/README.md +51 -0
  699. package/node_modules/generator-function/index.d.mts +3 -0
  700. package/node_modules/generator-function/index.d.ts +3 -0
  701. package/node_modules/generator-function/index.js +8 -0
  702. package/node_modules/generator-function/index.mjs +4 -0
  703. package/node_modules/generator-function/legacy.js +18 -0
  704. package/node_modules/generator-function/package.json +88 -0
  705. package/node_modules/generator-function/require.mjs +5 -0
  706. package/node_modules/generator-function/test/index.js +42 -0
  707. package/node_modules/generator-function/tsconfig.json +9 -0
  708. package/node_modules/get-intrinsic/.eslintrc +42 -0
  709. package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
  710. package/node_modules/get-intrinsic/.nycrc +9 -0
  711. package/node_modules/get-intrinsic/CHANGELOG.md +193 -0
  712. package/node_modules/get-intrinsic/LICENSE +21 -0
  713. package/node_modules/get-intrinsic/README.md +71 -0
  714. package/node_modules/get-intrinsic/index.js +373 -0
  715. package/node_modules/get-intrinsic/package.json +100 -0
  716. package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
  717. package/node_modules/get-proto/.eslintrc +10 -0
  718. package/node_modules/get-proto/.github/FUNDING.yml +12 -0
  719. package/node_modules/get-proto/.nycrc +9 -0
  720. package/node_modules/get-proto/CHANGELOG.md +21 -0
  721. package/node_modules/get-proto/LICENSE +21 -0
  722. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  723. package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  724. package/node_modules/get-proto/README.md +50 -0
  725. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  726. package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  727. package/node_modules/get-proto/index.d.ts +5 -0
  728. package/node_modules/get-proto/index.js +27 -0
  729. package/node_modules/get-proto/package.json +81 -0
  730. package/node_modules/get-proto/test/index.js +68 -0
  731. package/node_modules/get-proto/tsconfig.json +9 -0
  732. package/node_modules/gopd/.eslintrc +16 -0
  733. package/node_modules/gopd/.github/FUNDING.yml +12 -0
  734. package/node_modules/gopd/CHANGELOG.md +45 -0
  735. package/node_modules/gopd/LICENSE +21 -0
  736. package/node_modules/gopd/README.md +40 -0
  737. package/node_modules/gopd/gOPD.d.ts +1 -0
  738. package/node_modules/gopd/gOPD.js +4 -0
  739. package/node_modules/gopd/index.d.ts +5 -0
  740. package/node_modules/gopd/index.js +15 -0
  741. package/node_modules/gopd/package.json +77 -0
  742. package/node_modules/gopd/test/index.js +36 -0
  743. package/node_modules/gopd/tsconfig.json +9 -0
  744. package/node_modules/graceful-fs/LICENSE +15 -0
  745. package/node_modules/graceful-fs/README.md +143 -0
  746. package/node_modules/graceful-fs/clone.js +23 -0
  747. package/node_modules/graceful-fs/graceful-fs.js +448 -0
  748. package/node_modules/graceful-fs/legacy-streams.js +118 -0
  749. package/node_modules/graceful-fs/package.json +53 -0
  750. package/node_modules/graceful-fs/polyfills.js +355 -0
  751. package/node_modules/has-symbols/.eslintrc +11 -0
  752. package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
  753. package/node_modules/has-symbols/.nycrc +9 -0
  754. package/node_modules/has-symbols/CHANGELOG.md +91 -0
  755. package/node_modules/has-symbols/LICENSE +21 -0
  756. package/node_modules/has-symbols/README.md +46 -0
  757. package/node_modules/has-symbols/index.d.ts +3 -0
  758. package/node_modules/has-symbols/index.js +14 -0
  759. package/node_modules/has-symbols/package.json +111 -0
  760. package/node_modules/has-symbols/shams.d.ts +3 -0
  761. package/node_modules/has-symbols/shams.js +45 -0
  762. package/node_modules/has-symbols/test/index.js +22 -0
  763. package/node_modules/has-symbols/test/shams/core-js.js +29 -0
  764. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
  765. package/node_modules/has-symbols/test/tests.js +58 -0
  766. package/node_modules/has-symbols/tsconfig.json +10 -0
  767. package/node_modules/hasown/.eslintrc +5 -0
  768. package/node_modules/hasown/.github/FUNDING.yml +12 -0
  769. package/node_modules/hasown/.nycrc +13 -0
  770. package/node_modules/hasown/CHANGELOG.md +40 -0
  771. package/node_modules/hasown/LICENSE +21 -0
  772. package/node_modules/hasown/README.md +40 -0
  773. package/node_modules/hasown/index.d.ts +3 -0
  774. package/node_modules/hasown/index.js +8 -0
  775. package/node_modules/hasown/package.json +92 -0
  776. package/node_modules/hasown/tsconfig.json +6 -0
  777. package/node_modules/http-errors/HISTORY.md +180 -0
  778. package/node_modules/http-errors/LICENSE +23 -0
  779. package/node_modules/http-errors/README.md +169 -0
  780. package/node_modules/http-errors/index.js +289 -0
  781. package/node_modules/http-errors/package.json +50 -0
  782. package/node_modules/iconv-lite/Changelog.md +162 -0
  783. package/node_modules/iconv-lite/LICENSE +21 -0
  784. package/node_modules/iconv-lite/README.md +156 -0
  785. package/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
  786. package/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
  787. package/node_modules/iconv-lite/encodings/index.js +22 -0
  788. package/node_modules/iconv-lite/encodings/internal.js +188 -0
  789. package/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
  790. package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  791. package/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
  792. package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  793. package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  794. package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  795. package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  796. package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  797. package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  798. package/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
  799. package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  800. package/node_modules/iconv-lite/encodings/utf16.js +177 -0
  801. package/node_modules/iconv-lite/encodings/utf7.js +290 -0
  802. package/node_modules/iconv-lite/lib/bom-handling.js +52 -0
  803. package/node_modules/iconv-lite/lib/extend-node.js +217 -0
  804. package/node_modules/iconv-lite/lib/index.d.ts +24 -0
  805. package/node_modules/iconv-lite/lib/index.js +153 -0
  806. package/node_modules/iconv-lite/lib/streams.js +121 -0
  807. package/node_modules/iconv-lite/package.json +46 -0
  808. package/node_modules/inherits/LICENSE +16 -0
  809. package/node_modules/inherits/README.md +42 -0
  810. package/node_modules/inherits/inherits.js +9 -0
  811. package/node_modules/inherits/inherits_browser.js +27 -0
  812. package/node_modules/inherits/package.json +29 -0
  813. package/node_modules/ipaddr.js/LICENSE +19 -0
  814. package/node_modules/ipaddr.js/README.md +233 -0
  815. package/node_modules/ipaddr.js/ipaddr.min.js +1 -0
  816. package/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
  817. package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
  818. package/node_modules/ipaddr.js/package.json +35 -0
  819. package/node_modules/is-promise/LICENSE +19 -0
  820. package/node_modules/is-promise/index.d.ts +2 -0
  821. package/node_modules/is-promise/index.js +6 -0
  822. package/node_modules/is-promise/index.mjs +3 -0
  823. package/node_modules/is-promise/package.json +30 -0
  824. package/node_modules/is-promise/readme.md +33 -0
  825. package/node_modules/is-stream/index.d.ts +79 -0
  826. package/node_modules/is-stream/index.js +28 -0
  827. package/node_modules/is-stream/license +9 -0
  828. package/node_modules/is-stream/package.json +42 -0
  829. package/node_modules/is-stream/readme.md +60 -0
  830. package/node_modules/jsonfile/LICENSE +15 -0
  831. package/node_modules/jsonfile/README.md +230 -0
  832. package/node_modules/jsonfile/index.js +88 -0
  833. package/node_modules/jsonfile/package.json +40 -0
  834. package/node_modules/jsonfile/utils.js +14 -0
  835. package/node_modules/kuler/.travis.yml +5 -0
  836. package/node_modules/kuler/LICENSE +7 -0
  837. package/node_modules/kuler/README.md +40 -0
  838. package/node_modules/kuler/index.js +118 -0
  839. package/node_modules/kuler/package.json +34 -0
  840. package/node_modules/kuler/test.js +23 -0
  841. package/node_modules/lodash.flattendeep/LICENSE +47 -0
  842. package/node_modules/lodash.flattendeep/README.md +18 -0
  843. package/node_modules/lodash.flattendeep/index.js +350 -0
  844. package/node_modules/lodash.flattendeep/package.json +17 -0
  845. package/node_modules/logform/.babelrc +3 -0
  846. package/node_modules/logform/.eslintrc +7 -0
  847. package/node_modules/logform/.gitattributes +1 -0
  848. package/node_modules/logform/CHANGELOG.md +309 -0
  849. package/node_modules/logform/LICENSE +21 -0
  850. package/node_modules/logform/README.md +653 -0
  851. package/node_modules/logform/align.js +14 -0
  852. package/node_modules/logform/browser.js +38 -0
  853. package/node_modules/logform/cli.js +52 -0
  854. package/node_modules/logform/colorize.js +122 -0
  855. package/node_modules/logform/combine.js +66 -0
  856. package/node_modules/logform/dist/align.js +14 -0
  857. package/node_modules/logform/dist/browser.js +72 -0
  858. package/node_modules/logform/dist/cli.js +62 -0
  859. package/node_modules/logform/dist/colorize.js +131 -0
  860. package/node_modules/logform/dist/combine.js +62 -0
  861. package/node_modules/logform/dist/errors.js +44 -0
  862. package/node_modules/logform/dist/format.js +70 -0
  863. package/node_modules/logform/dist/index.js +86 -0
  864. package/node_modules/logform/dist/json.js +30 -0
  865. package/node_modules/logform/dist/label.js +18 -0
  866. package/node_modules/logform/dist/levels.js +13 -0
  867. package/node_modules/logform/dist/logstash.js +28 -0
  868. package/node_modules/logform/dist/metadata.js +56 -0
  869. package/node_modules/logform/dist/ms.js +18 -0
  870. package/node_modules/logform/dist/pad-levels.js +110 -0
  871. package/node_modules/logform/dist/pretty-print.js +32 -0
  872. package/node_modules/logform/dist/printf.js +33 -0
  873. package/node_modules/logform/dist/simple.js +32 -0
  874. package/node_modules/logform/dist/splat.js +143 -0
  875. package/node_modules/logform/dist/timestamp.js +26 -0
  876. package/node_modules/logform/dist/uncolorize.js +25 -0
  877. package/node_modules/logform/errors.js +41 -0
  878. package/node_modules/logform/format.js +52 -0
  879. package/node_modules/logform/index.d.ts +201 -0
  880. package/node_modules/logform/index.js +52 -0
  881. package/node_modules/logform/json.js +30 -0
  882. package/node_modules/logform/label.js +19 -0
  883. package/node_modules/logform/levels.js +12 -0
  884. package/node_modules/logform/logstash.js +29 -0
  885. package/node_modules/logform/metadata.js +61 -0
  886. package/node_modules/logform/ms.js +18 -0
  887. package/node_modules/logform/package.json +53 -0
  888. package/node_modules/logform/pad-levels.js +83 -0
  889. package/node_modules/logform/pretty-print.js +29 -0
  890. package/node_modules/logform/printf.js +26 -0
  891. package/node_modules/logform/simple.js +33 -0
  892. package/node_modules/logform/splat.js +132 -0
  893. package/node_modules/logform/timestamp.js +30 -0
  894. package/node_modules/logform/tsconfig.json +22 -0
  895. package/node_modules/logform/uncolorize.js +27 -0
  896. package/node_modules/math-intrinsics/.eslintrc +16 -0
  897. package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  898. package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  899. package/node_modules/math-intrinsics/LICENSE +21 -0
  900. package/node_modules/math-intrinsics/README.md +50 -0
  901. package/node_modules/math-intrinsics/abs.d.ts +1 -0
  902. package/node_modules/math-intrinsics/abs.js +4 -0
  903. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  904. package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  905. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  906. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  907. package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  908. package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  909. package/node_modules/math-intrinsics/floor.d.ts +1 -0
  910. package/node_modules/math-intrinsics/floor.js +4 -0
  911. package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  912. package/node_modules/math-intrinsics/isFinite.js +12 -0
  913. package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  914. package/node_modules/math-intrinsics/isInteger.js +16 -0
  915. package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  916. package/node_modules/math-intrinsics/isNaN.js +6 -0
  917. package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  918. package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  919. package/node_modules/math-intrinsics/max.d.ts +1 -0
  920. package/node_modules/math-intrinsics/max.js +4 -0
  921. package/node_modules/math-intrinsics/min.d.ts +1 -0
  922. package/node_modules/math-intrinsics/min.js +4 -0
  923. package/node_modules/math-intrinsics/mod.d.ts +3 -0
  924. package/node_modules/math-intrinsics/mod.js +9 -0
  925. package/node_modules/math-intrinsics/package.json +86 -0
  926. package/node_modules/math-intrinsics/pow.d.ts +1 -0
  927. package/node_modules/math-intrinsics/pow.js +4 -0
  928. package/node_modules/math-intrinsics/round.d.ts +1 -0
  929. package/node_modules/math-intrinsics/round.js +4 -0
  930. package/node_modules/math-intrinsics/sign.d.ts +3 -0
  931. package/node_modules/math-intrinsics/sign.js +11 -0
  932. package/node_modules/math-intrinsics/test/index.js +192 -0
  933. package/node_modules/math-intrinsics/tsconfig.json +3 -0
  934. package/node_modules/media-typer/HISTORY.md +22 -0
  935. package/node_modules/media-typer/LICENSE +22 -0
  936. package/node_modules/media-typer/README.md +81 -0
  937. package/node_modules/media-typer/index.js +270 -0
  938. package/node_modules/media-typer/package.json +26 -0
  939. package/node_modules/merge-descriptors/HISTORY.md +21 -0
  940. package/node_modules/merge-descriptors/LICENSE +23 -0
  941. package/node_modules/merge-descriptors/README.md +49 -0
  942. package/node_modules/merge-descriptors/index.js +60 -0
  943. package/node_modules/merge-descriptors/package.json +39 -0
  944. package/node_modules/methods/HISTORY.md +29 -0
  945. package/node_modules/methods/LICENSE +24 -0
  946. package/node_modules/methods/README.md +51 -0
  947. package/node_modules/methods/index.js +69 -0
  948. package/node_modules/methods/package.json +36 -0
  949. package/node_modules/mime/.npmignore +0 -0
  950. package/node_modules/mime/CHANGELOG.md +164 -0
  951. package/node_modules/mime/LICENSE +21 -0
  952. package/node_modules/mime/README.md +90 -0
  953. package/node_modules/mime/cli.js +8 -0
  954. package/node_modules/mime/mime.js +108 -0
  955. package/node_modules/mime/package.json +44 -0
  956. package/node_modules/mime/src/build.js +53 -0
  957. package/node_modules/mime/src/test.js +60 -0
  958. package/node_modules/mime/types.json +1 -0
  959. package/node_modules/mime-db/HISTORY.md +507 -0
  960. package/node_modules/mime-db/LICENSE +23 -0
  961. package/node_modules/mime-db/README.md +100 -0
  962. package/node_modules/mime-db/db.json +8519 -0
  963. package/node_modules/mime-db/index.js +12 -0
  964. package/node_modules/mime-db/package.json +60 -0
  965. package/node_modules/mime-types/HISTORY.md +397 -0
  966. package/node_modules/mime-types/LICENSE +23 -0
  967. package/node_modules/mime-types/README.md +113 -0
  968. package/node_modules/mime-types/index.js +188 -0
  969. package/node_modules/mime-types/package.json +44 -0
  970. package/node_modules/ms/index.js +162 -0
  971. package/node_modules/ms/license.md +21 -0
  972. package/node_modules/ms/package.json +38 -0
  973. package/node_modules/ms/readme.md +59 -0
  974. package/node_modules/negotiator/HISTORY.md +108 -0
  975. package/node_modules/negotiator/LICENSE +24 -0
  976. package/node_modules/negotiator/README.md +203 -0
  977. package/node_modules/negotiator/index.js +82 -0
  978. package/node_modules/negotiator/lib/charset.js +169 -0
  979. package/node_modules/negotiator/lib/encoding.js +184 -0
  980. package/node_modules/negotiator/lib/language.js +179 -0
  981. package/node_modules/negotiator/lib/mediaType.js +294 -0
  982. package/node_modules/negotiator/package.json +42 -0
  983. package/node_modules/node-fetch/LICENSE.md +22 -0
  984. package/node_modules/node-fetch/README.md +634 -0
  985. package/node_modules/node-fetch/browser.js +25 -0
  986. package/node_modules/node-fetch/lib/index.es.js +1777 -0
  987. package/node_modules/node-fetch/lib/index.js +1787 -0
  988. package/node_modules/node-fetch/lib/index.mjs +1775 -0
  989. package/node_modules/node-fetch/package.json +89 -0
  990. package/node_modules/object-inspect/.eslintrc +53 -0
  991. package/node_modules/object-inspect/.github/FUNDING.yml +12 -0
  992. package/node_modules/object-inspect/.nycrc +13 -0
  993. package/node_modules/object-inspect/CHANGELOG.md +424 -0
  994. package/node_modules/object-inspect/LICENSE +21 -0
  995. package/node_modules/object-inspect/example/all.js +23 -0
  996. package/node_modules/object-inspect/example/circular.js +6 -0
  997. package/node_modules/object-inspect/example/fn.js +5 -0
  998. package/node_modules/object-inspect/example/inspect.js +10 -0
  999. package/node_modules/object-inspect/index.js +544 -0
  1000. package/node_modules/object-inspect/package-support.json +20 -0
  1001. package/node_modules/object-inspect/package.json +105 -0
  1002. package/node_modules/object-inspect/readme.markdown +84 -0
  1003. package/node_modules/object-inspect/test/bigint.js +58 -0
  1004. package/node_modules/object-inspect/test/browser/dom.js +15 -0
  1005. package/node_modules/object-inspect/test/circular.js +16 -0
  1006. package/node_modules/object-inspect/test/deep.js +12 -0
  1007. package/node_modules/object-inspect/test/element.js +53 -0
  1008. package/node_modules/object-inspect/test/err.js +48 -0
  1009. package/node_modules/object-inspect/test/fakes.js +29 -0
  1010. package/node_modules/object-inspect/test/fn.js +76 -0
  1011. package/node_modules/object-inspect/test/global.js +17 -0
  1012. package/node_modules/object-inspect/test/has.js +15 -0
  1013. package/node_modules/object-inspect/test/holes.js +15 -0
  1014. package/node_modules/object-inspect/test/indent-option.js +271 -0
  1015. package/node_modules/object-inspect/test/inspect.js +139 -0
  1016. package/node_modules/object-inspect/test/lowbyte.js +12 -0
  1017. package/node_modules/object-inspect/test/number.js +58 -0
  1018. package/node_modules/object-inspect/test/quoteStyle.js +26 -0
  1019. package/node_modules/object-inspect/test/toStringTag.js +40 -0
  1020. package/node_modules/object-inspect/test/undef.js +12 -0
  1021. package/node_modules/object-inspect/test/values.js +261 -0
  1022. package/node_modules/object-inspect/test-core-js.js +26 -0
  1023. package/node_modules/object-inspect/util.inspect.js +1 -0
  1024. package/node_modules/on-finished/HISTORY.md +98 -0
  1025. package/node_modules/on-finished/LICENSE +23 -0
  1026. package/node_modules/on-finished/README.md +162 -0
  1027. package/node_modules/on-finished/index.js +234 -0
  1028. package/node_modules/on-finished/package.json +39 -0
  1029. package/node_modules/one-time/LICENSE +22 -0
  1030. package/node_modules/one-time/README.md +88 -0
  1031. package/node_modules/one-time/async.js +43 -0
  1032. package/node_modules/one-time/index.js +42 -0
  1033. package/node_modules/one-time/package.json +34 -0
  1034. package/node_modules/parseurl/HISTORY.md +58 -0
  1035. package/node_modules/parseurl/LICENSE +24 -0
  1036. package/node_modules/parseurl/README.md +133 -0
  1037. package/node_modules/parseurl/index.js +158 -0
  1038. package/node_modules/parseurl/package.json +40 -0
  1039. package/node_modules/path-to-regexp/LICENSE +21 -0
  1040. package/node_modules/path-to-regexp/Readme.md +35 -0
  1041. package/node_modules/path-to-regexp/index.js +156 -0
  1042. package/node_modules/path-to-regexp/package.json +30 -0
  1043. package/node_modules/proxy-addr/HISTORY.md +161 -0
  1044. package/node_modules/proxy-addr/LICENSE +22 -0
  1045. package/node_modules/proxy-addr/README.md +139 -0
  1046. package/node_modules/proxy-addr/index.js +327 -0
  1047. package/node_modules/proxy-addr/package.json +47 -0
  1048. package/node_modules/qs/.editorconfig +46 -0
  1049. package/node_modules/qs/.eslintrc +38 -0
  1050. package/node_modules/qs/.github/FUNDING.yml +12 -0
  1051. package/node_modules/qs/.nycrc +13 -0
  1052. package/node_modules/qs/CHANGELOG.md +600 -0
  1053. package/node_modules/qs/LICENSE.md +29 -0
  1054. package/node_modules/qs/README.md +709 -0
  1055. package/node_modules/qs/dist/qs.js +90 -0
  1056. package/node_modules/qs/lib/formats.js +23 -0
  1057. package/node_modules/qs/lib/index.js +11 -0
  1058. package/node_modules/qs/lib/parse.js +296 -0
  1059. package/node_modules/qs/lib/stringify.js +351 -0
  1060. package/node_modules/qs/lib/utils.js +265 -0
  1061. package/node_modules/qs/package.json +91 -0
  1062. package/node_modules/qs/test/empty-keys-cases.js +267 -0
  1063. package/node_modules/qs/test/parse.js +1170 -0
  1064. package/node_modules/qs/test/stringify.js +1298 -0
  1065. package/node_modules/qs/test/utils.js +136 -0
  1066. package/node_modules/range-parser/HISTORY.md +56 -0
  1067. package/node_modules/range-parser/LICENSE +23 -0
  1068. package/node_modules/range-parser/README.md +84 -0
  1069. package/node_modules/range-parser/index.js +162 -0
  1070. package/node_modules/range-parser/package.json +44 -0
  1071. package/node_modules/raw-body/HISTORY.md +308 -0
  1072. package/node_modules/raw-body/LICENSE +22 -0
  1073. package/node_modules/raw-body/README.md +223 -0
  1074. package/node_modules/raw-body/SECURITY.md +24 -0
  1075. package/node_modules/raw-body/index.d.ts +87 -0
  1076. package/node_modules/raw-body/index.js +336 -0
  1077. package/node_modules/raw-body/package.json +49 -0
  1078. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  1079. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  1080. package/node_modules/readable-stream/LICENSE +47 -0
  1081. package/node_modules/readable-stream/README.md +106 -0
  1082. package/node_modules/readable-stream/errors-browser.js +127 -0
  1083. package/node_modules/readable-stream/errors.js +116 -0
  1084. package/node_modules/readable-stream/experimentalWarning.js +17 -0
  1085. package/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
  1086. package/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
  1087. package/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
  1088. package/node_modules/readable-stream/lib/_stream_transform.js +190 -0
  1089. package/node_modules/readable-stream/lib/_stream_writable.js +641 -0
  1090. package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
  1091. package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
  1092. package/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
  1093. package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
  1094. package/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
  1095. package/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
  1096. package/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
  1097. package/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
  1098. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  1099. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  1100. package/node_modules/readable-stream/package.json +68 -0
  1101. package/node_modules/readable-stream/readable-browser.js +9 -0
  1102. package/node_modules/readable-stream/readable.js +16 -0
  1103. package/node_modules/safe-buffer/LICENSE +21 -0
  1104. package/node_modules/safe-buffer/README.md +584 -0
  1105. package/node_modules/safe-buffer/index.d.ts +187 -0
  1106. package/node_modules/safe-buffer/index.js +65 -0
  1107. package/node_modules/safe-buffer/package.json +51 -0
  1108. package/node_modules/safe-stable-stringify/LICENSE +21 -0
  1109. package/node_modules/safe-stable-stringify/esm/package.json +4 -0
  1110. package/node_modules/safe-stable-stringify/esm/wrapper.d.ts +4 -0
  1111. package/node_modules/safe-stable-stringify/esm/wrapper.js +6 -0
  1112. package/node_modules/safe-stable-stringify/index.d.ts +22 -0
  1113. package/node_modules/safe-stable-stringify/index.js +625 -0
  1114. package/node_modules/safe-stable-stringify/package.json +65 -0
  1115. package/node_modules/safe-stable-stringify/readme.md +179 -0
  1116. package/node_modules/safer-buffer/LICENSE +21 -0
  1117. package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
  1118. package/node_modules/safer-buffer/Readme.md +156 -0
  1119. package/node_modules/safer-buffer/dangerous.js +58 -0
  1120. package/node_modules/safer-buffer/package.json +34 -0
  1121. package/node_modules/safer-buffer/safer.js +77 -0
  1122. package/node_modules/safer-buffer/tests.js +406 -0
  1123. package/node_modules/send/HISTORY.md +526 -0
  1124. package/node_modules/send/LICENSE +23 -0
  1125. package/node_modules/send/README.md +327 -0
  1126. package/node_modules/send/SECURITY.md +24 -0
  1127. package/node_modules/send/index.js +1142 -0
  1128. package/node_modules/send/node_modules/encodeurl/HISTORY.md +14 -0
  1129. package/node_modules/send/node_modules/encodeurl/LICENSE +22 -0
  1130. package/node_modules/send/node_modules/encodeurl/README.md +128 -0
  1131. package/node_modules/send/node_modules/encodeurl/index.js +60 -0
  1132. package/node_modules/send/node_modules/encodeurl/package.json +40 -0
  1133. package/node_modules/send/package.json +62 -0
  1134. package/node_modules/serve-static/HISTORY.md +487 -0
  1135. package/node_modules/serve-static/LICENSE +25 -0
  1136. package/node_modules/serve-static/README.md +257 -0
  1137. package/node_modules/serve-static/index.js +209 -0
  1138. package/node_modules/serve-static/package.json +42 -0
  1139. package/node_modules/setprototypeof/LICENSE +13 -0
  1140. package/node_modules/setprototypeof/README.md +31 -0
  1141. package/node_modules/setprototypeof/index.d.ts +2 -0
  1142. package/node_modules/setprototypeof/index.js +17 -0
  1143. package/node_modules/setprototypeof/package.json +38 -0
  1144. package/node_modules/setprototypeof/test/index.js +24 -0
  1145. package/node_modules/side-channel/.editorconfig +9 -0
  1146. package/node_modules/side-channel/.eslintrc +12 -0
  1147. package/node_modules/side-channel/.github/FUNDING.yml +12 -0
  1148. package/node_modules/side-channel/.nycrc +13 -0
  1149. package/node_modules/side-channel/CHANGELOG.md +110 -0
  1150. package/node_modules/side-channel/LICENSE +21 -0
  1151. package/node_modules/side-channel/README.md +61 -0
  1152. package/node_modules/side-channel/index.d.ts +14 -0
  1153. package/node_modules/side-channel/index.js +43 -0
  1154. package/node_modules/side-channel/package.json +85 -0
  1155. package/node_modules/side-channel/test/index.js +104 -0
  1156. package/node_modules/side-channel/tsconfig.json +9 -0
  1157. package/node_modules/side-channel-list/.editorconfig +9 -0
  1158. package/node_modules/side-channel-list/.eslintrc +11 -0
  1159. package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
  1160. package/node_modules/side-channel-list/.nycrc +13 -0
  1161. package/node_modules/side-channel-list/CHANGELOG.md +15 -0
  1162. package/node_modules/side-channel-list/LICENSE +21 -0
  1163. package/node_modules/side-channel-list/README.md +62 -0
  1164. package/node_modules/side-channel-list/index.d.ts +13 -0
  1165. package/node_modules/side-channel-list/index.js +113 -0
  1166. package/node_modules/side-channel-list/list.d.ts +14 -0
  1167. package/node_modules/side-channel-list/package.json +77 -0
  1168. package/node_modules/side-channel-list/test/index.js +104 -0
  1169. package/node_modules/side-channel-list/tsconfig.json +9 -0
  1170. package/node_modules/side-channel-map/.editorconfig +9 -0
  1171. package/node_modules/side-channel-map/.eslintrc +11 -0
  1172. package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
  1173. package/node_modules/side-channel-map/.nycrc +13 -0
  1174. package/node_modules/side-channel-map/CHANGELOG.md +22 -0
  1175. package/node_modules/side-channel-map/LICENSE +21 -0
  1176. package/node_modules/side-channel-map/README.md +62 -0
  1177. package/node_modules/side-channel-map/index.d.ts +15 -0
  1178. package/node_modules/side-channel-map/index.js +68 -0
  1179. package/node_modules/side-channel-map/package.json +80 -0
  1180. package/node_modules/side-channel-map/test/index.js +114 -0
  1181. package/node_modules/side-channel-map/tsconfig.json +9 -0
  1182. package/node_modules/side-channel-weakmap/.editorconfig +9 -0
  1183. package/node_modules/side-channel-weakmap/.eslintrc +12 -0
  1184. package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
  1185. package/node_modules/side-channel-weakmap/.nycrc +13 -0
  1186. package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
  1187. package/node_modules/side-channel-weakmap/LICENSE +21 -0
  1188. package/node_modules/side-channel-weakmap/README.md +62 -0
  1189. package/node_modules/side-channel-weakmap/index.d.ts +15 -0
  1190. package/node_modules/side-channel-weakmap/index.js +84 -0
  1191. package/node_modules/side-channel-weakmap/package.json +87 -0
  1192. package/node_modules/side-channel-weakmap/test/index.js +114 -0
  1193. package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
  1194. package/node_modules/stack-trace/.npmignore +1 -0
  1195. package/node_modules/stack-trace/License +19 -0
  1196. package/node_modules/stack-trace/Makefile +11 -0
  1197. package/node_modules/stack-trace/Readme.md +98 -0
  1198. package/node_modules/stack-trace/lib/stack-trace.js +136 -0
  1199. package/node_modules/stack-trace/package.json +21 -0
  1200. package/node_modules/statuses/HISTORY.md +82 -0
  1201. package/node_modules/statuses/LICENSE +23 -0
  1202. package/node_modules/statuses/README.md +136 -0
  1203. package/node_modules/statuses/codes.json +65 -0
  1204. package/node_modules/statuses/index.js +146 -0
  1205. package/node_modules/statuses/package.json +49 -0
  1206. package/node_modules/string_decoder/LICENSE +48 -0
  1207. package/node_modules/string_decoder/README.md +47 -0
  1208. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  1209. package/node_modules/string_decoder/package.json +34 -0
  1210. package/node_modules/text-hex/LICENSE +21 -0
  1211. package/node_modules/text-hex/README.md +20 -0
  1212. package/node_modules/text-hex/index.js +24 -0
  1213. package/node_modules/text-hex/package.json +30 -0
  1214. package/node_modules/text-hex/test.js +11 -0
  1215. package/node_modules/toidentifier/HISTORY.md +9 -0
  1216. package/node_modules/toidentifier/LICENSE +21 -0
  1217. package/node_modules/toidentifier/README.md +61 -0
  1218. package/node_modules/toidentifier/index.js +32 -0
  1219. package/node_modules/toidentifier/package.json +38 -0
  1220. package/node_modules/tr46/.npmignore +4 -0
  1221. package/node_modules/tr46/index.js +193 -0
  1222. package/node_modules/tr46/lib/.gitkeep +0 -0
  1223. package/node_modules/tr46/lib/mappingTable.json +1 -0
  1224. package/node_modules/tr46/package.json +31 -0
  1225. package/node_modules/triple-beam/.nyc_output/c579bf8f-6820-47a5-b2da-a11267eb8435.json +1 -0
  1226. package/node_modules/triple-beam/.nyc_output/processinfo/c579bf8f-6820-47a5-b2da-a11267eb8435.json +1 -0
  1227. package/node_modules/triple-beam/.nyc_output/processinfo/index.json +1 -0
  1228. package/node_modules/triple-beam/CHANGELOG.md +22 -0
  1229. package/node_modules/triple-beam/LICENSE +21 -0
  1230. package/node_modules/triple-beam/README.md +34 -0
  1231. package/node_modules/triple-beam/config/cli.js +42 -0
  1232. package/node_modules/triple-beam/config/index.js +32 -0
  1233. package/node_modules/triple-beam/config/npm.js +36 -0
  1234. package/node_modules/triple-beam/config/syslog.js +38 -0
  1235. package/node_modules/triple-beam/index.js +46 -0
  1236. package/node_modules/triple-beam/package.json +40 -0
  1237. package/node_modules/type-is/HISTORY.md +259 -0
  1238. package/node_modules/type-is/LICENSE +23 -0
  1239. package/node_modules/type-is/README.md +170 -0
  1240. package/node_modules/type-is/index.js +266 -0
  1241. package/node_modules/type-is/package.json +45 -0
  1242. package/node_modules/undici-types/LICENSE +21 -0
  1243. package/node_modules/undici-types/README.md +6 -0
  1244. package/node_modules/undici-types/agent.d.ts +32 -0
  1245. package/node_modules/undici-types/api.d.ts +43 -0
  1246. package/node_modules/undici-types/balanced-pool.d.ts +30 -0
  1247. package/node_modules/undici-types/cache-interceptor.d.ts +173 -0
  1248. package/node_modules/undici-types/cache.d.ts +36 -0
  1249. package/node_modules/undici-types/client-stats.d.ts +15 -0
  1250. package/node_modules/undici-types/client.d.ts +108 -0
  1251. package/node_modules/undici-types/connector.d.ts +34 -0
  1252. package/node_modules/undici-types/content-type.d.ts +21 -0
  1253. package/node_modules/undici-types/cookies.d.ts +30 -0
  1254. package/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
  1255. package/node_modules/undici-types/dispatcher.d.ts +276 -0
  1256. package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
  1257. package/node_modules/undici-types/errors.d.ts +161 -0
  1258. package/node_modules/undici-types/eventsource.d.ts +66 -0
  1259. package/node_modules/undici-types/fetch.d.ts +211 -0
  1260. package/node_modules/undici-types/formdata.d.ts +108 -0
  1261. package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
  1262. package/node_modules/undici-types/global-origin.d.ts +7 -0
  1263. package/node_modules/undici-types/h2c-client.d.ts +73 -0
  1264. package/node_modules/undici-types/handlers.d.ts +15 -0
  1265. package/node_modules/undici-types/header.d.ts +160 -0
  1266. package/node_modules/undici-types/index.d.ts +88 -0
  1267. package/node_modules/undici-types/interceptors.d.ts +73 -0
  1268. package/node_modules/undici-types/mock-agent.d.ts +68 -0
  1269. package/node_modules/undici-types/mock-call-history.d.ts +111 -0
  1270. package/node_modules/undici-types/mock-client.d.ts +27 -0
  1271. package/node_modules/undici-types/mock-errors.d.ts +12 -0
  1272. package/node_modules/undici-types/mock-interceptor.d.ts +94 -0
  1273. package/node_modules/undici-types/mock-pool.d.ts +27 -0
  1274. package/node_modules/undici-types/package.json +55 -0
  1275. package/node_modules/undici-types/patch.d.ts +29 -0
  1276. package/node_modules/undici-types/pool-stats.d.ts +19 -0
  1277. package/node_modules/undici-types/pool.d.ts +41 -0
  1278. package/node_modules/undici-types/proxy-agent.d.ts +29 -0
  1279. package/node_modules/undici-types/readable.d.ts +68 -0
  1280. package/node_modules/undici-types/retry-agent.d.ts +8 -0
  1281. package/node_modules/undici-types/retry-handler.d.ts +125 -0
  1282. package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
  1283. package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
  1284. package/node_modules/undici-types/util.d.ts +18 -0
  1285. package/node_modules/undici-types/utility.d.ts +7 -0
  1286. package/node_modules/undici-types/webidl.d.ts +341 -0
  1287. package/node_modules/undici-types/websocket.d.ts +186 -0
  1288. package/node_modules/universalify/LICENSE +20 -0
  1289. package/node_modules/universalify/README.md +76 -0
  1290. package/node_modules/universalify/index.js +24 -0
  1291. package/node_modules/universalify/package.json +34 -0
  1292. package/node_modules/unpipe/HISTORY.md +4 -0
  1293. package/node_modules/unpipe/LICENSE +22 -0
  1294. package/node_modules/unpipe/README.md +43 -0
  1295. package/node_modules/unpipe/index.js +69 -0
  1296. package/node_modules/unpipe/package.json +27 -0
  1297. package/node_modules/util-deprecate/History.md +16 -0
  1298. package/node_modules/util-deprecate/LICENSE +24 -0
  1299. package/node_modules/util-deprecate/README.md +53 -0
  1300. package/node_modules/util-deprecate/browser.js +67 -0
  1301. package/node_modules/util-deprecate/node.js +6 -0
  1302. package/node_modules/util-deprecate/package.json +27 -0
  1303. package/node_modules/utils-merge/.npmignore +9 -0
  1304. package/node_modules/utils-merge/LICENSE +20 -0
  1305. package/node_modules/utils-merge/README.md +34 -0
  1306. package/node_modules/utils-merge/index.js +23 -0
  1307. package/node_modules/utils-merge/package.json +40 -0
  1308. package/node_modules/vary/HISTORY.md +39 -0
  1309. package/node_modules/vary/LICENSE +22 -0
  1310. package/node_modules/vary/README.md +101 -0
  1311. package/node_modules/vary/index.js +149 -0
  1312. package/node_modules/vary/package.json +43 -0
  1313. package/node_modules/webidl-conversions/LICENSE.md +12 -0
  1314. package/node_modules/webidl-conversions/README.md +53 -0
  1315. package/node_modules/webidl-conversions/lib/index.js +189 -0
  1316. package/node_modules/webidl-conversions/package.json +23 -0
  1317. package/node_modules/whatwg-url/LICENSE.txt +21 -0
  1318. package/node_modules/whatwg-url/README.md +67 -0
  1319. package/node_modules/whatwg-url/lib/URL-impl.js +200 -0
  1320. package/node_modules/whatwg-url/lib/URL.js +196 -0
  1321. package/node_modules/whatwg-url/lib/public-api.js +11 -0
  1322. package/node_modules/whatwg-url/lib/url-state-machine.js +1297 -0
  1323. package/node_modules/whatwg-url/lib/utils.js +20 -0
  1324. package/node_modules/whatwg-url/package.json +32 -0
  1325. package/node_modules/winston/LICENSE +19 -0
  1326. package/node_modules/winston/README.md +1273 -0
  1327. package/node_modules/winston/dist/winston/common.js +44 -0
  1328. package/node_modules/winston/dist/winston/config/index.js +36 -0
  1329. package/node_modules/winston/dist/winston/container.js +141 -0
  1330. package/node_modules/winston/dist/winston/create-logger.js +123 -0
  1331. package/node_modules/winston/dist/winston/exception-handler.js +265 -0
  1332. package/node_modules/winston/dist/winston/exception-stream.js +75 -0
  1333. package/node_modules/winston/dist/winston/logger.js +697 -0
  1334. package/node_modules/winston/dist/winston/profiler.js +64 -0
  1335. package/node_modules/winston/dist/winston/rejection-handler.js +265 -0
  1336. package/node_modules/winston/dist/winston/rejection-stream.js +72 -0
  1337. package/node_modules/winston/dist/winston/tail-file.js +113 -0
  1338. package/node_modules/winston/dist/winston/transports/console.js +143 -0
  1339. package/node_modules/winston/dist/winston/transports/file.js +825 -0
  1340. package/node_modules/winston/dist/winston/transports/http.js +288 -0
  1341. package/node_modules/winston/dist/winston/transports/index.js +56 -0
  1342. package/node_modules/winston/dist/winston/transports/stream.js +86 -0
  1343. package/node_modules/winston/dist/winston.js +171 -0
  1344. package/node_modules/winston/index.d.ts +208 -0
  1345. package/node_modules/winston/lib/winston/common.js +46 -0
  1346. package/node_modules/winston/lib/winston/config/index.d.ts +99 -0
  1347. package/node_modules/winston/lib/winston/config/index.js +35 -0
  1348. package/node_modules/winston/lib/winston/container.js +118 -0
  1349. package/node_modules/winston/lib/winston/create-logger.js +104 -0
  1350. package/node_modules/winston/lib/winston/exception-handler.js +245 -0
  1351. package/node_modules/winston/lib/winston/exception-stream.js +54 -0
  1352. package/node_modules/winston/lib/winston/logger.js +700 -0
  1353. package/node_modules/winston/lib/winston/profiler.js +53 -0
  1354. package/node_modules/winston/lib/winston/rejection-handler.js +251 -0
  1355. package/node_modules/winston/lib/winston/rejection-stream.js +52 -0
  1356. package/node_modules/winston/lib/winston/tail-file.js +124 -0
  1357. package/node_modules/winston/lib/winston/transports/console.js +125 -0
  1358. package/node_modules/winston/lib/winston/transports/file.js +795 -0
  1359. package/node_modules/winston/lib/winston/transports/http.js +262 -0
  1360. package/node_modules/winston/lib/winston/transports/index.d.ts +117 -0
  1361. package/node_modules/winston/lib/winston/transports/index.js +56 -0
  1362. package/node_modules/winston/lib/winston/transports/stream.js +63 -0
  1363. package/node_modules/winston/lib/winston.js +191 -0
  1364. package/node_modules/winston/package.json +74 -0
  1365. package/node_modules/winston-transport/.babelrc +3 -0
  1366. package/node_modules/winston-transport/.eslintrc +7 -0
  1367. package/node_modules/winston-transport/.gitattributes +1 -0
  1368. package/node_modules/winston-transport/.nyc_output/68e78020-c804-4f37-a68a-a967c6380da9.json +1 -0
  1369. package/node_modules/winston-transport/.nyc_output/processinfo/68e78020-c804-4f37-a68a-a967c6380da9.json +1 -0
  1370. package/node_modules/winston-transport/.nyc_output/processinfo/index.json +1 -0
  1371. package/node_modules/winston-transport/CHANGELOG.md +126 -0
  1372. package/node_modules/winston-transport/LICENSE +22 -0
  1373. package/node_modules/winston-transport/README.md +50 -0
  1374. package/node_modules/winston-transport/dist/index.js +8 -0
  1375. package/node_modules/winston-transport/dist/legacy.js +116 -0
  1376. package/node_modules/winston-transport/dist/modern.js +212 -0
  1377. package/node_modules/winston-transport/index.d.ts +39 -0
  1378. package/node_modules/winston-transport/index.js +7 -0
  1379. package/node_modules/winston-transport/legacy.js +119 -0
  1380. package/node_modules/winston-transport/modern.js +211 -0
  1381. package/node_modules/winston-transport/package.json +52 -0
  1382. package/node_modules/yn/index.d.ts +57 -0
  1383. package/node_modules/yn/index.js +29 -0
  1384. package/node_modules/yn/lenient.js +105 -0
  1385. package/node_modules/yn/license +9 -0
  1386. package/node_modules/yn/package.json +42 -0
  1387. package/node_modules/yn/readme.md +78 -0
  1388. package/package.json +46 -0
@@ -0,0 +1,2167 @@
1
+ /**
2
+ * To use the HTTP server and client one must import the `node:http` module.
3
+ *
4
+ * The HTTP interfaces in Node.js are designed to support many features
5
+ * of the protocol which have been traditionally difficult to use.
6
+ * In particular, large, possibly chunk-encoded, messages. The interface is
7
+ * careful to never buffer entire requests or responses, so the
8
+ * user is able to stream data.
9
+ *
10
+ * HTTP message headers are represented by an object like this:
11
+ *
12
+ * ```json
13
+ * { "content-length": "123",
14
+ * "content-type": "text/plain",
15
+ * "connection": "keep-alive",
16
+ * "host": "example.com",
17
+ * "accept": "*" }
18
+ * ```
19
+ *
20
+ * Keys are lowercased. Values are not modified.
21
+ *
22
+ * In order to support the full spectrum of possible HTTP applications, the Node.js
23
+ * HTTP API is very low-level. It deals with stream handling and message
24
+ * parsing only. It parses a message into headers and body but it does not
25
+ * parse the actual headers or the body.
26
+ *
27
+ * See `message.headers` for details on how duplicate headers are handled.
28
+ *
29
+ * The raw headers as they were received are retained in the `rawHeaders` property, which is an array of `[key, value, key2, value2, ...]`. For
30
+ * example, the previous message header object might have a `rawHeaders` list like the following:
31
+ *
32
+ * ```js
33
+ * [ 'ConTent-Length', '123456',
34
+ * 'content-LENGTH', '123',
35
+ * 'content-type', 'text/plain',
36
+ * 'CONNECTION', 'keep-alive',
37
+ * 'Host', 'example.com',
38
+ * 'accepT', '*' ]
39
+ * ```
40
+ * @see [source](https://github.com/nodejs/node/blob/v25.x/lib/http.js)
41
+ */
42
+ declare module "node:http" {
43
+ import { NonSharedBuffer } from "node:buffer";
44
+ import { LookupOptions } from "node:dns";
45
+ import { EventEmitter } from "node:events";
46
+ import * as net from "node:net";
47
+ import * as stream from "node:stream";
48
+ import { URL } from "node:url";
49
+ // incoming headers will never contain number
50
+ interface IncomingHttpHeaders extends NodeJS.Dict<string | string[]> {
51
+ accept?: string | undefined;
52
+ "accept-encoding"?: string | undefined;
53
+ "accept-language"?: string | undefined;
54
+ "accept-patch"?: string | undefined;
55
+ "accept-ranges"?: string | undefined;
56
+ "access-control-allow-credentials"?: string | undefined;
57
+ "access-control-allow-headers"?: string | undefined;
58
+ "access-control-allow-methods"?: string | undefined;
59
+ "access-control-allow-origin"?: string | undefined;
60
+ "access-control-expose-headers"?: string | undefined;
61
+ "access-control-max-age"?: string | undefined;
62
+ "access-control-request-headers"?: string | undefined;
63
+ "access-control-request-method"?: string | undefined;
64
+ age?: string | undefined;
65
+ allow?: string | undefined;
66
+ "alt-svc"?: string | undefined;
67
+ authorization?: string | undefined;
68
+ "cache-control"?: string | undefined;
69
+ connection?: string | undefined;
70
+ "content-disposition"?: string | undefined;
71
+ "content-encoding"?: string | undefined;
72
+ "content-language"?: string | undefined;
73
+ "content-length"?: string | undefined;
74
+ "content-location"?: string | undefined;
75
+ "content-range"?: string | undefined;
76
+ "content-type"?: string | undefined;
77
+ cookie?: string | undefined;
78
+ date?: string | undefined;
79
+ etag?: string | undefined;
80
+ expect?: string | undefined;
81
+ expires?: string | undefined;
82
+ forwarded?: string | undefined;
83
+ from?: string | undefined;
84
+ host?: string | undefined;
85
+ "if-match"?: string | undefined;
86
+ "if-modified-since"?: string | undefined;
87
+ "if-none-match"?: string | undefined;
88
+ "if-unmodified-since"?: string | undefined;
89
+ "last-modified"?: string | undefined;
90
+ location?: string | undefined;
91
+ origin?: string | undefined;
92
+ pragma?: string | undefined;
93
+ "proxy-authenticate"?: string | undefined;
94
+ "proxy-authorization"?: string | undefined;
95
+ "public-key-pins"?: string | undefined;
96
+ range?: string | undefined;
97
+ referer?: string | undefined;
98
+ "retry-after"?: string | undefined;
99
+ "sec-fetch-site"?: string | undefined;
100
+ "sec-fetch-mode"?: string | undefined;
101
+ "sec-fetch-user"?: string | undefined;
102
+ "sec-fetch-dest"?: string | undefined;
103
+ "sec-websocket-accept"?: string | undefined;
104
+ "sec-websocket-extensions"?: string | undefined;
105
+ "sec-websocket-key"?: string | undefined;
106
+ "sec-websocket-protocol"?: string | undefined;
107
+ "sec-websocket-version"?: string | undefined;
108
+ "set-cookie"?: string[] | undefined;
109
+ "strict-transport-security"?: string | undefined;
110
+ tk?: string | undefined;
111
+ trailer?: string | undefined;
112
+ "transfer-encoding"?: string | undefined;
113
+ upgrade?: string | undefined;
114
+ "user-agent"?: string | undefined;
115
+ vary?: string | undefined;
116
+ via?: string | undefined;
117
+ warning?: string | undefined;
118
+ "www-authenticate"?: string | undefined;
119
+ }
120
+ // outgoing headers allows numbers (as they are converted internally to strings)
121
+ type OutgoingHttpHeader = number | string | string[];
122
+ interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
123
+ accept?: string | string[] | undefined;
124
+ "accept-charset"?: string | string[] | undefined;
125
+ "accept-encoding"?: string | string[] | undefined;
126
+ "accept-language"?: string | string[] | undefined;
127
+ "accept-ranges"?: string | undefined;
128
+ "access-control-allow-credentials"?: string | undefined;
129
+ "access-control-allow-headers"?: string | undefined;
130
+ "access-control-allow-methods"?: string | undefined;
131
+ "access-control-allow-origin"?: string | undefined;
132
+ "access-control-expose-headers"?: string | undefined;
133
+ "access-control-max-age"?: string | undefined;
134
+ "access-control-request-headers"?: string | undefined;
135
+ "access-control-request-method"?: string | undefined;
136
+ age?: string | undefined;
137
+ allow?: string | undefined;
138
+ authorization?: string | undefined;
139
+ "cache-control"?: string | undefined;
140
+ "cdn-cache-control"?: string | undefined;
141
+ connection?: string | string[] | undefined;
142
+ "content-disposition"?: string | undefined;
143
+ "content-encoding"?: string | undefined;
144
+ "content-language"?: string | undefined;
145
+ "content-length"?: string | number | undefined;
146
+ "content-location"?: string | undefined;
147
+ "content-range"?: string | undefined;
148
+ "content-security-policy"?: string | undefined;
149
+ "content-security-policy-report-only"?: string | undefined;
150
+ "content-type"?: string | undefined;
151
+ cookie?: string | string[] | undefined;
152
+ dav?: string | string[] | undefined;
153
+ dnt?: string | undefined;
154
+ date?: string | undefined;
155
+ etag?: string | undefined;
156
+ expect?: string | undefined;
157
+ expires?: string | undefined;
158
+ forwarded?: string | undefined;
159
+ from?: string | undefined;
160
+ host?: string | undefined;
161
+ "if-match"?: string | undefined;
162
+ "if-modified-since"?: string | undefined;
163
+ "if-none-match"?: string | undefined;
164
+ "if-range"?: string | undefined;
165
+ "if-unmodified-since"?: string | undefined;
166
+ "last-modified"?: string | undefined;
167
+ link?: string | string[] | undefined;
168
+ location?: string | undefined;
169
+ "max-forwards"?: string | undefined;
170
+ origin?: string | undefined;
171
+ pragma?: string | string[] | undefined;
172
+ "proxy-authenticate"?: string | string[] | undefined;
173
+ "proxy-authorization"?: string | undefined;
174
+ "public-key-pins"?: string | undefined;
175
+ "public-key-pins-report-only"?: string | undefined;
176
+ range?: string | undefined;
177
+ referer?: string | undefined;
178
+ "referrer-policy"?: string | undefined;
179
+ refresh?: string | undefined;
180
+ "retry-after"?: string | undefined;
181
+ "sec-websocket-accept"?: string | undefined;
182
+ "sec-websocket-extensions"?: string | string[] | undefined;
183
+ "sec-websocket-key"?: string | undefined;
184
+ "sec-websocket-protocol"?: string | string[] | undefined;
185
+ "sec-websocket-version"?: string | undefined;
186
+ server?: string | undefined;
187
+ "set-cookie"?: string | string[] | undefined;
188
+ "strict-transport-security"?: string | undefined;
189
+ te?: string | undefined;
190
+ trailer?: string | undefined;
191
+ "transfer-encoding"?: string | undefined;
192
+ "user-agent"?: string | undefined;
193
+ upgrade?: string | undefined;
194
+ "upgrade-insecure-requests"?: string | undefined;
195
+ vary?: string | undefined;
196
+ via?: string | string[] | undefined;
197
+ warning?: string | undefined;
198
+ "www-authenticate"?: string | string[] | undefined;
199
+ "x-content-type-options"?: string | undefined;
200
+ "x-dns-prefetch-control"?: string | undefined;
201
+ "x-frame-options"?: string | undefined;
202
+ "x-xss-protection"?: string | undefined;
203
+ }
204
+ interface ClientRequestArgs extends Pick<LookupOptions, "hints"> {
205
+ _defaultAgent?: Agent | undefined;
206
+ agent?: Agent | boolean | undefined;
207
+ auth?: string | null | undefined;
208
+ createConnection?:
209
+ | ((
210
+ options: ClientRequestArgs,
211
+ oncreate: (err: Error | null, socket: stream.Duplex) => void,
212
+ ) => stream.Duplex | null | undefined)
213
+ | undefined;
214
+ defaultPort?: number | string | undefined;
215
+ family?: number | undefined;
216
+ headers?: OutgoingHttpHeaders | readonly string[] | undefined;
217
+ host?: string | null | undefined;
218
+ hostname?: string | null | undefined;
219
+ insecureHTTPParser?: boolean | undefined;
220
+ localAddress?: string | undefined;
221
+ localPort?: number | undefined;
222
+ lookup?: net.LookupFunction | undefined;
223
+ /**
224
+ * @default 16384
225
+ */
226
+ maxHeaderSize?: number | undefined;
227
+ method?: string | undefined;
228
+ path?: string | null | undefined;
229
+ port?: number | string | null | undefined;
230
+ protocol?: string | null | undefined;
231
+ setDefaultHeaders?: boolean | undefined;
232
+ setHost?: boolean | undefined;
233
+ signal?: AbortSignal | undefined;
234
+ socketPath?: string | undefined;
235
+ timeout?: number | undefined;
236
+ uniqueHeaders?: Array<string | string[]> | undefined;
237
+ joinDuplicateHeaders?: boolean | undefined;
238
+ }
239
+ interface ServerOptions<
240
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
241
+ Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
242
+ > {
243
+ /**
244
+ * Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`.
245
+ */
246
+ IncomingMessage?: Request | undefined;
247
+ /**
248
+ * Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`.
249
+ */
250
+ ServerResponse?: Response | undefined;
251
+ /**
252
+ * Sets the timeout value in milliseconds for receiving the entire request from the client.
253
+ * @see Server.requestTimeout for more information.
254
+ * @default 300000
255
+ * @since v18.0.0
256
+ */
257
+ requestTimeout?: number | undefined;
258
+ /**
259
+ * It joins the field line values of multiple headers in a request with `, ` instead of discarding the duplicates.
260
+ * @default false
261
+ * @since v18.14.0
262
+ */
263
+ joinDuplicateHeaders?: boolean | undefined;
264
+ /**
265
+ * The number of milliseconds of inactivity a server needs to wait for additional incoming data,
266
+ * after it has finished writing the last response, before a socket will be destroyed.
267
+ * @see Server.keepAliveTimeout for more information.
268
+ * @default 5000
269
+ * @since v18.0.0
270
+ */
271
+ keepAliveTimeout?: number | undefined;
272
+ /**
273
+ * An additional buffer time added to the
274
+ * `server.keepAliveTimeout` to extend the internal socket timeout.
275
+ * @since 24.6.0
276
+ * @default 1000
277
+ */
278
+ keepAliveTimeoutBuffer?: number | undefined;
279
+ /**
280
+ * Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.
281
+ * @default 30000
282
+ */
283
+ connectionsCheckingInterval?: number | undefined;
284
+ /**
285
+ * Sets the timeout value in milliseconds for receiving the complete HTTP headers from the client.
286
+ * See {@link Server.headersTimeout} for more information.
287
+ * @default 60000
288
+ * @since 18.0.0
289
+ */
290
+ headersTimeout?: number | undefined;
291
+ /**
292
+ * Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`.
293
+ * This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`.
294
+ * Default: @see stream.getDefaultHighWaterMark().
295
+ * @since v20.1.0
296
+ */
297
+ highWaterMark?: number | undefined;
298
+ /**
299
+ * Use an insecure HTTP parser that accepts invalid HTTP headers when `true`.
300
+ * Using the insecure parser should be avoided.
301
+ * See --insecure-http-parser for more information.
302
+ * @default false
303
+ */
304
+ insecureHTTPParser?: boolean | undefined;
305
+ /**
306
+ * Optionally overrides the value of `--max-http-header-size` for requests received by
307
+ * this server, i.e. the maximum length of request headers in bytes.
308
+ * @default 16384
309
+ * @since v13.3.0
310
+ */
311
+ maxHeaderSize?: number | undefined;
312
+ /**
313
+ * If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.
314
+ * @default true
315
+ * @since v16.5.0
316
+ */
317
+ noDelay?: boolean | undefined;
318
+ /**
319
+ * If set to `true`, it forces the server to respond with a 400 (Bad Request) status code
320
+ * to any HTTP/1.1 request message that lacks a Host header (as mandated by the specification).
321
+ * @default true
322
+ * @since 20.0.0
323
+ */
324
+ requireHostHeader?: boolean | undefined;
325
+ /**
326
+ * If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received,
327
+ * similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.
328
+ * @default false
329
+ * @since v16.5.0
330
+ */
331
+ keepAlive?: boolean | undefined;
332
+ /**
333
+ * If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.
334
+ * @default 0
335
+ * @since v16.5.0
336
+ */
337
+ keepAliveInitialDelay?: number | undefined;
338
+ /**
339
+ * A list of response headers that should be sent only once.
340
+ * If the header's value is an array, the items will be joined using `; `.
341
+ */
342
+ uniqueHeaders?: Array<string | string[]> | undefined;
343
+ /**
344
+ * A callback which receives an
345
+ * incoming request and returns a boolean, to control which upgrade attempts
346
+ * should be accepted. Accepted upgrades will fire an `'upgrade'` event (or
347
+ * their sockets will be destroyed, if no listener is registered) while
348
+ * rejected upgrades will fire a `'request'` event like any non-upgrade
349
+ * request.
350
+ * @since v24.9.0
351
+ * @default () => server.listenerCount('upgrade') > 0
352
+ */
353
+ shouldUpgradeCallback?: ((request: InstanceType<Request>) => boolean) | undefined;
354
+ /**
355
+ * If set to `true`, an error is thrown when writing to an HTTP response which does not have a body.
356
+ * @default false
357
+ * @since v18.17.0, v20.2.0
358
+ */
359
+ rejectNonStandardBodyWrites?: boolean | undefined;
360
+ /**
361
+ * If set to `true`, requests without `Content-Length`
362
+ * or `Transfer-Encoding` headers (indicating no body) will be initialized with an
363
+ * already-ended body stream, so they will never emit any stream events
364
+ * (like `'data'` or `'end'`). You can use `req.readableEnded` to detect this case.
365
+ * @since v25.1.0
366
+ * @default false
367
+ */
368
+ optimizeEmptyRequests?: boolean | undefined;
369
+ }
370
+ type RequestListener<
371
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
372
+ Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
373
+ > = (request: InstanceType<Request>, response: InstanceType<Response> & { req: InstanceType<Request> }) => void;
374
+ interface ServerEventMap<
375
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
376
+ Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
377
+ > extends net.ServerEventMap {
378
+ "checkContinue": Parameters<RequestListener<Request, Response>>;
379
+ "checkExpectation": Parameters<RequestListener<Request, Response>>;
380
+ "clientError": [exception: Error, socket: stream.Duplex];
381
+ "connect": [request: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer];
382
+ "connection": [socket: net.Socket];
383
+ "dropRequest": [request: InstanceType<Request>, socket: stream.Duplex];
384
+ "request": Parameters<RequestListener<Request, Response>>;
385
+ "upgrade": [req: InstanceType<Request>, socket: stream.Duplex, head: NonSharedBuffer];
386
+ }
387
+ /**
388
+ * @since v0.1.17
389
+ */
390
+ class Server<
391
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
392
+ Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
393
+ > extends net.Server {
394
+ constructor(requestListener?: RequestListener<Request, Response>);
395
+ constructor(options: ServerOptions<Request, Response>, requestListener?: RequestListener<Request, Response>);
396
+ /**
397
+ * Sets the timeout value for sockets, and emits a `'timeout'` event on
398
+ * the Server object, passing the socket as an argument, if a timeout
399
+ * occurs.
400
+ *
401
+ * If there is a `'timeout'` event listener on the Server object, then it
402
+ * will be called with the timed-out socket as an argument.
403
+ *
404
+ * By default, the Server does not timeout sockets. However, if a callback
405
+ * is assigned to the Server's `'timeout'` event, timeouts must be handled
406
+ * explicitly.
407
+ * @since v0.9.12
408
+ * @param [msecs=0 (no timeout)]
409
+ */
410
+ setTimeout(msecs?: number, callback?: (socket: net.Socket) => void): this;
411
+ setTimeout(callback: (socket: net.Socket) => void): this;
412
+ /**
413
+ * Limits maximum incoming headers count. If set to 0, no limit will be applied.
414
+ * @since v0.7.0
415
+ */
416
+ maxHeadersCount: number | null;
417
+ /**
418
+ * The maximum number of requests socket can handle
419
+ * before closing keep alive connection.
420
+ *
421
+ * A value of `0` will disable the limit.
422
+ *
423
+ * When the limit is reached it will set the `Connection` header value to `close`,
424
+ * but will not actually close the connection, subsequent requests sent
425
+ * after the limit is reached will get `503 Service Unavailable` as a response.
426
+ * @since v16.10.0
427
+ */
428
+ maxRequestsPerSocket: number | null;
429
+ /**
430
+ * The number of milliseconds of inactivity before a socket is presumed
431
+ * to have timed out.
432
+ *
433
+ * A value of `0` will disable the timeout behavior on incoming connections.
434
+ *
435
+ * The socket timeout logic is set up on connection, so changing this
436
+ * value only affects new connections to the server, not any existing connections.
437
+ * @since v0.9.12
438
+ */
439
+ timeout: number;
440
+ /**
441
+ * Limit the amount of time the parser will wait to receive the complete HTTP
442
+ * headers.
443
+ *
444
+ * If the timeout expires, the server responds with status 408 without
445
+ * forwarding the request to the request listener and then closes the connection.
446
+ *
447
+ * It must be set to a non-zero value (e.g. 120 seconds) to protect against
448
+ * potential Denial-of-Service attacks in case the server is deployed without a
449
+ * reverse proxy in front.
450
+ * @since v11.3.0, v10.14.0
451
+ */
452
+ headersTimeout: number;
453
+ /**
454
+ * The number of milliseconds of inactivity a server needs to wait for additional
455
+ * incoming data, after it has finished writing the last response, before a socket
456
+ * will be destroyed.
457
+ *
458
+ * This timeout value is combined with the
459
+ * `server.keepAliveTimeoutBuffer` option to determine the actual socket
460
+ * timeout, calculated as:
461
+ * socketTimeout = keepAliveTimeout + keepAliveTimeoutBuffer
462
+ * If the server receives new data before the keep-alive timeout has fired, it
463
+ * will reset the regular inactivity timeout, i.e., `server.timeout`.
464
+ *
465
+ * A value of `0` will disable the keep-alive timeout behavior on incoming
466
+ * connections.
467
+ * A value of `0` makes the HTTP server behave similarly to Node.js versions prior
468
+ * to 8.0.0, which did not have a keep-alive timeout.
469
+ *
470
+ * The socket timeout logic is set up on connection, so changing this value only
471
+ * affects new connections to the server, not any existing connections.
472
+ * @since v8.0.0
473
+ */
474
+ keepAliveTimeout: number;
475
+ /**
476
+ * An additional buffer time added to the
477
+ * `server.keepAliveTimeout` to extend the internal socket timeout.
478
+ *
479
+ * This buffer helps reduce connection reset (`ECONNRESET`) errors by increasing
480
+ * the socket timeout slightly beyond the advertised keep-alive timeout.
481
+ *
482
+ * This option applies only to new incoming connections.
483
+ * @since v24.6.0
484
+ * @default 1000
485
+ */
486
+ keepAliveTimeoutBuffer: number;
487
+ /**
488
+ * Sets the timeout value in milliseconds for receiving the entire request from
489
+ * the client.
490
+ *
491
+ * If the timeout expires, the server responds with status 408 without
492
+ * forwarding the request to the request listener and then closes the connection.
493
+ *
494
+ * It must be set to a non-zero value (e.g. 120 seconds) to protect against
495
+ * potential Denial-of-Service attacks in case the server is deployed without a
496
+ * reverse proxy in front.
497
+ * @since v14.11.0
498
+ */
499
+ requestTimeout: number;
500
+ /**
501
+ * Closes all connections connected to this server.
502
+ * @since v18.2.0
503
+ */
504
+ closeAllConnections(): void;
505
+ /**
506
+ * Closes all connections connected to this server which are not sending a request
507
+ * or waiting for a response.
508
+ * @since v18.2.0
509
+ */
510
+ closeIdleConnections(): void;
511
+ // #region InternalEventEmitter
512
+ addListener<E extends keyof ServerEventMap>(
513
+ eventName: E,
514
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
515
+ ): this;
516
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
517
+ emit<E extends keyof ServerEventMap>(eventName: E, ...args: ServerEventMap<Request, Response>[E]): boolean;
518
+ emit(eventName: string | symbol, ...args: any[]): boolean;
519
+ listenerCount<E extends keyof ServerEventMap>(
520
+ eventName: E,
521
+ listener?: (...args: ServerEventMap<Request, Response>[E]) => void,
522
+ ): number;
523
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
524
+ listeners<E extends keyof ServerEventMap>(
525
+ eventName: E,
526
+ ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
527
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
528
+ off<E extends keyof ServerEventMap>(
529
+ eventName: E,
530
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
531
+ ): this;
532
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
533
+ on<E extends keyof ServerEventMap>(
534
+ eventName: E,
535
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
536
+ ): this;
537
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
538
+ once<E extends keyof ServerEventMap>(
539
+ eventName: E,
540
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
541
+ ): this;
542
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
543
+ prependListener<E extends keyof ServerEventMap>(
544
+ eventName: E,
545
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
546
+ ): this;
547
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
548
+ prependOnceListener<E extends keyof ServerEventMap>(
549
+ eventName: E,
550
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
551
+ ): this;
552
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
553
+ rawListeners<E extends keyof ServerEventMap>(
554
+ eventName: E,
555
+ ): ((...args: ServerEventMap<Request, Response>[E]) => void)[];
556
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
557
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
558
+ removeAllListeners<E extends keyof ServerEventMap>(eventName?: E): this;
559
+ removeAllListeners(eventName?: string | symbol): this;
560
+ removeListener<E extends keyof ServerEventMap>(
561
+ eventName: E,
562
+ listener: (...args: ServerEventMap<Request, Response>[E]) => void,
563
+ ): this;
564
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
565
+ // #endregion
566
+ }
567
+ interface OutgoingMessageEventMap extends stream.WritableEventMap {
568
+ "prefinish": [];
569
+ }
570
+ /**
571
+ * This class serves as the parent class of {@link ClientRequest} and {@link ServerResponse}. It is an abstract outgoing message from
572
+ * the perspective of the participants of an HTTP transaction.
573
+ * @since v0.1.17
574
+ */
575
+ class OutgoingMessage<Request extends IncomingMessage = IncomingMessage> extends stream.Writable {
576
+ constructor();
577
+ readonly req: Request;
578
+ chunkedEncoding: boolean;
579
+ shouldKeepAlive: boolean;
580
+ useChunkedEncodingByDefault: boolean;
581
+ sendDate: boolean;
582
+ /**
583
+ * @deprecated Use `writableEnded` instead.
584
+ */
585
+ finished: boolean;
586
+ /**
587
+ * Read-only. `true` if the headers were sent, otherwise `false`.
588
+ * @since v0.9.3
589
+ */
590
+ readonly headersSent: boolean;
591
+ /**
592
+ * Alias of `outgoingMessage.socket`.
593
+ * @since v0.3.0
594
+ * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead.
595
+ */
596
+ readonly connection: net.Socket | null;
597
+ /**
598
+ * Reference to the underlying socket. Usually, users will not want to access
599
+ * this property.
600
+ *
601
+ * After calling `outgoingMessage.end()`, this property will be nulled.
602
+ * @since v0.3.0
603
+ */
604
+ readonly socket: net.Socket | null;
605
+ /**
606
+ * Once a socket is associated with the message and is connected, `socket.setTimeout()` will be called with `msecs` as the first parameter.
607
+ * @since v0.9.12
608
+ * @param callback Optional function to be called when a timeout occurs. Same as binding to the `timeout` event.
609
+ */
610
+ setTimeout(msecs: number, callback?: () => void): this;
611
+ /**
612
+ * Sets a single header value. If the header already exists in the to-be-sent
613
+ * headers, its value will be replaced. Use an array of strings to send multiple
614
+ * headers with the same name.
615
+ * @since v0.4.0
616
+ * @param name Header name
617
+ * @param value Header value
618
+ */
619
+ setHeader(name: string, value: number | string | readonly string[]): this;
620
+ /**
621
+ * Sets multiple header values for implicit headers. headers must be an instance of
622
+ * `Headers` or `Map`, if a header already exists in the to-be-sent headers, its
623
+ * value will be replaced.
624
+ *
625
+ * ```js
626
+ * const headers = new Headers({ foo: 'bar' });
627
+ * outgoingMessage.setHeaders(headers);
628
+ * ```
629
+ *
630
+ * or
631
+ *
632
+ * ```js
633
+ * const headers = new Map([['foo', 'bar']]);
634
+ * outgoingMessage.setHeaders(headers);
635
+ * ```
636
+ *
637
+ * When headers have been set with `outgoingMessage.setHeaders()`, they will be
638
+ * merged with any headers passed to `response.writeHead()`, with the headers passed
639
+ * to `response.writeHead()` given precedence.
640
+ *
641
+ * ```js
642
+ * // Returns content-type = text/plain
643
+ * const server = http.createServer((req, res) => {
644
+ * const headers = new Headers({ 'Content-Type': 'text/html' });
645
+ * res.setHeaders(headers);
646
+ * res.writeHead(200, { 'Content-Type': 'text/plain' });
647
+ * res.end('ok');
648
+ * });
649
+ * ```
650
+ *
651
+ * @since v19.6.0, v18.15.0
652
+ * @param name Header name
653
+ * @param value Header value
654
+ */
655
+ setHeaders(headers: Headers | Map<string, number | string | readonly string[]>): this;
656
+ /**
657
+ * Append a single header value to the header object.
658
+ *
659
+ * If the value is an array, this is equivalent to calling this method multiple
660
+ * times.
661
+ *
662
+ * If there were no previous values for the header, this is equivalent to calling `outgoingMessage.setHeader(name, value)`.
663
+ *
664
+ * Depending of the value of `options.uniqueHeaders` when the client request or the
665
+ * server were created, this will end up in the header being sent multiple times or
666
+ * a single time with values joined using `; `.
667
+ * @since v18.3.0, v16.17.0
668
+ * @param name Header name
669
+ * @param value Header value
670
+ */
671
+ appendHeader(name: string, value: string | readonly string[]): this;
672
+ /**
673
+ * Gets the value of the HTTP header with the given name. If that header is not
674
+ * set, the returned value will be `undefined`.
675
+ * @since v0.4.0
676
+ * @param name Name of header
677
+ */
678
+ getHeader(name: string): number | string | string[] | undefined;
679
+ /**
680
+ * Returns a shallow copy of the current outgoing headers. Since a shallow
681
+ * copy is used, array values may be mutated without additional calls to
682
+ * various header-related HTTP module methods. The keys of the returned
683
+ * object are the header names and the values are the respective header
684
+ * values. All header names are lowercase.
685
+ *
686
+ * The object returned by the `outgoingMessage.getHeaders()` method does
687
+ * not prototypically inherit from the JavaScript `Object`. This means that
688
+ * typical `Object` methods such as `obj.toString()`, `obj.hasOwnProperty()`,
689
+ * and others are not defined and will not work.
690
+ *
691
+ * ```js
692
+ * outgoingMessage.setHeader('Foo', 'bar');
693
+ * outgoingMessage.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
694
+ *
695
+ * const headers = outgoingMessage.getHeaders();
696
+ * // headers === { foo: 'bar', 'set-cookie': ['foo=bar', 'bar=baz'] }
697
+ * ```
698
+ * @since v7.7.0
699
+ */
700
+ getHeaders(): OutgoingHttpHeaders;
701
+ /**
702
+ * Returns an array containing the unique names of the current outgoing headers.
703
+ * All names are lowercase.
704
+ * @since v7.7.0
705
+ */
706
+ getHeaderNames(): string[];
707
+ /**
708
+ * Returns `true` if the header identified by `name` is currently set in the
709
+ * outgoing headers. The header name is case-insensitive.
710
+ *
711
+ * ```js
712
+ * const hasContentType = outgoingMessage.hasHeader('content-type');
713
+ * ```
714
+ * @since v7.7.0
715
+ */
716
+ hasHeader(name: string): boolean;
717
+ /**
718
+ * Removes a header that is queued for implicit sending.
719
+ *
720
+ * ```js
721
+ * outgoingMessage.removeHeader('Content-Encoding');
722
+ * ```
723
+ * @since v0.4.0
724
+ * @param name Header name
725
+ */
726
+ removeHeader(name: string): void;
727
+ /**
728
+ * Adds HTTP trailers (headers but at the end of the message) to the message.
729
+ *
730
+ * Trailers will **only** be emitted if the message is chunked encoded. If not,
731
+ * the trailers will be silently discarded.
732
+ *
733
+ * HTTP requires the `Trailer` header to be sent to emit trailers,
734
+ * with a list of header field names in its value, e.g.
735
+ *
736
+ * ```js
737
+ * message.writeHead(200, { 'Content-Type': 'text/plain',
738
+ * 'Trailer': 'Content-MD5' });
739
+ * message.write(fileData);
740
+ * message.addTrailers({ 'Content-MD5': '7895bf4b8828b55ceaf47747b4bca667' });
741
+ * message.end();
742
+ * ```
743
+ *
744
+ * Attempting to set a header field name or value that contains invalid characters
745
+ * will result in a `TypeError` being thrown.
746
+ * @since v0.3.0
747
+ */
748
+ addTrailers(headers: OutgoingHttpHeaders | ReadonlyArray<[string, string]>): void;
749
+ /**
750
+ * Flushes the message headers.
751
+ *
752
+ * For efficiency reason, Node.js normally buffers the message headers
753
+ * until `outgoingMessage.end()` is called or the first chunk of message data
754
+ * is written. It then tries to pack the headers and data into a single TCP
755
+ * packet.
756
+ *
757
+ * It is usually desired (it saves a TCP round-trip), but not when the first
758
+ * data is not sent until possibly much later. `outgoingMessage.flushHeaders()` bypasses the optimization and kickstarts the message.
759
+ * @since v1.6.0
760
+ */
761
+ flushHeaders(): void;
762
+ // #region InternalEventEmitter
763
+ addListener<E extends keyof OutgoingMessageEventMap>(
764
+ eventName: E,
765
+ listener: (...args: OutgoingMessageEventMap[E]) => void,
766
+ ): this;
767
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
768
+ emit<E extends keyof OutgoingMessageEventMap>(eventName: E, ...args: OutgoingMessageEventMap[E]): boolean;
769
+ emit(eventName: string | symbol, ...args: any[]): boolean;
770
+ listenerCount<E extends keyof OutgoingMessageEventMap>(
771
+ eventName: E,
772
+ listener?: (...args: OutgoingMessageEventMap[E]) => void,
773
+ ): number;
774
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
775
+ listeners<E extends keyof OutgoingMessageEventMap>(
776
+ eventName: E,
777
+ ): ((...args: OutgoingMessageEventMap[E]) => void)[];
778
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
779
+ off<E extends keyof OutgoingMessageEventMap>(
780
+ eventName: E,
781
+ listener: (...args: OutgoingMessageEventMap[E]) => void,
782
+ ): this;
783
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
784
+ on<E extends keyof OutgoingMessageEventMap>(
785
+ eventName: E,
786
+ listener: (...args: OutgoingMessageEventMap[E]) => void,
787
+ ): this;
788
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
789
+ once<E extends keyof OutgoingMessageEventMap>(
790
+ eventName: E,
791
+ listener: (...args: OutgoingMessageEventMap[E]) => void,
792
+ ): this;
793
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
794
+ prependListener<E extends keyof OutgoingMessageEventMap>(
795
+ eventName: E,
796
+ listener: (...args: OutgoingMessageEventMap[E]) => void,
797
+ ): this;
798
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
799
+ prependOnceListener<E extends keyof OutgoingMessageEventMap>(
800
+ eventName: E,
801
+ listener: (...args: OutgoingMessageEventMap[E]) => void,
802
+ ): this;
803
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
804
+ rawListeners<E extends keyof OutgoingMessageEventMap>(
805
+ eventName: E,
806
+ ): ((...args: OutgoingMessageEventMap[E]) => void)[];
807
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
808
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
809
+ removeAllListeners<E extends keyof OutgoingMessageEventMap>(eventName?: E): this;
810
+ removeAllListeners(eventName?: string | symbol): this;
811
+ removeListener<E extends keyof OutgoingMessageEventMap>(
812
+ eventName: E,
813
+ listener: (...args: OutgoingMessageEventMap[E]) => void,
814
+ ): this;
815
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
816
+ // #endregion
817
+ }
818
+ /**
819
+ * This object is created internally by an HTTP server, not by the user. It is
820
+ * passed as the second parameter to the `'request'` event.
821
+ * @since v0.1.17
822
+ */
823
+ class ServerResponse<Request extends IncomingMessage = IncomingMessage> extends OutgoingMessage<Request> {
824
+ /**
825
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
826
+ * this property controls the status code that will be sent to the client when
827
+ * the headers get flushed.
828
+ *
829
+ * ```js
830
+ * response.statusCode = 404;
831
+ * ```
832
+ *
833
+ * After response header was sent to the client, this property indicates the
834
+ * status code which was sent out.
835
+ * @since v0.4.0
836
+ */
837
+ statusCode: number;
838
+ /**
839
+ * When using implicit headers (not calling `response.writeHead()` explicitly),
840
+ * this property controls the status message that will be sent to the client when
841
+ * the headers get flushed. If this is left as `undefined` then the standard
842
+ * message for the status code will be used.
843
+ *
844
+ * ```js
845
+ * response.statusMessage = 'Not found';
846
+ * ```
847
+ *
848
+ * After response header was sent to the client, this property indicates the
849
+ * status message which was sent out.
850
+ * @since v0.11.8
851
+ */
852
+ statusMessage: string;
853
+ /**
854
+ * If set to `true`, Node.js will check whether the `Content-Length` header value and the size of the body, in bytes, are equal.
855
+ * Mismatching the `Content-Length` header value will result
856
+ * in an `Error` being thrown, identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`.
857
+ * @since v18.10.0, v16.18.0
858
+ */
859
+ strictContentLength: boolean;
860
+ constructor(req: Request);
861
+ assignSocket(socket: net.Socket): void;
862
+ detachSocket(socket: net.Socket): void;
863
+ /**
864
+ * Sends an HTTP/1.1 100 Continue message to the client, indicating that
865
+ * the request body should be sent. See the `'checkContinue'` event on `Server`.
866
+ * @since v0.3.0
867
+ */
868
+ writeContinue(callback?: () => void): void;
869
+ /**
870
+ * Sends an HTTP/1.1 103 Early Hints message to the client with a Link header,
871
+ * indicating that the user agent can preload/preconnect the linked resources.
872
+ * The `hints` is an object containing the values of headers to be sent with
873
+ * early hints message. The optional `callback` argument will be called when
874
+ * the response message has been written.
875
+ *
876
+ * **Example**
877
+ *
878
+ * ```js
879
+ * const earlyHintsLink = '</styles.css>; rel=preload; as=style';
880
+ * response.writeEarlyHints({
881
+ * 'link': earlyHintsLink,
882
+ * });
883
+ *
884
+ * const earlyHintsLinks = [
885
+ * '</styles.css>; rel=preload; as=style',
886
+ * '</scripts.js>; rel=preload; as=script',
887
+ * ];
888
+ * response.writeEarlyHints({
889
+ * 'link': earlyHintsLinks,
890
+ * 'x-trace-id': 'id for diagnostics',
891
+ * });
892
+ *
893
+ * const earlyHintsCallback = () => console.log('early hints message sent');
894
+ * response.writeEarlyHints({
895
+ * 'link': earlyHintsLinks,
896
+ * }, earlyHintsCallback);
897
+ * ```
898
+ * @since v18.11.0
899
+ * @param hints An object containing the values of headers
900
+ * @param callback Will be called when the response message has been written
901
+ */
902
+ writeEarlyHints(hints: Record<string, string | string[]>, callback?: () => void): void;
903
+ /**
904
+ * Sends a response header to the request. The status code is a 3-digit HTTP
905
+ * status code, like `404`. The last argument, `headers`, are the response headers.
906
+ * Optionally one can give a human-readable `statusMessage` as the second
907
+ * argument.
908
+ *
909
+ * `headers` may be an `Array` where the keys and values are in the same list.
910
+ * It is _not_ a list of tuples. So, the even-numbered offsets are key values,
911
+ * and the odd-numbered offsets are the associated values. The array is in the same
912
+ * format as `request.rawHeaders`.
913
+ *
914
+ * Returns a reference to the `ServerResponse`, so that calls can be chained.
915
+ *
916
+ * ```js
917
+ * const body = 'hello world';
918
+ * response
919
+ * .writeHead(200, {
920
+ * 'Content-Length': Buffer.byteLength(body),
921
+ * 'Content-Type': 'text/plain',
922
+ * })
923
+ * .end(body);
924
+ * ```
925
+ *
926
+ * This method must only be called once on a message and it must
927
+ * be called before `response.end()` is called.
928
+ *
929
+ * If `response.write()` or `response.end()` are called before calling
930
+ * this, the implicit/mutable headers will be calculated and call this function.
931
+ *
932
+ * When headers have been set with `response.setHeader()`, they will be merged
933
+ * with any headers passed to `response.writeHead()`, with the headers passed
934
+ * to `response.writeHead()` given precedence.
935
+ *
936
+ * If this method is called and `response.setHeader()` has not been called,
937
+ * it will directly write the supplied header values onto the network channel
938
+ * without caching internally, and the `response.getHeader()` on the header
939
+ * will not yield the expected result. If progressive population of headers is
940
+ * desired with potential future retrieval and modification, use `response.setHeader()` instead.
941
+ *
942
+ * ```js
943
+ * // Returns content-type = text/plain
944
+ * const server = http.createServer((req, res) => {
945
+ * res.setHeader('Content-Type', 'text/html');
946
+ * res.setHeader('X-Foo', 'bar');
947
+ * res.writeHead(200, { 'Content-Type': 'text/plain' });
948
+ * res.end('ok');
949
+ * });
950
+ * ```
951
+ *
952
+ * `Content-Length` is read in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes. Node.js
953
+ * will check whether `Content-Length` and the length of the body which has
954
+ * been transmitted are equal or not.
955
+ *
956
+ * Attempting to set a header field name or value that contains invalid characters
957
+ * will result in a \[`Error`\]\[\] being thrown.
958
+ * @since v0.1.30
959
+ */
960
+ writeHead(
961
+ statusCode: number,
962
+ statusMessage?: string,
963
+ headers?: OutgoingHttpHeaders | OutgoingHttpHeader[],
964
+ ): this;
965
+ writeHead(statusCode: number, headers?: OutgoingHttpHeaders | OutgoingHttpHeader[]): this;
966
+ /**
967
+ * Sends a HTTP/1.1 102 Processing message to the client, indicating that
968
+ * the request body should be sent.
969
+ * @since v10.0.0
970
+ */
971
+ writeProcessing(callback?: () => void): void;
972
+ }
973
+ interface InformationEvent {
974
+ httpVersion: string;
975
+ httpVersionMajor: number;
976
+ httpVersionMinor: number;
977
+ statusCode: number;
978
+ statusMessage: string;
979
+ headers: IncomingHttpHeaders;
980
+ rawHeaders: string[];
981
+ }
982
+ interface ClientRequestEventMap extends stream.WritableEventMap {
983
+ /** @deprecated Listen for the `'close'` event instead. */
984
+ "abort": [];
985
+ "connect": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer];
986
+ "continue": [];
987
+ "information": [info: InformationEvent];
988
+ "response": [response: IncomingMessage];
989
+ "socket": [socket: net.Socket];
990
+ "timeout": [];
991
+ "upgrade": [response: IncomingMessage, socket: net.Socket, head: NonSharedBuffer];
992
+ }
993
+ /**
994
+ * This object is created internally and returned from {@link request}. It
995
+ * represents an _in-progress_ request whose header has already been queued. The
996
+ * header is still mutable using the `setHeader(name, value)`, `getHeader(name)`, `removeHeader(name)` API. The actual header will
997
+ * be sent along with the first data chunk or when calling `request.end()`.
998
+ *
999
+ * To get the response, add a listener for `'response'` to the request object. `'response'` will be emitted from the request object when the response
1000
+ * headers have been received. The `'response'` event is executed with one
1001
+ * argument which is an instance of {@link IncomingMessage}.
1002
+ *
1003
+ * During the `'response'` event, one can add listeners to the
1004
+ * response object; particularly to listen for the `'data'` event.
1005
+ *
1006
+ * If no `'response'` handler is added, then the response will be
1007
+ * entirely discarded. However, if a `'response'` event handler is added,
1008
+ * then the data from the response object **must** be consumed, either by
1009
+ * calling `response.read()` whenever there is a `'readable'` event, or
1010
+ * by adding a `'data'` handler, or by calling the `.resume()` method.
1011
+ * Until the data is consumed, the `'end'` event will not fire. Also, until
1012
+ * the data is read it will consume memory that can eventually lead to a
1013
+ * 'process out of memory' error.
1014
+ *
1015
+ * For backward compatibility, `res` will only emit `'error'` if there is an `'error'` listener registered.
1016
+ *
1017
+ * Set `Content-Length` header to limit the response body size.
1018
+ * If `response.strictContentLength` is set to `true`, mismatching the `Content-Length` header value will result in an `Error` being thrown,
1019
+ * identified by `code:``'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`.
1020
+ *
1021
+ * `Content-Length` value should be in bytes, not characters. Use `Buffer.byteLength()` to determine the length of the body in bytes.
1022
+ * @since v0.1.17
1023
+ */
1024
+ class ClientRequest extends OutgoingMessage {
1025
+ /**
1026
+ * The `request.aborted` property will be `true` if the request has
1027
+ * been aborted.
1028
+ * @since v0.11.14
1029
+ * @deprecated Since v17.0.0, v16.12.0 - Check `destroyed` instead.
1030
+ */
1031
+ aborted: boolean;
1032
+ /**
1033
+ * The request host.
1034
+ * @since v14.5.0, v12.19.0
1035
+ */
1036
+ host: string;
1037
+ /**
1038
+ * The request protocol.
1039
+ * @since v14.5.0, v12.19.0
1040
+ */
1041
+ protocol: string;
1042
+ /**
1043
+ * When sending request through a keep-alive enabled agent, the underlying socket
1044
+ * might be reused. But if server closes connection at unfortunate time, client
1045
+ * may run into a 'ECONNRESET' error.
1046
+ *
1047
+ * ```js
1048
+ * import http from 'node:http';
1049
+ * const agent = new http.Agent({ keepAlive: true });
1050
+ *
1051
+ * // Server has a 5 seconds keep-alive timeout by default
1052
+ * http
1053
+ * .createServer((req, res) => {
1054
+ * res.write('hello\n');
1055
+ * res.end();
1056
+ * })
1057
+ * .listen(3000);
1058
+ *
1059
+ * setInterval(() => {
1060
+ * // Adapting a keep-alive agent
1061
+ * http.get('http://localhost:3000', { agent }, (res) => {
1062
+ * res.on('data', (data) => {
1063
+ * // Do nothing
1064
+ * });
1065
+ * });
1066
+ * }, 5000); // Sending request on 5s interval so it's easy to hit idle timeout
1067
+ * ```
1068
+ *
1069
+ * By marking a request whether it reused socket or not, we can do
1070
+ * automatic error retry base on it.
1071
+ *
1072
+ * ```js
1073
+ * import http from 'node:http';
1074
+ * const agent = new http.Agent({ keepAlive: true });
1075
+ *
1076
+ * function retriableRequest() {
1077
+ * const req = http
1078
+ * .get('http://localhost:3000', { agent }, (res) => {
1079
+ * // ...
1080
+ * })
1081
+ * .on('error', (err) => {
1082
+ * // Check if retry is needed
1083
+ * if (req.reusedSocket &#x26;&#x26; err.code === 'ECONNRESET') {
1084
+ * retriableRequest();
1085
+ * }
1086
+ * });
1087
+ * }
1088
+ *
1089
+ * retriableRequest();
1090
+ * ```
1091
+ * @since v13.0.0, v12.16.0
1092
+ */
1093
+ reusedSocket: boolean;
1094
+ /**
1095
+ * Limits maximum response headers count. If set to 0, no limit will be applied.
1096
+ */
1097
+ maxHeadersCount: number;
1098
+ constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
1099
+ /**
1100
+ * The request method.
1101
+ * @since v0.1.97
1102
+ */
1103
+ method: string;
1104
+ /**
1105
+ * The request path.
1106
+ * @since v0.4.0
1107
+ */
1108
+ path: string;
1109
+ /**
1110
+ * Marks the request as aborting. Calling this will cause remaining data
1111
+ * in the response to be dropped and the socket to be destroyed.
1112
+ * @since v0.3.8
1113
+ * @deprecated Since v14.1.0,v13.14.0 - Use `destroy` instead.
1114
+ */
1115
+ abort(): void;
1116
+ onSocket(socket: net.Socket): void;
1117
+ /**
1118
+ * Once a socket is assigned to this request and is connected `socket.setTimeout()` will be called.
1119
+ * @since v0.5.9
1120
+ * @param timeout Milliseconds before a request times out.
1121
+ * @param callback Optional function to be called when a timeout occurs. Same as binding to the `'timeout'` event.
1122
+ */
1123
+ setTimeout(timeout: number, callback?: () => void): this;
1124
+ /**
1125
+ * Once a socket is assigned to this request and is connected `socket.setNoDelay()` will be called.
1126
+ * @since v0.5.9
1127
+ */
1128
+ setNoDelay(noDelay?: boolean): void;
1129
+ /**
1130
+ * Once a socket is assigned to this request and is connected `socket.setKeepAlive()` will be called.
1131
+ * @since v0.5.9
1132
+ */
1133
+ setSocketKeepAlive(enable?: boolean, initialDelay?: number): void;
1134
+ /**
1135
+ * Returns an array containing the unique names of the current outgoing raw
1136
+ * headers. Header names are returned with their exact casing being set.
1137
+ *
1138
+ * ```js
1139
+ * request.setHeader('Foo', 'bar');
1140
+ * request.setHeader('Set-Cookie', ['foo=bar', 'bar=baz']);
1141
+ *
1142
+ * const headerNames = request.getRawHeaderNames();
1143
+ * // headerNames === ['Foo', 'Set-Cookie']
1144
+ * ```
1145
+ * @since v15.13.0, v14.17.0
1146
+ */
1147
+ getRawHeaderNames(): string[];
1148
+ // #region InternalEventEmitter
1149
+ addListener<E extends keyof ClientRequestEventMap>(
1150
+ eventName: E,
1151
+ listener: (...args: ClientRequestEventMap[E]) => void,
1152
+ ): this;
1153
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1154
+ emit<E extends keyof ClientRequestEventMap>(eventName: E, ...args: ClientRequestEventMap[E]): boolean;
1155
+ emit(eventName: string | symbol, ...args: any[]): boolean;
1156
+ listenerCount<E extends keyof ClientRequestEventMap>(
1157
+ eventName: E,
1158
+ listener?: (...args: ClientRequestEventMap[E]) => void,
1159
+ ): number;
1160
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
1161
+ listeners<E extends keyof ClientRequestEventMap>(eventName: E): ((...args: ClientRequestEventMap[E]) => void)[];
1162
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
1163
+ off<E extends keyof ClientRequestEventMap>(
1164
+ eventName: E,
1165
+ listener: (...args: ClientRequestEventMap[E]) => void,
1166
+ ): this;
1167
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
1168
+ on<E extends keyof ClientRequestEventMap>(
1169
+ eventName: E,
1170
+ listener: (...args: ClientRequestEventMap[E]) => void,
1171
+ ): this;
1172
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
1173
+ once<E extends keyof ClientRequestEventMap>(
1174
+ eventName: E,
1175
+ listener: (...args: ClientRequestEventMap[E]) => void,
1176
+ ): this;
1177
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
1178
+ prependListener<E extends keyof ClientRequestEventMap>(
1179
+ eventName: E,
1180
+ listener: (...args: ClientRequestEventMap[E]) => void,
1181
+ ): this;
1182
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1183
+ prependOnceListener<E extends keyof ClientRequestEventMap>(
1184
+ eventName: E,
1185
+ listener: (...args: ClientRequestEventMap[E]) => void,
1186
+ ): this;
1187
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1188
+ rawListeners<E extends keyof ClientRequestEventMap>(
1189
+ eventName: E,
1190
+ ): ((...args: ClientRequestEventMap[E]) => void)[];
1191
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
1192
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
1193
+ removeAllListeners<E extends keyof ClientRequestEventMap>(eventName?: E): this;
1194
+ removeAllListeners(eventName?: string | symbol): this;
1195
+ removeListener<E extends keyof ClientRequestEventMap>(
1196
+ eventName: E,
1197
+ listener: (...args: ClientRequestEventMap[E]) => void,
1198
+ ): this;
1199
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1200
+ // #endregion
1201
+ }
1202
+ interface IncomingMessageEventMap extends stream.ReadableEventMap {
1203
+ /** @deprecated Listen for `'close'` event instead. */
1204
+ "aborted": [];
1205
+ }
1206
+ /**
1207
+ * An `IncomingMessage` object is created by {@link Server} or {@link ClientRequest} and passed as the first argument to the `'request'` and `'response'` event respectively. It may be used to
1208
+ * access response
1209
+ * status, headers, and data.
1210
+ *
1211
+ * Different from its `socket` value which is a subclass of `stream.Duplex`, the `IncomingMessage` itself extends `stream.Readable` and is created separately to
1212
+ * parse and emit the incoming HTTP headers and payload, as the underlying socket
1213
+ * may be reused multiple times in case of keep-alive.
1214
+ * @since v0.1.17
1215
+ */
1216
+ class IncomingMessage extends stream.Readable {
1217
+ constructor(socket: net.Socket);
1218
+ /**
1219
+ * The `message.aborted` property will be `true` if the request has
1220
+ * been aborted.
1221
+ * @since v10.1.0
1222
+ * @deprecated Since v17.0.0,v16.12.0 - Check `message.destroyed` from <a href="stream.html#class-streamreadable" class="type">stream.Readable</a>.
1223
+ */
1224
+ aborted: boolean;
1225
+ /**
1226
+ * In case of server request, the HTTP version sent by the client. In the case of
1227
+ * client response, the HTTP version of the connected-to server.
1228
+ * Probably either `'1.1'` or `'1.0'`.
1229
+ *
1230
+ * Also `message.httpVersionMajor` is the first integer and `message.httpVersionMinor` is the second.
1231
+ * @since v0.1.1
1232
+ */
1233
+ httpVersion: string;
1234
+ httpVersionMajor: number;
1235
+ httpVersionMinor: number;
1236
+ /**
1237
+ * The `message.complete` property will be `true` if a complete HTTP message has
1238
+ * been received and successfully parsed.
1239
+ *
1240
+ * This property is particularly useful as a means of determining if a client or
1241
+ * server fully transmitted a message before a connection was terminated:
1242
+ *
1243
+ * ```js
1244
+ * const req = http.request({
1245
+ * host: '127.0.0.1',
1246
+ * port: 8080,
1247
+ * method: 'POST',
1248
+ * }, (res) => {
1249
+ * res.resume();
1250
+ * res.on('end', () => {
1251
+ * if (!res.complete)
1252
+ * console.error(
1253
+ * 'The connection was terminated while the message was still being sent');
1254
+ * });
1255
+ * });
1256
+ * ```
1257
+ * @since v0.3.0
1258
+ */
1259
+ complete: boolean;
1260
+ /**
1261
+ * Alias for `message.socket`.
1262
+ * @since v0.1.90
1263
+ * @deprecated Since v16.0.0 - Use `socket`.
1264
+ */
1265
+ connection: net.Socket;
1266
+ /**
1267
+ * The `net.Socket` object associated with the connection.
1268
+ *
1269
+ * With HTTPS support, use `request.socket.getPeerCertificate()` to obtain the
1270
+ * client's authentication details.
1271
+ *
1272
+ * This property is guaranteed to be an instance of the `net.Socket` class,
1273
+ * a subclass of `stream.Duplex`, unless the user specified a socket
1274
+ * type other than `net.Socket` or internally nulled.
1275
+ * @since v0.3.0
1276
+ */
1277
+ socket: net.Socket;
1278
+ /**
1279
+ * The request/response headers object.
1280
+ *
1281
+ * Key-value pairs of header names and values. Header names are lower-cased.
1282
+ *
1283
+ * ```js
1284
+ * // Prints something like:
1285
+ * //
1286
+ * // { 'user-agent': 'curl/7.22.0',
1287
+ * // host: '127.0.0.1:8000',
1288
+ * // accept: '*' }
1289
+ * console.log(request.headers);
1290
+ * ```
1291
+ *
1292
+ * Duplicates in raw headers are handled in the following ways, depending on the
1293
+ * header name:
1294
+ *
1295
+ * * Duplicates of `age`, `authorization`, `content-length`, `content-type`, `etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`,
1296
+ * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`, or `user-agent` are discarded.
1297
+ * To allow duplicate values of the headers listed above to be joined,
1298
+ * use the option `joinDuplicateHeaders` in {@link request} and {@link createServer}. See RFC 9110 Section 5.3 for more
1299
+ * information.
1300
+ * * `set-cookie` is always an array. Duplicates are added to the array.
1301
+ * * For duplicate `cookie` headers, the values are joined together with `; `.
1302
+ * * For all other headers, the values are joined together with `, `.
1303
+ * @since v0.1.5
1304
+ */
1305
+ headers: IncomingHttpHeaders;
1306
+ /**
1307
+ * Similar to `message.headers`, but there is no join logic and the values are
1308
+ * always arrays of strings, even for headers received just once.
1309
+ *
1310
+ * ```js
1311
+ * // Prints something like:
1312
+ * //
1313
+ * // { 'user-agent': ['curl/7.22.0'],
1314
+ * // host: ['127.0.0.1:8000'],
1315
+ * // accept: ['*'] }
1316
+ * console.log(request.headersDistinct);
1317
+ * ```
1318
+ * @since v18.3.0, v16.17.0
1319
+ */
1320
+ headersDistinct: NodeJS.Dict<string[]>;
1321
+ /**
1322
+ * The raw request/response headers list exactly as they were received.
1323
+ *
1324
+ * The keys and values are in the same list. It is _not_ a
1325
+ * list of tuples. So, the even-numbered offsets are key values, and the
1326
+ * odd-numbered offsets are the associated values.
1327
+ *
1328
+ * Header names are not lowercased, and duplicates are not merged.
1329
+ *
1330
+ * ```js
1331
+ * // Prints something like:
1332
+ * //
1333
+ * // [ 'user-agent',
1334
+ * // 'this is invalid because there can be only one',
1335
+ * // 'User-Agent',
1336
+ * // 'curl/7.22.0',
1337
+ * // 'Host',
1338
+ * // '127.0.0.1:8000',
1339
+ * // 'ACCEPT',
1340
+ * // '*' ]
1341
+ * console.log(request.rawHeaders);
1342
+ * ```
1343
+ * @since v0.11.6
1344
+ */
1345
+ rawHeaders: string[];
1346
+ /**
1347
+ * The request/response trailers object. Only populated at the `'end'` event.
1348
+ * @since v0.3.0
1349
+ */
1350
+ trailers: NodeJS.Dict<string>;
1351
+ /**
1352
+ * Similar to `message.trailers`, but there is no join logic and the values are
1353
+ * always arrays of strings, even for headers received just once.
1354
+ * Only populated at the `'end'` event.
1355
+ * @since v18.3.0, v16.17.0
1356
+ */
1357
+ trailersDistinct: NodeJS.Dict<string[]>;
1358
+ /**
1359
+ * The raw request/response trailer keys and values exactly as they were
1360
+ * received. Only populated at the `'end'` event.
1361
+ * @since v0.11.6
1362
+ */
1363
+ rawTrailers: string[];
1364
+ /**
1365
+ * Calls `message.socket.setTimeout(msecs, callback)`.
1366
+ * @since v0.5.9
1367
+ */
1368
+ setTimeout(msecs: number, callback?: () => void): this;
1369
+ /**
1370
+ * **Only valid for request obtained from {@link Server}.**
1371
+ *
1372
+ * The request method as a string. Read only. Examples: `'GET'`, `'DELETE'`.
1373
+ * @since v0.1.1
1374
+ */
1375
+ method?: string | undefined;
1376
+ /**
1377
+ * **Only valid for request obtained from {@link Server}.**
1378
+ *
1379
+ * Request URL string. This contains only the URL that is present in the actual
1380
+ * HTTP request. Take the following request:
1381
+ *
1382
+ * ```http
1383
+ * GET /status?name=ryan HTTP/1.1
1384
+ * Accept: text/plain
1385
+ * ```
1386
+ *
1387
+ * To parse the URL into its parts:
1388
+ *
1389
+ * ```js
1390
+ * new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`);
1391
+ * ```
1392
+ *
1393
+ * When `request.url` is `'/status?name=ryan'` and `process.env.HOST` is undefined:
1394
+ *
1395
+ * ```console
1396
+ * $ node
1397
+ * > new URL(`http://${process.env.HOST ?? 'localhost'}${request.url}`);
1398
+ * URL {
1399
+ * href: 'http://localhost/status?name=ryan',
1400
+ * origin: 'http://localhost',
1401
+ * protocol: 'http:',
1402
+ * username: '',
1403
+ * password: '',
1404
+ * host: 'localhost',
1405
+ * hostname: 'localhost',
1406
+ * port: '',
1407
+ * pathname: '/status',
1408
+ * search: '?name=ryan',
1409
+ * searchParams: URLSearchParams { 'name' => 'ryan' },
1410
+ * hash: ''
1411
+ * }
1412
+ * ```
1413
+ *
1414
+ * Ensure that you set `process.env.HOST` to the server's host name, or consider replacing this part entirely. If using `req.headers.host`, ensure proper
1415
+ * validation is used, as clients may specify a custom `Host` header.
1416
+ * @since v0.1.90
1417
+ */
1418
+ url?: string | undefined;
1419
+ /**
1420
+ * **Only valid for response obtained from {@link ClientRequest}.**
1421
+ *
1422
+ * The 3-digit HTTP response status code. E.G. `404`.
1423
+ * @since v0.1.1
1424
+ */
1425
+ statusCode?: number | undefined;
1426
+ /**
1427
+ * **Only valid for response obtained from {@link ClientRequest}.**
1428
+ *
1429
+ * The HTTP response status message (reason phrase). E.G. `OK` or `Internal Server Error`.
1430
+ * @since v0.11.10
1431
+ */
1432
+ statusMessage?: string | undefined;
1433
+ /**
1434
+ * Calls `destroy()` on the socket that received the `IncomingMessage`. If `error` is provided, an `'error'` event is emitted on the socket and `error` is passed
1435
+ * as an argument to any listeners on the event.
1436
+ * @since v0.3.0
1437
+ */
1438
+ destroy(error?: Error): this;
1439
+ // #region InternalEventEmitter
1440
+ addListener<E extends keyof IncomingMessageEventMap>(
1441
+ eventName: E,
1442
+ listener: (...args: IncomingMessageEventMap[E]) => void,
1443
+ ): this;
1444
+ addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1445
+ emit<E extends keyof IncomingMessageEventMap>(eventName: E, ...args: IncomingMessageEventMap[E]): boolean;
1446
+ emit(eventName: string | symbol, ...args: any[]): boolean;
1447
+ listenerCount<E extends keyof IncomingMessageEventMap>(
1448
+ eventName: E,
1449
+ listener?: (...args: IncomingMessageEventMap[E]) => void,
1450
+ ): number;
1451
+ listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
1452
+ listeners<E extends keyof IncomingMessageEventMap>(
1453
+ eventName: E,
1454
+ ): ((...args: IncomingMessageEventMap[E]) => void)[];
1455
+ listeners(eventName: string | symbol): ((...args: any[]) => void)[];
1456
+ off<E extends keyof IncomingMessageEventMap>(
1457
+ eventName: E,
1458
+ listener: (...args: IncomingMessageEventMap[E]) => void,
1459
+ ): this;
1460
+ off(eventName: string | symbol, listener: (...args: any[]) => void): this;
1461
+ on<E extends keyof IncomingMessageEventMap>(
1462
+ eventName: E,
1463
+ listener: (...args: IncomingMessageEventMap[E]) => void,
1464
+ ): this;
1465
+ on(eventName: string | symbol, listener: (...args: any[]) => void): this;
1466
+ once<E extends keyof IncomingMessageEventMap>(
1467
+ eventName: E,
1468
+ listener: (...args: IncomingMessageEventMap[E]) => void,
1469
+ ): this;
1470
+ once(eventName: string | symbol, listener: (...args: any[]) => void): this;
1471
+ prependListener<E extends keyof IncomingMessageEventMap>(
1472
+ eventName: E,
1473
+ listener: (...args: IncomingMessageEventMap[E]) => void,
1474
+ ): this;
1475
+ prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1476
+ prependOnceListener<E extends keyof IncomingMessageEventMap>(
1477
+ eventName: E,
1478
+ listener: (...args: IncomingMessageEventMap[E]) => void,
1479
+ ): this;
1480
+ prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1481
+ rawListeners<E extends keyof IncomingMessageEventMap>(
1482
+ eventName: E,
1483
+ ): ((...args: IncomingMessageEventMap[E]) => void)[];
1484
+ rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
1485
+ // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
1486
+ removeAllListeners<E extends keyof IncomingMessageEventMap>(eventName?: E): this;
1487
+ removeAllListeners(eventName?: string | symbol): this;
1488
+ removeListener<E extends keyof IncomingMessageEventMap>(
1489
+ eventName: E,
1490
+ listener: (...args: IncomingMessageEventMap[E]) => void,
1491
+ ): this;
1492
+ removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1493
+ // #endregion
1494
+ }
1495
+ interface ProxyEnv extends NodeJS.ProcessEnv {
1496
+ HTTP_PROXY?: string | undefined;
1497
+ HTTPS_PROXY?: string | undefined;
1498
+ NO_PROXY?: string | undefined;
1499
+ http_proxy?: string | undefined;
1500
+ https_proxy?: string | undefined;
1501
+ no_proxy?: string | undefined;
1502
+ }
1503
+ interface AgentOptions extends NodeJS.PartialOptions<net.TcpSocketConnectOpts> {
1504
+ /**
1505
+ * Keep sockets around in a pool to be used by other requests in the future. Default = false
1506
+ */
1507
+ keepAlive?: boolean | undefined;
1508
+ /**
1509
+ * When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000.
1510
+ * Only relevant if keepAlive is set to true.
1511
+ */
1512
+ keepAliveMsecs?: number | undefined;
1513
+ /**
1514
+ * Milliseconds to subtract from
1515
+ * the server-provided `keep-alive: timeout=...` hint when determining socket
1516
+ * expiration time. This buffer helps ensure the agent closes the socket
1517
+ * slightly before the server does, reducing the chance of sending a request
1518
+ * on a socket that’s about to be closed by the server.
1519
+ * @since v24.7.0
1520
+ * @default 1000
1521
+ */
1522
+ agentKeepAliveTimeoutBuffer?: number | undefined;
1523
+ /**
1524
+ * Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity
1525
+ */
1526
+ maxSockets?: number | undefined;
1527
+ /**
1528
+ * Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.
1529
+ */
1530
+ maxTotalSockets?: number | undefined;
1531
+ /**
1532
+ * Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.
1533
+ */
1534
+ maxFreeSockets?: number | undefined;
1535
+ /**
1536
+ * Socket timeout in milliseconds. This will set the timeout after the socket is connected.
1537
+ */
1538
+ timeout?: number | undefined;
1539
+ /**
1540
+ * Scheduling strategy to apply when picking the next free socket to use.
1541
+ * @default `lifo`
1542
+ */
1543
+ scheduling?: "fifo" | "lifo" | undefined;
1544
+ /**
1545
+ * Environment variables for proxy configuration. See
1546
+ * [Built-in Proxy Support](https://nodejs.org/docs/latest-v25.x/api/http.html#built-in-proxy-support) for details.
1547
+ * @since v24.5.0
1548
+ */
1549
+ proxyEnv?: ProxyEnv | undefined;
1550
+ /**
1551
+ * Default port to use when the port is not specified in requests.
1552
+ * @since v24.5.0
1553
+ */
1554
+ defaultPort?: number | undefined;
1555
+ /**
1556
+ * The protocol to use for the agent.
1557
+ * @since v24.5.0
1558
+ */
1559
+ protocol?: string | undefined;
1560
+ }
1561
+ /**
1562
+ * An `Agent` is responsible for managing connection persistence
1563
+ * and reuse for HTTP clients. It maintains a queue of pending requests
1564
+ * for a given host and port, reusing a single socket connection for each
1565
+ * until the queue is empty, at which time the socket is either destroyed
1566
+ * or put into a pool where it is kept to be used again for requests to the
1567
+ * same host and port. Whether it is destroyed or pooled depends on the `keepAlive` `option`.
1568
+ *
1569
+ * Pooled connections have TCP Keep-Alive enabled for them, but servers may
1570
+ * still close idle connections, in which case they will be removed from the
1571
+ * pool and a new connection will be made when a new HTTP request is made for
1572
+ * that host and port. Servers may also refuse to allow multiple requests
1573
+ * over the same connection, in which case the connection will have to be
1574
+ * remade for every request and cannot be pooled. The `Agent` will still make
1575
+ * the requests to that server, but each one will occur over a new connection.
1576
+ *
1577
+ * When a connection is closed by the client or the server, it is removed
1578
+ * from the pool. Any unused sockets in the pool will be unrefed so as not
1579
+ * to keep the Node.js process running when there are no outstanding requests.
1580
+ * (see `socket.unref()`).
1581
+ *
1582
+ * It is good practice, to `destroy()` an `Agent` instance when it is no
1583
+ * longer in use, because unused sockets consume OS resources.
1584
+ *
1585
+ * Sockets are removed from an agent when the socket emits either
1586
+ * a `'close'` event or an `'agentRemove'` event. When intending to keep one
1587
+ * HTTP request open for a long time without keeping it in the agent, something
1588
+ * like the following may be done:
1589
+ *
1590
+ * ```js
1591
+ * http.get(options, (res) => {
1592
+ * // Do stuff
1593
+ * }).on('socket', (socket) => {
1594
+ * socket.emit('agentRemove');
1595
+ * });
1596
+ * ```
1597
+ *
1598
+ * An agent may also be used for an individual request. By providing `{agent: false}` as an option to the `http.get()` or `http.request()` functions, a one-time use `Agent` with default options
1599
+ * will be used
1600
+ * for the client connection.
1601
+ *
1602
+ * `agent:false`:
1603
+ *
1604
+ * ```js
1605
+ * http.get({
1606
+ * hostname: 'localhost',
1607
+ * port: 80,
1608
+ * path: '/',
1609
+ * agent: false, // Create a new agent just for this one request
1610
+ * }, (res) => {
1611
+ * // Do stuff with response
1612
+ * });
1613
+ * ```
1614
+ *
1615
+ * `options` in [`socket.connect()`](https://nodejs.org/docs/latest-v25.x/api/net.html#socketconnectoptions-connectlistener) are also supported.
1616
+ *
1617
+ * To configure any of them, a custom {@link Agent} instance must be created.
1618
+ *
1619
+ * ```js
1620
+ * import http from 'node:http';
1621
+ * const keepAliveAgent = new http.Agent({ keepAlive: true });
1622
+ * options.agent = keepAliveAgent;
1623
+ * http.request(options, onResponseCallback)
1624
+ * ```
1625
+ * @since v0.3.4
1626
+ */
1627
+ class Agent extends EventEmitter {
1628
+ /**
1629
+ * By default set to 256. For agents with `keepAlive` enabled, this
1630
+ * sets the maximum number of sockets that will be left open in the free
1631
+ * state.
1632
+ * @since v0.11.7
1633
+ */
1634
+ maxFreeSockets: number;
1635
+ /**
1636
+ * By default set to `Infinity`. Determines how many concurrent sockets the agent
1637
+ * can have open per origin. Origin is the returned value of `agent.getName()`.
1638
+ * @since v0.3.6
1639
+ */
1640
+ maxSockets: number;
1641
+ /**
1642
+ * By default set to `Infinity`. Determines how many concurrent sockets the agent
1643
+ * can have open. Unlike `maxSockets`, this parameter applies across all origins.
1644
+ * @since v14.5.0, v12.19.0
1645
+ */
1646
+ maxTotalSockets: number;
1647
+ /**
1648
+ * An object which contains arrays of sockets currently awaiting use by
1649
+ * the agent when `keepAlive` is enabled. Do not modify.
1650
+ *
1651
+ * Sockets in the `freeSockets` list will be automatically destroyed and
1652
+ * removed from the array on `'timeout'`.
1653
+ * @since v0.11.4
1654
+ */
1655
+ readonly freeSockets: NodeJS.ReadOnlyDict<net.Socket[]>;
1656
+ /**
1657
+ * An object which contains arrays of sockets currently in use by the
1658
+ * agent. Do not modify.
1659
+ * @since v0.3.6
1660
+ */
1661
+ readonly sockets: NodeJS.ReadOnlyDict<net.Socket[]>;
1662
+ /**
1663
+ * An object which contains queues of requests that have not yet been assigned to
1664
+ * sockets. Do not modify.
1665
+ * @since v0.5.9
1666
+ */
1667
+ readonly requests: NodeJS.ReadOnlyDict<ClientRequest[]>;
1668
+ constructor(opts?: AgentOptions);
1669
+ /**
1670
+ * Destroy any sockets that are currently in use by the agent.
1671
+ *
1672
+ * It is usually not necessary to do this. However, if using an
1673
+ * agent with `keepAlive` enabled, then it is best to explicitly shut down
1674
+ * the agent when it is no longer needed. Otherwise,
1675
+ * sockets might stay open for quite a long time before the server
1676
+ * terminates them.
1677
+ * @since v0.11.4
1678
+ */
1679
+ destroy(): void;
1680
+ /**
1681
+ * Produces a socket/stream to be used for HTTP requests.
1682
+ *
1683
+ * By default, this function behaves identically to `net.createConnection()`,
1684
+ * synchronously returning the created socket. The optional `callback` parameter in the
1685
+ * signature is **not** used by this default implementation.
1686
+ *
1687
+ * However, custom agents may override this method to provide greater flexibility,
1688
+ * for example, to create sockets asynchronously. When overriding `createConnection`:
1689
+ *
1690
+ * 1. **Synchronous socket creation**: The overriding method can return the
1691
+ * socket/stream directly.
1692
+ * 2. **Asynchronous socket creation**: The overriding method can accept the `callback`
1693
+ * and pass the created socket/stream to it (e.g., `callback(null, newSocket)`).
1694
+ * If an error occurs during socket creation, it should be passed as the first
1695
+ * argument to the `callback` (e.g., `callback(err)`).
1696
+ *
1697
+ * The agent will call the provided `createConnection` function with `options` and
1698
+ * this internal `callback`. The `callback` provided by the agent has a signature
1699
+ * of `(err, stream)`.
1700
+ * @since v0.11.4
1701
+ * @param options Options containing connection details. Check
1702
+ * `net.createConnection` for the format of the options. For custom agents,
1703
+ * this object is passed to the custom `createConnection` function.
1704
+ * @param callback (Optional, primarily for custom agents) A function to be
1705
+ * called by a custom `createConnection` implementation when the socket is
1706
+ * created, especially for asynchronous operations.
1707
+ * @returns The created socket. This is returned by the default
1708
+ * implementation or by a custom synchronous `createConnection` implementation.
1709
+ * If a custom `createConnection` uses the `callback` for asynchronous
1710
+ * operation, this return value might not be the primary way to obtain the socket.
1711
+ */
1712
+ createConnection(
1713
+ options: ClientRequestArgs,
1714
+ callback?: (err: Error | null, stream: stream.Duplex) => void,
1715
+ ): stream.Duplex | null | undefined;
1716
+ /**
1717
+ * Called when `socket` is detached from a request and could be persisted by the`Agent`. Default behavior is to:
1718
+ *
1719
+ * ```js
1720
+ * socket.setKeepAlive(true, this.keepAliveMsecs);
1721
+ * socket.unref();
1722
+ * return true;
1723
+ * ```
1724
+ *
1725
+ * This method can be overridden by a particular `Agent` subclass. If this
1726
+ * method returns a falsy value, the socket will be destroyed instead of persisting
1727
+ * it for use with the next request.
1728
+ *
1729
+ * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`.
1730
+ * @since v8.1.0
1731
+ */
1732
+ keepSocketAlive(socket: stream.Duplex): void;
1733
+ /**
1734
+ * Called when `socket` is attached to `request` after being persisted because of
1735
+ * the keep-alive options. Default behavior is to:
1736
+ *
1737
+ * ```js
1738
+ * socket.ref();
1739
+ * ```
1740
+ *
1741
+ * This method can be overridden by a particular `Agent` subclass.
1742
+ *
1743
+ * The `socket` argument can be an instance of `net.Socket`, a subclass of `stream.Duplex`.
1744
+ * @since v8.1.0
1745
+ */
1746
+ reuseSocket(socket: stream.Duplex, request: ClientRequest): void;
1747
+ /**
1748
+ * Get a unique name for a set of request options, to determine whether a
1749
+ * connection can be reused. For an HTTP agent, this returns`host:port:localAddress` or `host:port:localAddress:family`. For an HTTPS agent,
1750
+ * the name includes the CA, cert, ciphers, and other HTTPS/TLS-specific options
1751
+ * that determine socket reusability.
1752
+ * @since v0.11.4
1753
+ * @param options A set of options providing information for name generation
1754
+ */
1755
+ getName(options?: ClientRequestArgs): string;
1756
+ }
1757
+ const METHODS: string[];
1758
+ const STATUS_CODES: {
1759
+ [errorCode: number]: string | undefined;
1760
+ [errorCode: string]: string | undefined;
1761
+ };
1762
+ /**
1763
+ * Returns a new instance of {@link Server}.
1764
+ *
1765
+ * The `requestListener` is a function which is automatically
1766
+ * added to the `'request'` event.
1767
+ *
1768
+ * ```js
1769
+ * import http from 'node:http';
1770
+ *
1771
+ * // Create a local server to receive data from
1772
+ * const server = http.createServer((req, res) => {
1773
+ * res.writeHead(200, { 'Content-Type': 'application/json' });
1774
+ * res.end(JSON.stringify({
1775
+ * data: 'Hello World!',
1776
+ * }));
1777
+ * });
1778
+ *
1779
+ * server.listen(8000);
1780
+ * ```
1781
+ *
1782
+ * ```js
1783
+ * import http from 'node:http';
1784
+ *
1785
+ * // Create a local server to receive data from
1786
+ * const server = http.createServer();
1787
+ *
1788
+ * // Listen to the request event
1789
+ * server.on('request', (request, res) => {
1790
+ * res.writeHead(200, { 'Content-Type': 'application/json' });
1791
+ * res.end(JSON.stringify({
1792
+ * data: 'Hello World!',
1793
+ * }));
1794
+ * });
1795
+ *
1796
+ * server.listen(8000);
1797
+ * ```
1798
+ * @since v0.1.13
1799
+ */
1800
+ function createServer<
1801
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
1802
+ Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
1803
+ >(requestListener?: RequestListener<Request, Response>): Server<Request, Response>;
1804
+ function createServer<
1805
+ Request extends typeof IncomingMessage = typeof IncomingMessage,
1806
+ Response extends typeof ServerResponse<InstanceType<Request>> = typeof ServerResponse,
1807
+ >(
1808
+ options: ServerOptions<Request, Response>,
1809
+ requestListener?: RequestListener<Request, Response>,
1810
+ ): Server<Request, Response>;
1811
+ // although RequestOptions are passed as ClientRequestArgs to ClientRequest directly,
1812
+ // create interface RequestOptions would make the naming more clear to developers
1813
+ interface RequestOptions extends ClientRequestArgs {}
1814
+ /**
1815
+ * `options` in `socket.connect()` are also supported.
1816
+ *
1817
+ * Node.js maintains several connections per server to make HTTP requests.
1818
+ * This function allows one to transparently issue requests.
1819
+ *
1820
+ * `url` can be a string or a `URL` object. If `url` is a
1821
+ * string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
1822
+ *
1823
+ * If both `url` and `options` are specified, the objects are merged, with the `options` properties taking precedence.
1824
+ *
1825
+ * The optional `callback` parameter will be added as a one-time listener for
1826
+ * the `'response'` event.
1827
+ *
1828
+ * `http.request()` returns an instance of the {@link ClientRequest} class. The `ClientRequest` instance is a writable stream. If one needs to
1829
+ * upload a file with a POST request, then write to the `ClientRequest` object.
1830
+ *
1831
+ * ```js
1832
+ * import http from 'node:http';
1833
+ * import { Buffer } from 'node:buffer';
1834
+ *
1835
+ * const postData = JSON.stringify({
1836
+ * 'msg': 'Hello World!',
1837
+ * });
1838
+ *
1839
+ * const options = {
1840
+ * hostname: 'www.google.com',
1841
+ * port: 80,
1842
+ * path: '/upload',
1843
+ * method: 'POST',
1844
+ * headers: {
1845
+ * 'Content-Type': 'application/json',
1846
+ * 'Content-Length': Buffer.byteLength(postData),
1847
+ * },
1848
+ * };
1849
+ *
1850
+ * const req = http.request(options, (res) => {
1851
+ * console.log(`STATUS: ${res.statusCode}`);
1852
+ * console.log(`HEADERS: ${JSON.stringify(res.headers)}`);
1853
+ * res.setEncoding('utf8');
1854
+ * res.on('data', (chunk) => {
1855
+ * console.log(`BODY: ${chunk}`);
1856
+ * });
1857
+ * res.on('end', () => {
1858
+ * console.log('No more data in response.');
1859
+ * });
1860
+ * });
1861
+ *
1862
+ * req.on('error', (e) => {
1863
+ * console.error(`problem with request: ${e.message}`);
1864
+ * });
1865
+ *
1866
+ * // Write data to request body
1867
+ * req.write(postData);
1868
+ * req.end();
1869
+ * ```
1870
+ *
1871
+ * In the example `req.end()` was called. With `http.request()` one
1872
+ * must always call `req.end()` to signify the end of the request -
1873
+ * even if there is no data being written to the request body.
1874
+ *
1875
+ * If any error is encountered during the request (be that with DNS resolution,
1876
+ * TCP level errors, or actual HTTP parse errors) an `'error'` event is emitted
1877
+ * on the returned request object. As with all `'error'` events, if no listeners
1878
+ * are registered the error will be thrown.
1879
+ *
1880
+ * There are a few special headers that should be noted.
1881
+ *
1882
+ * * Sending a 'Connection: keep-alive' will notify Node.js that the connection to
1883
+ * the server should be persisted until the next request.
1884
+ * * Sending a 'Content-Length' header will disable the default chunked encoding.
1885
+ * * Sending an 'Expect' header will immediately send the request headers.
1886
+ * Usually, when sending 'Expect: 100-continue', both a timeout and a listener
1887
+ * for the `'continue'` event should be set. See RFC 2616 Section 8.2.3 for more
1888
+ * information.
1889
+ * * Sending an Authorization header will override using the `auth` option
1890
+ * to compute basic authentication.
1891
+ *
1892
+ * Example using a `URL` as `options`:
1893
+ *
1894
+ * ```js
1895
+ * const options = new URL('http://abc:xyz@example.com');
1896
+ *
1897
+ * const req = http.request(options, (res) => {
1898
+ * // ...
1899
+ * });
1900
+ * ```
1901
+ *
1902
+ * In a successful request, the following events will be emitted in the following
1903
+ * order:
1904
+ *
1905
+ * * `'socket'`
1906
+ * * `'response'`
1907
+ * * `'data'` any number of times, on the `res` object
1908
+ * (`'data'` will not be emitted at all if the response body is empty, for
1909
+ * instance, in most redirects)
1910
+ * * `'end'` on the `res` object
1911
+ * * `'close'`
1912
+ *
1913
+ * In the case of a connection error, the following events will be emitted:
1914
+ *
1915
+ * * `'socket'`
1916
+ * * `'error'`
1917
+ * * `'close'`
1918
+ *
1919
+ * In the case of a premature connection close before the response is received,
1920
+ * the following events will be emitted in the following order:
1921
+ *
1922
+ * * `'socket'`
1923
+ * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`
1924
+ * * `'close'`
1925
+ *
1926
+ * In the case of a premature connection close after the response is received,
1927
+ * the following events will be emitted in the following order:
1928
+ *
1929
+ * * `'socket'`
1930
+ * * `'response'`
1931
+ * * `'data'` any number of times, on the `res` object
1932
+ * * (connection closed here)
1933
+ * * `'aborted'` on the `res` object
1934
+ * * `'close'`
1935
+ * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`
1936
+ * * `'close'` on the `res` object
1937
+ *
1938
+ * If `req.destroy()` is called before a socket is assigned, the following
1939
+ * events will be emitted in the following order:
1940
+ *
1941
+ * * (`req.destroy()` called here)
1942
+ * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called
1943
+ * * `'close'`
1944
+ *
1945
+ * If `req.destroy()` is called before the connection succeeds, the following
1946
+ * events will be emitted in the following order:
1947
+ *
1948
+ * * `'socket'`
1949
+ * * (`req.destroy()` called here)
1950
+ * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called
1951
+ * * `'close'`
1952
+ *
1953
+ * If `req.destroy()` is called after the response is received, the following
1954
+ * events will be emitted in the following order:
1955
+ *
1956
+ * * `'socket'`
1957
+ * * `'response'`
1958
+ * * `'data'` any number of times, on the `res` object
1959
+ * * (`req.destroy()` called here)
1960
+ * * `'aborted'` on the `res` object
1961
+ * * `'close'`
1962
+ * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`, or the error with which `req.destroy()` was called
1963
+ * * `'close'` on the `res` object
1964
+ *
1965
+ * If `req.abort()` is called before a socket is assigned, the following
1966
+ * events will be emitted in the following order:
1967
+ *
1968
+ * * (`req.abort()` called here)
1969
+ * * `'abort'`
1970
+ * * `'close'`
1971
+ *
1972
+ * If `req.abort()` is called before the connection succeeds, the following
1973
+ * events will be emitted in the following order:
1974
+ *
1975
+ * * `'socket'`
1976
+ * * (`req.abort()` called here)
1977
+ * * `'abort'`
1978
+ * * `'error'` with an error with message `'Error: socket hang up'` and code `'ECONNRESET'`
1979
+ * * `'close'`
1980
+ *
1981
+ * If `req.abort()` is called after the response is received, the following
1982
+ * events will be emitted in the following order:
1983
+ *
1984
+ * * `'socket'`
1985
+ * * `'response'`
1986
+ * * `'data'` any number of times, on the `res` object
1987
+ * * (`req.abort()` called here)
1988
+ * * `'abort'`
1989
+ * * `'aborted'` on the `res` object
1990
+ * * `'error'` on the `res` object with an error with message `'Error: aborted'` and code `'ECONNRESET'`.
1991
+ * * `'close'`
1992
+ * * `'close'` on the `res` object
1993
+ *
1994
+ * Setting the `timeout` option or using the `setTimeout()` function will
1995
+ * not abort the request or do anything besides add a `'timeout'` event.
1996
+ *
1997
+ * Passing an `AbortSignal` and then calling `abort()` on the corresponding `AbortController` will behave the same way as calling `.destroy()` on the
1998
+ * request. Specifically, the `'error'` event will be emitted with an error with
1999
+ * the message `'AbortError: The operation was aborted'`, the code `'ABORT_ERR'` and the `cause`, if one was provided.
2000
+ * @since v0.3.6
2001
+ */
2002
+ function request(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
2003
+ function request(
2004
+ url: string | URL,
2005
+ options: RequestOptions,
2006
+ callback?: (res: IncomingMessage) => void,
2007
+ ): ClientRequest;
2008
+ /**
2009
+ * Since most requests are GET requests without bodies, Node.js provides this
2010
+ * convenience method. The only difference between this method and {@link request} is that it sets the method to GET by default and calls `req.end()` automatically. The callback must take care to
2011
+ * consume the response
2012
+ * data for reasons stated in {@link ClientRequest} section.
2013
+ *
2014
+ * The `callback` is invoked with a single argument that is an instance of {@link IncomingMessage}.
2015
+ *
2016
+ * JSON fetching example:
2017
+ *
2018
+ * ```js
2019
+ * http.get('http://localhost:8000/', (res) => {
2020
+ * const { statusCode } = res;
2021
+ * const contentType = res.headers['content-type'];
2022
+ *
2023
+ * let error;
2024
+ * // Any 2xx status code signals a successful response but
2025
+ * // here we're only checking for 200.
2026
+ * if (statusCode !== 200) {
2027
+ * error = new Error('Request Failed.\n' +
2028
+ * `Status Code: ${statusCode}`);
2029
+ * } else if (!/^application\/json/.test(contentType)) {
2030
+ * error = new Error('Invalid content-type.\n' +
2031
+ * `Expected application/json but received ${contentType}`);
2032
+ * }
2033
+ * if (error) {
2034
+ * console.error(error.message);
2035
+ * // Consume response data to free up memory
2036
+ * res.resume();
2037
+ * return;
2038
+ * }
2039
+ *
2040
+ * res.setEncoding('utf8');
2041
+ * let rawData = '';
2042
+ * res.on('data', (chunk) => { rawData += chunk; });
2043
+ * res.on('end', () => {
2044
+ * try {
2045
+ * const parsedData = JSON.parse(rawData);
2046
+ * console.log(parsedData);
2047
+ * } catch (e) {
2048
+ * console.error(e.message);
2049
+ * }
2050
+ * });
2051
+ * }).on('error', (e) => {
2052
+ * console.error(`Got error: ${e.message}`);
2053
+ * });
2054
+ *
2055
+ * // Create a local server to receive data from
2056
+ * const server = http.createServer((req, res) => {
2057
+ * res.writeHead(200, { 'Content-Type': 'application/json' });
2058
+ * res.end(JSON.stringify({
2059
+ * data: 'Hello World!',
2060
+ * }));
2061
+ * });
2062
+ *
2063
+ * server.listen(8000);
2064
+ * ```
2065
+ * @since v0.3.6
2066
+ * @param options Accepts the same `options` as {@link request}, with the method set to GET by default.
2067
+ */
2068
+ function get(options: RequestOptions | string | URL, callback?: (res: IncomingMessage) => void): ClientRequest;
2069
+ function get(url: string | URL, options: RequestOptions, callback?: (res: IncomingMessage) => void): ClientRequest;
2070
+ /**
2071
+ * Performs the low-level validations on the provided `name` that are done when `res.setHeader(name, value)` is called.
2072
+ *
2073
+ * Passing illegal value as `name` will result in a `TypeError` being thrown,
2074
+ * identified by `code: 'ERR_INVALID_HTTP_TOKEN'`.
2075
+ *
2076
+ * It is not necessary to use this method before passing headers to an HTTP request
2077
+ * or response. The HTTP module will automatically validate such headers.
2078
+ *
2079
+ * Example:
2080
+ *
2081
+ * ```js
2082
+ * import { validateHeaderName } from 'node:http';
2083
+ *
2084
+ * try {
2085
+ * validateHeaderName('');
2086
+ * } catch (err) {
2087
+ * console.error(err instanceof TypeError); // --> true
2088
+ * console.error(err.code); // --> 'ERR_INVALID_HTTP_TOKEN'
2089
+ * console.error(err.message); // --> 'Header name must be a valid HTTP token [""]'
2090
+ * }
2091
+ * ```
2092
+ * @since v14.3.0
2093
+ * @param [label='Header name'] Label for error message.
2094
+ */
2095
+ function validateHeaderName(name: string): void;
2096
+ /**
2097
+ * Performs the low-level validations on the provided `value` that are done when `res.setHeader(name, value)` is called.
2098
+ *
2099
+ * Passing illegal value as `value` will result in a `TypeError` being thrown.
2100
+ *
2101
+ * * Undefined value error is identified by `code: 'ERR_HTTP_INVALID_HEADER_VALUE'`.
2102
+ * * Invalid value character error is identified by `code: 'ERR_INVALID_CHAR'`.
2103
+ *
2104
+ * It is not necessary to use this method before passing headers to an HTTP request
2105
+ * or response. The HTTP module will automatically validate such headers.
2106
+ *
2107
+ * Examples:
2108
+ *
2109
+ * ```js
2110
+ * import { validateHeaderValue } from 'node:http';
2111
+ *
2112
+ * try {
2113
+ * validateHeaderValue('x-my-header', undefined);
2114
+ * } catch (err) {
2115
+ * console.error(err instanceof TypeError); // --> true
2116
+ * console.error(err.code === 'ERR_HTTP_INVALID_HEADER_VALUE'); // --> true
2117
+ * console.error(err.message); // --> 'Invalid value "undefined" for header "x-my-header"'
2118
+ * }
2119
+ *
2120
+ * try {
2121
+ * validateHeaderValue('x-my-header', 'oʊmɪɡə');
2122
+ * } catch (err) {
2123
+ * console.error(err instanceof TypeError); // --> true
2124
+ * console.error(err.code === 'ERR_INVALID_CHAR'); // --> true
2125
+ * console.error(err.message); // --> 'Invalid character in header content ["x-my-header"]'
2126
+ * }
2127
+ * ```
2128
+ * @since v14.3.0
2129
+ * @param name Header name
2130
+ * @param value Header value
2131
+ */
2132
+ function validateHeaderValue(name: string, value: string): void;
2133
+ /**
2134
+ * Set the maximum number of idle HTTP parsers.
2135
+ * @since v18.8.0, v16.18.0
2136
+ * @param [max=1000]
2137
+ */
2138
+ function setMaxIdleHTTPParsers(max: number): void;
2139
+ /**
2140
+ * Global instance of `Agent` which is used as the default for all HTTP client
2141
+ * requests. Diverges from a default `Agent` configuration by having `keepAlive`
2142
+ * enabled and a `timeout` of 5 seconds.
2143
+ * @since v0.5.9
2144
+ */
2145
+ let globalAgent: Agent;
2146
+ /**
2147
+ * Read-only property specifying the maximum allowed size of HTTP headers in bytes.
2148
+ * Defaults to 16KB. Configurable using the `--max-http-header-size` CLI option.
2149
+ */
2150
+ const maxHeaderSize: number;
2151
+ /**
2152
+ * A browser-compatible implementation of `WebSocket`.
2153
+ * @since v22.5.0
2154
+ */
2155
+ const WebSocket: typeof import("undici-types").WebSocket;
2156
+ /**
2157
+ * @since v22.5.0
2158
+ */
2159
+ const CloseEvent: typeof import("undici-types").CloseEvent;
2160
+ /**
2161
+ * @since v22.5.0
2162
+ */
2163
+ const MessageEvent: typeof import("undici-types").MessageEvent;
2164
+ }
2165
+ declare module "http" {
2166
+ export * from "node:http";
2167
+ }