@capsule-run/sdk 0.8.4 → 0.8.6

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 (333) hide show
  1. package/dist/polyfills/fs.d.ts.map +1 -1
  2. package/dist/polyfills/fs.js +4 -3
  3. package/dist/polyfills/fs.js.map +1 -1
  4. package/dist/polyfills/process.d.ts.map +1 -1
  5. package/dist/polyfills/process.js +10 -8
  6. package/dist/polyfills/process.js.map +1 -1
  7. package/dist/polyfills/unenv-runtime/_internal/types.d.mts +5 -0
  8. package/dist/polyfills/unenv-runtime/_internal/types.mjs +1 -0
  9. package/dist/polyfills/unenv-runtime/_internal/utils.d.mts +14 -0
  10. package/dist/polyfills/unenv-runtime/_internal/utils.mjs +49 -0
  11. package/dist/polyfills/unenv-runtime/mock/empty.d.mts +2 -0
  12. package/dist/polyfills/unenv-runtime/mock/empty.mjs +1 -0
  13. package/dist/polyfills/unenv-runtime/mock/noop.d.mts +2 -0
  14. package/dist/polyfills/unenv-runtime/mock/noop.mjs +1 -0
  15. package/dist/polyfills/unenv-runtime/mock/proxy.d.mts +2 -0
  16. package/dist/polyfills/unenv-runtime/mock/proxy.mjs +43 -0
  17. package/dist/polyfills/unenv-runtime/node/assert/strict.d.mts +4 -0
  18. package/dist/polyfills/unenv-runtime/node/assert/strict.mjs +25 -0
  19. package/dist/polyfills/unenv-runtime/node/assert.d.mts +165 -0
  20. package/dist/polyfills/unenv-runtime/node/assert.mjs +737 -0
  21. package/dist/polyfills/unenv-runtime/node/async_hooks.d.mts +5 -0
  22. package/dist/polyfills/unenv-runtime/node/async_hooks.mjs +15 -0
  23. package/dist/polyfills/unenv-runtime/node/buffer.d.mts +19 -0
  24. package/dist/polyfills/unenv-runtime/node/buffer.mjs +35 -0
  25. package/dist/polyfills/unenv-runtime/node/child_process.d.mts +12 -0
  26. package/dist/polyfills/unenv-runtime/node/child_process.mjs +21 -0
  27. package/dist/polyfills/unenv-runtime/node/cluster.d.mts +33 -0
  28. package/dist/polyfills/unenv-runtime/node/cluster.mjs +71 -0
  29. package/dist/polyfills/unenv-runtime/node/console.d.mts +38 -0
  30. package/dist/polyfills/unenv-runtime/node/console.mjs +74 -0
  31. package/dist/polyfills/unenv-runtime/node/constants.d.mts +13 -0
  32. package/dist/polyfills/unenv-runtime/node/constants.mjs +254 -0
  33. package/dist/polyfills/unenv-runtime/node/crypto.d.mts +6 -0
  34. package/dist/polyfills/unenv-runtime/node/crypto.mjs +138 -0
  35. package/dist/polyfills/unenv-runtime/node/dgram.d.mts +6 -0
  36. package/dist/polyfills/unenv-runtime/node/dgram.mjs +12 -0
  37. package/dist/polyfills/unenv-runtime/node/diagnostics_channel.d.mts +11 -0
  38. package/dist/polyfills/unenv-runtime/node/diagnostics_channel.mjs +34 -0
  39. package/dist/polyfills/unenv-runtime/node/dns/promises.d.mts +27 -0
  40. package/dist/polyfills/unenv-runtime/node/dns/promises.mjs +75 -0
  41. package/dist/polyfills/unenv-runtime/node/dns.d.mts +29 -0
  42. package/dist/polyfills/unenv-runtime/node/dns.mjs +81 -0
  43. package/dist/polyfills/unenv-runtime/node/domain.d.mts +8 -0
  44. package/dist/polyfills/unenv-runtime/node/domain.mjs +16 -0
  45. package/dist/polyfills/unenv-runtime/node/events.d.mts +13 -0
  46. package/dist/polyfills/unenv-runtime/node/events.mjs +12 -0
  47. package/dist/polyfills/unenv-runtime/node/fs/promises.d.mts +7 -0
  48. package/dist/polyfills/unenv-runtime/node/fs/promises.mjs +38 -0
  49. package/dist/polyfills/unenv-runtime/node/fs.d.mts +10 -0
  50. package/dist/polyfills/unenv-runtime/node/fs.mjs +117 -0
  51. package/dist/polyfills/unenv-runtime/node/http.d.mts +23 -0
  52. package/dist/polyfills/unenv-runtime/node/http.mjs +45 -0
  53. package/dist/polyfills/unenv-runtime/node/http2.d.mts +15 -0
  54. package/dist/polyfills/unenv-runtime/node/http2.mjs +284 -0
  55. package/dist/polyfills/unenv-runtime/node/https.d.mts +10 -0
  56. package/dist/polyfills/unenv-runtime/node/https.mjs +16 -0
  57. package/dist/polyfills/unenv-runtime/node/inspector/promises.d.mts +10 -0
  58. package/dist/polyfills/unenv-runtime/node/inspector/promises.mjs +40 -0
  59. package/dist/polyfills/unenv-runtime/node/inspector.d.mts +12 -0
  60. package/dist/polyfills/unenv-runtime/node/inspector.mjs +53 -0
  61. package/dist/polyfills/unenv-runtime/node/internal/async_hooks/async-hook.d.mts +7 -0
  62. package/dist/polyfills/unenv-runtime/node/internal/async_hooks/async-hook.mjs +115 -0
  63. package/dist/polyfills/unenv-runtime/node/internal/async_hooks/async-local-storage.d.mts +2 -0
  64. package/dist/polyfills/unenv-runtime/node/internal/async_hooks/async-local-storage.mjs +36 -0
  65. package/dist/polyfills/unenv-runtime/node/internal/async_hooks/async-resource.d.mts +2 -0
  66. package/dist/polyfills/unenv-runtime/node/internal/async_hooks/async-resource.mjs +37 -0
  67. package/dist/polyfills/unenv-runtime/node/internal/buffer/base64.d.mts +4 -0
  68. package/dist/polyfills/unenv-runtime/node/internal/buffer/base64.mjs +97 -0
  69. package/dist/polyfills/unenv-runtime/node/internal/buffer/buffer.d.mts +13 -0
  70. package/dist/polyfills/unenv-runtime/node/internal/buffer/buffer.mjs +1846 -0
  71. package/dist/polyfills/unenv-runtime/node/internal/buffer/file.d.mts +14 -0
  72. package/dist/polyfills/unenv-runtime/node/internal/buffer/file.mjs +26 -0
  73. package/dist/polyfills/unenv-runtime/node/internal/buffer/ieee754.d.mts +4 -0
  74. package/dist/polyfills/unenv-runtime/node/internal/buffer/ieee754.mjs +89 -0
  75. package/dist/polyfills/unenv-runtime/node/internal/crypto/constants.d.mts +58 -0
  76. package/dist/polyfills/unenv-runtime/node/internal/crypto/constants.mjs +58 -0
  77. package/dist/polyfills/unenv-runtime/node/internal/crypto/node.d.mts +78 -0
  78. package/dist/polyfills/unenv-runtime/node/internal/crypto/node.mjs +110 -0
  79. package/dist/polyfills/unenv-runtime/node/internal/crypto/web.d.mts +5 -0
  80. package/dist/polyfills/unenv-runtime/node/internal/crypto/web.mjs +9 -0
  81. package/dist/polyfills/unenv-runtime/node/internal/dgram/socket.d.mts +31 -0
  82. package/dist/polyfills/unenv-runtime/node/internal/dgram/socket.mjs +61 -0
  83. package/dist/polyfills/unenv-runtime/node/internal/diagnostics_channel/channel.d.mts +18 -0
  84. package/dist/polyfills/unenv-runtime/node/internal/diagnostics_channel/channel.mjs +40 -0
  85. package/dist/polyfills/unenv-runtime/node/internal/diagnostics_channel/tracing-channel.d.mts +19 -0
  86. package/dist/polyfills/unenv-runtime/node/internal/diagnostics_channel/tracing-channel.mjs +48 -0
  87. package/dist/polyfills/unenv-runtime/node/internal/dns/constants.d.mts +28 -0
  88. package/dist/polyfills/unenv-runtime/node/internal/dns/constants.mjs +28 -0
  89. package/dist/polyfills/unenv-runtime/node/internal/domain/domain.d.mts +13 -0
  90. package/dist/polyfills/unenv-runtime/node/internal/domain/domain.mjs +19 -0
  91. package/dist/polyfills/unenv-runtime/node/internal/events/events.d.mts +207 -0
  92. package/dist/polyfills/unenv-runtime/node/internal/events/events.mjs +1097 -0
  93. package/dist/polyfills/unenv-runtime/node/internal/fs/classes.d.mts +8 -0
  94. package/dist/polyfills/unenv-runtime/node/internal/fs/classes.mjs +8 -0
  95. package/dist/polyfills/unenv-runtime/node/internal/fs/constants.d.mts +59 -0
  96. package/dist/polyfills/unenv-runtime/node/internal/fs/constants.mjs +59 -0
  97. package/dist/polyfills/unenv-runtime/node/internal/fs/fs.d.mts +96 -0
  98. package/dist/polyfills/unenv-runtime/node/internal/fs/fs.mjs +106 -0
  99. package/dist/polyfills/unenv-runtime/node/internal/fs/promises.d.mts +32 -0
  100. package/dist/polyfills/unenv-runtime/node/internal/fs/promises.mjs +32 -0
  101. package/dist/polyfills/unenv-runtime/node/internal/http/agent.d.mts +14 -0
  102. package/dist/polyfills/unenv-runtime/node/internal/http/agent.mjs +16 -0
  103. package/dist/polyfills/unenv-runtime/node/internal/http/constants.d.mts +67 -0
  104. package/dist/polyfills/unenv-runtime/node/internal/http/constants.mjs +103 -0
  105. package/dist/polyfills/unenv-runtime/node/internal/http/request.d.mts +31 -0
  106. package/dist/polyfills/unenv-runtime/node/internal/http/request.mjs +53 -0
  107. package/dist/polyfills/unenv-runtime/node/internal/http/response.d.mts +42 -0
  108. package/dist/polyfills/unenv-runtime/node/internal/http/response.mjs +101 -0
  109. package/dist/polyfills/unenv-runtime/node/internal/http2/constants.d.mts +241 -0
  110. package/dist/polyfills/unenv-runtime/node/internal/http2/constants.mjs +241 -0
  111. package/dist/polyfills/unenv-runtime/node/internal/net/server.d.mts +17 -0
  112. package/dist/polyfills/unenv-runtime/node/internal/net/server.mjs +33 -0
  113. package/dist/polyfills/unenv-runtime/node/internal/net/socket.d.mts +45 -0
  114. package/dist/polyfills/unenv-runtime/node/internal/net/socket.mjs +83 -0
  115. package/dist/polyfills/unenv-runtime/node/internal/os/constants.d.mts +133 -0
  116. package/dist/polyfills/unenv-runtime/node/internal/os/constants.mjs +133 -0
  117. package/dist/polyfills/unenv-runtime/node/internal/perf_hooks/constants.d.mts +25 -0
  118. package/dist/polyfills/unenv-runtime/node/internal/perf_hooks/constants.mjs +25 -0
  119. package/dist/polyfills/unenv-runtime/node/internal/perf_hooks/histogram.d.mts +28 -0
  120. package/dist/polyfills/unenv-runtime/node/internal/perf_hooks/histogram.mjs +43 -0
  121. package/dist/polyfills/unenv-runtime/node/internal/perf_hooks/performance.d.mts +103 -0
  122. package/dist/polyfills/unenv-runtime/node/internal/perf_hooks/performance.mjs +232 -0
  123. package/dist/polyfills/unenv-runtime/node/internal/process/env.d.mts +1 -0
  124. package/dist/polyfills/unenv-runtime/node/internal/process/env.mjs +40 -0
  125. package/dist/polyfills/unenv-runtime/node/internal/process/hrtime.d.mts +2 -0
  126. package/dist/polyfills/unenv-runtime/node/internal/process/hrtime.mjs +21 -0
  127. package/dist/polyfills/unenv-runtime/node/internal/process/nexttick.d.mts +3 -0
  128. package/dist/polyfills/unenv-runtime/node/internal/process/nexttick.mjs +55 -0
  129. package/dist/polyfills/unenv-runtime/node/internal/process/node-version.d.mts +2 -0
  130. package/dist/polyfills/unenv-runtime/node/internal/process/node-version.mjs +2 -0
  131. package/dist/polyfills/unenv-runtime/node/internal/process/process.d.mts +113 -0
  132. package/dist/polyfills/unenv-runtime/node/internal/process/process.mjs +238 -0
  133. package/dist/polyfills/unenv-runtime/node/internal/punycode/punycode.d.mts +59 -0
  134. package/dist/polyfills/unenv-runtime/node/internal/punycode/punycode.mjs +410 -0
  135. package/dist/polyfills/unenv-runtime/node/internal/querystring/querystring.d.mts +11 -0
  136. package/dist/polyfills/unenv-runtime/node/internal/querystring/querystring.mjs +320 -0
  137. package/dist/polyfills/unenv-runtime/node/internal/readline/interface.d.mts +20 -0
  138. package/dist/polyfills/unenv-runtime/node/internal/readline/interface.mjs +31 -0
  139. package/dist/polyfills/unenv-runtime/node/internal/readline/promises/interface.d.mts +7 -0
  140. package/dist/polyfills/unenv-runtime/node/internal/readline/promises/interface.mjs +6 -0
  141. package/dist/polyfills/unenv-runtime/node/internal/readline/promises/readline.d.mts +10 -0
  142. package/dist/polyfills/unenv-runtime/node/internal/readline/promises/readline.mjs +20 -0
  143. package/dist/polyfills/unenv-runtime/node/internal/stream/duplex.d.mts +3 -0
  144. package/dist/polyfills/unenv-runtime/node/internal/stream/duplex.mjs +19 -0
  145. package/dist/polyfills/unenv-runtime/node/internal/stream/readable.d.mts +67 -0
  146. package/dist/polyfills/unenv-runtime/node/internal/stream/readable.mjs +112 -0
  147. package/dist/polyfills/unenv-runtime/node/internal/stream/transform.d.mts +10 -0
  148. package/dist/polyfills/unenv-runtime/node/internal/stream/transform.mjs +9 -0
  149. package/dist/polyfills/unenv-runtime/node/internal/stream/writable.d.mts +2 -0
  150. package/dist/polyfills/unenv-runtime/node/internal/stream/writable.mjs +87 -0
  151. package/dist/polyfills/unenv-runtime/node/internal/timers/immediate.d.mts +9 -0
  152. package/dist/polyfills/unenv-runtime/node/internal/timers/immediate.mjs +28 -0
  153. package/dist/polyfills/unenv-runtime/node/internal/timers/scheduler.d.mts +6 -0
  154. package/dist/polyfills/unenv-runtime/node/internal/timers/scheduler.mjs +10 -0
  155. package/dist/polyfills/unenv-runtime/node/internal/timers/set-immediate.d.mts +3 -0
  156. package/dist/polyfills/unenv-runtime/node/internal/timers/set-immediate.mjs +13 -0
  157. package/dist/polyfills/unenv-runtime/node/internal/timers/set-interval.d.mts +2 -0
  158. package/dist/polyfills/unenv-runtime/node/internal/timers/set-interval.mjs +8 -0
  159. package/dist/polyfills/unenv-runtime/node/internal/timers/set-timeout.d.mts +3 -0
  160. package/dist/polyfills/unenv-runtime/node/internal/timers/set-timeout.mjs +11 -0
  161. package/dist/polyfills/unenv-runtime/node/internal/timers/timeout.d.mts +11 -0
  162. package/dist/polyfills/unenv-runtime/node/internal/timers/timeout.mjs +30 -0
  163. package/dist/polyfills/unenv-runtime/node/internal/tls/constants.d.mts +7 -0
  164. package/dist/polyfills/unenv-runtime/node/internal/tls/constants.mjs +7 -0
  165. package/dist/polyfills/unenv-runtime/node/internal/tls/secure-context.d.mts +4 -0
  166. package/dist/polyfills/unenv-runtime/node/internal/tls/secure-context.mjs +3 -0
  167. package/dist/polyfills/unenv-runtime/node/internal/tls/server.d.mts +9 -0
  168. package/dist/polyfills/unenv-runtime/node/internal/tls/server.mjs +15 -0
  169. package/dist/polyfills/unenv-runtime/node/internal/tls/tls-socket.d.mts +31 -0
  170. package/dist/polyfills/unenv-runtime/node/internal/tls/tls-socket.mjs +48 -0
  171. package/dist/polyfills/unenv-runtime/node/internal/trace_events/tracing.d.mts +7 -0
  172. package/dist/polyfills/unenv-runtime/node/internal/trace_events/tracing.mjs +10 -0
  173. package/dist/polyfills/unenv-runtime/node/internal/tty/read-stream.d.mts +8 -0
  174. package/dist/polyfills/unenv-runtime/node/internal/tty/read-stream.mjs +12 -0
  175. package/dist/polyfills/unenv-runtime/node/internal/tty/write-stream.d.mts +20 -0
  176. package/dist/polyfills/unenv-runtime/node/internal/tty/write-stream.mjs +44 -0
  177. package/dist/polyfills/unenv-runtime/node/internal/url/constants.d.mts +44 -0
  178. package/dist/polyfills/unenv-runtime/node/internal/url/constants.mjs +44 -0
  179. package/dist/polyfills/unenv-runtime/node/internal/url/errors.d.mts +26 -0
  180. package/dist/polyfills/unenv-runtime/node/internal/url/errors.mjs +54 -0
  181. package/dist/polyfills/unenv-runtime/node/internal/url/url.d.mts +22 -0
  182. package/dist/polyfills/unenv-runtime/node/internal/url/url.mjs +181 -0
  183. package/dist/polyfills/unenv-runtime/node/internal/url/util.d.mts +4 -0
  184. package/dist/polyfills/unenv-runtime/node/internal/url/util.mjs +7 -0
  185. package/dist/polyfills/unenv-runtime/node/internal/util/inherits.d.mts +1 -0
  186. package/dist/polyfills/unenv-runtime/node/internal/util/inherits.mjs +12 -0
  187. package/dist/polyfills/unenv-runtime/node/internal/util/legacy-types.d.mts +19 -0
  188. package/dist/polyfills/unenv-runtime/node/internal/util/legacy-types.mjs +25 -0
  189. package/dist/polyfills/unenv-runtime/node/internal/util/log.d.mts +8 -0
  190. package/dist/polyfills/unenv-runtime/node/internal/util/log.mjs +55 -0
  191. package/dist/polyfills/unenv-runtime/node/internal/util/mime.d.mts +19 -0
  192. package/dist/polyfills/unenv-runtime/node/internal/util/mime.mjs +35 -0
  193. package/dist/polyfills/unenv-runtime/node/internal/util/promisify.d.mts +3 -0
  194. package/dist/polyfills/unenv-runtime/node/internal/util/promisify.mjs +23 -0
  195. package/dist/polyfills/unenv-runtime/node/internal/util/types.d.mts +45 -0
  196. package/dist/polyfills/unenv-runtime/node/internal/util/types.mjs +45 -0
  197. package/dist/polyfills/unenv-runtime/node/internal/v8/deserializer.d.mts +12 -0
  198. package/dist/polyfills/unenv-runtime/node/internal/v8/deserializer.mjs +23 -0
  199. package/dist/polyfills/unenv-runtime/node/internal/v8/profiler.d.mts +10 -0
  200. package/dist/polyfills/unenv-runtime/node/internal/v8/profiler.mjs +11 -0
  201. package/dist/polyfills/unenv-runtime/node/internal/v8/serializer.d.mts +12 -0
  202. package/dist/polyfills/unenv-runtime/node/internal/v8/serializer.mjs +15 -0
  203. package/dist/polyfills/unenv-runtime/node/internal/vm/constants.d.mts +2 -0
  204. package/dist/polyfills/unenv-runtime/node/internal/vm/constants.mjs +2 -0
  205. package/dist/polyfills/unenv-runtime/node/internal/vm/script.d.mts +7 -0
  206. package/dist/polyfills/unenv-runtime/node/internal/vm/script.mjs +15 -0
  207. package/dist/polyfills/unenv-runtime/node/internal/worker_threads/broadcast-channel.d.mts +10 -0
  208. package/dist/polyfills/unenv-runtime/node/internal/worker_threads/broadcast-channel.mjs +13 -0
  209. package/dist/polyfills/unenv-runtime/node/internal/worker_threads/message-channel.d.mts +5 -0
  210. package/dist/polyfills/unenv-runtime/node/internal/worker_threads/message-channel.mjs +5 -0
  211. package/dist/polyfills/unenv-runtime/node/internal/worker_threads/message-port.d.mts +12 -0
  212. package/dist/polyfills/unenv-runtime/node/internal/worker_threads/message-port.mjs +17 -0
  213. package/dist/polyfills/unenv-runtime/node/internal/worker_threads/worker.d.mts +21 -0
  214. package/dist/polyfills/unenv-runtime/node/internal/worker_threads/worker.mjs +25 -0
  215. package/dist/polyfills/unenv-runtime/node/internal/zlib/codes.d.mts +21 -0
  216. package/dist/polyfills/unenv-runtime/node/internal/zlib/codes.mjs +21 -0
  217. package/dist/polyfills/unenv-runtime/node/internal/zlib/constants.d.mts +108 -0
  218. package/dist/polyfills/unenv-runtime/node/internal/zlib/constants.mjs +108 -0
  219. package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/_shared.d.mts +22 -0
  220. package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/_shared.mjs +40 -0
  221. package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/brotli.d.mts +16 -0
  222. package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/brotli.mjs +16 -0
  223. package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/deflate.d.mts +29 -0
  224. package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/deflate.mjs +36 -0
  225. package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/gzip.d.mts +16 -0
  226. package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/gzip.mjs +16 -0
  227. package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/zip.d.mts +9 -0
  228. package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/zip.mjs +9 -0
  229. package/dist/polyfills/unenv-runtime/node/module.d.mts +54 -0
  230. package/dist/polyfills/unenv-runtime/node/module.mjs +191 -0
  231. package/dist/polyfills/unenv-runtime/node/net.d.mts +22 -0
  232. package/dist/polyfills/unenv-runtime/node/net.mjs +52 -0
  233. package/dist/polyfills/unenv-runtime/node/os.d.mts +26 -0
  234. package/dist/polyfills/unenv-runtime/node/os.mjs +118 -0
  235. package/dist/polyfills/unenv-runtime/node/path/posix.d.mts +2 -0
  236. package/dist/polyfills/unenv-runtime/node/path/posix.mjs +2 -0
  237. package/dist/polyfills/unenv-runtime/node/path/win32.d.mts +2 -0
  238. package/dist/polyfills/unenv-runtime/node/path/win32.mjs +2 -0
  239. package/dist/polyfills/unenv-runtime/node/path.d.mts +12 -0
  240. package/dist/polyfills/unenv-runtime/node/path.mjs +31 -0
  241. package/dist/polyfills/unenv-runtime/node/perf_hooks.d.mts +8 -0
  242. package/dist/polyfills/unenv-runtime/node/perf_hooks.mjs +51 -0
  243. package/dist/polyfills/unenv-runtime/node/process.d.mts +3 -0
  244. package/dist/polyfills/unenv-runtime/node/process.mjs +12 -0
  245. package/dist/polyfills/unenv-runtime/node/punycode.d.mts +3 -0
  246. package/dist/polyfills/unenv-runtime/node/punycode.mjs +3 -0
  247. package/dist/polyfills/unenv-runtime/node/querystring.d.mts +49 -0
  248. package/dist/polyfills/unenv-runtime/node/querystring.mjs +766 -0
  249. package/dist/polyfills/unenv-runtime/node/readline/promises.d.mts +6 -0
  250. package/dist/polyfills/unenv-runtime/node/readline/promises.mjs +10 -0
  251. package/dist/polyfills/unenv-runtime/node/readline.d.mts +13 -0
  252. package/dist/polyfills/unenv-runtime/node/readline.mjs +21 -0
  253. package/dist/polyfills/unenv-runtime/node/repl.d.mts +10 -0
  254. package/dist/polyfills/unenv-runtime/node/repl.mjs +20 -0
  255. package/dist/polyfills/unenv-runtime/node/sqlite.d.mts +6 -0
  256. package/dist/polyfills/unenv-runtime/node/sqlite.mjs +9 -0
  257. package/dist/polyfills/unenv-runtime/node/stream/consumers.d.mts +7 -0
  258. package/dist/polyfills/unenv-runtime/node/stream/consumers.mjs +13 -0
  259. package/dist/polyfills/unenv-runtime/node/stream/promises.d.mts +4 -0
  260. package/dist/polyfills/unenv-runtime/node/stream/promises.mjs +7 -0
  261. package/dist/polyfills/unenv-runtime/node/stream/web.d.mts +24 -0
  262. package/dist/polyfills/unenv-runtime/node/stream/web.mjs +41 -0
  263. package/dist/polyfills/unenv-runtime/node/stream.d.mts +42 -0
  264. package/dist/polyfills/unenv-runtime/node/stream.mjs +54 -0
  265. package/dist/polyfills/unenv-runtime/node/string_decoder.d.mts +5 -0
  266. package/dist/polyfills/unenv-runtime/node/string_decoder.mjs +3 -0
  267. package/dist/polyfills/unenv-runtime/node/sys.d.mts +2 -0
  268. package/dist/polyfills/unenv-runtime/node/sys.mjs +2 -0
  269. package/dist/polyfills/unenv-runtime/node/timers/promises.d.mts +6 -0
  270. package/dist/polyfills/unenv-runtime/node/timers/promises.mjs +14 -0
  271. package/dist/polyfills/unenv-runtime/node/timers.d.mts +15 -0
  272. package/dist/polyfills/unenv-runtime/node/timers.mjs +32 -0
  273. package/dist/polyfills/unenv-runtime/node/tls.d.mts +15 -0
  274. package/dist/polyfills/unenv-runtime/node/tls.mjs +41 -0
  275. package/dist/polyfills/unenv-runtime/node/trace_events.d.mts +5 -0
  276. package/dist/polyfills/unenv-runtime/node/trace_events.mjs +9 -0
  277. package/dist/polyfills/unenv-runtime/node/tty.d.mts +9 -0
  278. package/dist/polyfills/unenv-runtime/node/tty.mjs +12 -0
  279. package/dist/polyfills/unenv-runtime/node/url.d.mts +61 -0
  280. package/dist/polyfills/unenv-runtime/node/url.mjs +1044 -0
  281. package/dist/polyfills/unenv-runtime/node/util/types.d.mts +3 -0
  282. package/dist/polyfills/unenv-runtime/node/util/types.mjs +3 -0
  283. package/dist/polyfills/unenv-runtime/node/util.d.mts +32 -0
  284. package/dist/polyfills/unenv-runtime/node/util.mjs +84 -0
  285. package/dist/polyfills/unenv-runtime/node/v8.d.mts +29 -0
  286. package/dist/polyfills/unenv-runtime/node/v8.mjs +108 -0
  287. package/dist/polyfills/unenv-runtime/node/vm.d.mts +15 -0
  288. package/dist/polyfills/unenv-runtime/node/vm.mjs +41 -0
  289. package/dist/polyfills/unenv-runtime/node/wasi.d.mts +4 -0
  290. package/dist/polyfills/unenv-runtime/node/wasi.mjs +3 -0
  291. package/dist/polyfills/unenv-runtime/node/worker_threads.d.mts +23 -0
  292. package/dist/polyfills/unenv-runtime/node/worker_threads.mjs +55 -0
  293. package/dist/polyfills/unenv-runtime/node/zlib.d.mts +16 -0
  294. package/dist/polyfills/unenv-runtime/node/zlib.mjs +212 -0
  295. package/dist/polyfills/unenv-runtime/npm/cross-fetch.d.mts +6 -0
  296. package/dist/polyfills/unenv-runtime/npm/cross-fetch.mjs +6 -0
  297. package/dist/polyfills/unenv-runtime/npm/debug.d.mts +15 -0
  298. package/dist/polyfills/unenv-runtime/npm/debug.mjs +43 -0
  299. package/dist/polyfills/unenv-runtime/npm/fsevents.d.mts +16 -0
  300. package/dist/polyfills/unenv-runtime/npm/fsevents.mjs +20 -0
  301. package/dist/polyfills/unenv-runtime/npm/inherits.d.mts +2 -0
  302. package/dist/polyfills/unenv-runtime/npm/inherits.mjs +2 -0
  303. package/dist/polyfills/unenv-runtime/npm/node-fetch.d.mts +12 -0
  304. package/dist/polyfills/unenv-runtime/npm/node-fetch.mjs +23 -0
  305. package/dist/polyfills/unenv-runtime/npm/whatwg-url/index.d.mts +13 -0
  306. package/dist/polyfills/unenv-runtime/npm/whatwg-url/index.mjs +15 -0
  307. package/dist/polyfills/unenv-runtime/npm/whatwg-url/webidl2js-wrapper.d.mts +2 -0
  308. package/dist/polyfills/unenv-runtime/npm/whatwg-url/webidl2js-wrapper.mjs +2 -0
  309. package/dist/polyfills/unenv-runtime/polyfill/buffer.d.mts +1 -0
  310. package/dist/polyfills/unenv-runtime/polyfill/buffer.mjs +4 -0
  311. package/dist/polyfills/unenv-runtime/polyfill/globalthis-global.d.mts +1 -0
  312. package/dist/polyfills/unenv-runtime/polyfill/globalthis-global.mjs +5 -0
  313. package/dist/polyfills/unenv-runtime/polyfill/globalthis.d.mts +2 -0
  314. package/dist/polyfills/unenv-runtime/polyfill/globalthis.mjs +2 -0
  315. package/dist/polyfills/unenv-runtime/polyfill/package.json +3 -0
  316. package/dist/polyfills/unenv-runtime/polyfill/performance.d.mts +2 -0
  317. package/dist/polyfills/unenv-runtime/polyfill/performance.mjs +10 -0
  318. package/dist/polyfills/unenv-runtime/polyfill/process.d.mts +2 -0
  319. package/dist/polyfills/unenv-runtime/polyfill/process.mjs +10 -0
  320. package/dist/polyfills/unenv-runtime/polyfill/source-maps.mjs +15 -0
  321. package/dist/polyfills/unenv-runtime/polyfill/timers.d.mts +1 -0
  322. package/dist/polyfills/unenv-runtime/polyfill/timers.mjs +7 -0
  323. package/dist/polyfills/unenv-runtime/web/performance/_polyfills.d.mts +100 -0
  324. package/dist/polyfills/unenv-runtime/web/performance/_polyfills.mjs +184 -0
  325. package/dist/polyfills/unenv-runtime/web/performance/index.d.mts +12 -0
  326. package/dist/polyfills/unenv-runtime/web/performance/index.mjs +14 -0
  327. package/dist/run.d.ts.map +1 -1
  328. package/dist/run.js +39 -10
  329. package/dist/run.js.map +1 -1
  330. package/package.json +2 -2
  331. package/src/polyfills/fs.ts +5 -3
  332. package/src/polyfills/process.ts +10 -8
  333. package/src/run.ts +41 -11
