@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.
- package/dist/polyfills/fs.d.ts.map +1 -1
- package/dist/polyfills/fs.js +4 -3
- package/dist/polyfills/fs.js.map +1 -1
- package/dist/polyfills/process.d.ts.map +1 -1
- package/dist/polyfills/process.js +10 -8
- package/dist/polyfills/process.js.map +1 -1
- package/dist/polyfills/unenv-runtime/_internal/types.d.mts +5 -0
- package/dist/polyfills/unenv-runtime/_internal/types.mjs +1 -0
- package/dist/polyfills/unenv-runtime/_internal/utils.d.mts +14 -0
- package/dist/polyfills/unenv-runtime/_internal/utils.mjs +49 -0
- package/dist/polyfills/unenv-runtime/mock/empty.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/mock/empty.mjs +1 -0
- package/dist/polyfills/unenv-runtime/mock/noop.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/mock/noop.mjs +1 -0
- package/dist/polyfills/unenv-runtime/mock/proxy.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/mock/proxy.mjs +43 -0
- package/dist/polyfills/unenv-runtime/node/assert/strict.d.mts +4 -0
- package/dist/polyfills/unenv-runtime/node/assert/strict.mjs +25 -0
- package/dist/polyfills/unenv-runtime/node/assert.d.mts +165 -0
- package/dist/polyfills/unenv-runtime/node/assert.mjs +737 -0
- package/dist/polyfills/unenv-runtime/node/async_hooks.d.mts +5 -0
- package/dist/polyfills/unenv-runtime/node/async_hooks.mjs +15 -0
- package/dist/polyfills/unenv-runtime/node/buffer.d.mts +19 -0
- package/dist/polyfills/unenv-runtime/node/buffer.mjs +35 -0
- package/dist/polyfills/unenv-runtime/node/child_process.d.mts +12 -0
- package/dist/polyfills/unenv-runtime/node/child_process.mjs +21 -0
- package/dist/polyfills/unenv-runtime/node/cluster.d.mts +33 -0
- package/dist/polyfills/unenv-runtime/node/cluster.mjs +71 -0
- package/dist/polyfills/unenv-runtime/node/console.d.mts +38 -0
- package/dist/polyfills/unenv-runtime/node/console.mjs +74 -0
- package/dist/polyfills/unenv-runtime/node/constants.d.mts +13 -0
- package/dist/polyfills/unenv-runtime/node/constants.mjs +254 -0
- package/dist/polyfills/unenv-runtime/node/crypto.d.mts +6 -0
- package/dist/polyfills/unenv-runtime/node/crypto.mjs +138 -0
- package/dist/polyfills/unenv-runtime/node/dgram.d.mts +6 -0
- package/dist/polyfills/unenv-runtime/node/dgram.mjs +12 -0
- package/dist/polyfills/unenv-runtime/node/diagnostics_channel.d.mts +11 -0
- package/dist/polyfills/unenv-runtime/node/diagnostics_channel.mjs +34 -0
- package/dist/polyfills/unenv-runtime/node/dns/promises.d.mts +27 -0
- package/dist/polyfills/unenv-runtime/node/dns/promises.mjs +75 -0
- package/dist/polyfills/unenv-runtime/node/dns.d.mts +29 -0
- package/dist/polyfills/unenv-runtime/node/dns.mjs +81 -0
- package/dist/polyfills/unenv-runtime/node/domain.d.mts +8 -0
- package/dist/polyfills/unenv-runtime/node/domain.mjs +16 -0
- package/dist/polyfills/unenv-runtime/node/events.d.mts +13 -0
- package/dist/polyfills/unenv-runtime/node/events.mjs +12 -0
- package/dist/polyfills/unenv-runtime/node/fs/promises.d.mts +7 -0
- package/dist/polyfills/unenv-runtime/node/fs/promises.mjs +38 -0
- package/dist/polyfills/unenv-runtime/node/fs.d.mts +10 -0
- package/dist/polyfills/unenv-runtime/node/fs.mjs +117 -0
- package/dist/polyfills/unenv-runtime/node/http.d.mts +23 -0
- package/dist/polyfills/unenv-runtime/node/http.mjs +45 -0
- package/dist/polyfills/unenv-runtime/node/http2.d.mts +15 -0
- package/dist/polyfills/unenv-runtime/node/http2.mjs +284 -0
- package/dist/polyfills/unenv-runtime/node/https.d.mts +10 -0
- package/dist/polyfills/unenv-runtime/node/https.mjs +16 -0
- package/dist/polyfills/unenv-runtime/node/inspector/promises.d.mts +10 -0
- package/dist/polyfills/unenv-runtime/node/inspector/promises.mjs +40 -0
- package/dist/polyfills/unenv-runtime/node/inspector.d.mts +12 -0
- package/dist/polyfills/unenv-runtime/node/inspector.mjs +53 -0
- package/dist/polyfills/unenv-runtime/node/internal/async_hooks/async-hook.d.mts +7 -0
- package/dist/polyfills/unenv-runtime/node/internal/async_hooks/async-hook.mjs +115 -0
- package/dist/polyfills/unenv-runtime/node/internal/async_hooks/async-local-storage.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/node/internal/async_hooks/async-local-storage.mjs +36 -0
- package/dist/polyfills/unenv-runtime/node/internal/async_hooks/async-resource.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/node/internal/async_hooks/async-resource.mjs +37 -0
- package/dist/polyfills/unenv-runtime/node/internal/buffer/base64.d.mts +4 -0
- package/dist/polyfills/unenv-runtime/node/internal/buffer/base64.mjs +97 -0
- package/dist/polyfills/unenv-runtime/node/internal/buffer/buffer.d.mts +13 -0
- package/dist/polyfills/unenv-runtime/node/internal/buffer/buffer.mjs +1846 -0
- package/dist/polyfills/unenv-runtime/node/internal/buffer/file.d.mts +14 -0
- package/dist/polyfills/unenv-runtime/node/internal/buffer/file.mjs +26 -0
- package/dist/polyfills/unenv-runtime/node/internal/buffer/ieee754.d.mts +4 -0
- package/dist/polyfills/unenv-runtime/node/internal/buffer/ieee754.mjs +89 -0
- package/dist/polyfills/unenv-runtime/node/internal/crypto/constants.d.mts +58 -0
- package/dist/polyfills/unenv-runtime/node/internal/crypto/constants.mjs +58 -0
- package/dist/polyfills/unenv-runtime/node/internal/crypto/node.d.mts +78 -0
- package/dist/polyfills/unenv-runtime/node/internal/crypto/node.mjs +110 -0
- package/dist/polyfills/unenv-runtime/node/internal/crypto/web.d.mts +5 -0
- package/dist/polyfills/unenv-runtime/node/internal/crypto/web.mjs +9 -0
- package/dist/polyfills/unenv-runtime/node/internal/dgram/socket.d.mts +31 -0
- package/dist/polyfills/unenv-runtime/node/internal/dgram/socket.mjs +61 -0
- package/dist/polyfills/unenv-runtime/node/internal/diagnostics_channel/channel.d.mts +18 -0
- package/dist/polyfills/unenv-runtime/node/internal/diagnostics_channel/channel.mjs +40 -0
- package/dist/polyfills/unenv-runtime/node/internal/diagnostics_channel/tracing-channel.d.mts +19 -0
- package/dist/polyfills/unenv-runtime/node/internal/diagnostics_channel/tracing-channel.mjs +48 -0
- package/dist/polyfills/unenv-runtime/node/internal/dns/constants.d.mts +28 -0
- package/dist/polyfills/unenv-runtime/node/internal/dns/constants.mjs +28 -0
- package/dist/polyfills/unenv-runtime/node/internal/domain/domain.d.mts +13 -0
- package/dist/polyfills/unenv-runtime/node/internal/domain/domain.mjs +19 -0
- package/dist/polyfills/unenv-runtime/node/internal/events/events.d.mts +207 -0
- package/dist/polyfills/unenv-runtime/node/internal/events/events.mjs +1097 -0
- package/dist/polyfills/unenv-runtime/node/internal/fs/classes.d.mts +8 -0
- package/dist/polyfills/unenv-runtime/node/internal/fs/classes.mjs +8 -0
- package/dist/polyfills/unenv-runtime/node/internal/fs/constants.d.mts +59 -0
- package/dist/polyfills/unenv-runtime/node/internal/fs/constants.mjs +59 -0
- package/dist/polyfills/unenv-runtime/node/internal/fs/fs.d.mts +96 -0
- package/dist/polyfills/unenv-runtime/node/internal/fs/fs.mjs +106 -0
- package/dist/polyfills/unenv-runtime/node/internal/fs/promises.d.mts +32 -0
- package/dist/polyfills/unenv-runtime/node/internal/fs/promises.mjs +32 -0
- package/dist/polyfills/unenv-runtime/node/internal/http/agent.d.mts +14 -0
- package/dist/polyfills/unenv-runtime/node/internal/http/agent.mjs +16 -0
- package/dist/polyfills/unenv-runtime/node/internal/http/constants.d.mts +67 -0
- package/dist/polyfills/unenv-runtime/node/internal/http/constants.mjs +103 -0
- package/dist/polyfills/unenv-runtime/node/internal/http/request.d.mts +31 -0
- package/dist/polyfills/unenv-runtime/node/internal/http/request.mjs +53 -0
- package/dist/polyfills/unenv-runtime/node/internal/http/response.d.mts +42 -0
- package/dist/polyfills/unenv-runtime/node/internal/http/response.mjs +101 -0
- package/dist/polyfills/unenv-runtime/node/internal/http2/constants.d.mts +241 -0
- package/dist/polyfills/unenv-runtime/node/internal/http2/constants.mjs +241 -0
- package/dist/polyfills/unenv-runtime/node/internal/net/server.d.mts +17 -0
- package/dist/polyfills/unenv-runtime/node/internal/net/server.mjs +33 -0
- package/dist/polyfills/unenv-runtime/node/internal/net/socket.d.mts +45 -0
- package/dist/polyfills/unenv-runtime/node/internal/net/socket.mjs +83 -0
- package/dist/polyfills/unenv-runtime/node/internal/os/constants.d.mts +133 -0
- package/dist/polyfills/unenv-runtime/node/internal/os/constants.mjs +133 -0
- package/dist/polyfills/unenv-runtime/node/internal/perf_hooks/constants.d.mts +25 -0
- package/dist/polyfills/unenv-runtime/node/internal/perf_hooks/constants.mjs +25 -0
- package/dist/polyfills/unenv-runtime/node/internal/perf_hooks/histogram.d.mts +28 -0
- package/dist/polyfills/unenv-runtime/node/internal/perf_hooks/histogram.mjs +43 -0
- package/dist/polyfills/unenv-runtime/node/internal/perf_hooks/performance.d.mts +103 -0
- package/dist/polyfills/unenv-runtime/node/internal/perf_hooks/performance.mjs +232 -0
- package/dist/polyfills/unenv-runtime/node/internal/process/env.d.mts +1 -0
- package/dist/polyfills/unenv-runtime/node/internal/process/env.mjs +40 -0
- package/dist/polyfills/unenv-runtime/node/internal/process/hrtime.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/node/internal/process/hrtime.mjs +21 -0
- package/dist/polyfills/unenv-runtime/node/internal/process/nexttick.d.mts +3 -0
- package/dist/polyfills/unenv-runtime/node/internal/process/nexttick.mjs +55 -0
- package/dist/polyfills/unenv-runtime/node/internal/process/node-version.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/node/internal/process/node-version.mjs +2 -0
- package/dist/polyfills/unenv-runtime/node/internal/process/process.d.mts +113 -0
- package/dist/polyfills/unenv-runtime/node/internal/process/process.mjs +238 -0
- package/dist/polyfills/unenv-runtime/node/internal/punycode/punycode.d.mts +59 -0
- package/dist/polyfills/unenv-runtime/node/internal/punycode/punycode.mjs +410 -0
- package/dist/polyfills/unenv-runtime/node/internal/querystring/querystring.d.mts +11 -0
- package/dist/polyfills/unenv-runtime/node/internal/querystring/querystring.mjs +320 -0
- package/dist/polyfills/unenv-runtime/node/internal/readline/interface.d.mts +20 -0
- package/dist/polyfills/unenv-runtime/node/internal/readline/interface.mjs +31 -0
- package/dist/polyfills/unenv-runtime/node/internal/readline/promises/interface.d.mts +7 -0
- package/dist/polyfills/unenv-runtime/node/internal/readline/promises/interface.mjs +6 -0
- package/dist/polyfills/unenv-runtime/node/internal/readline/promises/readline.d.mts +10 -0
- package/dist/polyfills/unenv-runtime/node/internal/readline/promises/readline.mjs +20 -0
- package/dist/polyfills/unenv-runtime/node/internal/stream/duplex.d.mts +3 -0
- package/dist/polyfills/unenv-runtime/node/internal/stream/duplex.mjs +19 -0
- package/dist/polyfills/unenv-runtime/node/internal/stream/readable.d.mts +67 -0
- package/dist/polyfills/unenv-runtime/node/internal/stream/readable.mjs +112 -0
- package/dist/polyfills/unenv-runtime/node/internal/stream/transform.d.mts +10 -0
- package/dist/polyfills/unenv-runtime/node/internal/stream/transform.mjs +9 -0
- package/dist/polyfills/unenv-runtime/node/internal/stream/writable.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/node/internal/stream/writable.mjs +87 -0
- package/dist/polyfills/unenv-runtime/node/internal/timers/immediate.d.mts +9 -0
- package/dist/polyfills/unenv-runtime/node/internal/timers/immediate.mjs +28 -0
- package/dist/polyfills/unenv-runtime/node/internal/timers/scheduler.d.mts +6 -0
- package/dist/polyfills/unenv-runtime/node/internal/timers/scheduler.mjs +10 -0
- package/dist/polyfills/unenv-runtime/node/internal/timers/set-immediate.d.mts +3 -0
- package/dist/polyfills/unenv-runtime/node/internal/timers/set-immediate.mjs +13 -0
- package/dist/polyfills/unenv-runtime/node/internal/timers/set-interval.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/node/internal/timers/set-interval.mjs +8 -0
- package/dist/polyfills/unenv-runtime/node/internal/timers/set-timeout.d.mts +3 -0
- package/dist/polyfills/unenv-runtime/node/internal/timers/set-timeout.mjs +11 -0
- package/dist/polyfills/unenv-runtime/node/internal/timers/timeout.d.mts +11 -0
- package/dist/polyfills/unenv-runtime/node/internal/timers/timeout.mjs +30 -0
- package/dist/polyfills/unenv-runtime/node/internal/tls/constants.d.mts +7 -0
- package/dist/polyfills/unenv-runtime/node/internal/tls/constants.mjs +7 -0
- package/dist/polyfills/unenv-runtime/node/internal/tls/secure-context.d.mts +4 -0
- package/dist/polyfills/unenv-runtime/node/internal/tls/secure-context.mjs +3 -0
- package/dist/polyfills/unenv-runtime/node/internal/tls/server.d.mts +9 -0
- package/dist/polyfills/unenv-runtime/node/internal/tls/server.mjs +15 -0
- package/dist/polyfills/unenv-runtime/node/internal/tls/tls-socket.d.mts +31 -0
- package/dist/polyfills/unenv-runtime/node/internal/tls/tls-socket.mjs +48 -0
- package/dist/polyfills/unenv-runtime/node/internal/trace_events/tracing.d.mts +7 -0
- package/dist/polyfills/unenv-runtime/node/internal/trace_events/tracing.mjs +10 -0
- package/dist/polyfills/unenv-runtime/node/internal/tty/read-stream.d.mts +8 -0
- package/dist/polyfills/unenv-runtime/node/internal/tty/read-stream.mjs +12 -0
- package/dist/polyfills/unenv-runtime/node/internal/tty/write-stream.d.mts +20 -0
- package/dist/polyfills/unenv-runtime/node/internal/tty/write-stream.mjs +44 -0
- package/dist/polyfills/unenv-runtime/node/internal/url/constants.d.mts +44 -0
- package/dist/polyfills/unenv-runtime/node/internal/url/constants.mjs +44 -0
- package/dist/polyfills/unenv-runtime/node/internal/url/errors.d.mts +26 -0
- package/dist/polyfills/unenv-runtime/node/internal/url/errors.mjs +54 -0
- package/dist/polyfills/unenv-runtime/node/internal/url/url.d.mts +22 -0
- package/dist/polyfills/unenv-runtime/node/internal/url/url.mjs +181 -0
- package/dist/polyfills/unenv-runtime/node/internal/url/util.d.mts +4 -0
- package/dist/polyfills/unenv-runtime/node/internal/url/util.mjs +7 -0
- package/dist/polyfills/unenv-runtime/node/internal/util/inherits.d.mts +1 -0
- package/dist/polyfills/unenv-runtime/node/internal/util/inherits.mjs +12 -0
- package/dist/polyfills/unenv-runtime/node/internal/util/legacy-types.d.mts +19 -0
- package/dist/polyfills/unenv-runtime/node/internal/util/legacy-types.mjs +25 -0
- package/dist/polyfills/unenv-runtime/node/internal/util/log.d.mts +8 -0
- package/dist/polyfills/unenv-runtime/node/internal/util/log.mjs +55 -0
- package/dist/polyfills/unenv-runtime/node/internal/util/mime.d.mts +19 -0
- package/dist/polyfills/unenv-runtime/node/internal/util/mime.mjs +35 -0
- package/dist/polyfills/unenv-runtime/node/internal/util/promisify.d.mts +3 -0
- package/dist/polyfills/unenv-runtime/node/internal/util/promisify.mjs +23 -0
- package/dist/polyfills/unenv-runtime/node/internal/util/types.d.mts +45 -0
- package/dist/polyfills/unenv-runtime/node/internal/util/types.mjs +45 -0
- package/dist/polyfills/unenv-runtime/node/internal/v8/deserializer.d.mts +12 -0
- package/dist/polyfills/unenv-runtime/node/internal/v8/deserializer.mjs +23 -0
- package/dist/polyfills/unenv-runtime/node/internal/v8/profiler.d.mts +10 -0
- package/dist/polyfills/unenv-runtime/node/internal/v8/profiler.mjs +11 -0
- package/dist/polyfills/unenv-runtime/node/internal/v8/serializer.d.mts +12 -0
- package/dist/polyfills/unenv-runtime/node/internal/v8/serializer.mjs +15 -0
- package/dist/polyfills/unenv-runtime/node/internal/vm/constants.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/node/internal/vm/constants.mjs +2 -0
- package/dist/polyfills/unenv-runtime/node/internal/vm/script.d.mts +7 -0
- package/dist/polyfills/unenv-runtime/node/internal/vm/script.mjs +15 -0
- package/dist/polyfills/unenv-runtime/node/internal/worker_threads/broadcast-channel.d.mts +10 -0
- package/dist/polyfills/unenv-runtime/node/internal/worker_threads/broadcast-channel.mjs +13 -0
- package/dist/polyfills/unenv-runtime/node/internal/worker_threads/message-channel.d.mts +5 -0
- package/dist/polyfills/unenv-runtime/node/internal/worker_threads/message-channel.mjs +5 -0
- package/dist/polyfills/unenv-runtime/node/internal/worker_threads/message-port.d.mts +12 -0
- package/dist/polyfills/unenv-runtime/node/internal/worker_threads/message-port.mjs +17 -0
- package/dist/polyfills/unenv-runtime/node/internal/worker_threads/worker.d.mts +21 -0
- package/dist/polyfills/unenv-runtime/node/internal/worker_threads/worker.mjs +25 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/codes.d.mts +21 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/codes.mjs +21 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/constants.d.mts +108 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/constants.mjs +108 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/_shared.d.mts +22 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/_shared.mjs +40 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/brotli.d.mts +16 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/brotli.mjs +16 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/deflate.d.mts +29 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/deflate.mjs +36 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/gzip.d.mts +16 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/gzip.mjs +16 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/zip.d.mts +9 -0
- package/dist/polyfills/unenv-runtime/node/internal/zlib/formats/zip.mjs +9 -0
- package/dist/polyfills/unenv-runtime/node/module.d.mts +54 -0
- package/dist/polyfills/unenv-runtime/node/module.mjs +191 -0
- package/dist/polyfills/unenv-runtime/node/net.d.mts +22 -0
- package/dist/polyfills/unenv-runtime/node/net.mjs +52 -0
- package/dist/polyfills/unenv-runtime/node/os.d.mts +26 -0
- package/dist/polyfills/unenv-runtime/node/os.mjs +118 -0
- package/dist/polyfills/unenv-runtime/node/path/posix.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/node/path/posix.mjs +2 -0
- package/dist/polyfills/unenv-runtime/node/path/win32.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/node/path/win32.mjs +2 -0
- package/dist/polyfills/unenv-runtime/node/path.d.mts +12 -0
- package/dist/polyfills/unenv-runtime/node/path.mjs +31 -0
- package/dist/polyfills/unenv-runtime/node/perf_hooks.d.mts +8 -0
- package/dist/polyfills/unenv-runtime/node/perf_hooks.mjs +51 -0
- package/dist/polyfills/unenv-runtime/node/process.d.mts +3 -0
- package/dist/polyfills/unenv-runtime/node/process.mjs +12 -0
- package/dist/polyfills/unenv-runtime/node/punycode.d.mts +3 -0
- package/dist/polyfills/unenv-runtime/node/punycode.mjs +3 -0
- package/dist/polyfills/unenv-runtime/node/querystring.d.mts +49 -0
- package/dist/polyfills/unenv-runtime/node/querystring.mjs +766 -0
- package/dist/polyfills/unenv-runtime/node/readline/promises.d.mts +6 -0
- package/dist/polyfills/unenv-runtime/node/readline/promises.mjs +10 -0
- package/dist/polyfills/unenv-runtime/node/readline.d.mts +13 -0
- package/dist/polyfills/unenv-runtime/node/readline.mjs +21 -0
- package/dist/polyfills/unenv-runtime/node/repl.d.mts +10 -0
- package/dist/polyfills/unenv-runtime/node/repl.mjs +20 -0
- package/dist/polyfills/unenv-runtime/node/sqlite.d.mts +6 -0
- package/dist/polyfills/unenv-runtime/node/sqlite.mjs +9 -0
- package/dist/polyfills/unenv-runtime/node/stream/consumers.d.mts +7 -0
- package/dist/polyfills/unenv-runtime/node/stream/consumers.mjs +13 -0
- package/dist/polyfills/unenv-runtime/node/stream/promises.d.mts +4 -0
- package/dist/polyfills/unenv-runtime/node/stream/promises.mjs +7 -0
- package/dist/polyfills/unenv-runtime/node/stream/web.d.mts +24 -0
- package/dist/polyfills/unenv-runtime/node/stream/web.mjs +41 -0
- package/dist/polyfills/unenv-runtime/node/stream.d.mts +42 -0
- package/dist/polyfills/unenv-runtime/node/stream.mjs +54 -0
- package/dist/polyfills/unenv-runtime/node/string_decoder.d.mts +5 -0
- package/dist/polyfills/unenv-runtime/node/string_decoder.mjs +3 -0
- package/dist/polyfills/unenv-runtime/node/sys.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/node/sys.mjs +2 -0
- package/dist/polyfills/unenv-runtime/node/timers/promises.d.mts +6 -0
- package/dist/polyfills/unenv-runtime/node/timers/promises.mjs +14 -0
- package/dist/polyfills/unenv-runtime/node/timers.d.mts +15 -0
- package/dist/polyfills/unenv-runtime/node/timers.mjs +32 -0
- package/dist/polyfills/unenv-runtime/node/tls.d.mts +15 -0
- package/dist/polyfills/unenv-runtime/node/tls.mjs +41 -0
- package/dist/polyfills/unenv-runtime/node/trace_events.d.mts +5 -0
- package/dist/polyfills/unenv-runtime/node/trace_events.mjs +9 -0
- package/dist/polyfills/unenv-runtime/node/tty.d.mts +9 -0
- package/dist/polyfills/unenv-runtime/node/tty.mjs +12 -0
- package/dist/polyfills/unenv-runtime/node/url.d.mts +61 -0
- package/dist/polyfills/unenv-runtime/node/url.mjs +1044 -0
- package/dist/polyfills/unenv-runtime/node/util/types.d.mts +3 -0
- package/dist/polyfills/unenv-runtime/node/util/types.mjs +3 -0
- package/dist/polyfills/unenv-runtime/node/util.d.mts +32 -0
- package/dist/polyfills/unenv-runtime/node/util.mjs +84 -0
- package/dist/polyfills/unenv-runtime/node/v8.d.mts +29 -0
- package/dist/polyfills/unenv-runtime/node/v8.mjs +108 -0
- package/dist/polyfills/unenv-runtime/node/vm.d.mts +15 -0
- package/dist/polyfills/unenv-runtime/node/vm.mjs +41 -0
- package/dist/polyfills/unenv-runtime/node/wasi.d.mts +4 -0
- package/dist/polyfills/unenv-runtime/node/wasi.mjs +3 -0
- package/dist/polyfills/unenv-runtime/node/worker_threads.d.mts +23 -0
- package/dist/polyfills/unenv-runtime/node/worker_threads.mjs +55 -0
- package/dist/polyfills/unenv-runtime/node/zlib.d.mts +16 -0
- package/dist/polyfills/unenv-runtime/node/zlib.mjs +212 -0
- package/dist/polyfills/unenv-runtime/npm/cross-fetch.d.mts +6 -0
- package/dist/polyfills/unenv-runtime/npm/cross-fetch.mjs +6 -0
- package/dist/polyfills/unenv-runtime/npm/debug.d.mts +15 -0
- package/dist/polyfills/unenv-runtime/npm/debug.mjs +43 -0
- package/dist/polyfills/unenv-runtime/npm/fsevents.d.mts +16 -0
- package/dist/polyfills/unenv-runtime/npm/fsevents.mjs +20 -0
- package/dist/polyfills/unenv-runtime/npm/inherits.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/npm/inherits.mjs +2 -0
- package/dist/polyfills/unenv-runtime/npm/node-fetch.d.mts +12 -0
- package/dist/polyfills/unenv-runtime/npm/node-fetch.mjs +23 -0
- package/dist/polyfills/unenv-runtime/npm/whatwg-url/index.d.mts +13 -0
- package/dist/polyfills/unenv-runtime/npm/whatwg-url/index.mjs +15 -0
- package/dist/polyfills/unenv-runtime/npm/whatwg-url/webidl2js-wrapper.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/npm/whatwg-url/webidl2js-wrapper.mjs +2 -0
- package/dist/polyfills/unenv-runtime/polyfill/buffer.d.mts +1 -0
- package/dist/polyfills/unenv-runtime/polyfill/buffer.mjs +4 -0
- package/dist/polyfills/unenv-runtime/polyfill/globalthis-global.d.mts +1 -0
- package/dist/polyfills/unenv-runtime/polyfill/globalthis-global.mjs +5 -0
- package/dist/polyfills/unenv-runtime/polyfill/globalthis.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/polyfill/globalthis.mjs +2 -0
- package/dist/polyfills/unenv-runtime/polyfill/package.json +3 -0
- package/dist/polyfills/unenv-runtime/polyfill/performance.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/polyfill/performance.mjs +10 -0
- package/dist/polyfills/unenv-runtime/polyfill/process.d.mts +2 -0
- package/dist/polyfills/unenv-runtime/polyfill/process.mjs +10 -0
- package/dist/polyfills/unenv-runtime/polyfill/source-maps.mjs +15 -0
- package/dist/polyfills/unenv-runtime/polyfill/timers.d.mts +1 -0
- package/dist/polyfills/unenv-runtime/polyfill/timers.mjs +7 -0
- package/dist/polyfills/unenv-runtime/web/performance/_polyfills.d.mts +100 -0
- package/dist/polyfills/unenv-runtime/web/performance/_polyfills.mjs +184 -0
- package/dist/polyfills/unenv-runtime/web/performance/index.d.mts +12 -0
- package/dist/polyfills/unenv-runtime/web/performance/index.mjs +14 -0
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +39 -10
- package/dist/run.js.map +1 -1
- package/package.json +2 -2
- package/src/polyfills/fs.ts +5 -3
- package/src/polyfills/process.ts +10 -8
- package/src/run.ts +41 -11
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
2
|
+
// Docs: https://nodejs.org/api/stream.html#stream_writable_streams
|
|
3
|
+
// Implementation: https://github.com/nodejs/node/blob/master/lib/internal/streams/writable.js
|
|
4
|
+
class _Writable extends EventEmitter {
|
|
5
|
+
__unenv__ = true;
|
|
6
|
+
writable = true;
|
|
7
|
+
writableEnded = false;
|
|
8
|
+
writableFinished = false;
|
|
9
|
+
writableHighWaterMark = 0;
|
|
10
|
+
writableLength = 0;
|
|
11
|
+
writableObjectMode = false;
|
|
12
|
+
writableCorked = 0;
|
|
13
|
+
closed = false;
|
|
14
|
+
errored = null;
|
|
15
|
+
writableNeedDrain = false;
|
|
16
|
+
destroyed = false;
|
|
17
|
+
_data;
|
|
18
|
+
_encoding = "utf-8";
|
|
19
|
+
constructor(_opts) {
|
|
20
|
+
super();
|
|
21
|
+
}
|
|
22
|
+
pipe(_destenition, _options) {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
_write(chunk, encoding, callback) {
|
|
26
|
+
if (this.writableEnded) {
|
|
27
|
+
if (callback) {
|
|
28
|
+
callback();
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (this._data === undefined) {
|
|
33
|
+
this._data = chunk;
|
|
34
|
+
} else {
|
|
35
|
+
const a = typeof this._data === "string" ? Buffer.from(this._data, this._encoding || encoding || "utf8") : this._data;
|
|
36
|
+
const b = typeof chunk === "string" ? Buffer.from(chunk, encoding || this._encoding || "utf8") : chunk;
|
|
37
|
+
this._data = Buffer.concat([a, b]);
|
|
38
|
+
}
|
|
39
|
+
this._encoding = encoding;
|
|
40
|
+
if (callback) {
|
|
41
|
+
callback();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
_writev(_chunks, _callback) {}
|
|
45
|
+
_destroy(_error, _callback) {}
|
|
46
|
+
_final(_callback) {}
|
|
47
|
+
write(chunk, arg2, arg3) {
|
|
48
|
+
const encoding = typeof arg2 === "string" ? this._encoding : "utf-8";
|
|
49
|
+
const cb = typeof arg2 === "function" ? arg2 : typeof arg3 === "function" ? arg3 : undefined;
|
|
50
|
+
this._write(chunk, encoding, cb);
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
setDefaultEncoding(_encoding) {
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
end(arg1, arg2, arg3) {
|
|
57
|
+
const callback = typeof arg1 === "function" ? arg1 : typeof arg2 === "function" ? arg2 : typeof arg3 === "function" ? arg3 : undefined;
|
|
58
|
+
if (this.writableEnded) {
|
|
59
|
+
if (callback) {
|
|
60
|
+
callback();
|
|
61
|
+
}
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
const data = arg1 === callback ? undefined : arg1;
|
|
65
|
+
if (data) {
|
|
66
|
+
const encoding = arg2 === callback ? undefined : arg2;
|
|
67
|
+
this.write(data, encoding, callback);
|
|
68
|
+
}
|
|
69
|
+
this.writableEnded = true;
|
|
70
|
+
this.writableFinished = true;
|
|
71
|
+
this.emit("close");
|
|
72
|
+
this.emit("finish");
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
cork() {}
|
|
76
|
+
uncork() {}
|
|
77
|
+
destroy(_error) {
|
|
78
|
+
this.destroyed = true;
|
|
79
|
+
delete this._data;
|
|
80
|
+
this.removeAllListeners();
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
compose(stream, options) {
|
|
84
|
+
throw new Error("[h3] Method not implemented.");
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
export const Writable = globalThis.Writable || _Writable;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class Immediate<TArgs extends any[]> implements NodeJS.Immediate {
|
|
2
|
+
_onImmediate: (...args: TArgs) => void;
|
|
3
|
+
private _timeout?;
|
|
4
|
+
constructor(callback: (...args: TArgs) => void, args: TArgs);
|
|
5
|
+
ref(): this;
|
|
6
|
+
unref(): this;
|
|
7
|
+
hasRef(): boolean;
|
|
8
|
+
[Symbol.dispose]();
|
|
9
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export class Immediate {
|
|
2
|
+
_onImmediate;
|
|
3
|
+
_timeout;
|
|
4
|
+
constructor(callback, args) {
|
|
5
|
+
this._onImmediate = callback;
|
|
6
|
+
if ("setTimeout" in globalThis) {
|
|
7
|
+
this._timeout = setTimeout(callback, 0, ...args);
|
|
8
|
+
} else {
|
|
9
|
+
callback(...args);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
ref() {
|
|
13
|
+
this._timeout?.ref();
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
unref() {
|
|
17
|
+
this._timeout?.unref();
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
hasRef() {
|
|
21
|
+
return this._timeout?.hasRef() ?? false;
|
|
22
|
+
}
|
|
23
|
+
[Symbol.dispose]() {
|
|
24
|
+
if ("clearTimeout" in globalThis) {
|
|
25
|
+
clearTimeout(this._timeout);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { setTimeoutFallbackPromises as setTimeout } from "./set-timeout.mjs";
|
|
2
|
+
import { setImmediateFallbackPromises as setImmediate } from "./set-immediate.mjs";
|
|
3
|
+
export class Scheduler {
|
|
4
|
+
wait(delay, options) {
|
|
5
|
+
return setTimeout(delay, undefined, options);
|
|
6
|
+
}
|
|
7
|
+
yield() {
|
|
8
|
+
return setImmediate();
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function setImmediateFallbackPromises<T = void>(value?: T): Promise<T>;
|
|
2
|
+
export declare function setImmediateFallback<TArgs extends any[]>(callback: (...args: TArgs) => void, ...args: TArgs): NodeJS.Immediate;
|
|
3
|
+
export declare function clearImmediateFallback(immediate: NodeJS.Immediate | undefined);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Immediate } from "./immediate.mjs";
|
|
2
|
+
export function setImmediateFallbackPromises(value) {
|
|
3
|
+
return new Promise((res) => {
|
|
4
|
+
res(value);
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
export function setImmediateFallback(callback, ...args) {
|
|
8
|
+
return new Immediate(callback, args);
|
|
9
|
+
}
|
|
10
|
+
setImmediateFallback.__promisify__ = setImmediateFallbackPromises;
|
|
11
|
+
export function clearImmediateFallback(immediate) {
|
|
12
|
+
immediate?.[Symbol.dispose]();
|
|
13
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Timeout } from "./timeout.mjs";
|
|
2
|
+
export async function* setIntervalFallbackPromises(delay, value) {
|
|
3
|
+
yield value;
|
|
4
|
+
}
|
|
5
|
+
export function setIntervalFallback(callback, ms, ...args) {
|
|
6
|
+
return new Timeout(callback, args);
|
|
7
|
+
}
|
|
8
|
+
setIntervalFallback.__promisify__ = setIntervalFallbackPromises;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type nodeTimers from "node:timers";
|
|
2
|
+
export declare function setTimeoutFallbackPromises<T = void>(delay?: number, value?: T, options?: nodeTimers.TimerOptions): Promise<T>;
|
|
3
|
+
export declare function setTimeoutFallback(callback: TimerHandler, ms?: number): NodeJS.Timeout;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Timeout } from "./timeout.mjs";
|
|
2
|
+
export function setTimeoutFallbackPromises(delay, value, options) {
|
|
3
|
+
return new Promise((res) => {
|
|
4
|
+
// NOTE: we are ignoring options?.signal? as promise is immediately resolved
|
|
5
|
+
res(value);
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
export function setTimeoutFallback(callback, ms, ...args) {
|
|
9
|
+
return new Timeout(callback, args);
|
|
10
|
+
}
|
|
11
|
+
setTimeoutFallback.__promisify__ = setTimeoutFallbackPromises;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class Timeout<TArgs extends any[]> implements NodeJS.Timeout {
|
|
2
|
+
constructor(callback: TimerHandler, args: TArgs);
|
|
3
|
+
close(): this;
|
|
4
|
+
_onTimeout(...args: any[]): void;
|
|
5
|
+
ref();
|
|
6
|
+
unref();
|
|
7
|
+
hasRef(): boolean;
|
|
8
|
+
refresh();
|
|
9
|
+
[Symbol.dispose]();
|
|
10
|
+
[Symbol.toPrimitive](): number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createNotImplementedError } from "../../../_internal/utils.mjs";
|
|
2
|
+
export class Timeout {
|
|
3
|
+
constructor(callback, args) {
|
|
4
|
+
if (typeof callback === "function") {
|
|
5
|
+
callback(...args);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
close() {
|
|
9
|
+
throw createNotImplementedError("node.timers.timeout.close");
|
|
10
|
+
}
|
|
11
|
+
_onTimeout(...args) {
|
|
12
|
+
throw createNotImplementedError("node.timers.timeout._onTimeout");
|
|
13
|
+
}
|
|
14
|
+
ref() {
|
|
15
|
+
return this;
|
|
16
|
+
}
|
|
17
|
+
unref() {
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
hasRef() {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
refresh() {
|
|
24
|
+
return this;
|
|
25
|
+
}
|
|
26
|
+
[Symbol.dispose]() {}
|
|
27
|
+
[Symbol.toPrimitive]() {
|
|
28
|
+
return 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// npx -y node@22.14 -e 'const tls=require("tls");console.log(Object.entries(tls).filter(e => ["string", "number"].includes(typeof e[1])).map(([k,v]) => `export const ${k} = ${JSON.stringify(v)}`).join("\n"))'
|
|
2
|
+
export declare const CLIENT_RENEG_LIMIT = 3;
|
|
3
|
+
export declare const CLIENT_RENEG_WINDOW = 600;
|
|
4
|
+
export declare const DEFAULT_CIPHERS = "";
|
|
5
|
+
export declare const DEFAULT_ECDH_CURVE = "auto";
|
|
6
|
+
export declare const DEFAULT_MIN_VERSION = "TLSv1.2";
|
|
7
|
+
export declare const DEFAULT_MAX_VERSION = "TLSv1.3";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// npx -y node@22.14 -e 'const tls=require("tls");console.log(Object.entries(tls).filter(e => ["string", "number"].includes(typeof e[1])).map(([k,v]) => `export const ${k} = ${JSON.stringify(v)}`).join("\n"))'
|
|
2
|
+
export const CLIENT_RENEG_LIMIT = 3;
|
|
3
|
+
export const CLIENT_RENEG_WINDOW = 600;
|
|
4
|
+
export const DEFAULT_CIPHERS = "";
|
|
5
|
+
export const DEFAULT_ECDH_CURVE = "auto";
|
|
6
|
+
export const DEFAULT_MIN_VERSION = "TLSv1.2";
|
|
7
|
+
export const DEFAULT_MAX_VERSION = "TLSv1.3";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type nodeTls from "node:tls";
|
|
2
|
+
import { Server as _Server } from "node:net";
|
|
3
|
+
export declare class Server extends _Server implements nodeTls.Server {
|
|
4
|
+
constructor(arg1?: nodeTls.TlsOptions | ((socket: nodeTls.TLSSocket) => void), arg2?: (socket: nodeTls.TLSSocket) => void);
|
|
5
|
+
addContext(hostname: string, context: nodeTls.SecureContextOptions);
|
|
6
|
+
setSecureContext(options: nodeTls.SecureContextOptions);
|
|
7
|
+
setTicketKeys(_keys: Buffer);
|
|
8
|
+
getTicketKeys(): Buffer;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createNotImplementedError } from "../../../_internal/utils.mjs";
|
|
2
|
+
import { Server as _Server } from "node:net";
|
|
3
|
+
export class Server extends _Server {
|
|
4
|
+
constructor(arg1, arg2) {
|
|
5
|
+
super(arg1, arg2);
|
|
6
|
+
}
|
|
7
|
+
addContext(hostname, context) {}
|
|
8
|
+
setSecureContext(options) {}
|
|
9
|
+
setTicketKeys(_keys) {
|
|
10
|
+
throw createNotImplementedError("Server.setTicketKeys");
|
|
11
|
+
}
|
|
12
|
+
getTicketKeys() {
|
|
13
|
+
throw createNotImplementedError("Server.getTicketKeys");
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type nodeTls from "node:tls";
|
|
2
|
+
import { Socket } from "node:net";
|
|
3
|
+
export declare class TLSSocket extends Socket implements nodeTls.TLSSocket {
|
|
4
|
+
authorized: boolean;
|
|
5
|
+
encrypted: true;
|
|
6
|
+
alpnProtocol: null;
|
|
7
|
+
authorizationError: Error;
|
|
8
|
+
exportKeyingMaterial(): Buffer;
|
|
9
|
+
getCipher(): nodeTls.CipherNameAndProtocol;
|
|
10
|
+
getPeerCertificate(detailed: true): nodeTls.DetailedPeerCertificate;
|
|
11
|
+
getPeerCertificate(detailed?: false): nodeTls.PeerCertificate;
|
|
12
|
+
getPeerCertificate(detailed?: boolean): nodeTls.PeerCertificate | nodeTls.DetailedPeerCertificate;
|
|
13
|
+
getCertificate(): null;
|
|
14
|
+
getEphemeralKeyInfo(): null;
|
|
15
|
+
getFinished(): undefined;
|
|
16
|
+
getPeerFinished(): undefined;
|
|
17
|
+
getProtocol(): null;
|
|
18
|
+
getSession(): undefined;
|
|
19
|
+
getSharedSigalgs(): unknown;
|
|
20
|
+
getTLSTicket(): undefined;
|
|
21
|
+
isSessionReused(): boolean;
|
|
22
|
+
renegotiate(options: {
|
|
23
|
+
rejectUnauthorized?: boolean | undefined;
|
|
24
|
+
requestCert?: boolean | undefined;
|
|
25
|
+
}, callback: (err: Error | null) => void): undefined;
|
|
26
|
+
setMaxSendFragment(size: number): boolean;
|
|
27
|
+
disableRenegotiation();
|
|
28
|
+
enableTrace();
|
|
29
|
+
getPeerX509Certificate(): undefined;
|
|
30
|
+
getX509Certificate(): undefined;
|
|
31
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Socket } from "node:net";
|
|
2
|
+
import { createNotImplementedError } from "../../../_internal/utils.mjs";
|
|
3
|
+
export class TLSSocket extends Socket {
|
|
4
|
+
authorized = false;
|
|
5
|
+
encrypted = true;
|
|
6
|
+
alpnProtocol = null;
|
|
7
|
+
authorizationError = new Error("[unenv] TLSSocket.authorizationError is not implemented yet!");
|
|
8
|
+
exportKeyingMaterial() {
|
|
9
|
+
throw createNotImplementedError("TLSSocket.exportKeyingMaterial");
|
|
10
|
+
}
|
|
11
|
+
getCipher() {
|
|
12
|
+
throw createNotImplementedError("TLSSocket.getCipher");
|
|
13
|
+
}
|
|
14
|
+
getPeerCertificate(_detailed) {
|
|
15
|
+
throw createNotImplementedError("TLSSocket.getPeerCertificate");
|
|
16
|
+
}
|
|
17
|
+
getCertificate() {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
getEphemeralKeyInfo() {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
getFinished() {}
|
|
24
|
+
getPeerFinished() {}
|
|
25
|
+
getProtocol() {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
getSession() {}
|
|
29
|
+
getSharedSigalgs() {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
getTLSTicket() {}
|
|
33
|
+
isSessionReused() {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
renegotiate(options, callback) {
|
|
37
|
+
if (typeof callback === "function") {
|
|
38
|
+
callback(null);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
setMaxSendFragment(size) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
disableRenegotiation() {}
|
|
45
|
+
enableTrace() {}
|
|
46
|
+
getPeerX509Certificate() {}
|
|
47
|
+
getX509Certificate() {}
|
|
48
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type nodeTty from "node:tty";
|
|
2
|
+
export declare class WriteStream implements Partial<nodeTty.WriteStream> {
|
|
3
|
+
fd: number;
|
|
4
|
+
columns: number;
|
|
5
|
+
rows: number;
|
|
6
|
+
isTTY: boolean;
|
|
7
|
+
constructor(fd: number);
|
|
8
|
+
clearLine(dir: nodeTty.Direction, callback?: (() => void) | undefined): boolean;
|
|
9
|
+
clearScreenDown(callback?: (() => void) | undefined): boolean;
|
|
10
|
+
cursorTo(x: number, y?: number | undefined, callback?: (() => void) | undefined): boolean;
|
|
11
|
+
cursorTo(x: number, callback: () => void): boolean;
|
|
12
|
+
moveCursor(dx: number, dy: number, callback?: (() => void) | undefined): boolean;
|
|
13
|
+
getColorDepth(env?: object | undefined): number;
|
|
14
|
+
hasColors(count?: number | undefined): boolean;
|
|
15
|
+
hasColors(env?: object | undefined): boolean;
|
|
16
|
+
hasColors(count: number, env?: object | undefined): boolean;
|
|
17
|
+
getWindowSize(): [number, number];
|
|
18
|
+
write(buffer: Uint8Array | string, cb?: (err?: Error) => void): boolean;
|
|
19
|
+
write(str: Uint8Array | string, encoding?: BufferEncoding, cb?: (err?: Error) => void): boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export class WriteStream {
|
|
2
|
+
fd;
|
|
3
|
+
columns = 80;
|
|
4
|
+
rows = 24;
|
|
5
|
+
isTTY = false;
|
|
6
|
+
constructor(fd) {
|
|
7
|
+
this.fd = fd;
|
|
8
|
+
}
|
|
9
|
+
clearLine(dir, callback) {
|
|
10
|
+
callback && callback();
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
clearScreenDown(callback) {
|
|
14
|
+
callback && callback();
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
cursorTo(x, y, callback) {
|
|
18
|
+
callback && typeof callback === "function" && callback();
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
moveCursor(dx, dy, callback) {
|
|
22
|
+
callback && callback();
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
getColorDepth(env) {
|
|
26
|
+
return 1;
|
|
27
|
+
}
|
|
28
|
+
hasColors(count, env) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
getWindowSize() {
|
|
32
|
+
return [this.columns, this.rows];
|
|
33
|
+
}
|
|
34
|
+
write(str, encoding, cb) {
|
|
35
|
+
if (str instanceof Uint8Array) {
|
|
36
|
+
str = new TextDecoder().decode(str);
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
console.log(str);
|
|
40
|
+
} catch {}
|
|
41
|
+
cb && typeof cb === "function" && cb();
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Source: https://github.com/nodejs/node/blob/v22.7.0/lib/internal/constants.js
|
|
2
|
+
export declare const CHAR_UPPERCASE_A = 65;
|
|
3
|
+
export declare const CHAR_LOWERCASE_A = 97;
|
|
4
|
+
export declare const CHAR_UPPERCASE_Z = 90;
|
|
5
|
+
export declare const CHAR_LOWERCASE_Z = 122;
|
|
6
|
+
export declare const CHAR_UPPERCASE_C = 67;
|
|
7
|
+
export declare const CHAR_LOWERCASE_B = 98;
|
|
8
|
+
export declare const CHAR_LOWERCASE_E = 101;
|
|
9
|
+
export declare const CHAR_LOWERCASE_N = 110;
|
|
10
|
+
export declare const CHAR_DOT = 46;
|
|
11
|
+
export declare const CHAR_FORWARD_SLASH = 47;
|
|
12
|
+
export declare const CHAR_BACKWARD_SLASH = 92;
|
|
13
|
+
export declare const CHAR_VERTICAL_LINE = 124;
|
|
14
|
+
export declare const CHAR_COLON = 58;
|
|
15
|
+
export declare const CHAR_QUESTION_MARK = 63;
|
|
16
|
+
export declare const CHAR_UNDERSCORE = 95;
|
|
17
|
+
export declare const CHAR_LINE_FEED = 10;
|
|
18
|
+
export declare const CHAR_CARRIAGE_RETURN = 13;
|
|
19
|
+
export declare const CHAR_TAB = 9;
|
|
20
|
+
export declare const CHAR_FORM_FEED = 12;
|
|
21
|
+
export declare const CHAR_EXCLAMATION_MARK = 33;
|
|
22
|
+
export declare const CHAR_HASH = 35;
|
|
23
|
+
export declare const CHAR_SPACE = 32;
|
|
24
|
+
export declare const CHAR_NO_BREAK_SPACE = 160;
|
|
25
|
+
export declare const CHAR_ZERO_WIDTH_NOBREAK_SPACE = 65279;
|
|
26
|
+
export declare const CHAR_LEFT_SQUARE_BRACKET = 91;
|
|
27
|
+
export declare const CHAR_RIGHT_SQUARE_BRACKET = 93;
|
|
28
|
+
export declare const CHAR_LEFT_ANGLE_BRACKET = 60;
|
|
29
|
+
export declare const CHAR_RIGHT_ANGLE_BRACKET = 62;
|
|
30
|
+
export declare const CHAR_LEFT_CURLY_BRACKET = 123;
|
|
31
|
+
export declare const CHAR_RIGHT_CURLY_BRACKET = 125;
|
|
32
|
+
export declare const CHAR_HYPHEN_MINUS = 45;
|
|
33
|
+
export declare const CHAR_PLUS = 43;
|
|
34
|
+
export declare const CHAR_DOUBLE_QUOTE = 34;
|
|
35
|
+
export declare const CHAR_SINGLE_QUOTE = 39;
|
|
36
|
+
export declare const CHAR_PERCENT = 37;
|
|
37
|
+
export declare const CHAR_SEMICOLON = 59;
|
|
38
|
+
export declare const CHAR_CIRCUMFLEX_ACCENT = 94;
|
|
39
|
+
export declare const CHAR_GRAVE_ACCENT = 96;
|
|
40
|
+
export declare const CHAR_AT = 64;
|
|
41
|
+
export declare const CHAR_AMPERSAND = 38;
|
|
42
|
+
export declare const CHAR_EQUAL = 61;
|
|
43
|
+
export declare const CHAR_0 = 48;
|
|
44
|
+
export declare const CHAR_9 = 57;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Source: https://github.com/nodejs/node/blob/v22.7.0/lib/internal/constants.js
|
|
2
|
+
export const CHAR_UPPERCASE_A = 65;
|
|
3
|
+
export const CHAR_LOWERCASE_A = 97;
|
|
4
|
+
export const CHAR_UPPERCASE_Z = 90;
|
|
5
|
+
export const CHAR_LOWERCASE_Z = 122;
|
|
6
|
+
export const CHAR_UPPERCASE_C = 67;
|
|
7
|
+
export const CHAR_LOWERCASE_B = 98;
|
|
8
|
+
export const CHAR_LOWERCASE_E = 101;
|
|
9
|
+
export const CHAR_LOWERCASE_N = 110;
|
|
10
|
+
export const CHAR_DOT = 46;
|
|
11
|
+
export const CHAR_FORWARD_SLASH = 47;
|
|
12
|
+
export const CHAR_BACKWARD_SLASH = 92;
|
|
13
|
+
export const CHAR_VERTICAL_LINE = 124;
|
|
14
|
+
export const CHAR_COLON = 58;
|
|
15
|
+
export const CHAR_QUESTION_MARK = 63;
|
|
16
|
+
export const CHAR_UNDERSCORE = 95;
|
|
17
|
+
export const CHAR_LINE_FEED = 10;
|
|
18
|
+
export const CHAR_CARRIAGE_RETURN = 13;
|
|
19
|
+
export const CHAR_TAB = 9;
|
|
20
|
+
export const CHAR_FORM_FEED = 12;
|
|
21
|
+
export const CHAR_EXCLAMATION_MARK = 33;
|
|
22
|
+
export const CHAR_HASH = 35;
|
|
23
|
+
export const CHAR_SPACE = 32;
|
|
24
|
+
export const CHAR_NO_BREAK_SPACE = 160;
|
|
25
|
+
export const CHAR_ZERO_WIDTH_NOBREAK_SPACE = 65279;
|
|
26
|
+
export const CHAR_LEFT_SQUARE_BRACKET = 91;
|
|
27
|
+
export const CHAR_RIGHT_SQUARE_BRACKET = 93;
|
|
28
|
+
export const CHAR_LEFT_ANGLE_BRACKET = 60;
|
|
29
|
+
export const CHAR_RIGHT_ANGLE_BRACKET = 62;
|
|
30
|
+
export const CHAR_LEFT_CURLY_BRACKET = 123;
|
|
31
|
+
export const CHAR_RIGHT_CURLY_BRACKET = 125;
|
|
32
|
+
export const CHAR_HYPHEN_MINUS = 45;
|
|
33
|
+
export const CHAR_PLUS = 43;
|
|
34
|
+
export const CHAR_DOUBLE_QUOTE = 34;
|
|
35
|
+
export const CHAR_SINGLE_QUOTE = 39;
|
|
36
|
+
export const CHAR_PERCENT = 37;
|
|
37
|
+
export const CHAR_SEMICOLON = 59;
|
|
38
|
+
export const CHAR_CIRCUMFLEX_ACCENT = 94;
|
|
39
|
+
export const CHAR_GRAVE_ACCENT = 96;
|
|
40
|
+
export const CHAR_AT = 64;
|
|
41
|
+
export const CHAR_AMPERSAND = 38;
|
|
42
|
+
export const CHAR_EQUAL = 61;
|
|
43
|
+
export const CHAR_0 = 48;
|
|
44
|
+
export const CHAR_9 = 57;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare class ERR_INVALID_ARG_VALUE extends TypeError {
|
|
2
|
+
code: string;
|
|
3
|
+
constructor(name: string, value: unknown, reason: string);
|
|
4
|
+
}
|
|
5
|
+
export declare class ERR_INVALID_ARG_TYPE extends TypeError {
|
|
6
|
+
code: string;
|
|
7
|
+
constructor(name: string, expected: unknown, actual: unknown);
|
|
8
|
+
}
|
|
9
|
+
export declare class ERR_INVALID_URL extends TypeError {
|
|
10
|
+
code: string;
|
|
11
|
+
input: string;
|
|
12
|
+
base?: string;
|
|
13
|
+
constructor(input: string, base?: string);
|
|
14
|
+
}
|
|
15
|
+
export declare class ERR_INVALID_URL_SCHEME extends TypeError {
|
|
16
|
+
code: string;
|
|
17
|
+
constructor(expected: string);
|
|
18
|
+
}
|
|
19
|
+
export declare class ERR_INVALID_FILE_URL_PATH extends TypeError {
|
|
20
|
+
code: string;
|
|
21
|
+
constructor(path: string);
|
|
22
|
+
}
|
|
23
|
+
export declare class ERR_INVALID_FILE_URL_HOST extends TypeError {
|
|
24
|
+
code: string;
|
|
25
|
+
constructor(host: string);
|
|
26
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Source: https://github.com/nodejs/node/blob/v22.7.0/lib/internal/errors.js
|
|
2
|
+
function fmt(val) {
|
|
3
|
+
if (Array.isArray(val)) {
|
|
4
|
+
return val.map((v) => fmt(v)).join(" or ");
|
|
5
|
+
}
|
|
6
|
+
if (!val) {
|
|
7
|
+
return "" + val;
|
|
8
|
+
}
|
|
9
|
+
return val.toString();
|
|
10
|
+
}
|
|
11
|
+
export class ERR_INVALID_ARG_VALUE extends TypeError {
|
|
12
|
+
code = "ERR_INVALID_ARG_VALUE";
|
|
13
|
+
constructor(name, value, reason) {
|
|
14
|
+
super(`The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${value}`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
export class ERR_INVALID_ARG_TYPE extends TypeError {
|
|
18
|
+
code = "ERR_INVALID_ARG_TYPE";
|
|
19
|
+
constructor(name, expected, actual) {
|
|
20
|
+
super(`The "${name}" argument must be of type ${fmt(expected)}. Received ${fmt(actual)}`);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export class ERR_INVALID_URL extends TypeError {
|
|
24
|
+
code = "ERR_INVALID_URL";
|
|
25
|
+
input;
|
|
26
|
+
base;
|
|
27
|
+
constructor(input, base) {
|
|
28
|
+
// Don't include URL in message.
|
|
29
|
+
// (See https://github.com/nodejs/node/pull/38614)
|
|
30
|
+
super("Invalid URL");
|
|
31
|
+
this.input = input;
|
|
32
|
+
if (base != null) {
|
|
33
|
+
this.base = base;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export class ERR_INVALID_URL_SCHEME extends TypeError {
|
|
38
|
+
code = "ERR_INVALID_URL_SCHEME";
|
|
39
|
+
constructor(expected) {
|
|
40
|
+
super(`The URL must be of scheme ${expected}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
export class ERR_INVALID_FILE_URL_PATH extends TypeError {
|
|
44
|
+
code = "ERR_INVALID_FILE_URL_PATH";
|
|
45
|
+
constructor(path) {
|
|
46
|
+
super(`Invalid ile URL path: ${path}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
export class ERR_INVALID_FILE_URL_HOST extends TypeError {
|
|
50
|
+
code = "ERR_INVALID_FILE_URL_HOST";
|
|
51
|
+
constructor(host) {
|
|
52
|
+
super(`File URL host must be "localhost" or empty on ${host}`);
|
|
53
|
+
}
|
|
54
|
+
}
|