cdk-ecr-deployment 3.2.2 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (562) hide show
  1. package/.jsii +30 -34
  2. package/README.md +2 -2
  3. package/lambda-bin/.gitkeep +0 -0
  4. package/lambda-bin/bootstrap +0 -0
  5. package/{lambda → lambda-src}/Makefile +1 -1
  6. package/lib/index.js +6 -9
  7. package/package.json +1 -13
  8. package/lambda/install.js +0 -82
  9. package/node_modules/@sindresorhus/is/dist/index.d.ts +0 -232
  10. package/node_modules/@sindresorhus/is/dist/index.js +0 -434
  11. package/node_modules/@sindresorhus/is/dist/types.d.ts +0 -25
  12. package/node_modules/@sindresorhus/is/dist/types.js +0 -3
  13. package/node_modules/@sindresorhus/is/license +0 -9
  14. package/node_modules/@sindresorhus/is/package.json +0 -96
  15. package/node_modules/@sindresorhus/is/readme.md +0 -669
  16. package/node_modules/@szmarczak/http-timer/LICENSE +0 -21
  17. package/node_modules/@szmarczak/http-timer/README.md +0 -93
  18. package/node_modules/@szmarczak/http-timer/dist/source/index.d.ts +0 -32
  19. package/node_modules/@szmarczak/http-timer/dist/source/index.js +0 -126
  20. package/node_modules/@szmarczak/http-timer/package.json +0 -72
  21. package/node_modules/@types/cacheable-request/LICENSE +0 -21
  22. package/node_modules/@types/cacheable-request/README.md +0 -16
  23. package/node_modules/@types/cacheable-request/index.d.ts +0 -137
  24. package/node_modules/@types/cacheable-request/node_modules/@types/node/LICENSE +0 -21
  25. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +0 -15
  26. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert/strict.d.ts +0 -8
  27. package/node_modules/@types/cacheable-request/node_modules/@types/node/assert.d.ts +0 -1095
  28. package/node_modules/@types/cacheable-request/node_modules/@types/node/async_hooks.d.ts +0 -541
  29. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.buffer.d.ts +0 -460
  30. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +0 -1926
  31. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +0 -1549
  32. package/node_modules/@types/cacheable-request/node_modules/@types/node/cluster.d.ts +0 -579
  33. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  34. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/index.d.ts +0 -9
  35. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  36. package/node_modules/@types/cacheable-request/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  37. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +0 -452
  38. package/node_modules/@types/cacheable-request/node_modules/@types/node/constants.d.ts +0 -21
  39. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +0 -4510
  40. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +0 -599
  41. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  42. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +0 -476
  43. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +0 -865
  44. package/node_modules/@types/cacheable-request/node_modules/@types/node/dom-events.d.ts +0 -124
  45. package/node_modules/@types/cacheable-request/node_modules/@types/node/domain.d.ts +0 -170
  46. package/node_modules/@types/cacheable-request/node_modules/@types/node/events.d.ts +0 -931
  47. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +0 -1275
  48. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +0 -4343
  49. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +0 -511
  50. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  51. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +0 -1959
  52. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +0 -2558
  53. package/node_modules/@types/cacheable-request/node_modules/@types/node/https.d.ts +0 -543
  54. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +0 -92
  55. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +0 -3966
  56. package/node_modules/@types/cacheable-request/node_modules/@types/node/module.d.ts +0 -702
  57. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +0 -1029
  58. package/node_modules/@types/cacheable-request/node_modules/@types/node/os.d.ts +0 -495
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +0 -220
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/path.d.ts +0 -200
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/perf_hooks.d.ts +0 -970
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +0 -2013
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/punycode.d.ts +0 -117
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/querystring.d.ts +0 -153
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline/promises.d.ts +0 -162
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +0 -589
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/repl.d.ts +0 -430
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/sea.d.ts +0 -153
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/sqlite.d.ts +0 -439
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/consumers.d.ts +0 -12
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/promises.d.ts +0 -90
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +0 -614
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +0 -1662
  74. package/node_modules/@types/cacheable-request/node_modules/@types/node/string_decoder.d.ts +0 -67
  75. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +0 -2150
  76. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers/promises.d.ts +0 -97
  77. package/node_modules/@types/cacheable-request/node_modules/@types/node/timers.d.ts +0 -240
  78. package/node_modules/@types/cacheable-request/node_modules/@types/node/tls.d.ts +0 -1226
  79. package/node_modules/@types/cacheable-request/node_modules/@types/node/trace_events.d.ts +0 -197
  80. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
  81. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  82. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts5.6/index.d.ts +0 -92
  83. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +0 -208
  84. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +0 -972
  85. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +0 -2439
  86. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +0 -808
  87. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +0 -976
  88. package/node_modules/@types/cacheable-request/node_modules/@types/node/wasi.d.ts +0 -181
  89. package/node_modules/@types/cacheable-request/node_modules/@types/node/worker_threads.d.ts +0 -745
  90. package/node_modules/@types/cacheable-request/node_modules/@types/node/zlib.d.ts +0 -539
  91. package/node_modules/@types/cacheable-request/node_modules/undici-types/LICENSE +0 -21
  92. package/node_modules/@types/cacheable-request/node_modules/undici-types/README.md +0 -6
  93. package/node_modules/@types/cacheable-request/node_modules/undici-types/agent.d.ts +0 -31
  94. package/node_modules/@types/cacheable-request/node_modules/undici-types/api.d.ts +0 -43
  95. package/node_modules/@types/cacheable-request/node_modules/undici-types/balanced-pool.d.ts +0 -29
  96. package/node_modules/@types/cacheable-request/node_modules/undici-types/cache.d.ts +0 -36
  97. package/node_modules/@types/cacheable-request/node_modules/undici-types/client.d.ts +0 -108
  98. package/node_modules/@types/cacheable-request/node_modules/undici-types/connector.d.ts +0 -34
  99. package/node_modules/@types/cacheable-request/node_modules/undici-types/content-type.d.ts +0 -21
  100. package/node_modules/@types/cacheable-request/node_modules/undici-types/cookies.d.ts +0 -28
  101. package/node_modules/@types/cacheable-request/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  102. package/node_modules/@types/cacheable-request/node_modules/undici-types/dispatcher.d.ts +0 -255
  103. package/node_modules/@types/cacheable-request/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  104. package/node_modules/@types/cacheable-request/node_modules/undici-types/errors.d.ts +0 -149
  105. package/node_modules/@types/cacheable-request/node_modules/undici-types/eventsource.d.ts +0 -61
  106. package/node_modules/@types/cacheable-request/node_modules/undici-types/fetch.d.ts +0 -209
  107. package/node_modules/@types/cacheable-request/node_modules/undici-types/file.d.ts +0 -39
  108. package/node_modules/@types/cacheable-request/node_modules/undici-types/filereader.d.ts +0 -54
  109. package/node_modules/@types/cacheable-request/node_modules/undici-types/formdata.d.ts +0 -108
  110. package/node_modules/@types/cacheable-request/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  111. package/node_modules/@types/cacheable-request/node_modules/undici-types/global-origin.d.ts +0 -7
  112. package/node_modules/@types/cacheable-request/node_modules/undici-types/handlers.d.ts +0 -15
  113. package/node_modules/@types/cacheable-request/node_modules/undici-types/header.d.ts +0 -4
  114. package/node_modules/@types/cacheable-request/node_modules/undici-types/index.d.ts +0 -71
  115. package/node_modules/@types/cacheable-request/node_modules/undici-types/interceptors.d.ts +0 -17
  116. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-agent.d.ts +0 -50
  117. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-client.d.ts +0 -25
  118. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-errors.d.ts +0 -12
  119. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  120. package/node_modules/@types/cacheable-request/node_modules/undici-types/mock-pool.d.ts +0 -25
  121. package/node_modules/@types/cacheable-request/node_modules/undici-types/package.json +0 -55
  122. package/node_modules/@types/cacheable-request/node_modules/undici-types/patch.d.ts +0 -33
  123. package/node_modules/@types/cacheable-request/node_modules/undici-types/pool-stats.d.ts +0 -19
  124. package/node_modules/@types/cacheable-request/node_modules/undici-types/pool.d.ts +0 -39
  125. package/node_modules/@types/cacheable-request/node_modules/undici-types/proxy-agent.d.ts +0 -28
  126. package/node_modules/@types/cacheable-request/node_modules/undici-types/readable.d.ts +0 -60
  127. package/node_modules/@types/cacheable-request/node_modules/undici-types/retry-agent.d.ts +0 -8
  128. package/node_modules/@types/cacheable-request/node_modules/undici-types/retry-handler.d.ts +0 -116
  129. package/node_modules/@types/cacheable-request/node_modules/undici-types/util.d.ts +0 -18
  130. package/node_modules/@types/cacheable-request/node_modules/undici-types/webidl.d.ts +0 -222
  131. package/node_modules/@types/cacheable-request/node_modules/undici-types/websocket.d.ts +0 -150
  132. package/node_modules/@types/cacheable-request/package.json +0 -35
  133. package/node_modules/@types/http-cache-semantics/LICENSE +0 -21
  134. package/node_modules/@types/http-cache-semantics/README.md +0 -15
  135. package/node_modules/@types/http-cache-semantics/index.d.ts +0 -165
  136. package/node_modules/@types/http-cache-semantics/package.json +0 -25
  137. package/node_modules/@types/keyv/LICENSE +0 -21
  138. package/node_modules/@types/keyv/README.md +0 -16
  139. package/node_modules/@types/keyv/index.d.ts +0 -90
  140. package/node_modules/@types/keyv/node_modules/@types/node/LICENSE +0 -21
  141. package/node_modules/@types/keyv/node_modules/@types/node/README.md +0 -15
  142. package/node_modules/@types/keyv/node_modules/@types/node/assert/strict.d.ts +0 -8
  143. package/node_modules/@types/keyv/node_modules/@types/node/assert.d.ts +0 -1095
  144. package/node_modules/@types/keyv/node_modules/@types/node/async_hooks.d.ts +0 -541
  145. package/node_modules/@types/keyv/node_modules/@types/node/buffer.buffer.d.ts +0 -460
  146. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +0 -1926
  147. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +0 -1549
  148. package/node_modules/@types/keyv/node_modules/@types/node/cluster.d.ts +0 -579
  149. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  150. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/index.d.ts +0 -9
  151. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  152. package/node_modules/@types/keyv/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  153. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +0 -452
  154. package/node_modules/@types/keyv/node_modules/@types/node/constants.d.ts +0 -21
  155. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +0 -4510
  156. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +0 -599
  157. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  158. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +0 -476
  159. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +0 -865
  160. package/node_modules/@types/keyv/node_modules/@types/node/dom-events.d.ts +0 -124
  161. package/node_modules/@types/keyv/node_modules/@types/node/domain.d.ts +0 -170
  162. package/node_modules/@types/keyv/node_modules/@types/node/events.d.ts +0 -931
  163. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +0 -1275
  164. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +0 -4343
  165. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +0 -511
  166. package/node_modules/@types/keyv/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  167. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +0 -1959
  168. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +0 -2558
  169. package/node_modules/@types/keyv/node_modules/@types/node/https.d.ts +0 -543
  170. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +0 -92
  171. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +0 -3966
  172. package/node_modules/@types/keyv/node_modules/@types/node/module.d.ts +0 -702
  173. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +0 -1029
  174. package/node_modules/@types/keyv/node_modules/@types/node/os.d.ts +0 -495
  175. package/node_modules/@types/keyv/node_modules/@types/node/package.json +0 -220
  176. package/node_modules/@types/keyv/node_modules/@types/node/path.d.ts +0 -200
  177. package/node_modules/@types/keyv/node_modules/@types/node/perf_hooks.d.ts +0 -970
  178. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +0 -2013
  179. package/node_modules/@types/keyv/node_modules/@types/node/punycode.d.ts +0 -117
  180. package/node_modules/@types/keyv/node_modules/@types/node/querystring.d.ts +0 -153
  181. package/node_modules/@types/keyv/node_modules/@types/node/readline/promises.d.ts +0 -162
  182. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +0 -589
  183. package/node_modules/@types/keyv/node_modules/@types/node/repl.d.ts +0 -430
  184. package/node_modules/@types/keyv/node_modules/@types/node/sea.d.ts +0 -153
  185. package/node_modules/@types/keyv/node_modules/@types/node/sqlite.d.ts +0 -439
  186. package/node_modules/@types/keyv/node_modules/@types/node/stream/consumers.d.ts +0 -12
  187. package/node_modules/@types/keyv/node_modules/@types/node/stream/promises.d.ts +0 -90
  188. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +0 -614
  189. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +0 -1662
  190. package/node_modules/@types/keyv/node_modules/@types/node/string_decoder.d.ts +0 -67
  191. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +0 -2150
  192. package/node_modules/@types/keyv/node_modules/@types/node/timers/promises.d.ts +0 -97
  193. package/node_modules/@types/keyv/node_modules/@types/node/timers.d.ts +0 -240
  194. package/node_modules/@types/keyv/node_modules/@types/node/tls.d.ts +0 -1226
  195. package/node_modules/@types/keyv/node_modules/@types/node/trace_events.d.ts +0 -197
  196. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
  197. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  198. package/node_modules/@types/keyv/node_modules/@types/node/ts5.6/index.d.ts +0 -92
  199. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +0 -208
  200. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +0 -972
  201. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +0 -2439
  202. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +0 -808
  203. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +0 -976
  204. package/node_modules/@types/keyv/node_modules/@types/node/wasi.d.ts +0 -181
  205. package/node_modules/@types/keyv/node_modules/@types/node/worker_threads.d.ts +0 -745
  206. package/node_modules/@types/keyv/node_modules/@types/node/zlib.d.ts +0 -539
  207. package/node_modules/@types/keyv/node_modules/undici-types/LICENSE +0 -21
  208. package/node_modules/@types/keyv/node_modules/undici-types/README.md +0 -6
  209. package/node_modules/@types/keyv/node_modules/undici-types/agent.d.ts +0 -31
  210. package/node_modules/@types/keyv/node_modules/undici-types/api.d.ts +0 -43
  211. package/node_modules/@types/keyv/node_modules/undici-types/balanced-pool.d.ts +0 -29
  212. package/node_modules/@types/keyv/node_modules/undici-types/cache.d.ts +0 -36
  213. package/node_modules/@types/keyv/node_modules/undici-types/client.d.ts +0 -108
  214. package/node_modules/@types/keyv/node_modules/undici-types/connector.d.ts +0 -34
  215. package/node_modules/@types/keyv/node_modules/undici-types/content-type.d.ts +0 -21
  216. package/node_modules/@types/keyv/node_modules/undici-types/cookies.d.ts +0 -28
  217. package/node_modules/@types/keyv/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  218. package/node_modules/@types/keyv/node_modules/undici-types/dispatcher.d.ts +0 -255
  219. package/node_modules/@types/keyv/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  220. package/node_modules/@types/keyv/node_modules/undici-types/errors.d.ts +0 -149
  221. package/node_modules/@types/keyv/node_modules/undici-types/eventsource.d.ts +0 -61
  222. package/node_modules/@types/keyv/node_modules/undici-types/fetch.d.ts +0 -209
  223. package/node_modules/@types/keyv/node_modules/undici-types/file.d.ts +0 -39
  224. package/node_modules/@types/keyv/node_modules/undici-types/filereader.d.ts +0 -54
  225. package/node_modules/@types/keyv/node_modules/undici-types/formdata.d.ts +0 -108
  226. package/node_modules/@types/keyv/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  227. package/node_modules/@types/keyv/node_modules/undici-types/global-origin.d.ts +0 -7
  228. package/node_modules/@types/keyv/node_modules/undici-types/handlers.d.ts +0 -15
  229. package/node_modules/@types/keyv/node_modules/undici-types/header.d.ts +0 -4
  230. package/node_modules/@types/keyv/node_modules/undici-types/index.d.ts +0 -71
  231. package/node_modules/@types/keyv/node_modules/undici-types/interceptors.d.ts +0 -17
  232. package/node_modules/@types/keyv/node_modules/undici-types/mock-agent.d.ts +0 -50
  233. package/node_modules/@types/keyv/node_modules/undici-types/mock-client.d.ts +0 -25
  234. package/node_modules/@types/keyv/node_modules/undici-types/mock-errors.d.ts +0 -12
  235. package/node_modules/@types/keyv/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  236. package/node_modules/@types/keyv/node_modules/undici-types/mock-pool.d.ts +0 -25
  237. package/node_modules/@types/keyv/node_modules/undici-types/package.json +0 -55
  238. package/node_modules/@types/keyv/node_modules/undici-types/patch.d.ts +0 -33
  239. package/node_modules/@types/keyv/node_modules/undici-types/pool-stats.d.ts +0 -19
  240. package/node_modules/@types/keyv/node_modules/undici-types/pool.d.ts +0 -39
  241. package/node_modules/@types/keyv/node_modules/undici-types/proxy-agent.d.ts +0 -28
  242. package/node_modules/@types/keyv/node_modules/undici-types/readable.d.ts +0 -60
  243. package/node_modules/@types/keyv/node_modules/undici-types/retry-agent.d.ts +0 -8
  244. package/node_modules/@types/keyv/node_modules/undici-types/retry-handler.d.ts +0 -116
  245. package/node_modules/@types/keyv/node_modules/undici-types/util.d.ts +0 -18
  246. package/node_modules/@types/keyv/node_modules/undici-types/webidl.d.ts +0 -222
  247. package/node_modules/@types/keyv/node_modules/undici-types/websocket.d.ts +0 -150
  248. package/node_modules/@types/keyv/package.json +0 -32
  249. package/node_modules/@types/responselike/LICENSE +0 -21
  250. package/node_modules/@types/responselike/README.md +0 -48
  251. package/node_modules/@types/responselike/index.d.ts +0 -29
  252. package/node_modules/@types/responselike/node_modules/@types/node/LICENSE +0 -21
  253. package/node_modules/@types/responselike/node_modules/@types/node/README.md +0 -15
  254. package/node_modules/@types/responselike/node_modules/@types/node/assert/strict.d.ts +0 -8
  255. package/node_modules/@types/responselike/node_modules/@types/node/assert.d.ts +0 -1095
  256. package/node_modules/@types/responselike/node_modules/@types/node/async_hooks.d.ts +0 -541
  257. package/node_modules/@types/responselike/node_modules/@types/node/buffer.buffer.d.ts +0 -460
  258. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +0 -1926
  259. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +0 -1549
  260. package/node_modules/@types/responselike/node_modules/@types/node/cluster.d.ts +0 -579
  261. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/disposable.d.ts +0 -16
  262. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/index.d.ts +0 -9
  263. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/indexable.d.ts +0 -23
  264. package/node_modules/@types/responselike/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  265. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +0 -452
  266. package/node_modules/@types/responselike/node_modules/@types/node/constants.d.ts +0 -21
  267. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +0 -4510
  268. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +0 -599
  269. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +0 -554
  270. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +0 -476
  271. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +0 -865
  272. package/node_modules/@types/responselike/node_modules/@types/node/dom-events.d.ts +0 -124
  273. package/node_modules/@types/responselike/node_modules/@types/node/domain.d.ts +0 -170
  274. package/node_modules/@types/responselike/node_modules/@types/node/events.d.ts +0 -931
  275. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +0 -1275
  276. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +0 -4343
  277. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +0 -511
  278. package/node_modules/@types/responselike/node_modules/@types/node/globals.typedarray.d.ts +0 -21
  279. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +0 -1959
  280. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +0 -2558
  281. package/node_modules/@types/responselike/node_modules/@types/node/https.d.ts +0 -543
  282. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +0 -92
  283. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +0 -3966
  284. package/node_modules/@types/responselike/node_modules/@types/node/module.d.ts +0 -702
  285. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +0 -1029
  286. package/node_modules/@types/responselike/node_modules/@types/node/os.d.ts +0 -495
  287. package/node_modules/@types/responselike/node_modules/@types/node/package.json +0 -220
  288. package/node_modules/@types/responselike/node_modules/@types/node/path.d.ts +0 -200
  289. package/node_modules/@types/responselike/node_modules/@types/node/perf_hooks.d.ts +0 -970
  290. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +0 -2013
  291. package/node_modules/@types/responselike/node_modules/@types/node/punycode.d.ts +0 -117
  292. package/node_modules/@types/responselike/node_modules/@types/node/querystring.d.ts +0 -153
  293. package/node_modules/@types/responselike/node_modules/@types/node/readline/promises.d.ts +0 -162
  294. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +0 -589
  295. package/node_modules/@types/responselike/node_modules/@types/node/repl.d.ts +0 -430
  296. package/node_modules/@types/responselike/node_modules/@types/node/sea.d.ts +0 -153
  297. package/node_modules/@types/responselike/node_modules/@types/node/sqlite.d.ts +0 -439
  298. package/node_modules/@types/responselike/node_modules/@types/node/stream/consumers.d.ts +0 -12
  299. package/node_modules/@types/responselike/node_modules/@types/node/stream/promises.d.ts +0 -90
  300. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +0 -614
  301. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +0 -1662
  302. package/node_modules/@types/responselike/node_modules/@types/node/string_decoder.d.ts +0 -67
  303. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +0 -2150
  304. package/node_modules/@types/responselike/node_modules/@types/node/timers/promises.d.ts +0 -97
  305. package/node_modules/@types/responselike/node_modules/@types/node/timers.d.ts +0 -240
  306. package/node_modules/@types/responselike/node_modules/@types/node/tls.d.ts +0 -1226
  307. package/node_modules/@types/responselike/node_modules/@types/node/trace_events.d.ts +0 -197
  308. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -457
  309. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -19
  310. package/node_modules/@types/responselike/node_modules/@types/node/ts5.6/index.d.ts +0 -92
  311. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +0 -208
  312. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +0 -972
  313. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +0 -2439
  314. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +0 -808
  315. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +0 -976
  316. package/node_modules/@types/responselike/node_modules/@types/node/wasi.d.ts +0 -181
  317. package/node_modules/@types/responselike/node_modules/@types/node/worker_threads.d.ts +0 -745
  318. package/node_modules/@types/responselike/node_modules/@types/node/zlib.d.ts +0 -539
  319. package/node_modules/@types/responselike/node_modules/undici-types/LICENSE +0 -21
  320. package/node_modules/@types/responselike/node_modules/undici-types/README.md +0 -6
  321. package/node_modules/@types/responselike/node_modules/undici-types/agent.d.ts +0 -31
  322. package/node_modules/@types/responselike/node_modules/undici-types/api.d.ts +0 -43
  323. package/node_modules/@types/responselike/node_modules/undici-types/balanced-pool.d.ts +0 -29
  324. package/node_modules/@types/responselike/node_modules/undici-types/cache.d.ts +0 -36
  325. package/node_modules/@types/responselike/node_modules/undici-types/client.d.ts +0 -108
  326. package/node_modules/@types/responselike/node_modules/undici-types/connector.d.ts +0 -34
  327. package/node_modules/@types/responselike/node_modules/undici-types/content-type.d.ts +0 -21
  328. package/node_modules/@types/responselike/node_modules/undici-types/cookies.d.ts +0 -28
  329. package/node_modules/@types/responselike/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  330. package/node_modules/@types/responselike/node_modules/undici-types/dispatcher.d.ts +0 -255
  331. package/node_modules/@types/responselike/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  332. package/node_modules/@types/responselike/node_modules/undici-types/errors.d.ts +0 -149
  333. package/node_modules/@types/responselike/node_modules/undici-types/eventsource.d.ts +0 -61
  334. package/node_modules/@types/responselike/node_modules/undici-types/fetch.d.ts +0 -209
  335. package/node_modules/@types/responselike/node_modules/undici-types/file.d.ts +0 -39
  336. package/node_modules/@types/responselike/node_modules/undici-types/filereader.d.ts +0 -54
  337. package/node_modules/@types/responselike/node_modules/undici-types/formdata.d.ts +0 -108
  338. package/node_modules/@types/responselike/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  339. package/node_modules/@types/responselike/node_modules/undici-types/global-origin.d.ts +0 -7
  340. package/node_modules/@types/responselike/node_modules/undici-types/handlers.d.ts +0 -15
  341. package/node_modules/@types/responselike/node_modules/undici-types/header.d.ts +0 -4
  342. package/node_modules/@types/responselike/node_modules/undici-types/index.d.ts +0 -71
  343. package/node_modules/@types/responselike/node_modules/undici-types/interceptors.d.ts +0 -17
  344. package/node_modules/@types/responselike/node_modules/undici-types/mock-agent.d.ts +0 -50
  345. package/node_modules/@types/responselike/node_modules/undici-types/mock-client.d.ts +0 -25
  346. package/node_modules/@types/responselike/node_modules/undici-types/mock-errors.d.ts +0 -12
  347. package/node_modules/@types/responselike/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  348. package/node_modules/@types/responselike/node_modules/undici-types/mock-pool.d.ts +0 -25
  349. package/node_modules/@types/responselike/node_modules/undici-types/package.json +0 -55
  350. package/node_modules/@types/responselike/node_modules/undici-types/patch.d.ts +0 -33
  351. package/node_modules/@types/responselike/node_modules/undici-types/pool-stats.d.ts +0 -19
  352. package/node_modules/@types/responselike/node_modules/undici-types/pool.d.ts +0 -39
  353. package/node_modules/@types/responselike/node_modules/undici-types/proxy-agent.d.ts +0 -28
  354. package/node_modules/@types/responselike/node_modules/undici-types/readable.d.ts +0 -60
  355. package/node_modules/@types/responselike/node_modules/undici-types/retry-agent.d.ts +0 -8
  356. package/node_modules/@types/responselike/node_modules/undici-types/retry-handler.d.ts +0 -116
  357. package/node_modules/@types/responselike/node_modules/undici-types/util.d.ts +0 -18
  358. package/node_modules/@types/responselike/node_modules/undici-types/webidl.d.ts +0 -222
  359. package/node_modules/@types/responselike/node_modules/undici-types/websocket.d.ts +0 -150
  360. package/node_modules/@types/responselike/package.json +0 -27
  361. package/node_modules/cacheable-lookup/LICENSE +0 -21
  362. package/node_modules/cacheable-lookup/README.md +0 -240
  363. package/node_modules/cacheable-lookup/index.d.ts +0 -139
  364. package/node_modules/cacheable-lookup/package.json +0 -45
  365. package/node_modules/cacheable-lookup/source/index.js +0 -436
  366. package/node_modules/cacheable-request/LICENSE +0 -21
  367. package/node_modules/cacheable-request/README.md +0 -206
  368. package/node_modules/cacheable-request/package.json +0 -56
  369. package/node_modules/cacheable-request/src/index.js +0 -251
  370. package/node_modules/clone-response/LICENSE +0 -21
  371. package/node_modules/clone-response/README.md +0 -62
  372. package/node_modules/clone-response/node_modules/mimic-response/index.js +0 -32
  373. package/node_modules/clone-response/node_modules/mimic-response/license +0 -9
  374. package/node_modules/clone-response/node_modules/mimic-response/package.json +0 -37
  375. package/node_modules/clone-response/node_modules/mimic-response/readme.md +0 -54
  376. package/node_modules/clone-response/package.json +0 -41
  377. package/node_modules/clone-response/src/index.js +0 -17
  378. package/node_modules/decompress-response/index.d.ts +0 -22
  379. package/node_modules/decompress-response/index.js +0 -58
  380. package/node_modules/decompress-response/license +0 -9
  381. package/node_modules/decompress-response/package.json +0 -56
  382. package/node_modules/decompress-response/readme.md +0 -48
  383. package/node_modules/defer-to-connect/LICENSE +0 -21
  384. package/node_modules/defer-to-connect/README.md +0 -38
  385. package/node_modules/defer-to-connect/dist/source/index.d.ts +0 -10
  386. package/node_modules/defer-to-connect/dist/source/index.js +0 -47
  387. package/node_modules/defer-to-connect/package.json +0 -71
  388. package/node_modules/end-of-stream/LICENSE +0 -21
  389. package/node_modules/end-of-stream/README.md +0 -54
  390. package/node_modules/end-of-stream/index.js +0 -94
  391. package/node_modules/end-of-stream/package.json +0 -37
  392. package/node_modules/get-stream/buffer-stream.js +0 -52
  393. package/node_modules/get-stream/index.d.ts +0 -108
  394. package/node_modules/get-stream/index.js +0 -60
  395. package/node_modules/get-stream/license +0 -9
  396. package/node_modules/get-stream/package.json +0 -50
  397. package/node_modules/get-stream/readme.md +0 -124
  398. package/node_modules/got/dist/source/as-promise/create-rejection.d.ts +0 -2
  399. package/node_modules/got/dist/source/as-promise/create-rejection.js +0 -30
  400. package/node_modules/got/dist/source/as-promise/index.d.ts +0 -3
  401. package/node_modules/got/dist/source/as-promise/index.js +0 -176
  402. package/node_modules/got/dist/source/as-promise/normalize-arguments.d.ts +0 -3
  403. package/node_modules/got/dist/source/as-promise/normalize-arguments.js +0 -78
  404. package/node_modules/got/dist/source/as-promise/parse-body.d.ts +0 -3
  405. package/node_modules/got/dist/source/as-promise/parse-body.js +0 -25
  406. package/node_modules/got/dist/source/as-promise/types.d.ts +0 -256
  407. package/node_modules/got/dist/source/as-promise/types.js +0 -42
  408. package/node_modules/got/dist/source/core/calculate-retry-delay.d.ts +0 -5
  409. package/node_modules/got/dist/source/core/calculate-retry-delay.js +0 -29
  410. package/node_modules/got/dist/source/core/index.d.ts +0 -1124
  411. package/node_modules/got/dist/source/core/index.js +0 -1505
  412. package/node_modules/got/dist/source/core/utils/dns-ip-version.d.ts +0 -5
  413. package/node_modules/got/dist/source/core/utils/dns-ip-version.js +0 -17
  414. package/node_modules/got/dist/source/core/utils/get-body-size.d.ts +0 -3
  415. package/node_modules/got/dist/source/core/utils/get-body-size.js +0 -32
  416. package/node_modules/got/dist/source/core/utils/get-buffer.d.ts +0 -4
  417. package/node_modules/got/dist/source/core/utils/get-buffer.js +0 -16
  418. package/node_modules/got/dist/source/core/utils/is-form-data.d.ts +0 -8
  419. package/node_modules/got/dist/source/core/utils/is-form-data.js +0 -4
  420. package/node_modules/got/dist/source/core/utils/is-response-ok.d.ts +0 -2
  421. package/node_modules/got/dist/source/core/utils/is-response-ok.js +0 -8
  422. package/node_modules/got/dist/source/core/utils/options-to-url.d.ts +0 -14
  423. package/node_modules/got/dist/source/core/utils/options-to-url.js +0 -53
  424. package/node_modules/got/dist/source/core/utils/proxy-events.d.ts +0 -3
  425. package/node_modules/got/dist/source/core/utils/proxy-events.js +0 -17
  426. package/node_modules/got/dist/source/core/utils/timed-out.d.ts +0 -29
  427. package/node_modules/got/dist/source/core/utils/timed-out.js +0 -121
  428. package/node_modules/got/dist/source/core/utils/unhandle.d.ts +0 -11
  429. package/node_modules/got/dist/source/core/utils/unhandle.js +0 -22
  430. package/node_modules/got/dist/source/core/utils/url-to-options.d.ts +0 -15
  431. package/node_modules/got/dist/source/core/utils/url-to-options.js +0 -24
  432. package/node_modules/got/dist/source/core/utils/weakable-map.d.ts +0 -8
  433. package/node_modules/got/dist/source/core/utils/weakable-map.js +0 -29
  434. package/node_modules/got/dist/source/create.d.ts +0 -5
  435. package/node_modules/got/dist/source/create.js +0 -240
  436. package/node_modules/got/dist/source/index.d.ts +0 -4
  437. package/node_modules/got/dist/source/index.js +0 -132
  438. package/node_modules/got/dist/source/types.d.ts +0 -344
  439. package/node_modules/got/dist/source/types.js +0 -2
  440. package/node_modules/got/dist/source/utils/deep-freeze.d.ts +0 -1
  441. package/node_modules/got/dist/source/utils/deep-freeze.js +0 -12
  442. package/node_modules/got/dist/source/utils/deprecation-warning.d.ts +0 -2
  443. package/node_modules/got/dist/source/utils/deprecation-warning.js +0 -13
  444. package/node_modules/got/license +0 -9
  445. package/node_modules/got/package.json +0 -131
  446. package/node_modules/got/readme.md +0 -2477
  447. package/node_modules/hpagent/.github/dependabot.yml +0 -8
  448. package/node_modules/hpagent/.github/workflows/build.yml +0 -29
  449. package/node_modules/hpagent/LICENSE +0 -21
  450. package/node_modules/hpagent/README.md +0 -138
  451. package/node_modules/hpagent/index.d.ts +0 -26
  452. package/node_modules/hpagent/index.js +0 -101
  453. package/node_modules/hpagent/index.mjs +0 -5
  454. package/node_modules/hpagent/package.json +0 -49
  455. package/node_modules/hpagent/test/got.test.js +0 -111
  456. package/node_modules/hpagent/test/http-http.test.js +0 -351
  457. package/node_modules/hpagent/test/http-https.test.js +0 -313
  458. package/node_modules/hpagent/test/https-http.test.js +0 -313
  459. package/node_modules/hpagent/test/https-https.test.js +0 -313
  460. package/node_modules/hpagent/test/index.test-d.ts +0 -45
  461. package/node_modules/hpagent/test/needle.test.js +0 -103
  462. package/node_modules/hpagent/test/node-fetch.test.js +0 -103
  463. package/node_modules/hpagent/test/simple-get.test.js +0 -139
  464. package/node_modules/hpagent/test/ssl.cert +0 -19
  465. package/node_modules/hpagent/test/ssl.key +0 -27
  466. package/node_modules/hpagent/test/utils.js +0 -59
  467. package/node_modules/http-cache-semantics/LICENSE +0 -9
  468. package/node_modules/http-cache-semantics/README.md +0 -203
  469. package/node_modules/http-cache-semantics/index.js +0 -674
  470. package/node_modules/http-cache-semantics/package.json +0 -18
  471. package/node_modules/http2-wrapper/LICENSE +0 -21
  472. package/node_modules/http2-wrapper/README.md +0 -470
  473. package/node_modules/http2-wrapper/package.json +0 -54
  474. package/node_modules/http2-wrapper/source/agent.js +0 -670
  475. package/node_modules/http2-wrapper/source/auto.js +0 -149
  476. package/node_modules/http2-wrapper/source/client-request.js +0 -445
  477. package/node_modules/http2-wrapper/source/incoming-message.js +0 -58
  478. package/node_modules/http2-wrapper/source/index.js +0 -28
  479. package/node_modules/http2-wrapper/source/utils/calculate-server-name.js +0 -27
  480. package/node_modules/http2-wrapper/source/utils/errors.js +0 -45
  481. package/node_modules/http2-wrapper/source/utils/is-request-pseudo-header.js +0 -13
  482. package/node_modules/http2-wrapper/source/utils/proxy-events.js +0 -7
  483. package/node_modules/http2-wrapper/source/utils/url-to-options.js +0 -25
  484. package/node_modules/json-buffer/.travis.yml +0 -3
  485. package/node_modules/json-buffer/LICENSE +0 -22
  486. package/node_modules/json-buffer/README.md +0 -24
  487. package/node_modules/json-buffer/index.js +0 -58
  488. package/node_modules/json-buffer/package.json +0 -34
  489. package/node_modules/json-buffer/test/index.js +0 -63
  490. package/node_modules/keyv/README.md +0 -429
  491. package/node_modules/keyv/package.json +0 -57
  492. package/node_modules/keyv/src/index.d.ts +0 -112
  493. package/node_modules/keyv/src/index.js +0 -259
  494. package/node_modules/lowercase-keys/index.d.ts +0 -16
  495. package/node_modules/lowercase-keys/index.js +0 -10
  496. package/node_modules/lowercase-keys/license +0 -9
  497. package/node_modules/lowercase-keys/package.json +0 -38
  498. package/node_modules/lowercase-keys/readme.md +0 -32
  499. package/node_modules/mimic-response/index.d.ts +0 -17
  500. package/node_modules/mimic-response/index.js +0 -77
  501. package/node_modules/mimic-response/license +0 -9
  502. package/node_modules/mimic-response/package.json +0 -42
  503. package/node_modules/mimic-response/readme.md +0 -78
  504. package/node_modules/normalize-url/index.d.ts +0 -267
  505. package/node_modules/normalize-url/index.js +0 -216
  506. package/node_modules/normalize-url/license +0 -9
  507. package/node_modules/normalize-url/package.json +0 -50
  508. package/node_modules/normalize-url/readme.md +0 -286
  509. package/node_modules/once/LICENSE +0 -15
  510. package/node_modules/once/README.md +0 -79
  511. package/node_modules/once/once.js +0 -42
  512. package/node_modules/once/package.json +0 -33
  513. package/node_modules/p-cancelable/index.d.ts +0 -176
  514. package/node_modules/p-cancelable/index.js +0 -111
  515. package/node_modules/p-cancelable/license +0 -9
  516. package/node_modules/p-cancelable/package.json +0 -49
  517. package/node_modules/p-cancelable/readme.md +0 -153
  518. package/node_modules/pump/.github/FUNDING.yml +0 -2
  519. package/node_modules/pump/.travis.yml +0 -5
  520. package/node_modules/pump/LICENSE +0 -21
  521. package/node_modules/pump/README.md +0 -74
  522. package/node_modules/pump/SECURITY.md +0 -5
  523. package/node_modules/pump/index.js +0 -86
  524. package/node_modules/pump/package.json +0 -24
  525. package/node_modules/pump/test-browser.js +0 -66
  526. package/node_modules/pump/test-node.js +0 -53
  527. package/node_modules/quick-lru/index.d.ts +0 -97
  528. package/node_modules/quick-lru/index.js +0 -123
  529. package/node_modules/quick-lru/license +0 -9
  530. package/node_modules/quick-lru/package.json +0 -43
  531. package/node_modules/quick-lru/readme.md +0 -111
  532. package/node_modules/resolve-alpn/LICENSE +0 -22
  533. package/node_modules/resolve-alpn/README.md +0 -60
  534. package/node_modules/resolve-alpn/index.js +0 -43
  535. package/node_modules/resolve-alpn/package.json +0 -34
  536. package/node_modules/responselike/LICENSE +0 -19
  537. package/node_modules/responselike/README.md +0 -77
  538. package/node_modules/responselike/package.json +0 -39
  539. package/node_modules/responselike/src/index.js +0 -34
  540. package/node_modules/wrappy/LICENSE +0 -15
  541. package/node_modules/wrappy/README.md +0 -36
  542. package/node_modules/wrappy/package.json +0 -29
  543. package/node_modules/wrappy/wrappy.js +0 -33
  544. /package/{lambda → lambda-src}/.dockerignore +0 -0
  545. /package/{lambda → lambda-src}/Dockerfile +0 -0
  546. /package/{lambda → lambda-src}/go.mod +0 -0
  547. /package/{lambda → lambda-src}/go.sum +0 -0
  548. /package/{lambda → lambda-src}/internal/iolimits/iolimits.go +0 -0
  549. /package/{lambda → lambda-src}/internal/iolimits/iolimits_test.go +0 -0
  550. /package/{lambda → lambda-src}/internal/tarfile/reader.go +0 -0
  551. /package/{lambda → lambda-src}/internal/tarfile/reader_test.go +0 -0
  552. /package/{lambda → lambda-src}/internal/tarfile/s3file.go +0 -0
  553. /package/{lambda → lambda-src}/internal/tarfile/s3file_test.go +0 -0
  554. /package/{lambda → lambda-src}/internal/tarfile/src.go +0 -0
  555. /package/{lambda → lambda-src}/internal/tarfile/types.go +0 -0
  556. /package/{lambda → lambda-src}/main.go +0 -0
  557. /package/{lambda → lambda-src}/main_test.go +0 -0
  558. /package/{lambda → lambda-src}/s3/src.go +0 -0
  559. /package/{lambda → lambda-src}/s3/transport.go +0 -0
  560. /package/{lambda → lambda-src}/s3/transport_test.go +0 -0
  561. /package/{lambda → lambda-src}/utils.go +0 -0
  562. /package/{lambda → lambda-src}/utils_test.go +0 -0
