@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,10 @@
1
+ import type nodeWorkerThreads from "node:worker_threads";
2
+ export declare class BroadcastChannel implements nodeWorkerThreads.BroadcastChannel {
3
+ name: string;
4
+ onmessage;
5
+ onmessageerror;
6
+ close();
7
+ postMessage(message: unknown);
8
+ ref();
9
+ unref();
10
+ }
@@ -0,0 +1,13 @@
1
+ export class BroadcastChannel {
2
+ name = "";
3
+ onmessage = (message) => {};
4
+ onmessageerror = (message) => {};
5
+ close() {}
6
+ postMessage(message) {}
7
+ ref() {
8
+ return this;
9
+ }
10
+ unref() {
11
+ return this;
12
+ }
13
+ }
@@ -0,0 +1,5 @@
1
+ import type nodeWorkerThreads from "node:worker_threads";
2
+ export declare class MessageChannel implements nodeWorkerThreads.MessageChannel {
3
+ port1;
4
+ port2;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { MessagePort } from "./message-port.mjs";
2
+ export class MessageChannel {
3
+ port1 = new MessagePort();
4
+ port2 = new MessagePort();
5
+ }
@@ -0,0 +1,12 @@
1
+ import { EventEmitter } from "node:events";
2
+ import type nodeWorkerThreads from "node:worker_threads";
3
+ export declare class MessagePort extends EventEmitter implements nodeWorkerThreads.MessagePort {
4
+ close();
5
+ postMessage(value: any, transferList?: readonly nodeWorkerThreads.TransferListItem[] | undefined);
6
+ ref();
7
+ unref();
8
+ start();
9
+ addEventListener(type: string, listener: (...args: any[]) => void): void;
10
+ removeEventListener(type: string, listener: (...args: any[]) => void): void;
11
+ dispatchEvent(event: Event);
12
+ }
@@ -0,0 +1,17 @@
1
+ import { EventEmitter } from "node:events";
2
+ export class MessagePort extends EventEmitter {
3
+ close() {}
4
+ postMessage(value, transferList) {}
5
+ ref() {}
6
+ unref() {}
7
+ start() {}
8
+ addEventListener(type, listener) {
9
+ this.on(type, listener);
10
+ }
11
+ removeEventListener(type, listener) {
12
+ this.off(type, listener);
13
+ }
14
+ dispatchEvent(event) {
15
+ return this.emit(event.type, event);
16
+ }
17
+ }
@@ -0,0 +1,21 @@
1
+ import { EventEmitter } from "node:events";
2
+ import type nodeWorkerThreads from "node:worker_threads";
3
+ export declare class Worker extends EventEmitter implements nodeWorkerThreads.Worker {
4
+ stdin: null;
5
+ stdout;
6
+ stderr;
7
+ threadId: number;
8
+ performance: {
9
+ eventLoopUtilization: () => {
10
+ idle: number;
11
+ active: number;
12
+ utilization: number;
13
+ };
14
+ };
15
+ postMessage(_value: any, _transferList?: readonly nodeWorkerThreads.TransferListItem[] | undefined);
16
+ postMessageToThread(_threadId: unknown, _value: unknown, _transferList?: unknown, _timeout?: unknown): Promise<void>;
17
+ ref();
18
+ unref();
19
+ terminate();
20
+ getHeapSnapshot();
21
+ }
@@ -0,0 +1,25 @@
1
+ import { EventEmitter } from "node:events";
2
+ import { Readable } from "node:stream";
3
+ export class Worker extends EventEmitter {
4
+ stdin = null;
5
+ stdout = new Readable();
6
+ stderr = new Readable();
7
+ threadId = 0;
8
+ performance = { eventLoopUtilization: () => ({
9
+ idle: 0,
10
+ active: 0,
11
+ utilization: 0
12
+ }) };
13
+ postMessage(_value, _transferList) {}
14
+ postMessageToThread(_threadId, _value, _transferList, _timeout) {
15
+ return Promise.resolve();
16
+ }
17
+ ref() {}
18
+ unref() {}
19
+ terminate() {
20
+ return Promise.resolve(0);
21
+ }
22
+ getHeapSnapshot() {
23
+ return Promise.resolve(new Readable());
24
+ }
25
+ }
@@ -0,0 +1,21 @@
1
+ // import type nodeZlib from "node:zlib";
2
+ export declare const codes: {
3
+ "0": string;
4
+ "1": string;
5
+ "2": string;
6
+ Z_OK: number;
7
+ Z_STREAM_END: number;
8
+ Z_NEED_DICT: number;
9
+ Z_ERRNO: number;
10
+ Z_STREAM_ERROR: number;
11
+ Z_DATA_ERROR: number;
12
+ Z_MEM_ERROR: number;
13
+ Z_BUF_ERROR: number;
14
+ Z_VERSION_ERROR: number;
15
+ "-1": string;
16
+ "-2": string;
17
+ "-3": string;
18
+ "-4": string;
19
+ "-5": string;
20
+ "-6": string;
21
+ };
@@ -0,0 +1,21 @@
1
+ // import type nodeZlib from "node:zlib";
2
+ export const codes = {
3
+ "0": "Z_OK",
4
+ "1": "Z_STREAM_END",
5
+ "2": "Z_NEED_DICT",
6
+ Z_OK: 0,
7
+ Z_STREAM_END: 1,
8
+ Z_NEED_DICT: 2,
9
+ Z_ERRNO: -1,
10
+ Z_STREAM_ERROR: -2,
11
+ Z_DATA_ERROR: -3,
12
+ Z_MEM_ERROR: -4,
13
+ Z_BUF_ERROR: -5,
14
+ Z_VERSION_ERROR: -6,
15
+ "-1": "Z_ERRNO",
16
+ "-2": "Z_STREAM_ERROR",
17
+ "-3": "Z_DATA_ERROR",
18
+ "-4": "Z_MEM_ERROR",
19
+ "-5": "Z_BUF_ERROR",
20
+ "-6": "Z_VERSION_ERROR"
21
+ };
@@ -0,0 +1,108 @@
1
+ // npx -y node@22.14 -e 'const{constants}=require("zlib");console.log(Object.entries(constants).map(([k,v]) => `export const ${k} = ${JSON.stringify(v)}`).join("\n"))'
2
+ export declare const Z_NO_FLUSH = 0;
3
+ export declare const Z_PARTIAL_FLUSH = 1;
4
+ export declare const Z_SYNC_FLUSH = 2;
5
+ export declare const Z_FULL_FLUSH = 3;
6
+ export declare const Z_FINISH = 4;
7
+ export declare const Z_BLOCK = 5;
8
+ export declare const Z_OK = 0;
9
+ export declare const Z_STREAM_END = 1;
10
+ export declare const Z_NEED_DICT = 2;
11
+ export declare const Z_ERRNO = -1;
12
+ export declare const Z_STREAM_ERROR = -2;
13
+ export declare const Z_DATA_ERROR = -3;
14
+ export declare const Z_MEM_ERROR = -4;
15
+ export declare const Z_BUF_ERROR = -5;
16
+ export declare const Z_VERSION_ERROR = -6;
17
+ export declare const Z_NO_COMPRESSION = 0;
18
+ export declare const Z_BEST_SPEED = 1;
19
+ export declare const Z_BEST_COMPRESSION = 9;
20
+ export declare const Z_DEFAULT_COMPRESSION = -1;
21
+ export declare const Z_FILTERED = 1;
22
+ export declare const Z_HUFFMAN_ONLY = 2;
23
+ export declare const Z_RLE = 3;
24
+ export declare const Z_FIXED = 4;
25
+ export declare const Z_DEFAULT_STRATEGY = 0;
26
+ export declare const ZLIB_VERNUM = 4865;
27
+ export declare const DEFLATE = 1;
28
+ export declare const INFLATE = 2;
29
+ export declare const GZIP = 3;
30
+ export declare const GUNZIP = 4;
31
+ export declare const DEFLATERAW = 5;
32
+ export declare const INFLATERAW = 6;
33
+ export declare const UNZIP = 7;
34
+ export declare const BROTLI_DECODE = 8;
35
+ export declare const BROTLI_ENCODE = 9;
36
+ export declare const Z_MIN_WINDOWBITS = 8;
37
+ export declare const Z_MAX_WINDOWBITS = 15;
38
+ export declare const Z_DEFAULT_WINDOWBITS = 15;
39
+ export declare const Z_MIN_CHUNK = 64;
40
+ export declare const Z_MAX_CHUNK: unknown;
41
+ export declare const Z_DEFAULT_CHUNK = 16384;
42
+ export declare const Z_MIN_MEMLEVEL = 1;
43
+ export declare const Z_MAX_MEMLEVEL = 9;
44
+ export declare const Z_DEFAULT_MEMLEVEL = 8;
45
+ export declare const Z_MIN_LEVEL = -1;
46
+ export declare const Z_MAX_LEVEL = 9;
47
+ export declare const Z_DEFAULT_LEVEL = -1;
48
+ export declare const BROTLI_OPERATION_PROCESS = 0;
49
+ export declare const BROTLI_OPERATION_FLUSH = 1;
50
+ export declare const BROTLI_OPERATION_FINISH = 2;
51
+ export declare const BROTLI_OPERATION_EMIT_METADATA = 3;
52
+ export declare const BROTLI_PARAM_MODE = 0;
53
+ export declare const BROTLI_MODE_GENERIC = 0;
54
+ export declare const BROTLI_MODE_TEXT = 1;
55
+ export declare const BROTLI_MODE_FONT = 2;
56
+ export declare const BROTLI_DEFAULT_MODE = 0;
57
+ export declare const BROTLI_PARAM_QUALITY = 1;
58
+ export declare const BROTLI_MIN_QUALITY = 0;
59
+ export declare const BROTLI_MAX_QUALITY = 11;
60
+ export declare const BROTLI_DEFAULT_QUALITY = 11;
61
+ export declare const BROTLI_PARAM_LGWIN = 2;
62
+ export declare const BROTLI_MIN_WINDOW_BITS = 10;
63
+ export declare const BROTLI_MAX_WINDOW_BITS = 24;
64
+ export declare const BROTLI_LARGE_MAX_WINDOW_BITS = 30;
65
+ export declare const BROTLI_DEFAULT_WINDOW = 22;
66
+ export declare const BROTLI_PARAM_LGBLOCK = 3;
67
+ export declare const BROTLI_MIN_INPUT_BLOCK_BITS = 16;
68
+ export declare const BROTLI_MAX_INPUT_BLOCK_BITS = 24;
69
+ export declare const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING = 4;
70
+ export declare const BROTLI_PARAM_SIZE_HINT = 5;
71
+ export declare const BROTLI_PARAM_LARGE_WINDOW = 6;
72
+ export declare const BROTLI_PARAM_NPOSTFIX = 7;
73
+ export declare const BROTLI_PARAM_NDIRECT = 8;
74
+ export declare const BROTLI_DECODER_RESULT_ERROR = 0;
75
+ export declare const BROTLI_DECODER_RESULT_SUCCESS = 1;
76
+ export declare const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT = 2;
77
+ export declare const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT = 3;
78
+ export declare const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION = 0;
79
+ export declare const BROTLI_DECODER_PARAM_LARGE_WINDOW = 1;
80
+ export declare const BROTLI_DECODER_NO_ERROR = 0;
81
+ export declare const BROTLI_DECODER_SUCCESS = 1;
82
+ export declare const BROTLI_DECODER_NEEDS_MORE_INPUT = 2;
83
+ export declare const BROTLI_DECODER_NEEDS_MORE_OUTPUT = 3;
84
+ export declare const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE = -1;
85
+ export declare const BROTLI_DECODER_ERROR_FORMAT_RESERVED = -2;
86
+ export declare const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE = -3;
87
+ export declare const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET = -4;
88
+ export declare const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME = -5;
89
+ export declare const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE = -6;
90
+ export declare const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE = -7;
91
+ export declare const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT = -8;
92
+ export declare const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1 = -9;
93
+ export declare const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2 = -10;
94
+ export declare const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM = -11;
95
+ export declare const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY = -12;
96
+ export declare const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS = -13;
97
+ export declare const BROTLI_DECODER_ERROR_FORMAT_PADDING_1 = -14;
98
+ export declare const BROTLI_DECODER_ERROR_FORMAT_PADDING_2 = -15;
99
+ export declare const BROTLI_DECODER_ERROR_FORMAT_DISTANCE = -16;
100
+ export declare const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET = -19;
101
+ export declare const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS = -20;
102
+ export declare const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES = -21;
103
+ export declare const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS = -22;
104
+ export declare const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP = -25;
105
+ export declare const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1 = -26;
106
+ export declare const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2 = -27;
107
+ export declare const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES = -30;
108
+ export declare const BROTLI_DECODER_ERROR_UNREACHABLE = -31;
@@ -0,0 +1,108 @@
1
+ // npx -y node@22.14 -e 'const{constants}=require("zlib");console.log(Object.entries(constants).map(([k,v]) => `export const ${k} = ${JSON.stringify(v)}`).join("\n"))'
2
+ export const Z_NO_FLUSH = 0;
3
+ export const Z_PARTIAL_FLUSH = 1;
4
+ export const Z_SYNC_FLUSH = 2;
5
+ export const Z_FULL_FLUSH = 3;
6
+ export const Z_FINISH = 4;
7
+ export const Z_BLOCK = 5;
8
+ export const Z_OK = 0;
9
+ export const Z_STREAM_END = 1;
10
+ export const Z_NEED_DICT = 2;
11
+ export const Z_ERRNO = -1;
12
+ export const Z_STREAM_ERROR = -2;
13
+ export const Z_DATA_ERROR = -3;
14
+ export const Z_MEM_ERROR = -4;
15
+ export const Z_BUF_ERROR = -5;
16
+ export const Z_VERSION_ERROR = -6;
17
+ export const Z_NO_COMPRESSION = 0;
18
+ export const Z_BEST_SPEED = 1;
19
+ export const Z_BEST_COMPRESSION = 9;
20
+ export const Z_DEFAULT_COMPRESSION = -1;
21
+ export const Z_FILTERED = 1;
22
+ export const Z_HUFFMAN_ONLY = 2;
23
+ export const Z_RLE = 3;
24
+ export const Z_FIXED = 4;
25
+ export const Z_DEFAULT_STRATEGY = 0;
26
+ export const ZLIB_VERNUM = 4865;
27
+ export const DEFLATE = 1;
28
+ export const INFLATE = 2;
29
+ export const GZIP = 3;
30
+ export const GUNZIP = 4;
31
+ export const DEFLATERAW = 5;
32
+ export const INFLATERAW = 6;
33
+ export const UNZIP = 7;
34
+ export const BROTLI_DECODE = 8;
35
+ export const BROTLI_ENCODE = 9;
36
+ export const Z_MIN_WINDOWBITS = 8;
37
+ export const Z_MAX_WINDOWBITS = 15;
38
+ export const Z_DEFAULT_WINDOWBITS = 15;
39
+ export const Z_MIN_CHUNK = 64;
40
+ export const Z_MAX_CHUNK = Number.POSITIVE_INFINITY;
41
+ export const Z_DEFAULT_CHUNK = 16384;
42
+ export const Z_MIN_MEMLEVEL = 1;
43
+ export const Z_MAX_MEMLEVEL = 9;
44
+ export const Z_DEFAULT_MEMLEVEL = 8;
45
+ export const Z_MIN_LEVEL = -1;
46
+ export const Z_MAX_LEVEL = 9;
47
+ export const Z_DEFAULT_LEVEL = -1;
48
+ export const BROTLI_OPERATION_PROCESS = 0;
49
+ export const BROTLI_OPERATION_FLUSH = 1;
50
+ export const BROTLI_OPERATION_FINISH = 2;
51
+ export const BROTLI_OPERATION_EMIT_METADATA = 3;
52
+ export const BROTLI_PARAM_MODE = 0;
53
+ export const BROTLI_MODE_GENERIC = 0;
54
+ export const BROTLI_MODE_TEXT = 1;
55
+ export const BROTLI_MODE_FONT = 2;
56
+ export const BROTLI_DEFAULT_MODE = 0;
57
+ export const BROTLI_PARAM_QUALITY = 1;
58
+ export const BROTLI_MIN_QUALITY = 0;
59
+ export const BROTLI_MAX_QUALITY = 11;
60
+ export const BROTLI_DEFAULT_QUALITY = 11;
61
+ export const BROTLI_PARAM_LGWIN = 2;
62
+ export const BROTLI_MIN_WINDOW_BITS = 10;
63
+ export const BROTLI_MAX_WINDOW_BITS = 24;
64
+ export const BROTLI_LARGE_MAX_WINDOW_BITS = 30;
65
+ export const BROTLI_DEFAULT_WINDOW = 22;
66
+ export const BROTLI_PARAM_LGBLOCK = 3;
67
+ export const BROTLI_MIN_INPUT_BLOCK_BITS = 16;
68
+ export const BROTLI_MAX_INPUT_BLOCK_BITS = 24;
69
+ export const BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING = 4;
70
+ export const BROTLI_PARAM_SIZE_HINT = 5;
71
+ export const BROTLI_PARAM_LARGE_WINDOW = 6;
72
+ export const BROTLI_PARAM_NPOSTFIX = 7;
73
+ export const BROTLI_PARAM_NDIRECT = 8;
74
+ export const BROTLI_DECODER_RESULT_ERROR = 0;
75
+ export const BROTLI_DECODER_RESULT_SUCCESS = 1;
76
+ export const BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT = 2;
77
+ export const BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT = 3;
78
+ export const BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION = 0;
79
+ export const BROTLI_DECODER_PARAM_LARGE_WINDOW = 1;
80
+ export const BROTLI_DECODER_NO_ERROR = 0;
81
+ export const BROTLI_DECODER_SUCCESS = 1;
82
+ export const BROTLI_DECODER_NEEDS_MORE_INPUT = 2;
83
+ export const BROTLI_DECODER_NEEDS_MORE_OUTPUT = 3;
84
+ export const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE = -1;
85
+ export const BROTLI_DECODER_ERROR_FORMAT_RESERVED = -2;
86
+ export const BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE = -3;
87
+ export const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET = -4;
88
+ export const BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME = -5;
89
+ export const BROTLI_DECODER_ERROR_FORMAT_CL_SPACE = -6;
90
+ export const BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE = -7;
91
+ export const BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT = -8;
92
+ export const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1 = -9;
93
+ export const BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2 = -10;
94
+ export const BROTLI_DECODER_ERROR_FORMAT_TRANSFORM = -11;
95
+ export const BROTLI_DECODER_ERROR_FORMAT_DICTIONARY = -12;
96
+ export const BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS = -13;
97
+ export const BROTLI_DECODER_ERROR_FORMAT_PADDING_1 = -14;
98
+ export const BROTLI_DECODER_ERROR_FORMAT_PADDING_2 = -15;
99
+ export const BROTLI_DECODER_ERROR_FORMAT_DISTANCE = -16;
100
+ export const BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET = -19;
101
+ export const BROTLI_DECODER_ERROR_INVALID_ARGUMENTS = -20;
102
+ export const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES = -21;
103
+ export const BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS = -22;
104
+ export const BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP = -25;
105
+ export const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1 = -26;
106
+ export const BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2 = -27;
107
+ export const BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES = -30;
108
+ export const BROTLI_DECODER_ERROR_UNREACHABLE = -31;
@@ -0,0 +1,22 @@
1
+ import type nodeZlib from "node:zlib";
2
+ import { Transform, type TransformOptions } from "node:stream";
3
+ // Compression
4
+ export declare abstract class ZlibCompress extends Transform {
5
+ readonly __unenv__: true;
6
+ readonly bytesRead = 0;
7
+ readonly bytesWritten = 0;
8
+ abstract readonly _format: undefined | "deflate" | "gzip" | "zlib" | "brotli" | "zip";
9
+ constructor(opts?: TransformOptions);
10
+ close(callback?: () => void);
11
+ flush(kind?: number | undefined, callback?: (() => void) | undefined): void;
12
+ flush(callback?: (() => void) | undefined): void;
13
+ }
14
+ // Decompression
15
+ export declare abstract class ZLibDecompress extends ZlibCompress {}
16
+ // Mock Compress/Decompress Function factory
17
+ export interface CompressFunction {
18
+ (buf: nodeZlib.InputType, options?: any, callback?: nodeZlib.CompressCallback): void;
19
+ (buf: Buffer, callback?: nodeZlib.CompressCallback): void;
20
+ __promisify__(buffer: nodeZlib.InputType, options?: any): Promise<Buffer>;
21
+ }
22
+ export declare function notImplementedCompress(format: string): CompressFunction;
@@ -0,0 +1,40 @@
1
+ import { Transform } from "node:stream";
2
+ import { createNotImplementedError } from "../../../../_internal/utils.mjs";
3
+ // Compression
4
+ export class ZlibCompress extends Transform {
5
+ __unenv__ = true;
6
+ bytesRead = 0;
7
+ bytesWritten = 0;
8
+ constructor(opts) {
9
+ super(opts);
10
+ throw createNotImplementedError("zlib is not implemented yet!");
11
+ }
12
+ close(callback) {
13
+ if (typeof callback === "function") {
14
+ callback();
15
+ }
16
+ }
17
+ flush(kind, callback) {
18
+ if (typeof callback === "function") {
19
+ callback();
20
+ }
21
+ }
22
+ }
23
+ // Decompression
24
+ export class ZLibDecompress extends ZlibCompress {}
25
+ export function notImplementedCompress(format) {
26
+ const fn = function(_buf, arg2, arg3) {
27
+ const cb = typeof arg2 === "function" ? arg2 : arg3;
28
+ const err = new Error(`[unenv] zlib ${format} compression not supported.`);
29
+ if (typeof cb === "function") {
30
+ cb(err, Buffer.from(""));
31
+ } else {
32
+ throw err;
33
+ }
34
+ };
35
+ return Object.assign(fn, { __promisify__: (buffer, options) => {
36
+ return new Promise((resolve, reject) => {
37
+ fn(buffer, options, (err, result) => err ? reject(err) : resolve(result));
38
+ });
39
+ } });
40
+ }
@@ -0,0 +1,16 @@
1
+ import type nodeZlib from "node:zlib";
2
+ import { ZlibCompress, ZLibDecompress } from "./_shared.mjs";
3
+ // Brotli Compression
4
+ export declare class BrotliCompress extends ZlibCompress {
5
+ readonly _format = "brotli";
6
+ }
7
+ export declare const brotliCompress: typeof nodeZlib.brotliCompress;
8
+ export declare const createBrotliCompress: typeof nodeZlib.createBrotliCompress;
9
+ export declare const brotliCompressSync: typeof nodeZlib.brotliCompressSync;
10
+ // Brotli Decompression
11
+ export declare class BrotliDecompress extends ZLibDecompress {
12
+ readonly _format = "brotli";
13
+ }
14
+ export declare const brotliDecompress: typeof nodeZlib.brotliDecompress;
15
+ export declare const createBrotliDecompress: typeof nodeZlib.createBrotliDecompress;
16
+ export declare const brotliDecompressSync: typeof nodeZlib.brotliDecompressSync;
@@ -0,0 +1,16 @@
1
+ import { notImplemented } from "../../../../_internal/utils.mjs";
2
+ import { ZlibCompress, ZLibDecompress, notImplementedCompress } from "./_shared.mjs";
3
+ // Brotli Compression
4
+ export class BrotliCompress extends ZlibCompress {
5
+ _format = "brotli";
6
+ }
7
+ export const brotliCompress = notImplementedCompress("brotliCompress");
8
+ export const createBrotliCompress = () => new BrotliCompress();
9
+ export const brotliCompressSync = /* @__PURE__ */ notImplemented("zlib.brotliCompressSync");
10
+ // Brotli Decompression
11
+ export class BrotliDecompress extends ZLibDecompress {
12
+ _format = "brotli";
13
+ }
14
+ export const brotliDecompress = notImplementedCompress("brotliDecompress");
15
+ export const createBrotliDecompress = () => new BrotliDecompress();
16
+ export const brotliDecompressSync = /* @__PURE__ */ notImplemented("zlib.brotliDecompressSync");
@@ -0,0 +1,29 @@
1
+ import type nodeZlib from "node:zlib";
2
+ import { ZlibCompress, ZLibDecompress } from "./_shared.mjs";
3
+ // Deflate Compression
4
+ export declare class Deflate extends ZlibCompress {
5
+ readonly _format = "deflate";
6
+ params(level: number, strategy: number, callback: () => void);
7
+ reset();
8
+ }
9
+ export declare const deflate: typeof nodeZlib.deflate;
10
+ export declare const createDeflate: typeof nodeZlib.createDeflate;
11
+ export declare const deflateSync: typeof nodeZlib.deflateSync;
12
+ // Deflate Decompress(Inflate)
13
+ export declare class Inflate extends ZLibDecompress {
14
+ readonly _format = "deflate";
15
+ reset();
16
+ }
17
+ export declare const inflate: typeof nodeZlib.inflate;
18
+ export declare const createInflate: typeof nodeZlib.createInflate;
19
+ export declare const inflateSync: typeof nodeZlib.inflateSync;
20
+ // Deflate Raw Compression
21
+ export declare class DeflateRaw extends Deflate {}
22
+ export declare const deflateRaw: typeof nodeZlib.deflateRaw;
23
+ export declare const createDeflateRaw: typeof nodeZlib.createDeflateRaw;
24
+ export declare const deflateRawSync: typeof nodeZlib.deflateRawSync;
25
+ // Inflate Raw Decompress (Inflate Raw)
26
+ export declare class InflateRaw extends Inflate {}
27
+ export declare const inflateRaw: typeof nodeZlib.inflateRaw;
28
+ export declare const createInflateRaw: typeof nodeZlib.createInflateRaw;
29
+ export declare const inflateRawSync: typeof nodeZlib.inflateRawSync;
@@ -0,0 +1,36 @@
1
+ import { createNotImplementedError } from "../../../../_internal/utils.mjs";
2
+ import { notImplemented } from "../../../../_internal/utils.mjs";
3
+ import { ZlibCompress, ZLibDecompress, notImplementedCompress } from "./_shared.mjs";
4
+ // Deflate Compression
5
+ export class Deflate extends ZlibCompress {
6
+ _format = "deflate";
7
+ params(level, strategy, callback) {
8
+ throw createNotImplementedError("Deflate.params");
9
+ }
10
+ reset() {
11
+ throw createNotImplementedError("Deflate.reset");
12
+ }
13
+ }
14
+ export const deflate = notImplementedCompress("deflate");
15
+ export const createDeflate = () => new Deflate();
16
+ export const deflateSync = /* @__PURE__ */ notImplemented("zlib.deflateSync");
17
+ // Deflate Decompress(Inflate)
18
+ export class Inflate extends ZLibDecompress {
19
+ _format = "deflate";
20
+ reset() {
21
+ throw createNotImplementedError("Inflate.reset");
22
+ }
23
+ }
24
+ export const inflate = notImplementedCompress("inflate");
25
+ export const createInflate = () => new Inflate();
26
+ export const inflateSync = /* @__PURE__ */ notImplemented("zlib.inflateSync");
27
+ // Deflate Raw Compression
28
+ export class DeflateRaw extends Deflate {}
29
+ export const deflateRaw = notImplementedCompress("deflateRaw");
30
+ export const createDeflateRaw = () => new DeflateRaw();
31
+ export const deflateRawSync = /* @__PURE__ */ notImplemented("zlib.deflateRawSync");
32
+ // Inflate Raw Decompress (Inflate Raw)
33
+ export class InflateRaw extends Inflate {}
34
+ export const inflateRaw = notImplementedCompress("inflateRaw");
35
+ export const createInflateRaw = () => new InflateRaw();
36
+ export const inflateRawSync = /* @__PURE__ */ notImplemented("zlib.inflateRawSync");
@@ -0,0 +1,16 @@
1
+ import type nodeZlib from "node:zlib";
2
+ import { ZlibCompress, ZLibDecompress } from "./_shared.mjs";
3
+ // Gzip Compression
4
+ export declare class Gzip extends ZlibCompress {
5
+ readonly _format = "gzip";
6
+ }
7
+ export declare const gzip: typeof nodeZlib.gzip;
8
+ export declare const createGzip: typeof nodeZlib.createGzip;
9
+ export declare const gzipSync: typeof nodeZlib.gzipSync;
10
+ // Gzip Decompression
11
+ export declare class Gunzip extends ZLibDecompress {
12
+ readonly _format = "gzip";
13
+ }
14
+ export declare const gunzip: typeof nodeZlib.gunzip;
15
+ export declare const createGunzip: typeof nodeZlib.createGunzip;
16
+ export declare const gunzipSync: typeof nodeZlib.gunzipSync;
@@ -0,0 +1,16 @@
1
+ import { notImplemented } from "../../../../_internal/utils.mjs";
2
+ import { ZlibCompress, ZLibDecompress, notImplementedCompress } from "./_shared.mjs";
3
+ // Gzip Compression
4
+ export class Gzip extends ZlibCompress {
5
+ _format = "gzip";
6
+ }
7
+ export const gzip = notImplementedCompress("gzip");
8
+ export const createGzip = () => new Gzip();
9
+ export const gzipSync = /* @__PURE__ */ notImplemented("zlib.gzipSync");
10
+ // Gzip Decompression
11
+ export class Gunzip extends ZLibDecompress {
12
+ _format = "gzip";
13
+ }
14
+ export const gunzip = notImplementedCompress("gunzip");
15
+ export const createGunzip = () => new Gunzip();
16
+ export const gunzipSync = /* @__PURE__ */ notImplemented("zlib.gunzipSync");
@@ -0,0 +1,9 @@
1
+ import type nodeZlib from "node:zlib";
2
+ import { ZlibCompress } from "./_shared.mjs";
3
+ // Zip Decompression
4
+ export declare class Unzip extends ZlibCompress {
5
+ readonly _format = "zip";
6
+ }
7
+ export declare const createUnzip: typeof nodeZlib.createUnzip;
8
+ export declare const unzip: typeof nodeZlib.unzip;
9
+ export declare const unzipSync: typeof nodeZlib.unzipSync;
@@ -0,0 +1,9 @@
1
+ import { notImplemented } from "../../../../_internal/utils.mjs";
2
+ import { ZlibCompress } from "./_shared.mjs";
3
+ // Zip Decompression
4
+ export class Unzip extends ZlibCompress {
5
+ _format = "zip";
6
+ }
7
+ export const createUnzip = () => new Unzip();
8
+ export const unzip = /* @__PURE__ */ notImplemented("zlib.unzip");
9
+ export const unzipSync = /* @__PURE__ */ notImplemented("zlib.unzipSync");
@@ -0,0 +1,54 @@
1
+ // https://nodejs.org/api/module.html
2
+ import type nodeModule from "node:module";
3
+ export declare const _cache: unknown;
4
+ export declare const _extensions: {};
5
+ export declare const createRequire: unknown;
6
+ export declare const getCompileCacheDir: typeof nodeModule.getCompileCacheDir;
7
+ export declare const enableCompileCache: typeof nodeModule.enableCompileCache;
8
+ export declare const constants: typeof nodeModule.constants;
9
+ // prettier-ignore
10
+ export declare const builtinModules: typeof nodeModule.builtinModules;
11
+ export declare const isBuiltin: typeof nodeModule.isBuiltin;
12
+ export declare const runMain: typeof nodeModule.runMain;
13
+ export declare const register: typeof nodeModule.register;
14
+ export declare const syncBuiltinESMExports: typeof nodeModule.syncBuiltinESMExports;
15
+ export declare const findSourceMap: typeof nodeModule.findSourceMap;
16
+ export declare const flushCompileCache: typeof nodeModule.flushCompileCache;
17
+ export declare const wrap: typeof nodeModule.wrap;
18
+ export declare const wrapper: unknown;
19
+ export declare const stripTypeScriptTypes: typeof nodeModule.stripTypeScriptTypes;
20
+ export declare const SourceMap: typeof nodeModule.SourceMap;
21
+ export declare const _debug: unknown;
22
+ export declare const _findPath: unknown;
23
+ export declare const _initPaths: unknown;
24
+ export declare const _load: unknown;
25
+ export declare const _nodeModulePaths: unknown;
26
+ export declare const _preloadModules: unknown;
27
+ export declare const _resolveFilename: unknown;
28
+ export declare const _resolveLookupPaths: unknown;
29
+ export declare const _stat: unknown;
30
+ export declare const _readPackage: unknown;
31
+ export declare const findPackageJSON: unknown;
32
+ export declare const getSourceMapsSupport: unknown;
33
+ export declare const setSourceMapsSupport: unknown;
34
+ export declare const _pathCache: unknown;
35
+ export declare const globalPaths: unknown;
36
+ // export class _Module implements NodeJS.Module {
37
+ // require: NodeJS.Require;
38
+ // id: string;
39
+ // filename: string;
40
+ // exports = Object.create(null);
41
+ // parent = undefined;
42
+ // loaded = true;
43
+ // children = [];
44
+ // isPreloading: boolean = false;
45
+ // path: string = "/";
46
+ // paths: string[] = [];
47
+ // constructor(id = "index.js") {
48
+ // this.id = id;
49
+ // this.filename = id;
50
+ // this.require = createRequire(id);
51
+ // }
52
+ // }
53
+ export declare const Module: {};
54
+ export default Module;