@@ -0,0 +1,320 @@
1
+ // Source: https://github.com/nodejs/node/blob/v22.7.0/lib/internal/querystring.js
2
+ class ERR_INVALID_URI extends URIError {
3
+ code = "ERR_INVALID_URI";
4
+ constructor() {
5
+ super("URI malformed");
6
+ }
7
+ }
8
+ const hexTable = Array.from({ length: 256 });
9
+ for (let i = 0; i < 256; ++i) hexTable[i] = "%" + String.prototype.toUpperCase.call((i < 16 ? "0" : "") + Number.prototype.toString.call(i, 16));
10
+ // prettier-ignore
11
+ const isHexTable = new Int8Array([
12
+ 0,
13
+ 0,
14
+ 0,
15
+ 0,
16
+ 0,
17
+ 0,
18
+ 0,
19
+ 0,
20
+ 0,
21
+ 0,
22
+ 0,
23
+ 0,
24
+ 0,
25
+ 0,
26
+ 0,
27
+ 0,
28
+ 0,
29
+ 0,
30
+ 0,
31
+ 0,
32
+ 0,
33
+ 0,
34
+ 0,
35
+ 0,
36
+ 0,
37
+ 0,
38
+ 0,
39
+ 0,
40
+ 0,
41
+ 0,
42
+ 0,
43
+ 0,
44
+ 0,
45
+ 0,
46
+ 0,
47
+ 0,
48
+ 0,
49
+ 0,
50
+ 0,
51
+ 0,
52
+ 0,
53
+ 0,
54
+ 0,
55
+ 0,
56
+ 0,
57
+ 0,
58
+ 0,
59
+ 0,
60
+ 1,
61
+ 1,
62
+ 1,
63
+ 1,
64
+ 1,
65
+ 1,
66
+ 1,
67
+ 1,
68
+ 1,
69
+ 1,
70
+ 0,
71
+ 0,
72
+ 0,
73
+ 0,
74
+ 0,
75
+ 0,
76
+ 0,
77
+ 1,
78
+ 1,
79
+ 1,
80
+ 1,
81
+ 1,
82
+ 1,
83
+ 0,
84
+ 0,
85
+ 0,
86
+ 0,
87
+ 0,
88
+ 0,
89
+ 0,
90
+ 0,
91
+ 0,
92
+ 0,
93
+ 0,
94
+ 0,
95
+ 0,
96
+ 0,
97
+ 0,
98
+ 0,
99
+ 0,
100
+ 0,
101
+ 0,
102
+ 0,
103
+ 0,
104
+ 0,
105
+ 0,
106
+ 0,
107
+ 0,
108
+ 0,
109
+ 1,
110
+ 1,
111
+ 1,
112
+ 1,
113
+ 1,
114
+ 1,
115
+ 0,
116
+ 0,
117
+ 0,
118
+ 0,
119
+ 0,
120
+ 0,
121
+ 0,
122
+ 0,
123
+ 0,
124
+ 0,
125
+ 0,
126
+ 0,
127
+ 0,
128
+ 0,
129
+ 0,
130
+ 0,
131
+ 0,
132
+ 0,
133
+ 0,
134
+ 0,
135
+ 0,
136
+ 0,
137
+ 0,
138
+ 0,
139
+ 0,
140
+ 0,
141
+ 0,
142
+ 0,
143
+ 0,
144
+ 0,
145
+ 0,
146
+ 0,
147
+ 0,
148
+ 0,
149
+ 0,
150
+ 0,
151
+ 0,
152
+ 0,
153
+ 0,
154
+ 0,
155
+ 0,
156
+ 0,
157
+ 0,
158
+ 0,
159
+ 0,
160
+ 0,
161
+ 0,
162
+ 0,
163
+ 0,
164
+ 0,
165
+ 0,
166
+ 0,
167
+ 0,
168
+ 0,
169
+ 0,
170
+ 0,
171
+ 0,
172
+ 0,
173
+ 0,
174
+ 0,
175
+ 0,
176
+ 0,
177
+ 0,
178
+ 0,
179
+ 0,
180
+ 0,
181
+ 0,
182
+ 0,
183
+ 0,
184
+ 0,
185
+ 0,
186
+ 0,
187
+ 0,
188
+ 0,
189
+ 0,
190
+ 0,
191
+ 0,
192
+ 0,
193
+ 0,
194
+ 0,
195
+ 0,
196
+ 0,
197
+ 0,
198
+ 0,
199
+ 0,
200
+ 0,
201
+ 0,
202
+ 0,
203
+ 0,
204
+ 0,
205
+ 0,
206
+ 0,
207
+ 0,
208
+ 0,
209
+ 0,
210
+ 0,
211
+ 0,
212
+ 0,
213
+ 0,
214
+ 0,
215
+ 0,
216
+ 0,
217
+ 0,
218
+ 0,
219
+ 0,
220
+ 0,
221
+ 0,
222
+ 0,
223
+ 0,
224
+ 0,
225
+ 0,
226
+ 0,
227
+ 0,
228
+ 0,
229
+ 0,
230
+ 0,
231
+ 0,
232
+ 0,
233
+ 0,
234
+ 0,
235
+ 0,
236
+ 0,
237
+ 0,
238
+ 0,
239
+ 0,
240
+ 0,
241
+ 0,
242
+ 0,
243
+ 0,
244
+ 0,
245
+ 0,
246
+ 0,
247
+ 0,
248
+ 0,
249
+ 0,
250
+ 0,
251
+ 0,
252
+ 0,
253
+ 0,
254
+ 0,
255
+ 0,
256
+ 0,
257
+ 0,
258
+ 0,
259
+ 0,
260
+ 0,
261
+ 0,
262
+ 0,
263
+ 0,
264
+ 0,
265
+ 0,
266
+ 0,
267
+ 0
268
+ ]);
269
+ /**
270
+ * @param {string} str
271
+ * @param {Int8Array} noEscapeTable
272
+ * @param {string[]} hexTable
273
+ * @returns {string}
274
+ */
275
+ function encodeStr(str, noEscapeTable, hexTable) {
276
+ const len = str.length;
277
+ if (len === 0) return "";
278
+ let out = "";
279
+ let lastPos = 0;
280
+ let i = 0;
281
+ outer: for (; i < len; i++) {
282
+ let c = String.prototype.charCodeAt.call(str, i);
283
+ // ASCII
284
+ while (c < 128) {
285
+ if (noEscapeTable[c] !== 1) {
286
+ if (lastPos < i) out += String.prototype.slice.call(str, lastPos, i);
287
+ lastPos = i + 1;
288
+ out += hexTable[c];
289
+ }
290
+ if (++i === len) break outer;
291
+ c = String.prototype.charCodeAt.call(str, i);
292
+ }
293
+ if (lastPos < i) out += String.prototype.slice.call(str, lastPos, i);
294
+ // Multi-byte characters ...
295
+ if (c < 2048) {
296
+ lastPos = i + 1;
297
+ out += hexTable[192 | c >> 6] + hexTable[128 | c & 63];
298
+ continue;
299
+ }
300
+ if (c < 55296 || c >= 57344) {
301
+ lastPos = i + 1;
302
+ out += hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
303
+ continue;
304
+ }
305
+ // Surrogate pair
306
+ ++i;
307
+ // This branch should never happen because all URLSearchParams entries
308
+ // should already be converted to USVString. But, included for
309
+ // completion's sake anyway.
310
+ if (i >= len) throw new ERR_INVALID_URI();
311
+ const c2 = String.prototype.charCodeAt.call(str, i) & 1023;
312
+ lastPos = i + 1;
313
+ c = 65536 + ((c & 1023) << 10 | c2);
314
+ out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
315
+ }
316
+ if (lastPos === 0) return str;
317
+ if (lastPos < len) return out + String.prototype.slice.call(str, lastPos);
318
+ return out;
319
+ }
320
+ export { encodeStr, hexTable, isHexTable };
@@ -0,0 +1,20 @@
1
+ import type nodeReadline from "node:readline";
2
+ import type { Abortable } from "node:events";
3
+ import { EventEmitter } from "node:events";
4
+ export declare class Interface extends EventEmitter implements nodeReadline.Interface {
5
+ terminal: boolean;
6
+ line: string;
7
+ cursor: number;
8
+ getPrompt(): string;
9
+ setPrompt(prompt: string): void;
10
+ prompt(preserveCursor?: boolean | undefined): void;
11
+ question(query: string, callback: (answer: string) => void): void;
12
+ question(query: string, options: Abortable, callback: (answer: string) => void): void;
13
+ resume();
14
+ close();
15
+ write(data: string | Buffer, key?: nodeReadline.Key | undefined): void;
16
+ write(data: string | Buffer | null | undefined, key: nodeReadline.Key): void;
17
+ getCursorPos(): nodeReadline.CursorPos;
18
+ pause();
19
+ [Symbol.asyncIterator](): NodeJS.AsyncIterator<string>;
20
+ }
@@ -0,0 +1,31 @@
1
+ import { EventEmitter } from "node:events";
2
+ export class Interface extends EventEmitter {
3
+ terminal = false;
4
+ line = "";
5
+ cursor = 0;
6
+ getPrompt() {
7
+ return "";
8
+ }
9
+ setPrompt(prompt) {}
10
+ prompt(preserveCursor) {}
11
+ question(query, options, callback) {
12
+ callback && typeof callback === "function" && callback("");
13
+ }
14
+ resume() {
15
+ return this;
16
+ }
17
+ close() {}
18
+ write(data, key) {}
19
+ getCursorPos() {
20
+ return {
21
+ rows: 0,
22
+ cols: 0
23
+ };
24
+ }
25
+ pause() {
26
+ return this;
27
+ }
28
+ async *[Symbol.asyncIterator]() {
29
+ yield "";
30
+ }
31
+ }
@@ -0,0 +1,7 @@
1
+ import type nodeReadlinePromises from "node:readline/promises";
2
+ import type { Abortable } from "node:events";
3
+ import { Interface as _Interface } from "../interface.mjs";
4
+ export declare class Interface extends _Interface implements nodeReadlinePromises.Interface {
5
+ question(query: string): Promise<string>;
6
+ question(query: string, options: Abortable): Promise<string>;
7
+ }
@@ -0,0 +1,6 @@
1
+ import { Interface as _Interface } from "../interface.mjs";
2
+ export class Interface extends _Interface {
3
+ question(query, options) {
4
+ return Promise.resolve("");
5
+ }
6
+ }
@@ -0,0 +1,10 @@
1
+ import type nodeReadlinePromises from "node:readline/promises";
2
+ import type { Direction } from "node:readline";
3
+ export declare class Readline implements nodeReadlinePromises.Readline {
4
+ clearLine(dir: Direction);
5
+ clearScreenDown();
6
+ commit(): Promise<void>;
7
+ cursorTo(x: number, y?: number | undefined);
8
+ moveCursor(dx: number, dy: number);
9
+ rollback();
10
+ }
@@ -0,0 +1,20 @@
1
+ export class Readline {
2
+ clearLine(dir) {
3
+ return this;
4
+ }
5
+ clearScreenDown() {
6
+ return this;
7
+ }
8
+ commit() {
9
+ return Promise.resolve();
10
+ }
11
+ cursorTo(x, y) {
12
+ return this;
13
+ }
14
+ moveCursor(dx, dy) {
15
+ return this;
16
+ }
17
+ rollback() {
18
+ return this;
19
+ }
20
+ }
@@ -0,0 +1,3 @@
1
+ import type nodeStream from "node:stream";
2
+ export declare const _Duplex: unknown;
3
+ export declare const Duplex: typeof nodeStream.Duplex;
@@ -0,0 +1,19 @@
1
+ import { mergeFns } from "../../../_internal/utils.mjs";
2
+ import { Readable } from "./readable.mjs";
3
+ import { Writable } from "./writable.mjs";
4
+ const __Duplex = class {
5
+ allowHalfOpen = true;
6
+ _destroy;
7
+ constructor(readable = new Readable(), writable = new Writable()) {
8
+ Object.assign(this, readable);
9
+ Object.assign(this, writable);
10
+ this._destroy = mergeFns(readable._destroy, writable._destroy);
11
+ }
12
+ };
13
+ function getDuplex() {
14
+ Object.assign(__Duplex.prototype, Readable.prototype);
15
+ Object.assign(__Duplex.prototype, Writable.prototype);
16
+ return __Duplex;
17
+ }
18
+ export const _Duplex = /* @__PURE__ */ getDuplex();
19
+ export const Duplex = globalThis.Duplex || _Duplex;
@@ -0,0 +1,67 @@
1
+ import type nodeStream from "node:stream";
2
+ import type { BufferEncoding, Callback } from "../../../_internal/types.mjs";
3
+ import { EventEmitter } from "node:events";
4
+ // Docs: https://nodejs.org/api/stream.html#stream_readable_streams
5
+ // Implementation: https://github.com/nodejs/node/blob/master/lib/internal/streams/readable.js
6
+ interface ArrayOptions {
7
+ /** the maximum concurrent invocations of `fn` to call on the stream at once. **Default: 1**. */
8
+ concurrency?: number;
9
+ /** allows destroying the stream if the signal is aborted. */
10
+ signal?: AbortSignal;
11
+ }
12
+ export declare class _Readable extends EventEmitter implements nodeStream.Readable {
13
+ __unenv__: unknown;
14
+ readonly readableEncoding: BufferEncoding | null;
15
+ readonly readableEnded: boolean;
16
+ readonly readableFlowing: boolean | null;
17
+ readonly readableHighWaterMark: number;
18
+ readonly readableLength: number;
19
+ readonly readableObjectMode: boolean;
20
+ readonly readableAborted: boolean;
21
+ readonly readableDidRead: boolean;
22
+ readonly closed: boolean;
23
+ readonly errored: Error | null;
24
+ readable: boolean;
25
+ destroyed: boolean;
26
+ static from(_iterable: Iterable<any> | AsyncIterable<any>, options?: nodeStream.ReadableOptions);
27
+ constructor(_opts?: nodeStream.ReadableOptions);
28
+ _read(_size: number);
29
+ read(_size?: number);
30
+ setEncoding(_encoding: BufferEncoding);
31
+ pause();
32
+ resume();
33
+ isPaused(): boolean;
34
+ unpipe(_destination?: any);
35
+ unshift(_chunk: any, _encoding?: BufferEncoding);
36
+ wrap(_oldStream: any);
37
+ push(_chunk: any, _encoding?: BufferEncoding): boolean;
38
+ _destroy(_error?: any, _callback?: Callback<any>);
39
+ destroy(error?: Error);
40
+ pipe<T>(_destenition: T, _options?: {
41
+ end?: boolean;
42
+ }): T;
43
+ compose<T extends NodeJS.ReadableStream>(stream: T | ((source: any) => void) | Iterable<T> | AsyncIterable<T>, options?: {
44
+ signal: AbortSignal;
45
+ } | undefined): T;
46
+ [Symbol.asyncDispose]();
47
+ // eslint-disable-next-line require-yield
48
+ [Symbol.asyncIterator](): NodeJS.AsyncIterator<any>;
49
+ iterator(options?: {
50
+ destroyOnReturn?: boolean | undefined;
51
+ } | undefined): NodeJS.AsyncIterator<any>;
52
+ map(fn: (data: any, options?: Pick<ArrayOptions, "signal"> | undefined) => any, options?: ArrayOptions | undefined): nodeStream.Readable;
53
+ filter(fn: (data: any, options?: Pick<ArrayOptions, "signal"> | undefined) => boolean, options?: ArrayOptions | undefined): nodeStream.Readable;
54
+ forEach(fn: (data: any, options?: Pick<ArrayOptions, "signal"> | undefined) => void | Promise<void>, options?: ArrayOptions | undefined): Promise<void>;
55
+ reduce(fn: (accumulator: any, data: any, options?: Pick<ArrayOptions, "signal"> | undefined) => any, initialValue?: any, options?: ArrayOptions | undefined): Promise<any>;
56
+ find(fn: (data: any, options?: Pick<ArrayOptions, "signal"> | undefined) => boolean, options?: ArrayOptions | undefined): Promise<any>;
57
+ findIndex(fn: (data: any, options?: Pick<ArrayOptions, "signal"> | undefined) => boolean, options?: ArrayOptions | undefined): Promise<number>;
58
+ some(fn: (data: any, options?: Pick<ArrayOptions, "signal"> | undefined) => boolean, options?: ArrayOptions | undefined): Promise<boolean>;
59
+ toArray(options?: Pick<ArrayOptions, "signal"> | undefined): Promise<any[]>;
60
+ every(fn: (data: any, options?: Pick<ArrayOptions, "signal"> | undefined) => boolean | Promise<boolean>, options?: ArrayOptions | undefined): Promise<boolean>;
61
+ flatMap(fn: (data: any, options?: Pick<ArrayOptions, "signal"> | undefined) => any, options?: ArrayOptions | undefined): nodeStream.Readable;
62
+ drop(limit: number, options?: Pick<ArrayOptions, "signal"> | undefined): nodeStream.Readable;
63
+ take(limit: number, options?: Pick<ArrayOptions, "signal"> | undefined): nodeStream.Readable;
64
+ asIndexedPairs(options?: Pick<ArrayOptions, "signal"> | undefined): nodeStream.Readable;
65
+ }
66
+ export declare const Readable: typeof nodeStream.Readable;
67
+ export {};
@@ -0,0 +1,112 @@
1
+ import { createNotImplementedError } from "../../../_internal/utils.mjs";
2
+ import { EventEmitter } from "node:events";
3
+ export class _Readable extends EventEmitter {
4
+ __unenv__ = true;
5
+ readableEncoding = null;
6
+ readableEnded = true;
7
+ readableFlowing = false;
8
+ readableHighWaterMark = 0;
9
+ readableLength = 0;
10
+ readableObjectMode = false;
11
+ readableAborted = false;
12
+ readableDidRead = false;
13
+ closed = false;
14
+ errored = null;
15
+ readable = false;
16
+ destroyed = false;
17
+ static from(_iterable, options) {
18
+ return new _Readable(options);
19
+ }
20
+ constructor(_opts) {
21
+ super();
22
+ }
23
+ _read(_size) {}
24
+ read(_size) {}
25
+ setEncoding(_encoding) {
26
+ return this;
27
+ }
28
+ pause() {
29
+ return this;
30
+ }
31
+ resume() {
32
+ return this;
33
+ }
34
+ isPaused() {
35
+ return true;
36
+ }
37
+ unpipe(_destination) {
38
+ return this;
39
+ }
40
+ unshift(_chunk, _encoding) {}
41
+ wrap(_oldStream) {
42
+ return this;
43
+ }
44
+ push(_chunk, _encoding) {
45
+ return false;
46
+ }
47
+ _destroy(_error, _callback) {
48
+ this.removeAllListeners();
49
+ }
50
+ destroy(error) {
51
+ this.destroyed = true;
52
+ this._destroy(error);
53
+ return this;
54
+ }
55
+ pipe(_destenition, _options) {
56
+ return {};
57
+ }
58
+ compose(stream, options) {
59
+ throw new Error("[unenv] Method not implemented.");
60
+ }
61
+ [Symbol.asyncDispose]() {
62
+ this.destroy();
63
+ return Promise.resolve();
64
+ }
65
+ // eslint-disable-next-line require-yield
66
+ async *[Symbol.asyncIterator]() {
67
+ throw createNotImplementedError("Readable.asyncIterator");
68
+ }
69
+ iterator(options) {
70
+ throw createNotImplementedError("Readable.iterator");
71
+ }
72
+ map(fn, options) {
73
+ throw createNotImplementedError("Readable.map");
74
+ }
75
+ filter(fn, options) {
76
+ throw createNotImplementedError("Readable.filter");
77
+ }
78
+ forEach(fn, options) {
79
+ throw createNotImplementedError("Readable.forEach");
80
+ }
81
+ reduce(fn, initialValue, options) {
82
+ throw createNotImplementedError("Readable.reduce");
83
+ }
84
+ find(fn, options) {
85
+ throw createNotImplementedError("Readable.find");
86
+ }
87
+ findIndex(fn, options) {
88
+ throw createNotImplementedError("Readable.findIndex");
89
+ }
90
+ some(fn, options) {
91
+ throw createNotImplementedError("Readable.some");
92
+ }
93
+ toArray(options) {
94
+ throw createNotImplementedError("Readable.toArray");
95
+ }
96
+ every(fn, options) {
97
+ throw createNotImplementedError("Readable.every");
98
+ }
99
+ flatMap(fn, options) {
100
+ throw createNotImplementedError("Readable.flatMap");
101
+ }
102
+ drop(limit, options) {
103
+ throw createNotImplementedError("Readable.drop");
104
+ }
105
+ take(limit, options) {
106
+ throw createNotImplementedError("Readable.take");
107
+ }
108
+ asIndexedPairs(options) {
109
+ throw createNotImplementedError("Readable.asIndexedPairs");
110
+ }
111
+ }
112
+ export const Readable = globalThis.Readable || _Readable;
@@ -0,0 +1,10 @@
1
+ import type nodeStream from "node:stream";
2
+ import { Duplex } from "./duplex.mjs";
3
+ // Docs: https://nodejs.org/api/stream.html#stream_duplex_and_transform_streams
4
+ // Implementation: https://github.com/nodejs/node/blob/master/lib/internal/streams/transform.js
5
+ export declare class _Transform extends Duplex implements nodeStream.Transform {
6
+ readonly __unenv__: true;
7
+ _transform(chunk: any, encoding: globalThis.BufferEncoding, callback: nodeStream.TransformCallback): void;
8
+ _flush(callback: nodeStream.TransformCallback): void;
9
+ }
10
+ export declare const Transform: typeof nodeStream.Transform;
@@ -0,0 +1,9 @@
1
+ import { Duplex } from "./duplex.mjs";
2
+ // Docs: https://nodejs.org/api/stream.html#stream_duplex_and_transform_streams
3
+ // Implementation: https://github.com/nodejs/node/blob/master/lib/internal/streams/transform.js
4
+ export class _Transform extends Duplex {
5
+ __unenv__ = true;
6
+ _transform(chunk, encoding, callback) {}
7
+ _flush(callback) {}
8
+ }
9
+ export const Transform = globalThis.Transform || _Transform;
@@ -0,0 +1,2 @@
1
+ import type nodeStream from "node:stream";
2
+ export declare const Writable: typeof nodeStream.Writable;