@@ -1,1662 +0,0 @@
1
- /**
2
- * A stream is an abstract interface for working with streaming data in Node.js.
3
- * The `node:stream` module provides an API for implementing the stream interface.
4
- *
5
- * There are many stream objects provided by Node.js. For instance, a [request to an HTTP server](https://nodejs.org/docs/latest-v22.x/api/http.html#class-httpincomingmessage)
6
- * and [`process.stdout`](https://nodejs.org/docs/latest-v22.x/api/process.html#processstdout) are both stream instances.
7
- *
8
- * Streams can be readable, writable, or both. All streams are instances of [`EventEmitter`](https://nodejs.org/docs/latest-v22.x/api/events.html#class-eventemitter).
9
- *
10
- * To access the `node:stream` module:
11
- *
12
- * ```js
13
- * import stream from 'node:stream';
14
- * ```
15
- *
16
- * The `node:stream` module is useful for creating new types of stream instances.
17
- * It is usually not necessary to use the `node:stream` module to consume streams.
18
- * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/stream.js)
19
- */
20
- declare module "stream" {
21
- import { Abortable, EventEmitter } from "node:events";
22
- import { Blob as NodeBlob } from "node:buffer";
23
- import * as streamPromises from "node:stream/promises";
24
- import * as streamWeb from "node:stream/web";
25
-
26
- type ComposeFnParam = (source: any) => void;
27
-
28
- class Stream extends EventEmitter {
29
- pipe<T extends NodeJS.WritableStream>(
30
- destination: T,
31
- options?: {
32
- end?: boolean | undefined;
33
- },
34
- ): T;
35
- compose<T extends NodeJS.ReadableStream>(
36
- stream: T | ComposeFnParam | Iterable<T> | AsyncIterable<T>,
37
- options?: { signal: AbortSignal },
38
- ): T;
39
- }
40
- namespace Stream {
41
- export { Stream, streamPromises as promises };
42
- }
43
- namespace Stream {
44
- interface StreamOptions<T extends Stream> extends Abortable {
45
- emitClose?: boolean | undefined;
46
- highWaterMark?: number | undefined;
47
- objectMode?: boolean | undefined;
48
- construct?(this: T, callback: (error?: Error | null) => void): void;
49
- destroy?(this: T, error: Error | null, callback: (error?: Error | null) => void): void;
50
- autoDestroy?: boolean | undefined;
51
- }
52
- interface ReadableOptions<T extends Readable = Readable> extends StreamOptions<T> {
53
- encoding?: BufferEncoding | undefined;
54
- read?(this: T, size: number): void;
55
- }
56
- interface ArrayOptions {
57
- /**
58
- * The maximum concurrent invocations of `fn` to call on the stream at once.
59
- * @default 1
60
- */
61
- concurrency?: number;
62
- /** Allows destroying the stream if the signal is aborted. */
63
- signal?: AbortSignal;
64
- }
65
- /**
66
- * @since v0.9.4
67
- */
68
- class Readable extends Stream implements NodeJS.ReadableStream {
69
- /**
70
- * A utility method for creating Readable Streams out of iterators.
71
- * @since v12.3.0, v10.17.0
72
- * @param iterable Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. Emits an 'error' event if a null value is passed.
73
- * @param options Options provided to `new stream.Readable([options])`. By default, `Readable.from()` will set `options.objectMode` to `true`, unless this is explicitly opted out by setting `options.objectMode` to `false`.
74
- */
75
- static from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable;
76
- /**
77
- * A utility method for creating a `Readable` from a web `ReadableStream`.
78
- * @since v17.0.0
79
- * @experimental
80
- */
81
- static fromWeb(
82
- readableStream: streamWeb.ReadableStream,
83
- options?: Pick<ReadableOptions, "encoding" | "highWaterMark" | "objectMode" | "signal">,
84
- ): Readable;
85
- /**
86
- * A utility method for creating a web `ReadableStream` from a `Readable`.
87
- * @since v17.0.0
88
- * @experimental
89
- */
90
- static toWeb(
91
- streamReadable: Readable,
92
- options?: {
93
- strategy?: streamWeb.QueuingStrategy | undefined;
94
- },
95
- ): streamWeb.ReadableStream;
96
- /**
97
- * Returns whether the stream has been read from or cancelled.
98
- * @since v16.8.0
99
- */
100
- static isDisturbed(stream: Readable | NodeJS.ReadableStream): boolean;
101
- /**
102
- * Returns whether the stream was destroyed or errored before emitting `'end'`.
103
- * @since v16.8.0
104
- * @experimental
105
- */
106
- readonly readableAborted: boolean;
107
- /**
108
- * Is `true` if it is safe to call {@link read}, which means
109
- * the stream has not been destroyed or emitted `'error'` or `'end'`.
110
- * @since v11.4.0
111
- */
112
- readable: boolean;
113
- /**
114
- * Returns whether `'data'` has been emitted.
115
- * @since v16.7.0, v14.18.0
116
- * @experimental
117
- */
118
- readonly readableDidRead: boolean;
119
- /**
120
- * Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method.
121
- * @since v12.7.0
122
- */
123
- readonly readableEncoding: BufferEncoding | null;
124
- /**
125
- * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v22.x/api/stream.html#event-end) event is emitted.
126
- * @since v12.9.0
127
- */
128
- readonly readableEnded: boolean;
129
- /**
130
- * This property reflects the current state of a `Readable` stream as described
131
- * in the [Three states](https://nodejs.org/docs/latest-v22.x/api/stream.html#three-states) section.
132
- * @since v9.4.0
133
- */
134
- readonly readableFlowing: boolean | null;
135
- /**
136
- * Returns the value of `highWaterMark` passed when creating this `Readable`.
137
- * @since v9.3.0
138
- */
139
- readonly readableHighWaterMark: number;
140
- /**
141
- * This property contains the number of bytes (or objects) in the queue
142
- * ready to be read. The value provides introspection data regarding
143
- * the status of the `highWaterMark`.
144
- * @since v9.4.0
145
- */
146
- readonly readableLength: number;
147
- /**
148
- * Getter for the property `objectMode` of a given `Readable` stream.
149
- * @since v12.3.0
150
- */
151
- readonly readableObjectMode: boolean;
152
- /**
153
- * Is `true` after `readable.destroy()` has been called.
154
- * @since v8.0.0
155
- */
156
- destroyed: boolean;
157
- /**
158
- * Is `true` after `'close'` has been emitted.
159
- * @since v18.0.0
160
- */
161
- readonly closed: boolean;
162
- /**
163
- * Returns error if the stream has been destroyed with an error.
164
- * @since v18.0.0
165
- */
166
- readonly errored: Error | null;
167
- constructor(opts?: ReadableOptions);
168
- _construct?(callback: (error?: Error | null) => void): void;
169
- _read(size: number): void;
170
- /**
171
- * The `readable.read()` method reads data out of the internal buffer and
172
- * returns it. If no data is available to be read, `null` is returned. By default,
173
- * the data is returned as a `Buffer` object unless an encoding has been
174
- * specified using the `readable.setEncoding()` method or the stream is operating
175
- * in object mode.
176
- *
177
- * The optional `size` argument specifies a specific number of bytes to read. If
178
- * `size` bytes are not available to be read, `null` will be returned _unless_ the
179
- * stream has ended, in which case all of the data remaining in the internal buffer
180
- * will be returned.
181
- *
182
- * If the `size` argument is not specified, all of the data contained in the
183
- * internal buffer will be returned.
184
- *
185
- * The `size` argument must be less than or equal to 1 GiB.
186
- *
187
- * The `readable.read()` method should only be called on `Readable` streams
188
- * operating in paused mode. In flowing mode, `readable.read()` is called
189
- * automatically until the internal buffer is fully drained.
190
- *
191
- * ```js
192
- * const readable = getReadableStreamSomehow();
193
- *
194
- * // 'readable' may be triggered multiple times as data is buffered in
195
- * readable.on('readable', () => {
196
- * let chunk;
197
- * console.log('Stream is readable (new data received in buffer)');
198
- * // Use a loop to make sure we read all currently available data
199
- * while (null !== (chunk = readable.read())) {
200
- * console.log(`Read ${chunk.length} bytes of data...`);
201
- * }
202
- * });
203
- *
204
- * // 'end' will be triggered once when there is no more data available
205
- * readable.on('end', () => {
206
- * console.log('Reached end of stream.');
207
- * });
208
- * ```
209
- *
210
- * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks
211
- * are not concatenated. A `while` loop is necessary to consume all data
212
- * currently in the buffer. When reading a large file `.read()` may return `null`,
213
- * having consumed all buffered content so far, but there is still more data to
214
- * come not yet buffered. In this case a new `'readable'` event will be emitted
215
- * when there is more data in the buffer. Finally the `'end'` event will be
216
- * emitted when there is no more data to come.
217
- *
218
- * Therefore to read a file's whole contents from a `readable`, it is necessary
219
- * to collect chunks across multiple `'readable'` events:
220
- *
221
- * ```js
222
- * const chunks = [];
223
- *
224
- * readable.on('readable', () => {
225
- * let chunk;
226
- * while (null !== (chunk = readable.read())) {
227
- * chunks.push(chunk);
228
- * }
229
- * });
230
- *
231
- * readable.on('end', () => {
232
- * const content = chunks.join('');
233
- * });
234
- * ```
235
- *
236
- * A `Readable` stream in object mode will always return a single item from
237
- * a call to `readable.read(size)`, regardless of the value of the `size` argument.
238
- *
239
- * If the `readable.read()` method returns a chunk of data, a `'data'` event will
240
- * also be emitted.
241
- *
242
- * Calling {@link read} after the `'end'` event has
243
- * been emitted will return `null`. No runtime error will be raised.
244
- * @since v0.9.4
245
- * @param size Optional argument to specify how much data to read.
246
- */
247
- read(size?: number): any;
248
- /**
249
- * The `readable.setEncoding()` method sets the character encoding for
250
- * data read from the `Readable` stream.
251
- *
252
- * By default, no encoding is assigned and stream data will be returned as `Buffer` objects. Setting an encoding causes the stream data
253
- * to be returned as strings of the specified encoding rather than as `Buffer` objects. For instance, calling `readable.setEncoding('utf8')` will cause the
254
- * output data to be interpreted as UTF-8 data, and passed as strings. Calling `readable.setEncoding('hex')` will cause the data to be encoded in hexadecimal
255
- * string format.
256
- *
257
- * The `Readable` stream will properly handle multi-byte characters delivered
258
- * through the stream that would otherwise become improperly decoded if simply
259
- * pulled from the stream as `Buffer` objects.
260
- *
261
- * ```js
262
- * const readable = getReadableStreamSomehow();
263
- * readable.setEncoding('utf8');
264
- * readable.on('data', (chunk) => {
265
- * assert.equal(typeof chunk, 'string');
266
- * console.log('Got %d characters of string data:', chunk.length);
267
- * });
268
- * ```
269
- * @since v0.9.4
270
- * @param encoding The encoding to use.
271
- */
272
- setEncoding(encoding: BufferEncoding): this;
273
- /**
274
- * The `readable.pause()` method will cause a stream in flowing mode to stop
275
- * emitting `'data'` events, switching out of flowing mode. Any data that
276
- * becomes available will remain in the internal buffer.
277
- *
278
- * ```js
279
- * const readable = getReadableStreamSomehow();
280
- * readable.on('data', (chunk) => {
281
- * console.log(`Received ${chunk.length} bytes of data.`);
282
- * readable.pause();
283
- * console.log('There will be no additional data for 1 second.');
284
- * setTimeout(() => {
285
- * console.log('Now data will start flowing again.');
286
- * readable.resume();
287
- * }, 1000);
288
- * });
289
- * ```
290
- *
291
- * The `readable.pause()` method has no effect if there is a `'readable'` event listener.
292
- * @since v0.9.4
293
- */
294
- pause(): this;
295
- /**
296
- * The `readable.resume()` method causes an explicitly paused `Readable` stream to
297
- * resume emitting `'data'` events, switching the stream into flowing mode.
298
- *
299
- * The `readable.resume()` method can be used to fully consume the data from a
300
- * stream without actually processing any of that data:
301
- *
302
- * ```js
303
- * getReadableStreamSomehow()
304
- * .resume()
305
- * .on('end', () => {
306
- * console.log('Reached the end, but did not read anything.');
307
- * });
308
- * ```
309
- *
310
- * The `readable.resume()` method has no effect if there is a `'readable'` event listener.
311
- * @since v0.9.4
312
- */
313
- resume(): this;
314
- /**
315
- * The `readable.isPaused()` method returns the current operating state of the `Readable`.
316
- * This is used primarily by the mechanism that underlies the `readable.pipe()` method.
317
- * In most typical cases, there will be no reason to use this method directly.
318
- *
319
- * ```js
320
- * const readable = new stream.Readable();
321
- *
322
- * readable.isPaused(); // === false
323
- * readable.pause();
324
- * readable.isPaused(); // === true
325
- * readable.resume();
326
- * readable.isPaused(); // === false
327
- * ```
328
- * @since v0.11.14
329
- */
330
- isPaused(): boolean;
331
- /**
332
- * The `readable.unpipe()` method detaches a `Writable` stream previously attached
333
- * using the {@link pipe} method.
334
- *
335
- * If the `destination` is not specified, then _all_ pipes are detached.
336
- *
337
- * If the `destination` is specified, but no pipe is set up for it, then
338
- * the method does nothing.
339
- *
340
- * ```js
341
- * import fs from 'node:fs';
342
- * const readable = getReadableStreamSomehow();
343
- * const writable = fs.createWriteStream('file.txt');
344
- * // All the data from readable goes into 'file.txt',
345
- * // but only for the first second.
346
- * readable.pipe(writable);
347
- * setTimeout(() => {
348
- * console.log('Stop writing to file.txt.');
349
- * readable.unpipe(writable);
350
- * console.log('Manually close the file stream.');
351
- * writable.end();
352
- * }, 1000);
353
- * ```
354
- * @since v0.9.4
355
- * @param destination Optional specific stream to unpipe
356
- */
357
- unpipe(destination?: NodeJS.WritableStream): this;
358
- /**
359
- * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the
360
- * same as `readable.push(null)`, after which no more data can be written. The EOF
361
- * signal is put at the end of the buffer and any buffered data will still be
362
- * flushed.
363
- *
364
- * The `readable.unshift()` method pushes a chunk of data back into the internal
365
- * buffer. This is useful in certain situations where a stream is being consumed by
366
- * code that needs to "un-consume" some amount of data that it has optimistically
367
- * pulled out of the source, so that the data can be passed on to some other party.
368
- *
369
- * The `stream.unshift(chunk)` method cannot be called after the `'end'` event
370
- * has been emitted or a runtime error will be thrown.
371
- *
372
- * Developers using `stream.unshift()` often should consider switching to
373
- * use of a `Transform` stream instead. See the `API for stream implementers` section for more information.
374
- *
375
- * ```js
376
- * // Pull off a header delimited by \n\n.
377
- * // Use unshift() if we get too much.
378
- * // Call the callback with (error, header, stream).
379
- * import { StringDecoder } from 'node:string_decoder';
380
- * function parseHeader(stream, callback) {
381
- * stream.on('error', callback);
382
- * stream.on('readable', onReadable);
383
- * const decoder = new StringDecoder('utf8');
384
- * let header = '';
385
- * function onReadable() {
386
- * let chunk;
387
- * while (null !== (chunk = stream.read())) {
388
- * const str = decoder.write(chunk);
389
- * if (str.includes('\n\n')) {
390
- * // Found the header boundary.
391
- * const split = str.split(/\n\n/);
392
- * header += split.shift();
393
- * const remaining = split.join('\n\n');
394
- * const buf = Buffer.from(remaining, 'utf8');
395
- * stream.removeListener('error', callback);
396
- * // Remove the 'readable' listener before unshifting.
397
- * stream.removeListener('readable', onReadable);
398
- * if (buf.length)
399
- * stream.unshift(buf);
400
- * // Now the body of the message can be read from the stream.
401
- * callback(null, header, stream);
402
- * return;
403
- * }
404
- * // Still reading the header.
405
- * header += str;
406
- * }
407
- * }
408
- * }
409
- * ```
410
- *
411
- * Unlike {@link push}, `stream.unshift(chunk)` will not
412
- * end the reading process by resetting the internal reading state of the stream.
413
- * This can cause unexpected results if `readable.unshift()` is called during a
414
- * read (i.e. from within a {@link _read} implementation on a
415
- * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately,
416
- * however it is best to simply avoid calling `readable.unshift()` while in the
417
- * process of performing a read.
418
- * @since v0.9.11
419
- * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must
420
- * be a {string}, {Buffer}, {TypedArray}, {DataView} or `null`. For object mode streams, `chunk` may be any JavaScript value.
421
- * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`.
422
- */
423
- unshift(chunk: any, encoding?: BufferEncoding): void;
424
- /**
425
- * Prior to Node.js 0.10, streams did not implement the entire `node:stream` module API as it is currently defined. (See `Compatibility` for more
426
- * information.)
427
- *
428
- * When using an older Node.js library that emits `'data'` events and has a {@link pause} method that is advisory only, the `readable.wrap()` method can be used to create a `Readable`
429
- * stream that uses
430
- * the old stream as its data source.
431
- *
432
- * It will rarely be necessary to use `readable.wrap()` but the method has been
433
- * provided as a convenience for interacting with older Node.js applications and
434
- * libraries.
435
- *
436
- * ```js
437
- * import { OldReader } from './old-api-module.js';
438
- * import { Readable } from 'node:stream';
439
- * const oreader = new OldReader();
440
- * const myReader = new Readable().wrap(oreader);
441
- *
442
- * myReader.on('readable', () => {
443
- * myReader.read(); // etc.
444
- * });
445
- * ```
446
- * @since v0.9.4
447
- * @param stream An "old style" readable stream
448
- */
449
- wrap(stream: NodeJS.ReadableStream): this;
450
- push(chunk: any, encoding?: BufferEncoding): boolean;
451
- /**
452
- * The iterator created by this method gives users the option to cancel the destruction
453
- * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`,
454
- * or if the iterator should destroy the stream if the stream emitted an error during iteration.
455
- * @since v16.3.0
456
- * @param options.destroyOnReturn When set to `false`, calling `return` on the async iterator,
457
- * or exiting a `for await...of` iteration using a `break`, `return`, or `throw` will not destroy the stream.
458
- * **Default: `true`**.
459
- */
460
- iterator(options?: { destroyOnReturn?: boolean }): NodeJS.AsyncIterator<any>;
461
- /**
462
- * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream.
463
- * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream.
464
- * @since v17.4.0, v16.14.0
465
- * @param fn a function to map over every chunk in the stream. Async or not.
466
- * @returns a stream mapped with the function *fn*.
467
- */
468
- map(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => any, options?: ArrayOptions): Readable;
469
- /**
470
- * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called
471
- * and if it returns a truthy value, the chunk will be passed to the result stream.
472
- * If the *fn* function returns a promise - that promise will be `await`ed.
473
- * @since v17.4.0, v16.14.0
474
- * @param fn a function to filter chunks from the stream. Async or not.
475
- * @returns a stream filtered with the predicate *fn*.
476
- */
477
- filter(
478
- fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
479
- options?: ArrayOptions,
480
- ): Readable;
481
- /**
482
- * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called.
483
- * If the *fn* function returns a promise - that promise will be `await`ed.
484
- *
485
- * This method is different from `for await...of` loops in that it can optionally process chunks concurrently.
486
- * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option
487
- * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`.
488
- * In either case the stream will be destroyed.
489
- *
490
- * This method is different from listening to the `'data'` event in that it uses the `readable` event
491
- * in the underlying machinary and can limit the number of concurrent *fn* calls.
492
- * @since v17.5.0
493
- * @param fn a function to call on each chunk of the stream. Async or not.
494
- * @returns a promise for when the stream has finished.
495
- */
496
- forEach(
497
- fn: (data: any, options?: Pick<ArrayOptions, "signal">) => void | Promise<void>,
498
- options?: ArrayOptions,
499
- ): Promise<void>;
500
- /**
501
- * This method allows easily obtaining the contents of a stream.
502
- *
503
- * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended
504
- * for interoperability and convenience, not as the primary way to consume streams.
505
- * @since v17.5.0
506
- * @returns a promise containing an array with the contents of the stream.
507
- */
508
- toArray(options?: Pick<ArrayOptions, "signal">): Promise<any[]>;
509
- /**
510
- * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream
511
- * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk
512
- * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`.
513
- * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`.
514
- * @since v17.5.0
515
- * @param fn a function to call on each chunk of the stream. Async or not.
516
- * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks.
517
- */
518
- some(
519
- fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
520
- options?: ArrayOptions,
521
- ): Promise<boolean>;
522
- /**
523
- * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream
524
- * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy,
525
- * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value.
526
- * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`.
527
- * @since v17.5.0
528
- * @param fn a function to call on each chunk of the stream. Async or not.
529
- * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value,
530
- * or `undefined` if no element was found.
531
- */
532
- find<T>(
533
- fn: (data: any, options?: Pick<ArrayOptions, "signal">) => data is T,
534
- options?: ArrayOptions,
535
- ): Promise<T | undefined>;
536
- find(
537
- fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
538
- options?: ArrayOptions,
539
- ): Promise<any>;
540
- /**
541
- * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream
542
- * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk
543
- * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`.
544
- * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`.
545
- * @since v17.5.0
546
- * @param fn a function to call on each chunk of the stream. Async or not.
547
- * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks.
548
- */
549
- every(
550
- fn: (data: any, options?: Pick<ArrayOptions, "signal">) => boolean | Promise<boolean>,
551
- options?: ArrayOptions,
552
- ): Promise<boolean>;
553
- /**
554
- * This method returns a new stream by applying the given callback to each chunk of the stream
555
- * and then flattening the result.
556
- *
557
- * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams
558
- * will be merged (flattened) into the returned stream.
559
- * @since v17.5.0
560
- * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator.
561
- * @returns a stream flat-mapped with the function *fn*.
562
- */
563
- flatMap(fn: (data: any, options?: Pick<ArrayOptions, "signal">) => any, options?: ArrayOptions): Readable;
564
- /**
565
- * This method returns a new stream with the first *limit* chunks dropped from the start.
566
- * @since v17.5.0
567
- * @param limit the number of chunks to drop from the readable.
568
- * @returns a stream with *limit* chunks dropped from the start.
569
- */
570
- drop(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
571
- /**
572
- * This method returns a new stream with the first *limit* chunks.
573
- * @since v17.5.0
574
- * @param limit the number of chunks to take from the readable.
575
- * @returns a stream with *limit* chunks taken.
576
- */
577
- take(limit: number, options?: Pick<ArrayOptions, "signal">): Readable;
578
- /**
579
- * This method returns a new stream with chunks of the underlying stream paired with a counter
580
- * in the form `[index, chunk]`. The first index value is `0` and it increases by 1 for each chunk produced.
581
- * @since v17.5.0
582
- * @returns a stream of indexed pairs.
583
- */
584
- asIndexedPairs(options?: Pick<ArrayOptions, "signal">): Readable;
585
- /**
586
- * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation
587
- * on the previous element. It returns a promise for the final value of the reduction.
588
- *
589
- * If no *initial* value is supplied the first chunk of the stream is used as the initial value.
590
- * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property.
591
- *
592
- * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter
593
- * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method.
594
- * @since v17.5.0
595
- * @param fn a reducer function to call over every chunk in the stream. Async or not.
596
- * @param initial the initial value to use in the reduction.
597
- * @returns a promise for the final value of the reduction.
598
- */
599
- reduce<T = any>(
600
- fn: (previous: any, data: any, options?: Pick<ArrayOptions, "signal">) => T,
601
- initial?: undefined,
602
- options?: Pick<ArrayOptions, "signal">,
603
- ): Promise<T>;
604
- reduce<T = any>(
605
- fn: (previous: T, data: any, options?: Pick<ArrayOptions, "signal">) => T,
606
- initial: T,
607
- options?: Pick<ArrayOptions, "signal">,
608
- ): Promise<T>;
609
- _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
610
- /**
611
- * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the readable
612
- * stream will release any internal resources and subsequent calls to `push()` will be ignored.
613
- *
614
- * Once `destroy()` has been called any further calls will be a no-op and no
615
- * further errors except from `_destroy()` may be emitted as `'error'`.
616
- *
617
- * Implementors should not override this method, but instead implement `readable._destroy()`.
618
- * @since v8.0.0
619
- * @param error Error which will be passed as payload in `'error'` event
620
- */
621
- destroy(error?: Error): this;
622
- /**
623
- * Event emitter
624
- * The defined events on documents including:
625
- * 1. close
626
- * 2. data
627
- * 3. end
628
- * 4. error
629
- * 5. pause
630
- * 6. readable
631
- * 7. resume
632
- */
633
- addListener(event: "close", listener: () => void): this;
634
- addListener(event: "data", listener: (chunk: any) => void): this;
635
- addListener(event: "end", listener: () => void): this;
636
- addListener(event: "error", listener: (err: Error) => void): this;
637
- addListener(event: "pause", listener: () => void): this;
638
- addListener(event: "readable", listener: () => void): this;
639
- addListener(event: "resume", listener: () => void): this;
640
- addListener(event: string | symbol, listener: (...args: any[]) => void): this;
641
- emit(event: "close"): boolean;
642
- emit(event: "data", chunk: any): boolean;
643
- emit(event: "end"): boolean;
644
- emit(event: "error", err: Error): boolean;
645
- emit(event: "pause"): boolean;
646
- emit(event: "readable"): boolean;
647
- emit(event: "resume"): boolean;
648
- emit(event: string | symbol, ...args: any[]): boolean;
649
- on(event: "close", listener: () => void): this;
650
- on(event: "data", listener: (chunk: any) => void): this;
651
- on(event: "end", listener: () => void): this;
652
- on(event: "error", listener: (err: Error) => void): this;
653
- on(event: "pause", listener: () => void): this;
654
- on(event: "readable", listener: () => void): this;
655
- on(event: "resume", listener: () => void): this;
656
- on(event: string | symbol, listener: (...args: any[]) => void): this;
657
- once(event: "close", listener: () => void): this;
658
- once(event: "data", listener: (chunk: any) => void): this;
659
- once(event: "end", listener: () => void): this;
660
- once(event: "error", listener: (err: Error) => void): this;
661
- once(event: "pause", listener: () => void): this;
662
- once(event: "readable", listener: () => void): this;
663
- once(event: "resume", listener: () => void): this;
664
- once(event: string | symbol, listener: (...args: any[]) => void): this;
665
- prependListener(event: "close", listener: () => void): this;
666
- prependListener(event: "data", listener: (chunk: any) => void): this;
667
- prependListener(event: "end", listener: () => void): this;
668
- prependListener(event: "error", listener: (err: Error) => void): this;
669
- prependListener(event: "pause", listener: () => void): this;
670
- prependListener(event: "readable", listener: () => void): this;
671
- prependListener(event: "resume", listener: () => void): this;
672
- prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
673
- prependOnceListener(event: "close", listener: () => void): this;
674
- prependOnceListener(event: "data", listener: (chunk: any) => void): this;
675
- prependOnceListener(event: "end", listener: () => void): this;
676
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
677
- prependOnceListener(event: "pause", listener: () => void): this;
678
- prependOnceListener(event: "readable", listener: () => void): this;
679
- prependOnceListener(event: "resume", listener: () => void): this;
680
- prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
681
- removeListener(event: "close", listener: () => void): this;
682
- removeListener(event: "data", listener: (chunk: any) => void): this;
683
- removeListener(event: "end", listener: () => void): this;
684
- removeListener(event: "error", listener: (err: Error) => void): this;
685
- removeListener(event: "pause", listener: () => void): this;
686
- removeListener(event: "readable", listener: () => void): this;
687
- removeListener(event: "resume", listener: () => void): this;
688
- removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
689
- [Symbol.asyncIterator](): NodeJS.AsyncIterator<any>;
690
- /**
691
- * Calls `readable.destroy()` with an `AbortError` and returns a promise that fulfills when the stream is finished.
692
- * @since v20.4.0
693
- */
694
- [Symbol.asyncDispose](): Promise<void>;
695
- }
696
- interface WritableOptions<T extends Writable = Writable> extends StreamOptions<T> {
697
- decodeStrings?: boolean | undefined;
698
- defaultEncoding?: BufferEncoding | undefined;
699
- write?(
700
- this: T,
701
- chunk: any,
702
- encoding: BufferEncoding,
703
- callback: (error?: Error | null) => void,
704
- ): void;
705
- writev?(
706
- this: T,
707
- chunks: Array<{
708
- chunk: any;
709
- encoding: BufferEncoding;
710
- }>,
711
- callback: (error?: Error | null) => void,
712
- ): void;
713
- final?(this: T, callback: (error?: Error | null) => void): void;
714
- }
715
- /**
716
- * @since v0.9.4
717
- */
718
- class Writable extends Stream implements NodeJS.WritableStream {
719
- /**
720
- * A utility method for creating a `Writable` from a web `WritableStream`.
721
- * @since v17.0.0
722
- * @experimental
723
- */
724
- static fromWeb(
725
- writableStream: streamWeb.WritableStream,
726
- options?: Pick<WritableOptions, "decodeStrings" | "highWaterMark" | "objectMode" | "signal">,
727
- ): Writable;
728
- /**
729
- * A utility method for creating a web `WritableStream` from a `Writable`.
730
- * @since v17.0.0
731
- * @experimental
732
- */
733
- static toWeb(streamWritable: Writable): streamWeb.WritableStream;
734
- /**
735
- * Is `true` if it is safe to call `writable.write()`, which means
736
- * the stream has not been destroyed, errored, or ended.
737
- * @since v11.4.0
738
- */
739
- readonly writable: boolean;
740
- /**
741
- * Is `true` after `writable.end()` has been called. This property
742
- * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.
743
- * @since v12.9.0
744
- */
745
- readonly writableEnded: boolean;
746
- /**
747
- * Is set to `true` immediately before the `'finish'` event is emitted.
748
- * @since v12.6.0
749
- */
750
- readonly writableFinished: boolean;
751
- /**
752
- * Return the value of `highWaterMark` passed when creating this `Writable`.
753
- * @since v9.3.0
754
- */
755
- readonly writableHighWaterMark: number;
756
- /**
757
- * This property contains the number of bytes (or objects) in the queue
758
- * ready to be written. The value provides introspection data regarding
759
- * the status of the `highWaterMark`.
760
- * @since v9.4.0
761
- */
762
- readonly writableLength: number;
763
- /**
764
- * Getter for the property `objectMode` of a given `Writable` stream.
765
- * @since v12.3.0
766
- */
767
- readonly writableObjectMode: boolean;
768
- /**
769
- * Number of times `writable.uncork()` needs to be
770
- * called in order to fully uncork the stream.
771
- * @since v13.2.0, v12.16.0
772
- */
773
- readonly writableCorked: number;
774
- /**
775
- * Is `true` after `writable.destroy()` has been called.
776
- * @since v8.0.0
777
- */
778
- destroyed: boolean;
779
- /**
780
- * Is `true` after `'close'` has been emitted.
781
- * @since v18.0.0
782
- */
783
- readonly closed: boolean;
784
- /**
785
- * Returns error if the stream has been destroyed with an error.
786
- * @since v18.0.0
787
- */
788
- readonly errored: Error | null;
789
- /**
790
- * Is `true` if the stream's buffer has been full and stream will emit `'drain'`.
791
- * @since v15.2.0, v14.17.0
792
- */
793
- readonly writableNeedDrain: boolean;
794
- constructor(opts?: WritableOptions);
795
- _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
796
- _writev?(
797
- chunks: Array<{
798
- chunk: any;
799
- encoding: BufferEncoding;
800
- }>,
801
- callback: (error?: Error | null) => void,
802
- ): void;
803
- _construct?(callback: (error?: Error | null) => void): void;
804
- _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
805
- _final(callback: (error?: Error | null) => void): void;
806
- /**
807
- * The `writable.write()` method writes some data to the stream, and calls the
808
- * supplied `callback` once the data has been fully handled. If an error
809
- * occurs, the `callback` will be called with the error as its
810
- * first argument. The `callback` is called asynchronously and before `'error'` is
811
- * emitted.
812
- *
813
- * The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`.
814
- * If `false` is returned, further attempts to write data to the stream should
815
- * stop until the `'drain'` event is emitted.
816
- *
817
- * While a stream is not draining, calls to `write()` will buffer `chunk`, and
818
- * return false. Once all currently buffered chunks are drained (accepted for
819
- * delivery by the operating system), the `'drain'` event will be emitted.
820
- * Once `write()` returns false, do not write more chunks
821
- * until the `'drain'` event is emitted. While calling `write()` on a stream that
822
- * is not draining is allowed, Node.js will buffer all written chunks until
823
- * maximum memory usage occurs, at which point it will abort unconditionally.
824
- * Even before it aborts, high memory usage will cause poor garbage collector
825
- * performance and high RSS (which is not typically released back to the system,
826
- * even after the memory is no longer required). Since TCP sockets may never
827
- * drain if the remote peer does not read the data, writing a socket that is
828
- * not draining may lead to a remotely exploitable vulnerability.
829
- *
830
- * Writing data while the stream is not draining is particularly
831
- * problematic for a `Transform`, because the `Transform` streams are paused
832
- * by default until they are piped or a `'data'` or `'readable'` event handler
833
- * is added.
834
- *
835
- * If the data to be written can be generated or fetched on demand, it is
836
- * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is
837
- * possible to respect backpressure and avoid memory issues using the `'drain'` event:
838
- *
839
- * ```js
840
- * function write(data, cb) {
841
- * if (!stream.write(data)) {
842
- * stream.once('drain', cb);
843
- * } else {
844
- * process.nextTick(cb);
845
- * }
846
- * }
847
- *
848
- * // Wait for cb to be called before doing any other write.
849
- * write('hello', () => {
850
- * console.log('Write completed, do more writes now.');
851
- * });
852
- * ```
853
- *
854
- * A `Writable` stream in object mode will always ignore the `encoding` argument.
855
- * @since v0.9.4
856
- * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
857
- * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
858
- * @param [encoding='utf8'] The encoding, if `chunk` is a string.
859
- * @param callback Callback for when this chunk of data is flushed.
860
- * @return `false` if the stream wishes for the calling code to wait for the `'drain'` event to be emitted before continuing to write additional data; otherwise `true`.
861
- */
862
- write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean;
863
- write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean;
864
- /**
865
- * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream.
866
- * @since v0.11.15
867
- * @param encoding The new default encoding
868
- */
869
- setDefaultEncoding(encoding: BufferEncoding): this;
870
- /**
871
- * Calling the `writable.end()` method signals that no more data will be written
872
- * to the `Writable`. The optional `chunk` and `encoding` arguments allow one
873
- * final additional chunk of data to be written immediately before closing the
874
- * stream.
875
- *
876
- * Calling the {@link write} method after calling {@link end} will raise an error.
877
- *
878
- * ```js
879
- * // Write 'hello, ' and then end with 'world!'.
880
- * import fs from 'node:fs';
881
- * const file = fs.createWriteStream('example.txt');
882
- * file.write('hello, ');
883
- * file.end('world!');
884
- * // Writing more now is not allowed!
885
- * ```
886
- * @since v0.9.4
887
- * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
888
- * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
889
- * @param encoding The encoding if `chunk` is a string
890
- * @param callback Callback for when the stream is finished.
891
- */
892
- end(cb?: () => void): this;
893
- end(chunk: any, cb?: () => void): this;
894
- end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
895
- /**
896
- * The `writable.cork()` method forces all written data to be buffered in memory.
897
- * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called.
898
- *
899
- * The primary intent of `writable.cork()` is to accommodate a situation in which
900
- * several small chunks are written to the stream in rapid succession. Instead of
901
- * immediately forwarding them to the underlying destination, `writable.cork()` buffers all the chunks until `writable.uncork()` is called, which will pass them
902
- * all to `writable._writev()`, if present. This prevents a head-of-line blocking
903
- * situation where data is being buffered while waiting for the first small chunk
904
- * to be processed. However, use of `writable.cork()` without implementing `writable._writev()` may have an adverse effect on throughput.
905
- *
906
- * See also: `writable.uncork()`, `writable._writev()`.
907
- * @since v0.11.2
908
- */
909
- cork(): void;
910
- /**
911
- * The `writable.uncork()` method flushes all data buffered since {@link cork} was called.
912
- *
913
- * When using `writable.cork()` and `writable.uncork()` to manage the buffering
914
- * of writes to a stream, defer calls to `writable.uncork()` using `process.nextTick()`. Doing so allows batching of all `writable.write()` calls that occur within a given Node.js event
915
- * loop phase.
916
- *
917
- * ```js
918
- * stream.cork();
919
- * stream.write('some ');
920
- * stream.write('data ');
921
- * process.nextTick(() => stream.uncork());
922
- * ```
923
- *
924
- * If the `writable.cork()` method is called multiple times on a stream, the
925
- * same number of calls to `writable.uncork()` must be called to flush the buffered
926
- * data.
927
- *
928
- * ```js
929
- * stream.cork();
930
- * stream.write('some ');
931
- * stream.cork();
932
- * stream.write('data ');
933
- * process.nextTick(() => {
934
- * stream.uncork();
935
- * // The data will not be flushed until uncork() is called a second time.
936
- * stream.uncork();
937
- * });
938
- * ```
939
- *
940
- * See also: `writable.cork()`.
941
- * @since v0.11.2
942
- */
943
- uncork(): void;
944
- /**
945
- * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the writable
946
- * stream has ended and subsequent calls to `write()` or `end()` will result in
947
- * an `ERR_STREAM_DESTROYED` error.
948
- * This is a destructive and immediate way to destroy a stream. Previous calls to `write()` may not have drained, and may trigger an `ERR_STREAM_DESTROYED` error.
949
- * Use `end()` instead of destroy if data should flush before close, or wait for
950
- * the `'drain'` event before destroying the stream.
951
- *
952
- * Once `destroy()` has been called any further calls will be a no-op and no
953
- * further errors except from `_destroy()` may be emitted as `'error'`.
954
- *
955
- * Implementors should not override this method,
956
- * but instead implement `writable._destroy()`.
957
- * @since v8.0.0
958
- * @param error Optional, an error to emit with `'error'` event.
959
- */
960
- destroy(error?: Error): this;
961
- /**
962
- * Event emitter
963
- * The defined events on documents including:
964
- * 1. close
965
- * 2. drain
966
- * 3. error
967
- * 4. finish
968
- * 5. pipe
969
- * 6. unpipe
970
- */
971
- addListener(event: "close", listener: () => void): this;
972
- addListener(event: "drain", listener: () => void): this;
973
- addListener(event: "error", listener: (err: Error) => void): this;
974
- addListener(event: "finish", listener: () => void): this;
975
- addListener(event: "pipe", listener: (src: Readable) => void): this;
976
- addListener(event: "unpipe", listener: (src: Readable) => void): this;
977
- addListener(event: string | symbol, listener: (...args: any[]) => void): this;
978
- emit(event: "close"): boolean;
979
- emit(event: "drain"): boolean;
980
- emit(event: "error", err: Error): boolean;
981
- emit(event: "finish"): boolean;
982
- emit(event: "pipe", src: Readable): boolean;
983
- emit(event: "unpipe", src: Readable): boolean;
984
- emit(event: string | symbol, ...args: any[]): boolean;
985
- on(event: "close", listener: () => void): this;
986
- on(event: "drain", listener: () => void): this;
987
- on(event: "error", listener: (err: Error) => void): this;
988
- on(event: "finish", listener: () => void): this;
989
- on(event: "pipe", listener: (src: Readable) => void): this;
990
- on(event: "unpipe", listener: (src: Readable) => void): this;
991
- on(event: string | symbol, listener: (...args: any[]) => void): this;
992
- once(event: "close", listener: () => void): this;
993
- once(event: "drain", listener: () => void): this;
994
- once(event: "error", listener: (err: Error) => void): this;
995
- once(event: "finish", listener: () => void): this;
996
- once(event: "pipe", listener: (src: Readable) => void): this;
997
- once(event: "unpipe", listener: (src: Readable) => void): this;
998
- once(event: string | symbol, listener: (...args: any[]) => void): this;
999
- prependListener(event: "close", listener: () => void): this;
1000
- prependListener(event: "drain", listener: () => void): this;
1001
- prependListener(event: "error", listener: (err: Error) => void): this;
1002
- prependListener(event: "finish", listener: () => void): this;
1003
- prependListener(event: "pipe", listener: (src: Readable) => void): this;
1004
- prependListener(event: "unpipe", listener: (src: Readable) => void): this;
1005
- prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
1006
- prependOnceListener(event: "close", listener: () => void): this;
1007
- prependOnceListener(event: "drain", listener: () => void): this;
1008
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
1009
- prependOnceListener(event: "finish", listener: () => void): this;
1010
- prependOnceListener(event: "pipe", listener: (src: Readable) => void): this;
1011
- prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this;
1012
- prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
1013
- removeListener(event: "close", listener: () => void): this;
1014
- removeListener(event: "drain", listener: () => void): this;
1015
- removeListener(event: "error", listener: (err: Error) => void): this;
1016
- removeListener(event: "finish", listener: () => void): this;
1017
- removeListener(event: "pipe", listener: (src: Readable) => void): this;
1018
- removeListener(event: "unpipe", listener: (src: Readable) => void): this;
1019
- removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
1020
- }
1021
- interface DuplexOptions<T extends Duplex = Duplex> extends ReadableOptions<T>, WritableOptions<T> {
1022
- allowHalfOpen?: boolean | undefined;
1023
- readableObjectMode?: boolean | undefined;
1024
- writableObjectMode?: boolean | undefined;
1025
- readableHighWaterMark?: number | undefined;
1026
- writableHighWaterMark?: number | undefined;
1027
- writableCorked?: number | undefined;
1028
- }
1029
- /**
1030
- * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
1031
- *
1032
- * Examples of `Duplex` streams include:
1033
- *
1034
- * * `TCP sockets`
1035
- * * `zlib streams`
1036
- * * `crypto streams`
1037
- * @since v0.9.4
1038
- */
1039
- class Duplex extends Stream implements NodeJS.ReadWriteStream {
1040
- /**
1041
- * If `false` then the stream will automatically end the writable side when the
1042
- * readable side ends. Set initially by the `allowHalfOpen` constructor option,
1043
- * which defaults to `true`.
1044
- *
1045
- * This can be changed manually to change the half-open behavior of an existing
1046
- * `Duplex` stream instance, but must be changed before the `'end'` event is emitted.
1047
- * @since v0.9.4
1048
- */
1049
- allowHalfOpen: boolean;
1050
- constructor(opts?: DuplexOptions);
1051
- /**
1052
- * A utility method for creating duplex streams.
1053
- *
1054
- * - `Stream` converts writable stream into writable `Duplex` and readable stream
1055
- * to `Duplex`.
1056
- * - `Blob` converts into readable `Duplex`.
1057
- * - `string` converts into readable `Duplex`.
1058
- * - `ArrayBuffer` converts into readable `Duplex`.
1059
- * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`.
1060
- * - `AsyncGeneratorFunction` converts into a readable/writable transform
1061
- * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield
1062
- * `null`.
1063
- * - `AsyncFunction` converts into a writable `Duplex`. Must return
1064
- * either `null` or `undefined`
1065
- * - `Object ({ writable, readable })` converts `readable` and
1066
- * `writable` into `Stream` and then combines them into `Duplex` where the
1067
- * `Duplex` will write to the `writable` and read from the `readable`.
1068
- * - `Promise` converts into readable `Duplex`. Value `null` is ignored.
1069
- *
1070
- * @since v16.8.0
1071
- */
1072
- static from(
1073
- src:
1074
- | Stream
1075
- | NodeBlob
1076
- | ArrayBuffer
1077
- | string
1078
- | Iterable<any>
1079
- | AsyncIterable<any>
1080
- | AsyncGeneratorFunction
1081
- | Promise<any>
1082
- | Object,
1083
- ): Duplex;
1084
- /**
1085
- * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`.
1086
- * @since v17.0.0
1087
- * @experimental
1088
- */
1089
- static toWeb(streamDuplex: Duplex): {
1090
- readable: streamWeb.ReadableStream;
1091
- writable: streamWeb.WritableStream;
1092
- };
1093
- /**
1094
- * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`.
1095
- * @since v17.0.0
1096
- * @experimental
1097
- */
1098
- static fromWeb(
1099
- duplexStream: {
1100
- readable: streamWeb.ReadableStream;
1101
- writable: streamWeb.WritableStream;
1102
- },
1103
- options?: Pick<
1104
- DuplexOptions,
1105
- "allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal"
1106
- >,
1107
- ): Duplex;
1108
- /**
1109
- * Event emitter
1110
- * The defined events on documents including:
1111
- * 1. close
1112
- * 2. data
1113
- * 3. drain
1114
- * 4. end
1115
- * 5. error
1116
- * 6. finish
1117
- * 7. pause
1118
- * 8. pipe
1119
- * 9. readable
1120
- * 10. resume
1121
- * 11. unpipe
1122
- */
1123
- addListener(event: "close", listener: () => void): this;
1124
- addListener(event: "data", listener: (chunk: any) => void): this;
1125
- addListener(event: "drain", listener: () => void): this;
1126
- addListener(event: "end", listener: () => void): this;
1127
- addListener(event: "error", listener: (err: Error) => void): this;
1128
- addListener(event: "finish", listener: () => void): this;
1129
- addListener(event: "pause", listener: () => void): this;
1130
- addListener(event: "pipe", listener: (src: Readable) => void): this;
1131
- addListener(event: "readable", listener: () => void): this;
1132
- addListener(event: "resume", listener: () => void): this;
1133
- addListener(event: "unpipe", listener: (src: Readable) => void): this;
1134
- addListener(event: string | symbol, listener: (...args: any[]) => void): this;
1135
- emit(event: "close"): boolean;
1136
- emit(event: "data", chunk: any): boolean;
1137
- emit(event: "drain"): boolean;
1138
- emit(event: "end"): boolean;
1139
- emit(event: "error", err: Error): boolean;
1140
- emit(event: "finish"): boolean;
1141
- emit(event: "pause"): boolean;
1142
- emit(event: "pipe", src: Readable): boolean;
1143
- emit(event: "readable"): boolean;
1144
- emit(event: "resume"): boolean;
1145
- emit(event: "unpipe", src: Readable): boolean;
1146
- emit(event: string | symbol, ...args: any[]): boolean;
1147
- on(event: "close", listener: () => void): this;
1148
- on(event: "data", listener: (chunk: any) => void): this;
1149
- on(event: "drain", listener: () => void): this;
1150
- on(event: "end", listener: () => void): this;
1151
- on(event: "error", listener: (err: Error) => void): this;
1152
- on(event: "finish", listener: () => void): this;
1153
- on(event: "pause", listener: () => void): this;
1154
- on(event: "pipe", listener: (src: Readable) => void): this;
1155
- on(event: "readable", listener: () => void): this;
1156
- on(event: "resume", listener: () => void): this;
1157
- on(event: "unpipe", listener: (src: Readable) => void): this;
1158
- on(event: string | symbol, listener: (...args: any[]) => void): this;
1159
- once(event: "close", listener: () => void): this;
1160
- once(event: "data", listener: (chunk: any) => void): this;
1161
- once(event: "drain", listener: () => void): this;
1162
- once(event: "end", listener: () => void): this;
1163
- once(event: "error", listener: (err: Error) => void): this;
1164
- once(event: "finish", listener: () => void): this;
1165
- once(event: "pause", listener: () => void): this;
1166
- once(event: "pipe", listener: (src: Readable) => void): this;
1167
- once(event: "readable", listener: () => void): this;
1168
- once(event: "resume", listener: () => void): this;
1169
- once(event: "unpipe", listener: (src: Readable) => void): this;
1170
- once(event: string | symbol, listener: (...args: any[]) => void): this;
1171
- prependListener(event: "close", listener: () => void): this;
1172
- prependListener(event: "data", listener: (chunk: any) => void): this;
1173
- prependListener(event: "drain", listener: () => void): this;
1174
- prependListener(event: "end", listener: () => void): this;
1175
- prependListener(event: "error", listener: (err: Error) => void): this;
1176
- prependListener(event: "finish", listener: () => void): this;
1177
- prependListener(event: "pause", listener: () => void): this;
1178
- prependListener(event: "pipe", listener: (src: Readable) => void): this;
1179
- prependListener(event: "readable", listener: () => void): this;
1180
- prependListener(event: "resume", listener: () => void): this;
1181
- prependListener(event: "unpipe", listener: (src: Readable) => void): this;
1182
- prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
1183
- prependOnceListener(event: "close", listener: () => void): this;
1184
- prependOnceListener(event: "data", listener: (chunk: any) => void): this;
1185
- prependOnceListener(event: "drain", listener: () => void): this;
1186
- prependOnceListener(event: "end", listener: () => void): this;
1187
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
1188
- prependOnceListener(event: "finish", listener: () => void): this;
1189
- prependOnceListener(event: "pause", listener: () => void): this;
1190
- prependOnceListener(event: "pipe", listener: (src: Readable) => void): this;
1191
- prependOnceListener(event: "readable", listener: () => void): this;
1192
- prependOnceListener(event: "resume", listener: () => void): this;
1193
- prependOnceListener(event: "unpipe", listener: (src: Readable) => void): this;
1194
- prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
1195
- removeListener(event: "close", listener: () => void): this;
1196
- removeListener(event: "data", listener: (chunk: any) => void): this;
1197
- removeListener(event: "drain", listener: () => void): this;
1198
- removeListener(event: "end", listener: () => void): this;
1199
- removeListener(event: "error", listener: (err: Error) => void): this;
1200
- removeListener(event: "finish", listener: () => void): this;
1201
- removeListener(event: "pause", listener: () => void): this;
1202
- removeListener(event: "pipe", listener: (src: Readable) => void): this;
1203
- removeListener(event: "readable", listener: () => void): this;
1204
- removeListener(event: "resume", listener: () => void): this;
1205
- removeListener(event: "unpipe", listener: (src: Readable) => void): this;
1206
- removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
1207
- }
1208
- interface Duplex extends Readable, Writable {}
1209
- /**
1210
- * The utility function `duplexPair` returns an Array with two items,
1211
- * each being a `Duplex` stream connected to the other side:
1212
- *
1213
- * ```js
1214
- * const [ sideA, sideB ] = duplexPair();
1215
- * ```
1216
- *
1217
- * Whatever is written to one stream is made readable on the other. It provides
1218
- * behavior analogous to a network connection, where the data written by the client
1219
- * becomes readable by the server, and vice-versa.
1220
- *
1221
- * The Duplex streams are symmetrical; one or the other may be used without any
1222
- * difference in behavior.
1223
- * @param options A value to pass to both {@link Duplex} constructors,
1224
- * to set options such as buffering.
1225
- * @since v22.6.0
1226
- */
1227
- function duplexPair(options?: DuplexOptions): [Duplex, Duplex];
1228
- type TransformCallback = (error?: Error | null, data?: any) => void;
1229
- interface TransformOptions<T extends Transform = Transform> extends DuplexOptions<T> {
1230
- transform?(this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
1231
- flush?(this: T, callback: TransformCallback): void;
1232
- }
1233
- /**
1234
- * Transform streams are `Duplex` streams where the output is in some way
1235
- * related to the input. Like all `Duplex` streams, `Transform` streams
1236
- * implement both the `Readable` and `Writable` interfaces.
1237
- *
1238
- * Examples of `Transform` streams include:
1239
- *
1240
- * * `zlib streams`
1241
- * * `crypto streams`
1242
- * @since v0.9.4
1243
- */
1244
- class Transform extends Duplex {
1245
- constructor(opts?: TransformOptions);
1246
- _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
1247
- _flush(callback: TransformCallback): void;
1248
- }
1249
- /**
1250
- * The `stream.PassThrough` class is a trivial implementation of a `Transform` stream that simply passes the input bytes across to the output. Its purpose is
1251
- * primarily for examples and testing, but there are some use cases where `stream.PassThrough` is useful as a building block for novel sorts of streams.
1252
- */
1253
- class PassThrough extends Transform {}
1254
- /**
1255
- * A stream to attach a signal to.
1256
- *
1257
- * Attaches an AbortSignal to a readable or writeable stream. This lets code
1258
- * control stream destruction using an `AbortController`.
1259
- *
1260
- * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as calling `.destroy(new AbortError())` on the
1261
- * stream, and `controller.error(new AbortError())` for webstreams.
1262
- *
1263
- * ```js
1264
- * import fs from 'node:fs';
1265
- *
1266
- * const controller = new AbortController();
1267
- * const read = addAbortSignal(
1268
- * controller.signal,
1269
- * fs.createReadStream(('object.json')),
1270
- * );
1271
- * // Later, abort the operation closing the stream
1272
- * controller.abort();
1273
- * ```
1274
- *
1275
- * Or using an `AbortSignal` with a readable stream as an async iterable:
1276
- *
1277
- * ```js
1278
- * const controller = new AbortController();
1279
- * setTimeout(() => controller.abort(), 10_000); // set a timeout
1280
- * const stream = addAbortSignal(
1281
- * controller.signal,
1282
- * fs.createReadStream(('object.json')),
1283
- * );
1284
- * (async () => {
1285
- * try {
1286
- * for await (const chunk of stream) {
1287
- * await process(chunk);
1288
- * }
1289
- * } catch (e) {
1290
- * if (e.name === 'AbortError') {
1291
- * // The operation was cancelled
1292
- * } else {
1293
- * throw e;
1294
- * }
1295
- * }
1296
- * })();
1297
- * ```
1298
- *
1299
- * Or using an `AbortSignal` with a ReadableStream:
1300
- *
1301
- * ```js
1302
- * const controller = new AbortController();
1303
- * const rs = new ReadableStream({
1304
- * start(controller) {
1305
- * controller.enqueue('hello');
1306
- * controller.enqueue('world');
1307
- * controller.close();
1308
- * },
1309
- * });
1310
- *
1311
- * addAbortSignal(controller.signal, rs);
1312
- *
1313
- * finished(rs, (err) => {
1314
- * if (err) {
1315
- * if (err.name === 'AbortError') {
1316
- * // The operation was cancelled
1317
- * }
1318
- * }
1319
- * });
1320
- *
1321
- * const reader = rs.getReader();
1322
- *
1323
- * reader.read().then(({ value, done }) => {
1324
- * console.log(value); // hello
1325
- * console.log(done); // false
1326
- * controller.abort();
1327
- * });
1328
- * ```
1329
- * @since v15.4.0
1330
- * @param signal A signal representing possible cancellation
1331
- * @param stream A stream to attach a signal to.
1332
- */
1333
- function addAbortSignal<T extends Stream>(signal: AbortSignal, stream: T): T;
1334
- /**
1335
- * Returns the default highWaterMark used by streams.
1336
- * Defaults to `65536` (64 KiB), or `16` for `objectMode`.
1337
- * @since v19.9.0
1338
- */
1339
- function getDefaultHighWaterMark(objectMode: boolean): number;
1340
- /**
1341
- * Sets the default highWaterMark used by streams.
1342
- * @since v19.9.0
1343
- * @param value highWaterMark value
1344
- */
1345
- function setDefaultHighWaterMark(objectMode: boolean, value: number): void;
1346
- interface FinishedOptions extends Abortable {
1347
- error?: boolean | undefined;
1348
- readable?: boolean | undefined;
1349
- writable?: boolean | undefined;
1350
- }
1351
- /**
1352
- * A readable and/or writable stream/webstream.
1353
- *
1354
- * A function to get notified when a stream is no longer readable, writable
1355
- * or has experienced an error or a premature close event.
1356
- *
1357
- * ```js
1358
- * import { finished } from 'node:stream';
1359
- * import fs from 'node:fs';
1360
- *
1361
- * const rs = fs.createReadStream('archive.tar');
1362
- *
1363
- * finished(rs, (err) => {
1364
- * if (err) {
1365
- * console.error('Stream failed.', err);
1366
- * } else {
1367
- * console.log('Stream is done reading.');
1368
- * }
1369
- * });
1370
- *
1371
- * rs.resume(); // Drain the stream.
1372
- * ```
1373
- *
1374
- * Especially useful in error handling scenarios where a stream is destroyed
1375
- * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`.
1376
- *
1377
- * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v22.x/api/stream.html#streamfinishedstream-options).
1378
- *
1379
- * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been
1380
- * invoked. The reason for this is so that unexpected `'error'` events (due to
1381
- * incorrect stream implementations) do not cause unexpected crashes.
1382
- * If this is unwanted behavior then the returned cleanup function needs to be
1383
- * invoked in the callback:
1384
- *
1385
- * ```js
1386
- * const cleanup = finished(rs, (err) => {
1387
- * cleanup();
1388
- * // ...
1389
- * });
1390
- * ```
1391
- * @since v10.0.0
1392
- * @param stream A readable and/or writable stream.
1393
- * @param callback A callback function that takes an optional error argument.
1394
- * @returns A cleanup function which removes all registered listeners.
1395
- */
1396
- function finished(
1397
- stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
1398
- options: FinishedOptions,
1399
- callback: (err?: NodeJS.ErrnoException | null) => void,
1400
- ): () => void;
1401
- function finished(
1402
- stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
1403
- callback: (err?: NodeJS.ErrnoException | null) => void,
1404
- ): () => void;
1405
- namespace finished {
1406
- function __promisify__(
1407
- stream: NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream,
1408
- options?: FinishedOptions,
1409
- ): Promise<void>;
1410
- }
1411
- type PipelineSourceFunction<T> = () => Iterable<T> | AsyncIterable<T>;
1412
- type PipelineSource<T> = Iterable<T> | AsyncIterable<T> | NodeJS.ReadableStream | PipelineSourceFunction<T>;
1413
- type PipelineTransform<S extends PipelineTransformSource<any>, U> =
1414
- | NodeJS.ReadWriteStream
1415
- | ((
1416
- source: S extends (...args: any[]) => Iterable<infer ST> | AsyncIterable<infer ST> ? AsyncIterable<ST>
1417
- : S,
1418
- ) => AsyncIterable<U>);
1419
- type PipelineTransformSource<T> = PipelineSource<T> | PipelineTransform<any, T>;
1420
- type PipelineDestinationIterableFunction<T> = (source: AsyncIterable<T>) => AsyncIterable<any>;
1421
- type PipelineDestinationPromiseFunction<T, P> = (source: AsyncIterable<T>) => Promise<P>;
1422
- type PipelineDestination<S extends PipelineTransformSource<any>, P> = S extends
1423
- PipelineTransformSource<infer ST> ?
1424
- | NodeJS.WritableStream
1425
- | PipelineDestinationIterableFunction<ST>
1426
- | PipelineDestinationPromiseFunction<ST, P>
1427
- : never;
1428
- type PipelineCallback<S extends PipelineDestination<any, any>> = S extends
1429
- PipelineDestinationPromiseFunction<any, infer P> ? (err: NodeJS.ErrnoException | null, value: P) => void
1430
- : (err: NodeJS.ErrnoException | null) => void;
1431
- type PipelinePromise<S extends PipelineDestination<any, any>> = S extends
1432
- PipelineDestinationPromiseFunction<any, infer P> ? Promise<P> : Promise<void>;
1433
- interface PipelineOptions {
1434
- signal?: AbortSignal | undefined;
1435
- end?: boolean | undefined;
1436
- }
1437
- /**
1438
- * A module method to pipe between streams and generators forwarding errors and
1439
- * properly cleaning up and provide a callback when the pipeline is complete.
1440
- *
1441
- * ```js
1442
- * import { pipeline } from 'node:stream';
1443
- * import fs from 'node:fs';
1444
- * import zlib from 'node:zlib';
1445
- *
1446
- * // Use the pipeline API to easily pipe a series of streams
1447
- * // together and get notified when the pipeline is fully done.
1448
- *
1449
- * // A pipeline to gzip a potentially huge tar file efficiently:
1450
- *
1451
- * pipeline(
1452
- * fs.createReadStream('archive.tar'),
1453
- * zlib.createGzip(),
1454
- * fs.createWriteStream('archive.tar.gz'),
1455
- * (err) => {
1456
- * if (err) {
1457
- * console.error('Pipeline failed.', err);
1458
- * } else {
1459
- * console.log('Pipeline succeeded.');
1460
- * }
1461
- * },
1462
- * );
1463
- * ```
1464
- *
1465
- * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v22.x/api/stream.html#streampipelinesource-transforms-destination-options).
1466
- *
1467
- * `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
1468
- *
1469
- * * `Readable` streams which have emitted `'end'` or `'close'`.
1470
- * * `Writable` streams which have emitted `'finish'` or `'close'`.
1471
- *
1472
- * `stream.pipeline()` leaves dangling event listeners on the streams
1473
- * after the `callback` has been invoked. In the case of reuse of streams after
1474
- * failure, this can cause event listener leaks and swallowed errors. If the last
1475
- * stream is readable, dangling event listeners will be removed so that the last
1476
- * stream can be consumed later.
1477
- *
1478
- * `stream.pipeline()` closes all the streams when an error is raised.
1479
- * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior
1480
- * once it would destroy the socket without sending the expected response.
1481
- * See the example below:
1482
- *
1483
- * ```js
1484
- * import fs from 'node:fs';
1485
- * import http from 'node:http';
1486
- * import { pipeline } from 'node:stream';
1487
- *
1488
- * const server = http.createServer((req, res) => {
1489
- * const fileStream = fs.createReadStream('./fileNotExist.txt');
1490
- * pipeline(fileStream, res, (err) => {
1491
- * if (err) {
1492
- * console.log(err); // No such file
1493
- * // this message can't be sent once `pipeline` already destroyed the socket
1494
- * return res.end('error!!!');
1495
- * }
1496
- * });
1497
- * });
1498
- * ```
1499
- * @since v10.0.0
1500
- * @param callback Called when the pipeline is fully done.
1501
- */
1502
- function pipeline<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(
1503
- source: A,
1504
- destination: B,
1505
- callback: PipelineCallback<B>,
1506
- ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
1507
- function pipeline<
1508
- A extends PipelineSource<any>,
1509
- T1 extends PipelineTransform<A, any>,
1510
- B extends PipelineDestination<T1, any>,
1511
- >(
1512
- source: A,
1513
- transform1: T1,
1514
- destination: B,
1515
- callback: PipelineCallback<B>,
1516
- ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
1517
- function pipeline<
1518
- A extends PipelineSource<any>,
1519
- T1 extends PipelineTransform<A, any>,
1520
- T2 extends PipelineTransform<T1, any>,
1521
- B extends PipelineDestination<T2, any>,
1522
- >(
1523
- source: A,
1524
- transform1: T1,
1525
- transform2: T2,
1526
- destination: B,
1527
- callback: PipelineCallback<B>,
1528
- ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
1529
- function pipeline<
1530
- A extends PipelineSource<any>,
1531
- T1 extends PipelineTransform<A, any>,
1532
- T2 extends PipelineTransform<T1, any>,
1533
- T3 extends PipelineTransform<T2, any>,
1534
- B extends PipelineDestination<T3, any>,
1535
- >(
1536
- source: A,
1537
- transform1: T1,
1538
- transform2: T2,
1539
- transform3: T3,
1540
- destination: B,
1541
- callback: PipelineCallback<B>,
1542
- ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
1543
- function pipeline<
1544
- A extends PipelineSource<any>,
1545
- T1 extends PipelineTransform<A, any>,
1546
- T2 extends PipelineTransform<T1, any>,
1547
- T3 extends PipelineTransform<T2, any>,
1548
- T4 extends PipelineTransform<T3, any>,
1549
- B extends PipelineDestination<T4, any>,
1550
- >(
1551
- source: A,
1552
- transform1: T1,
1553
- transform2: T2,
1554
- transform3: T3,
1555
- transform4: T4,
1556
- destination: B,
1557
- callback: PipelineCallback<B>,
1558
- ): B extends NodeJS.WritableStream ? B : NodeJS.WritableStream;
1559
- function pipeline(
1560
- streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
1561
- callback: (err: NodeJS.ErrnoException | null) => void,
1562
- ): NodeJS.WritableStream;
1563
- function pipeline(
1564
- stream1: NodeJS.ReadableStream,
1565
- stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
1566
- ...streams: Array<
1567
- NodeJS.ReadWriteStream | NodeJS.WritableStream | ((err: NodeJS.ErrnoException | null) => void)
1568
- >
1569
- ): NodeJS.WritableStream;
1570
- namespace pipeline {
1571
- function __promisify__<A extends PipelineSource<any>, B extends PipelineDestination<A, any>>(
1572
- source: A,
1573
- destination: B,
1574
- options?: PipelineOptions,
1575
- ): PipelinePromise<B>;
1576
- function __promisify__<
1577
- A extends PipelineSource<any>,
1578
- T1 extends PipelineTransform<A, any>,
1579
- B extends PipelineDestination<T1, any>,
1580
- >(
1581
- source: A,
1582
- transform1: T1,
1583
- destination: B,
1584
- options?: PipelineOptions,
1585
- ): PipelinePromise<B>;
1586
- function __promisify__<
1587
- A extends PipelineSource<any>,
1588
- T1 extends PipelineTransform<A, any>,
1589
- T2 extends PipelineTransform<T1, any>,
1590
- B extends PipelineDestination<T2, any>,
1591
- >(
1592
- source: A,
1593
- transform1: T1,
1594
- transform2: T2,
1595
- destination: B,
1596
- options?: PipelineOptions,
1597
- ): PipelinePromise<B>;
1598
- function __promisify__<
1599
- A extends PipelineSource<any>,
1600
- T1 extends PipelineTransform<A, any>,
1601
- T2 extends PipelineTransform<T1, any>,
1602
- T3 extends PipelineTransform<T2, any>,
1603
- B extends PipelineDestination<T3, any>,
1604
- >(
1605
- source: A,
1606
- transform1: T1,
1607
- transform2: T2,
1608
- transform3: T3,
1609
- destination: B,
1610
- options?: PipelineOptions,
1611
- ): PipelinePromise<B>;
1612
- function __promisify__<
1613
- A extends PipelineSource<any>,
1614
- T1 extends PipelineTransform<A, any>,
1615
- T2 extends PipelineTransform<T1, any>,
1616
- T3 extends PipelineTransform<T2, any>,
1617
- T4 extends PipelineTransform<T3, any>,
1618
- B extends PipelineDestination<T4, any>,
1619
- >(
1620
- source: A,
1621
- transform1: T1,
1622
- transform2: T2,
1623
- transform3: T3,
1624
- transform4: T4,
1625
- destination: B,
1626
- options?: PipelineOptions,
1627
- ): PipelinePromise<B>;
1628
- function __promisify__(
1629
- streams: ReadonlyArray<NodeJS.ReadableStream | NodeJS.WritableStream | NodeJS.ReadWriteStream>,
1630
- options?: PipelineOptions,
1631
- ): Promise<void>;
1632
- function __promisify__(
1633
- stream1: NodeJS.ReadableStream,
1634
- stream2: NodeJS.ReadWriteStream | NodeJS.WritableStream,
1635
- ...streams: Array<NodeJS.ReadWriteStream | NodeJS.WritableStream | PipelineOptions>
1636
- ): Promise<void>;
1637
- }
1638
- interface Pipe {
1639
- close(): void;
1640
- hasRef(): boolean;
1641
- ref(): void;
1642
- unref(): void;
1643
- }
1644
- /**
1645
- * Returns whether the stream has encountered an error.
1646
- * @since v17.3.0, v16.14.0
1647
- * @experimental
1648
- */
1649
- function isErrored(stream: Readable | Writable | NodeJS.ReadableStream | NodeJS.WritableStream): boolean;
1650
- /**
1651
- * Returns whether the stream is readable.
1652
- * @since v17.4.0, v16.14.0
1653
- * @experimental
1654
- */
1655
- function isReadable(stream: Readable | NodeJS.ReadableStream): boolean;
1656
- }
1657
- export = Stream;
1658
- }
1659
- declare module "node:stream" {
1660
- import stream = require("stream");
1661
- export = stream;
1662
- }