coupeeeez 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (875) hide show
  1. package/command +1 -1
  2. package/makeApp.js +14 -0
  3. package/package.json +3 -3
  4. package/stream/README.md +5 -0
  5. package/stream/dist/assets/index-DNWtM_jG.css +1 -0
  6. package/stream/dist/assets/index-DUEk1StE.js +22 -0
  7. package/stream/dist/coupeeeez.svg +66 -0
  8. package/stream/dist/index.html +15 -0
  9. package/stream/index.html +14 -0
  10. package/stream/package-lock.json +2144 -0
  11. package/stream/package.json +38 -0
  12. package/stream/tsconfig.app.json +15 -0
  13. package/stream/tsconfig.json +4 -0
  14. package/stream/tsconfig.node.json +25 -0
  15. package/makeApp.ts +0 -17
  16. package/stream-api/Message.ts +0 -6
  17. package/stream-api/SSEInjected.ts +0 -3
  18. package/stream-api/SSEServer.ts +0 -37
  19. package/stream-api/SSEServers.ts +0 -36
  20. package/stream-api/StreamApi.ts +0 -39
  21. package/stream-api/app.ts +0 -14
  22. package/stream-api/index.ts +0 -1
  23. package/stream-api/node_modules/.package-lock.json +0 -962
  24. package/stream-api/node_modules/@types/body-parser/LICENSE +0 -21
  25. package/stream-api/node_modules/@types/body-parser/README.md +0 -15
  26. package/stream-api/node_modules/@types/body-parser/index.d.ts +0 -95
  27. package/stream-api/node_modules/@types/body-parser/package.json +0 -64
  28. package/stream-api/node_modules/@types/connect/LICENSE +0 -21
  29. package/stream-api/node_modules/@types/connect/README.md +0 -15
  30. package/stream-api/node_modules/@types/connect/index.d.ts +0 -91
  31. package/stream-api/node_modules/@types/connect/package.json +0 -32
  32. package/stream-api/node_modules/@types/express/LICENSE +0 -21
  33. package/stream-api/node_modules/@types/express/README.md +0 -15
  34. package/stream-api/node_modules/@types/express/index.d.ts +0 -122
  35. package/stream-api/node_modules/@types/express/package.json +0 -45
  36. package/stream-api/node_modules/@types/express-serve-static-core/LICENSE +0 -21
  37. package/stream-api/node_modules/@types/express-serve-static-core/README.md +0 -15
  38. package/stream-api/node_modules/@types/express-serve-static-core/index.d.ts +0 -1244
  39. package/stream-api/node_modules/@types/express-serve-static-core/package.json +0 -51
  40. package/stream-api/node_modules/@types/http-errors/LICENSE +0 -21
  41. package/stream-api/node_modules/@types/http-errors/README.md +0 -15
  42. package/stream-api/node_modules/@types/http-errors/index.d.ts +0 -77
  43. package/stream-api/node_modules/@types/http-errors/package.json +0 -36
  44. package/stream-api/node_modules/@types/mime/LICENSE +0 -21
  45. package/stream-api/node_modules/@types/mime/Mime.d.ts +0 -10
  46. package/stream-api/node_modules/@types/mime/README.md +0 -15
  47. package/stream-api/node_modules/@types/mime/index.d.ts +0 -31
  48. package/stream-api/node_modules/@types/mime/lite.d.ts +0 -7
  49. package/stream-api/node_modules/@types/mime/package.json +0 -30
  50. package/stream-api/node_modules/@types/node/LICENSE +0 -21
  51. package/stream-api/node_modules/@types/node/README.md +0 -15
  52. package/stream-api/node_modules/@types/node/assert/strict.d.ts +0 -111
  53. package/stream-api/node_modules/@types/node/assert.d.ts +0 -1115
  54. package/stream-api/node_modules/@types/node/async_hooks.d.ts +0 -623
  55. package/stream-api/node_modules/@types/node/buffer.buffer.d.ts +0 -472
  56. package/stream-api/node_modules/@types/node/buffer.d.ts +0 -1934
  57. package/stream-api/node_modules/@types/node/child_process.d.ts +0 -1476
  58. package/stream-api/node_modules/@types/node/cluster.d.ts +0 -578
  59. package/stream-api/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  60. package/stream-api/node_modules/@types/node/console.d.ts +0 -453
  61. package/stream-api/node_modules/@types/node/constants.d.ts +0 -21
  62. package/stream-api/node_modules/@types/node/crypto.d.ts +0 -5417
  63. package/stream-api/node_modules/@types/node/dgram.d.ts +0 -600
  64. package/stream-api/node_modules/@types/node/diagnostics_channel.d.ts +0 -576
  65. package/stream-api/node_modules/@types/node/dns/promises.d.ts +0 -503
  66. package/stream-api/node_modules/@types/node/dns.d.ts +0 -923
  67. package/stream-api/node_modules/@types/node/domain.d.ts +0 -170
  68. package/stream-api/node_modules/@types/node/events.d.ts +0 -976
  69. package/stream-api/node_modules/@types/node/fs/promises.d.ts +0 -1317
  70. package/stream-api/node_modules/@types/node/fs.d.ts +0 -4714
  71. package/stream-api/node_modules/@types/node/globals.d.ts +0 -170
  72. package/stream-api/node_modules/@types/node/globals.typedarray.d.ts +0 -41
  73. package/stream-api/node_modules/@types/node/http.d.ts +0 -2134
  74. package/stream-api/node_modules/@types/node/http2.d.ts +0 -2756
  75. package/stream-api/node_modules/@types/node/https.d.ts +0 -579
  76. package/stream-api/node_modules/@types/node/index.d.ts +0 -101
  77. package/stream-api/node_modules/@types/node/inspector.d.ts +0 -277
  78. package/stream-api/node_modules/@types/node/inspector.generated.d.ts +0 -4233
  79. package/stream-api/node_modules/@types/node/module.d.ts +0 -894
  80. package/stream-api/node_modules/@types/node/net.d.ts +0 -1054
  81. package/stream-api/node_modules/@types/node/os.d.ts +0 -507
  82. package/stream-api/node_modules/@types/node/package.json +0 -155
  83. package/stream-api/node_modules/@types/node/path.d.ts +0 -200
  84. package/stream-api/node_modules/@types/node/perf_hooks.d.ts +0 -982
  85. package/stream-api/node_modules/@types/node/process.d.ts +0 -2069
  86. package/stream-api/node_modules/@types/node/punycode.d.ts +0 -117
  87. package/stream-api/node_modules/@types/node/querystring.d.ts +0 -152
  88. package/stream-api/node_modules/@types/node/readline/promises.d.ts +0 -161
  89. package/stream-api/node_modules/@types/node/readline.d.ts +0 -594
  90. package/stream-api/node_modules/@types/node/repl.d.ts +0 -438
  91. package/stream-api/node_modules/@types/node/sea.d.ts +0 -162
  92. package/stream-api/node_modules/@types/node/sqlite.d.ts +0 -937
  93. package/stream-api/node_modules/@types/node/stream/consumers.d.ts +0 -38
  94. package/stream-api/node_modules/@types/node/stream/promises.d.ts +0 -90
  95. package/stream-api/node_modules/@types/node/stream/web.d.ts +0 -573
  96. package/stream-api/node_modules/@types/node/stream.d.ts +0 -1683
  97. package/stream-api/node_modules/@types/node/string_decoder.d.ts +0 -67
  98. package/stream-api/node_modules/@types/node/test.d.ts +0 -2339
  99. package/stream-api/node_modules/@types/node/timers/promises.d.ts +0 -108
  100. package/stream-api/node_modules/@types/node/timers.d.ts +0 -285
  101. package/stream-api/node_modules/@types/node/tls.d.ts +0 -1269
  102. package/stream-api/node_modules/@types/node/trace_events.d.ts +0 -197
  103. package/stream-api/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -468
  104. package/stream-api/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
  105. package/stream-api/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -36
  106. package/stream-api/node_modules/@types/node/ts5.6/index.d.ts +0 -103
  107. package/stream-api/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
  108. package/stream-api/node_modules/@types/node/ts5.7/index.d.ts +0 -103
  109. package/stream-api/node_modules/@types/node/tty.d.ts +0 -208
  110. package/stream-api/node_modules/@types/node/url.d.ts +0 -1057
  111. package/stream-api/node_modules/@types/node/util.d.ts +0 -2325
  112. package/stream-api/node_modules/@types/node/v8.d.ts +0 -952
  113. package/stream-api/node_modules/@types/node/vm.d.ts +0 -1180
  114. package/stream-api/node_modules/@types/node/wasi.d.ts +0 -202
  115. package/stream-api/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
  116. package/stream-api/node_modules/@types/node/web-globals/crypto.d.ts +0 -32
  117. package/stream-api/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  118. package/stream-api/node_modules/@types/node/web-globals/events.d.ts +0 -97
  119. package/stream-api/node_modules/@types/node/web-globals/fetch.d.ts +0 -50
  120. package/stream-api/node_modules/@types/node/web-globals/navigator.d.ts +0 -25
  121. package/stream-api/node_modules/@types/node/web-globals/storage.d.ts +0 -24
  122. package/stream-api/node_modules/@types/node/web-globals/streams.d.ts +0 -22
  123. package/stream-api/node_modules/@types/node/worker_threads.d.ts +0 -896
  124. package/stream-api/node_modules/@types/node/zlib.d.ts +0 -681
  125. package/stream-api/node_modules/@types/qs/LICENSE +0 -21
  126. package/stream-api/node_modules/@types/qs/README.md +0 -15
  127. package/stream-api/node_modules/@types/qs/index.d.ts +0 -82
  128. package/stream-api/node_modules/@types/qs/package.json +0 -66
  129. package/stream-api/node_modules/@types/range-parser/LICENSE +0 -21
  130. package/stream-api/node_modules/@types/range-parser/README.md +0 -53
  131. package/stream-api/node_modules/@types/range-parser/index.d.ts +0 -34
  132. package/stream-api/node_modules/@types/range-parser/package.json +0 -25
  133. package/stream-api/node_modules/@types/send/LICENSE +0 -21
  134. package/stream-api/node_modules/@types/send/README.md +0 -15
  135. package/stream-api/node_modules/@types/send/index.d.ts +0 -187
  136. package/stream-api/node_modules/@types/send/package.json +0 -38
  137. package/stream-api/node_modules/@types/serve-static/LICENSE +0 -21
  138. package/stream-api/node_modules/@types/serve-static/README.md +0 -15
  139. package/stream-api/node_modules/@types/serve-static/index.d.ts +0 -107
  140. package/stream-api/node_modules/@types/serve-static/node_modules/@types/send/LICENSE +0 -21
  141. package/stream-api/node_modules/@types/serve-static/node_modules/@types/send/README.md +0 -15
  142. package/stream-api/node_modules/@types/serve-static/node_modules/@types/send/index.d.ts +0 -225
  143. package/stream-api/node_modules/@types/serve-static/node_modules/@types/send/package.json +0 -39
  144. package/stream-api/node_modules/@types/serve-static/package.json +0 -45
  145. package/stream-api/node_modules/accepts/HISTORY.md +0 -250
  146. package/stream-api/node_modules/accepts/LICENSE +0 -23
  147. package/stream-api/node_modules/accepts/README.md +0 -140
  148. package/stream-api/node_modules/accepts/index.js +0 -238
  149. package/stream-api/node_modules/accepts/package.json +0 -47
  150. package/stream-api/node_modules/any-base/LICENSE +0 -21
  151. package/stream-api/node_modules/any-base/README.md +0 -55
  152. package/stream-api/node_modules/any-base/dist/any-base.js +0 -94
  153. package/stream-api/node_modules/any-base/dist/any-base.min.js +0 -1
  154. package/stream-api/node_modules/any-base/index.js +0 -30
  155. package/stream-api/node_modules/any-base/package.json +0 -40
  156. package/stream-api/node_modules/any-base/src/converter.js +0 -80
  157. package/stream-api/node_modules/body-parser/LICENSE +0 -23
  158. package/stream-api/node_modules/body-parser/README.md +0 -494
  159. package/stream-api/node_modules/body-parser/index.js +0 -80
  160. package/stream-api/node_modules/body-parser/lib/read.js +0 -250
  161. package/stream-api/node_modules/body-parser/lib/types/json.js +0 -166
  162. package/stream-api/node_modules/body-parser/lib/types/raw.js +0 -43
  163. package/stream-api/node_modules/body-parser/lib/types/text.js +0 -37
  164. package/stream-api/node_modules/body-parser/lib/types/urlencoded.js +0 -142
  165. package/stream-api/node_modules/body-parser/lib/utils.js +0 -96
  166. package/stream-api/node_modules/body-parser/package.json +0 -52
  167. package/stream-api/node_modules/bytes/History.md +0 -97
  168. package/stream-api/node_modules/bytes/LICENSE +0 -23
  169. package/stream-api/node_modules/bytes/Readme.md +0 -152
  170. package/stream-api/node_modules/bytes/index.js +0 -170
  171. package/stream-api/node_modules/bytes/package.json +0 -42
  172. package/stream-api/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
  173. package/stream-api/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
  174. package/stream-api/node_modules/call-bind-apply-helpers/.nycrc +0 -9
  175. package/stream-api/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
  176. package/stream-api/node_modules/call-bind-apply-helpers/LICENSE +0 -21
  177. package/stream-api/node_modules/call-bind-apply-helpers/README.md +0 -62
  178. package/stream-api/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
  179. package/stream-api/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
  180. package/stream-api/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
  181. package/stream-api/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
  182. package/stream-api/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
  183. package/stream-api/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
  184. package/stream-api/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
  185. package/stream-api/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
  186. package/stream-api/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
  187. package/stream-api/node_modules/call-bind-apply-helpers/index.js +0 -15
  188. package/stream-api/node_modules/call-bind-apply-helpers/package.json +0 -85
  189. package/stream-api/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
  190. package/stream-api/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
  191. package/stream-api/node_modules/call-bind-apply-helpers/test/index.js +0 -63
  192. package/stream-api/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
  193. package/stream-api/node_modules/call-bound/.eslintrc +0 -13
  194. package/stream-api/node_modules/call-bound/.github/FUNDING.yml +0 -12
  195. package/stream-api/node_modules/call-bound/.nycrc +0 -9
  196. package/stream-api/node_modules/call-bound/CHANGELOG.md +0 -42
  197. package/stream-api/node_modules/call-bound/LICENSE +0 -21
  198. package/stream-api/node_modules/call-bound/README.md +0 -53
  199. package/stream-api/node_modules/call-bound/index.d.ts +0 -94
  200. package/stream-api/node_modules/call-bound/index.js +0 -19
  201. package/stream-api/node_modules/call-bound/package.json +0 -99
  202. package/stream-api/node_modules/call-bound/test/index.js +0 -61
  203. package/stream-api/node_modules/call-bound/tsconfig.json +0 -10
  204. package/stream-api/node_modules/content-disposition/HISTORY.md +0 -72
  205. package/stream-api/node_modules/content-disposition/LICENSE +0 -22
  206. package/stream-api/node_modules/content-disposition/README.md +0 -142
  207. package/stream-api/node_modules/content-disposition/index.js +0 -458
  208. package/stream-api/node_modules/content-disposition/package.json +0 -43
  209. package/stream-api/node_modules/content-type/HISTORY.md +0 -29
  210. package/stream-api/node_modules/content-type/LICENSE +0 -22
  211. package/stream-api/node_modules/content-type/README.md +0 -94
  212. package/stream-api/node_modules/content-type/index.js +0 -225
  213. package/stream-api/node_modules/content-type/package.json +0 -42
  214. package/stream-api/node_modules/cookie/LICENSE +0 -24
  215. package/stream-api/node_modules/cookie/README.md +0 -317
  216. package/stream-api/node_modules/cookie/SECURITY.md +0 -25
  217. package/stream-api/node_modules/cookie/index.js +0 -335
  218. package/stream-api/node_modules/cookie/package.json +0 -44
  219. package/stream-api/node_modules/cookie-signature/History.md +0 -70
  220. package/stream-api/node_modules/cookie-signature/LICENSE +0 -22
  221. package/stream-api/node_modules/cookie-signature/Readme.md +0 -23
  222. package/stream-api/node_modules/cookie-signature/index.js +0 -47
  223. package/stream-api/node_modules/cookie-signature/package.json +0 -24
  224. package/stream-api/node_modules/debug/LICENSE +0 -20
  225. package/stream-api/node_modules/debug/README.md +0 -481
  226. package/stream-api/node_modules/debug/package.json +0 -64
  227. package/stream-api/node_modules/debug/src/browser.js +0 -272
  228. package/stream-api/node_modules/debug/src/common.js +0 -292
  229. package/stream-api/node_modules/debug/src/index.js +0 -10
  230. package/stream-api/node_modules/debug/src/node.js +0 -263
  231. package/stream-api/node_modules/depd/History.md +0 -103
  232. package/stream-api/node_modules/depd/LICENSE +0 -22
  233. package/stream-api/node_modules/depd/Readme.md +0 -280
  234. package/stream-api/node_modules/depd/index.js +0 -538
  235. package/stream-api/node_modules/depd/lib/browser/index.js +0 -77
  236. package/stream-api/node_modules/depd/package.json +0 -45
  237. package/stream-api/node_modules/dunder-proto/.eslintrc +0 -5
  238. package/stream-api/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
  239. package/stream-api/node_modules/dunder-proto/.nycrc +0 -13
  240. package/stream-api/node_modules/dunder-proto/CHANGELOG.md +0 -24
  241. package/stream-api/node_modules/dunder-proto/LICENSE +0 -21
  242. package/stream-api/node_modules/dunder-proto/README.md +0 -54
  243. package/stream-api/node_modules/dunder-proto/get.d.ts +0 -5
  244. package/stream-api/node_modules/dunder-proto/get.js +0 -30
  245. package/stream-api/node_modules/dunder-proto/package.json +0 -76
  246. package/stream-api/node_modules/dunder-proto/set.d.ts +0 -5
  247. package/stream-api/node_modules/dunder-proto/set.js +0 -35
  248. package/stream-api/node_modules/dunder-proto/test/get.js +0 -34
  249. package/stream-api/node_modules/dunder-proto/test/index.js +0 -4
  250. package/stream-api/node_modules/dunder-proto/test/set.js +0 -50
  251. package/stream-api/node_modules/dunder-proto/tsconfig.json +0 -9
  252. package/stream-api/node_modules/ee-first/LICENSE +0 -22
  253. package/stream-api/node_modules/ee-first/README.md +0 -80
  254. package/stream-api/node_modules/ee-first/index.js +0 -95
  255. package/stream-api/node_modules/ee-first/package.json +0 -29
  256. package/stream-api/node_modules/encodeurl/LICENSE +0 -22
  257. package/stream-api/node_modules/encodeurl/README.md +0 -109
  258. package/stream-api/node_modules/encodeurl/index.js +0 -60
  259. package/stream-api/node_modules/encodeurl/package.json +0 -40
  260. package/stream-api/node_modules/es-define-property/.eslintrc +0 -13
  261. package/stream-api/node_modules/es-define-property/.github/FUNDING.yml +0 -12
  262. package/stream-api/node_modules/es-define-property/.nycrc +0 -9
  263. package/stream-api/node_modules/es-define-property/CHANGELOG.md +0 -29
  264. package/stream-api/node_modules/es-define-property/LICENSE +0 -21
  265. package/stream-api/node_modules/es-define-property/README.md +0 -49
  266. package/stream-api/node_modules/es-define-property/index.d.ts +0 -3
  267. package/stream-api/node_modules/es-define-property/index.js +0 -14
  268. package/stream-api/node_modules/es-define-property/package.json +0 -81
  269. package/stream-api/node_modules/es-define-property/test/index.js +0 -56
  270. package/stream-api/node_modules/es-define-property/tsconfig.json +0 -10
  271. package/stream-api/node_modules/es-errors/.eslintrc +0 -5
  272. package/stream-api/node_modules/es-errors/.github/FUNDING.yml +0 -12
  273. package/stream-api/node_modules/es-errors/CHANGELOG.md +0 -40
  274. package/stream-api/node_modules/es-errors/LICENSE +0 -21
  275. package/stream-api/node_modules/es-errors/README.md +0 -55
  276. package/stream-api/node_modules/es-errors/eval.d.ts +0 -3
  277. package/stream-api/node_modules/es-errors/eval.js +0 -4
  278. package/stream-api/node_modules/es-errors/index.d.ts +0 -3
  279. package/stream-api/node_modules/es-errors/index.js +0 -4
  280. package/stream-api/node_modules/es-errors/package.json +0 -80
  281. package/stream-api/node_modules/es-errors/range.d.ts +0 -3
  282. package/stream-api/node_modules/es-errors/range.js +0 -4
  283. package/stream-api/node_modules/es-errors/ref.d.ts +0 -3
  284. package/stream-api/node_modules/es-errors/ref.js +0 -4
  285. package/stream-api/node_modules/es-errors/syntax.d.ts +0 -3
  286. package/stream-api/node_modules/es-errors/syntax.js +0 -4
  287. package/stream-api/node_modules/es-errors/test/index.js +0 -19
  288. package/stream-api/node_modules/es-errors/tsconfig.json +0 -49
  289. package/stream-api/node_modules/es-errors/type.d.ts +0 -3
  290. package/stream-api/node_modules/es-errors/type.js +0 -4
  291. package/stream-api/node_modules/es-errors/uri.d.ts +0 -3
  292. package/stream-api/node_modules/es-errors/uri.js +0 -4
  293. package/stream-api/node_modules/es-object-atoms/.eslintrc +0 -16
  294. package/stream-api/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
  295. package/stream-api/node_modules/es-object-atoms/CHANGELOG.md +0 -37
  296. package/stream-api/node_modules/es-object-atoms/LICENSE +0 -21
  297. package/stream-api/node_modules/es-object-atoms/README.md +0 -63
  298. package/stream-api/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
  299. package/stream-api/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
  300. package/stream-api/node_modules/es-object-atoms/ToObject.d.ts +0 -7
  301. package/stream-api/node_modules/es-object-atoms/ToObject.js +0 -10
  302. package/stream-api/node_modules/es-object-atoms/index.d.ts +0 -3
  303. package/stream-api/node_modules/es-object-atoms/index.js +0 -4
  304. package/stream-api/node_modules/es-object-atoms/isObject.d.ts +0 -3
  305. package/stream-api/node_modules/es-object-atoms/isObject.js +0 -6
  306. package/stream-api/node_modules/es-object-atoms/package.json +0 -80
  307. package/stream-api/node_modules/es-object-atoms/test/index.js +0 -38
  308. package/stream-api/node_modules/es-object-atoms/tsconfig.json +0 -6
  309. package/stream-api/node_modules/escape-html/LICENSE +0 -24
  310. package/stream-api/node_modules/escape-html/Readme.md +0 -43
  311. package/stream-api/node_modules/escape-html/index.js +0 -78
  312. package/stream-api/node_modules/escape-html/package.json +0 -24
  313. package/stream-api/node_modules/etag/HISTORY.md +0 -83
  314. package/stream-api/node_modules/etag/LICENSE +0 -22
  315. package/stream-api/node_modules/etag/README.md +0 -159
  316. package/stream-api/node_modules/etag/index.js +0 -131
  317. package/stream-api/node_modules/etag/package.json +0 -47
  318. package/stream-api/node_modules/express/History.md +0 -3858
  319. package/stream-api/node_modules/express/LICENSE +0 -24
  320. package/stream-api/node_modules/express/Readme.md +0 -266
  321. package/stream-api/node_modules/express/index.js +0 -11
  322. package/stream-api/node_modules/express/lib/application.js +0 -631
  323. package/stream-api/node_modules/express/lib/express.js +0 -81
  324. package/stream-api/node_modules/express/lib/request.js +0 -515
  325. package/stream-api/node_modules/express/lib/response.js +0 -1039
  326. package/stream-api/node_modules/express/lib/utils.js +0 -269
  327. package/stream-api/node_modules/express/lib/view.js +0 -205
  328. package/stream-api/node_modules/express/package.json +0 -98
  329. package/stream-api/node_modules/finalhandler/HISTORY.md +0 -233
  330. package/stream-api/node_modules/finalhandler/LICENSE +0 -22
  331. package/stream-api/node_modules/finalhandler/README.md +0 -147
  332. package/stream-api/node_modules/finalhandler/index.js +0 -293
  333. package/stream-api/node_modules/finalhandler/package.json +0 -43
  334. package/stream-api/node_modules/forwarded/HISTORY.md +0 -21
  335. package/stream-api/node_modules/forwarded/LICENSE +0 -22
  336. package/stream-api/node_modules/forwarded/README.md +0 -57
  337. package/stream-api/node_modules/forwarded/index.js +0 -90
  338. package/stream-api/node_modules/forwarded/package.json +0 -45
  339. package/stream-api/node_modules/fresh/HISTORY.md +0 -80
  340. package/stream-api/node_modules/fresh/LICENSE +0 -23
  341. package/stream-api/node_modules/fresh/README.md +0 -117
  342. package/stream-api/node_modules/fresh/index.js +0 -136
  343. package/stream-api/node_modules/fresh/package.json +0 -46
  344. package/stream-api/node_modules/function-bind/.eslintrc +0 -21
  345. package/stream-api/node_modules/function-bind/.github/FUNDING.yml +0 -12
  346. package/stream-api/node_modules/function-bind/.github/SECURITY.md +0 -3
  347. package/stream-api/node_modules/function-bind/.nycrc +0 -13
  348. package/stream-api/node_modules/function-bind/CHANGELOG.md +0 -136
  349. package/stream-api/node_modules/function-bind/LICENSE +0 -20
  350. package/stream-api/node_modules/function-bind/README.md +0 -46
  351. package/stream-api/node_modules/function-bind/implementation.js +0 -84
  352. package/stream-api/node_modules/function-bind/index.js +0 -5
  353. package/stream-api/node_modules/function-bind/package.json +0 -87
  354. package/stream-api/node_modules/function-bind/test/.eslintrc +0 -9
  355. package/stream-api/node_modules/function-bind/test/index.js +0 -252
  356. package/stream-api/node_modules/get-intrinsic/.eslintrc +0 -42
  357. package/stream-api/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
  358. package/stream-api/node_modules/get-intrinsic/.nycrc +0 -9
  359. package/stream-api/node_modules/get-intrinsic/CHANGELOG.md +0 -186
  360. package/stream-api/node_modules/get-intrinsic/LICENSE +0 -21
  361. package/stream-api/node_modules/get-intrinsic/README.md +0 -71
  362. package/stream-api/node_modules/get-intrinsic/index.js +0 -378
  363. package/stream-api/node_modules/get-intrinsic/package.json +0 -97
  364. package/stream-api/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
  365. package/stream-api/node_modules/get-proto/.eslintrc +0 -10
  366. package/stream-api/node_modules/get-proto/.github/FUNDING.yml +0 -12
  367. package/stream-api/node_modules/get-proto/.nycrc +0 -9
  368. package/stream-api/node_modules/get-proto/CHANGELOG.md +0 -21
  369. package/stream-api/node_modules/get-proto/LICENSE +0 -21
  370. package/stream-api/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
  371. package/stream-api/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
  372. package/stream-api/node_modules/get-proto/README.md +0 -50
  373. package/stream-api/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
  374. package/stream-api/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
  375. package/stream-api/node_modules/get-proto/index.d.ts +0 -5
  376. package/stream-api/node_modules/get-proto/index.js +0 -27
  377. package/stream-api/node_modules/get-proto/package.json +0 -81
  378. package/stream-api/node_modules/get-proto/test/index.js +0 -68
  379. package/stream-api/node_modules/get-proto/tsconfig.json +0 -9
  380. package/stream-api/node_modules/gopd/.eslintrc +0 -16
  381. package/stream-api/node_modules/gopd/.github/FUNDING.yml +0 -12
  382. package/stream-api/node_modules/gopd/CHANGELOG.md +0 -45
  383. package/stream-api/node_modules/gopd/LICENSE +0 -21
  384. package/stream-api/node_modules/gopd/README.md +0 -40
  385. package/stream-api/node_modules/gopd/gOPD.d.ts +0 -1
  386. package/stream-api/node_modules/gopd/gOPD.js +0 -4
  387. package/stream-api/node_modules/gopd/index.d.ts +0 -5
  388. package/stream-api/node_modules/gopd/index.js +0 -15
  389. package/stream-api/node_modules/gopd/package.json +0 -77
  390. package/stream-api/node_modules/gopd/test/index.js +0 -36
  391. package/stream-api/node_modules/gopd/tsconfig.json +0 -9
  392. package/stream-api/node_modules/has-symbols/.eslintrc +0 -11
  393. package/stream-api/node_modules/has-symbols/.github/FUNDING.yml +0 -12
  394. package/stream-api/node_modules/has-symbols/.nycrc +0 -9
  395. package/stream-api/node_modules/has-symbols/CHANGELOG.md +0 -91
  396. package/stream-api/node_modules/has-symbols/LICENSE +0 -21
  397. package/stream-api/node_modules/has-symbols/README.md +0 -46
  398. package/stream-api/node_modules/has-symbols/index.d.ts +0 -3
  399. package/stream-api/node_modules/has-symbols/index.js +0 -14
  400. package/stream-api/node_modules/has-symbols/package.json +0 -111
  401. package/stream-api/node_modules/has-symbols/shams.d.ts +0 -3
  402. package/stream-api/node_modules/has-symbols/shams.js +0 -45
  403. package/stream-api/node_modules/has-symbols/test/index.js +0 -22
  404. package/stream-api/node_modules/has-symbols/test/shams/core-js.js +0 -29
  405. package/stream-api/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
  406. package/stream-api/node_modules/has-symbols/test/tests.js +0 -58
  407. package/stream-api/node_modules/has-symbols/tsconfig.json +0 -10
  408. package/stream-api/node_modules/hasown/.eslintrc +0 -5
  409. package/stream-api/node_modules/hasown/.github/FUNDING.yml +0 -12
  410. package/stream-api/node_modules/hasown/.nycrc +0 -13
  411. package/stream-api/node_modules/hasown/CHANGELOG.md +0 -40
  412. package/stream-api/node_modules/hasown/LICENSE +0 -21
  413. package/stream-api/node_modules/hasown/README.md +0 -40
  414. package/stream-api/node_modules/hasown/index.d.ts +0 -3
  415. package/stream-api/node_modules/hasown/index.js +0 -8
  416. package/stream-api/node_modules/hasown/package.json +0 -92
  417. package/stream-api/node_modules/hasown/tsconfig.json +0 -6
  418. package/stream-api/node_modules/http-errors/HISTORY.md +0 -186
  419. package/stream-api/node_modules/http-errors/LICENSE +0 -23
  420. package/stream-api/node_modules/http-errors/README.md +0 -169
  421. package/stream-api/node_modules/http-errors/index.js +0 -290
  422. package/stream-api/node_modules/http-errors/package.json +0 -54
  423. package/stream-api/node_modules/iconv-lite/Changelog.md +0 -236
  424. package/stream-api/node_modules/iconv-lite/LICENSE +0 -21
  425. package/stream-api/node_modules/iconv-lite/README.md +0 -138
  426. package/stream-api/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -532
  427. package/stream-api/node_modules/iconv-lite/encodings/dbcs-data.js +0 -185
  428. package/stream-api/node_modules/iconv-lite/encodings/index.js +0 -23
  429. package/stream-api/node_modules/iconv-lite/encodings/internal.js +0 -218
  430. package/stream-api/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -75
  431. package/stream-api/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
  432. package/stream-api/node_modules/iconv-lite/encodings/sbcs-data.js +0 -178
  433. package/stream-api/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
  434. package/stream-api/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
  435. package/stream-api/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
  436. package/stream-api/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
  437. package/stream-api/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
  438. package/stream-api/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
  439. package/stream-api/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -56
  440. package/stream-api/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
  441. package/stream-api/node_modules/iconv-lite/encodings/utf16.js +0 -187
  442. package/stream-api/node_modules/iconv-lite/encodings/utf32.js +0 -307
  443. package/stream-api/node_modules/iconv-lite/encodings/utf7.js +0 -283
  444. package/stream-api/node_modules/iconv-lite/lib/bom-handling.js +0 -48
  445. package/stream-api/node_modules/iconv-lite/lib/helpers/merge-exports.js +0 -13
  446. package/stream-api/node_modules/iconv-lite/lib/index.d.ts +0 -41
  447. package/stream-api/node_modules/iconv-lite/lib/index.js +0 -183
  448. package/stream-api/node_modules/iconv-lite/lib/streams.js +0 -105
  449. package/stream-api/node_modules/iconv-lite/package.json +0 -59
  450. package/stream-api/node_modules/inherits/LICENSE +0 -16
  451. package/stream-api/node_modules/inherits/README.md +0 -42
  452. package/stream-api/node_modules/inherits/inherits.js +0 -9
  453. package/stream-api/node_modules/inherits/inherits_browser.js +0 -27
  454. package/stream-api/node_modules/inherits/package.json +0 -29
  455. package/stream-api/node_modules/ipaddr.js/LICENSE +0 -19
  456. package/stream-api/node_modules/ipaddr.js/README.md +0 -233
  457. package/stream-api/node_modules/ipaddr.js/ipaddr.min.js +0 -1
  458. package/stream-api/node_modules/ipaddr.js/lib/ipaddr.js +0 -673
  459. package/stream-api/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +0 -68
  460. package/stream-api/node_modules/ipaddr.js/package.json +0 -35
  461. package/stream-api/node_modules/is-promise/LICENSE +0 -19
  462. package/stream-api/node_modules/is-promise/index.d.ts +0 -2
  463. package/stream-api/node_modules/is-promise/index.js +0 -6
  464. package/stream-api/node_modules/is-promise/index.mjs +0 -3
  465. package/stream-api/node_modules/is-promise/package.json +0 -30
  466. package/stream-api/node_modules/is-promise/readme.md +0 -33
  467. package/stream-api/node_modules/math-intrinsics/.eslintrc +0 -16
  468. package/stream-api/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
  469. package/stream-api/node_modules/math-intrinsics/CHANGELOG.md +0 -24
  470. package/stream-api/node_modules/math-intrinsics/LICENSE +0 -21
  471. package/stream-api/node_modules/math-intrinsics/README.md +0 -50
  472. package/stream-api/node_modules/math-intrinsics/abs.d.ts +0 -1
  473. package/stream-api/node_modules/math-intrinsics/abs.js +0 -4
  474. package/stream-api/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
  475. package/stream-api/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
  476. package/stream-api/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
  477. package/stream-api/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
  478. package/stream-api/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
  479. package/stream-api/node_modules/math-intrinsics/constants/maxValue.js +0 -5
  480. package/stream-api/node_modules/math-intrinsics/floor.d.ts +0 -1
  481. package/stream-api/node_modules/math-intrinsics/floor.js +0 -4
  482. package/stream-api/node_modules/math-intrinsics/isFinite.d.ts +0 -3
  483. package/stream-api/node_modules/math-intrinsics/isFinite.js +0 -12
  484. package/stream-api/node_modules/math-intrinsics/isInteger.d.ts +0 -3
  485. package/stream-api/node_modules/math-intrinsics/isInteger.js +0 -16
  486. package/stream-api/node_modules/math-intrinsics/isNaN.d.ts +0 -1
  487. package/stream-api/node_modules/math-intrinsics/isNaN.js +0 -6
  488. package/stream-api/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
  489. package/stream-api/node_modules/math-intrinsics/isNegativeZero.js +0 -6
  490. package/stream-api/node_modules/math-intrinsics/max.d.ts +0 -1
  491. package/stream-api/node_modules/math-intrinsics/max.js +0 -4
  492. package/stream-api/node_modules/math-intrinsics/min.d.ts +0 -1
  493. package/stream-api/node_modules/math-intrinsics/min.js +0 -4
  494. package/stream-api/node_modules/math-intrinsics/mod.d.ts +0 -3
  495. package/stream-api/node_modules/math-intrinsics/mod.js +0 -9
  496. package/stream-api/node_modules/math-intrinsics/package.json +0 -86
  497. package/stream-api/node_modules/math-intrinsics/pow.d.ts +0 -1
  498. package/stream-api/node_modules/math-intrinsics/pow.js +0 -4
  499. package/stream-api/node_modules/math-intrinsics/round.d.ts +0 -1
  500. package/stream-api/node_modules/math-intrinsics/round.js +0 -4
  501. package/stream-api/node_modules/math-intrinsics/sign.d.ts +0 -3
  502. package/stream-api/node_modules/math-intrinsics/sign.js +0 -11
  503. package/stream-api/node_modules/math-intrinsics/test/index.js +0 -192
  504. package/stream-api/node_modules/math-intrinsics/tsconfig.json +0 -3
  505. package/stream-api/node_modules/media-typer/HISTORY.md +0 -50
  506. package/stream-api/node_modules/media-typer/LICENSE +0 -22
  507. package/stream-api/node_modules/media-typer/README.md +0 -93
  508. package/stream-api/node_modules/media-typer/index.js +0 -143
  509. package/stream-api/node_modules/media-typer/package.json +0 -33
  510. package/stream-api/node_modules/merge-descriptors/index.d.ts +0 -11
  511. package/stream-api/node_modules/merge-descriptors/index.js +0 -26
  512. package/stream-api/node_modules/merge-descriptors/license +0 -11
  513. package/stream-api/node_modules/merge-descriptors/package.json +0 -50
  514. package/stream-api/node_modules/merge-descriptors/readme.md +0 -55
  515. package/stream-api/node_modules/mime-db/HISTORY.md +0 -541
  516. package/stream-api/node_modules/mime-db/LICENSE +0 -23
  517. package/stream-api/node_modules/mime-db/README.md +0 -109
  518. package/stream-api/node_modules/mime-db/db.json +0 -9342
  519. package/stream-api/node_modules/mime-db/index.js +0 -12
  520. package/stream-api/node_modules/mime-db/package.json +0 -56
  521. package/stream-api/node_modules/mime-types/HISTORY.md +0 -428
  522. package/stream-api/node_modules/mime-types/LICENSE +0 -23
  523. package/stream-api/node_modules/mime-types/README.md +0 -126
  524. package/stream-api/node_modules/mime-types/index.js +0 -211
  525. package/stream-api/node_modules/mime-types/mimeScore.js +0 -57
  526. package/stream-api/node_modules/mime-types/package.json +0 -49
  527. package/stream-api/node_modules/ms/index.js +0 -162
  528. package/stream-api/node_modules/ms/license.md +0 -21
  529. package/stream-api/node_modules/ms/package.json +0 -38
  530. package/stream-api/node_modules/ms/readme.md +0 -59
  531. package/stream-api/node_modules/negotiator/HISTORY.md +0 -114
  532. package/stream-api/node_modules/negotiator/LICENSE +0 -24
  533. package/stream-api/node_modules/negotiator/README.md +0 -212
  534. package/stream-api/node_modules/negotiator/index.js +0 -83
  535. package/stream-api/node_modules/negotiator/lib/charset.js +0 -169
  536. package/stream-api/node_modules/negotiator/lib/encoding.js +0 -205
  537. package/stream-api/node_modules/negotiator/lib/language.js +0 -179
  538. package/stream-api/node_modules/negotiator/lib/mediaType.js +0 -294
  539. package/stream-api/node_modules/negotiator/package.json +0 -43
  540. package/stream-api/node_modules/object-inspect/.eslintrc +0 -53
  541. package/stream-api/node_modules/object-inspect/.github/FUNDING.yml +0 -12
  542. package/stream-api/node_modules/object-inspect/.nycrc +0 -13
  543. package/stream-api/node_modules/object-inspect/CHANGELOG.md +0 -424
  544. package/stream-api/node_modules/object-inspect/LICENSE +0 -21
  545. package/stream-api/node_modules/object-inspect/example/all.js +0 -23
  546. package/stream-api/node_modules/object-inspect/example/circular.js +0 -6
  547. package/stream-api/node_modules/object-inspect/example/fn.js +0 -5
  548. package/stream-api/node_modules/object-inspect/example/inspect.js +0 -10
  549. package/stream-api/node_modules/object-inspect/index.js +0 -544
  550. package/stream-api/node_modules/object-inspect/package-support.json +0 -20
  551. package/stream-api/node_modules/object-inspect/package.json +0 -105
  552. package/stream-api/node_modules/object-inspect/readme.markdown +0 -84
  553. package/stream-api/node_modules/object-inspect/test/bigint.js +0 -58
  554. package/stream-api/node_modules/object-inspect/test/browser/dom.js +0 -15
  555. package/stream-api/node_modules/object-inspect/test/circular.js +0 -16
  556. package/stream-api/node_modules/object-inspect/test/deep.js +0 -12
  557. package/stream-api/node_modules/object-inspect/test/element.js +0 -53
  558. package/stream-api/node_modules/object-inspect/test/err.js +0 -48
  559. package/stream-api/node_modules/object-inspect/test/fakes.js +0 -29
  560. package/stream-api/node_modules/object-inspect/test/fn.js +0 -76
  561. package/stream-api/node_modules/object-inspect/test/global.js +0 -17
  562. package/stream-api/node_modules/object-inspect/test/has.js +0 -15
  563. package/stream-api/node_modules/object-inspect/test/holes.js +0 -15
  564. package/stream-api/node_modules/object-inspect/test/indent-option.js +0 -271
  565. package/stream-api/node_modules/object-inspect/test/inspect.js +0 -139
  566. package/stream-api/node_modules/object-inspect/test/lowbyte.js +0 -12
  567. package/stream-api/node_modules/object-inspect/test/number.js +0 -58
  568. package/stream-api/node_modules/object-inspect/test/quoteStyle.js +0 -26
  569. package/stream-api/node_modules/object-inspect/test/toStringTag.js +0 -40
  570. package/stream-api/node_modules/object-inspect/test/undef.js +0 -12
  571. package/stream-api/node_modules/object-inspect/test/values.js +0 -261
  572. package/stream-api/node_modules/object-inspect/test-core-js.js +0 -26
  573. package/stream-api/node_modules/object-inspect/util.inspect.js +0 -1
  574. package/stream-api/node_modules/on-finished/HISTORY.md +0 -98
  575. package/stream-api/node_modules/on-finished/LICENSE +0 -23
  576. package/stream-api/node_modules/on-finished/README.md +0 -162
  577. package/stream-api/node_modules/on-finished/index.js +0 -234
  578. package/stream-api/node_modules/on-finished/package.json +0 -39
  579. package/stream-api/node_modules/once/LICENSE +0 -15
  580. package/stream-api/node_modules/once/README.md +0 -79
  581. package/stream-api/node_modules/once/once.js +0 -42
  582. package/stream-api/node_modules/once/package.json +0 -33
  583. package/stream-api/node_modules/parseurl/HISTORY.md +0 -58
  584. package/stream-api/node_modules/parseurl/LICENSE +0 -24
  585. package/stream-api/node_modules/parseurl/README.md +0 -133
  586. package/stream-api/node_modules/parseurl/index.js +0 -158
  587. package/stream-api/node_modules/parseurl/package.json +0 -40
  588. package/stream-api/node_modules/path-to-regexp/LICENSE +0 -21
  589. package/stream-api/node_modules/path-to-regexp/Readme.md +0 -224
  590. package/stream-api/node_modules/path-to-regexp/dist/index.d.ts +0 -144
  591. package/stream-api/node_modules/path-to-regexp/dist/index.js +0 -409
  592. package/stream-api/node_modules/path-to-regexp/dist/index.js.map +0 -1
  593. package/stream-api/node_modules/path-to-regexp/package.json +0 -64
  594. package/stream-api/node_modules/proxy-addr/HISTORY.md +0 -161
  595. package/stream-api/node_modules/proxy-addr/LICENSE +0 -22
  596. package/stream-api/node_modules/proxy-addr/README.md +0 -139
  597. package/stream-api/node_modules/proxy-addr/index.js +0 -327
  598. package/stream-api/node_modules/proxy-addr/package.json +0 -47
  599. package/stream-api/node_modules/qs/.editorconfig +0 -46
  600. package/stream-api/node_modules/qs/.eslintrc +0 -39
  601. package/stream-api/node_modules/qs/.github/FUNDING.yml +0 -12
  602. package/stream-api/node_modules/qs/.nycrc +0 -13
  603. package/stream-api/node_modules/qs/CHANGELOG.md +0 -622
  604. package/stream-api/node_modules/qs/LICENSE.md +0 -29
  605. package/stream-api/node_modules/qs/README.md +0 -733
  606. package/stream-api/node_modules/qs/dist/qs.js +0 -141
  607. package/stream-api/node_modules/qs/lib/formats.js +0 -23
  608. package/stream-api/node_modules/qs/lib/index.js +0 -11
  609. package/stream-api/node_modules/qs/lib/parse.js +0 -328
  610. package/stream-api/node_modules/qs/lib/stringify.js +0 -356
  611. package/stream-api/node_modules/qs/lib/utils.js +0 -268
  612. package/stream-api/node_modules/qs/package.json +0 -93
  613. package/stream-api/node_modules/qs/test/empty-keys-cases.js +0 -267
  614. package/stream-api/node_modules/qs/test/parse.js +0 -1276
  615. package/stream-api/node_modules/qs/test/stringify.js +0 -1306
  616. package/stream-api/node_modules/qs/test/utils.js +0 -262
  617. package/stream-api/node_modules/range-parser/HISTORY.md +0 -56
  618. package/stream-api/node_modules/range-parser/LICENSE +0 -23
  619. package/stream-api/node_modules/range-parser/README.md +0 -84
  620. package/stream-api/node_modules/range-parser/index.js +0 -162
  621. package/stream-api/node_modules/range-parser/package.json +0 -44
  622. package/stream-api/node_modules/raw-body/LICENSE +0 -22
  623. package/stream-api/node_modules/raw-body/README.md +0 -223
  624. package/stream-api/node_modules/raw-body/index.d.ts +0 -85
  625. package/stream-api/node_modules/raw-body/index.js +0 -336
  626. package/stream-api/node_modules/raw-body/package.json +0 -46
  627. package/stream-api/node_modules/router/HISTORY.md +0 -228
  628. package/stream-api/node_modules/router/LICENSE +0 -23
  629. package/stream-api/node_modules/router/README.md +0 -416
  630. package/stream-api/node_modules/router/index.js +0 -748
  631. package/stream-api/node_modules/router/lib/layer.js +0 -247
  632. package/stream-api/node_modules/router/lib/route.js +0 -242
  633. package/stream-api/node_modules/router/package.json +0 -44
  634. package/stream-api/node_modules/safer-buffer/LICENSE +0 -21
  635. package/stream-api/node_modules/safer-buffer/Porting-Buffer.md +0 -268
  636. package/stream-api/node_modules/safer-buffer/Readme.md +0 -156
  637. package/stream-api/node_modules/safer-buffer/dangerous.js +0 -58
  638. package/stream-api/node_modules/safer-buffer/package.json +0 -34
  639. package/stream-api/node_modules/safer-buffer/safer.js +0 -77
  640. package/stream-api/node_modules/safer-buffer/tests.js +0 -406
  641. package/stream-api/node_modules/send/HISTORY.md +0 -580
  642. package/stream-api/node_modules/send/LICENSE +0 -23
  643. package/stream-api/node_modules/send/README.md +0 -317
  644. package/stream-api/node_modules/send/index.js +0 -997
  645. package/stream-api/node_modules/send/package.json +0 -60
  646. package/stream-api/node_modules/serve-static/HISTORY.md +0 -516
  647. package/stream-api/node_modules/serve-static/LICENSE +0 -25
  648. package/stream-api/node_modules/serve-static/README.md +0 -253
  649. package/stream-api/node_modules/serve-static/index.js +0 -208
  650. package/stream-api/node_modules/serve-static/package.json +0 -41
  651. package/stream-api/node_modules/setprototypeof/LICENSE +0 -13
  652. package/stream-api/node_modules/setprototypeof/README.md +0 -31
  653. package/stream-api/node_modules/setprototypeof/index.d.ts +0 -2
  654. package/stream-api/node_modules/setprototypeof/index.js +0 -17
  655. package/stream-api/node_modules/setprototypeof/package.json +0 -38
  656. package/stream-api/node_modules/setprototypeof/test/index.js +0 -24
  657. package/stream-api/node_modules/short-uuid/.codeclimate.yml +0 -21
  658. package/stream-api/node_modules/short-uuid/.csslintrc +0 -2
  659. package/stream-api/node_modules/short-uuid/.editorconfig +0 -11
  660. package/stream-api/node_modules/short-uuid/.eslintrc.js +0 -15
  661. package/stream-api/node_modules/short-uuid/.github/workflows/node.js.yml +0 -31
  662. package/stream-api/node_modules/short-uuid/.nyc_output/3a60ecc2-69fc-4d0a-81dd-ad79b6071e14.json +0 -1
  663. package/stream-api/node_modules/short-uuid/.nyc_output/3f261446-c11a-4630-b995-4f5dbc1395ef.json +0 -1
  664. package/stream-api/node_modules/short-uuid/.nyc_output/processinfo/3a60ecc2-69fc-4d0a-81dd-ad79b6071e14.json +0 -1
  665. package/stream-api/node_modules/short-uuid/.nyc_output/processinfo/3f261446-c11a-4630-b995-4f5dbc1395ef.json +0 -1
  666. package/stream-api/node_modules/short-uuid/.nyc_output/processinfo/index.json +0 -1
  667. package/stream-api/node_modules/short-uuid/CHANGELOG.md +0 -237
  668. package/stream-api/node_modules/short-uuid/LICENSE +0 -21
  669. package/stream-api/node_modules/short-uuid/README.md +0 -128
  670. package/stream-api/node_modules/short-uuid/index.d.ts +0 -51
  671. package/stream-api/node_modules/short-uuid/index.js +0 -157
  672. package/stream-api/node_modules/short-uuid/package.json +0 -41
  673. package/stream-api/node_modules/short-uuid/revisions.md +0 -193
  674. package/stream-api/node_modules/short-uuid/test/index.js +0 -339
  675. package/stream-api/node_modules/short-uuid/test/uuid25examples.js +0 -74
  676. package/stream-api/node_modules/side-channel/.editorconfig +0 -9
  677. package/stream-api/node_modules/side-channel/.eslintrc +0 -12
  678. package/stream-api/node_modules/side-channel/.github/FUNDING.yml +0 -12
  679. package/stream-api/node_modules/side-channel/.nycrc +0 -13
  680. package/stream-api/node_modules/side-channel/CHANGELOG.md +0 -110
  681. package/stream-api/node_modules/side-channel/LICENSE +0 -21
  682. package/stream-api/node_modules/side-channel/README.md +0 -61
  683. package/stream-api/node_modules/side-channel/index.d.ts +0 -14
  684. package/stream-api/node_modules/side-channel/index.js +0 -43
  685. package/stream-api/node_modules/side-channel/package.json +0 -85
  686. package/stream-api/node_modules/side-channel/test/index.js +0 -104
  687. package/stream-api/node_modules/side-channel/tsconfig.json +0 -9
  688. package/stream-api/node_modules/side-channel-list/.editorconfig +0 -9
  689. package/stream-api/node_modules/side-channel-list/.eslintrc +0 -11
  690. package/stream-api/node_modules/side-channel-list/.github/FUNDING.yml +0 -12
  691. package/stream-api/node_modules/side-channel-list/.nycrc +0 -13
  692. package/stream-api/node_modules/side-channel-list/CHANGELOG.md +0 -15
  693. package/stream-api/node_modules/side-channel-list/LICENSE +0 -21
  694. package/stream-api/node_modules/side-channel-list/README.md +0 -62
  695. package/stream-api/node_modules/side-channel-list/index.d.ts +0 -13
  696. package/stream-api/node_modules/side-channel-list/index.js +0 -113
  697. package/stream-api/node_modules/side-channel-list/list.d.ts +0 -14
  698. package/stream-api/node_modules/side-channel-list/package.json +0 -77
  699. package/stream-api/node_modules/side-channel-list/test/index.js +0 -104
  700. package/stream-api/node_modules/side-channel-list/tsconfig.json +0 -9
  701. package/stream-api/node_modules/side-channel-map/.editorconfig +0 -9
  702. package/stream-api/node_modules/side-channel-map/.eslintrc +0 -11
  703. package/stream-api/node_modules/side-channel-map/.github/FUNDING.yml +0 -12
  704. package/stream-api/node_modules/side-channel-map/.nycrc +0 -13
  705. package/stream-api/node_modules/side-channel-map/CHANGELOG.md +0 -22
  706. package/stream-api/node_modules/side-channel-map/LICENSE +0 -21
  707. package/stream-api/node_modules/side-channel-map/README.md +0 -62
  708. package/stream-api/node_modules/side-channel-map/index.d.ts +0 -15
  709. package/stream-api/node_modules/side-channel-map/index.js +0 -68
  710. package/stream-api/node_modules/side-channel-map/package.json +0 -80
  711. package/stream-api/node_modules/side-channel-map/test/index.js +0 -114
  712. package/stream-api/node_modules/side-channel-map/tsconfig.json +0 -9
  713. package/stream-api/node_modules/side-channel-weakmap/.editorconfig +0 -9
  714. package/stream-api/node_modules/side-channel-weakmap/.eslintrc +0 -12
  715. package/stream-api/node_modules/side-channel-weakmap/.github/FUNDING.yml +0 -12
  716. package/stream-api/node_modules/side-channel-weakmap/.nycrc +0 -13
  717. package/stream-api/node_modules/side-channel-weakmap/CHANGELOG.md +0 -28
  718. package/stream-api/node_modules/side-channel-weakmap/LICENSE +0 -21
  719. package/stream-api/node_modules/side-channel-weakmap/README.md +0 -62
  720. package/stream-api/node_modules/side-channel-weakmap/index.d.ts +0 -15
  721. package/stream-api/node_modules/side-channel-weakmap/index.js +0 -84
  722. package/stream-api/node_modules/side-channel-weakmap/package.json +0 -87
  723. package/stream-api/node_modules/side-channel-weakmap/test/index.js +0 -114
  724. package/stream-api/node_modules/side-channel-weakmap/tsconfig.json +0 -9
  725. package/stream-api/node_modules/statuses/HISTORY.md +0 -87
  726. package/stream-api/node_modules/statuses/LICENSE +0 -23
  727. package/stream-api/node_modules/statuses/README.md +0 -139
  728. package/stream-api/node_modules/statuses/codes.json +0 -65
  729. package/stream-api/node_modules/statuses/index.js +0 -146
  730. package/stream-api/node_modules/statuses/package.json +0 -49
  731. package/stream-api/node_modules/toidentifier/HISTORY.md +0 -9
  732. package/stream-api/node_modules/toidentifier/LICENSE +0 -21
  733. package/stream-api/node_modules/toidentifier/README.md +0 -61
  734. package/stream-api/node_modules/toidentifier/index.js +0 -32
  735. package/stream-api/node_modules/toidentifier/package.json +0 -38
  736. package/stream-api/node_modules/type-is/HISTORY.md +0 -292
  737. package/stream-api/node_modules/type-is/LICENSE +0 -23
  738. package/stream-api/node_modules/type-is/README.md +0 -198
  739. package/stream-api/node_modules/type-is/index.js +0 -250
  740. package/stream-api/node_modules/type-is/package.json +0 -47
  741. package/stream-api/node_modules/undici-types/LICENSE +0 -21
  742. package/stream-api/node_modules/undici-types/README.md +0 -6
  743. package/stream-api/node_modules/undici-types/agent.d.ts +0 -32
  744. package/stream-api/node_modules/undici-types/api.d.ts +0 -43
  745. package/stream-api/node_modules/undici-types/balanced-pool.d.ts +0 -29
  746. package/stream-api/node_modules/undici-types/cache-interceptor.d.ts +0 -172
  747. package/stream-api/node_modules/undici-types/cache.d.ts +0 -36
  748. package/stream-api/node_modules/undici-types/client-stats.d.ts +0 -15
  749. package/stream-api/node_modules/undici-types/client.d.ts +0 -108
  750. package/stream-api/node_modules/undici-types/connector.d.ts +0 -34
  751. package/stream-api/node_modules/undici-types/content-type.d.ts +0 -21
  752. package/stream-api/node_modules/undici-types/cookies.d.ts +0 -30
  753. package/stream-api/node_modules/undici-types/diagnostics-channel.d.ts +0 -74
  754. package/stream-api/node_modules/undici-types/dispatcher.d.ts +0 -276
  755. package/stream-api/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -22
  756. package/stream-api/node_modules/undici-types/errors.d.ts +0 -161
  757. package/stream-api/node_modules/undici-types/eventsource.d.ts +0 -66
  758. package/stream-api/node_modules/undici-types/fetch.d.ts +0 -211
  759. package/stream-api/node_modules/undici-types/formdata.d.ts +0 -108
  760. package/stream-api/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  761. package/stream-api/node_modules/undici-types/global-origin.d.ts +0 -7
  762. package/stream-api/node_modules/undici-types/h2c-client.d.ts +0 -73
  763. package/stream-api/node_modules/undici-types/handlers.d.ts +0 -15
  764. package/stream-api/node_modules/undici-types/header.d.ts +0 -160
  765. package/stream-api/node_modules/undici-types/index.d.ts +0 -80
  766. package/stream-api/node_modules/undici-types/interceptors.d.ts +0 -39
  767. package/stream-api/node_modules/undici-types/mock-agent.d.ts +0 -68
  768. package/stream-api/node_modules/undici-types/mock-call-history.d.ts +0 -111
  769. package/stream-api/node_modules/undici-types/mock-client.d.ts +0 -27
  770. package/stream-api/node_modules/undici-types/mock-errors.d.ts +0 -12
  771. package/stream-api/node_modules/undici-types/mock-interceptor.d.ts +0 -94
  772. package/stream-api/node_modules/undici-types/mock-pool.d.ts +0 -27
  773. package/stream-api/node_modules/undici-types/package.json +0 -55
  774. package/stream-api/node_modules/undici-types/patch.d.ts +0 -29
  775. package/stream-api/node_modules/undici-types/pool-stats.d.ts +0 -19
  776. package/stream-api/node_modules/undici-types/pool.d.ts +0 -41
  777. package/stream-api/node_modules/undici-types/proxy-agent.d.ts +0 -29
  778. package/stream-api/node_modules/undici-types/readable.d.ts +0 -68
  779. package/stream-api/node_modules/undici-types/retry-agent.d.ts +0 -8
  780. package/stream-api/node_modules/undici-types/retry-handler.d.ts +0 -125
  781. package/stream-api/node_modules/undici-types/snapshot-agent.d.ts +0 -109
  782. package/stream-api/node_modules/undici-types/util.d.ts +0 -18
  783. package/stream-api/node_modules/undici-types/utility.d.ts +0 -7
  784. package/stream-api/node_modules/undici-types/webidl.d.ts +0 -341
  785. package/stream-api/node_modules/undici-types/websocket.d.ts +0 -186
  786. package/stream-api/node_modules/unpipe/HISTORY.md +0 -4
  787. package/stream-api/node_modules/unpipe/LICENSE +0 -22
  788. package/stream-api/node_modules/unpipe/README.md +0 -43
  789. package/stream-api/node_modules/unpipe/index.js +0 -69
  790. package/stream-api/node_modules/unpipe/package.json +0 -27
  791. package/stream-api/node_modules/uuid/CHANGELOG.md +0 -274
  792. package/stream-api/node_modules/uuid/CONTRIBUTING.md +0 -18
  793. package/stream-api/node_modules/uuid/LICENSE.md +0 -9
  794. package/stream-api/node_modules/uuid/README.md +0 -466
  795. package/stream-api/node_modules/uuid/dist/bin/uuid +0 -2
  796. package/stream-api/node_modules/uuid/dist/commonjs-browser/index.js +0 -79
  797. package/stream-api/node_modules/uuid/dist/commonjs-browser/md5.js +0 -223
  798. package/stream-api/node_modules/uuid/dist/commonjs-browser/native.js +0 -11
  799. package/stream-api/node_modules/uuid/dist/commonjs-browser/nil.js +0 -8
  800. package/stream-api/node_modules/uuid/dist/commonjs-browser/parse.js +0 -45
  801. package/stream-api/node_modules/uuid/dist/commonjs-browser/regex.js +0 -8
  802. package/stream-api/node_modules/uuid/dist/commonjs-browser/rng.js +0 -25
  803. package/stream-api/node_modules/uuid/dist/commonjs-browser/sha1.js +0 -104
  804. package/stream-api/node_modules/uuid/dist/commonjs-browser/stringify.js +0 -44
  805. package/stream-api/node_modules/uuid/dist/commonjs-browser/v1.js +0 -107
  806. package/stream-api/node_modules/uuid/dist/commonjs-browser/v3.js +0 -16
  807. package/stream-api/node_modules/uuid/dist/commonjs-browser/v35.js +0 -80
  808. package/stream-api/node_modules/uuid/dist/commonjs-browser/v4.js +0 -43
  809. package/stream-api/node_modules/uuid/dist/commonjs-browser/v5.js +0 -16
  810. package/stream-api/node_modules/uuid/dist/commonjs-browser/validate.js +0 -17
  811. package/stream-api/node_modules/uuid/dist/commonjs-browser/version.js +0 -21
  812. package/stream-api/node_modules/uuid/dist/esm-browser/index.js +0 -9
  813. package/stream-api/node_modules/uuid/dist/esm-browser/md5.js +0 -215
  814. package/stream-api/node_modules/uuid/dist/esm-browser/native.js +0 -4
  815. package/stream-api/node_modules/uuid/dist/esm-browser/nil.js +0 -1
  816. package/stream-api/node_modules/uuid/dist/esm-browser/parse.js +0 -35
  817. package/stream-api/node_modules/uuid/dist/esm-browser/regex.js +0 -1
  818. package/stream-api/node_modules/uuid/dist/esm-browser/rng.js +0 -18
  819. package/stream-api/node_modules/uuid/dist/esm-browser/sha1.js +0 -96
  820. package/stream-api/node_modules/uuid/dist/esm-browser/stringify.js +0 -33
  821. package/stream-api/node_modules/uuid/dist/esm-browser/v1.js +0 -95
  822. package/stream-api/node_modules/uuid/dist/esm-browser/v3.js +0 -4
  823. package/stream-api/node_modules/uuid/dist/esm-browser/v35.js +0 -66
  824. package/stream-api/node_modules/uuid/dist/esm-browser/v4.js +0 -29
  825. package/stream-api/node_modules/uuid/dist/esm-browser/v5.js +0 -4
  826. package/stream-api/node_modules/uuid/dist/esm-browser/validate.js +0 -7
  827. package/stream-api/node_modules/uuid/dist/esm-browser/version.js +0 -11
  828. package/stream-api/node_modules/uuid/dist/esm-node/index.js +0 -9
  829. package/stream-api/node_modules/uuid/dist/esm-node/md5.js +0 -13
  830. package/stream-api/node_modules/uuid/dist/esm-node/native.js +0 -4
  831. package/stream-api/node_modules/uuid/dist/esm-node/nil.js +0 -1
  832. package/stream-api/node_modules/uuid/dist/esm-node/parse.js +0 -35
  833. package/stream-api/node_modules/uuid/dist/esm-node/regex.js +0 -1
  834. package/stream-api/node_modules/uuid/dist/esm-node/rng.js +0 -12
  835. package/stream-api/node_modules/uuid/dist/esm-node/sha1.js +0 -13
  836. package/stream-api/node_modules/uuid/dist/esm-node/stringify.js +0 -33
  837. package/stream-api/node_modules/uuid/dist/esm-node/v1.js +0 -95
  838. package/stream-api/node_modules/uuid/dist/esm-node/v3.js +0 -4
  839. package/stream-api/node_modules/uuid/dist/esm-node/v35.js +0 -66
  840. package/stream-api/node_modules/uuid/dist/esm-node/v4.js +0 -29
  841. package/stream-api/node_modules/uuid/dist/esm-node/v5.js +0 -4
  842. package/stream-api/node_modules/uuid/dist/esm-node/validate.js +0 -7
  843. package/stream-api/node_modules/uuid/dist/esm-node/version.js +0 -11
  844. package/stream-api/node_modules/uuid/dist/index.js +0 -79
  845. package/stream-api/node_modules/uuid/dist/md5-browser.js +0 -223
  846. package/stream-api/node_modules/uuid/dist/md5.js +0 -23
  847. package/stream-api/node_modules/uuid/dist/native-browser.js +0 -11
  848. package/stream-api/node_modules/uuid/dist/native.js +0 -15
  849. package/stream-api/node_modules/uuid/dist/nil.js +0 -8
  850. package/stream-api/node_modules/uuid/dist/parse.js +0 -45
  851. package/stream-api/node_modules/uuid/dist/regex.js +0 -8
  852. package/stream-api/node_modules/uuid/dist/rng-browser.js +0 -25
  853. package/stream-api/node_modules/uuid/dist/rng.js +0 -24
  854. package/stream-api/node_modules/uuid/dist/sha1-browser.js +0 -104
  855. package/stream-api/node_modules/uuid/dist/sha1.js +0 -23
  856. package/stream-api/node_modules/uuid/dist/stringify.js +0 -44
  857. package/stream-api/node_modules/uuid/dist/uuid-bin.js +0 -85
  858. package/stream-api/node_modules/uuid/dist/v1.js +0 -107
  859. package/stream-api/node_modules/uuid/dist/v3.js +0 -16
  860. package/stream-api/node_modules/uuid/dist/v35.js +0 -80
  861. package/stream-api/node_modules/uuid/dist/v4.js +0 -43
  862. package/stream-api/node_modules/uuid/dist/v5.js +0 -16
  863. package/stream-api/node_modules/uuid/dist/validate.js +0 -17
  864. package/stream-api/node_modules/uuid/dist/version.js +0 -21
  865. package/stream-api/node_modules/uuid/package.json +0 -135
  866. package/stream-api/node_modules/uuid/wrapper.mjs +0 -10
  867. package/stream-api/node_modules/vary/HISTORY.md +0 -39
  868. package/stream-api/node_modules/vary/LICENSE +0 -22
  869. package/stream-api/node_modules/vary/README.md +0 -101
  870. package/stream-api/node_modules/vary/index.js +0 -149
  871. package/stream-api/node_modules/vary/package.json +0 -43
  872. package/stream-api/node_modules/wrappy/LICENSE +0 -15
  873. package/stream-api/node_modules/wrappy/README.md +0 -36
  874. package/stream-api/node_modules/wrappy/package.json +0 -29
  875. package/stream-api/node_modules/wrappy/wrappy.js +0 -33
