@capsule-run/sdk 0.8.3 → 0.8.5
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/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/package.json +2 -2
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type nodeBuffer from "node:buffer";
|
|
2
|
+
export declare class File extends Blob implements nodeBuffer.File {
|
|
3
|
+
readonly __unenv__: true;
|
|
4
|
+
size: number;
|
|
5
|
+
type: any;
|
|
6
|
+
name: string;
|
|
7
|
+
lastModified: number;
|
|
8
|
+
constructor(...args: any[]);
|
|
9
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
10
|
+
slice(): any;
|
|
11
|
+
text(): any;
|
|
12
|
+
stream(): any;
|
|
13
|
+
bytes(): Promise<Uint8Array<ArrayBuffer>>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export class File extends Blob {
|
|
2
|
+
__unenv__ = true;
|
|
3
|
+
size = 0;
|
|
4
|
+
type = "";
|
|
5
|
+
name = "";
|
|
6
|
+
lastModified = 0;
|
|
7
|
+
constructor(...args) {
|
|
8
|
+
super(...args);
|
|
9
|
+
throw new Error("[unenv] buffer.File is not implemented");
|
|
10
|
+
}
|
|
11
|
+
arrayBuffer() {
|
|
12
|
+
throw new Error("Not implemented");
|
|
13
|
+
}
|
|
14
|
+
slice() {
|
|
15
|
+
throw new Error("Not implemented");
|
|
16
|
+
}
|
|
17
|
+
text() {
|
|
18
|
+
throw new Error("Not implemented");
|
|
19
|
+
}
|
|
20
|
+
stream() {
|
|
21
|
+
throw new Error("Not implemented");
|
|
22
|
+
}
|
|
23
|
+
bytes() {
|
|
24
|
+
throw new Error("Not implemented");
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// Source: https://github.com/feross/ieee754/blob/8a0041f3d5e41b7cfcf0e0158fcf84b071709bda/index.js
|
|
2
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
3
|
+
export declare function read(buffer: Uint8Array, offset: number, isLE: boolean, mLen: number, nBytes: number);
|
|
4
|
+
export declare function write(buffer: Uint8Array, value: number, offset: number, isLE: boolean, mLen: number, nBytes: number);
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Source: https://github.com/feross/ieee754/blob/8a0041f3d5e41b7cfcf0e0158fcf84b071709bda/index.js
|
|
2
|
+
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
3
|
+
export function read(buffer, offset, isLE, mLen, nBytes) {
|
|
4
|
+
let e, m;
|
|
5
|
+
const eLen = nBytes * 8 - mLen - 1;
|
|
6
|
+
const eMax = (1 << eLen) - 1;
|
|
7
|
+
const eBias = eMax >> 1;
|
|
8
|
+
let nBits = -7;
|
|
9
|
+
let i = isLE ? nBytes - 1 : 0;
|
|
10
|
+
const d = isLE ? -1 : 1;
|
|
11
|
+
let s = buffer[offset + i];
|
|
12
|
+
i += d;
|
|
13
|
+
e = s & (1 << -nBits) - 1;
|
|
14
|
+
s >>= -nBits;
|
|
15
|
+
nBits += eLen;
|
|
16
|
+
while (nBits > 0) {
|
|
17
|
+
e = e * 256 + buffer[offset + i];
|
|
18
|
+
i += d;
|
|
19
|
+
nBits -= 8;
|
|
20
|
+
}
|
|
21
|
+
m = e & (1 << -nBits) - 1;
|
|
22
|
+
e >>= -nBits;
|
|
23
|
+
nBits += mLen;
|
|
24
|
+
while (nBits > 0) {
|
|
25
|
+
m = m * 256 + buffer[offset + i];
|
|
26
|
+
i += d;
|
|
27
|
+
nBits -= 8;
|
|
28
|
+
}
|
|
29
|
+
if (e === 0) {
|
|
30
|
+
e = 1 - eBias;
|
|
31
|
+
} else if (e === eMax) {
|
|
32
|
+
return m ? Number.NaN : (s ? -1 : 1) * Number.POSITIVE_INFINITY;
|
|
33
|
+
} else {
|
|
34
|
+
m = m + Math.pow(2, mLen);
|
|
35
|
+
e = e - eBias;
|
|
36
|
+
}
|
|
37
|
+
return (s ? -1 : 1) * m * Math.pow(2, e - mLen);
|
|
38
|
+
}
|
|
39
|
+
export function write(buffer, value, offset, isLE, mLen, nBytes) {
|
|
40
|
+
let e, m, c;
|
|
41
|
+
let eLen = nBytes * 8 - mLen - 1;
|
|
42
|
+
const eMax = (1 << eLen) - 1;
|
|
43
|
+
const eBias = eMax >> 1;
|
|
44
|
+
const rt = mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0;
|
|
45
|
+
let i = isLE ? 0 : nBytes - 1;
|
|
46
|
+
const d = isLE ? 1 : -1;
|
|
47
|
+
const s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
|
48
|
+
value = Math.abs(value);
|
|
49
|
+
if (Number.isNaN(value) || value === Number.POSITIVE_INFINITY) {
|
|
50
|
+
m = Number.isNaN(value) ? 1 : 0;
|
|
51
|
+
e = eMax;
|
|
52
|
+
} else {
|
|
53
|
+
e = Math.floor(Math.log2(value));
|
|
54
|
+
if (value * (c = Math.pow(2, -e)) < 1) {
|
|
55
|
+
e--;
|
|
56
|
+
c *= 2;
|
|
57
|
+
}
|
|
58
|
+
value += e + eBias >= 1 ? rt / c : rt * Math.pow(2, 1 - eBias);
|
|
59
|
+
if (value * c >= 2) {
|
|
60
|
+
e++;
|
|
61
|
+
c /= 2;
|
|
62
|
+
}
|
|
63
|
+
if (e + eBias >= eMax) {
|
|
64
|
+
m = 0;
|
|
65
|
+
e = eMax;
|
|
66
|
+
} else if (e + eBias >= 1) {
|
|
67
|
+
m = (value * c - 1) * Math.pow(2, mLen);
|
|
68
|
+
e = e + eBias;
|
|
69
|
+
} else {
|
|
70
|
+
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen);
|
|
71
|
+
e = 0;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
while (mLen >= 8) {
|
|
75
|
+
buffer[offset + i] = m & 255;
|
|
76
|
+
i += d;
|
|
77
|
+
m /= 256;
|
|
78
|
+
mLen -= 8;
|
|
79
|
+
}
|
|
80
|
+
e = e << mLen | m;
|
|
81
|
+
eLen += mLen;
|
|
82
|
+
while (eLen > 0) {
|
|
83
|
+
buffer[offset + i] = e & 255;
|
|
84
|
+
i += d;
|
|
85
|
+
e /= 256;
|
|
86
|
+
eLen -= 8;
|
|
87
|
+
}
|
|
88
|
+
buffer[offset + i - d] |= s * 128;
|
|
89
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// npx -y node@22.14 -e 'const{constants}=require("crypto");console.log(Object.entries(constants).map(([k,v]) => `export const ${k} = ${JSON.stringify(v)}`).join("\n"))'
|
|
2
|
+
export declare const SSL_OP_ALL = 2147485776;
|
|
3
|
+
export declare const SSL_OP_ALLOW_NO_DHE_KEX = 1024;
|
|
4
|
+
export declare const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = 262144;
|
|
5
|
+
export declare const SSL_OP_CIPHER_SERVER_PREFERENCE = 4194304;
|
|
6
|
+
export declare const SSL_OP_CISCO_ANYCONNECT = 32768;
|
|
7
|
+
export declare const SSL_OP_COOKIE_EXCHANGE = 8192;
|
|
8
|
+
export declare const SSL_OP_CRYPTOPRO_TLSEXT_BUG = 2147483648;
|
|
9
|
+
export declare const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = 2048;
|
|
10
|
+
export declare const SSL_OP_LEGACY_SERVER_CONNECT = 4;
|
|
11
|
+
export declare const SSL_OP_NO_COMPRESSION = 131072;
|
|
12
|
+
export declare const SSL_OP_NO_ENCRYPT_THEN_MAC = 524288;
|
|
13
|
+
export declare const SSL_OP_NO_QUERY_MTU = 4096;
|
|
14
|
+
export declare const SSL_OP_NO_RENEGOTIATION = 1073741824;
|
|
15
|
+
export declare const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION = 65536;
|
|
16
|
+
export declare const SSL_OP_NO_SSLv2 = 0;
|
|
17
|
+
export declare const SSL_OP_NO_SSLv3 = 33554432;
|
|
18
|
+
export declare const SSL_OP_NO_TICKET = 16384;
|
|
19
|
+
export declare const SSL_OP_NO_TLSv1 = 67108864;
|
|
20
|
+
export declare const SSL_OP_NO_TLSv1_1 = 268435456;
|
|
21
|
+
export declare const SSL_OP_NO_TLSv1_2 = 134217728;
|
|
22
|
+
export declare const SSL_OP_NO_TLSv1_3 = 536870912;
|
|
23
|
+
export declare const SSL_OP_PRIORITIZE_CHACHA = 2097152;
|
|
24
|
+
export declare const SSL_OP_TLS_ROLLBACK_BUG = 8388608;
|
|
25
|
+
export declare const ENGINE_METHOD_RSA = 1;
|
|
26
|
+
export declare const ENGINE_METHOD_DSA = 2;
|
|
27
|
+
export declare const ENGINE_METHOD_DH = 4;
|
|
28
|
+
export declare const ENGINE_METHOD_RAND = 8;
|
|
29
|
+
export declare const ENGINE_METHOD_EC = 2048;
|
|
30
|
+
export declare const ENGINE_METHOD_CIPHERS = 64;
|
|
31
|
+
export declare const ENGINE_METHOD_DIGESTS = 128;
|
|
32
|
+
export declare const ENGINE_METHOD_PKEY_METHS = 512;
|
|
33
|
+
export declare const ENGINE_METHOD_PKEY_ASN1_METHS = 1024;
|
|
34
|
+
export declare const ENGINE_METHOD_ALL = 65535;
|
|
35
|
+
export declare const ENGINE_METHOD_NONE = 0;
|
|
36
|
+
export declare const DH_CHECK_P_NOT_SAFE_PRIME = 2;
|
|
37
|
+
export declare const DH_CHECK_P_NOT_PRIME = 1;
|
|
38
|
+
export declare const DH_UNABLE_TO_CHECK_GENERATOR = 4;
|
|
39
|
+
export declare const DH_NOT_SUITABLE_GENERATOR = 8;
|
|
40
|
+
export declare const RSA_PKCS1_PADDING = 1;
|
|
41
|
+
export declare const RSA_NO_PADDING = 3;
|
|
42
|
+
export declare const RSA_PKCS1_OAEP_PADDING = 4;
|
|
43
|
+
export declare const RSA_X931_PADDING = 5;
|
|
44
|
+
export declare const RSA_PKCS1_PSS_PADDING = 6;
|
|
45
|
+
export declare const RSA_PSS_SALTLEN_DIGEST = -1;
|
|
46
|
+
export declare const RSA_PSS_SALTLEN_MAX_SIGN = -2;
|
|
47
|
+
export declare const RSA_PSS_SALTLEN_AUTO = -2;
|
|
48
|
+
export declare const POINT_CONVERSION_COMPRESSED = 2;
|
|
49
|
+
export declare const POINT_CONVERSION_UNCOMPRESSED = 4;
|
|
50
|
+
export declare const POINT_CONVERSION_HYBRID = 6;
|
|
51
|
+
// Versions explicitly set to 0 to avoid version misdetections
|
|
52
|
+
export declare const defaultCoreCipherList = "";
|
|
53
|
+
export declare const defaultCipherList = "";
|
|
54
|
+
export declare const OPENSSL_VERSION_NUMBER = 0;
|
|
55
|
+
export declare const TLS1_VERSION = 0;
|
|
56
|
+
export declare const TLS1_1_VERSION = 0;
|
|
57
|
+
export declare const TLS1_2_VERSION = 0;
|
|
58
|
+
export declare const TLS1_3_VERSION = 0;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// npx -y node@22.14 -e 'const{constants}=require("crypto");console.log(Object.entries(constants).map(([k,v]) => `export const ${k} = ${JSON.stringify(v)}`).join("\n"))'
|
|
2
|
+
export const SSL_OP_ALL = 2147485776;
|
|
3
|
+
export const SSL_OP_ALLOW_NO_DHE_KEX = 1024;
|
|
4
|
+
export const SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION = 262144;
|
|
5
|
+
export const SSL_OP_CIPHER_SERVER_PREFERENCE = 4194304;
|
|
6
|
+
export const SSL_OP_CISCO_ANYCONNECT = 32768;
|
|
7
|
+
export const SSL_OP_COOKIE_EXCHANGE = 8192;
|
|
8
|
+
export const SSL_OP_CRYPTOPRO_TLSEXT_BUG = 2147483648;
|
|
9
|
+
export const SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS = 2048;
|
|
10
|
+
export const SSL_OP_LEGACY_SERVER_CONNECT = 4;
|
|
11
|
+
export const SSL_OP_NO_COMPRESSION = 131072;
|
|
12
|
+
export const SSL_OP_NO_ENCRYPT_THEN_MAC = 524288;
|
|
13
|
+
export const SSL_OP_NO_QUERY_MTU = 4096;
|
|
14
|
+
export const SSL_OP_NO_RENEGOTIATION = 1073741824;
|
|
15
|
+
export const SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION = 65536;
|
|
16
|
+
export const SSL_OP_NO_SSLv2 = 0;
|
|
17
|
+
export const SSL_OP_NO_SSLv3 = 33554432;
|
|
18
|
+
export const SSL_OP_NO_TICKET = 16384;
|
|
19
|
+
export const SSL_OP_NO_TLSv1 = 67108864;
|
|
20
|
+
export const SSL_OP_NO_TLSv1_1 = 268435456;
|
|
21
|
+
export const SSL_OP_NO_TLSv1_2 = 134217728;
|
|
22
|
+
export const SSL_OP_NO_TLSv1_3 = 536870912;
|
|
23
|
+
export const SSL_OP_PRIORITIZE_CHACHA = 2097152;
|
|
24
|
+
export const SSL_OP_TLS_ROLLBACK_BUG = 8388608;
|
|
25
|
+
export const ENGINE_METHOD_RSA = 1;
|
|
26
|
+
export const ENGINE_METHOD_DSA = 2;
|
|
27
|
+
export const ENGINE_METHOD_DH = 4;
|
|
28
|
+
export const ENGINE_METHOD_RAND = 8;
|
|
29
|
+
export const ENGINE_METHOD_EC = 2048;
|
|
30
|
+
export const ENGINE_METHOD_CIPHERS = 64;
|
|
31
|
+
export const ENGINE_METHOD_DIGESTS = 128;
|
|
32
|
+
export const ENGINE_METHOD_PKEY_METHS = 512;
|
|
33
|
+
export const ENGINE_METHOD_PKEY_ASN1_METHS = 1024;
|
|
34
|
+
export const ENGINE_METHOD_ALL = 65535;
|
|
35
|
+
export const ENGINE_METHOD_NONE = 0;
|
|
36
|
+
export const DH_CHECK_P_NOT_SAFE_PRIME = 2;
|
|
37
|
+
export const DH_CHECK_P_NOT_PRIME = 1;
|
|
38
|
+
export const DH_UNABLE_TO_CHECK_GENERATOR = 4;
|
|
39
|
+
export const DH_NOT_SUITABLE_GENERATOR = 8;
|
|
40
|
+
export const RSA_PKCS1_PADDING = 1;
|
|
41
|
+
export const RSA_NO_PADDING = 3;
|
|
42
|
+
export const RSA_PKCS1_OAEP_PADDING = 4;
|
|
43
|
+
export const RSA_X931_PADDING = 5;
|
|
44
|
+
export const RSA_PKCS1_PSS_PADDING = 6;
|
|
45
|
+
export const RSA_PSS_SALTLEN_DIGEST = -1;
|
|
46
|
+
export const RSA_PSS_SALTLEN_MAX_SIGN = -2;
|
|
47
|
+
export const RSA_PSS_SALTLEN_AUTO = -2;
|
|
48
|
+
export const POINT_CONVERSION_COMPRESSED = 2;
|
|
49
|
+
export const POINT_CONVERSION_UNCOMPRESSED = 4;
|
|
50
|
+
export const POINT_CONVERSION_HYBRID = 6;
|
|
51
|
+
// Versions explicitly set to 0 to avoid version misdetections
|
|
52
|
+
export const defaultCoreCipherList = "";
|
|
53
|
+
export const defaultCipherList = "";
|
|
54
|
+
export const OPENSSL_VERSION_NUMBER = 0;
|
|
55
|
+
export const TLS1_VERSION = 0;
|
|
56
|
+
export const TLS1_1_VERSION = 0;
|
|
57
|
+
export const TLS1_2_VERSION = 0;
|
|
58
|
+
export const TLS1_3_VERSION = 0;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type nodeCrypto from "node:crypto";
|
|
2
|
+
// ---- implemented Utils ----
|
|
3
|
+
export declare const webcrypto: unknown;
|
|
4
|
+
export declare const randomBytes: typeof nodeCrypto.randomBytes;
|
|
5
|
+
export declare const rng: unknown;
|
|
6
|
+
export declare const prng: unknown;
|
|
7
|
+
// ---- Constants ----
|
|
8
|
+
export declare const fips: typeof nodeCrypto.fips;
|
|
9
|
+
// ---- Unimplemented utils ----
|
|
10
|
+
export declare const checkPrime: unknown;
|
|
11
|
+
export declare const checkPrimeSync: unknown;
|
|
12
|
+
/** @deprecated https://nodejs.org/docs/latest/api/deprecations.html#dep0106-cryptocreatecipher-and-cryptocreatedecipher */
|
|
13
|
+
export declare const createCipher: undefined;
|
|
14
|
+
/** @deprecated https://nodejs.org/docs/latest/api/deprecations.html#dep0106-cryptocreatecipher-and-cryptocreatedecipher */
|
|
15
|
+
export declare const createDecipher: undefined;
|
|
16
|
+
export declare const pseudoRandomBytes: unknown;
|
|
17
|
+
export declare const createCipheriv: unknown;
|
|
18
|
+
export declare const createDecipheriv: unknown;
|
|
19
|
+
export declare const createDiffieHellman: unknown;
|
|
20
|
+
export declare const createDiffieHellmanGroup: unknown;
|
|
21
|
+
export declare const createECDH: unknown;
|
|
22
|
+
export declare const createHash: unknown;
|
|
23
|
+
export declare const createHmac: unknown;
|
|
24
|
+
export declare const createPrivateKey: unknown;
|
|
25
|
+
export declare const createPublicKey: unknown;
|
|
26
|
+
export declare const createSecretKey: unknown;
|
|
27
|
+
export declare const createSign: unknown;
|
|
28
|
+
export declare const createVerify: unknown;
|
|
29
|
+
export declare const diffieHellman: unknown;
|
|
30
|
+
export declare const generatePrime: unknown;
|
|
31
|
+
export declare const generatePrimeSync: unknown;
|
|
32
|
+
export declare const getCiphers: unknown;
|
|
33
|
+
export declare const getCipherInfo: unknown;
|
|
34
|
+
export declare const getCurves: unknown;
|
|
35
|
+
export declare const getDiffieHellman: unknown;
|
|
36
|
+
export declare const getHashes: unknown;
|
|
37
|
+
export declare const hkdf: unknown;
|
|
38
|
+
export declare const hkdfSync: unknown;
|
|
39
|
+
export declare const pbkdf2: unknown;
|
|
40
|
+
export declare const pbkdf2Sync: unknown;
|
|
41
|
+
export declare const generateKeyPair: unknown;
|
|
42
|
+
export declare const generateKeyPairSync: unknown;
|
|
43
|
+
export declare const generateKey: unknown;
|
|
44
|
+
export declare const generateKeySync: unknown;
|
|
45
|
+
export declare const privateDecrypt: unknown;
|
|
46
|
+
export declare const privateEncrypt: unknown;
|
|
47
|
+
export declare const publicDecrypt: unknown;
|
|
48
|
+
export declare const publicEncrypt: unknown;
|
|
49
|
+
export declare const randomFill: unknown;
|
|
50
|
+
export declare const randomFillSync: unknown;
|
|
51
|
+
export declare const randomInt: unknown;
|
|
52
|
+
export declare const scrypt: unknown;
|
|
53
|
+
export declare const scryptSync: unknown;
|
|
54
|
+
export declare const sign: unknown;
|
|
55
|
+
export declare const setEngine: unknown;
|
|
56
|
+
export declare const timingSafeEqual: unknown;
|
|
57
|
+
export declare const getFips: unknown;
|
|
58
|
+
export declare const setFips: unknown;
|
|
59
|
+
export declare const verify: unknown;
|
|
60
|
+
export declare const secureHeapUsed: unknown;
|
|
61
|
+
export declare const hash: unknown;
|
|
62
|
+
// ---- Unimplemented Classes ----
|
|
63
|
+
/** @deprecated https://nodejs.org/docs/latest/api/deprecations.html#dep0106-cryptocreatecipher-and-cryptocreatedecipher */
|
|
64
|
+
export declare const Cipher: typeof nodeCrypto.Cipher;
|
|
65
|
+
/** @deprecated https://nodejs.org/docs/latest/api/deprecations.html#dep0106-cryptocreatecipher-and-cryptocreatedecipher */
|
|
66
|
+
export declare const Decipher: typeof nodeCrypto.Decipher;
|
|
67
|
+
export declare const Certificate: typeof nodeCrypto.Certificate;
|
|
68
|
+
export declare const Cipheriv: typeof nodeCrypto.Cipheriv;
|
|
69
|
+
export declare const Decipheriv: typeof nodeCrypto.Decipheriv;
|
|
70
|
+
export declare const DiffieHellman: typeof nodeCrypto.DiffieHellman;
|
|
71
|
+
export declare const DiffieHellmanGroup: typeof nodeCrypto.DiffieHellmanGroup;
|
|
72
|
+
export declare const ECDH: typeof nodeCrypto.ECDH;
|
|
73
|
+
export declare const Hash: typeof nodeCrypto.Hash;
|
|
74
|
+
export declare const Hmac: typeof nodeCrypto.Hmac;
|
|
75
|
+
export declare const KeyObject: typeof nodeCrypto.KeyObject;
|
|
76
|
+
export declare const Sign: typeof nodeCrypto.Sign;
|
|
77
|
+
export declare const Verify: typeof nodeCrypto.Verify;
|
|
78
|
+
export declare const X509Certificate: typeof nodeCrypto.X509Certificate;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { notImplemented, notImplementedClass } from "../../../_internal/utils.mjs";
|
|
2
|
+
import { getRandomValues } from "./web.mjs";
|
|
3
|
+
// limit of Crypto.getRandomValues()
|
|
4
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues
|
|
5
|
+
const MAX_RANDOM_VALUE_BYTES = 65536;
|
|
6
|
+
// ---- implemented Utils ----
|
|
7
|
+
export const webcrypto = new Proxy(globalThis.crypto, { get(_, key) {
|
|
8
|
+
if (key === "CryptoKey") {
|
|
9
|
+
return globalThis.CryptoKey;
|
|
10
|
+
}
|
|
11
|
+
if (typeof globalThis.crypto[key] === "function") {
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
return globalThis.crypto[key].bind(globalThis.crypto);
|
|
14
|
+
}
|
|
15
|
+
return globalThis.crypto[key];
|
|
16
|
+
} });
|
|
17
|
+
export const randomBytes = (size, cb) => {
|
|
18
|
+
const bytes = Buffer.alloc(size, 0, undefined);
|
|
19
|
+
for (let generated = 0; generated < size; generated += MAX_RANDOM_VALUE_BYTES) {
|
|
20
|
+
getRandomValues(
|
|
21
|
+
// Use subarray to get a view of the buffer
|
|
22
|
+
Uint8Array.prototype.subarray.call(bytes, generated, generated + MAX_RANDOM_VALUE_BYTES)
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
if (typeof cb === "function") {
|
|
26
|
+
cb(null, bytes);
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
return bytes;
|
|
30
|
+
};
|
|
31
|
+
export const rng = randomBytes;
|
|
32
|
+
export const prng = randomBytes;
|
|
33
|
+
// ---- Constants ----
|
|
34
|
+
export const fips = false;
|
|
35
|
+
// ---- Unimplemented utils ----
|
|
36
|
+
export const checkPrime = /* @__PURE__ */ notImplemented("crypto.checkPrime");
|
|
37
|
+
export const checkPrimeSync = /* @__PURE__ */ notImplemented("crypto.checkPrimeSync");
|
|
38
|
+
/** @deprecated https://nodejs.org/docs/latest/api/deprecations.html#dep0106-cryptocreatecipher-and-cryptocreatedecipher */
|
|
39
|
+
export const createCipher = undefined;
|
|
40
|
+
/** @deprecated https://nodejs.org/docs/latest/api/deprecations.html#dep0106-cryptocreatecipher-and-cryptocreatedecipher */
|
|
41
|
+
export const createDecipher = undefined;
|
|
42
|
+
export const pseudoRandomBytes = /* @__PURE__ */ notImplemented("crypto.pseudoRandomBytes");
|
|
43
|
+
export const createCipheriv = /* @__PURE__ */ notImplemented("crypto.createCipheriv");
|
|
44
|
+
export const createDecipheriv = /* @__PURE__ */ notImplemented("crypto.createDecipheriv");
|
|
45
|
+
export const createDiffieHellman = /* @__PURE__ */ notImplemented("crypto.createDiffieHellman");
|
|
46
|
+
export const createDiffieHellmanGroup = /* @__PURE__ */ notImplemented("crypto.createDiffieHellmanGroup");
|
|
47
|
+
export const createECDH = /* @__PURE__ */ notImplemented("crypto.createECDH");
|
|
48
|
+
export const createHash = /* @__PURE__ */ notImplemented("crypto.createHash");
|
|
49
|
+
export const createHmac = /* @__PURE__ */ notImplemented("crypto.createHmac");
|
|
50
|
+
export const createPrivateKey = /* @__PURE__ */ notImplemented("crypto.createPrivateKey");
|
|
51
|
+
export const createPublicKey = /* @__PURE__ */ notImplemented("crypto.createPublicKey");
|
|
52
|
+
export const createSecretKey = /* @__PURE__ */ notImplemented("crypto.createSecretKey");
|
|
53
|
+
export const createSign = /* @__PURE__ */ notImplemented("crypto.createSign");
|
|
54
|
+
export const createVerify = /* @__PURE__ */ notImplemented("crypto.createVerify");
|
|
55
|
+
export const diffieHellman = /* @__PURE__ */ notImplemented("crypto.diffieHellman");
|
|
56
|
+
export const generatePrime = /* @__PURE__ */ notImplemented("crypto.generatePrime");
|
|
57
|
+
export const generatePrimeSync = /* @__PURE__ */ notImplemented("crypto.generatePrimeSync");
|
|
58
|
+
export const getCiphers = /* @__PURE__ */ notImplemented("crypto.getCiphers");
|
|
59
|
+
export const getCipherInfo = /* @__PURE__ */ notImplemented("crypto.getCipherInfo");
|
|
60
|
+
export const getCurves = /* @__PURE__ */ notImplemented("crypto.getCurves");
|
|
61
|
+
export const getDiffieHellman = /* @__PURE__ */ notImplemented("crypto.getDiffieHellman");
|
|
62
|
+
export const getHashes = /* @__PURE__ */ notImplemented("crypto.getHashes");
|
|
63
|
+
export const hkdf = /* @__PURE__ */ notImplemented("crypto.hkdf");
|
|
64
|
+
export const hkdfSync = /* @__PURE__ */ notImplemented("crypto.hkdfSync");
|
|
65
|
+
export const pbkdf2 = /* @__PURE__ */ notImplemented("crypto.pbkdf2");
|
|
66
|
+
export const pbkdf2Sync = /* @__PURE__ */ notImplemented("crypto.pbkdf2Sync");
|
|
67
|
+
export const generateKeyPair = /* @__PURE__ */ notImplemented("crypto.generateKeyPair");
|
|
68
|
+
export const generateKeyPairSync = /* @__PURE__ */ notImplemented("crypto.generateKeyPairSync");
|
|
69
|
+
export const generateKey = /* @__PURE__ */ notImplemented("crypto.generateKey");
|
|
70
|
+
export const generateKeySync = /* @__PURE__ */ notImplemented("crypto.generateKeySync");
|
|
71
|
+
export const privateDecrypt = /* @__PURE__ */ notImplemented("crypto.privateDecrypt");
|
|
72
|
+
export const privateEncrypt = /* @__PURE__ */ notImplemented("crypto.privateEncrypt");
|
|
73
|
+
export const publicDecrypt = /* @__PURE__ */ notImplemented("crypto.publicDecrypt");
|
|
74
|
+
export const publicEncrypt = /* @__PURE__ */ notImplemented("crypto.publicEncrypt");
|
|
75
|
+
export const randomFill = /* @__PURE__ */ notImplemented("crypto.randomFill");
|
|
76
|
+
export const randomFillSync = /* @__PURE__ */ notImplemented("crypto.randomFillSync");
|
|
77
|
+
export const randomInt = /* @__PURE__ */ notImplemented("crypto.randomInt");
|
|
78
|
+
export const scrypt = /* @__PURE__ */ notImplemented("crypto.scrypt");
|
|
79
|
+
export const scryptSync = /* @__PURE__ */ notImplemented("crypto.scryptSync");
|
|
80
|
+
export const sign = /* @__PURE__ */ notImplemented("crypto.sign");
|
|
81
|
+
export const setEngine = /* @__PURE__ */ notImplemented("crypto.setEngine");
|
|
82
|
+
export const timingSafeEqual = /* @__PURE__ */ notImplemented("crypto.timingSafeEqual");
|
|
83
|
+
export const getFips = /* @__PURE__ */ notImplemented("crypto.getFips");
|
|
84
|
+
export const setFips = /* @__PURE__ */ notImplemented("crypto.setFips");
|
|
85
|
+
export const verify = /* @__PURE__ */ notImplemented("crypto.verify");
|
|
86
|
+
export const secureHeapUsed = /* @__PURE__ */ notImplemented("crypto.secureHeapUsed");
|
|
87
|
+
export const hash = /* @__PURE__ */ notImplemented("crypto.hash");
|
|
88
|
+
// ---- Unimplemented Classes ----
|
|
89
|
+
/** @deprecated https://nodejs.org/docs/latest/api/deprecations.html#dep0106-cryptocreatecipher-and-cryptocreatedecipher */
|
|
90
|
+
export const Cipher = undefined;
|
|
91
|
+
/** @deprecated https://nodejs.org/docs/latest/api/deprecations.html#dep0106-cryptocreatecipher-and-cryptocreatedecipher */
|
|
92
|
+
export const Decipher = undefined;
|
|
93
|
+
export const Certificate = /* @__PURE__ */ notImplementedClass("crypto.Certificate");
|
|
94
|
+
export const Cipheriv = /* @__PURE__ */ notImplementedClass(
|
|
95
|
+
"crypto.Cipheriv"
|
|
96
|
+
// @ts-expect-error not typed yet
|
|
97
|
+
);
|
|
98
|
+
export const Decipheriv = /* @__PURE__ */ notImplementedClass(
|
|
99
|
+
"crypto.Decipheriv"
|
|
100
|
+
// @ts-expect-error not typed yet
|
|
101
|
+
);
|
|
102
|
+
export const DiffieHellman = /* @__PURE__ */ notImplementedClass("crypto.DiffieHellman");
|
|
103
|
+
export const DiffieHellmanGroup = /* @__PURE__ */ notImplementedClass("crypto.DiffieHellmanGroup");
|
|
104
|
+
export const ECDH = /* @__PURE__ */ notImplementedClass("crypto.ECDH");
|
|
105
|
+
export const Hash = /* @__PURE__ */ notImplementedClass("crypto.Hash");
|
|
106
|
+
export const Hmac = /* @__PURE__ */ notImplementedClass("crypto.Hmac");
|
|
107
|
+
export const KeyObject = /* @__PURE__ */ notImplementedClass("crypto.KeyObject");
|
|
108
|
+
export const Sign = /* @__PURE__ */ notImplementedClass("crypto.Sign");
|
|
109
|
+
export const Verify = /* @__PURE__ */ notImplementedClass("crypto.Verify");
|
|
110
|
+
export const X509Certificate = /* @__PURE__ */ notImplementedClass("crypto.X509Certificate");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// https://nodejs.org/api/crypto.html
|
|
2
|
+
// https://github.com/unjs/uncrypto
|
|
3
|
+
export const subtle = globalThis.crypto?.subtle;
|
|
4
|
+
export const randomUUID = () => {
|
|
5
|
+
return globalThis.crypto?.randomUUID();
|
|
6
|
+
};
|
|
7
|
+
export const getRandomValues = (array) => {
|
|
8
|
+
return globalThis.crypto?.getRandomValues(array);
|
|
9
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
2
|
+
import type nodeNet from "node:net";
|
|
3
|
+
import type nodeDgram from "node:dgram";
|
|
4
|
+
export declare class Socket extends EventEmitter implements nodeDgram.Socket {
|
|
5
|
+
readonly __unenv__: true;
|
|
6
|
+
bind(): this;
|
|
7
|
+
close(): this;
|
|
8
|
+
ref(): this;
|
|
9
|
+
unref(): this;
|
|
10
|
+
getRecvBufferSize(): number;
|
|
11
|
+
getSendBufferSize(): number;
|
|
12
|
+
getSendQueueSize(): number;
|
|
13
|
+
getSendQueueCount(): number;
|
|
14
|
+
setMulticastLoopback(): boolean;
|
|
15
|
+
setMulticastTTL(): number;
|
|
16
|
+
setTTL(): number;
|
|
17
|
+
address(): nodeNet.AddressInfo;
|
|
18
|
+
remoteAddress(): nodeNet.AddressInfo;
|
|
19
|
+
[Symbol.asyncDispose]();
|
|
20
|
+
addMembership();
|
|
21
|
+
addSourceSpecificMembership();
|
|
22
|
+
connect();
|
|
23
|
+
disconnect();
|
|
24
|
+
dropMembership();
|
|
25
|
+
dropSourceSpecificMembership();
|
|
26
|
+
send();
|
|
27
|
+
setSendBufferSize();
|
|
28
|
+
setBroadcast();
|
|
29
|
+
setRecvBufferSize();
|
|
30
|
+
setMulticastInterface();
|
|
31
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
2
|
+
export class Socket extends EventEmitter {
|
|
3
|
+
__unenv__ = true;
|
|
4
|
+
bind() {
|
|
5
|
+
return this;
|
|
6
|
+
}
|
|
7
|
+
close() {
|
|
8
|
+
return this;
|
|
9
|
+
}
|
|
10
|
+
ref() {
|
|
11
|
+
return this;
|
|
12
|
+
}
|
|
13
|
+
unref() {
|
|
14
|
+
return this;
|
|
15
|
+
}
|
|
16
|
+
getRecvBufferSize() {
|
|
17
|
+
return 1e5;
|
|
18
|
+
}
|
|
19
|
+
getSendBufferSize() {
|
|
20
|
+
return 1e4;
|
|
21
|
+
}
|
|
22
|
+
getSendQueueSize() {
|
|
23
|
+
return 0;
|
|
24
|
+
}
|
|
25
|
+
getSendQueueCount() {
|
|
26
|
+
return 0;
|
|
27
|
+
}
|
|
28
|
+
setMulticastLoopback() {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
setMulticastTTL() {
|
|
32
|
+
return 1;
|
|
33
|
+
}
|
|
34
|
+
setTTL() {
|
|
35
|
+
return 1;
|
|
36
|
+
}
|
|
37
|
+
address() {
|
|
38
|
+
return {
|
|
39
|
+
address: "127.0.0.1",
|
|
40
|
+
family: "IPv4",
|
|
41
|
+
port: 1234
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
remoteAddress() {
|
|
45
|
+
throw new Error("ERR_SOCKET_DGRAM_NOT_CONNECTED");
|
|
46
|
+
}
|
|
47
|
+
[Symbol.asyncDispose]() {
|
|
48
|
+
return Promise.resolve();
|
|
49
|
+
}
|
|
50
|
+
addMembership() {}
|
|
51
|
+
addSourceSpecificMembership() {}
|
|
52
|
+
connect() {}
|
|
53
|
+
disconnect() {}
|
|
54
|
+
dropMembership() {}
|
|
55
|
+
dropSourceSpecificMembership() {}
|
|
56
|
+
send() {}
|
|
57
|
+
setSendBufferSize() {}
|
|
58
|
+
setBroadcast() {}
|
|
59
|
+
setRecvBufferSize() {}
|
|
60
|
+
setMulticastInterface() {}
|
|
61
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type nodeDiagnosticsChannel from "node:diagnostics_channel";
|
|
2
|
+
export declare const getChannels: unknown;
|
|
3
|
+
export declare class Channel<
|
|
4
|
+
StoreType,
|
|
5
|
+
ContextType
|
|
6
|
+
> implements nodeDiagnosticsChannel.Channel<StoreType, ContextType> {
|
|
7
|
+
readonly __unenv__: true;
|
|
8
|
+
name: nodeDiagnosticsChannel.Channel["name"];
|
|
9
|
+
get hasSubscribers();
|
|
10
|
+
_subscribers: nodeDiagnosticsChannel.ChannelListener[];
|
|
11
|
+
constructor(name: nodeDiagnosticsChannel.Channel["name"]);
|
|
12
|
+
subscribe(onMessage: nodeDiagnosticsChannel.ChannelListener);
|
|
13
|
+
unsubscribe(onMessage: nodeDiagnosticsChannel.ChannelListener);
|
|
14
|
+
publish(message: unknown): void;
|
|
15
|
+
bindStore();
|
|
16
|
+
unbindStore();
|
|
17
|
+
runStores();
|
|
18
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { createNotImplementedError } from "../../../_internal/utils.mjs";
|
|
2
|
+
const channels = {};
|
|
3
|
+
export const getChannels = () => channels;
|
|
4
|
+
export class Channel {
|
|
5
|
+
__unenv__ = true;
|
|
6
|
+
name;
|
|
7
|
+
get hasSubscribers() {
|
|
8
|
+
return this._subscribers.length > 0;
|
|
9
|
+
}
|
|
10
|
+
_subscribers;
|
|
11
|
+
constructor(name) {
|
|
12
|
+
this.name = name;
|
|
13
|
+
this._subscribers = [];
|
|
14
|
+
const channels = getChannels();
|
|
15
|
+
channels[name] = this;
|
|
16
|
+
}
|
|
17
|
+
subscribe(onMessage) {
|
|
18
|
+
this._subscribers.push(onMessage);
|
|
19
|
+
}
|
|
20
|
+
unsubscribe(onMessage) {
|
|
21
|
+
const index = this._subscribers.indexOf(onMessage);
|
|
22
|
+
if (index === -1) return false;
|
|
23
|
+
this._subscribers.splice(index, 1);
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
publish(message) {
|
|
27
|
+
for (const subscriber of this._subscribers) {
|
|
28
|
+
subscriber(message, this.name);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
bindStore() {
|
|
32
|
+
throw createNotImplementedError("Channel.bindStore");
|
|
33
|
+
}
|
|
34
|
+
unbindStore() {
|
|
35
|
+
throw createNotImplementedError("Channel.unbindStore");
|
|
36
|
+
}
|
|
37
|
+
runStores() {
|
|
38
|
+
throw createNotImplementedError("Channel.runStores");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type nodeDagnosticsChannel from "node:diagnostics_channel";
|
|
2
|
+
import { Channel } from "./channel.mjs";
|
|
3
|
+
export declare class TracingChannel<
|
|
4
|
+
StoreType = unknown,
|
|
5
|
+
ContextType extends object = object
|
|
6
|
+
> implements nodeDagnosticsChannel.TracingChannel<StoreType, ContextType> {
|
|
7
|
+
readonly __unenv__: true;
|
|
8
|
+
asyncEnd: Channel<StoreType, ContextType>;
|
|
9
|
+
asyncStart: Channel<StoreType, ContextType>;
|
|
10
|
+
end: Channel<StoreType, ContextType>;
|
|
11
|
+
error: Channel<StoreType, ContextType>;
|
|
12
|
+
start: Channel<StoreType, ContextType>;
|
|
13
|
+
constructor(nameOrChannels: string | nodeDagnosticsChannel.TracingChannelCollection<StoreType, ContextType>);
|
|
14
|
+
subscribe(handlers: nodeDagnosticsChannel.TracingChannelSubscribers<ContextType>): void;
|
|
15
|
+
unsubscribe(handlers: nodeDagnosticsChannel.TracingChannelSubscribers<ContextType>): void;
|
|
16
|
+
traceSync();
|
|
17
|
+
tracePromise();
|
|
18
|
+
traceCallback();
|
|
19
|
+
}
|