@hasna/connectors 1.3.10 → 1.3.11

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 (674) hide show
  1. package/README.md +29 -348
  2. package/bin/index.js +4402 -3220
  3. package/bin/mcp.js +4345 -3065
  4. package/bin/serve.js +3579 -3024
  5. package/dashboard/dist/assets/index-ClBXkNbL.css +1 -0
  6. package/dashboard/dist/assets/index-CwLL4Zbv.js +284 -0
  7. package/dashboard/dist/index.html +2 -2
  8. package/dist/db/agents.d.ts +1 -1
  9. package/dist/db/database.d.ts +3 -2
  10. package/dist/db/jobs.d.ts +1 -1
  11. package/dist/db/locks.d.ts +1 -1
  12. package/dist/db/promotions.d.ts +1 -1
  13. package/dist/db/rate.d.ts +1 -1
  14. package/dist/db/usage.d.ts +1 -1
  15. package/dist/db/workflows.d.ts +1 -1
  16. package/dist/index.js +3843 -3152
  17. package/dist/lib/scheduler.d.ts +1 -1
  18. package/package.json +2 -2
  19. package/connectors/connect-yousign/bun.lock +0 -32
  20. package/connectors/connect-yousign/node_modules/@types/bun/LICENSE +0 -21
  21. package/connectors/connect-yousign/node_modules/@types/bun/README.md +0 -20
  22. package/connectors/connect-yousign/node_modules/@types/bun/index.d.ts +0 -1
  23. package/connectors/connect-yousign/node_modules/@types/bun/package.json +0 -53
  24. package/connectors/connect-yousign/node_modules/@types/node/LICENSE +0 -21
  25. package/connectors/connect-yousign/node_modules/@types/node/README.md +0 -15
  26. package/connectors/connect-yousign/node_modules/@types/node/assert/strict.d.ts +0 -105
  27. package/connectors/connect-yousign/node_modules/@types/node/assert.d.ts +0 -955
  28. package/connectors/connect-yousign/node_modules/@types/node/async_hooks.d.ts +0 -623
  29. package/connectors/connect-yousign/node_modules/@types/node/buffer.buffer.d.ts +0 -466
  30. package/connectors/connect-yousign/node_modules/@types/node/buffer.d.ts +0 -1810
  31. package/connectors/connect-yousign/node_modules/@types/node/child_process.d.ts +0 -1433
  32. package/connectors/connect-yousign/node_modules/@types/node/cluster.d.ts +0 -486
  33. package/connectors/connect-yousign/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
  34. package/connectors/connect-yousign/node_modules/@types/node/console.d.ts +0 -151
  35. package/connectors/connect-yousign/node_modules/@types/node/constants.d.ts +0 -20
  36. package/connectors/connect-yousign/node_modules/@types/node/crypto.d.ts +0 -4065
  37. package/connectors/connect-yousign/node_modules/@types/node/dgram.d.ts +0 -564
  38. package/connectors/connect-yousign/node_modules/@types/node/diagnostics_channel.d.ts +0 -576
  39. package/connectors/connect-yousign/node_modules/@types/node/dns/promises.d.ts +0 -503
  40. package/connectors/connect-yousign/node_modules/@types/node/dns.d.ts +0 -922
  41. package/connectors/connect-yousign/node_modules/@types/node/domain.d.ts +0 -166
  42. package/connectors/connect-yousign/node_modules/@types/node/events.d.ts +0 -1047
  43. package/connectors/connect-yousign/node_modules/@types/node/fs/promises.d.ts +0 -1329
  44. package/connectors/connect-yousign/node_modules/@types/node/fs.d.ts +0 -4678
  45. package/connectors/connect-yousign/node_modules/@types/node/globals.d.ts +0 -150
  46. package/connectors/connect-yousign/node_modules/@types/node/globals.typedarray.d.ts +0 -101
  47. package/connectors/connect-yousign/node_modules/@types/node/http.d.ts +0 -2188
  48. package/connectors/connect-yousign/node_modules/@types/node/http2.d.ts +0 -2480
  49. package/connectors/connect-yousign/node_modules/@types/node/https.d.ts +0 -405
  50. package/connectors/connect-yousign/node_modules/@types/node/index.d.ts +0 -115
  51. package/connectors/connect-yousign/node_modules/@types/node/inspector/promises.d.ts +0 -41
  52. package/connectors/connect-yousign/node_modules/@types/node/inspector.d.ts +0 -269
  53. package/connectors/connect-yousign/node_modules/@types/node/inspector.generated.d.ts +0 -4401
  54. package/connectors/connect-yousign/node_modules/@types/node/module.d.ts +0 -757
  55. package/connectors/connect-yousign/node_modules/@types/node/net.d.ts +0 -933
  56. package/connectors/connect-yousign/node_modules/@types/node/os.d.ts +0 -507
  57. package/connectors/connect-yousign/node_modules/@types/node/package.json +0 -155
  58. package/connectors/connect-yousign/node_modules/@types/node/path/posix.d.ts +0 -8
  59. package/connectors/connect-yousign/node_modules/@types/node/path/win32.d.ts +0 -8
  60. package/connectors/connect-yousign/node_modules/@types/node/path.d.ts +0 -187
  61. package/connectors/connect-yousign/node_modules/@types/node/perf_hooks.d.ts +0 -643
  62. package/connectors/connect-yousign/node_modules/@types/node/process.d.ts +0 -2175
  63. package/connectors/connect-yousign/node_modules/@types/node/punycode.d.ts +0 -117
  64. package/connectors/connect-yousign/node_modules/@types/node/querystring.d.ts +0 -152
  65. package/connectors/connect-yousign/node_modules/@types/node/quic.d.ts +0 -910
  66. package/connectors/connect-yousign/node_modules/@types/node/readline/promises.d.ts +0 -161
  67. package/connectors/connect-yousign/node_modules/@types/node/readline.d.ts +0 -542
  68. package/connectors/connect-yousign/node_modules/@types/node/repl.d.ts +0 -415
  69. package/connectors/connect-yousign/node_modules/@types/node/sea.d.ts +0 -162
  70. package/connectors/connect-yousign/node_modules/@types/node/sqlite.d.ts +0 -1065
  71. package/connectors/connect-yousign/node_modules/@types/node/stream/consumers.d.ts +0 -38
  72. package/connectors/connect-yousign/node_modules/@types/node/stream/promises.d.ts +0 -211
  73. package/connectors/connect-yousign/node_modules/@types/node/stream/web.d.ts +0 -296
  74. package/connectors/connect-yousign/node_modules/@types/node/stream.d.ts +0 -1770
  75. package/connectors/connect-yousign/node_modules/@types/node/string_decoder.d.ts +0 -67
  76. package/connectors/connect-yousign/node_modules/@types/node/test/reporters.d.ts +0 -96
  77. package/connectors/connect-yousign/node_modules/@types/node/test.d.ts +0 -2275
  78. package/connectors/connect-yousign/node_modules/@types/node/timers/promises.d.ts +0 -108
  79. package/connectors/connect-yousign/node_modules/@types/node/timers.d.ts +0 -159
  80. package/connectors/connect-yousign/node_modules/@types/node/tls.d.ts +0 -1203
  81. package/connectors/connect-yousign/node_modules/@types/node/trace_events.d.ts +0 -197
  82. package/connectors/connect-yousign/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -462
  83. package/connectors/connect-yousign/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
  84. package/connectors/connect-yousign/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -36
  85. package/connectors/connect-yousign/node_modules/@types/node/ts5.6/index.d.ts +0 -117
  86. package/connectors/connect-yousign/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
  87. package/connectors/connect-yousign/node_modules/@types/node/ts5.7/index.d.ts +0 -117
  88. package/connectors/connect-yousign/node_modules/@types/node/tty.d.ts +0 -250
  89. package/connectors/connect-yousign/node_modules/@types/node/url.d.ts +0 -541
  90. package/connectors/connect-yousign/node_modules/@types/node/util/types.d.ts +0 -558
  91. package/connectors/connect-yousign/node_modules/@types/node/util.d.ts +0 -1687
  92. package/connectors/connect-yousign/node_modules/@types/node/v8.d.ts +0 -988
  93. package/connectors/connect-yousign/node_modules/@types/node/vm.d.ts +0 -1208
  94. package/connectors/connect-yousign/node_modules/@types/node/wasi.d.ts +0 -202
  95. package/connectors/connect-yousign/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -59
  96. package/connectors/connect-yousign/node_modules/@types/node/web-globals/blob.d.ts +0 -23
  97. package/connectors/connect-yousign/node_modules/@types/node/web-globals/console.d.ts +0 -9
  98. package/connectors/connect-yousign/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
  99. package/connectors/connect-yousign/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
  100. package/connectors/connect-yousign/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
  101. package/connectors/connect-yousign/node_modules/@types/node/web-globals/events.d.ts +0 -106
  102. package/connectors/connect-yousign/node_modules/@types/node/web-globals/fetch.d.ts +0 -69
  103. package/connectors/connect-yousign/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
  104. package/connectors/connect-yousign/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
  105. package/connectors/connect-yousign/node_modules/@types/node/web-globals/navigator.d.ts +0 -25
  106. package/connectors/connect-yousign/node_modules/@types/node/web-globals/performance.d.ts +0 -45
  107. package/connectors/connect-yousign/node_modules/@types/node/web-globals/storage.d.ts +0 -24
  108. package/connectors/connect-yousign/node_modules/@types/node/web-globals/streams.d.ts +0 -115
  109. package/connectors/connect-yousign/node_modules/@types/node/web-globals/timers.d.ts +0 -44
  110. package/connectors/connect-yousign/node_modules/@types/node/web-globals/url.d.ts +0 -24
  111. package/connectors/connect-yousign/node_modules/@types/node/worker_threads.d.ts +0 -717
  112. package/connectors/connect-yousign/node_modules/@types/node/zlib.d.ts +0 -682
  113. package/connectors/connect-yousign/node_modules/bun-types/CLAUDE.md +0 -105
  114. package/connectors/connect-yousign/node_modules/bun-types/README.md +0 -33
  115. package/connectors/connect-yousign/node_modules/bun-types/bun.d.ts +0 -8481
  116. package/connectors/connect-yousign/node_modules/bun-types/bun.ns.d.ts +0 -5
  117. package/connectors/connect-yousign/node_modules/bun-types/bundle.d.ts +0 -74
  118. package/connectors/connect-yousign/node_modules/bun-types/deprecated.d.ts +0 -184
  119. package/connectors/connect-yousign/node_modules/bun-types/devserver.d.ts +0 -187
  120. package/connectors/connect-yousign/node_modules/bun-types/docs/README.md +0 -28
  121. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/bytecode.mdx +0 -447
  122. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/css.mdx +0 -1024
  123. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/esbuild.mdx +0 -304
  124. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/executables.mdx +0 -1318
  125. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/fullstack.mdx +0 -1086
  126. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/hot-reloading.mdx +0 -229
  127. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/html-static.mdx +0 -498
  128. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/index.mdx +0 -1840
  129. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/loaders.mdx +0 -451
  130. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/macros.mdx +0 -328
  131. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/minifier.mdx +0 -1286
  132. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/plugins.mdx +0 -477
  133. package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/standalone-html.mdx +0 -314
  134. package/connectors/connect-yousign/node_modules/bun-types/docs/feedback.mdx +0 -75
  135. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-array.mdx +0 -29
  136. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-blob.mdx +0 -26
  137. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-buffer.mdx +0 -27
  138. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-string.mdx +0 -17
  139. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-typedarray.mdx +0 -41
  140. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-arraybuffer.mdx +0 -16
  141. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-dataview.mdx +0 -16
  142. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-stream.mdx +0 -16
  143. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-string.mdx +0 -17
  144. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-typedarray.mdx +0 -16
  145. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-arraybuffer.mdx +0 -16
  146. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-blob.mdx +0 -16
  147. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-readablestream.mdx +0 -43
  148. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-string.mdx +0 -27
  149. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-typedarray.mdx +0 -16
  150. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/dataview-to-string.mdx +0 -17
  151. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-arraybuffer.mdx +0 -27
  152. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-blob.mdx +0 -18
  153. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-buffer.mdx +0 -16
  154. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-dataview.mdx +0 -16
  155. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-readablestream.mdx +0 -43
  156. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-string.mdx +0 -18
  157. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/aws-lambda.mdx +0 -204
  158. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/digital-ocean.mdx +0 -161
  159. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/google-cloud-run.mdx +0 -194
  160. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/railway.mdx +0 -145
  161. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/render.mdx +0 -82
  162. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/vercel.mdx +0 -97
  163. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/astro.mdx +0 -82
  164. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/discordjs.mdx +0 -80
  165. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/docker.mdx +0 -151
  166. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/drizzle.mdx +0 -195
  167. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/elysia.mdx +0 -31
  168. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/express.mdx +0 -43
  169. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/gel.mdx +0 -261
  170. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/hono.mdx +0 -47
  171. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/mongoose.mdx +0 -92
  172. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/neon-drizzle.mdx +0 -234
  173. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/neon-serverless-postgres.mdx +0 -60
  174. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/nextjs.mdx +0 -103
  175. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/nuxt.mdx +0 -96
  176. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/pm2.mdx +0 -55
  177. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/prisma-postgres.mdx +0 -169
  178. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/prisma.mdx +0 -164
  179. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/qwik.mdx +0 -114
  180. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/react.mdx +0 -52
  181. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/remix.mdx +0 -97
  182. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/sentry.mdx +0 -54
  183. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/solidstart.mdx +0 -62
  184. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/ssr-react.mdx +0 -49
  185. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/stric.mdx +0 -54
  186. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/sveltekit.mdx +0 -138
  187. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/systemd.mdx +0 -114
  188. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/tanstack-start.mdx +0 -791
  189. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/upstash.mdx +0 -87
  190. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/vite.mdx +0 -77
  191. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/html-rewriter/extract-links.mdx +0 -71
  192. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/html-rewriter/extract-social-meta.mdx +0 -97
  193. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/cluster.mdx +0 -69
  194. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/fetch-unix.mdx +0 -35
  195. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/fetch.mdx +0 -26
  196. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/file-uploads.mdx +0 -97
  197. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/hot.mdx +0 -28
  198. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/proxy.mdx +0 -50
  199. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/server.mdx +0 -48
  200. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/simple.mdx +0 -20
  201. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/stream-file.mdx +0 -50
  202. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/stream-iterator.mdx +0 -49
  203. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/stream-node-streams-in-bun.mdx +0 -22
  204. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/tls.mdx +0 -32
  205. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/index.mdx +0 -10
  206. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-dev.mdx +0 -28
  207. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-git.mdx +0 -40
  208. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-optional.mdx +0 -27
  209. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-peer.mdx +0 -45
  210. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-tarball.mdx +0 -35
  211. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add.mdx +0 -44
  212. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/azure-artifacts.mdx +0 -76
  213. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/cicd.mdx +0 -43
  214. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/custom-registry.mdx +0 -32
  215. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/from-npm-install-to-bun-install.mdx +0 -230
  216. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/git-diff-bun-lockfile.mdx +0 -48
  217. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/jfrog-artifactory.mdx +0 -28
  218. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/npm-alias.mdx +0 -25
  219. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/registry-scope.mdx +0 -40
  220. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/trusted.mdx +0 -52
  221. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/workspaces.mdx +0 -70
  222. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/yarnlock.mdx +0 -51
  223. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/argv.mdx +0 -66
  224. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/ctrl-c.mdx +0 -18
  225. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/ipc.mdx +0 -69
  226. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/nanoseconds.mdx +0 -15
  227. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/os-signals.mdx +0 -31
  228. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/spawn-stderr.mdx +0 -34
  229. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/spawn-stdout.mdx +0 -28
  230. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/spawn.mdx +0 -43
  231. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/stdin.mdx +0 -62
  232. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/arraybuffer.mdx +0 -30
  233. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/buffer.mdx +0 -21
  234. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/exists.mdx +0 -18
  235. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/json.mdx +0 -19
  236. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/mime.mdx +0 -22
  237. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/stream.mdx +0 -28
  238. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/string.mdx +0 -24
  239. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/uint8array.mdx +0 -23
  240. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/watch.mdx +0 -66
  241. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/build-time-constants.mdx +0 -295
  242. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/cicd.mdx +0 -45
  243. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/codesign-macos-executable.mdx +0 -61
  244. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/define-constant.mdx +0 -149
  245. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/delete-directory.mdx +0 -39
  246. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/delete-file.mdx +0 -21
  247. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/heap-snapshot.mdx +0 -28
  248. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-html.mdx +0 -15
  249. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-json.mdx +0 -46
  250. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-json5.mdx +0 -74
  251. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-toml.mdx +0 -32
  252. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-yaml.mdx +0 -104
  253. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/read-env.mdx +0 -37
  254. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/set-env.mdx +0 -51
  255. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/shell.mdx +0 -42
  256. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/timezone.mdx +0 -38
  257. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/tsconfig-paths.mdx +0 -31
  258. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/typescript.mdx +0 -51
  259. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/vscode-debugger.mdx +0 -47
  260. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/web-debugger.mdx +0 -103
  261. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-arraybuffer.mdx +0 -13
  262. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-blob.mdx +0 -13
  263. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-json.mdx +0 -14
  264. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-string.mdx +0 -14
  265. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-uint8array.mdx +0 -13
  266. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-array.mdx +0 -16
  267. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-arraybuffer.mdx +0 -16
  268. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-blob.mdx +0 -16
  269. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-buffer.mdx +0 -17
  270. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-json.mdx +0 -16
  271. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-string.mdx +0 -16
  272. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-typedarray.mdx +0 -24
  273. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/bail.mdx +0 -24
  274. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/concurrent-test-glob.mdx +0 -146
  275. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/coverage-threshold.mdx +0 -67
  276. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/coverage.mdx +0 -49
  277. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/happy-dom.mdx +0 -73
  278. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/migrate-from-jest.mdx +0 -125
  279. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/mock-clock.mdx +0 -50
  280. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/mock-functions.mdx +0 -70
  281. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/rerun-each.mdx +0 -16
  282. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/run-tests.mdx +0 -116
  283. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/skip-tests.mdx +0 -43
  284. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/snapshot.mdx +0 -102
  285. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/spy-on.mdx +0 -49
  286. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/svelte-test.mdx +0 -113
  287. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/testing-library.mdx +0 -93
  288. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/timeout.mdx +0 -17
  289. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/todo-tests.mdx +0 -74
  290. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/update-snapshots.mdx +0 -49
  291. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/watch-mode.mdx +0 -24
  292. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/base64.mdx +0 -17
  293. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/deep-equals.mdx +0 -41
  294. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/deflate.mdx +0 -20
  295. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/detect-bun.mdx +0 -28
  296. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/entrypoint.mdx +0 -19
  297. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/escape-html.mdx +0 -24
  298. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/file-url-to-path.mdx +0 -16
  299. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/gzip.mdx +0 -20
  300. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/hash-a-password.mdx +0 -56
  301. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/import-meta-dir.mdx +0 -15
  302. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/import-meta-file.mdx +0 -15
  303. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/import-meta-path.mdx +0 -15
  304. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/javascript-uuid.mdx +0 -25
  305. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/main.mdx +0 -43
  306. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/path-to-file-url.mdx +0 -16
  307. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/sleep.mdx +0 -24
  308. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/upgrade.mdx +0 -93
  309. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/version.mdx +0 -23
  310. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/which-path-to-executable-bin.mdx +0 -17
  311. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/websocket/compression.mdx +0 -33
  312. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/websocket/context.mdx +0 -79
  313. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/websocket/pubsub.mdx +0 -43
  314. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/websocket/simple.mdx +0 -38
  315. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/append.mdx +0 -54
  316. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/basic.mdx +0 -46
  317. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/blob.mdx +0 -30
  318. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/cat.mdx +0 -19
  319. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/file-cp.mdx +0 -18
  320. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/filesink.mdx +0 -54
  321. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/response.mdx +0 -19
  322. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/stdout.mdx +0 -23
  323. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/stream.mdx +0 -19
  324. package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/unlink.mdx +0 -18
  325. package/connectors/connect-yousign/node_modules/bun-types/docs/index.mdx +0 -133
  326. package/connectors/connect-yousign/node_modules/bun-types/docs/installation.mdx +0 -372
  327. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/bunx.mdx +0 -91
  328. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/catalogs.mdx +0 -292
  329. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/add.mdx +0 -179
  330. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/audit.mdx +0 -60
  331. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/info.mdx +0 -70
  332. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/install.mdx +0 -591
  333. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/link.mdx +0 -61
  334. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/outdated.mdx +0 -197
  335. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/patch.mdx +0 -69
  336. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/pm.mdx +0 -323
  337. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/publish.mdx +0 -131
  338. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/remove.mdx +0 -16
  339. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/update.mdx +0 -140
  340. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/why.mdx +0 -84
  341. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/filter.mdx +0 -127
  342. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/global-cache.mdx +0 -72
  343. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/isolated-installs.mdx +0 -220
  344. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/lifecycle.mdx +0 -64
  345. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/lockfile.mdx +0 -64
  346. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/npmrc.mdx +0 -245
  347. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/overrides.mdx +0 -83
  348. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/scopes-registries.mdx +0 -35
  349. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/security-scanner-api.mdx +0 -95
  350. package/connectors/connect-yousign/node_modules/bun-types/docs/pm/workspaces.mdx +0 -115
  351. package/connectors/connect-yousign/node_modules/bun-types/docs/project/benchmarking.mdx +0 -296
  352. package/connectors/connect-yousign/node_modules/bun-types/docs/project/bindgen.mdx +0 -223
  353. package/connectors/connect-yousign/node_modules/bun-types/docs/project/building-windows.mdx +0 -143
  354. package/connectors/connect-yousign/node_modules/bun-types/docs/project/contributing.mdx +0 -366
  355. package/connectors/connect-yousign/node_modules/bun-types/docs/project/feedback.mdx +0 -20
  356. package/connectors/connect-yousign/node_modules/bun-types/docs/project/license.mdx +0 -78
  357. package/connectors/connect-yousign/node_modules/bun-types/docs/project/roadmap.mdx +0 -8
  358. package/connectors/connect-yousign/node_modules/bun-types/docs/quickstart.mdx +0 -251
  359. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/archive.mdx +0 -452
  360. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/auto-install.mdx +0 -97
  361. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/binary-data.mdx +0 -846
  362. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/bun-apis.mdx +0 -59
  363. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/bunfig.mdx +0 -754
  364. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/c-compiler.mdx +0 -204
  365. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/child-process.mdx +0 -659
  366. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/color.mdx +0 -267
  367. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/console.mdx +0 -67
  368. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/cookies.mdx +0 -454
  369. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/debugger.mdx +0 -335
  370. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/environment-variables.mdx +0 -231
  371. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/ffi.mdx +0 -567
  372. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/file-io.mdx +0 -306
  373. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/file-system-router.mdx +0 -118
  374. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/file-types.mdx +0 -482
  375. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/glob.mdx +0 -181
  376. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/globals.mdx +0 -72
  377. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/hashing.mdx +0 -315
  378. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/html-rewriter.mdx +0 -333
  379. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/cookies.mdx +0 -79
  380. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/error-handling.mdx +0 -40
  381. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/metrics.mdx +0 -36
  382. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/routing.mdx +0 -289
  383. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/server.mdx +0 -645
  384. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/tls.mdx +0 -101
  385. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/websockets.mdx +0 -414
  386. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/index.mdx +0 -223
  387. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/json5.mdx +0 -271
  388. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/jsonl.mdx +0 -188
  389. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/jsx.mdx +0 -115
  390. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/markdown.mdx +0 -344
  391. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/module-resolution.mdx +0 -374
  392. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/networking/dns.mdx +0 -111
  393. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/networking/fetch.mdx +0 -484
  394. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/networking/tcp.mdx +0 -239
  395. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/networking/udp.mdx +0 -180
  396. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/node-api.mdx +0 -19
  397. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/nodejs-compat.mdx +0 -468
  398. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/plugins.mdx +0 -419
  399. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/redis.mdx +0 -583
  400. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/repl.mdx +0 -176
  401. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/s3.mdx +0 -881
  402. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/secrets.mdx +0 -340
  403. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/semver.mdx +0 -57
  404. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/shell.mdx +0 -637
  405. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/sql.mdx +0 -1404
  406. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/sqlite.mdx +0 -721
  407. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/streams.mdx +0 -232
  408. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/templating/create.mdx +0 -269
  409. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/templating/init.mdx +0 -58
  410. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/transpiler.mdx +0 -288
  411. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/typescript.mdx +0 -58
  412. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/utils.mdx +0 -1010
  413. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/watch-mode.mdx +0 -161
  414. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/web-apis.mdx +0 -29
  415. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/workers.mdx +0 -314
  416. package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/yaml.mdx +0 -469
  417. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/add.mdx +0 -166
  418. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/build.mdx +0 -197
  419. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/bunx.mdx +0 -49
  420. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/feedback.mdx +0 -17
  421. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/init.mdx +0 -84
  422. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/install.mdx +0 -173
  423. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/link.mdx +0 -163
  424. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/outdated.mdx +0 -140
  425. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/patch.mdx +0 -171
  426. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/publish.mdx +0 -198
  427. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/remove.mdx +0 -146
  428. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/run.mdx +0 -305
  429. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/test.mdx +0 -105
  430. package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/update.mdx +0 -144
  431. package/connectors/connect-yousign/node_modules/bun-types/docs/test/code-coverage.mdx +0 -409
  432. package/connectors/connect-yousign/node_modules/bun-types/docs/test/configuration.mdx +0 -520
  433. package/connectors/connect-yousign/node_modules/bun-types/docs/test/dates-times.mdx +0 -129
  434. package/connectors/connect-yousign/node_modules/bun-types/docs/test/discovery.mdx +0 -90
  435. package/connectors/connect-yousign/node_modules/bun-types/docs/test/dom.mdx +0 -226
  436. package/connectors/connect-yousign/node_modules/bun-types/docs/test/index.mdx +0 -409
  437. package/connectors/connect-yousign/node_modules/bun-types/docs/test/lifecycle.mdx +0 -366
  438. package/connectors/connect-yousign/node_modules/bun-types/docs/test/mocks.mdx +0 -637
  439. package/connectors/connect-yousign/node_modules/bun-types/docs/test/reporters.mdx +0 -126
  440. package/connectors/connect-yousign/node_modules/bun-types/docs/test/runtime-behavior.mdx +0 -342
  441. package/connectors/connect-yousign/node_modules/bun-types/docs/test/snapshots.mdx +0 -434
  442. package/connectors/connect-yousign/node_modules/bun-types/docs/test/writing-tests.mdx +0 -672
  443. package/connectors/connect-yousign/node_modules/bun-types/docs/typescript.mdx +0 -54
  444. package/connectors/connect-yousign/node_modules/bun-types/extensions.d.ts +0 -40
  445. package/connectors/connect-yousign/node_modules/bun-types/fetch.d.ts +0 -79
  446. package/connectors/connect-yousign/node_modules/bun-types/ffi.d.ts +0 -1154
  447. package/connectors/connect-yousign/node_modules/bun-types/globals.d.ts +0 -2067
  448. package/connectors/connect-yousign/node_modules/bun-types/html-rewriter.d.ts +0 -186
  449. package/connectors/connect-yousign/node_modules/bun-types/index.d.ts +0 -32
  450. package/connectors/connect-yousign/node_modules/bun-types/jsc.d.ts +0 -233
  451. package/connectors/connect-yousign/node_modules/bun-types/jsx.d.ts +0 -11
  452. package/connectors/connect-yousign/node_modules/bun-types/overrides.d.ts +0 -376
  453. package/connectors/connect-yousign/node_modules/bun-types/package.json +0 -37
  454. package/connectors/connect-yousign/node_modules/bun-types/redis.d.ts +0 -3352
  455. package/connectors/connect-yousign/node_modules/bun-types/s3.d.ts +0 -1335
  456. package/connectors/connect-yousign/node_modules/bun-types/security.d.ts +0 -101
  457. package/connectors/connect-yousign/node_modules/bun-types/serve.d.ts +0 -1296
  458. package/connectors/connect-yousign/node_modules/bun-types/shell.d.ts +0 -380
  459. package/connectors/connect-yousign/node_modules/bun-types/sql.d.ts +0 -887
  460. package/connectors/connect-yousign/node_modules/bun-types/sqlite.d.ts +0 -1322
  461. package/connectors/connect-yousign/node_modules/bun-types/test-globals.d.ts +0 -22
  462. package/connectors/connect-yousign/node_modules/bun-types/test.d.ts +0 -2392
  463. package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/branding.d.ts +0 -283
  464. package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/index.d.ts +0 -1207
  465. package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/messages.d.ts +0 -395
  466. package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/overloads.d.ts +0 -669
  467. package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/utils.d.ts +0 -431
  468. package/connectors/connect-yousign/node_modules/bun-types/wasm.d.ts +0 -193
  469. package/connectors/connect-yousign/node_modules/chalk/license +0 -9
  470. package/connectors/connect-yousign/node_modules/chalk/package.json +0 -83
  471. package/connectors/connect-yousign/node_modules/chalk/readme.md +0 -297
  472. package/connectors/connect-yousign/node_modules/chalk/source/index.d.ts +0 -325
  473. package/connectors/connect-yousign/node_modules/chalk/source/index.js +0 -225
  474. package/connectors/connect-yousign/node_modules/chalk/source/utilities.js +0 -33
  475. package/connectors/connect-yousign/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
  476. package/connectors/connect-yousign/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
  477. package/connectors/connect-yousign/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
  478. package/connectors/connect-yousign/node_modules/chalk/source/vendor/supports-color/browser.js +0 -34
  479. package/connectors/connect-yousign/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
  480. package/connectors/connect-yousign/node_modules/chalk/source/vendor/supports-color/index.js +0 -190
  481. package/connectors/connect-yousign/node_modules/commander/LICENSE +0 -22
  482. package/connectors/connect-yousign/node_modules/commander/Readme.md +0 -1157
  483. package/connectors/connect-yousign/node_modules/commander/esm.mjs +0 -16
  484. package/connectors/connect-yousign/node_modules/commander/index.js +0 -24
  485. package/connectors/connect-yousign/node_modules/commander/lib/argument.js +0 -149
  486. package/connectors/connect-yousign/node_modules/commander/lib/command.js +0 -2509
  487. package/connectors/connect-yousign/node_modules/commander/lib/error.js +0 -39
  488. package/connectors/connect-yousign/node_modules/commander/lib/help.js +0 -520
  489. package/connectors/connect-yousign/node_modules/commander/lib/option.js +0 -330
  490. package/connectors/connect-yousign/node_modules/commander/lib/suggestSimilar.js +0 -101
  491. package/connectors/connect-yousign/node_modules/commander/package-support.json +0 -16
  492. package/connectors/connect-yousign/node_modules/commander/package.json +0 -84
  493. package/connectors/connect-yousign/node_modules/commander/typings/esm.d.mts +0 -3
  494. package/connectors/connect-yousign/node_modules/commander/typings/index.d.ts +0 -969
  495. package/connectors/connect-yousign/node_modules/typescript/LICENSE.txt +0 -55
  496. package/connectors/connect-yousign/node_modules/typescript/README.md +0 -50
  497. package/connectors/connect-yousign/node_modules/typescript/SECURITY.md +0 -41
  498. package/connectors/connect-yousign/node_modules/typescript/ThirdPartyNoticeText.txt +0 -193
  499. package/connectors/connect-yousign/node_modules/typescript/bin/tsc +0 -2
  500. package/connectors/connect-yousign/node_modules/typescript/bin/tsserver +0 -2
  501. package/connectors/connect-yousign/node_modules/typescript/lib/_tsc.js +0 -133818
  502. package/connectors/connect-yousign/node_modules/typescript/lib/_tsserver.js +0 -659
  503. package/connectors/connect-yousign/node_modules/typescript/lib/_typingsInstaller.js +0 -222
  504. package/connectors/connect-yousign/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
  505. package/connectors/connect-yousign/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
  506. package/connectors/connect-yousign/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
  507. package/connectors/connect-yousign/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
  508. package/connectors/connect-yousign/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
  509. package/connectors/connect-yousign/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
  510. package/connectors/connect-yousign/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
  511. package/connectors/connect-yousign/node_modules/typescript/lib/lib.d.ts +0 -22
  512. package/connectors/connect-yousign/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
  513. package/connectors/connect-yousign/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
  514. package/connectors/connect-yousign/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
  515. package/connectors/connect-yousign/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
  516. package/connectors/connect-yousign/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
  517. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
  518. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
  519. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
  520. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
  521. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
  522. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
  523. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
  524. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
  525. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
  526. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
  527. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
  528. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
  529. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
  530. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
  531. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
  532. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
  533. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
  534. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
  535. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
  536. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
  537. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
  538. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
  539. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
  540. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
  541. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
  542. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
  543. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
  544. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
  545. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
  546. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
  547. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
  548. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
  549. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
  550. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
  551. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
  552. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
  553. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
  554. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
  555. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
  556. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
  557. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
  558. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
  559. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
  560. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
  561. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
  562. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
  563. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
  564. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
  565. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
  566. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
  567. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
  568. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
  569. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
  570. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
  571. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
  572. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
  573. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
  574. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
  575. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
  576. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
  577. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
  578. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
  579. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
  580. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
  581. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
  582. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
  583. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
  584. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
  585. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
  586. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
  587. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
  588. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
  589. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
  590. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
  591. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
  592. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
  593. package/connectors/connect-yousign/node_modules/typescript/lib/lib.es6.d.ts +0 -23
  594. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
  595. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
  596. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
  597. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
  598. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
  599. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
  600. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -445
  601. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
  602. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
  603. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
  604. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
  605. package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
  606. package/connectors/connect-yousign/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
  607. package/connectors/connect-yousign/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
  608. package/connectors/connect-yousign/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
  609. package/connectors/connect-yousign/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
  610. package/connectors/connect-yousign/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
  611. package/connectors/connect-yousign/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
  612. package/connectors/connect-yousign/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
  613. package/connectors/connect-yousign/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
  614. package/connectors/connect-yousign/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
  615. package/connectors/connect-yousign/node_modules/typescript/lib/tsc.js +0 -8
  616. package/connectors/connect-yousign/node_modules/typescript/lib/tsserver.js +0 -8
  617. package/connectors/connect-yousign/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -17
  618. package/connectors/connect-yousign/node_modules/typescript/lib/tsserverlibrary.js +0 -21
  619. package/connectors/connect-yousign/node_modules/typescript/lib/typesMap.json +0 -497
  620. package/connectors/connect-yousign/node_modules/typescript/lib/typescript.d.ts +0 -11437
  621. package/connectors/connect-yousign/node_modules/typescript/lib/typescript.js +0 -200276
  622. package/connectors/connect-yousign/node_modules/typescript/lib/typingsInstaller.js +0 -8
  623. package/connectors/connect-yousign/node_modules/typescript/lib/watchGuard.js +0 -53
  624. package/connectors/connect-yousign/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -2122
  625. package/connectors/connect-yousign/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -2122
  626. package/connectors/connect-yousign/node_modules/typescript/package.json +0 -120
  627. package/connectors/connect-yousign/node_modules/undici-types/LICENSE +0 -21
  628. package/connectors/connect-yousign/node_modules/undici-types/README.md +0 -6
  629. package/connectors/connect-yousign/node_modules/undici-types/agent.d.ts +0 -32
  630. package/connectors/connect-yousign/node_modules/undici-types/api.d.ts +0 -43
  631. package/connectors/connect-yousign/node_modules/undici-types/balanced-pool.d.ts +0 -30
  632. package/connectors/connect-yousign/node_modules/undici-types/cache-interceptor.d.ts +0 -173
  633. package/connectors/connect-yousign/node_modules/undici-types/cache.d.ts +0 -36
  634. package/connectors/connect-yousign/node_modules/undici-types/client-stats.d.ts +0 -15
  635. package/connectors/connect-yousign/node_modules/undici-types/client.d.ts +0 -108
  636. package/connectors/connect-yousign/node_modules/undici-types/connector.d.ts +0 -34
  637. package/connectors/connect-yousign/node_modules/undici-types/content-type.d.ts +0 -21
  638. package/connectors/connect-yousign/node_modules/undici-types/cookies.d.ts +0 -30
  639. package/connectors/connect-yousign/node_modules/undici-types/diagnostics-channel.d.ts +0 -74
  640. package/connectors/connect-yousign/node_modules/undici-types/dispatcher.d.ts +0 -276
  641. package/connectors/connect-yousign/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -22
  642. package/connectors/connect-yousign/node_modules/undici-types/errors.d.ts +0 -161
  643. package/connectors/connect-yousign/node_modules/undici-types/eventsource.d.ts +0 -66
  644. package/connectors/connect-yousign/node_modules/undici-types/fetch.d.ts +0 -211
  645. package/connectors/connect-yousign/node_modules/undici-types/formdata.d.ts +0 -108
  646. package/connectors/connect-yousign/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  647. package/connectors/connect-yousign/node_modules/undici-types/global-origin.d.ts +0 -7
  648. package/connectors/connect-yousign/node_modules/undici-types/h2c-client.d.ts +0 -73
  649. package/connectors/connect-yousign/node_modules/undici-types/handlers.d.ts +0 -15
  650. package/connectors/connect-yousign/node_modules/undici-types/header.d.ts +0 -160
  651. package/connectors/connect-yousign/node_modules/undici-types/index.d.ts +0 -88
  652. package/connectors/connect-yousign/node_modules/undici-types/interceptors.d.ts +0 -73
  653. package/connectors/connect-yousign/node_modules/undici-types/mock-agent.d.ts +0 -68
  654. package/connectors/connect-yousign/node_modules/undici-types/mock-call-history.d.ts +0 -111
  655. package/connectors/connect-yousign/node_modules/undici-types/mock-client.d.ts +0 -27
  656. package/connectors/connect-yousign/node_modules/undici-types/mock-errors.d.ts +0 -12
  657. package/connectors/connect-yousign/node_modules/undici-types/mock-interceptor.d.ts +0 -94
  658. package/connectors/connect-yousign/node_modules/undici-types/mock-pool.d.ts +0 -27
  659. package/connectors/connect-yousign/node_modules/undici-types/package.json +0 -55
  660. package/connectors/connect-yousign/node_modules/undici-types/patch.d.ts +0 -29
  661. package/connectors/connect-yousign/node_modules/undici-types/pool-stats.d.ts +0 -19
  662. package/connectors/connect-yousign/node_modules/undici-types/pool.d.ts +0 -41
  663. package/connectors/connect-yousign/node_modules/undici-types/proxy-agent.d.ts +0 -29
  664. package/connectors/connect-yousign/node_modules/undici-types/readable.d.ts +0 -68
  665. package/connectors/connect-yousign/node_modules/undici-types/retry-agent.d.ts +0 -8
  666. package/connectors/connect-yousign/node_modules/undici-types/retry-handler.d.ts +0 -125
  667. package/connectors/connect-yousign/node_modules/undici-types/round-robin-pool.d.ts +0 -41
  668. package/connectors/connect-yousign/node_modules/undici-types/snapshot-agent.d.ts +0 -109
  669. package/connectors/connect-yousign/node_modules/undici-types/util.d.ts +0 -18
  670. package/connectors/connect-yousign/node_modules/undici-types/utility.d.ts +0 -7
  671. package/connectors/connect-yousign/node_modules/undici-types/webidl.d.ts +0 -341
  672. package/connectors/connect-yousign/node_modules/undici-types/websocket.d.ts +0 -186
  673. package/dashboard/dist/assets/index-CSlS3oNV.css +0 -1
  674. package/dashboard/dist/assets/index-sSIkMXYs.js +0 -284