@@ -1,1476 +0,0 @@
1
- /**
2
- * The `node:child_process` module provides the ability to spawn subprocesses in
3
- * a manner that is similar, but not identical, to [`popen(3)`](http://man7.org/linux/man-pages/man3/popen.3.html). This capability
4
- * is primarily provided by the {@link spawn} function:
5
- *
6
- * ```js
7
- * import { spawn } from 'node:child_process';
8
- * const ls = spawn('ls', ['-lh', '/usr']);
9
- *
10
- * ls.stdout.on('data', (data) => {
11
- * console.log(`stdout: ${data}`);
12
- * });
13
- *
14
- * ls.stderr.on('data', (data) => {
15
- * console.error(`stderr: ${data}`);
16
- * });
17
- *
18
- * ls.on('close', (code) => {
19
- * console.log(`child process exited with code ${code}`);
20
- * });
21
- * ```
22
- *
23
- * By default, pipes for `stdin`, `stdout`, and `stderr` are established between
24
- * the parent Node.js process and the spawned subprocess. These pipes have
25
- * limited (and platform-specific) capacity. If the subprocess writes to
26
- * stdout in excess of that limit without the output being captured, the
27
- * subprocess blocks, waiting for the pipe buffer to accept more data. This is
28
- * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed.
29
- *
30
- * The command lookup is performed using the `options.env.PATH` environment
31
- * variable if `env` is in the `options` object. Otherwise, `process.env.PATH` is
32
- * used. If `options.env` is set without `PATH`, lookup on Unix is performed
33
- * on a default search path search of `/usr/bin:/bin` (see your operating system's
34
- * manual for execvpe/execvp), on Windows the current processes environment
35
- * variable `PATH` is used.
36
- *
37
- * On Windows, environment variables are case-insensitive. Node.js
38
- * lexicographically sorts the `env` keys and uses the first one that
39
- * case-insensitively matches. Only first (in lexicographic order) entry will be
40
- * passed to the subprocess. This might lead to issues on Windows when passing
41
- * objects to the `env` option that have multiple variants of the same key, such as `PATH` and `Path`.
42
- *
43
- * The {@link spawn} method spawns the child process asynchronously,
44
- * without blocking the Node.js event loop. The {@link spawnSync} function provides equivalent functionality in a synchronous manner that blocks
45
- * the event loop until the spawned process either exits or is terminated.
46
- *
47
- * For convenience, the `node:child_process` module provides a handful of
48
- * synchronous and asynchronous alternatives to {@link spawn} and {@link spawnSync}. Each of these alternatives are implemented on
49
- * top of {@link spawn} or {@link spawnSync}.
50
- *
51
- * * {@link exec}: spawns a shell and runs a command within that
52
- * shell, passing the `stdout` and `stderr` to a callback function when
53
- * complete.
54
- * * {@link execFile}: similar to {@link exec} except
55
- * that it spawns the command directly without first spawning a shell by
56
- * default.
57
- * * {@link fork}: spawns a new Node.js process and invokes a
58
- * specified module with an IPC communication channel established that allows
59
- * sending messages between parent and child.
60
- * * {@link execSync}: a synchronous version of {@link exec} that will block the Node.js event loop.
61
- * * {@link execFileSync}: a synchronous version of {@link execFile} that will block the Node.js event loop.
62
- *
63
- * For certain use cases, such as automating shell scripts, the `synchronous counterparts` may be more convenient. In many cases, however,
64
- * the synchronous methods can have significant impact on performance due to
65
- * stalling the event loop while spawned processes complete.
66
- * @see [source](https://github.com/nodejs/node/blob/v24.x/lib/child_process.js)
67
- */
68
- declare module "child_process" {
69
- import { NonSharedBuffer } from "node:buffer";
70
- import { Abortable, EventEmitter } from "node:events";
71
- import * as dgram from "node:dgram";
72
- import * as net from "node:net";
73
- import { Readable, Stream, Writable } from "node:stream";
74
- import { URL } from "node:url";
75
- type Serializable = string | object | number | boolean | bigint;
76
- type SendHandle = net.Socket | net.Server | dgram.Socket | undefined;
77
- /**
78
- * Instances of the `ChildProcess` represent spawned child processes.
79
- *
80
- * Instances of `ChildProcess` are not intended to be created directly. Rather,
81
- * use the {@link spawn}, {@link exec},{@link execFile}, or {@link fork} methods to create
82
- * instances of `ChildProcess`.
83
- * @since v2.2.0
84
- */
85
- class ChildProcess extends EventEmitter {
86
- /**
87
- * A `Writable Stream` that represents the child process's `stdin`.
88
- *
89
- * If a child process waits to read all of its input, the child will not continue
90
- * until this stream has been closed via `end()`.
91
- *
92
- * If the child was spawned with `stdio[0]` set to anything other than `'pipe'`,
93
- * then this will be `null`.
94
- *
95
- * `subprocess.stdin` is an alias for `subprocess.stdio[0]`. Both properties will
96
- * refer to the same value.
97
- *
98
- * The `subprocess.stdin` property can be `null` or `undefined` if the child process could not be successfully spawned.
99
- * @since v0.1.90
100
- */
101
- stdin: Writable | null;
102
- /**
103
- * A `Readable Stream` that represents the child process's `stdout`.
104
- *
105
- * If the child was spawned with `stdio[1]` set to anything other than `'pipe'`,
106
- * then this will be `null`.
107
- *
108
- * `subprocess.stdout` is an alias for `subprocess.stdio[1]`. Both properties will
109
- * refer to the same value.
110
- *
111
- * ```js
112
- * import { spawn } from 'node:child_process';
113
- *
114
- * const subprocess = spawn('ls');
115
- *
116
- * subprocess.stdout.on('data', (data) => {
117
- * console.log(`Received chunk ${data}`);
118
- * });
119
- * ```
120
- *
121
- * The `subprocess.stdout` property can be `null` or `undefined` if the child process could not be successfully spawned.
122
- * @since v0.1.90
123
- */
124
- stdout: Readable | null;
125
- /**
126
- * A `Readable Stream` that represents the child process's `stderr`.
127
- *
128
- * If the child was spawned with `stdio[2]` set to anything other than `'pipe'`,
129
- * then this will be `null`.
130
- *
131
- * `subprocess.stderr` is an alias for `subprocess.stdio[2]`. Both properties will
132
- * refer to the same value.
133
- *
134
- * The `subprocess.stderr` property can be `null` or `undefined` if the child process could not be successfully spawned.
135
- * @since v0.1.90
136
- */
137
- stderr: Readable | null;
138
- /**
139
- * The `subprocess.channel` property is a reference to the child's IPC channel. If
140
- * no IPC channel exists, this property is `undefined`.
141
- * @since v7.1.0
142
- */
143
- readonly channel?: Control | null;
144
- /**
145
- * A sparse array of pipes to the child process, corresponding with positions in
146
- * the `stdio` option passed to {@link spawn} that have been set
147
- * to the value `'pipe'`. `subprocess.stdio[0]`, `subprocess.stdio[1]`, and `subprocess.stdio[2]` are also available as `subprocess.stdin`, `subprocess.stdout`, and `subprocess.stderr`,
148
- * respectively.
149
- *
150
- * In the following example, only the child's fd `1` (stdout) is configured as a
151
- * pipe, so only the parent's `subprocess.stdio[1]` is a stream, all other values
152
- * in the array are `null`.
153
- *
154
- * ```js
155
- * import assert from 'node:assert';
156
- * import fs from 'node:fs';
157
- * import child_process from 'node:child_process';
158
- *
159
- * const subprocess = child_process.spawn('ls', {
160
- * stdio: [
161
- * 0, // Use parent's stdin for child.
162
- * 'pipe', // Pipe child's stdout to parent.
163
- * fs.openSync('err.out', 'w'), // Direct child's stderr to a file.
164
- * ],
165
- * });
166
- *
167
- * assert.strictEqual(subprocess.stdio[0], null);
168
- * assert.strictEqual(subprocess.stdio[0], subprocess.stdin);
169
- *
170
- * assert(subprocess.stdout);
171
- * assert.strictEqual(subprocess.stdio[1], subprocess.stdout);
172
- *
173
- * assert.strictEqual(subprocess.stdio[2], null);
174
- * assert.strictEqual(subprocess.stdio[2], subprocess.stderr);
175
- * ```
176
- *
177
- * The `subprocess.stdio` property can be `undefined` if the child process could
178
- * not be successfully spawned.
179
- * @since v0.7.10
180
- */
181
- readonly stdio: [
182
- Writable | null,
183
- // stdin
184
- Readable | null,
185
- // stdout
186
- Readable | null,
187
- // stderr
188
- Readable | Writable | null | undefined,
189
- // extra
190
- Readable | Writable | null | undefined, // extra
191
- ];
192
- /**
193
- * The `subprocess.killed` property indicates whether the child process
194
- * successfully received a signal from `subprocess.kill()`. The `killed` property
195
- * does not indicate that the child process has been terminated.
196
- * @since v0.5.10
197
- */
198
- readonly killed: boolean;
199
- /**
200
- * Returns the process identifier (PID) of the child process. If the child process
201
- * fails to spawn due to errors, then the value is `undefined` and `error` is
202
- * emitted.
203
- *
204
- * ```js
205
- * import { spawn } from 'node:child_process';
206
- * const grep = spawn('grep', ['ssh']);
207
- *
208
- * console.log(`Spawned child pid: ${grep.pid}`);
209
- * grep.stdin.end();
210
- * ```
211
- * @since v0.1.90
212
- */
213
- readonly pid?: number | undefined;
214
- /**
215
- * The `subprocess.connected` property indicates whether it is still possible to
216
- * send and receive messages from a child process. When `subprocess.connected` is `false`, it is no longer possible to send or receive messages.
217
- * @since v0.7.2
218
- */
219
- readonly connected: boolean;
220
- /**
221
- * The `subprocess.exitCode` property indicates the exit code of the child process.
222
- * If the child process is still running, the field will be `null`.
223
- */
224
- readonly exitCode: number | null;
225
- /**
226
- * The `subprocess.signalCode` property indicates the signal received by
227
- * the child process if any, else `null`.
228
- */
229
- readonly signalCode: NodeJS.Signals | null;
230
- /**
231
- * The `subprocess.spawnargs` property represents the full list of command-line
232
- * arguments the child process was launched with.
233
- */
234
- readonly spawnargs: string[];
235
- /**
236
- * The `subprocess.spawnfile` property indicates the executable file name of
237
- * the child process that is launched.
238
- *
239
- * For {@link fork}, its value will be equal to `process.execPath`.
240
- * For {@link spawn}, its value will be the name of
241
- * the executable file.
242
- * For {@link exec}, its value will be the name of the shell
243
- * in which the child process is launched.
244
- */
245
- readonly spawnfile: string;
246
- /**
247
- * The `subprocess.kill()` method sends a signal to the child process. If no
248
- * argument is given, the process will be sent the `'SIGTERM'` signal. See [`signal(7)`](http://man7.org/linux/man-pages/man7/signal.7.html) for a list of available signals. This function
249
- * returns `true` if [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) succeeds, and `false` otherwise.
250
- *
251
- * ```js
252
- * import { spawn } from 'node:child_process';
253
- * const grep = spawn('grep', ['ssh']);
254
- *
255
- * grep.on('close', (code, signal) => {
256
- * console.log(
257
- * `child process terminated due to receipt of signal ${signal}`);
258
- * });
259
- *
260
- * // Send SIGHUP to process.
261
- * grep.kill('SIGHUP');
262
- * ```
263
- *
264
- * The `ChildProcess` object may emit an `'error'` event if the signal
265
- * cannot be delivered. Sending a signal to a child process that has already exited
266
- * is not an error but may have unforeseen consequences. Specifically, if the
267
- * process identifier (PID) has been reassigned to another process, the signal will
268
- * be delivered to that process instead which can have unexpected results.
269
- *
270
- * While the function is called `kill`, the signal delivered to the child process
271
- * may not actually terminate the process.
272
- *
273
- * See [`kill(2)`](http://man7.org/linux/man-pages/man2/kill.2.html) for reference.
274
- *
275
- * On Windows, where POSIX signals do not exist, the `signal` argument will be
276
- * ignored, and the process will be killed forcefully and abruptly (similar to `'SIGKILL'`).
277
- * See `Signal Events` for more details.
278
- *
279
- * On Linux, child processes of child processes will not be terminated
280
- * when attempting to kill their parent. This is likely to happen when running a
281
- * new process in a shell or with the use of the `shell` option of `ChildProcess`:
282
- *
283
- * ```js
284
- * 'use strict';
285
- * import { spawn } from 'node:child_process';
286
- *
287
- * const subprocess = spawn(
288
- * 'sh',
289
- * [
290
- * '-c',
291
- * `node -e "setInterval(() => {
292
- * console.log(process.pid, 'is alive')
293
- * }, 500);"`,
294
- * ], {
295
- * stdio: ['inherit', 'inherit', 'inherit'],
296
- * },
297
- * );
298
- *
299
- * setTimeout(() => {
300
- * subprocess.kill(); // Does not terminate the Node.js process in the shell.
301
- * }, 2000);
302
- * ```
303
- * @since v0.1.90
304
- */
305
- kill(signal?: NodeJS.Signals | number): boolean;
306
- /**
307
- * Calls {@link ChildProcess.kill} with `'SIGTERM'`.
308
- * @since v20.5.0
309
- */
310
- [Symbol.dispose](): void;
311
- /**
312
- * When an IPC channel has been established between the parent and child (
313
- * i.e. when using {@link fork}), the `subprocess.send()` method can
314
- * be used to send messages to the child process. When the child process is a
315
- * Node.js instance, these messages can be received via the `'message'` event.
316
- *
317
- * The message goes through serialization and parsing. The resulting
318
- * message might not be the same as what is originally sent.
319
- *
320
- * For example, in the parent script:
321
- *
322
- * ```js
323
- * import cp from 'node:child_process';
324
- * const n = cp.fork(`${__dirname}/sub.js`);
325
- *
326
- * n.on('message', (m) => {
327
- * console.log('PARENT got message:', m);
328
- * });
329
- *
330
- * // Causes the child to print: CHILD got message: { hello: 'world' }
331
- * n.send({ hello: 'world' });
332
- * ```
333
- *
334
- * And then the child script, `'sub.js'` might look like this:
335
- *
336
- * ```js
337
- * process.on('message', (m) => {
338
- * console.log('CHILD got message:', m);
339
- * });
340
- *
341
- * // Causes the parent to print: PARENT got message: { foo: 'bar', baz: null }
342
- * process.send({ foo: 'bar', baz: NaN });
343
- * ```
344
- *
345
- * Child Node.js processes will have a `process.send()` method of their own
346
- * that allows the child to send messages back to the parent.
347
- *
348
- * There is a special case when sending a `{cmd: 'NODE_foo'}` message. Messages
349
- * containing a `NODE_` prefix in the `cmd` property are reserved for use within
350
- * Node.js core and will not be emitted in the child's `'message'` event. Rather, such messages are emitted using the `'internalMessage'` event and are consumed internally by Node.js.
351
- * Applications should avoid using such messages or listening for `'internalMessage'` events as it is subject to change without notice.
352
- *
353
- * The optional `sendHandle` argument that may be passed to `subprocess.send()` is
354
- * for passing a TCP server or socket object to the child process. The child will
355
- * receive the object as the second argument passed to the callback function
356
- * registered on the `'message'` event. Any data that is received and buffered in
357
- * the socket will not be sent to the child. Sending IPC sockets is not supported on Windows.
358
- *
359
- * The optional `callback` is a function that is invoked after the message is
360
- * sent but before the child may have received it. The function is called with a
361
- * single argument: `null` on success, or an `Error` object on failure.
362
- *
363
- * If no `callback` function is provided and the message cannot be sent, an `'error'` event will be emitted by the `ChildProcess` object. This can
364
- * happen, for instance, when the child process has already exited.
365
- *
366
- * `subprocess.send()` will return `false` if the channel has closed or when the
367
- * backlog of unsent messages exceeds a threshold that makes it unwise to send
368
- * more. Otherwise, the method returns `true`. The `callback` function can be
369
- * used to implement flow control.
370
- *
371
- * #### Example: sending a server object
372
- *
373
- * The `sendHandle` argument can be used, for instance, to pass the handle of
374
- * a TCP server object to the child process as illustrated in the example below:
375
- *
376
- * ```js
377
- * import { createServer } from 'node:net';
378
- * import { fork } from 'node:child_process';
379
- * const subprocess = fork('subprocess.js');
380
- *
381
- * // Open up the server object and send the handle.
382
- * const server = createServer();
383
- * server.on('connection', (socket) => {
384
- * socket.end('handled by parent');
385
- * });
386
- * server.listen(1337, () => {
387
- * subprocess.send('server', server);
388
- * });
389
- * ```
390
- *
391
- * The child would then receive the server object as:
392
- *
393
- * ```js
394
- * process.on('message', (m, server) => {
395
- * if (m === 'server') {
396
- * server.on('connection', (socket) => {
397
- * socket.end('handled by child');
398
- * });
399
- * }
400
- * });
401
- * ```
402
- *
403
- * Once the server is now shared between the parent and child, some connections
404
- * can be handled by the parent and some by the child.
405
- *
406
- * While the example above uses a server created using the `node:net` module, `node:dgram` module servers use exactly the same workflow with the exceptions of
407
- * listening on a `'message'` event instead of `'connection'` and using `server.bind()` instead of `server.listen()`. This is, however, only
408
- * supported on Unix platforms.
409
- *
410
- * #### Example: sending a socket object
411
- *
412
- * Similarly, the `sendHandler` argument can be used to pass the handle of a
413
- * socket to the child process. The example below spawns two children that each
414
- * handle connections with "normal" or "special" priority:
415
- *
416
- * ```js
417
- * import { createServer } from 'node:net';
418
- * import { fork } from 'node:child_process';
419
- * const normal = fork('subprocess.js', ['normal']);
420
- * const special = fork('subprocess.js', ['special']);
421
- *
422
- * // Open up the server and send sockets to child. Use pauseOnConnect to prevent
423
- * // the sockets from being read before they are sent to the child process.
424
- * const server = createServer({ pauseOnConnect: true });
425
- * server.on('connection', (socket) => {
426
- *
427
- * // If this is special priority...
428
- * if (socket.remoteAddress === '74.125.127.100') {
429
- * special.send('socket', socket);
430
- * return;
431
- * }
432
- * // This is normal priority.
433
- * normal.send('socket', socket);
434
- * });
435
- * server.listen(1337);
436
- * ```
437
- *
438
- * The `subprocess.js` would receive the socket handle as the second argument
439
- * passed to the event callback function:
440
- *
441
- * ```js
442
- * process.on('message', (m, socket) => {
443
- * if (m === 'socket') {
444
- * if (socket) {
445
- * // Check that the client socket exists.
446
- * // It is possible for the socket to be closed between the time it is
447
- * // sent and the time it is received in the child process.
448
- * socket.end(`Request handled with ${process.argv[2]} priority`);
449
- * }
450
- * }
451
- * });
452
- * ```
453
- *
454
- * Do not use `.maxConnections` on a socket that has been passed to a subprocess.
455
- * The parent cannot track when the socket is destroyed.
456
- *
457
- * Any `'message'` handlers in the subprocess should verify that `socket` exists,
458
- * as the connection may have been closed during the time it takes to send the
459
- * connection to the child.
460
- * @since v0.5.9
461
- * @param sendHandle `undefined`, or a [`net.Socket`](https://nodejs.org/docs/latest-v24.x/api/net.html#class-netsocket), [`net.Server`](https://nodejs.org/docs/latest-v24.x/api/net.html#class-netserver), or [`dgram.Socket`](https://nodejs.org/docs/latest-v24.x/api/dgram.html#class-dgramsocket) object.
462
- * @param options The `options` argument, if present, is an object used to parameterize the sending of certain types of handles. `options` supports the following properties:
463
- */
464
- send(message: Serializable, callback?: (error: Error | null) => void): boolean;
465
- send(message: Serializable, sendHandle?: SendHandle, callback?: (error: Error | null) => void): boolean;
466
- send(
467
- message: Serializable,
468
- sendHandle?: SendHandle,
469
- options?: MessageOptions,
470
- callback?: (error: Error | null) => void,
471
- ): boolean;
472
- /**
473
- * Closes the IPC channel between parent and child, allowing the child to exit
474
- * gracefully once there are no other connections keeping it alive. After calling
475
- * this method the `subprocess.connected` and `process.connected` properties in
476
- * both the parent and child (respectively) will be set to `false`, and it will be
477
- * no longer possible to pass messages between the processes.
478
- *
479
- * The `'disconnect'` event will be emitted when there are no messages in the
480
- * process of being received. This will most often be triggered immediately after
481
- * calling `subprocess.disconnect()`.
482
- *
483
- * When the child process is a Node.js instance (e.g. spawned using {@link fork}), the `process.disconnect()` method can be invoked
484
- * within the child process to close the IPC channel as well.
485
- * @since v0.7.2
486
- */
487
- disconnect(): void;
488
- /**
489
- * By default, the parent will wait for the detached child to exit. To prevent the
490
- * parent from waiting for a given `subprocess` to exit, use the `subprocess.unref()` method. Doing so will cause the parent's event loop to not
491
- * include the child in its reference count, allowing the parent to exit
492
- * independently of the child, unless there is an established IPC channel between
493
- * the child and the parent.
494
- *
495
- * ```js
496
- * import { spawn } from 'node:child_process';
497
- *
498
- * const subprocess = spawn(process.argv[0], ['child_program.js'], {
499
- * detached: true,
500
- * stdio: 'ignore',
501
- * });
502
- *
503
- * subprocess.unref();
504
- * ```
505
- * @since v0.7.10
506
- */
507
- unref(): void;
508
- /**
509
- * Calling `subprocess.ref()` after making a call to `subprocess.unref()` will
510
- * restore the removed reference count for the child process, forcing the parent
511
- * to wait for the child to exit before exiting itself.
512
- *
513
- * ```js
514
- * import { spawn } from 'node:child_process';
515
- *
516
- * const subprocess = spawn(process.argv[0], ['child_program.js'], {
517
- * detached: true,
518
- * stdio: 'ignore',
519
- * });
520
- *
521
- * subprocess.unref();
522
- * subprocess.ref();
523
- * ```
524
- * @since v0.7.10
525
- */
526
- ref(): void;
527
- /**
528
- * events.EventEmitter
529
- * 1. close
530
- * 2. disconnect
531
- * 3. error
532
- * 4. exit
533
- * 5. message
534
- * 6. spawn
535
- */
536
- addListener(event: string, listener: (...args: any[]) => void): this;
537
- addListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
538
- addListener(event: "disconnect", listener: () => void): this;
539
- addListener(event: "error", listener: (err: Error) => void): this;
540
- addListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
541
- addListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
542
- addListener(event: "spawn", listener: () => void): this;
543
- emit(event: string | symbol, ...args: any[]): boolean;
544
- emit(event: "close", code: number | null, signal: NodeJS.Signals | null): boolean;
545
- emit(event: "disconnect"): boolean;
546
- emit(event: "error", err: Error): boolean;
547
- emit(event: "exit", code: number | null, signal: NodeJS.Signals | null): boolean;
548
- emit(event: "message", message: Serializable, sendHandle: SendHandle): boolean;
549
- emit(event: "spawn", listener: () => void): boolean;
550
- on(event: string, listener: (...args: any[]) => void): this;
551
- on(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
552
- on(event: "disconnect", listener: () => void): this;
553
- on(event: "error", listener: (err: Error) => void): this;
554
- on(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
555
- on(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
556
- on(event: "spawn", listener: () => void): this;
557
- once(event: string, listener: (...args: any[]) => void): this;
558
- once(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
559
- once(event: "disconnect", listener: () => void): this;
560
- once(event: "error", listener: (err: Error) => void): this;
561
- once(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
562
- once(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
563
- once(event: "spawn", listener: () => void): this;
564
- prependListener(event: string, listener: (...args: any[]) => void): this;
565
- prependListener(event: "close", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
566
- prependListener(event: "disconnect", listener: () => void): this;
567
- prependListener(event: "error", listener: (err: Error) => void): this;
568
- prependListener(event: "exit", listener: (code: number | null, signal: NodeJS.Signals | null) => void): this;
569
- prependListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
570
- prependListener(event: "spawn", listener: () => void): this;
571
- prependOnceListener(event: string, listener: (...args: any[]) => void): this;
572
- prependOnceListener(
573
- event: "close",
574
- listener: (code: number | null, signal: NodeJS.Signals | null) => void,
575
- ): this;
576
- prependOnceListener(event: "disconnect", listener: () => void): this;
577
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
578
- prependOnceListener(
579
- event: "exit",
580
- listener: (code: number | null, signal: NodeJS.Signals | null) => void,
581
- ): this;
582
- prependOnceListener(event: "message", listener: (message: Serializable, sendHandle: SendHandle) => void): this;
583
- prependOnceListener(event: "spawn", listener: () => void): this;
584
- }
585
- // return this object when stdio option is undefined or not specified
586
- interface ChildProcessWithoutNullStreams extends ChildProcess {
587
- stdin: Writable;
588
- stdout: Readable;
589
- stderr: Readable;
590
- readonly stdio: [
591
- Writable,
592
- Readable,
593
- Readable,
594
- // stderr
595
- Readable | Writable | null | undefined,
596
- // extra, no modification
597
- Readable | Writable | null | undefined, // extra, no modification
598
- ];
599
- }
600
- // return this object when stdio option is a tuple of 3
601
- interface ChildProcessByStdio<I extends null | Writable, O extends null | Readable, E extends null | Readable>
602
- extends ChildProcess
603
- {
604
- stdin: I;
605
- stdout: O;
606
- stderr: E;
607
- readonly stdio: [
608
- I,
609
- O,
610
- E,
611
- Readable | Writable | null | undefined,
612
- // extra, no modification
613
- Readable | Writable | null | undefined, // extra, no modification
614
- ];
615
- }
616
- interface Control extends EventEmitter {
617
- ref(): void;
618
- unref(): void;
619
- }
620
- interface MessageOptions {
621
- keepOpen?: boolean | undefined;
622
- }
623
- type IOType = "overlapped" | "pipe" | "ignore" | "inherit";
624
- type StdioOptions = IOType | Array<IOType | "ipc" | Stream | number | null | undefined>;
625
- type SerializationType = "json" | "advanced";
626
- interface MessagingOptions extends Abortable {
627
- /**
628
- * Specify the kind of serialization used for sending messages between processes.
629
- * @default 'json'
630
- */
631
- serialization?: SerializationType | undefined;
632
- /**
633
- * The signal value to be used when the spawned process will be killed by the abort signal.
634
- * @default 'SIGTERM'
635
- */
636
- killSignal?: NodeJS.Signals | number | undefined;
637
- /**
638
- * In milliseconds the maximum amount of time the process is allowed to run.
639
- */
640
- timeout?: number | undefined;
641
- }
642
- interface ProcessEnvOptions {
643
- uid?: number | undefined;
644
- gid?: number | undefined;
645
- cwd?: string | URL | undefined;
646
- env?: NodeJS.ProcessEnv | undefined;
647
- }
648
- interface CommonOptions extends ProcessEnvOptions {
649
- /**
650
- * @default false
651
- */
652
- windowsHide?: boolean | undefined;
653
- /**
654
- * @default 0
655
- */
656
- timeout?: number | undefined;
657
- }
658
- interface CommonSpawnOptions extends CommonOptions, MessagingOptions, Abortable {
659
- argv0?: string | undefined;
660
- /**
661
- * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
662
- * If passed as an array, the first element is used for `stdin`, the second for
663
- * `stdout`, and the third for `stderr`. A fourth element can be used to
664
- * specify the `stdio` behavior beyond the standard streams. See
665
- * {@link ChildProcess.stdio} for more information.
666
- *
667
- * @default 'pipe'
668
- */
669
- stdio?: StdioOptions | undefined;
670
- shell?: boolean | string | undefined;
671
- windowsVerbatimArguments?: boolean | undefined;
672
- }
673
- interface SpawnOptions extends CommonSpawnOptions {
674
- detached?: boolean | undefined;
675
- }
676
- interface SpawnOptionsWithoutStdio extends SpawnOptions {
677
- stdio?: StdioPipeNamed | StdioPipe[] | undefined;
678
- }
679
- type StdioNull = "inherit" | "ignore" | Stream;
680
- type StdioPipeNamed = "pipe" | "overlapped";
681
- type StdioPipe = undefined | null | StdioPipeNamed;
682
- interface SpawnOptionsWithStdioTuple<
683
- Stdin extends StdioNull | StdioPipe,
684
- Stdout extends StdioNull | StdioPipe,
685
- Stderr extends StdioNull | StdioPipe,
686
- > extends SpawnOptions {
687
- stdio: [Stdin, Stdout, Stderr];
688
- }
689
- /**
690
- * The `child_process.spawn()` method spawns a new process using the given `command`, with command-line arguments in `args`. If omitted, `args` defaults
691
- * to an empty array.
692
- *
693
- * **If the `shell` option is enabled, do not pass unsanitized user input to this**
694
- * **function. Any input containing shell metacharacters may be used to trigger**
695
- * **arbitrary command execution.**
696
- *
697
- * A third argument may be used to specify additional options, with these defaults:
698
- *
699
- * ```js
700
- * const defaults = {
701
- * cwd: undefined,
702
- * env: process.env,
703
- * };
704
- * ```
705
- *
706
- * Use `cwd` to specify the working directory from which the process is spawned.
707
- * If not given, the default is to inherit the current working directory. If given,
708
- * but the path does not exist, the child process emits an `ENOENT` error
709
- * and exits immediately. `ENOENT` is also emitted when the command
710
- * does not exist.
711
- *
712
- * Use `env` to specify environment variables that will be visible to the new
713
- * process, the default is `process.env`.
714
- *
715
- * `undefined` values in `env` will be ignored.
716
- *
717
- * Example of running `ls -lh /usr`, capturing `stdout`, `stderr`, and the
718
- * exit code:
719
- *
720
- * ```js
721
- * import { spawn } from 'node:child_process';
722
- * const ls = spawn('ls', ['-lh', '/usr']);
723
- *
724
- * ls.stdout.on('data', (data) => {
725
- * console.log(`stdout: ${data}`);
726
- * });
727
- *
728
- * ls.stderr.on('data', (data) => {
729
- * console.error(`stderr: ${data}`);
730
- * });
731
- *
732
- * ls.on('close', (code) => {
733
- * console.log(`child process exited with code ${code}`);
734
- * });
735
- * ```
736
- *
737
- * Example: A very elaborate way to run `ps ax | grep ssh`
738
- *
739
- * ```js
740
- * import { spawn } from 'node:child_process';
741
- * const ps = spawn('ps', ['ax']);
742
- * const grep = spawn('grep', ['ssh']);
743
- *
744
- * ps.stdout.on('data', (data) => {
745
- * grep.stdin.write(data);
746
- * });
747
- *
748
- * ps.stderr.on('data', (data) => {
749
- * console.error(`ps stderr: ${data}`);
750
- * });
751
- *
752
- * ps.on('close', (code) => {
753
- * if (code !== 0) {
754
- * console.log(`ps process exited with code ${code}`);
755
- * }
756
- * grep.stdin.end();
757
- * });
758
- *
759
- * grep.stdout.on('data', (data) => {
760
- * console.log(data.toString());
761
- * });
762
- *
763
- * grep.stderr.on('data', (data) => {
764
- * console.error(`grep stderr: ${data}`);
765
- * });
766
- *
767
- * grep.on('close', (code) => {
768
- * if (code !== 0) {
769
- * console.log(`grep process exited with code ${code}`);
770
- * }
771
- * });
772
- * ```
773
- *
774
- * Example of checking for failed `spawn`:
775
- *
776
- * ```js
777
- * import { spawn } from 'node:child_process';
778
- * const subprocess = spawn('bad_command');
779
- *
780
- * subprocess.on('error', (err) => {
781
- * console.error('Failed to start subprocess.');
782
- * });
783
- * ```
784
- *
785
- * Certain platforms (macOS, Linux) will use the value of `argv[0]` for the process
786
- * title while others (Windows, SunOS) will use `command`.
787
- *
788
- * Node.js overwrites `argv[0]` with `process.execPath` on startup, so `process.argv[0]` in a Node.js child process will not match the `argv0` parameter passed to `spawn` from the parent. Retrieve
789
- * it with the `process.argv0` property instead.
790
- *
791
- * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
792
- * the error passed to the callback will be an `AbortError`:
793
- *
794
- * ```js
795
- * import { spawn } from 'node:child_process';
796
- * const controller = new AbortController();
797
- * const { signal } = controller;
798
- * const grep = spawn('grep', ['ssh'], { signal });
799
- * grep.on('error', (err) => {
800
- * // This will be called with err being an AbortError if the controller aborts
801
- * });
802
- * controller.abort(); // Stops the child process
803
- * ```
804
- * @since v0.1.90
805
- * @param command The command to run.
806
- * @param args List of string arguments.
807
- */
808
- function spawn(command: string, options?: SpawnOptionsWithoutStdio): ChildProcessWithoutNullStreams;
809
- function spawn(
810
- command: string,
811
- options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
812
- ): ChildProcessByStdio<Writable, Readable, Readable>;
813
- function spawn(
814
- command: string,
815
- options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
816
- ): ChildProcessByStdio<Writable, Readable, null>;
817
- function spawn(
818
- command: string,
819
- options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
820
- ): ChildProcessByStdio<Writable, null, Readable>;
821
- function spawn(
822
- command: string,
823
- options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
824
- ): ChildProcessByStdio<null, Readable, Readable>;
825
- function spawn(
826
- command: string,
827
- options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
828
- ): ChildProcessByStdio<Writable, null, null>;
829
- function spawn(
830
- command: string,
831
- options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
832
- ): ChildProcessByStdio<null, Readable, null>;
833
- function spawn(
834
- command: string,
835
- options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
836
- ): ChildProcessByStdio<null, null, Readable>;
837
- function spawn(
838
- command: string,
839
- options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
840
- ): ChildProcessByStdio<null, null, null>;
841
- function spawn(command: string, options: SpawnOptions): ChildProcess;
842
- // overloads of spawn with 'args'
843
- function spawn(
844
- command: string,
845
- args?: readonly string[],
846
- options?: SpawnOptionsWithoutStdio,
847
- ): ChildProcessWithoutNullStreams;
848
- function spawn(
849
- command: string,
850
- args: readonly string[],
851
- options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioPipe>,
852
- ): ChildProcessByStdio<Writable, Readable, Readable>;
853
- function spawn(
854
- command: string,
855
- args: readonly string[],
856
- options: SpawnOptionsWithStdioTuple<StdioPipe, StdioPipe, StdioNull>,
857
- ): ChildProcessByStdio<Writable, Readable, null>;
858
- function spawn(
859
- command: string,
860
- args: readonly string[],
861
- options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioPipe>,
862
- ): ChildProcessByStdio<Writable, null, Readable>;
863
- function spawn(
864
- command: string,
865
- args: readonly string[],
866
- options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioPipe>,
867
- ): ChildProcessByStdio<null, Readable, Readable>;
868
- function spawn(
869
- command: string,
870
- args: readonly string[],
871
- options: SpawnOptionsWithStdioTuple<StdioPipe, StdioNull, StdioNull>,
872
- ): ChildProcessByStdio<Writable, null, null>;
873
- function spawn(
874
- command: string,
875
- args: readonly string[],
876
- options: SpawnOptionsWithStdioTuple<StdioNull, StdioPipe, StdioNull>,
877
- ): ChildProcessByStdio<null, Readable, null>;
878
- function spawn(
879
- command: string,
880
- args: readonly string[],
881
- options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioPipe>,
882
- ): ChildProcessByStdio<null, null, Readable>;
883
- function spawn(
884
- command: string,
885
- args: readonly string[],
886
- options: SpawnOptionsWithStdioTuple<StdioNull, StdioNull, StdioNull>,
887
- ): ChildProcessByStdio<null, null, null>;
888
- function spawn(command: string, args: readonly string[], options: SpawnOptions): ChildProcess;
889
- interface ExecOptions extends CommonOptions {
890
- shell?: string | undefined;
891
- signal?: AbortSignal | undefined;
892
- maxBuffer?: number | undefined;
893
- killSignal?: NodeJS.Signals | number | undefined;
894
- encoding?: string | null | undefined;
895
- }
896
- interface ExecOptionsWithStringEncoding extends ExecOptions {
897
- encoding?: BufferEncoding | undefined;
898
- }
899
- interface ExecOptionsWithBufferEncoding extends ExecOptions {
900
- encoding: "buffer" | null; // specify `null`.
901
- }
902
- // TODO: Just Plain Wrong™ (see also nodejs/node#57392)
903
- interface ExecException extends Error {
904
- cmd?: string;
905
- killed?: boolean;
906
- code?: number;
907
- signal?: NodeJS.Signals;
908
- stdout?: string;
909
- stderr?: string;
910
- }
911
- /**
912
- * Spawns a shell then executes the `command` within that shell, buffering any
913
- * generated output. The `command` string passed to the exec function is processed
914
- * directly by the shell and special characters (vary based on [shell](https://en.wikipedia.org/wiki/List_of_command-line_interpreters))
915
- * need to be dealt with accordingly:
916
- *
917
- * ```js
918
- * import { exec } from 'node:child_process';
919
- *
920
- * exec('"/path/to/test file/test.sh" arg1 arg2');
921
- * // Double quotes are used so that the space in the path is not interpreted as
922
- * // a delimiter of multiple arguments.
923
- *
924
- * exec('echo "The \\$HOME variable is $HOME"');
925
- * // The $HOME variable is escaped in the first instance, but not in the second.
926
- * ```
927
- *
928
- * **Never pass unsanitized user input to this function. Any input containing shell**
929
- * **metacharacters may be used to trigger arbitrary command execution.**
930
- *
931
- * If a `callback` function is provided, it is called with the arguments `(error, stdout, stderr)`. On success, `error` will be `null`. On error, `error` will be an instance of `Error`. The
932
- * `error.code` property will be
933
- * the exit code of the process. By convention, any exit code other than `0` indicates an error. `error.signal` will be the signal that terminated the
934
- * process.
935
- *
936
- * The `stdout` and `stderr` arguments passed to the callback will contain the
937
- * stdout and stderr output of the child process. By default, Node.js will decode
938
- * the output as UTF-8 and pass strings to the callback. The `encoding` option
939
- * can be used to specify the character encoding used to decode the stdout and
940
- * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
941
- * encoding, `Buffer` objects will be passed to the callback instead.
942
- *
943
- * ```js
944
- * import { exec } from 'node:child_process';
945
- * exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => {
946
- * if (error) {
947
- * console.error(`exec error: ${error}`);
948
- * return;
949
- * }
950
- * console.log(`stdout: ${stdout}`);
951
- * console.error(`stderr: ${stderr}`);
952
- * });
953
- * ```
954
- *
955
- * If `timeout` is greater than `0`, the parent will send the signal
956
- * identified by the `killSignal` property (the default is `'SIGTERM'`) if the
957
- * child runs longer than `timeout` milliseconds.
958
- *
959
- * Unlike the [`exec(3)`](http://man7.org/linux/man-pages/man3/exec.3.html) POSIX system call, `child_process.exec()` does not replace
960
- * the existing process and uses a shell to execute the command.
961
- *
962
- * If this method is invoked as its `util.promisify()` ed version, it returns
963
- * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In
964
- * case of an error (including any error resulting in an exit code other than 0), a
965
- * rejected promise is returned, with the same `error` object given in the
966
- * callback, but with two additional properties `stdout` and `stderr`.
967
- *
968
- * ```js
969
- * import util from 'node:util';
970
- * import child_process from 'node:child_process';
971
- * const exec = util.promisify(child_process.exec);
972
- *
973
- * async function lsExample() {
974
- * const { stdout, stderr } = await exec('ls');
975
- * console.log('stdout:', stdout);
976
- * console.error('stderr:', stderr);
977
- * }
978
- * lsExample();
979
- * ```
980
- *
981
- * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
982
- * the error passed to the callback will be an `AbortError`:
983
- *
984
- * ```js
985
- * import { exec } from 'node:child_process';
986
- * const controller = new AbortController();
987
- * const { signal } = controller;
988
- * const child = exec('grep ssh', { signal }, (error) => {
989
- * console.error(error); // an AbortError
990
- * });
991
- * controller.abort();
992
- * ```
993
- * @since v0.1.90
994
- * @param command The command to run, with space-separated arguments.
995
- * @param callback called with the output when process terminates.
996
- */
997
- function exec(
998
- command: string,
999
- callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
1000
- ): ChildProcess;
1001
- // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
1002
- function exec(
1003
- command: string,
1004
- options: ExecOptionsWithBufferEncoding,
1005
- callback?: (error: ExecException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
1006
- ): ChildProcess;
1007
- // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
1008
- function exec(
1009
- command: string,
1010
- options: ExecOptionsWithStringEncoding,
1011
- callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
1012
- ): ChildProcess;
1013
- // fallback if nothing else matches. Worst case is always `string | Buffer`.
1014
- function exec(
1015
- command: string,
1016
- options: ExecOptions | undefined | null,
1017
- callback?: (
1018
- error: ExecException | null,
1019
- stdout: string | NonSharedBuffer,
1020
- stderr: string | NonSharedBuffer,
1021
- ) => void,
1022
- ): ChildProcess;
1023
- interface PromiseWithChild<T> extends Promise<T> {
1024
- child: ChildProcess;
1025
- }
1026
- namespace exec {
1027
- function __promisify__(command: string): PromiseWithChild<{
1028
- stdout: string;
1029
- stderr: string;
1030
- }>;
1031
- function __promisify__(
1032
- command: string,
1033
- options: ExecOptionsWithBufferEncoding,
1034
- ): PromiseWithChild<{
1035
- stdout: NonSharedBuffer;
1036
- stderr: NonSharedBuffer;
1037
- }>;
1038
- function __promisify__(
1039
- command: string,
1040
- options: ExecOptionsWithStringEncoding,
1041
- ): PromiseWithChild<{
1042
- stdout: string;
1043
- stderr: string;
1044
- }>;
1045
- function __promisify__(
1046
- command: string,
1047
- options: ExecOptions | undefined | null,
1048
- ): PromiseWithChild<{
1049
- stdout: string | NonSharedBuffer;
1050
- stderr: string | NonSharedBuffer;
1051
- }>;
1052
- }
1053
- interface ExecFileOptions extends CommonOptions, Abortable {
1054
- maxBuffer?: number | undefined;
1055
- killSignal?: NodeJS.Signals | number | undefined;
1056
- windowsVerbatimArguments?: boolean | undefined;
1057
- shell?: boolean | string | undefined;
1058
- signal?: AbortSignal | undefined;
1059
- encoding?: string | null | undefined;
1060
- }
1061
- interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
1062
- encoding?: BufferEncoding | undefined;
1063
- }
1064
- interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
1065
- encoding: "buffer" | null;
1066
- }
1067
- /** @deprecated Use `ExecFileOptions` instead. */
1068
- interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {}
1069
- // TODO: execFile exceptions can take many forms... this accurately describes none of them
1070
- type ExecFileException =
1071
- & Omit<ExecException, "code">
1072
- & Omit<NodeJS.ErrnoException, "code">
1073
- & { code?: string | number | null };
1074
- /**
1075
- * The `child_process.execFile()` function is similar to {@link exec} except that it does not spawn a shell by default. Rather, the specified
1076
- * executable `file` is spawned directly as a new process making it slightly more
1077
- * efficient than {@link exec}.
1078
- *
1079
- * The same options as {@link exec} are supported. Since a shell is
1080
- * not spawned, behaviors such as I/O redirection and file globbing are not
1081
- * supported.
1082
- *
1083
- * ```js
1084
- * import { execFile } from 'node:child_process';
1085
- * const child = execFile('node', ['--version'], (error, stdout, stderr) => {
1086
- * if (error) {
1087
- * throw error;
1088
- * }
1089
- * console.log(stdout);
1090
- * });
1091
- * ```
1092
- *
1093
- * The `stdout` and `stderr` arguments passed to the callback will contain the
1094
- * stdout and stderr output of the child process. By default, Node.js will decode
1095
- * the output as UTF-8 and pass strings to the callback. The `encoding` option
1096
- * can be used to specify the character encoding used to decode the stdout and
1097
- * stderr output. If `encoding` is `'buffer'`, or an unrecognized character
1098
- * encoding, `Buffer` objects will be passed to the callback instead.
1099
- *
1100
- * If this method is invoked as its `util.promisify()` ed version, it returns
1101
- * a `Promise` for an `Object` with `stdout` and `stderr` properties. The returned `ChildProcess` instance is attached to the `Promise` as a `child` property. In
1102
- * case of an error (including any error resulting in an exit code other than 0), a
1103
- * rejected promise is returned, with the same `error` object given in the
1104
- * callback, but with two additional properties `stdout` and `stderr`.
1105
- *
1106
- * ```js
1107
- * import util from 'node:util';
1108
- * import child_process from 'node:child_process';
1109
- * const execFile = util.promisify(child_process.execFile);
1110
- * async function getVersion() {
1111
- * const { stdout } = await execFile('node', ['--version']);
1112
- * console.log(stdout);
1113
- * }
1114
- * getVersion();
1115
- * ```
1116
- *
1117
- * **If the `shell` option is enabled, do not pass unsanitized user input to this**
1118
- * **function. Any input containing shell metacharacters may be used to trigger**
1119
- * **arbitrary command execution.**
1120
- *
1121
- * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
1122
- * the error passed to the callback will be an `AbortError`:
1123
- *
1124
- * ```js
1125
- * import { execFile } from 'node:child_process';
1126
- * const controller = new AbortController();
1127
- * const { signal } = controller;
1128
- * const child = execFile('node', ['--version'], { signal }, (error) => {
1129
- * console.error(error); // an AbortError
1130
- * });
1131
- * controller.abort();
1132
- * ```
1133
- * @since v0.1.91
1134
- * @param file The name or path of the executable file to run.
1135
- * @param args List of string arguments.
1136
- * @param callback Called with the output when process terminates.
1137
- */
1138
- // no `options` definitely means stdout/stderr are `string`.
1139
- function execFile(
1140
- file: string,
1141
- callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1142
- ): ChildProcess;
1143
- function execFile(
1144
- file: string,
1145
- args: readonly string[] | undefined | null,
1146
- callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1147
- ): ChildProcess;
1148
- // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
1149
- function execFile(
1150
- file: string,
1151
- options: ExecFileOptionsWithBufferEncoding,
1152
- callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
1153
- ): ChildProcess;
1154
- function execFile(
1155
- file: string,
1156
- args: readonly string[] | undefined | null,
1157
- options: ExecFileOptionsWithBufferEncoding,
1158
- callback?: (error: ExecFileException | null, stdout: NonSharedBuffer, stderr: NonSharedBuffer) => void,
1159
- ): ChildProcess;
1160
- // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
1161
- function execFile(
1162
- file: string,
1163
- options: ExecFileOptionsWithStringEncoding,
1164
- callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1165
- ): ChildProcess;
1166
- function execFile(
1167
- file: string,
1168
- args: readonly string[] | undefined | null,
1169
- options: ExecFileOptionsWithStringEncoding,
1170
- callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1171
- ): ChildProcess;
1172
- // fallback if nothing else matches. Worst case is always `string | Buffer`.
1173
- function execFile(
1174
- file: string,
1175
- options: ExecFileOptions | undefined | null,
1176
- callback:
1177
- | ((
1178
- error: ExecFileException | null,
1179
- stdout: string | NonSharedBuffer,
1180
- stderr: string | NonSharedBuffer,
1181
- ) => void)
1182
- | undefined
1183
- | null,
1184
- ): ChildProcess;
1185
- function execFile(
1186
- file: string,
1187
- args: readonly string[] | undefined | null,
1188
- options: ExecFileOptions | undefined | null,
1189
- callback:
1190
- | ((
1191
- error: ExecFileException | null,
1192
- stdout: string | NonSharedBuffer,
1193
- stderr: string | NonSharedBuffer,
1194
- ) => void)
1195
- | undefined
1196
- | null,
1197
- ): ChildProcess;
1198
- namespace execFile {
1199
- function __promisify__(file: string): PromiseWithChild<{
1200
- stdout: string;
1201
- stderr: string;
1202
- }>;
1203
- function __promisify__(
1204
- file: string,
1205
- args: readonly string[] | undefined | null,
1206
- ): PromiseWithChild<{
1207
- stdout: string;
1208
- stderr: string;
1209
- }>;
1210
- function __promisify__(
1211
- file: string,
1212
- options: ExecFileOptionsWithBufferEncoding,
1213
- ): PromiseWithChild<{
1214
- stdout: NonSharedBuffer;
1215
- stderr: NonSharedBuffer;
1216
- }>;
1217
- function __promisify__(
1218
- file: string,
1219
- args: readonly string[] | undefined | null,
1220
- options: ExecFileOptionsWithBufferEncoding,
1221
- ): PromiseWithChild<{
1222
- stdout: NonSharedBuffer;
1223
- stderr: NonSharedBuffer;
1224
- }>;
1225
- function __promisify__(
1226
- file: string,
1227
- options: ExecFileOptionsWithStringEncoding,
1228
- ): PromiseWithChild<{
1229
- stdout: string;
1230
- stderr: string;
1231
- }>;
1232
- function __promisify__(
1233
- file: string,
1234
- args: readonly string[] | undefined | null,
1235
- options: ExecFileOptionsWithStringEncoding,
1236
- ): PromiseWithChild<{
1237
- stdout: string;
1238
- stderr: string;
1239
- }>;
1240
- function __promisify__(
1241
- file: string,
1242
- options: ExecFileOptions | undefined | null,
1243
- ): PromiseWithChild<{
1244
- stdout: string | NonSharedBuffer;
1245
- stderr: string | NonSharedBuffer;
1246
- }>;
1247
- function __promisify__(
1248
- file: string,
1249
- args: readonly string[] | undefined | null,
1250
- options: ExecFileOptions | undefined | null,
1251
- ): PromiseWithChild<{
1252
- stdout: string | NonSharedBuffer;
1253
- stderr: string | NonSharedBuffer;
1254
- }>;
1255
- }
1256
- interface ForkOptions extends ProcessEnvOptions, MessagingOptions, Abortable {
1257
- execPath?: string | undefined;
1258
- execArgv?: string[] | undefined;
1259
- silent?: boolean | undefined;
1260
- /**
1261
- * Can be set to 'pipe', 'inherit', 'overlapped', or 'ignore', or an array of these strings.
1262
- * If passed as an array, the first element is used for `stdin`, the second for
1263
- * `stdout`, and the third for `stderr`. A fourth element can be used to
1264
- * specify the `stdio` behavior beyond the standard streams. See
1265
- * {@link ChildProcess.stdio} for more information.
1266
- *
1267
- * @default 'pipe'
1268
- */
1269
- stdio?: StdioOptions | undefined;
1270
- detached?: boolean | undefined;
1271
- windowsVerbatimArguments?: boolean | undefined;
1272
- }
1273
- /**
1274
- * The `child_process.fork()` method is a special case of {@link spawn} used specifically to spawn new Node.js processes.
1275
- * Like {@link spawn}, a `ChildProcess` object is returned. The
1276
- * returned `ChildProcess` will have an additional communication channel
1277
- * built-in that allows messages to be passed back and forth between the parent and
1278
- * child. See `subprocess.send()` for details.
1279
- *
1280
- * Keep in mind that spawned Node.js child processes are
1281
- * independent of the parent with exception of the IPC communication channel
1282
- * that is established between the two. Each process has its own memory, with
1283
- * their own V8 instances. Because of the additional resource allocations
1284
- * required, spawning a large number of child Node.js processes is not
1285
- * recommended.
1286
- *
1287
- * By default, `child_process.fork()` will spawn new Node.js instances using the `process.execPath` of the parent process. The `execPath` property in the `options` object allows for an alternative
1288
- * execution path to be used.
1289
- *
1290
- * Node.js processes launched with a custom `execPath` will communicate with the
1291
- * parent process using the file descriptor (fd) identified using the
1292
- * environment variable `NODE_CHANNEL_FD` on the child process.
1293
- *
1294
- * Unlike the [`fork(2)`](http://man7.org/linux/man-pages/man2/fork.2.html) POSIX system call, `child_process.fork()` does not clone the
1295
- * current process.
1296
- *
1297
- * The `shell` option available in {@link spawn} is not supported by `child_process.fork()` and will be ignored if set.
1298
- *
1299
- * If the `signal` option is enabled, calling `.abort()` on the corresponding `AbortController` is similar to calling `.kill()` on the child process except
1300
- * the error passed to the callback will be an `AbortError`:
1301
- *
1302
- * ```js
1303
- * if (process.argv[2] === 'child') {
1304
- * setTimeout(() => {
1305
- * console.log(`Hello from ${process.argv[2]}!`);
1306
- * }, 1_000);
1307
- * } else {
1308
- * import { fork } from 'node:child_process';
1309
- * const controller = new AbortController();
1310
- * const { signal } = controller;
1311
- * const child = fork(__filename, ['child'], { signal });
1312
- * child.on('error', (err) => {
1313
- * // This will be called with err being an AbortError if the controller aborts
1314
- * });
1315
- * controller.abort(); // Stops the child process
1316
- * }
1317
- * ```
1318
- * @since v0.5.0
1319
- * @param modulePath The module to run in the child.
1320
- * @param args List of string arguments.
1321
- */
1322
- function fork(modulePath: string | URL, options?: ForkOptions): ChildProcess;
1323
- function fork(modulePath: string | URL, args?: readonly string[], options?: ForkOptions): ChildProcess;
1324
- interface SpawnSyncOptions extends CommonSpawnOptions {
1325
- input?: string | NodeJS.ArrayBufferView | undefined;
1326
- maxBuffer?: number | undefined;
1327
- encoding?: BufferEncoding | "buffer" | null | undefined;
1328
- }
1329
- interface SpawnSyncOptionsWithStringEncoding extends SpawnSyncOptions {
1330
- encoding: BufferEncoding;
1331
- }
1332
- interface SpawnSyncOptionsWithBufferEncoding extends SpawnSyncOptions {
1333
- encoding?: "buffer" | null | undefined;
1334
- }
1335
- interface SpawnSyncReturns<T> {
1336
- pid: number;
1337
- output: Array<T | null>;
1338
- stdout: T;
1339
- stderr: T;
1340
- status: number | null;
1341
- signal: NodeJS.Signals | null;
1342
- error?: Error;
1343
- }
1344
- /**
1345
- * The `child_process.spawnSync()` method is generally identical to {@link spawn} with the exception that the function will not return
1346
- * until the child process has fully closed. When a timeout has been encountered
1347
- * and `killSignal` is sent, the method won't return until the process has
1348
- * completely exited. If the process intercepts and handles the `SIGTERM` signal
1349
- * and doesn't exit, the parent process will wait until the child process has
1350
- * exited.
1351
- *
1352
- * **If the `shell` option is enabled, do not pass unsanitized user input to this**
1353
- * **function. Any input containing shell metacharacters may be used to trigger**
1354
- * **arbitrary command execution.**
1355
- * @since v0.11.12
1356
- * @param command The command to run.
1357
- * @param args List of string arguments.
1358
- */
1359
- function spawnSync(command: string): SpawnSyncReturns<NonSharedBuffer>;
1360
- function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1361
- function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<NonSharedBuffer>;
1362
- function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | NonSharedBuffer>;
1363
- function spawnSync(command: string, args: readonly string[]): SpawnSyncReturns<NonSharedBuffer>;
1364
- function spawnSync(
1365
- command: string,
1366
- args: readonly string[],
1367
- options: SpawnSyncOptionsWithStringEncoding,
1368
- ): SpawnSyncReturns<string>;
1369
- function spawnSync(
1370
- command: string,
1371
- args: readonly string[],
1372
- options: SpawnSyncOptionsWithBufferEncoding,
1373
- ): SpawnSyncReturns<NonSharedBuffer>;
1374
- function spawnSync(
1375
- command: string,
1376
- args?: readonly string[],
1377
- options?: SpawnSyncOptions,
1378
- ): SpawnSyncReturns<string | NonSharedBuffer>;
1379
- interface CommonExecOptions extends CommonOptions {
1380
- input?: string | NodeJS.ArrayBufferView | undefined;
1381
- /**
1382
- * Can be set to 'pipe', 'inherit, or 'ignore', or an array of these strings.
1383
- * If passed as an array, the first element is used for `stdin`, the second for
1384
- * `stdout`, and the third for `stderr`. A fourth element can be used to
1385
- * specify the `stdio` behavior beyond the standard streams. See
1386
- * {@link ChildProcess.stdio} for more information.
1387
- *
1388
- * @default 'pipe'
1389
- */
1390
- stdio?: StdioOptions | undefined;
1391
- killSignal?: NodeJS.Signals | number | undefined;
1392
- maxBuffer?: number | undefined;
1393
- encoding?: BufferEncoding | "buffer" | null | undefined;
1394
- }
1395
- interface ExecSyncOptions extends CommonExecOptions {
1396
- shell?: string | undefined;
1397
- }
1398
- interface ExecSyncOptionsWithStringEncoding extends ExecSyncOptions {
1399
- encoding: BufferEncoding;
1400
- }
1401
- interface ExecSyncOptionsWithBufferEncoding extends ExecSyncOptions {
1402
- encoding?: "buffer" | null | undefined;
1403
- }
1404
- /**
1405
- * The `child_process.execSync()` method is generally identical to {@link exec} with the exception that the method will not return
1406
- * until the child process has fully closed. When a timeout has been encountered
1407
- * and `killSignal` is sent, the method won't return until the process has
1408
- * completely exited. If the child process intercepts and handles the `SIGTERM` signal and doesn't exit, the parent process will wait until the child process
1409
- * has exited.
1410
- *
1411
- * If the process times out or has a non-zero exit code, this method will throw.
1412
- * The `Error` object will contain the entire result from {@link spawnSync}.
1413
- *
1414
- * **Never pass unsanitized user input to this function. Any input containing shell**
1415
- * **metacharacters may be used to trigger arbitrary command execution.**
1416
- * @since v0.11.12
1417
- * @param command The command to run.
1418
- * @return The stdout from the command.
1419
- */
1420
- function execSync(command: string): NonSharedBuffer;
1421
- function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
1422
- function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): NonSharedBuffer;
1423
- function execSync(command: string, options?: ExecSyncOptions): string | NonSharedBuffer;
1424
- interface ExecFileSyncOptions extends CommonExecOptions {
1425
- shell?: boolean | string | undefined;
1426
- }
1427
- interface ExecFileSyncOptionsWithStringEncoding extends ExecFileSyncOptions {
1428
- encoding: BufferEncoding;
1429
- }
1430
- interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
1431
- encoding?: "buffer" | null | undefined; // specify `null`.
1432
- }
1433
- /**
1434
- * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
1435
- * return until the child process has fully closed. When a timeout has been
1436
- * encountered and `killSignal` is sent, the method won't return until the process
1437
- * has completely exited.
1438
- *
1439
- * If the child process intercepts and handles the `SIGTERM` signal and
1440
- * does not exit, the parent process will still wait until the child process has
1441
- * exited.
1442
- *
1443
- * If the process times out or has a non-zero exit code, this method will throw an `Error` that will include the full result of the underlying {@link spawnSync}.
1444
- *
1445
- * **If the `shell` option is enabled, do not pass unsanitized user input to this**
1446
- * **function. Any input containing shell metacharacters may be used to trigger**
1447
- * **arbitrary command execution.**
1448
- * @since v0.11.12
1449
- * @param file The name or path of the executable file to run.
1450
- * @param args List of string arguments.
1451
- * @return The stdout from the command.
1452
- */
1453
- function execFileSync(file: string): NonSharedBuffer;
1454
- function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
1455
- function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): NonSharedBuffer;
1456
- function execFileSync(file: string, options?: ExecFileSyncOptions): string | NonSharedBuffer;
1457
- function execFileSync(file: string, args: readonly string[]): NonSharedBuffer;
1458
- function execFileSync(
1459
- file: string,
1460
- args: readonly string[],
1461
- options: ExecFileSyncOptionsWithStringEncoding,
1462
- ): string;
1463
- function execFileSync(
1464
- file: string,
1465
- args: readonly string[],
1466
- options: ExecFileSyncOptionsWithBufferEncoding,
1467
- ): NonSharedBuffer;
1468
- function execFileSync(
1469
- file: string,
1470
- args?: readonly string[],
1471
- options?: ExecFileSyncOptions,
1472
- ): string | NonSharedBuffer;
1473
- }
1474
- declare module "node:child_process" {
1475
- export * from "child_process";
1476
- }