@@ -1,1770 +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-v25.x/api/http.html#class-httpincomingmessage)
6
- * and [`process.stdout`](https://nodejs.org/docs/latest-v25.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-v25.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/v25.x/lib/stream.js)
19
- */
20
- declare module "node:stream" {
21
- import { Blob } from "node:buffer";
22
- import { Abortable, EventEmitter } from "node:events";
23
- import * as promises from "node:stream/promises";
24
- import * as web from "node:stream/web";
25
- class Stream extends EventEmitter {
26
- /**
27
- * @since v0.9.4
28
- */
29
- pipe<T extends NodeJS.WritableStream>(
30
- destination: T,
31
- options?: Stream.PipeOptions,
32
- ): T;
33
- }
34
- namespace Stream {
35
- export { promises, Stream };
36
- }
37
- namespace Stream {
38
- interface PipeOptions {
39
- /**
40
- * End the writer when the reader ends.
41
- * @default true
42
- */
43
- end?: boolean | undefined;
44
- }
45
- interface StreamOptions<T extends Stream> extends Abortable {
46
- emitClose?: boolean | undefined;
47
- highWaterMark?: number | undefined;
48
- objectMode?: boolean | undefined;
49
- construct?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined;
50
- destroy?: ((this: T, error: Error | null, callback: (error?: Error | null) => void) => void) | undefined;
51
- autoDestroy?: boolean | undefined;
52
- }
53
- interface ReadableOptions<T extends Readable = Readable> extends StreamOptions<T> {
54
- encoding?: BufferEncoding | undefined;
55
- read?: ((this: T, size: number) => void) | undefined;
56
- }
57
- interface ReadableIteratorOptions {
58
- /**
59
- * When set to `false`, calling `return` on the async iterator,
60
- * or exiting a `for await...of` iteration using a `break`,
61
- * `return`, or `throw` will not destroy the stream.
62
- * @default true
63
- */
64
- destroyOnReturn?: boolean | undefined;
65
- }
66
- interface ReadableOperatorOptions extends Abortable {
67
- /**
68
- * The maximum concurrent invocations of `fn` to call
69
- * on the stream at once.
70
- * @default 1
71
- */
72
- concurrency?: number | undefined;
73
- /**
74
- * How many items to buffer while waiting for user consumption
75
- * of the output.
76
- * @default concurrency * 2 - 1
77
- */
78
- highWaterMark?: number | undefined;
79
- }
80
- /** @deprecated Use `ReadableOperatorOptions` instead. */
81
- interface ArrayOptions extends ReadableOperatorOptions {}
82
- interface ReadableToWebOptions {
83
- strategy?: web.QueuingStrategy | undefined;
84
- type?: web.ReadableStreamType | undefined;
85
- }
86
- interface ReadableEventMap {
87
- "close": [];
88
- "data": [chunk: any];
89
- "end": [];
90
- "error": [err: Error];
91
- "pause": [];
92
- "readable": [];
93
- "resume": [];
94
- }
95
- /**
96
- * @since v0.9.4
97
- */
98
- class Readable extends Stream implements NodeJS.ReadableStream {
99
- constructor(options?: ReadableOptions);
100
- /**
101
- * A utility method for creating Readable Streams out of iterators.
102
- * @since v12.3.0, v10.17.0
103
- * @param iterable Object implementing the `Symbol.asyncIterator` or `Symbol.iterator` iterable protocol. Emits an 'error' event if a null value is passed.
104
- * @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`.
105
- */
106
- static from(iterable: Iterable<any> | AsyncIterable<any>, options?: ReadableOptions): Readable;
107
- /**
108
- * A utility method for creating a `Readable` from a web `ReadableStream`.
109
- * @since v17.0.0
110
- */
111
- static fromWeb(
112
- readableStream: web.ReadableStream,
113
- options?: Pick<ReadableOptions, "encoding" | "highWaterMark" | "objectMode" | "signal">,
114
- ): Readable;
115
- /**
116
- * A utility method for creating a web `ReadableStream` from a `Readable`.
117
- * @since v17.0.0
118
- */
119
- static toWeb(
120
- streamReadable: NodeJS.ReadableStream,
121
- options?: ReadableToWebOptions,
122
- ): web.ReadableStream;
123
- /**
124
- * Returns whether the stream has been read from or cancelled.
125
- * @since v16.8.0
126
- */
127
- static isDisturbed(stream: NodeJS.ReadableStream | web.ReadableStream): boolean;
128
- /**
129
- * Returns whether the stream was destroyed or errored before emitting `'end'`.
130
- * @since v16.8.0
131
- */
132
- readonly readableAborted: boolean;
133
- /**
134
- * Is `true` if it is safe to call {@link read}, which means
135
- * the stream has not been destroyed or emitted `'error'` or `'end'`.
136
- * @since v11.4.0
137
- */
138
- readable: boolean;
139
- /**
140
- * Returns whether `'data'` has been emitted.
141
- * @since v16.7.0, v14.18.0
142
- */
143
- readonly readableDidRead: boolean;
144
- /**
145
- * Getter for the property `encoding` of a given `Readable` stream. The `encoding` property can be set using the {@link setEncoding} method.
146
- * @since v12.7.0
147
- */
148
- readonly readableEncoding: BufferEncoding | null;
149
- /**
150
- * Becomes `true` when [`'end'`](https://nodejs.org/docs/latest-v25.x/api/stream.html#event-end) event is emitted.
151
- * @since v12.9.0
152
- */
153
- readonly readableEnded: boolean;
154
- /**
155
- * This property reflects the current state of a `Readable` stream as described
156
- * in the [Three states](https://nodejs.org/docs/latest-v25.x/api/stream.html#three-states) section.
157
- * @since v9.4.0
158
- */
159
- readableFlowing: boolean | null;
160
- /**
161
- * Returns the value of `highWaterMark` passed when creating this `Readable`.
162
- * @since v9.3.0
163
- */
164
- readonly readableHighWaterMark: number;
165
- /**
166
- * This property contains the number of bytes (or objects) in the queue
167
- * ready to be read. The value provides introspection data regarding
168
- * the status of the `highWaterMark`.
169
- * @since v9.4.0
170
- */
171
- readonly readableLength: number;
172
- /**
173
- * Getter for the property `objectMode` of a given `Readable` stream.
174
- * @since v12.3.0
175
- */
176
- readonly readableObjectMode: boolean;
177
- /**
178
- * Is `true` after `readable.destroy()` has been called.
179
- * @since v8.0.0
180
- */
181
- destroyed: boolean;
182
- /**
183
- * Is `true` after `'close'` has been emitted.
184
- * @since v18.0.0
185
- */
186
- readonly closed: boolean;
187
- /**
188
- * Returns error if the stream has been destroyed with an error.
189
- * @since v18.0.0
190
- */
191
- readonly errored: Error | null;
192
- _construct?(callback: (error?: Error | null) => void): void;
193
- _read(size: number): void;
194
- /**
195
- * The `readable.read()` method reads data out of the internal buffer and
196
- * returns it. If no data is available to be read, `null` is returned. By default,
197
- * the data is returned as a `Buffer` object unless an encoding has been
198
- * specified using the `readable.setEncoding()` method or the stream is operating
199
- * in object mode.
200
- *
201
- * The optional `size` argument specifies a specific number of bytes to read. If
202
- * `size` bytes are not available to be read, `null` will be returned _unless_ the
203
- * stream has ended, in which case all of the data remaining in the internal buffer
204
- * will be returned.
205
- *
206
- * If the `size` argument is not specified, all of the data contained in the
207
- * internal buffer will be returned.
208
- *
209
- * The `size` argument must be less than or equal to 1 GiB.
210
- *
211
- * The `readable.read()` method should only be called on `Readable` streams
212
- * operating in paused mode. In flowing mode, `readable.read()` is called
213
- * automatically until the internal buffer is fully drained.
214
- *
215
- * ```js
216
- * const readable = getReadableStreamSomehow();
217
- *
218
- * // 'readable' may be triggered multiple times as data is buffered in
219
- * readable.on('readable', () => {
220
- * let chunk;
221
- * console.log('Stream is readable (new data received in buffer)');
222
- * // Use a loop to make sure we read all currently available data
223
- * while (null !== (chunk = readable.read())) {
224
- * console.log(`Read ${chunk.length} bytes of data...`);
225
- * }
226
- * });
227
- *
228
- * // 'end' will be triggered once when there is no more data available
229
- * readable.on('end', () => {
230
- * console.log('Reached end of stream.');
231
- * });
232
- * ```
233
- *
234
- * Each call to `readable.read()` returns a chunk of data, or `null`. The chunks
235
- * are not concatenated. A `while` loop is necessary to consume all data
236
- * currently in the buffer. When reading a large file `.read()` may return `null`,
237
- * having consumed all buffered content so far, but there is still more data to
238
- * come not yet buffered. In this case a new `'readable'` event will be emitted
239
- * when there is more data in the buffer. Finally the `'end'` event will be
240
- * emitted when there is no more data to come.
241
- *
242
- * Therefore to read a file's whole contents from a `readable`, it is necessary
243
- * to collect chunks across multiple `'readable'` events:
244
- *
245
- * ```js
246
- * const chunks = [];
247
- *
248
- * readable.on('readable', () => {
249
- * let chunk;
250
- * while (null !== (chunk = readable.read())) {
251
- * chunks.push(chunk);
252
- * }
253
- * });
254
- *
255
- * readable.on('end', () => {
256
- * const content = chunks.join('');
257
- * });
258
- * ```
259
- *
260
- * A `Readable` stream in object mode will always return a single item from
261
- * a call to `readable.read(size)`, regardless of the value of the `size` argument.
262
- *
263
- * If the `readable.read()` method returns a chunk of data, a `'data'` event will
264
- * also be emitted.
265
- *
266
- * Calling {@link read} after the `'end'` event has
267
- * been emitted will return `null`. No runtime error will be raised.
268
- * @since v0.9.4
269
- * @param size Optional argument to specify how much data to read.
270
- */
271
- read(size?: number): any;
272
- /**
273
- * The `readable.setEncoding()` method sets the character encoding for
274
- * data read from the `Readable` stream.
275
- *
276
- * By default, no encoding is assigned and stream data will be returned as `Buffer` objects. Setting an encoding causes the stream data
277
- * to be returned as strings of the specified encoding rather than as `Buffer` objects. For instance, calling `readable.setEncoding('utf8')` will cause the
278
- * 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
279
- * string format.
280
- *
281
- * The `Readable` stream will properly handle multi-byte characters delivered
282
- * through the stream that would otherwise become improperly decoded if simply
283
- * pulled from the stream as `Buffer` objects.
284
- *
285
- * ```js
286
- * const readable = getReadableStreamSomehow();
287
- * readable.setEncoding('utf8');
288
- * readable.on('data', (chunk) => {
289
- * assert.equal(typeof chunk, 'string');
290
- * console.log('Got %d characters of string data:', chunk.length);
291
- * });
292
- * ```
293
- * @since v0.9.4
294
- * @param encoding The encoding to use.
295
- */
296
- setEncoding(encoding: BufferEncoding): this;
297
- /**
298
- * The `readable.pause()` method will cause a stream in flowing mode to stop
299
- * emitting `'data'` events, switching out of flowing mode. Any data that
300
- * becomes available will remain in the internal buffer.
301
- *
302
- * ```js
303
- * const readable = getReadableStreamSomehow();
304
- * readable.on('data', (chunk) => {
305
- * console.log(`Received ${chunk.length} bytes of data.`);
306
- * readable.pause();
307
- * console.log('There will be no additional data for 1 second.');
308
- * setTimeout(() => {
309
- * console.log('Now data will start flowing again.');
310
- * readable.resume();
311
- * }, 1000);
312
- * });
313
- * ```
314
- *
315
- * The `readable.pause()` method has no effect if there is a `'readable'` event listener.
316
- * @since v0.9.4
317
- */
318
- pause(): this;
319
- /**
320
- * The `readable.resume()` method causes an explicitly paused `Readable` stream to
321
- * resume emitting `'data'` events, switching the stream into flowing mode.
322
- *
323
- * The `readable.resume()` method can be used to fully consume the data from a
324
- * stream without actually processing any of that data:
325
- *
326
- * ```js
327
- * getReadableStreamSomehow()
328
- * .resume()
329
- * .on('end', () => {
330
- * console.log('Reached the end, but did not read anything.');
331
- * });
332
- * ```
333
- *
334
- * The `readable.resume()` method has no effect if there is a `'readable'` event listener.
335
- * @since v0.9.4
336
- */
337
- resume(): this;
338
- /**
339
- * The `readable.isPaused()` method returns the current operating state of the `Readable`.
340
- * This is used primarily by the mechanism that underlies the `readable.pipe()` method.
341
- * In most typical cases, there will be no reason to use this method directly.
342
- *
343
- * ```js
344
- * const readable = new stream.Readable();
345
- *
346
- * readable.isPaused(); // === false
347
- * readable.pause();
348
- * readable.isPaused(); // === true
349
- * readable.resume();
350
- * readable.isPaused(); // === false
351
- * ```
352
- * @since v0.11.14
353
- */
354
- isPaused(): boolean;
355
- /**
356
- * The `readable.unpipe()` method detaches a `Writable` stream previously attached
357
- * using the {@link pipe} method.
358
- *
359
- * If the `destination` is not specified, then _all_ pipes are detached.
360
- *
361
- * If the `destination` is specified, but no pipe is set up for it, then
362
- * the method does nothing.
363
- *
364
- * ```js
365
- * import fs from 'node:fs';
366
- * const readable = getReadableStreamSomehow();
367
- * const writable = fs.createWriteStream('file.txt');
368
- * // All the data from readable goes into 'file.txt',
369
- * // but only for the first second.
370
- * readable.pipe(writable);
371
- * setTimeout(() => {
372
- * console.log('Stop writing to file.txt.');
373
- * readable.unpipe(writable);
374
- * console.log('Manually close the file stream.');
375
- * writable.end();
376
- * }, 1000);
377
- * ```
378
- * @since v0.9.4
379
- * @param destination Optional specific stream to unpipe
380
- */
381
- unpipe(destination?: NodeJS.WritableStream): this;
382
- /**
383
- * Passing `chunk` as `null` signals the end of the stream (EOF) and behaves the
384
- * same as `readable.push(null)`, after which no more data can be written. The EOF
385
- * signal is put at the end of the buffer and any buffered data will still be
386
- * flushed.
387
- *
388
- * The `readable.unshift()` method pushes a chunk of data back into the internal
389
- * buffer. This is useful in certain situations where a stream is being consumed by
390
- * code that needs to "un-consume" some amount of data that it has optimistically
391
- * pulled out of the source, so that the data can be passed on to some other party.
392
- *
393
- * The `stream.unshift(chunk)` method cannot be called after the `'end'` event
394
- * has been emitted or a runtime error will be thrown.
395
- *
396
- * Developers using `stream.unshift()` often should consider switching to
397
- * use of a `Transform` stream instead. See the `API for stream implementers` section for more information.
398
- *
399
- * ```js
400
- * // Pull off a header delimited by \n\n.
401
- * // Use unshift() if we get too much.
402
- * // Call the callback with (error, header, stream).
403
- * import { StringDecoder } from 'node:string_decoder';
404
- * function parseHeader(stream, callback) {
405
- * stream.on('error', callback);
406
- * stream.on('readable', onReadable);
407
- * const decoder = new StringDecoder('utf8');
408
- * let header = '';
409
- * function onReadable() {
410
- * let chunk;
411
- * while (null !== (chunk = stream.read())) {
412
- * const str = decoder.write(chunk);
413
- * if (str.includes('\n\n')) {
414
- * // Found the header boundary.
415
- * const split = str.split(/\n\n/);
416
- * header += split.shift();
417
- * const remaining = split.join('\n\n');
418
- * const buf = Buffer.from(remaining, 'utf8');
419
- * stream.removeListener('error', callback);
420
- * // Remove the 'readable' listener before unshifting.
421
- * stream.removeListener('readable', onReadable);
422
- * if (buf.length)
423
- * stream.unshift(buf);
424
- * // Now the body of the message can be read from the stream.
425
- * callback(null, header, stream);
426
- * return;
427
- * }
428
- * // Still reading the header.
429
- * header += str;
430
- * }
431
- * }
432
- * }
433
- * ```
434
- *
435
- * Unlike {@link push}, `stream.unshift(chunk)` will not
436
- * end the reading process by resetting the internal reading state of the stream.
437
- * This can cause unexpected results if `readable.unshift()` is called during a
438
- * read (i.e. from within a {@link _read} implementation on a
439
- * custom stream). Following the call to `readable.unshift()` with an immediate {@link push} will reset the reading state appropriately,
440
- * however it is best to simply avoid calling `readable.unshift()` while in the
441
- * process of performing a read.
442
- * @since v0.9.11
443
- * @param chunk Chunk of data to unshift onto the read queue. For streams not operating in object mode, `chunk` must
444
- * be a {string}, {Buffer}, {TypedArray}, {DataView} or `null`. For object mode streams, `chunk` may be any JavaScript value.
445
- * @param encoding Encoding of string chunks. Must be a valid `Buffer` encoding, such as `'utf8'` or `'ascii'`.
446
- */
447
- unshift(chunk: any, encoding?: BufferEncoding): void;
448
- /**
449
- * 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
450
- * information.)
451
- *
452
- * 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`
453
- * stream that uses
454
- * the old stream as its data source.
455
- *
456
- * It will rarely be necessary to use `readable.wrap()` but the method has been
457
- * provided as a convenience for interacting with older Node.js applications and
458
- * libraries.
459
- *
460
- * ```js
461
- * import { OldReader } from './old-api-module.js';
462
- * import { Readable } from 'node:stream';
463
- * const oreader = new OldReader();
464
- * const myReader = new Readable().wrap(oreader);
465
- *
466
- * myReader.on('readable', () => {
467
- * myReader.read(); // etc.
468
- * });
469
- * ```
470
- * @since v0.9.4
471
- * @param stream An "old style" readable stream
472
- */
473
- wrap(stream: NodeJS.ReadableStream): this;
474
- push(chunk: any, encoding?: BufferEncoding): boolean;
475
- /**
476
- * ```js
477
- * import { Readable } from 'node:stream';
478
- *
479
- * async function* splitToWords(source) {
480
- * for await (const chunk of source) {
481
- * const words = String(chunk).split(' ');
482
- *
483
- * for (const word of words) {
484
- * yield word;
485
- * }
486
- * }
487
- * }
488
- *
489
- * const wordsStream = Readable.from(['text passed through', 'composed stream']).compose(splitToWords);
490
- * const words = await wordsStream.toArray();
491
- *
492
- * console.log(words); // prints ['text', 'passed', 'through', 'composed', 'stream']
493
- * ```
494
- *
495
- * `readable.compose(s)` is equivalent to `stream.compose(readable, s)`.
496
- *
497
- * This method also allows for an `AbortSignal` to be provided, which will destroy
498
- * the composed stream when aborted.
499
- *
500
- * See [`stream.compose(...streams)`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamcomposestreams) for more information.
501
- * @since v19.1.0, v18.13.0
502
- * @returns a stream composed with the stream `stream`.
503
- */
504
- compose(
505
- stream: NodeJS.WritableStream | web.WritableStream | web.TransformStream | ((source: any) => void),
506
- options?: Abortable,
507
- ): Duplex;
508
- /**
509
- * The iterator created by this method gives users the option to cancel the destruction
510
- * of the stream if the `for await...of` loop is exited by `return`, `break`, or `throw`,
511
- * or if the iterator should destroy the stream if the stream emitted an error during iteration.
512
- * @since v16.3.0
513
- */
514
- iterator(options?: ReadableIteratorOptions): NodeJS.AsyncIterator<any>;
515
- /**
516
- * This method allows mapping over the stream. The *fn* function will be called for every chunk in the stream.
517
- * If the *fn* function returns a promise - that promise will be `await`ed before being passed to the result stream.
518
- * @since v17.4.0, v16.14.0
519
- * @param fn a function to map over every chunk in the stream. Async or not.
520
- * @returns a stream mapped with the function *fn*.
521
- */
522
- map(fn: (data: any, options?: Abortable) => any, options?: ReadableOperatorOptions): Readable;
523
- /**
524
- * This method allows filtering the stream. For each chunk in the stream the *fn* function will be called
525
- * and if it returns a truthy value, the chunk will be passed to the result stream.
526
- * If the *fn* function returns a promise - that promise will be `await`ed.
527
- * @since v17.4.0, v16.14.0
528
- * @param fn a function to filter chunks from the stream. Async or not.
529
- * @returns a stream filtered with the predicate *fn*.
530
- */
531
- filter(
532
- fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,
533
- options?: ReadableOperatorOptions,
534
- ): Readable;
535
- /**
536
- * This method allows iterating a stream. For each chunk in the stream the *fn* function will be called.
537
- * If the *fn* function returns a promise - that promise will be `await`ed.
538
- *
539
- * This method is different from `for await...of` loops in that it can optionally process chunks concurrently.
540
- * In addition, a `forEach` iteration can only be stopped by having passed a `signal` option
541
- * and aborting the related AbortController while `for await...of` can be stopped with `break` or `return`.
542
- * In either case the stream will be destroyed.
543
- *
544
- * This method is different from listening to the `'data'` event in that it uses the `readable` event
545
- * in the underlying machinary and can limit the number of concurrent *fn* calls.
546
- * @since v17.5.0
547
- * @param fn a function to call on each chunk of the stream. Async or not.
548
- * @returns a promise for when the stream has finished.
549
- */
550
- forEach(
551
- fn: (data: any, options?: Abortable) => void | Promise<void>,
552
- options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
553
- ): Promise<void>;
554
- /**
555
- * This method allows easily obtaining the contents of a stream.
556
- *
557
- * As this method reads the entire stream into memory, it negates the benefits of streams. It's intended
558
- * for interoperability and convenience, not as the primary way to consume streams.
559
- * @since v17.5.0
560
- * @returns a promise containing an array with the contents of the stream.
561
- */
562
- toArray(options?: Abortable): Promise<any[]>;
563
- /**
564
- * This method is similar to `Array.prototype.some` and calls *fn* on each chunk in the stream
565
- * until the awaited return value is `true` (or any truthy value). Once an *fn* call on a chunk
566
- * `await`ed return value is truthy, the stream is destroyed and the promise is fulfilled with `true`.
567
- * If none of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `false`.
568
- * @since v17.5.0
569
- * @param fn a function to call on each chunk of the stream. Async or not.
570
- * @returns a promise evaluating to `true` if *fn* returned a truthy value for at least one of the chunks.
571
- */
572
- some(
573
- fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,
574
- options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
575
- ): Promise<boolean>;
576
- /**
577
- * This method is similar to `Array.prototype.find` and calls *fn* on each chunk in the stream
578
- * to find a chunk with a truthy value for *fn*. Once an *fn* call's awaited return value is truthy,
579
- * the stream is destroyed and the promise is fulfilled with value for which *fn* returned a truthy value.
580
- * If all of the *fn* calls on the chunks return a falsy value, the promise is fulfilled with `undefined`.
581
- * @since v17.5.0
582
- * @param fn a function to call on each chunk of the stream. Async or not.
583
- * @returns a promise evaluating to the first chunk for which *fn* evaluated with a truthy value,
584
- * or `undefined` if no element was found.
585
- */
586
- find<T>(
587
- fn: (data: any, options?: Abortable) => data is T,
588
- options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
589
- ): Promise<T | undefined>;
590
- find(
591
- fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,
592
- options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
593
- ): Promise<any>;
594
- /**
595
- * This method is similar to `Array.prototype.every` and calls *fn* on each chunk in the stream
596
- * to check if all awaited return values are truthy value for *fn*. Once an *fn* call on a chunk
597
- * `await`ed return value is falsy, the stream is destroyed and the promise is fulfilled with `false`.
598
- * If all of the *fn* calls on the chunks return a truthy value, the promise is fulfilled with `true`.
599
- * @since v17.5.0
600
- * @param fn a function to call on each chunk of the stream. Async or not.
601
- * @returns a promise evaluating to `true` if *fn* returned a truthy value for every one of the chunks.
602
- */
603
- every(
604
- fn: (data: any, options?: Abortable) => boolean | Promise<boolean>,
605
- options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
606
- ): Promise<boolean>;
607
- /**
608
- * This method returns a new stream by applying the given callback to each chunk of the stream
609
- * and then flattening the result.
610
- *
611
- * It is possible to return a stream or another iterable or async iterable from *fn* and the result streams
612
- * will be merged (flattened) into the returned stream.
613
- * @since v17.5.0
614
- * @param fn a function to map over every chunk in the stream. May be async. May be a stream or generator.
615
- * @returns a stream flat-mapped with the function *fn*.
616
- */
617
- flatMap(
618
- fn: (data: any, options?: Abortable) => any,
619
- options?: Pick<ReadableOperatorOptions, "concurrency" | "signal">,
620
- ): Readable;
621
- /**
622
- * This method returns a new stream with the first *limit* chunks dropped from the start.
623
- * @since v17.5.0
624
- * @param limit the number of chunks to drop from the readable.
625
- * @returns a stream with *limit* chunks dropped from the start.
626
- */
627
- drop(limit: number, options?: Abortable): Readable;
628
- /**
629
- * This method returns a new stream with the first *limit* chunks.
630
- * @since v17.5.0
631
- * @param limit the number of chunks to take from the readable.
632
- * @returns a stream with *limit* chunks taken.
633
- */
634
- take(limit: number, options?: Abortable): Readable;
635
- /**
636
- * This method calls *fn* on each chunk of the stream in order, passing it the result from the calculation
637
- * on the previous element. It returns a promise for the final value of the reduction.
638
- *
639
- * If no *initial* value is supplied the first chunk of the stream is used as the initial value.
640
- * If the stream is empty, the promise is rejected with a `TypeError` with the `ERR_INVALID_ARGS` code property.
641
- *
642
- * The reducer function iterates the stream element-by-element which means that there is no *concurrency* parameter
643
- * or parallelism. To perform a reduce concurrently, you can extract the async function to `readable.map` method.
644
- * @since v17.5.0
645
- * @param fn a reducer function to call over every chunk in the stream. Async or not.
646
- * @param initial the initial value to use in the reduction.
647
- * @returns a promise for the final value of the reduction.
648
- */
649
- reduce<T>(fn: (previous: any, data: any, options?: Abortable) => T): Promise<T>;
650
- reduce<T>(
651
- fn: (previous: T, data: any, options?: Abortable) => T,
652
- initial: T,
653
- options?: Abortable,
654
- ): Promise<T>;
655
- _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
656
- /**
657
- * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the readable
658
- * stream will release any internal resources and subsequent calls to `push()` will be ignored.
659
- *
660
- * Once `destroy()` has been called any further calls will be a no-op and no
661
- * further errors except from `_destroy()` may be emitted as `'error'`.
662
- *
663
- * Implementors should not override this method, but instead implement `readable._destroy()`.
664
- * @since v8.0.0
665
- * @param error Error which will be passed as payload in `'error'` event
666
- */
667
- destroy(error?: Error): this;
668
- /**
669
- * @returns `AsyncIterator` to fully consume the stream.
670
- * @since v10.0.0
671
- */
672
- [Symbol.asyncIterator](): NodeJS.AsyncIterator<any>;
673
- /**
674
- * Calls `readable.destroy()` with an `AbortError` and returns
675
- * a promise that fulfills when the stream is finished.
676
- * @since v20.4.0
677
- */
678
- [Symbol.asyncDispose](): Promise<void>;
679
- // #region InternalEventEmitter
680
- addListener<E extends keyof ReadableEventMap>(
681
- eventName: E,
682
- listener: (...args: ReadableEventMap[E]) => void,
683
- ): this;
684
- addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
685
- emit<E extends keyof ReadableEventMap>(eventName: E, ...args: ReadableEventMap[E]): boolean;
686
- emit(eventName: string | symbol, ...args: any[]): boolean;
687
- listenerCount<E extends keyof ReadableEventMap>(
688
- eventName: E,
689
- listener?: (...args: ReadableEventMap[E]) => void,
690
- ): number;
691
- listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
692
- listeners<E extends keyof ReadableEventMap>(eventName: E): ((...args: ReadableEventMap[E]) => void)[];
693
- listeners(eventName: string | symbol): ((...args: any[]) => void)[];
694
- off<E extends keyof ReadableEventMap>(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this;
695
- off(eventName: string | symbol, listener: (...args: any[]) => void): this;
696
- on<E extends keyof ReadableEventMap>(eventName: E, listener: (...args: ReadableEventMap[E]) => void): this;
697
- on(eventName: string | symbol, listener: (...args: any[]) => void): this;
698
- once<E extends keyof ReadableEventMap>(
699
- eventName: E,
700
- listener: (...args: ReadableEventMap[E]) => void,
701
- ): this;
702
- once(eventName: string | symbol, listener: (...args: any[]) => void): this;
703
- prependListener<E extends keyof ReadableEventMap>(
704
- eventName: E,
705
- listener: (...args: ReadableEventMap[E]) => void,
706
- ): this;
707
- prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
708
- prependOnceListener<E extends keyof ReadableEventMap>(
709
- eventName: E,
710
- listener: (...args: ReadableEventMap[E]) => void,
711
- ): this;
712
- prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
713
- rawListeners<E extends keyof ReadableEventMap>(eventName: E): ((...args: ReadableEventMap[E]) => void)[];
714
- rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
715
- // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
716
- removeAllListeners<E extends keyof ReadableEventMap>(eventName?: E): this;
717
- removeAllListeners(eventName?: string | symbol): this;
718
- removeListener<E extends keyof ReadableEventMap>(
719
- eventName: E,
720
- listener: (...args: ReadableEventMap[E]) => void,
721
- ): this;
722
- removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
723
- // #endregion
724
- }
725
- interface WritableOptions<T extends Writable = Writable> extends StreamOptions<T> {
726
- decodeStrings?: boolean | undefined;
727
- defaultEncoding?: BufferEncoding | undefined;
728
- write?:
729
- | ((
730
- this: T,
731
- chunk: any,
732
- encoding: BufferEncoding,
733
- callback: (error?: Error | null) => void,
734
- ) => void)
735
- | undefined;
736
- writev?:
737
- | ((
738
- this: T,
739
- chunks: {
740
- chunk: any;
741
- encoding: BufferEncoding;
742
- }[],
743
- callback: (error?: Error | null) => void,
744
- ) => void)
745
- | undefined;
746
- final?: ((this: T, callback: (error?: Error | null) => void) => void) | undefined;
747
- }
748
- interface WritableEventMap {
749
- "close": [];
750
- "drain": [];
751
- "error": [err: Error];
752
- "finish": [];
753
- "pipe": [src: Readable];
754
- "unpipe": [src: Readable];
755
- }
756
- /**
757
- * @since v0.9.4
758
- */
759
- class Writable extends Stream implements NodeJS.WritableStream {
760
- constructor(options?: WritableOptions);
761
- /**
762
- * A utility method for creating a `Writable` from a web `WritableStream`.
763
- * @since v17.0.0
764
- */
765
- static fromWeb(
766
- writableStream: web.WritableStream,
767
- options?: Pick<WritableOptions, "decodeStrings" | "highWaterMark" | "objectMode" | "signal">,
768
- ): Writable;
769
- /**
770
- * A utility method for creating a web `WritableStream` from a `Writable`.
771
- * @since v17.0.0
772
- */
773
- static toWeb(streamWritable: NodeJS.WritableStream): web.WritableStream;
774
- /**
775
- * Is `true` if it is safe to call `writable.write()`, which means
776
- * the stream has not been destroyed, errored, or ended.
777
- * @since v11.4.0
778
- */
779
- writable: boolean;
780
- /**
781
- * Returns whether the stream was destroyed or errored before emitting `'finish'`.
782
- * @since v18.0.0, v16.17.0
783
- */
784
- readonly writableAborted: boolean;
785
- /**
786
- * Is `true` after `writable.end()` has been called. This property
787
- * does not indicate whether the data has been flushed, for this use `writable.writableFinished` instead.
788
- * @since v12.9.0
789
- */
790
- readonly writableEnded: boolean;
791
- /**
792
- * Is set to `true` immediately before the `'finish'` event is emitted.
793
- * @since v12.6.0
794
- */
795
- readonly writableFinished: boolean;
796
- /**
797
- * Return the value of `highWaterMark` passed when creating this `Writable`.
798
- * @since v9.3.0
799
- */
800
- readonly writableHighWaterMark: number;
801
- /**
802
- * This property contains the number of bytes (or objects) in the queue
803
- * ready to be written. The value provides introspection data regarding
804
- * the status of the `highWaterMark`.
805
- * @since v9.4.0
806
- */
807
- readonly writableLength: number;
808
- /**
809
- * Getter for the property `objectMode` of a given `Writable` stream.
810
- * @since v12.3.0
811
- */
812
- readonly writableObjectMode: boolean;
813
- /**
814
- * Number of times `writable.uncork()` needs to be
815
- * called in order to fully uncork the stream.
816
- * @since v13.2.0, v12.16.0
817
- */
818
- readonly writableCorked: number;
819
- /**
820
- * Is `true` after `writable.destroy()` has been called.
821
- * @since v8.0.0
822
- */
823
- destroyed: boolean;
824
- /**
825
- * Is `true` after `'close'` has been emitted.
826
- * @since v18.0.0
827
- */
828
- readonly closed: boolean;
829
- /**
830
- * Returns error if the stream has been destroyed with an error.
831
- * @since v18.0.0
832
- */
833
- readonly errored: Error | null;
834
- /**
835
- * Is `true` if the stream's buffer has been full and stream will emit `'drain'`.
836
- * @since v15.2.0, v14.17.0
837
- */
838
- readonly writableNeedDrain: boolean;
839
- _write(chunk: any, encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
840
- _writev?(
841
- chunks: {
842
- chunk: any;
843
- encoding: BufferEncoding;
844
- }[],
845
- callback: (error?: Error | null) => void,
846
- ): void;
847
- _construct?(callback: (error?: Error | null) => void): void;
848
- _destroy(error: Error | null, callback: (error?: Error | null) => void): void;
849
- _final(callback: (error?: Error | null) => void): void;
850
- /**
851
- * The `writable.write()` method writes some data to the stream, and calls the
852
- * supplied `callback` once the data has been fully handled. If an error
853
- * occurs, the `callback` will be called with the error as its
854
- * first argument. The `callback` is called asynchronously and before `'error'` is
855
- * emitted.
856
- *
857
- * The return value is `true` if the internal buffer is less than the `highWaterMark` configured when the stream was created after admitting `chunk`.
858
- * If `false` is returned, further attempts to write data to the stream should
859
- * stop until the `'drain'` event is emitted.
860
- *
861
- * While a stream is not draining, calls to `write()` will buffer `chunk`, and
862
- * return false. Once all currently buffered chunks are drained (accepted for
863
- * delivery by the operating system), the `'drain'` event will be emitted.
864
- * Once `write()` returns false, do not write more chunks
865
- * until the `'drain'` event is emitted. While calling `write()` on a stream that
866
- * is not draining is allowed, Node.js will buffer all written chunks until
867
- * maximum memory usage occurs, at which point it will abort unconditionally.
868
- * Even before it aborts, high memory usage will cause poor garbage collector
869
- * performance and high RSS (which is not typically released back to the system,
870
- * even after the memory is no longer required). Since TCP sockets may never
871
- * drain if the remote peer does not read the data, writing a socket that is
872
- * not draining may lead to a remotely exploitable vulnerability.
873
- *
874
- * Writing data while the stream is not draining is particularly
875
- * problematic for a `Transform`, because the `Transform` streams are paused
876
- * by default until they are piped or a `'data'` or `'readable'` event handler
877
- * is added.
878
- *
879
- * If the data to be written can be generated or fetched on demand, it is
880
- * recommended to encapsulate the logic into a `Readable` and use {@link pipe}. However, if calling `write()` is preferred, it is
881
- * possible to respect backpressure and avoid memory issues using the `'drain'` event:
882
- *
883
- * ```js
884
- * function write(data, cb) {
885
- * if (!stream.write(data)) {
886
- * stream.once('drain', cb);
887
- * } else {
888
- * process.nextTick(cb);
889
- * }
890
- * }
891
- *
892
- * // Wait for cb to be called before doing any other write.
893
- * write('hello', () => {
894
- * console.log('Write completed, do more writes now.');
895
- * });
896
- * ```
897
- *
898
- * A `Writable` stream in object mode will always ignore the `encoding` argument.
899
- * @since v0.9.4
900
- * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
901
- * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
902
- * @param [encoding='utf8'] The encoding, if `chunk` is a string.
903
- * @param callback Callback for when this chunk of data is flushed.
904
- * @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`.
905
- */
906
- write(chunk: any, callback?: (error: Error | null | undefined) => void): boolean;
907
- write(chunk: any, encoding: BufferEncoding, callback?: (error: Error | null | undefined) => void): boolean;
908
- /**
909
- * The `writable.setDefaultEncoding()` method sets the default `encoding` for a `Writable` stream.
910
- * @since v0.11.15
911
- * @param encoding The new default encoding
912
- */
913
- setDefaultEncoding(encoding: BufferEncoding): this;
914
- /**
915
- * Calling the `writable.end()` method signals that no more data will be written
916
- * to the `Writable`. The optional `chunk` and `encoding` arguments allow one
917
- * final additional chunk of data to be written immediately before closing the
918
- * stream.
919
- *
920
- * Calling the {@link write} method after calling {@link end} will raise an error.
921
- *
922
- * ```js
923
- * // Write 'hello, ' and then end with 'world!'.
924
- * import fs from 'node:fs';
925
- * const file = fs.createWriteStream('example.txt');
926
- * file.write('hello, ');
927
- * file.end('world!');
928
- * // Writing more now is not allowed!
929
- * ```
930
- * @since v0.9.4
931
- * @param chunk Optional data to write. For streams not operating in object mode, `chunk` must be a {string}, {Buffer},
932
- * {TypedArray} or {DataView}. For object mode streams, `chunk` may be any JavaScript value other than `null`.
933
- * @param encoding The encoding if `chunk` is a string
934
- * @param callback Callback for when the stream is finished.
935
- */
936
- end(cb?: () => void): this;
937
- end(chunk: any, cb?: () => void): this;
938
- end(chunk: any, encoding: BufferEncoding, cb?: () => void): this;
939
- /**
940
- * The `writable.cork()` method forces all written data to be buffered in memory.
941
- * The buffered data will be flushed when either the {@link uncork} or {@link end} methods are called.
942
- *
943
- * The primary intent of `writable.cork()` is to accommodate a situation in which
944
- * several small chunks are written to the stream in rapid succession. Instead of
945
- * immediately forwarding them to the underlying destination, `writable.cork()` buffers all the chunks until `writable.uncork()` is called, which will pass them
946
- * all to `writable._writev()`, if present. This prevents a head-of-line blocking
947
- * situation where data is being buffered while waiting for the first small chunk
948
- * to be processed. However, use of `writable.cork()` without implementing `writable._writev()` may have an adverse effect on throughput.
949
- *
950
- * See also: `writable.uncork()`, `writable._writev()`.
951
- * @since v0.11.2
952
- */
953
- cork(): void;
954
- /**
955
- * The `writable.uncork()` method flushes all data buffered since {@link cork} was called.
956
- *
957
- * When using `writable.cork()` and `writable.uncork()` to manage the buffering
958
- * 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
959
- * loop phase.
960
- *
961
- * ```js
962
- * stream.cork();
963
- * stream.write('some ');
964
- * stream.write('data ');
965
- * process.nextTick(() => stream.uncork());
966
- * ```
967
- *
968
- * If the `writable.cork()` method is called multiple times on a stream, the
969
- * same number of calls to `writable.uncork()` must be called to flush the buffered
970
- * data.
971
- *
972
- * ```js
973
- * stream.cork();
974
- * stream.write('some ');
975
- * stream.cork();
976
- * stream.write('data ');
977
- * process.nextTick(() => {
978
- * stream.uncork();
979
- * // The data will not be flushed until uncork() is called a second time.
980
- * stream.uncork();
981
- * });
982
- * ```
983
- *
984
- * See also: `writable.cork()`.
985
- * @since v0.11.2
986
- */
987
- uncork(): void;
988
- /**
989
- * Destroy the stream. Optionally emit an `'error'` event, and emit a `'close'` event (unless `emitClose` is set to `false`). After this call, the writable
990
- * stream has ended and subsequent calls to `write()` or `end()` will result in
991
- * an `ERR_STREAM_DESTROYED` error.
992
- * 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.
993
- * Use `end()` instead of destroy if data should flush before close, or wait for
994
- * the `'drain'` event before destroying the stream.
995
- *
996
- * Once `destroy()` has been called any further calls will be a no-op and no
997
- * further errors except from `_destroy()` may be emitted as `'error'`.
998
- *
999
- * Implementors should not override this method,
1000
- * but instead implement `writable._destroy()`.
1001
- * @since v8.0.0
1002
- * @param error Optional, an error to emit with `'error'` event.
1003
- */
1004
- destroy(error?: Error): this;
1005
- /**
1006
- * Calls `writable.destroy()` with an `AbortError` and returns
1007
- * a promise that fulfills when the stream is finished.
1008
- * @since v22.4.0, v20.16.0
1009
- */
1010
- [Symbol.asyncDispose](): Promise<void>;
1011
- // #region InternalEventEmitter
1012
- addListener<E extends keyof WritableEventMap>(
1013
- eventName: E,
1014
- listener: (...args: WritableEventMap[E]) => void,
1015
- ): this;
1016
- addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1017
- emit<E extends keyof WritableEventMap>(eventName: E, ...args: WritableEventMap[E]): boolean;
1018
- emit(eventName: string | symbol, ...args: any[]): boolean;
1019
- listenerCount<E extends keyof WritableEventMap>(
1020
- eventName: E,
1021
- listener?: (...args: WritableEventMap[E]) => void,
1022
- ): number;
1023
- listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
1024
- listeners<E extends keyof WritableEventMap>(eventName: E): ((...args: WritableEventMap[E]) => void)[];
1025
- listeners(eventName: string | symbol): ((...args: any[]) => void)[];
1026
- off<E extends keyof WritableEventMap>(eventName: E, listener: (...args: WritableEventMap[E]) => void): this;
1027
- off(eventName: string | symbol, listener: (...args: any[]) => void): this;
1028
- on<E extends keyof WritableEventMap>(eventName: E, listener: (...args: WritableEventMap[E]) => void): this;
1029
- on(eventName: string | symbol, listener: (...args: any[]) => void): this;
1030
- once<E extends keyof WritableEventMap>(
1031
- eventName: E,
1032
- listener: (...args: WritableEventMap[E]) => void,
1033
- ): this;
1034
- once(eventName: string | symbol, listener: (...args: any[]) => void): this;
1035
- prependListener<E extends keyof WritableEventMap>(
1036
- eventName: E,
1037
- listener: (...args: WritableEventMap[E]) => void,
1038
- ): this;
1039
- prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1040
- prependOnceListener<E extends keyof WritableEventMap>(
1041
- eventName: E,
1042
- listener: (...args: WritableEventMap[E]) => void,
1043
- ): this;
1044
- prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1045
- rawListeners<E extends keyof WritableEventMap>(eventName: E): ((...args: WritableEventMap[E]) => void)[];
1046
- rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
1047
- // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
1048
- removeAllListeners<E extends keyof WritableEventMap>(eventName?: E): this;
1049
- removeAllListeners(eventName?: string | symbol): this;
1050
- removeListener<E extends keyof WritableEventMap>(
1051
- eventName: E,
1052
- listener: (...args: WritableEventMap[E]) => void,
1053
- ): this;
1054
- removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1055
- // #endregion
1056
- }
1057
- interface DuplexOptions<T extends Duplex = Duplex> extends ReadableOptions<T>, WritableOptions<T> {
1058
- allowHalfOpen?: boolean | undefined;
1059
- readableObjectMode?: boolean | undefined;
1060
- writableObjectMode?: boolean | undefined;
1061
- readableHighWaterMark?: number | undefined;
1062
- writableHighWaterMark?: number | undefined;
1063
- writableCorked?: number | undefined;
1064
- }
1065
- interface DuplexToWebOptions {
1066
- type?: web.ReadableStreamType | undefined;
1067
- }
1068
- interface DuplexEventMap extends ReadableEventMap, WritableEventMap {}
1069
- /**
1070
- * Duplex streams are streams that implement both the `Readable` and `Writable` interfaces.
1071
- *
1072
- * Examples of `Duplex` streams include:
1073
- *
1074
- * * `TCP sockets`
1075
- * * `zlib streams`
1076
- * * `crypto streams`
1077
- * @since v0.9.4
1078
- */
1079
- class Duplex extends Stream implements NodeJS.ReadWriteStream {
1080
- constructor(options?: DuplexOptions);
1081
- /**
1082
- * A utility method for creating duplex streams.
1083
- *
1084
- * - `Stream` converts writable stream into writable `Duplex` and readable stream
1085
- * to `Duplex`.
1086
- * - `Blob` converts into readable `Duplex`.
1087
- * - `string` converts into readable `Duplex`.
1088
- * - `ArrayBuffer` converts into readable `Duplex`.
1089
- * - `AsyncIterable` converts into a readable `Duplex`. Cannot yield `null`.
1090
- * - `AsyncGeneratorFunction` converts into a readable/writable transform
1091
- * `Duplex`. Must take a source `AsyncIterable` as first parameter. Cannot yield
1092
- * `null`.
1093
- * - `AsyncFunction` converts into a writable `Duplex`. Must return
1094
- * either `null` or `undefined`
1095
- * - `Object ({ writable, readable })` converts `readable` and
1096
- * `writable` into `Stream` and then combines them into `Duplex` where the
1097
- * `Duplex` will write to the `writable` and read from the `readable`.
1098
- * - `Promise` converts into readable `Duplex`. Value `null` is ignored.
1099
- *
1100
- * @since v16.8.0
1101
- */
1102
- static from(
1103
- src:
1104
- | NodeJS.ReadableStream
1105
- | NodeJS.WritableStream
1106
- | Blob
1107
- | string
1108
- | Iterable<any>
1109
- | AsyncIterable<any>
1110
- | ((source: AsyncIterable<any>) => AsyncIterable<any>)
1111
- | ((source: AsyncIterable<any>) => Promise<void>)
1112
- | Promise<any>
1113
- | web.ReadableWritablePair
1114
- | web.ReadableStream
1115
- | web.WritableStream,
1116
- ): Duplex;
1117
- /**
1118
- * A utility method for creating a web `ReadableStream` and `WritableStream` from a `Duplex`.
1119
- * @since v17.0.0
1120
- */
1121
- static toWeb(streamDuplex: NodeJS.ReadWriteStream, options?: DuplexToWebOptions): web.ReadableWritablePair;
1122
- /**
1123
- * A utility method for creating a `Duplex` from a web `ReadableStream` and `WritableStream`.
1124
- * @since v17.0.0
1125
- */
1126
- static fromWeb(
1127
- duplexStream: web.ReadableWritablePair,
1128
- options?: Pick<
1129
- DuplexOptions,
1130
- "allowHalfOpen" | "decodeStrings" | "encoding" | "highWaterMark" | "objectMode" | "signal"
1131
- >,
1132
- ): Duplex;
1133
- /**
1134
- * If `false` then the stream will automatically end the writable side when the
1135
- * readable side ends. Set initially by the `allowHalfOpen` constructor option,
1136
- * which defaults to `true`.
1137
- *
1138
- * This can be changed manually to change the half-open behavior of an existing
1139
- * `Duplex` stream instance, but must be changed before the `'end'` event is emitted.
1140
- * @since v0.9.4
1141
- */
1142
- allowHalfOpen: boolean;
1143
- // #region InternalEventEmitter
1144
- addListener<E extends keyof DuplexEventMap>(
1145
- eventName: E,
1146
- listener: (...args: DuplexEventMap[E]) => void,
1147
- ): this;
1148
- addListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1149
- emit<E extends keyof DuplexEventMap>(eventName: E, ...args: DuplexEventMap[E]): boolean;
1150
- emit(eventName: string | symbol, ...args: any[]): boolean;
1151
- listenerCount<E extends keyof DuplexEventMap>(
1152
- eventName: E,
1153
- listener?: (...args: DuplexEventMap[E]) => void,
1154
- ): number;
1155
- listenerCount(eventName: string | symbol, listener?: (...args: any[]) => void): number;
1156
- listeners<E extends keyof DuplexEventMap>(eventName: E): ((...args: DuplexEventMap[E]) => void)[];
1157
- listeners(eventName: string | symbol): ((...args: any[]) => void)[];
1158
- off<E extends keyof DuplexEventMap>(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this;
1159
- off(eventName: string | symbol, listener: (...args: any[]) => void): this;
1160
- on<E extends keyof DuplexEventMap>(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this;
1161
- on(eventName: string | symbol, listener: (...args: any[]) => void): this;
1162
- once<E extends keyof DuplexEventMap>(eventName: E, listener: (...args: DuplexEventMap[E]) => void): this;
1163
- once(eventName: string | symbol, listener: (...args: any[]) => void): this;
1164
- prependListener<E extends keyof DuplexEventMap>(
1165
- eventName: E,
1166
- listener: (...args: DuplexEventMap[E]) => void,
1167
- ): this;
1168
- prependListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1169
- prependOnceListener<E extends keyof DuplexEventMap>(
1170
- eventName: E,
1171
- listener: (...args: DuplexEventMap[E]) => void,
1172
- ): this;
1173
- prependOnceListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1174
- rawListeners<E extends keyof DuplexEventMap>(eventName: E): ((...args: DuplexEventMap[E]) => void)[];
1175
- rawListeners(eventName: string | symbol): ((...args: any[]) => void)[];
1176
- // eslint-disable-next-line @definitelytyped/no-unnecessary-generics
1177
- removeAllListeners<E extends keyof DuplexEventMap>(eventName?: E): this;
1178
- removeAllListeners(eventName?: string | symbol): this;
1179
- removeListener<E extends keyof DuplexEventMap>(
1180
- eventName: E,
1181
- listener: (...args: DuplexEventMap[E]) => void,
1182
- ): this;
1183
- removeListener(eventName: string | symbol, listener: (...args: any[]) => void): this;
1184
- // #endregion
1185
- }
1186
- interface Duplex extends Readable, Writable {}
1187
- /**
1188
- * The utility function `duplexPair` returns an Array with two items,
1189
- * each being a `Duplex` stream connected to the other side:
1190
- *
1191
- * ```js
1192
- * const [ sideA, sideB ] = duplexPair();
1193
- * ```
1194
- *
1195
- * Whatever is written to one stream is made readable on the other. It provides
1196
- * behavior analogous to a network connection, where the data written by the client
1197
- * becomes readable by the server, and vice-versa.
1198
- *
1199
- * The Duplex streams are symmetrical; one or the other may be used without any
1200
- * difference in behavior.
1201
- * @param options A value to pass to both {@link Duplex} constructors,
1202
- * to set options such as buffering.
1203
- * @since v22.6.0
1204
- */
1205
- function duplexPair(options?: DuplexOptions): [Duplex, Duplex];
1206
- type TransformCallback = (error?: Error | null, data?: any) => void;
1207
- interface TransformOptions<T extends Transform = Transform> extends DuplexOptions<T> {
1208
- transform?:
1209
- | ((this: T, chunk: any, encoding: BufferEncoding, callback: TransformCallback) => void)
1210
- | undefined;
1211
- flush?: ((this: T, callback: TransformCallback) => void) | undefined;
1212
- }
1213
- /**
1214
- * Transform streams are `Duplex` streams where the output is in some way
1215
- * related to the input. Like all `Duplex` streams, `Transform` streams
1216
- * implement both the `Readable` and `Writable` interfaces.
1217
- *
1218
- * Examples of `Transform` streams include:
1219
- *
1220
- * * `zlib streams`
1221
- * * `crypto streams`
1222
- * @since v0.9.4
1223
- */
1224
- class Transform extends Duplex {
1225
- constructor(options?: TransformOptions);
1226
- _transform(chunk: any, encoding: BufferEncoding, callback: TransformCallback): void;
1227
- _flush(callback: TransformCallback): void;
1228
- }
1229
- /**
1230
- * 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
1231
- * 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.
1232
- */
1233
- class PassThrough extends Transform {}
1234
- /**
1235
- * A stream to attach a signal to.
1236
- *
1237
- * Attaches an AbortSignal to a readable or writeable stream. This lets code
1238
- * control stream destruction using an `AbortController`.
1239
- *
1240
- * Calling `abort` on the `AbortController` corresponding to the passed `AbortSignal` will behave the same way as calling `.destroy(new AbortError())` on the
1241
- * stream, and `controller.error(new AbortError())` for webstreams.
1242
- *
1243
- * ```js
1244
- * import fs from 'node:fs';
1245
- *
1246
- * const controller = new AbortController();
1247
- * const read = addAbortSignal(
1248
- * controller.signal,
1249
- * fs.createReadStream(('object.json')),
1250
- * );
1251
- * // Later, abort the operation closing the stream
1252
- * controller.abort();
1253
- * ```
1254
- *
1255
- * Or using an `AbortSignal` with a readable stream as an async iterable:
1256
- *
1257
- * ```js
1258
- * const controller = new AbortController();
1259
- * setTimeout(() => controller.abort(), 10_000); // set a timeout
1260
- * const stream = addAbortSignal(
1261
- * controller.signal,
1262
- * fs.createReadStream(('object.json')),
1263
- * );
1264
- * (async () => {
1265
- * try {
1266
- * for await (const chunk of stream) {
1267
- * await process(chunk);
1268
- * }
1269
- * } catch (e) {
1270
- * if (e.name === 'AbortError') {
1271
- * // The operation was cancelled
1272
- * } else {
1273
- * throw e;
1274
- * }
1275
- * }
1276
- * })();
1277
- * ```
1278
- *
1279
- * Or using an `AbortSignal` with a ReadableStream:
1280
- *
1281
- * ```js
1282
- * const controller = new AbortController();
1283
- * const rs = new ReadableStream({
1284
- * start(controller) {
1285
- * controller.enqueue('hello');
1286
- * controller.enqueue('world');
1287
- * controller.close();
1288
- * },
1289
- * });
1290
- *
1291
- * addAbortSignal(controller.signal, rs);
1292
- *
1293
- * finished(rs, (err) => {
1294
- * if (err) {
1295
- * if (err.name === 'AbortError') {
1296
- * // The operation was cancelled
1297
- * }
1298
- * }
1299
- * });
1300
- *
1301
- * const reader = rs.getReader();
1302
- *
1303
- * reader.read().then(({ value, done }) => {
1304
- * console.log(value); // hello
1305
- * console.log(done); // false
1306
- * controller.abort();
1307
- * });
1308
- * ```
1309
- * @since v15.4.0
1310
- * @param signal A signal representing possible cancellation
1311
- * @param stream A stream to attach a signal to.
1312
- */
1313
- function addAbortSignal<
1314
- T extends NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
1315
- >(signal: AbortSignal, stream: T): T;
1316
- /**
1317
- * Returns the default highWaterMark used by streams.
1318
- * Defaults to `65536` (64 KiB), or `16` for `objectMode`.
1319
- * @since v19.9.0
1320
- */
1321
- function getDefaultHighWaterMark(objectMode: boolean): number;
1322
- /**
1323
- * Sets the default highWaterMark used by streams.
1324
- * @since v19.9.0
1325
- * @param value highWaterMark value
1326
- */
1327
- function setDefaultHighWaterMark(objectMode: boolean, value: number): void;
1328
- interface FinishedOptions extends Abortable {
1329
- error?: boolean | undefined;
1330
- readable?: boolean | undefined;
1331
- writable?: boolean | undefined;
1332
- }
1333
- /**
1334
- * A readable and/or writable stream/webstream.
1335
- *
1336
- * A function to get notified when a stream is no longer readable, writable
1337
- * or has experienced an error or a premature close event.
1338
- *
1339
- * ```js
1340
- * import { finished } from 'node:stream';
1341
- * import fs from 'node:fs';
1342
- *
1343
- * const rs = fs.createReadStream('archive.tar');
1344
- *
1345
- * finished(rs, (err) => {
1346
- * if (err) {
1347
- * console.error('Stream failed.', err);
1348
- * } else {
1349
- * console.log('Stream is done reading.');
1350
- * }
1351
- * });
1352
- *
1353
- * rs.resume(); // Drain the stream.
1354
- * ```
1355
- *
1356
- * Especially useful in error handling scenarios where a stream is destroyed
1357
- * prematurely (like an aborted HTTP request), and will not emit `'end'` or `'finish'`.
1358
- *
1359
- * The `finished` API provides [`promise version`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streamfinishedstream-options).
1360
- *
1361
- * `stream.finished()` leaves dangling event listeners (in particular `'error'`, `'end'`, `'finish'` and `'close'`) after `callback` has been
1362
- * invoked. The reason for this is so that unexpected `'error'` events (due to
1363
- * incorrect stream implementations) do not cause unexpected crashes.
1364
- * If this is unwanted behavior then the returned cleanup function needs to be
1365
- * invoked in the callback:
1366
- *
1367
- * ```js
1368
- * const cleanup = finished(rs, (err) => {
1369
- * cleanup();
1370
- * // ...
1371
- * });
1372
- * ```
1373
- * @since v10.0.0
1374
- * @param stream A readable and/or writable stream.
1375
- * @param callback A callback function that takes an optional error argument.
1376
- * @returns A cleanup function which removes all registered listeners.
1377
- */
1378
- function finished(
1379
- stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
1380
- options: FinishedOptions,
1381
- callback: (err?: NodeJS.ErrnoException | null) => void,
1382
- ): () => void;
1383
- function finished(
1384
- stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
1385
- callback: (err?: NodeJS.ErrnoException | null) => void,
1386
- ): () => void;
1387
- namespace finished {
1388
- import __promisify__ = promises.finished;
1389
- export { __promisify__ };
1390
- }
1391
- type PipelineSourceFunction<O> = (options?: Abortable) => Iterable<O> | AsyncIterable<O>;
1392
- type PipelineSource<O> =
1393
- | NodeJS.ReadableStream
1394
- | web.ReadableStream<O>
1395
- | web.TransformStream<any, O>
1396
- | Iterable<O>
1397
- | AsyncIterable<O>
1398
- | PipelineSourceFunction<O>;
1399
- type PipelineSourceArgument<T> = (T extends (...args: any[]) => infer R ? R : T) extends infer S
1400
- ? S extends web.TransformStream<any, infer O> ? web.ReadableStream<O> : S
1401
- : never;
1402
- type PipelineTransformGenerator<S extends PipelineTransformSource<any>, O> = (
1403
- source: PipelineSourceArgument<S>,
1404
- options?: Abortable,
1405
- ) => AsyncIterable<O>;
1406
- type PipelineTransformStreams<I, O> =
1407
- | NodeJS.ReadWriteStream
1408
- | web.TransformStream<I, O>;
1409
- type PipelineTransform<S extends PipelineTransformSource<any>, O> = S extends
1410
- PipelineSource<infer I> | PipelineTransformStreams<any, infer I> | ((...args: any[]) => infer I)
1411
- ? PipelineTransformStreams<I, O> | PipelineTransformGenerator<S, O>
1412
- : never;
1413
- type PipelineTransformSource<O> = PipelineSource<O> | PipelineTransform<any, O>;
1414
- type PipelineDestinationFunction<S extends PipelineTransformSource<any>, R> = (
1415
- source: PipelineSourceArgument<S>,
1416
- options?: Abortable,
1417
- ) => R;
1418
- type PipelineDestination<S extends PipelineTransformSource<any>, R> = S extends
1419
- PipelineSource<infer I> | PipelineTransform<any, infer I> ?
1420
- | NodeJS.WritableStream
1421
- | web.WritableStream<I>
1422
- | web.TransformStream<I, any>
1423
- | PipelineDestinationFunction<S, R>
1424
- : never;
1425
- type PipelineCallback<S extends PipelineDestination<any, any>> = (
1426
- err: NodeJS.ErrnoException | null,
1427
- value: S extends (...args: any[]) => PromiseLike<infer R> ? R : undefined,
1428
- ) => void;
1429
- type PipelineResult<S extends PipelineDestination<any, any>> = S extends NodeJS.WritableStream ? S : Duplex;
1430
- /**
1431
- * A module method to pipe between streams and generators forwarding errors and
1432
- * properly cleaning up and provide a callback when the pipeline is complete.
1433
- *
1434
- * ```js
1435
- * import { pipeline } from 'node:stream';
1436
- * import fs from 'node:fs';
1437
- * import zlib from 'node:zlib';
1438
- *
1439
- * // Use the pipeline API to easily pipe a series of streams
1440
- * // together and get notified when the pipeline is fully done.
1441
- *
1442
- * // A pipeline to gzip a potentially huge tar file efficiently:
1443
- *
1444
- * pipeline(
1445
- * fs.createReadStream('archive.tar'),
1446
- * zlib.createGzip(),
1447
- * fs.createWriteStream('archive.tar.gz'),
1448
- * (err) => {
1449
- * if (err) {
1450
- * console.error('Pipeline failed.', err);
1451
- * } else {
1452
- * console.log('Pipeline succeeded.');
1453
- * }
1454
- * },
1455
- * );
1456
- * ```
1457
- *
1458
- * The `pipeline` API provides a [`promise version`](https://nodejs.org/docs/latest-v25.x/api/stream.html#streampipelinesource-transforms-destination-options).
1459
- *
1460
- * `stream.pipeline()` will call `stream.destroy(err)` on all streams except:
1461
- *
1462
- * * `Readable` streams which have emitted `'end'` or `'close'`.
1463
- * * `Writable` streams which have emitted `'finish'` or `'close'`.
1464
- *
1465
- * `stream.pipeline()` leaves dangling event listeners on the streams
1466
- * after the `callback` has been invoked. In the case of reuse of streams after
1467
- * failure, this can cause event listener leaks and swallowed errors. If the last
1468
- * stream is readable, dangling event listeners will be removed so that the last
1469
- * stream can be consumed later.
1470
- *
1471
- * `stream.pipeline()` closes all the streams when an error is raised.
1472
- * The `IncomingRequest` usage with `pipeline` could lead to an unexpected behavior
1473
- * once it would destroy the socket without sending the expected response.
1474
- * See the example below:
1475
- *
1476
- * ```js
1477
- * import fs from 'node:fs';
1478
- * import http from 'node:http';
1479
- * import { pipeline } from 'node:stream';
1480
- *
1481
- * const server = http.createServer((req, res) => {
1482
- * const fileStream = fs.createReadStream('./fileNotExist.txt');
1483
- * pipeline(fileStream, res, (err) => {
1484
- * if (err) {
1485
- * console.log(err); // No such file
1486
- * // this message can't be sent once `pipeline` already destroyed the socket
1487
- * return res.end('error!!!');
1488
- * }
1489
- * });
1490
- * });
1491
- * ```
1492
- * @since v10.0.0
1493
- * @param callback Called when the pipeline is fully done.
1494
- */
1495
- function pipeline<S extends PipelineSource<any>, D extends PipelineDestination<S, any>>(
1496
- source: S,
1497
- destination: D,
1498
- callback: PipelineCallback<D>,
1499
- ): PipelineResult<D>;
1500
- function pipeline<
1501
- S extends PipelineSource<any>,
1502
- T extends PipelineTransform<S, any>,
1503
- D extends PipelineDestination<T, any>,
1504
- >(
1505
- source: S,
1506
- transform: T,
1507
- destination: D,
1508
- callback: PipelineCallback<D>,
1509
- ): PipelineResult<D>;
1510
- function pipeline<
1511
- S extends PipelineSource<any>,
1512
- T1 extends PipelineTransform<S, any>,
1513
- T2 extends PipelineTransform<T1, any>,
1514
- D extends PipelineDestination<T2, any>,
1515
- >(
1516
- source: S,
1517
- transform1: T1,
1518
- transform2: T2,
1519
- destination: D,
1520
- callback: PipelineCallback<D>,
1521
- ): PipelineResult<D>;
1522
- function pipeline<
1523
- S extends PipelineSource<any>,
1524
- T1 extends PipelineTransform<S, any>,
1525
- T2 extends PipelineTransform<T1, any>,
1526
- T3 extends PipelineTransform<T2, any>,
1527
- D extends PipelineDestination<T3, any>,
1528
- >(
1529
- source: S,
1530
- transform1: T1,
1531
- transform2: T2,
1532
- transform3: T3,
1533
- destination: D,
1534
- callback: PipelineCallback<D>,
1535
- ): PipelineResult<D>;
1536
- function pipeline<
1537
- S extends PipelineSource<any>,
1538
- T1 extends PipelineTransform<S, any>,
1539
- T2 extends PipelineTransform<T1, any>,
1540
- T3 extends PipelineTransform<T2, any>,
1541
- T4 extends PipelineTransform<T3, any>,
1542
- D extends PipelineDestination<T4, any>,
1543
- >(
1544
- source: S,
1545
- transform1: T1,
1546
- transform2: T2,
1547
- transform3: T3,
1548
- transform4: T4,
1549
- destination: D,
1550
- callback: PipelineCallback<D>,
1551
- ): PipelineResult<D>;
1552
- function pipeline(
1553
- streams: ReadonlyArray<PipelineSource<any> | PipelineTransform<any, any> | PipelineDestination<any, any>>,
1554
- callback: (err: NodeJS.ErrnoException | null) => void,
1555
- ): NodeJS.WritableStream;
1556
- function pipeline(
1557
- ...streams: [
1558
- ...[PipelineSource<any>, ...PipelineTransform<any, any>[], PipelineDestination<any, any>],
1559
- callback: ((err: NodeJS.ErrnoException | null) => void),
1560
- ]
1561
- ): NodeJS.WritableStream;
1562
- namespace pipeline {
1563
- import __promisify__ = promises.pipeline;
1564
- export { __promisify__ };
1565
- }
1566
- type ComposeSource<O> =
1567
- | NodeJS.ReadableStream
1568
- | web.ReadableStream<O>
1569
- | Iterable<O>
1570
- | AsyncIterable<O>
1571
- | (() => AsyncIterable<O>);
1572
- type ComposeTransformStreams<I, O> = NodeJS.ReadWriteStream | web.TransformStream<I, O>;
1573
- type ComposeTransformGenerator<I, O> = (source: AsyncIterable<I>) => AsyncIterable<O>;
1574
- type ComposeTransform<S extends ComposeTransformSource<any>, O> = S extends
1575
- ComposeSource<infer I> | ComposeTransformStreams<any, infer I> | ComposeTransformGenerator<any, infer I>
1576
- ? ComposeTransformStreams<I, O> | ComposeTransformGenerator<I, O>
1577
- : never;
1578
- type ComposeTransformSource<O> = ComposeSource<O> | ComposeTransform<any, O>;
1579
- type ComposeDestination<S extends ComposeTransformSource<any>> = S extends ComposeTransformSource<infer I> ?
1580
- | NodeJS.WritableStream
1581
- | web.WritableStream<I>
1582
- | web.TransformStream<I, any>
1583
- | ((source: AsyncIterable<I>) => void)
1584
- : never;
1585
- /**
1586
- * Combines two or more streams into a `Duplex` stream that writes to the
1587
- * first stream and reads from the last. Each provided stream is piped into
1588
- * the next, using `stream.pipeline`. If any of the streams error then all
1589
- * are destroyed, including the outer `Duplex` stream.
1590
- *
1591
- * Because `stream.compose` returns a new stream that in turn can (and
1592
- * should) be piped into other streams, it enables composition. In contrast,
1593
- * when passing streams to `stream.pipeline`, typically the first stream is
1594
- * a readable stream and the last a writable stream, forming a closed
1595
- * circuit.
1596
- *
1597
- * If passed a `Function` it must be a factory method taking a `source`
1598
- * `Iterable`.
1599
- *
1600
- * ```js
1601
- * import { compose, Transform } from 'node:stream';
1602
- *
1603
- * const removeSpaces = new Transform({
1604
- * transform(chunk, encoding, callback) {
1605
- * callback(null, String(chunk).replace(' ', ''));
1606
- * },
1607
- * });
1608
- *
1609
- * async function* toUpper(source) {
1610
- * for await (const chunk of source) {
1611
- * yield String(chunk).toUpperCase();
1612
- * }
1613
- * }
1614
- *
1615
- * let res = '';
1616
- * for await (const buf of compose(removeSpaces, toUpper).end('hello world')) {
1617
- * res += buf;
1618
- * }
1619
- *
1620
- * console.log(res); // prints 'HELLOWORLD'
1621
- * ```
1622
- *
1623
- * `stream.compose` can be used to convert async iterables, generators and
1624
- * functions into streams.
1625
- *
1626
- * * `AsyncIterable` converts into a readable `Duplex`. Cannot yield
1627
- * `null`.
1628
- * * `AsyncGeneratorFunction` converts into a readable/writable transform `Duplex`.
1629
- * Must take a source `AsyncIterable` as first parameter. Cannot yield
1630
- * `null`.
1631
- * * `AsyncFunction` converts into a writable `Duplex`. Must return
1632
- * either `null` or `undefined`.
1633
- *
1634
- * ```js
1635
- * import { compose } from 'node:stream';
1636
- * import { finished } from 'node:stream/promises';
1637
- *
1638
- * // Convert AsyncIterable into readable Duplex.
1639
- * const s1 = compose(async function*() {
1640
- * yield 'Hello';
1641
- * yield 'World';
1642
- * }());
1643
- *
1644
- * // Convert AsyncGenerator into transform Duplex.
1645
- * const s2 = compose(async function*(source) {
1646
- * for await (const chunk of source) {
1647
- * yield String(chunk).toUpperCase();
1648
- * }
1649
- * });
1650
- *
1651
- * let res = '';
1652
- *
1653
- * // Convert AsyncFunction into writable Duplex.
1654
- * const s3 = compose(async function(source) {
1655
- * for await (const chunk of source) {
1656
- * res += chunk;
1657
- * }
1658
- * });
1659
- *
1660
- * await finished(compose(s1, s2, s3));
1661
- *
1662
- * console.log(res); // prints 'HELLOWORLD'
1663
- * ```
1664
- *
1665
- * For convenience, the `readable.compose(stream)` method is available on
1666
- * `Readable` and `Duplex` streams as a wrapper for this function.
1667
- * @since v16.9.0
1668
- * @experimental
1669
- */
1670
- /* eslint-disable @definitelytyped/no-unnecessary-generics */
1671
- function compose(stream: ComposeSource<any> | ComposeDestination<any>): Duplex;
1672
- function compose<
1673
- S extends ComposeSource<any> | ComposeTransform<any, any>,
1674
- D extends ComposeTransform<S, any> | ComposeDestination<S>,
1675
- >(
1676
- source: S,
1677
- destination: D,
1678
- ): Duplex;
1679
- function compose<
1680
- S extends ComposeSource<any> | ComposeTransform<any, any>,
1681
- T extends ComposeTransform<S, any>,
1682
- D extends ComposeTransform<T, any> | ComposeDestination<T>,
1683
- >(source: S, transform: T, destination: D): Duplex;
1684
- function compose<
1685
- S extends ComposeSource<any> | ComposeTransform<any, any>,
1686
- T1 extends ComposeTransform<S, any>,
1687
- T2 extends ComposeTransform<T1, any>,
1688
- D extends ComposeTransform<T2, any> | ComposeDestination<T2>,
1689
- >(source: S, transform1: T1, transform2: T2, destination: D): Duplex;
1690
- function compose<
1691
- S extends ComposeSource<any> | ComposeTransform<any, any>,
1692
- T1 extends ComposeTransform<S, any>,
1693
- T2 extends ComposeTransform<T1, any>,
1694
- T3 extends ComposeTransform<T2, any>,
1695
- D extends ComposeTransform<T3, any> | ComposeDestination<T3>,
1696
- >(source: S, transform1: T1, transform2: T2, transform3: T3, destination: D): Duplex;
1697
- function compose<
1698
- S extends ComposeSource<any> | ComposeTransform<any, any>,
1699
- T1 extends ComposeTransform<S, any>,
1700
- T2 extends ComposeTransform<T1, any>,
1701
- T3 extends ComposeTransform<T2, any>,
1702
- T4 extends ComposeTransform<T3, any>,
1703
- D extends ComposeTransform<T4, any> | ComposeDestination<T4>,
1704
- >(source: S, transform1: T1, transform2: T2, transform3: T3, transform4: T4, destination: D): Duplex;
1705
- function compose(
1706
- ...streams: [
1707
- ComposeSource<any>,
1708
- ...ComposeTransform<any, any>[],
1709
- ComposeDestination<any>,
1710
- ]
1711
- ): Duplex;
1712
- /* eslint-enable @definitelytyped/no-unnecessary-generics */
1713
- /**
1714
- * Returns whether the stream has encountered an error.
1715
- * @since v17.3.0, v16.14.0
1716
- */
1717
- function isErrored(
1718
- stream: NodeJS.ReadableStream | NodeJS.WritableStream | web.ReadableStream | web.WritableStream,
1719
- ): boolean;
1720
- /**
1721
- * Returns whether the stream is readable.
1722
- * @since v17.4.0, v16.14.0
1723
- * @returns Only returns `null` if `stream` is not a valid `Readable`, `Duplex` or `ReadableStream`.
1724
- */
1725
- function isReadable(stream: NodeJS.ReadableStream | web.ReadableStream): boolean | null;
1726
- /**
1727
- * Returns whether the stream is writable.
1728
- * @since v20.0.0
1729
- * @returns Only returns `null` if `stream` is not a valid `Writable`, `Duplex` or `WritableStream`.
1730
- */
1731
- function isWritable(stream: NodeJS.WritableStream | web.WritableStream): boolean | null;
1732
- }
1733
- global {
1734
- namespace NodeJS {
1735
- // These interfaces are vestigial, and correspond roughly to the "streams2" interfaces
1736
- // from early versions of Node.js, but they are still used widely across the ecosystem.
1737
- // Accordingly, they are commonly used as "in-types" for @types/node APIs, so that
1738
- // eg. streams returned from older libraries will still be considered valid input to
1739
- // functions which accept stream arguments.
1740
- // It's not possible to change or remove these without astronomical levels of breakage.
1741
- interface ReadableStream extends EventEmitter {
1742
- readable: boolean;
1743
- read(size?: number): string | Buffer;
1744
- setEncoding(encoding: BufferEncoding): this;
1745
- pause(): this;
1746
- resume(): this;
1747
- isPaused(): boolean;
1748
- pipe<T extends WritableStream>(destination: T, options?: { end?: boolean | undefined }): T;
1749
- unpipe(destination?: WritableStream): this;
1750
- unshift(chunk: string | Uint8Array, encoding?: BufferEncoding): void;
1751
- wrap(oldStream: ReadableStream): this;
1752
- [Symbol.asyncIterator](): AsyncIterableIterator<string | Buffer>;
1753
- }
1754
- interface WritableStream extends EventEmitter {
1755
- writable: boolean;
1756
- write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
1757
- write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
1758
- end(cb?: () => void): this;
1759
- end(data: string | Uint8Array, cb?: () => void): this;
1760
- end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
1761
- }
1762
- interface ReadWriteStream extends ReadableStream, WritableStream {}
1763
- }
1764
- }
1765
- export = Stream;
1766
- }
1767
- declare module "stream" {
1768
- import stream = require("node:stream");
1769
- export = stream;
1770
- }