@openclaw/discord 2026.5.20-beta.2 → 2026.5.22
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/{account-inspect-CcJ-bl80.js → account-inspect-C4sJZNbI.js} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/{accounts-C2TOAmpo.js → accounts-dXTfmnSZ.js} +1 -1
- package/dist/action-runtime-api.js +1 -1
- package/dist/api.js +13 -13
- package/dist/{approval-handler.runtime-hi6B0JCi.js → approval-handler.runtime-CyGGSiMH.js} +3 -3
- package/dist/{audit-DJIvRRzY.js → audit-DkBvCBsG.js} +3 -3
- package/dist/{channel-BswuOAN6.js → channel-LszCFESI.js} +16 -16
- package/dist/{channel-actions-CSepY2Kq.js → channel-actions-DDwcJy6_.js} +4 -4
- package/dist/{channel-actions.runtime-CSjcHZNT.js → channel-actions.runtime-CnwxnT58.js} +4 -4
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.setup-C0rcLtB9.js → channel.setup-rrsenw1h.js} +4 -4
- package/dist/{components-DDPGekgY.js → components-CE63uOrc.js} +3 -0
- package/dist/{config-schema-BGgg8U6A.js → config-schema-Kuf9IrLg.js} +4 -0
- package/dist/contract-api.js +2 -2
- package/dist/{conversation-identity-CAyt5wzy.js → conversation-identity-jwZ56ing.js} +2 -2
- package/dist/{directory-config-BcWtq4k8.js → directory-config-Do_NA_H8.js} +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-5HHCCe5Q.js → directory-live-DekuEEl8.js} +1 -1
- package/dist/{doctor-BLcVWv42.js → doctor-DmPhrTLR.js} +3 -3
- package/dist/{handle-action.guild-admin-DX2D9qkG.js → handle-action.guild-admin-09HC30Oh.js} +1 -1
- package/dist/{manager.runtime-Dq0mc5K0.js → manager.runtime-DPtx2pxB.js} +3 -3
- package/dist/{message-handler-wQJd4Peh.js → message-handler-miSYjwxl.js} +5 -5
- package/dist/{message-handler.preflight-ANdoLbtA.js → message-handler.preflight-DiLKljGS.js} +8 -8
- package/dist/{message-handler.process-DG4qm0sQ.js → message-handler.process-BKvQTmVP.js} +8 -8
- package/dist/{message-utils-Bw-wDr8G.js → message-utils-U-ax3LTX.js} +1 -1
- package/dist/{outbound-adapter-TGbHliO_.js → outbound-adapter-CF4KuNM6.js} +7 -6
- package/dist/{probe-CRWV5COl.js → probe-DfIM7zSY.js} +1 -1
- package/dist/{probe.runtime-h9mEzmMs.js → probe.runtime-DoXDN3rt.js} +1 -1
- package/dist/{provider-CzKMDsSE.js → provider-Bv9Sx9lq.js} +142 -23
- package/dist/{provider-session.runtime-D0XbJS5X.js → provider-session.runtime-BbEz2CZt.js} +3 -3
- package/dist/provider.runtime-DKBGMsC7.js +2 -0
- package/dist/{resolve-allowlist-common-Bec0FONA.js → resolve-allowlist-common-QzX-w4-_.js} +1 -1
- package/dist/{resolve-channels-DcWaMURg.js → resolve-channels-BDjtLmjX.js} +1 -1
- package/dist/{resolve-users-TQPLKDeV.js → resolve-users-BeaV5INm.js} +1 -1
- package/dist/{runtime-DP_0_5a0.js → runtime-DxQPyNY7.js} +214 -7
- package/dist/runtime-api.actions.js +2 -2
- package/dist/runtime-api.js +19 -19
- package/dist/runtime-api.lookup.js +5 -5
- package/dist/runtime-api.monitor-Wt6Qf0SL.js +5 -0
- package/dist/runtime-api.monitor.js +4 -4
- package/dist/runtime-api.send.js +5 -5
- package/dist/runtime-api.threads.js +3 -3
- package/dist/{send-CEAtV0qd.js → send-BjHCUrvn.js} +9 -5
- package/dist/{send.components-sY6aQV0K.js → send.components-BcCQ27av.js} +42 -8
- package/dist/{send.outbound-1vG9pOh2.js → send.outbound-CyvhKilL.js} +3 -3
- package/dist/{send.shared-D4clao4K.js → send.shared-C3uAu6bc.js} +2 -2
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{shared-mo-r7V5W.js → shared-CgAcqTsg.js} +4 -4
- package/dist/{subagent-hooks-D65kqOor.js → subagent-hooks-DehrqnoK.js} +2 -2
- package/dist/subagent-hooks-api.js +1 -1
- package/dist/{target-resolver-BpGdnBIZ.js → target-resolver-squYahVm.js} +2 -2
- package/dist/{targets-DMdVjHOU.js → targets-BeetkGO0.js} +1 -1
- package/dist/test-api.js +3 -3
- package/dist/{thread-bindings-BQz8z6MR.js → thread-bindings-BD9jKFo5.js} +3 -3
- package/dist/{thread-bindings.discord-api-Ddalj9wo.js → thread-bindings.discord-api-D2EF_9XS.js} +3 -3
- package/dist/{thread-bindings.manager-I5f-Oykv.js → thread-bindings.manager-AEGKdE3O.js} +2 -2
- package/node_modules/@discordjs/voice/LICENSE +191 -0
- package/node_modules/@discordjs/voice/README.md +120 -0
- package/node_modules/@discordjs/voice/dist/index.d.mts +1930 -0
- package/node_modules/@discordjs/voice/dist/index.d.ts +1930 -0
- package/node_modules/@discordjs/voice/dist/index.js +3241 -0
- package/node_modules/@discordjs/voice/dist/index.js.map +1 -0
- package/node_modules/@discordjs/voice/dist/index.mjs +3180 -0
- package/node_modules/@discordjs/voice/dist/index.mjs.map +1 -0
- package/node_modules/@discordjs/voice/package.json +100 -0
- package/node_modules/@napi-rs/wasm-runtime/dist/fs-proxy.cjs +299 -0
- package/node_modules/@napi-rs/wasm-runtime/dist/fs.js +25092 -0
- package/node_modules/@napi-rs/wasm-runtime/fs-proxy.js +294 -0
- package/node_modules/@napi-rs/wasm-runtime/package.json +70 -0
- package/node_modules/@napi-rs/wasm-runtime/runtime.cjs +15 -0
- package/node_modules/@napi-rs/wasm-runtime/runtime.js +8 -0
- package/node_modules/@snazzah/davey/README.md +58 -0
- package/node_modules/@snazzah/davey/browser.js +1 -0
- package/node_modules/@snazzah/davey/index.d.ts +260 -0
- package/node_modules/@snazzah/davey/index.js +523 -0
- package/node_modules/@snazzah/davey/package.json +140 -0
- package/node_modules/@snazzah/davey-android-arm-eabi/README.md +3 -0
- package/node_modules/@snazzah/davey-android-arm-eabi/davey.android-arm-eabi.node +0 -0
- package/node_modules/@snazzah/davey-android-arm-eabi/package.json +40 -0
- package/node_modules/@snazzah/davey-android-arm64/README.md +3 -0
- package/node_modules/@snazzah/davey-android-arm64/davey.android-arm64.node +0 -0
- package/node_modules/@snazzah/davey-android-arm64/package.json +40 -0
- package/node_modules/@snazzah/davey-darwin-arm64/README.md +3 -0
- package/node_modules/@snazzah/davey-darwin-arm64/davey.darwin-arm64.node +0 -0
- package/node_modules/@snazzah/davey-darwin-arm64/package.json +40 -0
- package/node_modules/@snazzah/davey-darwin-x64/README.md +3 -0
- package/node_modules/@snazzah/davey-darwin-x64/davey.darwin-x64.node +0 -0
- package/node_modules/@snazzah/davey-darwin-x64/package.json +40 -0
- package/node_modules/@snazzah/davey-freebsd-x64/README.md +3 -0
- package/node_modules/@snazzah/davey-freebsd-x64/davey.freebsd-x64.node +0 -0
- package/node_modules/@snazzah/davey-freebsd-x64/package.json +40 -0
- package/node_modules/@snazzah/davey-linux-arm-gnueabihf/README.md +3 -0
- package/node_modules/@snazzah/davey-linux-arm-gnueabihf/davey.linux-arm-gnueabihf.node +0 -0
- package/node_modules/@snazzah/davey-linux-arm-gnueabihf/package.json +40 -0
- package/node_modules/@snazzah/davey-linux-arm64-gnu/README.md +3 -0
- package/node_modules/@snazzah/davey-linux-arm64-gnu/davey.linux-arm64-gnu.node +0 -0
- package/node_modules/@snazzah/davey-linux-arm64-gnu/package.json +43 -0
- package/node_modules/@snazzah/davey-linux-arm64-musl/README.md +3 -0
- package/node_modules/@snazzah/davey-linux-arm64-musl/davey.linux-arm64-musl.node +0 -0
- package/node_modules/@snazzah/davey-linux-arm64-musl/package.json +43 -0
- package/node_modules/@snazzah/davey-linux-x64-gnu/README.md +3 -0
- package/node_modules/@snazzah/davey-linux-x64-gnu/davey.linux-x64-gnu.node +0 -0
- package/node_modules/@snazzah/davey-linux-x64-gnu/package.json +43 -0
- package/node_modules/@snazzah/davey-linux-x64-musl/README.md +3 -0
- package/node_modules/@snazzah/davey-linux-x64-musl/davey.linux-x64-musl.node +0 -0
- package/node_modules/@snazzah/davey-linux-x64-musl/package.json +43 -0
- package/node_modules/@snazzah/davey-wasm32-wasi/README.md +3 -0
- package/node_modules/@snazzah/davey-wasm32-wasi/davey.wasi-browser.js +71 -0
- package/node_modules/@snazzah/davey-wasm32-wasi/davey.wasi.cjs +123 -0
- package/node_modules/@snazzah/davey-wasm32-wasi/davey.wasm32-wasi.wasm +0 -0
- package/node_modules/@snazzah/davey-wasm32-wasi/package.json +45 -0
- package/node_modules/@snazzah/davey-wasm32-wasi/wasi-worker-browser.mjs +32 -0
- package/node_modules/@snazzah/davey-wasm32-wasi/wasi-worker.mjs +63 -0
- package/node_modules/@snazzah/davey-win32-arm64-msvc/README.md +3 -0
- package/node_modules/@snazzah/davey-win32-arm64-msvc/davey.win32-arm64-msvc.node +0 -0
- package/node_modules/@snazzah/davey-win32-arm64-msvc/package.json +40 -0
- package/node_modules/@snazzah/davey-win32-ia32-msvc/README.md +3 -0
- package/node_modules/@snazzah/davey-win32-ia32-msvc/davey.win32-ia32-msvc.node +0 -0
- package/node_modules/@snazzah/davey-win32-ia32-msvc/package.json +40 -0
- package/node_modules/@snazzah/davey-win32-x64-msvc/README.md +3 -0
- package/node_modules/@snazzah/davey-win32-x64-msvc/davey.win32-x64-msvc.node +0 -0
- package/node_modules/@snazzah/davey-win32-x64-msvc/package.json +40 -0
- package/node_modules/@tybys/wasm-util/README.md +193 -0
- package/node_modules/@tybys/wasm-util/dist/tsdoc-metadata.json +11 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.d.ts +423 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.esm-bundler.js +2920 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.esm.js +2920 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.esm.min.js +1 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.js +2942 -0
- package/node_modules/@tybys/wasm-util/dist/wasm-util.min.js +1 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/asyncify.js +158 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/index.js +13 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/jspi.js +46 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/load.js +97 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/memory.js +35 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/error.js +103 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/fd.js +268 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/fs.js +3 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/index.js +192 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/path.js +316 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/preview1.js +1586 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/rights.js +141 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/types.js +220 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/wasi/util.js +128 -0
- package/node_modules/@tybys/wasm-util/lib/cjs/webassembly.js +13 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/asyncify.mjs +153 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/index.mjs +9 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/jspi.mjs +39 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/load.mjs +89 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/memory.mjs +28 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/error.mjs +97 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/fd.mjs +256 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/fs.mjs +1 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/index.mjs +186 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/path.mjs +310 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/preview1.mjs +1581 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/rights.mjs +135 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/types.mjs +216 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/wasi/util.mjs +113 -0
- package/node_modules/@tybys/wasm-util/lib/mjs/webassembly.mjs +9 -0
- package/node_modules/@tybys/wasm-util/package.json +58 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +15 -0
- package/node_modules/@types/node/assert/strict.d.ts +59 -0
- package/node_modules/@types/node/assert.d.ts +950 -0
- package/node_modules/@types/node/async_hooks.d.ts +711 -0
- package/node_modules/@types/node/buffer.buffer.d.ts +466 -0
- package/node_modules/@types/node/buffer.d.ts +1765 -0
- package/node_modules/@types/node/child_process.d.ts +1366 -0
- package/node_modules/@types/node/cluster.d.ts +432 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/node/console.d.ts +93 -0
- package/node_modules/@types/node/constants.d.ts +14 -0
- package/node_modules/@types/node/crypto.d.ts +4058 -0
- package/node_modules/@types/node/dgram.d.ts +537 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +552 -0
- package/node_modules/@types/node/dns/promises.d.ts +497 -0
- package/node_modules/@types/node/dns.d.ts +876 -0
- package/node_modules/@types/node/domain.d.ts +150 -0
- package/node_modules/@types/node/events.d.ts +1008 -0
- package/node_modules/@types/node/fs/promises.d.ts +1468 -0
- package/node_modules/@types/node/fs.d.ts +4780 -0
- package/node_modules/@types/node/globals.d.ts +150 -0
- package/node_modules/@types/node/globals.typedarray.d.ts +101 -0
- package/node_modules/@types/node/http.d.ts +2147 -0
- package/node_modules/@types/node/http2.d.ts +2485 -0
- package/node_modules/@types/node/https.d.ts +400 -0
- package/node_modules/@types/node/index.d.ts +117 -0
- package/node_modules/@types/node/inspector/promises.d.ts +35 -0
- package/node_modules/@types/node/inspector.d.ts +264 -0
- package/node_modules/@types/node/inspector.generated.d.ts +4406 -0
- package/node_modules/@types/node/module.d.ts +755 -0
- package/node_modules/@types/node/net.d.ts +970 -0
- package/node_modules/@types/node/os.d.ts +498 -0
- package/node_modules/@types/node/package.json +155 -0
- package/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/node/path.d.ts +178 -0
- package/node_modules/@types/node/perf_hooks.d.ts +612 -0
- package/node_modules/@types/node/process.d.ts +2204 -0
- package/node_modules/@types/node/punycode.d.ts +89 -0
- package/node_modules/@types/node/querystring.d.ts +139 -0
- package/node_modules/@types/node/quic.d.ts +897 -0
- package/node_modules/@types/node/readline/promises.d.ts +158 -0
- package/node_modules/@types/node/readline.d.ts +507 -0
- package/node_modules/@types/node/repl.d.ts +420 -0
- package/node_modules/@types/node/sea.d.ts +47 -0
- package/node_modules/@types/node/sqlite.d.ts +1068 -0
- package/node_modules/@types/node/stream/consumers.d.ts +114 -0
- package/node_modules/@types/node/stream/iter.d.ts +301 -0
- package/node_modules/@types/node/stream/promises.d.ts +211 -0
- package/node_modules/@types/node/stream/web.d.ts +300 -0
- package/node_modules/@types/node/stream.d.ts +1774 -0
- package/node_modules/@types/node/string_decoder.d.ts +27 -0
- package/node_modules/@types/node/test/reporters.d.ts +59 -0
- package/node_modules/@types/node/test.d.ts +2279 -0
- package/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/node_modules/@types/node/timers.d.ts +149 -0
- package/node_modules/@types/node/tls.d.ts +1193 -0
- package/node_modules/@types/node/trace_events.d.ts +103 -0
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +119 -0
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +119 -0
- package/node_modules/@types/node/tty.d.ts +225 -0
- package/node_modules/@types/node/url.d.ts +556 -0
- package/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/node/util.d.ts +1677 -0
- package/node_modules/@types/node/v8.d.ts +980 -0
- package/node_modules/@types/node/vm.d.ts +1136 -0
- package/node_modules/@types/node/wasi.d.ts +131 -0
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
- package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/node/web-globals/events.d.ts +106 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
- package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/node/worker_threads.d.ts +671 -0
- package/node_modules/@types/node/zlib/iter.d.ts +131 -0
- package/node_modules/@types/node/zlib.d.ts +589 -0
- package/node_modules/@types/ws/LICENSE +21 -0
- package/node_modules/@types/ws/README.md +15 -0
- package/node_modules/@types/ws/index.d.mts +451 -0
- package/node_modules/@types/ws/index.d.ts +445 -0
- package/node_modules/@types/ws/package.json +72 -0
- package/node_modules/agent-base/LICENSE +22 -0
- package/node_modules/agent-base/README.md +69 -0
- package/node_modules/agent-base/dist/helpers.d.ts +10 -0
- package/node_modules/agent-base/dist/helpers.d.ts.map +1 -0
- package/node_modules/agent-base/dist/helpers.js +37 -0
- package/node_modules/agent-base/dist/helpers.js.map +1 -0
- package/node_modules/agent-base/dist/index.d.ts +37 -0
- package/node_modules/agent-base/dist/index.d.ts.map +1 -0
- package/node_modules/agent-base/dist/index.js +146 -0
- package/node_modules/agent-base/dist/index.js.map +1 -0
- package/node_modules/agent-base/package.json +46 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/discord-api-types/CHANGELOG.md +2442 -0
- package/node_modules/discord-api-types/LICENSE +21 -0
- package/node_modules/discord-api-types/README.md +102 -0
- package/node_modules/discord-api-types/_generated_/rest/v10/interfaces.d.ts +906 -0
- package/node_modules/discord-api-types/_generated_/rest/v10/interfaces.d.ts.map +1 -0
- package/node_modules/discord-api-types/_generated_/rest/v10/interfaces.js +3 -0
- package/node_modules/discord-api-types/_generated_/rest/v10/interfaces.js.map +1 -0
- package/node_modules/discord-api-types/_generated_/rest/v9/interfaces.d.ts +908 -0
- package/node_modules/discord-api-types/_generated_/rest/v9/interfaces.d.ts.map +1 -0
- package/node_modules/discord-api-types/_generated_/rest/v9/interfaces.js +3 -0
- package/node_modules/discord-api-types/_generated_/rest/v9/interfaces.js.map +1 -0
- package/node_modules/discord-api-types/gateway/common.d.ts +9 -0
- package/node_modules/discord-api-types/gateway/common.d.ts.map +1 -0
- package/node_modules/discord-api-types/gateway/common.js +3 -0
- package/node_modules/discord-api-types/gateway/common.js.map +1 -0
- package/node_modules/discord-api-types/gateway/index.d.ts +2 -0
- package/node_modules/discord-api-types/gateway/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/gateway/index.js +20 -0
- package/node_modules/discord-api-types/gateway/index.js.map +1 -0
- package/node_modules/discord-api-types/gateway/index.mjs +9 -0
- package/node_modules/discord-api-types/gateway/v10.d.ts +2054 -0
- package/node_modules/discord-api-types/gateway/v10.d.ts.map +1 -0
- package/node_modules/discord-api-types/gateway/v10.js +277 -0
- package/node_modules/discord-api-types/gateway/v10.js.map +1 -0
- package/node_modules/discord-api-types/gateway/v10.mjs +9 -0
- package/node_modules/discord-api-types/gateway/v6.d.ts +658 -0
- package/node_modules/discord-api-types/gateway/v6.d.ts.map +1 -0
- package/node_modules/discord-api-types/gateway/v6.js +158 -0
- package/node_modules/discord-api-types/gateway/v6.js.map +1 -0
- package/node_modules/discord-api-types/gateway/v6.mjs +10 -0
- package/node_modules/discord-api-types/gateway/v8.d.ts +1575 -0
- package/node_modules/discord-api-types/gateway/v8.d.ts.map +1 -0
- package/node_modules/discord-api-types/gateway/v8.js +231 -0
- package/node_modules/discord-api-types/gateway/v8.js.map +1 -0
- package/node_modules/discord-api-types/gateway/v8.mjs +8 -0
- package/node_modules/discord-api-types/gateway/v9.d.ts +2053 -0
- package/node_modules/discord-api-types/gateway/v9.d.ts.map +1 -0
- package/node_modules/discord-api-types/gateway/v9.js +276 -0
- package/node_modules/discord-api-types/gateway/v9.js.map +1 -0
- package/node_modules/discord-api-types/gateway/v9.mjs +9 -0
- package/node_modules/discord-api-types/globals.d.ts +102 -0
- package/node_modules/discord-api-types/globals.d.ts.map +1 -0
- package/node_modules/discord-api-types/globals.js +105 -0
- package/node_modules/discord-api-types/globals.js.map +1 -0
- package/node_modules/discord-api-types/globals.mjs +4 -0
- package/node_modules/discord-api-types/package.json +215 -0
- package/node_modules/discord-api-types/payloads/common.d.ts +344 -0
- package/node_modules/discord-api-types/payloads/common.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/common.js +310 -0
- package/node_modules/discord-api-types/payloads/common.js.map +1 -0
- package/node_modules/discord-api-types/payloads/index.d.ts +2 -0
- package/node_modules/discord-api-types/payloads/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/index.js +20 -0
- package/node_modules/discord-api-types/payloads/index.js.map +1 -0
- package/node_modules/discord-api-types/payloads/index.mjs +101 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts +6 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/attachment.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts +23 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/base.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.d.ts +5 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/boolean.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.d.ts +9 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/channel.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.d.ts +18 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/integer.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.d.ts +6 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/mentionable.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.d.ts +18 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/number.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.d.ts +6 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/role.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.d.ts +26 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js +21 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/shared.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.d.ts +17 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/string.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.d.ts +13 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommand.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts +13 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.d.ts +6 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/_chatInput/user.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.d.ts +68 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js +18 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/chatInput.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.d.ts +66 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/contextMenu.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/entryPoint.d.ts +20 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/entryPoint.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/entryPoint.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/entryPoint.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.d.ts +9 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/internals.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.d.ts +55 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js +21 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/_applicationCommands/permissions.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.d.ts +194 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js +89 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/applicationCommands.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.d.ts +11 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/autocomplete.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/base.d.ts +230 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/base.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/base.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/base.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.d.ts +42 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/messageComponents.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.d.ts +77 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/modalSubmit.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts +4 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/ping.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/ping.js +3 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/ping.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/responses.d.ts +124 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/responses.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/responses.js +63 -0
- package/node_modules/discord-api-types/payloads/v10/_interactions/responses.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/application.d.ts +387 -0
- package/node_modules/discord-api-types/payloads/v10/application.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/application.js +152 -0
- package/node_modules/discord-api-types/payloads/v10/application.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/auditLog.d.ts +694 -0
- package/node_modules/discord-api-types/payloads/v10/auditLog.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/auditLog.js +85 -0
- package/node_modules/discord-api-types/payloads/v10/auditLog.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/autoModeration.d.ts +222 -0
- package/node_modules/discord-api-types/payloads/v10/autoModeration.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/autoModeration.js +88 -0
- package/node_modules/discord-api-types/payloads/v10/autoModeration.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/channel.d.ts +653 -0
- package/node_modules/discord-api-types/payloads/v10/channel.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/channel.js +219 -0
- package/node_modules/discord-api-types/payloads/v10/channel.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/emoji.d.ts +79 -0
- package/node_modules/discord-api-types/payloads/v10/emoji.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/emoji.js +6 -0
- package/node_modules/discord-api-types/payloads/v10/emoji.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/gateway.d.ts +456 -0
- package/node_modules/discord-api-types/payloads/v10/gateway.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/gateway.js +103 -0
- package/node_modules/discord-api-types/payloads/v10/gateway.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/guild.d.ts +1223 -0
- package/node_modules/discord-api-types/payloads/v10/guild.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/guild.js +403 -0
- package/node_modules/discord-api-types/payloads/v10/guild.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.d.ts +244 -0
- package/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js +74 -0
- package/node_modules/discord-api-types/payloads/v10/guildScheduledEvent.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/index.d.ts +25 -0
- package/node_modules/discord-api-types/payloads/v10/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/index.js +37 -0
- package/node_modules/discord-api-types/payloads/v10/index.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/index.mjs +101 -0
- package/node_modules/discord-api-types/payloads/v10/interactions.d.ts +25 -0
- package/node_modules/discord-api-types/payloads/v10/interactions.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/interactions.js +19 -0
- package/node_modules/discord-api-types/payloads/v10/interactions.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/invite.d.ts +132 -0
- package/node_modules/discord-api-types/payloads/v10/invite.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/invite.js +31 -0
- package/node_modules/discord-api-types/payloads/v10/invite.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/message.d.ts +2155 -0
- package/node_modules/discord-api-types/payloads/v10/message.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/message.js +590 -0
- package/node_modules/discord-api-types/payloads/v10/message.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/monetization.d.ts +216 -0
- package/node_modules/discord-api-types/payloads/v10/monetization.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/monetization.js +101 -0
- package/node_modules/discord-api-types/payloads/v10/monetization.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/oauth2.d.ts +144 -0
- package/node_modules/discord-api-types/payloads/v10/oauth2.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/oauth2.js +148 -0
- package/node_modules/discord-api-types/payloads/v10/oauth2.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/permissions.d.ts +124 -0
- package/node_modules/discord-api-types/payloads/v10/permissions.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/permissions.js +17 -0
- package/node_modules/discord-api-types/payloads/v10/permissions.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/poll.d.ts +111 -0
- package/node_modules/discord-api-types/payloads/v10/poll.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/poll.js +17 -0
- package/node_modules/discord-api-types/payloads/v10/poll.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/soundboard.d.ts +43 -0
- package/node_modules/discord-api-types/payloads/v10/soundboard.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/soundboard.js +6 -0
- package/node_modules/discord-api-types/payloads/v10/soundboard.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/stageInstance.d.ts +82 -0
- package/node_modules/discord-api-types/payloads/v10/stageInstance.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/stageInstance.js +21 -0
- package/node_modules/discord-api-types/payloads/v10/stageInstance.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/sticker.d.ts +125 -0
- package/node_modules/discord-api-types/payloads/v10/sticker.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/sticker.js +31 -0
- package/node_modules/discord-api-types/payloads/v10/sticker.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/teams.d.ts +79 -0
- package/node_modules/discord-api-types/payloads/v10/teams.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/teams.js +24 -0
- package/node_modules/discord-api-types/payloads/v10/teams.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/template.d.ts +64 -0
- package/node_modules/discord-api-types/payloads/v10/template.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/template.js +6 -0
- package/node_modules/discord-api-types/payloads/v10/template.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/user.d.ts +430 -0
- package/node_modules/discord-api-types/payloads/v10/user.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/user.js +191 -0
- package/node_modules/discord-api-types/payloads/v10/user.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/voice.d.ts +101 -0
- package/node_modules/discord-api-types/payloads/v10/voice.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/voice.js +6 -0
- package/node_modules/discord-api-types/payloads/v10/voice.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/webhook.d.ts +190 -0
- package/node_modules/discord-api-types/payloads/v10/webhook.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v10/webhook.js +69 -0
- package/node_modules/discord-api-types/payloads/v10/webhook.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/auditLog.d.ts +469 -0
- package/node_modules/discord-api-types/payloads/v6/auditLog.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/auditLog.js +58 -0
- package/node_modules/discord-api-types/payloads/v6/auditLog.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/channel.d.ts +339 -0
- package/node_modules/discord-api-types/payloads/v6/channel.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/channel.js +94 -0
- package/node_modules/discord-api-types/payloads/v6/channel.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/emoji.d.ts +27 -0
- package/node_modules/discord-api-types/payloads/v6/emoji.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/emoji.js +6 -0
- package/node_modules/discord-api-types/payloads/v6/emoji.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/gateway.d.ts +149 -0
- package/node_modules/discord-api-types/payloads/v6/gateway.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/gateway.js +45 -0
- package/node_modules/discord-api-types/payloads/v6/gateway.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/guild.d.ts +310 -0
- package/node_modules/discord-api-types/payloads/v6/guild.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/guild.js +118 -0
- package/node_modules/discord-api-types/payloads/v6/guild.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/index.d.ts +13 -0
- package/node_modules/discord-api-types/payloads/v6/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/index.js +29 -0
- package/node_modules/discord-api-types/payloads/v6/index.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/index.mjs +30 -0
- package/node_modules/discord-api-types/payloads/v6/invite.d.ts +42 -0
- package/node_modules/discord-api-types/payloads/v6/invite.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/invite.js +16 -0
- package/node_modules/discord-api-types/payloads/v6/invite.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/oauth2.d.ts +28 -0
- package/node_modules/discord-api-types/payloads/v6/oauth2.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/oauth2.js +6 -0
- package/node_modules/discord-api-types/payloads/v6/oauth2.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/permissions.d.ts +75 -0
- package/node_modules/discord-api-types/payloads/v6/permissions.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/permissions.js +56 -0
- package/node_modules/discord-api-types/payloads/v6/permissions.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/teams.d.ts +36 -0
- package/node_modules/discord-api-types/payloads/v6/teams.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/teams.js +17 -0
- package/node_modules/discord-api-types/payloads/v6/teams.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/user.d.ts +79 -0
- package/node_modules/discord-api-types/payloads/v6/user.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/user.js +48 -0
- package/node_modules/discord-api-types/payloads/v6/user.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/voice.d.ts +37 -0
- package/node_modules/discord-api-types/payloads/v6/voice.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/voice.js +6 -0
- package/node_modules/discord-api-types/payloads/v6/voice.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/webhook.d.ts +32 -0
- package/node_modules/discord-api-types/payloads/v6/webhook.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v6/webhook.js +15 -0
- package/node_modules/discord-api-types/payloads/v6/webhook.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.d.ts +12 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/attachment.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.d.ts +28 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/base.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.d.ts +11 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/boolean.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.d.ts +15 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/channel.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.d.ts +27 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/integer.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.d.ts +12 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/mentionable.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.d.ts +27 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/number.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.d.ts +12 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/role.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.d.ts +28 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.js +23 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/shared.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.d.ts +13 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/string.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.d.ts +18 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommand.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts +18 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.d.ts +12 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/_chatInput/user.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.d.ts +90 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.js +29 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/chatInput.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.d.ts +102 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/contextMenu.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.d.ts +11 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/internals.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.d.ts +53 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.js +14 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/_applicationCommands/permissions.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.d.ts +112 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.js +32 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/applicationCommands.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.d.ts +18 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/autocomplete.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/base.d.ts +116 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/base.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/base.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/base.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.d.ts +43 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/messageComponents.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.d.ts +48 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/modalSubmit.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/ping.d.ts +7 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/ping.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/ping.js +3 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/ping.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/responses.d.ts +138 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/responses.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/responses.js +53 -0
- package/node_modules/discord-api-types/payloads/v8/_interactions/responses.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/application.d.ts +134 -0
- package/node_modules/discord-api-types/payloads/v8/application.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/application.js +28 -0
- package/node_modules/discord-api-types/payloads/v8/application.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/auditLog.d.ts +637 -0
- package/node_modules/discord-api-types/payloads/v8/auditLog.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/auditLog.js +67 -0
- package/node_modules/discord-api-types/payloads/v8/auditLog.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/channel.d.ts +1268 -0
- package/node_modules/discord-api-types/payloads/v8/channel.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/channel.js +253 -0
- package/node_modules/discord-api-types/payloads/v8/channel.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/emoji.d.ts +53 -0
- package/node_modules/discord-api-types/payloads/v8/emoji.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/emoji.js +6 -0
- package/node_modules/discord-api-types/payloads/v8/emoji.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/gateway.d.ts +332 -0
- package/node_modules/discord-api-types/payloads/v8/gateway.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/gateway.js +79 -0
- package/node_modules/discord-api-types/payloads/v8/gateway.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/guild.d.ts +1001 -0
- package/node_modules/discord-api-types/payloads/v8/guild.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/guild.js +264 -0
- package/node_modules/discord-api-types/payloads/v8/guild.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.d.ts +163 -0
- package/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.js +39 -0
- package/node_modules/discord-api-types/payloads/v8/guildScheduledEvent.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/index.d.ts +20 -0
- package/node_modules/discord-api-types/payloads/v8/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/index.js +36 -0
- package/node_modules/discord-api-types/payloads/v8/index.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/index.mjs +51 -0
- package/node_modules/discord-api-types/payloads/v8/interactions.d.ts +31 -0
- package/node_modules/discord-api-types/payloads/v8/interactions.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/interactions.js +24 -0
- package/node_modules/discord-api-types/payloads/v8/interactions.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/invite.d.ts +114 -0
- package/node_modules/discord-api-types/payloads/v8/invite.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/invite.js +17 -0
- package/node_modules/discord-api-types/payloads/v8/invite.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/oauth2.d.ts +117 -0
- package/node_modules/discord-api-types/payloads/v8/oauth2.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/oauth2.js +121 -0
- package/node_modules/discord-api-types/payloads/v8/oauth2.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/permissions.d.ts +77 -0
- package/node_modules/discord-api-types/payloads/v8/permissions.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/permissions.js +6 -0
- package/node_modules/discord-api-types/payloads/v8/permissions.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/stageInstance.d.ts +76 -0
- package/node_modules/discord-api-types/payloads/v8/stageInstance.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/stageInstance.js +20 -0
- package/node_modules/discord-api-types/payloads/v8/stageInstance.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/sticker.d.ts +133 -0
- package/node_modules/discord-api-types/payloads/v8/sticker.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/sticker.js +34 -0
- package/node_modules/discord-api-types/payloads/v8/sticker.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/teams.d.ts +69 -0
- package/node_modules/discord-api-types/payloads/v8/teams.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/teams.js +17 -0
- package/node_modules/discord-api-types/payloads/v8/teams.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/template.d.ts +68 -0
- package/node_modules/discord-api-types/payloads/v8/template.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/template.js +6 -0
- package/node_modules/discord-api-types/payloads/v8/template.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/user.d.ts +228 -0
- package/node_modules/discord-api-types/payloads/v8/user.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/user.js +108 -0
- package/node_modules/discord-api-types/payloads/v8/user.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/voice.d.ts +94 -0
- package/node_modules/discord-api-types/payloads/v8/voice.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/voice.js +6 -0
- package/node_modules/discord-api-types/payloads/v8/voice.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/webhook.d.ts +82 -0
- package/node_modules/discord-api-types/payloads/v8/webhook.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v8/webhook.js +25 -0
- package/node_modules/discord-api-types/payloads/v8/webhook.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts +6 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/attachment.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts +23 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/base.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts +5 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/boolean.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts +9 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/channel.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts +18 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/integer.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts +6 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/mentionable.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts +18 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/number.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts +6 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/role.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts +26 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.js +21 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/shared.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts +17 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/string.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts +13 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommand.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts +13 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/subcommandGroup.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts +6 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/_chatInput/user.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts +68 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.js +18 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/chatInput.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts +66 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/contextMenu.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/entryPoint.d.ts +20 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/entryPoint.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/entryPoint.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/entryPoint.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts +9 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/internals.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts +55 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.js +21 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/_applicationCommands/permissions.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts +192 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.js +89 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/applicationCommands.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts +11 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/autocomplete.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts +233 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/base.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/base.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/base.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts +42 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/messageComponents.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.d.ts +77 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/modalSubmit.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts +4 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/ping.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/ping.js +3 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/ping.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts +124 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/responses.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/responses.js +63 -0
- package/node_modules/discord-api-types/payloads/v9/_interactions/responses.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/application.d.ts +387 -0
- package/node_modules/discord-api-types/payloads/v9/application.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/application.js +152 -0
- package/node_modules/discord-api-types/payloads/v9/application.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/auditLog.d.ts +694 -0
- package/node_modules/discord-api-types/payloads/v9/auditLog.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/auditLog.js +85 -0
- package/node_modules/discord-api-types/payloads/v9/auditLog.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/autoModeration.d.ts +222 -0
- package/node_modules/discord-api-types/payloads/v9/autoModeration.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/autoModeration.js +88 -0
- package/node_modules/discord-api-types/payloads/v9/autoModeration.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/channel.d.ts +656 -0
- package/node_modules/discord-api-types/payloads/v9/channel.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/channel.js +219 -0
- package/node_modules/discord-api-types/payloads/v9/channel.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/emoji.d.ts +79 -0
- package/node_modules/discord-api-types/payloads/v9/emoji.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/emoji.js +6 -0
- package/node_modules/discord-api-types/payloads/v9/emoji.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/gateway.d.ts +444 -0
- package/node_modules/discord-api-types/payloads/v9/gateway.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/gateway.js +103 -0
- package/node_modules/discord-api-types/payloads/v9/gateway.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/guild.d.ts +1215 -0
- package/node_modules/discord-api-types/payloads/v9/guild.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/guild.js +395 -0
- package/node_modules/discord-api-types/payloads/v9/guild.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.ts +244 -0
- package/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.js +74 -0
- package/node_modules/discord-api-types/payloads/v9/guildScheduledEvent.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/index.d.ts +25 -0
- package/node_modules/discord-api-types/payloads/v9/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/index.js +37 -0
- package/node_modules/discord-api-types/payloads/v9/index.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/index.mjs +101 -0
- package/node_modules/discord-api-types/payloads/v9/interactions.d.ts +25 -0
- package/node_modules/discord-api-types/payloads/v9/interactions.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/interactions.js +19 -0
- package/node_modules/discord-api-types/payloads/v9/interactions.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/invite.d.ts +132 -0
- package/node_modules/discord-api-types/payloads/v9/invite.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/invite.js +31 -0
- package/node_modules/discord-api-types/payloads/v9/invite.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/message.d.ts +2151 -0
- package/node_modules/discord-api-types/payloads/v9/message.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/message.js +590 -0
- package/node_modules/discord-api-types/payloads/v9/message.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/monetization.d.ts +216 -0
- package/node_modules/discord-api-types/payloads/v9/monetization.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/monetization.js +101 -0
- package/node_modules/discord-api-types/payloads/v9/monetization.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/oauth2.d.ts +132 -0
- package/node_modules/discord-api-types/payloads/v9/oauth2.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/oauth2.js +136 -0
- package/node_modules/discord-api-types/payloads/v9/oauth2.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/permissions.d.ts +124 -0
- package/node_modules/discord-api-types/payloads/v9/permissions.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/permissions.js +17 -0
- package/node_modules/discord-api-types/payloads/v9/permissions.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/poll.d.ts +111 -0
- package/node_modules/discord-api-types/payloads/v9/poll.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/poll.js +17 -0
- package/node_modules/discord-api-types/payloads/v9/poll.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/soundboard.d.ts +43 -0
- package/node_modules/discord-api-types/payloads/v9/soundboard.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/soundboard.js +6 -0
- package/node_modules/discord-api-types/payloads/v9/soundboard.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/stageInstance.d.ts +82 -0
- package/node_modules/discord-api-types/payloads/v9/stageInstance.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/stageInstance.js +21 -0
- package/node_modules/discord-api-types/payloads/v9/stageInstance.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/sticker.d.ts +125 -0
- package/node_modules/discord-api-types/payloads/v9/sticker.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/sticker.js +31 -0
- package/node_modules/discord-api-types/payloads/v9/sticker.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/teams.d.ts +79 -0
- package/node_modules/discord-api-types/payloads/v9/teams.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/teams.js +24 -0
- package/node_modules/discord-api-types/payloads/v9/teams.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/template.d.ts +64 -0
- package/node_modules/discord-api-types/payloads/v9/template.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/template.js +6 -0
- package/node_modules/discord-api-types/payloads/v9/template.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/user.d.ts +430 -0
- package/node_modules/discord-api-types/payloads/v9/user.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/user.js +191 -0
- package/node_modules/discord-api-types/payloads/v9/user.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/voice.d.ts +98 -0
- package/node_modules/discord-api-types/payloads/v9/voice.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/voice.js +6 -0
- package/node_modules/discord-api-types/payloads/v9/voice.js.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/webhook.d.ts +190 -0
- package/node_modules/discord-api-types/payloads/v9/webhook.d.ts.map +1 -0
- package/node_modules/discord-api-types/payloads/v9/webhook.js +69 -0
- package/node_modules/discord-api-types/payloads/v9/webhook.js.map +1 -0
- package/node_modules/discord-api-types/rest/common.d.ts +307 -0
- package/node_modules/discord-api-types/rest/common.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/common.js +311 -0
- package/node_modules/discord-api-types/rest/common.js.map +1 -0
- package/node_modules/discord-api-types/rest/index.d.ts +2 -0
- package/node_modules/discord-api-types/rest/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/index.js +20 -0
- package/node_modules/discord-api-types/rest/index.js.map +1 -0
- package/node_modules/discord-api-types/rest/index.mjs +15 -0
- package/node_modules/discord-api-types/rest/v10/application.d.ts +31 -0
- package/node_modules/discord-api-types/rest/v10/application.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/application.js +3 -0
- package/node_modules/discord-api-types/rest/v10/application.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/auditLog.d.ts +31 -0
- package/node_modules/discord-api-types/rest/v10/auditLog.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/auditLog.js +3 -0
- package/node_modules/discord-api-types/rest/v10/auditLog.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/autoModeration.d.ts +68 -0
- package/node_modules/discord-api-types/rest/v10/autoModeration.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/autoModeration.js +3 -0
- package/node_modules/discord-api-types/rest/v10/autoModeration.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/channel.d.ts +764 -0
- package/node_modules/discord-api-types/rest/v10/channel.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/channel.js +18 -0
- package/node_modules/discord-api-types/rest/v10/channel.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/emoji.d.ts +85 -0
- package/node_modules/discord-api-types/rest/v10/emoji.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/emoji.js +3 -0
- package/node_modules/discord-api-types/rest/v10/emoji.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/gateway.d.ts +10 -0
- package/node_modules/discord-api-types/rest/v10/gateway.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/gateway.js +3 -0
- package/node_modules/discord-api-types/rest/v10/gateway.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/guild.d.ts +1062 -0
- package/node_modules/discord-api-types/rest/v10/guild.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/guild.js +3 -0
- package/node_modules/discord-api-types/rest/v10/guild.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts +124 -0
- package/node_modules/discord-api-types/rest/v10/guildScheduledEvent.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/guildScheduledEvent.js +3 -0
- package/node_modules/discord-api-types/rest/v10/guildScheduledEvent.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/index.d.ts +87 -0
- package/node_modules/discord-api-types/rest/v10/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/index.js +1286 -0
- package/node_modules/discord-api-types/rest/v10/index.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/index.mjs +15 -0
- package/node_modules/discord-api-types/rest/v10/interactions.d.ts +290 -0
- package/node_modules/discord-api-types/rest/v10/interactions.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/interactions.js +3 -0
- package/node_modules/discord-api-types/rest/v10/interactions.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/invite.d.ts +28 -0
- package/node_modules/discord-api-types/rest/v10/invite.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/invite.js +3 -0
- package/node_modules/discord-api-types/rest/v10/invite.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/monetization.d.ts +130 -0
- package/node_modules/discord-api-types/rest/v10/monetization.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/monetization.js +12 -0
- package/node_modules/discord-api-types/rest/v10/monetization.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/oauth2.d.ts +193 -0
- package/node_modules/discord-api-types/rest/v10/oauth2.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/oauth2.js +3 -0
- package/node_modules/discord-api-types/rest/v10/oauth2.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/poll.d.ts +50 -0
- package/node_modules/discord-api-types/rest/v10/poll.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/poll.js +3 -0
- package/node_modules/discord-api-types/rest/v10/poll.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/soundboard.d.ts +98 -0
- package/node_modules/discord-api-types/rest/v10/soundboard.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/soundboard.js +3 -0
- package/node_modules/discord-api-types/rest/v10/soundboard.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/stageInstance.d.ts +59 -0
- package/node_modules/discord-api-types/rest/v10/stageInstance.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/stageInstance.js +3 -0
- package/node_modules/discord-api-types/rest/v10/stageInstance.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/sticker.d.ts +85 -0
- package/node_modules/discord-api-types/rest/v10/sticker.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/sticker.js +3 -0
- package/node_modules/discord-api-types/rest/v10/sticker.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/template.d.ts +65 -0
- package/node_modules/discord-api-types/rest/v10/template.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/template.js +3 -0
- package/node_modules/discord-api-types/rest/v10/template.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/user.d.ts +122 -0
- package/node_modules/discord-api-types/rest/v10/user.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/user.js +3 -0
- package/node_modules/discord-api-types/rest/v10/user.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/voice.d.ts +57 -0
- package/node_modules/discord-api-types/rest/v10/voice.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/voice.js +3 -0
- package/node_modules/discord-api-types/rest/v10/voice.js.map +1 -0
- package/node_modules/discord-api-types/rest/v10/webhook.d.ts +275 -0
- package/node_modules/discord-api-types/rest/v10/webhook.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v10/webhook.js +3 -0
- package/node_modules/discord-api-types/rest/v10/webhook.js.map +1 -0
- package/node_modules/discord-api-types/rest/v6/auditLog.d.ts +17 -0
- package/node_modules/discord-api-types/rest/v6/auditLog.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v6/auditLog.js +3 -0
- package/node_modules/discord-api-types/rest/v6/auditLog.js.map +1 -0
- package/node_modules/discord-api-types/rest/v6/channel.d.ts +268 -0
- package/node_modules/discord-api-types/rest/v6/channel.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v6/channel.js +15 -0
- package/node_modules/discord-api-types/rest/v6/channel.js.map +1 -0
- package/node_modules/discord-api-types/rest/v6/emoji.d.ts +50 -0
- package/node_modules/discord-api-types/rest/v6/emoji.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v6/emoji.js +3 -0
- package/node_modules/discord-api-types/rest/v6/emoji.js.map +1 -0
- package/node_modules/discord-api-types/rest/v6/gateway.d.ts +14 -0
- package/node_modules/discord-api-types/rest/v6/gateway.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v6/gateway.js +3 -0
- package/node_modules/discord-api-types/rest/v6/gateway.js.map +1 -0
- package/node_modules/discord-api-types/rest/v6/guild.d.ts +465 -0
- package/node_modules/discord-api-types/rest/v6/guild.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v6/guild.js +3 -0
- package/node_modules/discord-api-types/rest/v6/guild.js.map +1 -0
- package/node_modules/discord-api-types/rest/v6/index.d.ts +348 -0
- package/node_modules/discord-api-types/rest/v6/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v6/index.js +499 -0
- package/node_modules/discord-api-types/rest/v6/index.js.map +1 -0
- package/node_modules/discord-api-types/rest/v6/index.mjs +9 -0
- package/node_modules/discord-api-types/rest/v6/invite.d.ts +20 -0
- package/node_modules/discord-api-types/rest/v6/invite.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v6/invite.js +3 -0
- package/node_modules/discord-api-types/rest/v6/invite.js.map +1 -0
- package/node_modules/discord-api-types/rest/v6/oauth2.d.ts +177 -0
- package/node_modules/discord-api-types/rest/v6/oauth2.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v6/oauth2.js +3 -0
- package/node_modules/discord-api-types/rest/v6/oauth2.js.map +1 -0
- package/node_modules/discord-api-types/rest/v6/user.d.ts +80 -0
- package/node_modules/discord-api-types/rest/v6/user.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v6/user.js +3 -0
- package/node_modules/discord-api-types/rest/v6/user.js.map +1 -0
- package/node_modules/discord-api-types/rest/v6/voice.d.ts +8 -0
- package/node_modules/discord-api-types/rest/v6/voice.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v6/voice.js +3 -0
- package/node_modules/discord-api-types/rest/v6/voice.js.map +1 -0
- package/node_modules/discord-api-types/rest/v6/webhook.d.ts +139 -0
- package/node_modules/discord-api-types/rest/v6/webhook.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v6/webhook.js +3 -0
- package/node_modules/discord-api-types/rest/v6/webhook.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/auditLog.d.ts +32 -0
- package/node_modules/discord-api-types/rest/v8/auditLog.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/auditLog.js +3 -0
- package/node_modules/discord-api-types/rest/v8/auditLog.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/channel.d.ts +564 -0
- package/node_modules/discord-api-types/rest/v8/channel.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/channel.js +3 -0
- package/node_modules/discord-api-types/rest/v8/channel.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/emoji.d.ts +69 -0
- package/node_modules/discord-api-types/rest/v8/emoji.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/emoji.js +3 -0
- package/node_modules/discord-api-types/rest/v8/emoji.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/gateway.d.ts +14 -0
- package/node_modules/discord-api-types/rest/v8/gateway.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/gateway.js +3 -0
- package/node_modules/discord-api-types/rest/v8/gateway.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/guild.d.ts +882 -0
- package/node_modules/discord-api-types/rest/v8/guild.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/guild.js +3 -0
- package/node_modules/discord-api-types/rest/v8/guild.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/guildScheduledEvent.d.ts +141 -0
- package/node_modules/discord-api-types/rest/v8/guildScheduledEvent.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/guildScheduledEvent.js +3 -0
- package/node_modules/discord-api-types/rest/v8/guildScheduledEvent.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/index.d.ts +539 -0
- package/node_modules/discord-api-types/rest/v8/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/index.js +747 -0
- package/node_modules/discord-api-types/rest/v8/index.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/index.mjs +10 -0
- package/node_modules/discord-api-types/rest/v8/interactions.d.ts +257 -0
- package/node_modules/discord-api-types/rest/v8/interactions.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/interactions.js +3 -0
- package/node_modules/discord-api-types/rest/v8/interactions.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/invite.d.ts +32 -0
- package/node_modules/discord-api-types/rest/v8/invite.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/invite.js +3 -0
- package/node_modules/discord-api-types/rest/v8/invite.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/oauth2.d.ts +213 -0
- package/node_modules/discord-api-types/rest/v8/oauth2.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/oauth2.js +3 -0
- package/node_modules/discord-api-types/rest/v8/oauth2.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/stageInstance.d.ts +63 -0
- package/node_modules/discord-api-types/rest/v8/stageInstance.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/stageInstance.js +3 -0
- package/node_modules/discord-api-types/rest/v8/stageInstance.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/sticker.d.ts +70 -0
- package/node_modules/discord-api-types/rest/v8/sticker.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/sticker.js +3 -0
- package/node_modules/discord-api-types/rest/v8/sticker.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/template.d.ts +83 -0
- package/node_modules/discord-api-types/rest/v8/template.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/template.js +3 -0
- package/node_modules/discord-api-types/rest/v8/template.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/user.d.ts +109 -0
- package/node_modules/discord-api-types/rest/v8/user.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/user.js +3 -0
- package/node_modules/discord-api-types/rest/v8/user.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/voice.d.ts +8 -0
- package/node_modules/discord-api-types/rest/v8/voice.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/voice.js +3 -0
- package/node_modules/discord-api-types/rest/v8/voice.js.map +1 -0
- package/node_modules/discord-api-types/rest/v8/webhook.d.ts +283 -0
- package/node_modules/discord-api-types/rest/v8/webhook.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v8/webhook.js +3 -0
- package/node_modules/discord-api-types/rest/v8/webhook.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/application.d.ts +31 -0
- package/node_modules/discord-api-types/rest/v9/application.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/application.js +3 -0
- package/node_modules/discord-api-types/rest/v9/application.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/auditLog.d.ts +31 -0
- package/node_modules/discord-api-types/rest/v9/auditLog.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/auditLog.js +3 -0
- package/node_modules/discord-api-types/rest/v9/auditLog.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/autoModeration.d.ts +68 -0
- package/node_modules/discord-api-types/rest/v9/autoModeration.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/autoModeration.js +3 -0
- package/node_modules/discord-api-types/rest/v9/autoModeration.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/channel.d.ts +777 -0
- package/node_modules/discord-api-types/rest/v9/channel.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/channel.js +18 -0
- package/node_modules/discord-api-types/rest/v9/channel.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/emoji.d.ts +85 -0
- package/node_modules/discord-api-types/rest/v9/emoji.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/emoji.js +3 -0
- package/node_modules/discord-api-types/rest/v9/emoji.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/gateway.d.ts +10 -0
- package/node_modules/discord-api-types/rest/v9/gateway.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/gateway.js +3 -0
- package/node_modules/discord-api-types/rest/v9/gateway.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/guild.d.ts +1068 -0
- package/node_modules/discord-api-types/rest/v9/guild.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/guild.js +3 -0
- package/node_modules/discord-api-types/rest/v9/guild.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts +124 -0
- package/node_modules/discord-api-types/rest/v9/guildScheduledEvent.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/guildScheduledEvent.js +3 -0
- package/node_modules/discord-api-types/rest/v9/guildScheduledEvent.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/index.d.ts +87 -0
- package/node_modules/discord-api-types/rest/v9/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/index.js +1293 -0
- package/node_modules/discord-api-types/rest/v9/index.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/index.mjs +15 -0
- package/node_modules/discord-api-types/rest/v9/interactions.d.ts +290 -0
- package/node_modules/discord-api-types/rest/v9/interactions.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/interactions.js +3 -0
- package/node_modules/discord-api-types/rest/v9/interactions.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/invite.d.ts +28 -0
- package/node_modules/discord-api-types/rest/v9/invite.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/invite.js +3 -0
- package/node_modules/discord-api-types/rest/v9/invite.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/monetization.d.ts +130 -0
- package/node_modules/discord-api-types/rest/v9/monetization.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/monetization.js +12 -0
- package/node_modules/discord-api-types/rest/v9/monetization.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/oauth2.d.ts +193 -0
- package/node_modules/discord-api-types/rest/v9/oauth2.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/oauth2.js +3 -0
- package/node_modules/discord-api-types/rest/v9/oauth2.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/poll.d.ts +50 -0
- package/node_modules/discord-api-types/rest/v9/poll.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/poll.js +3 -0
- package/node_modules/discord-api-types/rest/v9/poll.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/soundboard.d.ts +98 -0
- package/node_modules/discord-api-types/rest/v9/soundboard.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/soundboard.js +3 -0
- package/node_modules/discord-api-types/rest/v9/soundboard.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/stageInstance.d.ts +59 -0
- package/node_modules/discord-api-types/rest/v9/stageInstance.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/stageInstance.js +3 -0
- package/node_modules/discord-api-types/rest/v9/stageInstance.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/sticker.d.ts +85 -0
- package/node_modules/discord-api-types/rest/v9/sticker.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/sticker.js +3 -0
- package/node_modules/discord-api-types/rest/v9/sticker.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/template.d.ts +65 -0
- package/node_modules/discord-api-types/rest/v9/template.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/template.js +3 -0
- package/node_modules/discord-api-types/rest/v9/template.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/user.d.ts +122 -0
- package/node_modules/discord-api-types/rest/v9/user.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/user.js +3 -0
- package/node_modules/discord-api-types/rest/v9/user.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/voice.d.ts +57 -0
- package/node_modules/discord-api-types/rest/v9/voice.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/voice.js +3 -0
- package/node_modules/discord-api-types/rest/v9/voice.js.map +1 -0
- package/node_modules/discord-api-types/rest/v9/webhook.d.ts +275 -0
- package/node_modules/discord-api-types/rest/v9/webhook.d.ts.map +1 -0
- package/node_modules/discord-api-types/rest/v9/webhook.js +3 -0
- package/node_modules/discord-api-types/rest/v9/webhook.js.map +1 -0
- package/node_modules/discord-api-types/rpc/common.d.ts +453 -0
- package/node_modules/discord-api-types/rpc/common.d.ts.map +1 -0
- package/node_modules/discord-api-types/rpc/common.js +240 -0
- package/node_modules/discord-api-types/rpc/common.js.map +1 -0
- package/node_modules/discord-api-types/rpc/index.d.ts +2 -0
- package/node_modules/discord-api-types/rpc/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/rpc/index.js +20 -0
- package/node_modules/discord-api-types/rpc/index.js.map +1 -0
- package/node_modules/discord-api-types/rpc/index.mjs +13 -0
- package/node_modules/discord-api-types/rpc/v10.d.ts +2191 -0
- package/node_modules/discord-api-types/rpc/v10.d.ts.map +1 -0
- package/node_modules/discord-api-types/rpc/v10.js +299 -0
- package/node_modules/discord-api-types/rpc/v10.js.map +1 -0
- package/node_modules/discord-api-types/rpc/v10.mjs +13 -0
- package/node_modules/discord-api-types/rpc/v8.d.ts +39 -0
- package/node_modules/discord-api-types/rpc/v8.d.ts.map +1 -0
- package/node_modules/discord-api-types/rpc/v8.js +18 -0
- package/node_modules/discord-api-types/rpc/v8.js.map +1 -0
- package/node_modules/discord-api-types/rpc/v8.mjs +10 -0
- package/node_modules/discord-api-types/rpc/v9.d.ts +39 -0
- package/node_modules/discord-api-types/rpc/v9.d.ts.map +1 -0
- package/node_modules/discord-api-types/rpc/v9.js +18 -0
- package/node_modules/discord-api-types/rpc/v9.js.map +1 -0
- package/node_modules/discord-api-types/rpc/v9.mjs +10 -0
- package/node_modules/discord-api-types/scripts/versions.mjs +46 -0
- package/node_modules/discord-api-types/utils/index.d.ts +2 -0
- package/node_modules/discord-api-types/utils/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/utils/index.js +20 -0
- package/node_modules/discord-api-types/utils/index.js.map +1 -0
- package/node_modules/discord-api-types/utils/index.mjs +17 -0
- package/node_modules/discord-api-types/utils/internals.d.ts +34 -0
- package/node_modules/discord-api-types/utils/internals.d.ts.map +1 -0
- package/node_modules/discord-api-types/utils/internals.js +13 -0
- package/node_modules/discord-api-types/utils/internals.js.map +1 -0
- package/node_modules/discord-api-types/utils/v10.d.ts +100 -0
- package/node_modules/discord-api-types/utils/v10.d.ts.map +1 -0
- package/node_modules/discord-api-types/utils/v10.js +158 -0
- package/node_modules/discord-api-types/utils/v10.js.map +1 -0
- package/node_modules/discord-api-types/utils/v10.mjs +17 -0
- package/node_modules/discord-api-types/utils/v8.d.ts +66 -0
- package/node_modules/discord-api-types/utils/v8.d.ts.map +1 -0
- package/node_modules/discord-api-types/utils/v8.js +96 -0
- package/node_modules/discord-api-types/utils/v8.js.map +1 -0
- package/node_modules/discord-api-types/utils/v8.mjs +11 -0
- package/node_modules/discord-api-types/utils/v9.d.ts +100 -0
- package/node_modules/discord-api-types/utils/v9.d.ts.map +1 -0
- package/node_modules/discord-api-types/utils/v9.js +158 -0
- package/node_modules/discord-api-types/utils/v9.js.map +1 -0
- package/node_modules/discord-api-types/utils/v9.mjs +17 -0
- package/node_modules/discord-api-types/v10.d.ts +8 -0
- package/node_modules/discord-api-types/v10.d.ts.map +1 -0
- package/node_modules/discord-api-types/v10.js +47 -0
- package/node_modules/discord-api-types/v10.js.map +1 -0
- package/node_modules/discord-api-types/v10.mjs +132 -0
- package/node_modules/discord-api-types/v6.d.ts +5 -0
- package/node_modules/discord-api-types/v6.d.ts.map +1 -0
- package/node_modules/discord-api-types/v6.js +21 -0
- package/node_modules/discord-api-types/v6.js.map +1 -0
- package/node_modules/discord-api-types/v6.mjs +44 -0
- package/node_modules/discord-api-types/v8.d.ts +7 -0
- package/node_modules/discord-api-types/v8.d.ts.map +1 -0
- package/node_modules/discord-api-types/v8.js +46 -0
- package/node_modules/discord-api-types/v8.js.map +1 -0
- package/node_modules/discord-api-types/v8.mjs +72 -0
- package/node_modules/discord-api-types/v9.d.ts +8 -0
- package/node_modules/discord-api-types/v9.d.ts.map +1 -0
- package/node_modules/discord-api-types/v9.js +47 -0
- package/node_modules/discord-api-types/v9.js.map +1 -0
- package/node_modules/discord-api-types/v9.mjs +129 -0
- package/node_modules/discord-api-types/voice/index.d.ts +2 -0
- package/node_modules/discord-api-types/voice/index.d.ts.map +1 -0
- package/node_modules/discord-api-types/voice/index.js +20 -0
- package/node_modules/discord-api-types/voice/index.js.map +1 -0
- package/node_modules/discord-api-types/voice/index.mjs +8 -0
- package/node_modules/discord-api-types/voice/v4.d.ts +174 -0
- package/node_modules/discord-api-types/voice/v4.d.ts.map +1 -0
- package/node_modules/discord-api-types/voice/v4.js +179 -0
- package/node_modules/discord-api-types/voice/v4.js.map +1 -0
- package/node_modules/discord-api-types/voice/v4.mjs +6 -0
- package/node_modules/discord-api-types/voice/v8.d.ts +632 -0
- package/node_modules/discord-api-types/voice/v8.d.ts.map +1 -0
- package/node_modules/discord-api-types/voice/v8.js +236 -0
- package/node_modules/discord-api-types/voice/v8.js.map +1 -0
- package/node_modules/discord-api-types/voice/v8.mjs +8 -0
- package/node_modules/https-proxy-agent/LICENSE +22 -0
- package/node_modules/https-proxy-agent/README.md +70 -0
- package/node_modules/https-proxy-agent/dist/index.d.ts +43 -0
- package/node_modules/https-proxy-agent/dist/index.d.ts.map +1 -0
- package/node_modules/https-proxy-agent/dist/index.js +150 -0
- package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +12 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +1 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +94 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/https-proxy-agent/package.json +50 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/opusscript/LICENSE +20 -0
- package/node_modules/opusscript/README.md +53 -0
- package/node_modules/opusscript/build/COPYING.libopus +44 -0
- package/node_modules/opusscript/build/opusscript_native_nasm.js +93 -0
- package/node_modules/opusscript/build/opusscript_native_wasm.js +77 -0
- package/node_modules/opusscript/build/opusscript_native_wasm.wasm +0 -0
- package/node_modules/opusscript/index.d.ts +100 -0
- package/node_modules/opusscript/index.js +120 -0
- package/node_modules/opusscript/package.json +26 -0
- package/node_modules/prism-media/LICENSE +190 -0
- package/node_modules/prism-media/README.md +69 -0
- package/node_modules/prism-media/package.json +65 -0
- package/node_modules/prism-media/src/core/FFmpeg.js +160 -0
- package/node_modules/prism-media/src/core/VolumeTransformer.js +128 -0
- package/node_modules/prism-media/src/core/WebmBase.js +229 -0
- package/node_modules/prism-media/src/core/index.js +9 -0
- package/node_modules/prism-media/src/index.js +5 -0
- package/node_modules/prism-media/src/opus/OggDemuxer.js +143 -0
- package/node_modules/prism-media/src/opus/Opus.js +212 -0
- package/node_modules/prism-media/src/opus/WebmDemuxer.js +24 -0
- package/node_modules/prism-media/src/opus/index.js +10 -0
- package/node_modules/prism-media/src/util/loader.js +13 -0
- package/node_modules/prism-media/src/vorbis/WebmDemuxer.js +22 -0
- package/node_modules/prism-media/src/vorbis/index.js +8 -0
- package/node_modules/prism-media/typings/index.d.ts +43 -0
- package/node_modules/prism-media/typings/opus.d.ts +30 -0
- package/node_modules/prism-media/typings/vorbis.d.ts +5 -0
- package/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/node_modules/tslib/LICENSE.txt +12 -0
- package/node_modules/tslib/README.md +164 -0
- package/node_modules/tslib/SECURITY.md +41 -0
- package/node_modules/tslib/modules/index.d.ts +38 -0
- package/node_modules/tslib/modules/index.js +70 -0
- package/node_modules/tslib/modules/package.json +3 -0
- package/node_modules/tslib/package.json +47 -0
- package/node_modules/tslib/tslib.d.ts +460 -0
- package/node_modules/tslib/tslib.es6.html +1 -0
- package/node_modules/tslib/tslib.es6.js +402 -0
- package/node_modules/tslib/tslib.es6.mjs +401 -0
- package/node_modules/tslib/tslib.html +1 -0
- package/node_modules/tslib/tslib.js +484 -0
- package/node_modules/typebox/build/compile/code.d.mts +12 -0
- package/node_modules/typebox/build/compile/code.mjs +65 -0
- package/node_modules/typebox/build/compile/compile.d.mts +6 -0
- package/node_modules/typebox/build/compile/compile.mjs +12 -0
- package/node_modules/typebox/build/compile/index.d.mts +8 -0
- package/node_modules/typebox/build/compile/index.mjs +14 -0
- package/node_modules/typebox/build/compile/validator.d.mts +43 -0
- package/node_modules/typebox/build/compile/validator.mjs +121 -0
- package/node_modules/typebox/build/error/errors.d.mts +214 -0
- package/node_modules/typebox/build/error/errors.mjs +18 -0
- package/node_modules/typebox/build/error/index.d.mts +1 -0
- package/node_modules/typebox/build/error/index.mjs +1 -0
- package/node_modules/typebox/build/format/_idna.d.mts +2 -0
- package/node_modules/typebox/build/format/_idna.mjs +216 -0
- package/node_modules/typebox/build/format/_puny.d.mts +1 -0
- package/node_modules/typebox/build/format/_puny.mjs +74 -0
- package/node_modules/typebox/build/format/_registry.d.mts +15 -0
- package/node_modules/typebox/build/format/_registry.mjs +96 -0
- package/node_modules/typebox/build/format/date.d.mts +6 -0
- package/node_modules/typebox/build/format/date.mjs +19 -0
- package/node_modules/typebox/build/format/date_time.d.mts +6 -0
- package/node_modules/typebox/build/format/date_time.mjs +11 -0
- package/node_modules/typebox/build/format/duration.d.mts +5 -0
- package/node_modules/typebox/build/format/duration.mjs +8 -0
- package/node_modules/typebox/build/format/email.d.mts +5 -0
- package/node_modules/typebox/build/format/email.mjs +8 -0
- package/node_modules/typebox/build/format/format.d.mts +22 -0
- package/node_modules/typebox/build/format/format.mjs +22 -0
- package/node_modules/typebox/build/format/hostname.d.mts +7 -0
- package/node_modules/typebox/build/format/hostname.mjs +18 -0
- package/node_modules/typebox/build/format/idn_email.d.mts +5 -0
- package/node_modules/typebox/build/format/idn_email.mjs +8 -0
- package/node_modules/typebox/build/format/idn_hostname.d.mts +7 -0
- package/node_modules/typebox/build/format/idn_hostname.mjs +19 -0
- package/node_modules/typebox/build/format/index.d.mts +4 -0
- package/node_modules/typebox/build/format/index.mjs +4 -0
- package/node_modules/typebox/build/format/ipv4.d.mts +6 -0
- package/node_modules/typebox/build/format/ipv4.mjs +38 -0
- package/node_modules/typebox/build/format/ipv6.d.mts +5 -0
- package/node_modules/typebox/build/format/ipv6.mjs +67 -0
- package/node_modules/typebox/build/format/iri.d.mts +5 -0
- package/node_modules/typebox/build/format/iri.mjs +13 -0
- package/node_modules/typebox/build/format/iri_reference.d.mts +5 -0
- package/node_modules/typebox/build/format/iri_reference.mjs +60 -0
- package/node_modules/typebox/build/format/json_pointer.d.mts +6 -0
- package/node_modules/typebox/build/format/json_pointer.mjs +9 -0
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +6 -0
- package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +9 -0
- package/node_modules/typebox/build/format/regex.d.mts +6 -0
- package/node_modules/typebox/build/format/regex.mjs +17 -0
- package/node_modules/typebox/build/format/relative_json_pointer.d.mts +6 -0
- package/node_modules/typebox/build/format/relative_json_pointer.mjs +9 -0
- package/node_modules/typebox/build/format/time.d.mts +5 -0
- package/node_modules/typebox/build/format/time.mjs +27 -0
- package/node_modules/typebox/build/format/uri.d.mts +5 -0
- package/node_modules/typebox/build/format/uri.mjs +135 -0
- package/node_modules/typebox/build/format/uri_reference.d.mts +5 -0
- package/node_modules/typebox/build/format/uri_reference.mjs +9 -0
- package/node_modules/typebox/build/format/uri_template.d.mts +6 -0
- package/node_modules/typebox/build/format/uri_template.mjs +10 -0
- package/node_modules/typebox/build/format/url.d.mts +6 -0
- package/node_modules/typebox/build/format/url.mjs +9 -0
- package/node_modules/typebox/build/format/uuid.d.mts +6 -0
- package/node_modules/typebox/build/format/uuid.mjs +9 -0
- package/node_modules/typebox/build/guard/emit.d.mts +58 -0
- package/node_modules/typebox/build/guard/emit.mjs +194 -0
- package/node_modules/typebox/build/guard/globals.d.mts +35 -0
- package/node_modules/typebox/build/guard/globals.mjs +90 -0
- package/node_modules/typebox/build/guard/guard.d.mts +69 -0
- package/node_modules/typebox/build/guard/guard.mjs +217 -0
- package/node_modules/typebox/build/guard/index.d.mts +6 -0
- package/node_modules/typebox/build/guard/index.mjs +6 -0
- package/node_modules/typebox/build/guard/native.d.mts +20 -0
- package/node_modules/typebox/build/guard/native.mjs +60 -0
- package/node_modules/typebox/build/guard/string.d.mts +6 -0
- package/node_modules/typebox/build/guard/string.mjs +164 -0
- package/node_modules/typebox/build/index.d.mts +8 -0
- package/node_modules/typebox/build/index.mjs +14 -0
- package/node_modules/typebox/build/schema/build.d.mts +39 -0
- package/node_modules/typebox/build/schema/build.mjs +118 -0
- package/node_modules/typebox/build/schema/check.d.mts +6 -0
- package/node_modules/typebox/build/schema/check.mjs +14 -0
- package/node_modules/typebox/build/schema/compile.d.mts +22 -0
- package/node_modules/typebox/build/schema/compile.mjs +46 -0
- package/node_modules/typebox/build/schema/engine/_context.d.mts +35 -0
- package/node_modules/typebox/build/schema/engine/_context.mjs +129 -0
- package/node_modules/typebox/build/schema/engine/_exact_optional.d.mts +3 -0
- package/node_modules/typebox/build/schema/engine/_exact_optional.mjs +20 -0
- package/node_modules/typebox/build/schema/engine/_externals.d.mts +7 -0
- package/node_modules/typebox/build/schema/engine/_externals.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/_functions.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/_functions.mjs +47 -0
- package/node_modules/typebox/build/schema/engine/_guard.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/_guard.mjs +26 -0
- package/node_modules/typebox/build/schema/engine/_reducer.d.mts +4 -0
- package/node_modules/typebox/build/schema/engine/_reducer.mjs +45 -0
- package/node_modules/typebox/build/schema/engine/_refine.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/_refine.mjs +29 -0
- package/node_modules/typebox/build/schema/engine/_stack.d.mts +18 -0
- package/node_modules/typebox/build/schema/engine/_stack.mjs +107 -0
- package/node_modules/typebox/build/schema/engine/_unique.d.mts +2 -0
- package/node_modules/typebox/build/schema/engine/_unique.mjs +5 -0
- package/node_modules/typebox/build/schema/engine/additionalItems.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/additionalItems.mjs +50 -0
- package/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +9 -0
- package/node_modules/typebox/build/schema/engine/additionalProperties.mjs +110 -0
- package/node_modules/typebox/build/schema/engine/allOf.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/allOf.mjs +47 -0
- package/node_modules/typebox/build/schema/engine/anyOf.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/anyOf.mjs +52 -0
- package/node_modules/typebox/build/schema/engine/boolean.d.mts +5 -0
- package/node_modules/typebox/build/schema/engine/boolean.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/const.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/const.mjs +30 -0
- package/node_modules/typebox/build/schema/engine/contains.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/contains.mjs +42 -0
- package/node_modules/typebox/build/schema/engine/dependencies.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/dependencies.mjs +45 -0
- package/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/dependentRequired.mjs +40 -0
- package/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +38 -0
- package/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/dynamicRef.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/enum.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/enum.mjs +33 -0
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/format.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/format.mjs +26 -0
- package/node_modules/typebox/build/schema/engine/if.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/if.mjs +47 -0
- package/node_modules/typebox/build/schema/engine/index.d.mts +49 -0
- package/node_modules/typebox/build/schema/engine/index.mjs +55 -0
- package/node_modules/typebox/build/schema/engine/items.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/items.mjs +68 -0
- package/node_modules/typebox/build/schema/engine/maxContains.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/maxContains.mjs +42 -0
- package/node_modules/typebox/build/schema/engine/maxItems.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/maxItems.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/maxLength.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/maxLength.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/maxProperties.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/maxProperties.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/maximum.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/maximum.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/minContains.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/minContains.mjs +41 -0
- package/node_modules/typebox/build/schema/engine/minItems.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/minItems.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/minLength.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/minLength.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/minProperties.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/minProperties.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/minimum.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/minimum.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/multipleOf.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/multipleOf.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/not.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/not.mjs +37 -0
- package/node_modules/typebox/build/schema/engine/oneOf.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/oneOf.mjs +58 -0
- package/node_modules/typebox/build/schema/engine/pattern.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/pattern.mjs +28 -0
- package/node_modules/typebox/build/schema/engine/patternProperties.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/patternProperties.mjs +44 -0
- package/node_modules/typebox/build/schema/engine/prefixItems.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/prefixItems.mjs +35 -0
- package/node_modules/typebox/build/schema/engine/properties.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/properties.mjs +75 -0
- package/node_modules/typebox/build/schema/engine/propertyNames.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/propertyNames.mjs +39 -0
- package/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/recursiveRef.mjs +25 -0
- package/node_modules/typebox/build/schema/engine/ref.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/ref.mjs +58 -0
- package/node_modules/typebox/build/schema/engine/required.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/required.mjs +32 -0
- package/node_modules/typebox/build/schema/engine/schema.d.mts +9 -0
- package/node_modules/typebox/build/schema/engine/schema.mjs +352 -0
- package/node_modules/typebox/build/schema/engine/type.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/type.mjs +74 -0
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +51 -0
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +51 -0
- package/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +6 -0
- package/node_modules/typebox/build/schema/engine/uniqueItems.mjs +51 -0
- package/node_modules/typebox/build/schema/errors.d.mts +6 -0
- package/node_modules/typebox/build/schema/errors.mjs +24 -0
- package/node_modules/typebox/build/schema/index.d.mts +3 -0
- package/node_modules/typebox/build/schema/index.mjs +9 -0
- package/node_modules/typebox/build/schema/parse.d.mts +13 -0
- package/node_modules/typebox/build/schema/parse.mjs +27 -0
- package/node_modules/typebox/build/schema/pointer/index.d.mts +2 -0
- package/node_modules/typebox/build/schema/pointer/index.mjs +2 -0
- package/node_modules/typebox/build/schema/pointer/pointer.d.mts +10 -0
- package/node_modules/typebox/build/schema/pointer/pointer.mjs +106 -0
- package/node_modules/typebox/build/schema/pointer/pointer_get.d.mts +9 -0
- package/node_modules/typebox/build/schema/pointer/pointer_get.mjs +2 -0
- package/node_modules/typebox/build/schema/resolve/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/resolve/index.mjs +1 -0
- package/node_modules/typebox/build/schema/resolve/ref.d.mts +3 -0
- package/node_modules/typebox/build/schema/resolve/ref.mjs +146 -0
- package/node_modules/typebox/build/schema/resolve/resolve.d.mts +1 -0
- package/node_modules/typebox/build/schema/resolve/resolve.mjs +1 -0
- package/node_modules/typebox/build/schema/schema.d.mts +10 -0
- package/node_modules/typebox/build/schema/schema.mjs +10 -0
- package/node_modules/typebox/build/schema/static/_canonical.d.mts +7 -0
- package/node_modules/typebox/build/schema/static/_canonical.mjs +2 -0
- package/node_modules/typebox/build/schema/static/_comparer.d.mts +6 -0
- package/node_modules/typebox/build/schema/static/_comparer.mjs +2 -0
- package/node_modules/typebox/build/schema/static/_elements.d.mts +18 -0
- package/node_modules/typebox/build/schema/static/_elements.mjs +2 -0
- package/node_modules/typebox/build/schema/static/additionalProperties.d.mts +7 -0
- package/node_modules/typebox/build/schema/static/additionalProperties.mjs +3 -0
- package/node_modules/typebox/build/schema/static/allOf.d.mts +3 -0
- package/node_modules/typebox/build/schema/static/allOf.mjs +2 -0
- package/node_modules/typebox/build/schema/static/anyOf.d.mts +3 -0
- package/node_modules/typebox/build/schema/static/anyOf.mjs +2 -0
- package/node_modules/typebox/build/schema/static/const.d.mts +1 -0
- package/node_modules/typebox/build/schema/static/const.mjs +2 -0
- package/node_modules/typebox/build/schema/static/enum.d.mts +1 -0
- package/node_modules/typebox/build/schema/static/enum.mjs +2 -0
- package/node_modules/typebox/build/schema/static/if.d.mts +15 -0
- package/node_modules/typebox/build/schema/static/if.mjs +2 -0
- package/node_modules/typebox/build/schema/static/index.d.mts +1 -0
- package/node_modules/typebox/build/schema/static/index.mjs +1 -0
- package/node_modules/typebox/build/schema/static/items.d.mts +7 -0
- package/node_modules/typebox/build/schema/static/items.mjs +2 -0
- package/node_modules/typebox/build/schema/static/oneOf.d.mts +3 -0
- package/node_modules/typebox/build/schema/static/oneOf.mjs +2 -0
- package/node_modules/typebox/build/schema/static/patternProperties.d.mts +7 -0
- package/node_modules/typebox/build/schema/static/patternProperties.mjs +2 -0
- package/node_modules/typebox/build/schema/static/prefixItems.d.mts +3 -0
- package/node_modules/typebox/build/schema/static/prefixItems.mjs +2 -0
- package/node_modules/typebox/build/schema/static/properties.d.mts +32 -0
- package/node_modules/typebox/build/schema/static/properties.mjs +2 -0
- package/node_modules/typebox/build/schema/static/ref.d.mts +8 -0
- package/node_modules/typebox/build/schema/static/ref.mjs +3 -0
- package/node_modules/typebox/build/schema/static/required.d.mts +3 -0
- package/node_modules/typebox/build/schema/static/required.mjs +3 -0
- package/node_modules/typebox/build/schema/static/schema.d.mts +56 -0
- package/node_modules/typebox/build/schema/static/schema.mjs +2 -0
- package/node_modules/typebox/build/schema/static/static.d.mts +4 -0
- package/node_modules/typebox/build/schema/static/static.mjs +3 -0
- package/node_modules/typebox/build/schema/static/type.d.mts +4 -0
- package/node_modules/typebox/build/schema/static/type.mjs +3 -0
- package/node_modules/typebox/build/schema/static/unevaluatedProperties.d.mts +7 -0
- package/node_modules/typebox/build/schema/static/unevaluatedProperties.mjs +3 -0
- package/node_modules/typebox/build/schema/types/_guard.d.mts +10 -0
- package/node_modules/typebox/build/schema/types/_guard.mjs +16 -0
- package/node_modules/typebox/build/schema/types/_refine.d.mts +13 -0
- package/node_modules/typebox/build/schema/types/_refine.mjs +18 -0
- package/node_modules/typebox/build/schema/types/additionalItems.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/additionalItems.mjs +14 -0
- package/node_modules/typebox/build/schema/types/additionalProperties.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/additionalProperties.mjs +14 -0
- package/node_modules/typebox/build/schema/types/allOf.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/allOf.mjs +15 -0
- package/node_modules/typebox/build/schema/types/anchor.d.mts +8 -0
- package/node_modules/typebox/build/schema/types/anchor.mjs +12 -0
- package/node_modules/typebox/build/schema/types/anyOf.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/anyOf.mjs +15 -0
- package/node_modules/typebox/build/schema/types/const.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/const.mjs +12 -0
- package/node_modules/typebox/build/schema/types/contains.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/contains.mjs +14 -0
- package/node_modules/typebox/build/schema/types/contentEncoding.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/contentEncoding.mjs +13 -0
- package/node_modules/typebox/build/schema/types/contentMediaType.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/contentMediaType.mjs +13 -0
- package/node_modules/typebox/build/schema/types/default.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/default.mjs +12 -0
- package/node_modules/typebox/build/schema/types/defs.d.mts +6 -0
- package/node_modules/typebox/build/schema/types/defs.mjs +12 -0
- package/node_modules/typebox/build/schema/types/dependencies.d.mts +11 -0
- package/node_modules/typebox/build/schema/types/dependencies.mjs +16 -0
- package/node_modules/typebox/build/schema/types/dependentRequired.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/dependentRequired.mjs +15 -0
- package/node_modules/typebox/build/schema/types/dependentSchemas.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/dependentSchemas.mjs +15 -0
- package/node_modules/typebox/build/schema/types/dynamicAnchor.d.mts +8 -0
- package/node_modules/typebox/build/schema/types/dynamicAnchor.mjs +12 -0
- package/node_modules/typebox/build/schema/types/dynamicRef.d.mts +8 -0
- package/node_modules/typebox/build/schema/types/dynamicRef.mjs +12 -0
- package/node_modules/typebox/build/schema/types/else.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/else.mjs +14 -0
- package/node_modules/typebox/build/schema/types/enum.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/enum.mjs +13 -0
- package/node_modules/typebox/build/schema/types/exclusiveMaximum.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/exclusiveMaximum.mjs +13 -0
- package/node_modules/typebox/build/schema/types/exclusiveMinimum.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/exclusiveMinimum.mjs +13 -0
- package/node_modules/typebox/build/schema/types/format.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/format.mjs +13 -0
- package/node_modules/typebox/build/schema/types/id.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/id.mjs +13 -0
- package/node_modules/typebox/build/schema/types/if.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/if.mjs +14 -0
- package/node_modules/typebox/build/schema/types/index.d.mts +54 -0
- package/node_modules/typebox/build/schema/types/index.mjs +60 -0
- package/node_modules/typebox/build/schema/types/items.d.mts +19 -0
- package/node_modules/typebox/build/schema/types/items.mjs +26 -0
- package/node_modules/typebox/build/schema/types/maxContains.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/maxContains.mjs +13 -0
- package/node_modules/typebox/build/schema/types/maxItems.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/maxItems.mjs +13 -0
- package/node_modules/typebox/build/schema/types/maxLength.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/maxLength.mjs +13 -0
- package/node_modules/typebox/build/schema/types/maxProperties.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/maxProperties.mjs +13 -0
- package/node_modules/typebox/build/schema/types/maximum.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/maximum.mjs +13 -0
- package/node_modules/typebox/build/schema/types/minContains.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/minContains.mjs +13 -0
- package/node_modules/typebox/build/schema/types/minItems.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/minItems.mjs +13 -0
- package/node_modules/typebox/build/schema/types/minLength.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/minLength.mjs +13 -0
- package/node_modules/typebox/build/schema/types/minProperties.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/minProperties.mjs +13 -0
- package/node_modules/typebox/build/schema/types/minimum.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/minimum.mjs +13 -0
- package/node_modules/typebox/build/schema/types/multipleOf.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/multipleOf.mjs +13 -0
- package/node_modules/typebox/build/schema/types/not.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/not.mjs +14 -0
- package/node_modules/typebox/build/schema/types/oneOf.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/oneOf.mjs +15 -0
- package/node_modules/typebox/build/schema/types/pattern.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/pattern.mjs +14 -0
- package/node_modules/typebox/build/schema/types/patternProperties.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/patternProperties.mjs +15 -0
- package/node_modules/typebox/build/schema/types/prefixItems.d.mts +8 -0
- package/node_modules/typebox/build/schema/types/prefixItems.mjs +14 -0
- package/node_modules/typebox/build/schema/types/properties.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/properties.mjs +15 -0
- package/node_modules/typebox/build/schema/types/propertyNames.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/propertyNames.mjs +15 -0
- package/node_modules/typebox/build/schema/types/recursiveAnchor.d.mts +12 -0
- package/node_modules/typebox/build/schema/types/recursiveAnchor.mjs +19 -0
- package/node_modules/typebox/build/schema/types/recursiveRef.d.mts +8 -0
- package/node_modules/typebox/build/schema/types/recursiveRef.mjs +12 -0
- package/node_modules/typebox/build/schema/types/ref.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/ref.mjs +13 -0
- package/node_modules/typebox/build/schema/types/required.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/required.mjs +14 -0
- package/node_modules/typebox/build/schema/types/schema.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/schema.mjs +14 -0
- package/node_modules/typebox/build/schema/types/then.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/then.mjs +14 -0
- package/node_modules/typebox/build/schema/types/type.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/type.mjs +15 -0
- package/node_modules/typebox/build/schema/types/unevaluatedItems.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/unevaluatedItems.mjs +14 -0
- package/node_modules/typebox/build/schema/types/unevaluatedProperties.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/unevaluatedProperties.mjs +14 -0
- package/node_modules/typebox/build/schema/types/uniqueItems.d.mts +9 -0
- package/node_modules/typebox/build/schema/types/uniqueItems.mjs +13 -0
- package/node_modules/typebox/build/system/arguments/arguments.d.mts +5 -0
- package/node_modules/typebox/build/system/arguments/arguments.mjs +9 -0
- package/node_modules/typebox/build/system/arguments/index.d.mts +1 -0
- package/node_modules/typebox/build/system/arguments/index.mjs +1 -0
- package/node_modules/typebox/build/system/environment/environment.d.mts +1 -0
- package/node_modules/typebox/build/system/environment/environment.mjs +1 -0
- package/node_modules/typebox/build/system/environment/evaluate.d.mts +9 -0
- package/node_modules/typebox/build/system/environment/evaluate.mjs +37 -0
- package/node_modules/typebox/build/system/environment/index.d.mts +1 -0
- package/node_modules/typebox/build/system/environment/index.mjs +1 -0
- package/node_modules/typebox/build/system/hashing/hash.d.mts +4 -0
- package/node_modules/typebox/build/system/hashing/hash.mjs +232 -0
- package/node_modules/typebox/build/system/hashing/index.d.mts +1 -0
- package/node_modules/typebox/build/system/hashing/index.mjs +1 -0
- package/node_modules/typebox/build/system/index.d.mts +4 -0
- package/node_modules/typebox/build/system/index.mjs +4 -0
- package/node_modules/typebox/build/system/locale/_config.d.mts +7 -0
- package/node_modules/typebox/build/system/locale/_config.mjs +15 -0
- package/node_modules/typebox/build/system/locale/_locale.d.mts +40 -0
- package/node_modules/typebox/build/system/locale/_locale.mjs +40 -0
- package/node_modules/typebox/build/system/locale/ar_001.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ar_001.mjs +41 -0
- package/node_modules/typebox/build/system/locale/bn_BD.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/bn_BD.mjs +41 -0
- package/node_modules/typebox/build/system/locale/cs_CZ.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/cs_CZ.mjs +41 -0
- package/node_modules/typebox/build/system/locale/de_DE.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/de_DE.mjs +41 -0
- package/node_modules/typebox/build/system/locale/el_GR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/el_GR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/en_US.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/en_US.mjs +40 -0
- package/node_modules/typebox/build/system/locale/es_419.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/es_419.mjs +41 -0
- package/node_modules/typebox/build/system/locale/es_AR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/es_AR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/es_ES.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/es_ES.mjs +41 -0
- package/node_modules/typebox/build/system/locale/es_MX.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/es_MX.mjs +41 -0
- package/node_modules/typebox/build/system/locale/fa_IR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/fa_IR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/fil_PH.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/fil_PH.mjs +41 -0
- package/node_modules/typebox/build/system/locale/fr_CA.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/fr_CA.mjs +41 -0
- package/node_modules/typebox/build/system/locale/fr_FR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/fr_FR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ha_NG.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ha_NG.mjs +41 -0
- package/node_modules/typebox/build/system/locale/hi_IN.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/hi_IN.mjs +41 -0
- package/node_modules/typebox/build/system/locale/hu_HU.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/hu_HU.mjs +41 -0
- package/node_modules/typebox/build/system/locale/id_ID.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/id_ID.mjs +41 -0
- package/node_modules/typebox/build/system/locale/index.d.mts +1 -0
- package/node_modules/typebox/build/system/locale/index.mjs +1 -0
- package/node_modules/typebox/build/system/locale/it_IT.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/it_IT.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ja_JP.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ja_JP.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ko_KR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ko_KR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ms_MY.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ms_MY.mjs +41 -0
- package/node_modules/typebox/build/system/locale/nl_NL.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/nl_NL.mjs +41 -0
- package/node_modules/typebox/build/system/locale/pl_PL.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/pl_PL.mjs +41 -0
- package/node_modules/typebox/build/system/locale/pt_BR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/pt_BR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/pt_PT.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/pt_PT.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ro_RO.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ro_RO.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ru_RU.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ru_RU.mjs +41 -0
- package/node_modules/typebox/build/system/locale/sv_SE.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/sv_SE.mjs +41 -0
- package/node_modules/typebox/build/system/locale/sw_TZ.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/sw_TZ.mjs +41 -0
- package/node_modules/typebox/build/system/locale/th_TH.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/th_TH.mjs +41 -0
- package/node_modules/typebox/build/system/locale/tr_TR.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/tr_TR.mjs +41 -0
- package/node_modules/typebox/build/system/locale/uk_UA.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/uk_UA.mjs +41 -0
- package/node_modules/typebox/build/system/locale/ur_PK.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/ur_PK.mjs +41 -0
- package/node_modules/typebox/build/system/locale/vi_VN.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/vi_VN.mjs +41 -0
- package/node_modules/typebox/build/system/locale/yo_NG.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/yo_NG.mjs +41 -0
- package/node_modules/typebox/build/system/locale/zh_Hans.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/zh_Hans.mjs +41 -0
- package/node_modules/typebox/build/system/locale/zh_Hant.d.mts +3 -0
- package/node_modules/typebox/build/system/locale/zh_Hant.mjs +41 -0
- package/node_modules/typebox/build/system/memory/assign.d.mts +14 -0
- package/node_modules/typebox/build/system/memory/assign.mjs +11 -0
- package/node_modules/typebox/build/system/memory/clone.d.mts +6 -0
- package/node_modules/typebox/build/system/memory/clone.mjs +63 -0
- package/node_modules/typebox/build/system/memory/create.d.mts +8 -0
- package/node_modules/typebox/build/system/memory/create.mjs +30 -0
- package/node_modules/typebox/build/system/memory/discard.d.mts +4 -0
- package/node_modules/typebox/build/system/memory/discard.mjs +17 -0
- package/node_modules/typebox/build/system/memory/index.d.mts +1 -0
- package/node_modules/typebox/build/system/memory/index.mjs +1 -0
- package/node_modules/typebox/build/system/memory/memory.d.mts +6 -0
- package/node_modules/typebox/build/system/memory/memory.mjs +7 -0
- package/node_modules/typebox/build/system/memory/metrics.d.mts +14 -0
- package/node_modules/typebox/build/system/memory/metrics.mjs +8 -0
- package/node_modules/typebox/build/system/memory/update.d.mts +7 -0
- package/node_modules/typebox/build/system/memory/update.mjs +32 -0
- package/node_modules/typebox/build/system/settings/index.d.mts +1 -0
- package/node_modules/typebox/build/system/settings/index.mjs +1 -0
- package/node_modules/typebox/build/system/settings/settings.d.mts +56 -0
- package/node_modules/typebox/build/system/settings/settings.mjs +32 -0
- package/node_modules/typebox/build/system/system.d.mts +6 -0
- package/node_modules/typebox/build/system/system.mjs +6 -0
- package/node_modules/typebox/build/system/unreachable/index.d.mts +1 -0
- package/node_modules/typebox/build/system/unreachable/index.mjs +1 -0
- package/node_modules/typebox/build/system/unreachable/unreachable.d.mts +3 -0
- package/node_modules/typebox/build/system/unreachable/unreachable.mjs +6 -0
- package/node_modules/typebox/build/type/action/_optional.d.mts +19 -0
- package/node_modules/typebox/build/type/action/_optional.mjs +40 -0
- package/node_modules/typebox/build/type/action/_readonly.d.mts +19 -0
- package/node_modules/typebox/build/type/action/_readonly.mjs +40 -0
- package/node_modules/typebox/build/type/action/awaited.d.mts +15 -0
- package/node_modules/typebox/build/type/action/awaited.mjs +15 -0
- package/node_modules/typebox/build/type/action/capitalize.d.mts +11 -0
- package/node_modules/typebox/build/type/action/capitalize.mjs +11 -0
- package/node_modules/typebox/build/type/action/conditional.d.mts +13 -0
- package/node_modules/typebox/build/type/action/conditional.mjs +12 -0
- package/node_modules/typebox/build/type/action/constructor_parameters.d.mts +11 -0
- package/node_modules/typebox/build/type/action/constructor_parameters.mjs +11 -0
- package/node_modules/typebox/build/type/action/evaluate.d.mts +11 -0
- package/node_modules/typebox/build/type/action/evaluate.mjs +11 -0
- package/node_modules/typebox/build/type/action/exclude.d.mts +11 -0
- package/node_modules/typebox/build/type/action/exclude.mjs +11 -0
- package/node_modules/typebox/build/type/action/extract.d.mts +11 -0
- package/node_modules/typebox/build/type/action/extract.mjs +11 -0
- package/node_modules/typebox/build/type/action/index.d.mts +27 -0
- package/node_modules/typebox/build/type/action/index.mjs +27 -0
- package/node_modules/typebox/build/type/action/indexed.d.mts +14 -0
- package/node_modules/typebox/build/type/action/indexed.mjs +14 -0
- package/node_modules/typebox/build/type/action/instance_type.d.mts +11 -0
- package/node_modules/typebox/build/type/action/instance_type.mjs +11 -0
- package/node_modules/typebox/build/type/action/interface.d.mts +14 -0
- package/node_modules/typebox/build/type/action/interface.mjs +22 -0
- package/node_modules/typebox/build/type/action/keyof.d.mts +11 -0
- package/node_modules/typebox/build/type/action/keyof.mjs +11 -0
- package/node_modules/typebox/build/type/action/lowercase.d.mts +11 -0
- package/node_modules/typebox/build/type/action/lowercase.mjs +11 -0
- package/node_modules/typebox/build/type/action/mapped.d.mts +14 -0
- package/node_modules/typebox/build/type/action/mapped.mjs +12 -0
- package/node_modules/typebox/build/type/action/module.d.mts +12 -0
- package/node_modules/typebox/build/type/action/module.mjs +12 -0
- package/node_modules/typebox/build/type/action/non_nullable.d.mts +11 -0
- package/node_modules/typebox/build/type/action/non_nullable.mjs +11 -0
- package/node_modules/typebox/build/type/action/omit.d.mts +14 -0
- package/node_modules/typebox/build/type/action/omit.mjs +14 -0
- package/node_modules/typebox/build/type/action/options.d.mts +11 -0
- package/node_modules/typebox/build/type/action/options.mjs +11 -0
- package/node_modules/typebox/build/type/action/parameters.d.mts +11 -0
- package/node_modules/typebox/build/type/action/parameters.mjs +11 -0
- package/node_modules/typebox/build/type/action/partial.d.mts +11 -0
- package/node_modules/typebox/build/type/action/partial.mjs +11 -0
- package/node_modules/typebox/build/type/action/pick.d.mts +14 -0
- package/node_modules/typebox/build/type/action/pick.mjs +14 -0
- package/node_modules/typebox/build/type/action/readonly_object.d.mts +16 -0
- package/node_modules/typebox/build/type/action/readonly_object.mjs +16 -0
- package/node_modules/typebox/build/type/action/required.d.mts +11 -0
- package/node_modules/typebox/build/type/action/required.mjs +11 -0
- package/node_modules/typebox/build/type/action/return_type.d.mts +11 -0
- package/node_modules/typebox/build/type/action/return_type.mjs +11 -0
- package/node_modules/typebox/build/type/action/uncapitalize.d.mts +11 -0
- package/node_modules/typebox/build/type/action/uncapitalize.mjs +11 -0
- package/node_modules/typebox/build/type/action/uppercase.d.mts +11 -0
- package/node_modules/typebox/build/type/action/uppercase.mjs +11 -0
- package/node_modules/typebox/build/type/engine/awaited/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/awaited/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +11 -0
- package/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +20 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +53 -0
- package/node_modules/typebox/build/type/engine/call/instantiate.d.mts +23 -0
- package/node_modules/typebox/build/type/engine/call/instantiate.mjs +48 -0
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.d.mts +13 -0
- package/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +33 -0
- package/node_modules/typebox/build/type/engine/call/resolve_target.d.mts +25 -0
- package/node_modules/typebox/build/type/engine/call/resolve_target.mjs +27 -0
- package/node_modules/typebox/build/type/engine/conditional/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/conditional/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/conditional/instantiate.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/conditional/instantiate.mjs +23 -0
- package/node_modules/typebox/build/type/engine/constructor_parameters/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/constructor_parameters/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +24 -0
- package/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +19 -0
- package/node_modules/typebox/build/type/engine/cyclic/check.d.mts +24 -0
- package/node_modules/typebox/build/type/engine/cyclic/check.mjs +51 -0
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +25 -0
- package/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +53 -0
- package/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +31 -0
- package/node_modules/typebox/build/type/engine/cyclic/extends.mjs +53 -0
- package/node_modules/typebox/build/type/engine/cyclic/index.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/cyclic/index.mjs +6 -0
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +30 -0
- package/node_modules/typebox/build/type/engine/cyclic/target.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/cyclic/target.mjs +16 -0
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.d.mts +14 -0
- package/node_modules/typebox/build/type/engine/enum/enum_to_union.mjs +24 -0
- package/node_modules/typebox/build/type/engine/enum/index.d.mts +2 -0
- package/node_modules/typebox/build/type/engine/enum/index.mjs +2 -0
- package/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs +9 -0
- package/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +16 -0
- package/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +47 -0
- package/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/evaluate/compare.mjs +22 -0
- package/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +30 -0
- package/node_modules/typebox/build/type/engine/evaluate/composite.mjs +63 -0
- package/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +27 -0
- package/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +45 -0
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +14 -0
- package/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +27 -0
- package/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +11 -0
- package/node_modules/typebox/build/type/engine/evaluate/index.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/evaluate/index.mjs +8 -0
- package/node_modules/typebox/build/type/engine/evaluate/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs +12 -0
- package/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +11 -0
- package/node_modules/typebox/build/type/engine/exclude/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/exclude/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/exclude/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/exclude/instantiate.mjs +16 -0
- package/node_modules/typebox/build/type/engine/exclude/operation.d.mts +11 -0
- package/node_modules/typebox/build/type/engine/exclude/operation.mjs +24 -0
- package/node_modules/typebox/build/type/engine/extract/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/extract/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/extract/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/extract/instantiate.mjs +16 -0
- package/node_modules/typebox/build/type/engine/extract/operation.d.mts +11 -0
- package/node_modules/typebox/build/type/engine/extract/operation.mjs +24 -0
- package/node_modules/typebox/build/type/engine/helpers/index.d.mts +3 -0
- package/node_modules/typebox/build/type/engine/helpers/index.mjs +3 -0
- package/node_modules/typebox/build/type/engine/helpers/keys.d.mts +3 -0
- package/node_modules/typebox/build/type/engine/helpers/keys.mjs +8 -0
- package/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.d.mts +7 -0
- package/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs +15 -0
- package/node_modules/typebox/build/type/engine/helpers/union.d.mts +7 -0
- package/node_modules/typebox/build/type/engine/helpers/union.mjs +3 -0
- package/node_modules/typebox/build/type/engine/index.d.mts +31 -0
- package/node_modules/typebox/build/type/engine/index.mjs +37 -0
- package/node_modules/typebox/build/type/engine/indexable/from_cyclic.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_intersect.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_literal.d.mts +3 -0
- package/node_modules/typebox/build/type/engine/indexable/from_literal.mjs +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +8 -0
- package/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +17 -0
- package/node_modules/typebox/build/type/engine/indexable/from_type.mjs +22 -0
- package/node_modules/typebox/build/type/engine/indexable/from_union.d.mts +4 -0
- package/node_modules/typebox/build/type/engine/indexable/from_union.mjs +7 -0
- package/node_modules/typebox/build/type/engine/indexable/to_indexable.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs +14 -0
- package/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs +12 -0
- package/node_modules/typebox/build/type/engine/indexed/array_indexer.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs +18 -0
- package/node_modules/typebox/build/type/engine/indexed/from_array.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/indexed/from_array.mjs +35 -0
- package/node_modules/typebox/build/type/engine/indexed/from_object.d.mts +16 -0
- package/node_modules/typebox/build/type/engine/indexed/from_object.mjs +40 -0
- package/node_modules/typebox/build/type/engine/indexed/from_tuple.d.mts +13 -0
- package/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs +35 -0
- package/node_modules/typebox/build/type/engine/indexed/from_type.d.mts +11 -0
- package/node_modules/typebox/build/type/engine/indexed/from_type.mjs +14 -0
- package/node_modules/typebox/build/type/engine/indexed/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/indexed/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +25 -0
- package/node_modules/typebox/build/type/engine/instance_type/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/instance_type/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/instance_type/instantiate.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs +21 -0
- package/node_modules/typebox/build/type/engine/instantiate.d.mts +165 -0
- package/node_modules/typebox/build/type/engine/instantiate.mjs +159 -0
- package/node_modules/typebox/build/type/engine/interface/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/interface/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +18 -0
- package/node_modules/typebox/build/type/engine/interface/instantiate.mjs +23 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_literal.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs +9 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +8 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_type.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs +13 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_union.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs +7 -0
- package/node_modules/typebox/build/type/engine/intrinsics/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/intrinsics/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/intrinsics/instantiate.d.mts +38 -0
- package/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs +52 -0
- package/node_modules/typebox/build/type/engine/intrinsics/mapping.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs +4 -0
- package/node_modules/typebox/build/type/engine/keyof/from_any.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/keyof/from_any.mjs +8 -0
- package/node_modules/typebox/build/type/engine/keyof/from_array.d.mts +4 -0
- package/node_modules/typebox/build/type/engine/keyof/from_array.mjs +5 -0
- package/node_modules/typebox/build/type/engine/keyof/from_object.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/keyof/from_object.mjs +20 -0
- package/node_modules/typebox/build/type/engine/keyof/from_record.d.mts +4 -0
- package/node_modules/typebox/build/type/engine/keyof/from_record.mjs +5 -0
- package/node_modules/typebox/build/type/engine/keyof/from_tuple.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs +7 -0
- package/node_modules/typebox/build/type/engine/keyof/from_type.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/keyof/from_type.mjs +23 -0
- package/node_modules/typebox/build/type/engine/keyof/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/keyof/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +25 -0
- package/node_modules/typebox/build/type/engine/mapped/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/mapped/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/mapped/instantiate.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/mapped/instantiate.mjs +15 -0
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +22 -0
- package/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +42 -0
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +16 -0
- package/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +34 -0
- package/node_modules/typebox/build/type/engine/module/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/module/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/module/instantiate.d.mts +21 -0
- package/node_modules/typebox/build/type/engine/module/instantiate.mjs +34 -0
- package/node_modules/typebox/build/type/engine/non_nullable/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/non_nullable/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/non_nullable/instantiate.d.mts +14 -0
- package/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs +22 -0
- package/node_modules/typebox/build/type/engine/object/collapse.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/object/collapse.mjs +14 -0
- package/node_modules/typebox/build/type/engine/object/from_cyclic.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/object/from_cyclic.mjs +8 -0
- package/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +17 -0
- package/node_modules/typebox/build/type/engine/object/from_intersect.mjs +22 -0
- package/node_modules/typebox/build/type/engine/object/from_object.d.mts +3 -0
- package/node_modules/typebox/build/type/engine/object/from_object.mjs +4 -0
- package/node_modules/typebox/build/type/engine/object/from_tuple.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/object/from_tuple.mjs +9 -0
- package/node_modules/typebox/build/type/engine/object/from_type.d.mts +14 -0
- package/node_modules/typebox/build/type/engine/object/from_type.mjs +20 -0
- package/node_modules/typebox/build/type/engine/object/from_union.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/object/from_union.mjs +19 -0
- package/node_modules/typebox/build/type/engine/object/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/object/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/omit/from_type.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/omit/from_type.mjs +18 -0
- package/node_modules/typebox/build/type/engine/omit/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/omit/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/omit/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/omit/instantiate.mjs +16 -0
- package/node_modules/typebox/build/type/engine/options/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/options/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/options/instantiate.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/options/instantiate.mjs +14 -0
- package/node_modules/typebox/build/type/engine/parameters/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/parameters/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +15 -0
- package/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +24 -0
- package/node_modules/typebox/build/type/engine/partial/from_cyclic.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs +11 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +7 -0
- package/node_modules/typebox/build/type/engine/partial/from_object.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/partial/from_object.mjs +11 -0
- package/node_modules/typebox/build/type/engine/partial/from_type.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/partial/from_type.mjs +17 -0
- package/node_modules/typebox/build/type/engine/partial/from_union.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/partial/from_union.mjs +7 -0
- package/node_modules/typebox/build/type/engine/partial/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/partial/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/partial/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/partial/instantiate.mjs +15 -0
- package/node_modules/typebox/build/type/engine/patterns/index.d.mts +2 -0
- package/node_modules/typebox/build/type/engine/patterns/index.mjs +2 -0
- package/node_modules/typebox/build/type/engine/patterns/pattern.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/patterns/pattern.mjs +11 -0
- package/node_modules/typebox/build/type/engine/patterns/template.d.mts +7 -0
- package/node_modules/typebox/build/type/engine/patterns/template.mjs +20 -0
- package/node_modules/typebox/build/type/engine/pick/from_type.d.mts +13 -0
- package/node_modules/typebox/build/type/engine/pick/from_type.mjs +20 -0
- package/node_modules/typebox/build/type/engine/pick/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/pick/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/pick/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/pick/instantiate.mjs +16 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +7 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs +11 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +7 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +11 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +7 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +16 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +22 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_union.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs +7 -0
- package/node_modules/typebox/build/type/engine/readonly_object/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/readonly_object/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/readonly_object/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs +15 -0
- package/node_modules/typebox/build/type/engine/record/from_key.d.mts +24 -0
- package/node_modules/typebox/build/type/engine/record/from_key.mjs +40 -0
- package/node_modules/typebox/build/type/engine/record/from_key_any.d.mts +4 -0
- package/node_modules/typebox/build/type/engine/record/from_key_any.mjs +6 -0
- package/node_modules/typebox/build/type/engine/record/from_key_boolean.d.mts +7 -0
- package/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs +5 -0
- package/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +8 -0
- package/node_modules/typebox/build/type/engine/record/from_key_integer.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/record/from_key_integer.mjs +7 -0
- package/node_modules/typebox/build/type/engine/record/from_key_intersect.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs +8 -0
- package/node_modules/typebox/build/type/engine/record/from_key_literal.d.mts +11 -0
- package/node_modules/typebox/build/type/engine/record/from_key_literal.mjs +10 -0
- package/node_modules/typebox/build/type/engine/record/from_key_number.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/record/from_key_number.mjs +7 -0
- package/node_modules/typebox/build/type/engine/record/from_key_string.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/record/from_key_string.mjs +12 -0
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +12 -0
- package/node_modules/typebox/build/type/engine/record/from_key_union.d.mts +20 -0
- package/node_modules/typebox/build/type/engine/record/from_key_union.mjs +39 -0
- package/node_modules/typebox/build/type/engine/record/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/record/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/record/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/record/instantiate.mjs +17 -0
- package/node_modules/typebox/build/type/engine/record/record_create.d.mts +3 -0
- package/node_modules/typebox/build/type/engine/record/record_create.mjs +7 -0
- package/node_modules/typebox/build/type/engine/ref/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/ref/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/ref/instantiate.mjs +10 -0
- package/node_modules/typebox/build/type/engine/required/from_cyclic.d.mts +10 -0
- package/node_modules/typebox/build/type/engine/required/from_cyclic.mjs +11 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_intersect.mjs +7 -0
- package/node_modules/typebox/build/type/engine/required/from_object.d.mts +8 -0
- package/node_modules/typebox/build/type/engine/required/from_object.mjs +11 -0
- package/node_modules/typebox/build/type/engine/required/from_type.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/required/from_type.mjs +17 -0
- package/node_modules/typebox/build/type/engine/required/from_union.d.mts +5 -0
- package/node_modules/typebox/build/type/engine/required/from_union.mjs +7 -0
- package/node_modules/typebox/build/type/engine/required/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/required/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/required/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/required/instantiate.mjs +15 -0
- package/node_modules/typebox/build/type/engine/rest/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/rest/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/rest/spread.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/rest/spread.mjs +19 -0
- package/node_modules/typebox/build/type/engine/return_type/index.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/return_type/index.mjs +1 -0
- package/node_modules/typebox/build/type/engine/return_type/instantiate.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/return_type/instantiate.mjs +21 -0
- package/node_modules/typebox/build/type/engine/template_literal/create.d.mts +1 -0
- package/node_modules/typebox/build/type/engine/template_literal/create.mjs +5 -0
- package/node_modules/typebox/build/type/engine/template_literal/decode.d.mts +30 -0
- package/node_modules/typebox/build/type/engine/template_literal/decode.mjs +81 -0
- package/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +33 -0
- package/node_modules/typebox/build/type/engine/template_literal/encode.mjs +81 -0
- package/node_modules/typebox/build/type/engine/template_literal/index.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/template_literal/index.mjs +6 -0
- package/node_modules/typebox/build/type/engine/template_literal/instantiate.d.mts +9 -0
- package/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs +15 -0
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +26 -0
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.d.mts +6 -0
- package/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +9 -0
- package/node_modules/typebox/build/type/engine/template_literal/static.d.mts +18 -0
- package/node_modules/typebox/build/type/engine/template_literal/static.mjs +2 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.d.mts +19 -0
- package/node_modules/typebox/build/type/engine/this/expand_this.mjs +32 -0
- package/node_modules/typebox/build/type/engine/tuple/to_object.d.mts +12 -0
- package/node_modules/typebox/build/type/engine/tuple/to_object.mjs +14 -0
- package/node_modules/typebox/build/type/extends/any.d.mts +9 -0
- package/node_modules/typebox/build/type/extends/any.mjs +12 -0
- package/node_modules/typebox/build/type/extends/array.d.mts +20 -0
- package/node_modules/typebox/build/type/extends/array.mjs +21 -0
- package/node_modules/typebox/build/type/extends/async_iterator.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/async_iterator.mjs +9 -0
- package/node_modules/typebox/build/type/extends/bigint.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/bigint.mjs +9 -0
- package/node_modules/typebox/build/type/extends/boolean.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/boolean.mjs +9 -0
- package/node_modules/typebox/build/type/extends/constructor.d.mts +10 -0
- package/node_modules/typebox/build/type/extends/constructor.mjs +17 -0
- package/node_modules/typebox/build/type/extends/enum.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/enum.mjs +6 -0
- package/node_modules/typebox/build/type/extends/extends.d.mts +13 -0
- package/node_modules/typebox/build/type/extends/extends.mjs +17 -0
- package/node_modules/typebox/build/type/extends/extends_left.d.mts +55 -0
- package/node_modules/typebox/build/type/extends/extends_left.mjs +83 -0
- package/node_modules/typebox/build/type/extends/extends_right.d.mts +25 -0
- package/node_modules/typebox/build/type/extends/extends_right.mjs +44 -0
- package/node_modules/typebox/build/type/extends/function.d.mts +10 -0
- package/node_modules/typebox/build/type/extends/function.mjs +17 -0
- package/node_modules/typebox/build/type/extends/index.d.mts +2 -0
- package/node_modules/typebox/build/type/extends/index.mjs +2 -0
- package/node_modules/typebox/build/type/extends/inference.d.mts +34 -0
- package/node_modules/typebox/build/type/extends/inference.mjs +62 -0
- package/node_modules/typebox/build/type/extends/integer.d.mts +8 -0
- package/node_modules/typebox/build/type/extends/integer.mjs +10 -0
- package/node_modules/typebox/build/type/extends/intersect.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/intersect.mjs +15 -0
- package/node_modules/typebox/build/type/extends/iterator.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/iterator.mjs +9 -0
- package/node_modules/typebox/build/type/extends/literal.d.mts +18 -0
- package/node_modules/typebox/build/type/extends/literal.mjs +44 -0
- package/node_modules/typebox/build/type/extends/never.d.mts +8 -0
- package/node_modules/typebox/build/type/extends/never.mjs +9 -0
- package/node_modules/typebox/build/type/extends/null.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/null.mjs +9 -0
- package/node_modules/typebox/build/type/extends/number.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/number.mjs +9 -0
- package/node_modules/typebox/build/type/extends/object.d.mts +25 -0
- package/node_modules/typebox/build/type/extends/object.mjs +87 -0
- package/node_modules/typebox/build/type/extends/parameters.d.mts +15 -0
- package/node_modules/typebox/build/type/extends/parameters.mjs +28 -0
- package/node_modules/typebox/build/type/extends/promise.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/promise.mjs +9 -0
- package/node_modules/typebox/build/type/extends/result.d.mts +24 -0
- package/node_modules/typebox/build/type/extends/result.mjs +36 -0
- package/node_modules/typebox/build/type/extends/return_type.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/return_type.mjs +9 -0
- package/node_modules/typebox/build/type/extends/string.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/string.mjs +9 -0
- package/node_modules/typebox/build/type/extends/symbol.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/symbol.mjs +9 -0
- package/node_modules/typebox/build/type/extends/template_literal.d.mts +6 -0
- package/node_modules/typebox/build/type/extends/template_literal.mjs +7 -0
- package/node_modules/typebox/build/type/extends/tuple.d.mts +25 -0
- package/node_modules/typebox/build/type/extends/tuple.mjs +60 -0
- package/node_modules/typebox/build/type/extends/undefined.d.mts +8 -0
- package/node_modules/typebox/build/type/extends/undefined.mjs +10 -0
- package/node_modules/typebox/build/type/extends/union.d.mts +11 -0
- package/node_modules/typebox/build/type/extends/union.mjs +24 -0
- package/node_modules/typebox/build/type/extends/unknown.d.mts +9 -0
- package/node_modules/typebox/build/type/extends/unknown.mjs +12 -0
- package/node_modules/typebox/build/type/extends/void.d.mts +7 -0
- package/node_modules/typebox/build/type/extends/void.mjs +9 -0
- package/node_modules/typebox/build/type/index.d.mts +5 -0
- package/node_modules/typebox/build/type/index.mjs +5 -0
- package/node_modules/typebox/build/type/script/index.d.mts +1 -0
- package/node_modules/typebox/build/type/script/index.mjs +1 -0
- package/node_modules/typebox/build/type/script/mapping.d.mts +365 -0
- package/node_modules/typebox/build/type/script/mapping.mjs +532 -0
- package/node_modules/typebox/build/type/script/parser.d.mts +260 -0
- package/node_modules/typebox/build/type/script/parser.mjs +135 -0
- package/node_modules/typebox/build/type/script/script.d.mts +17 -0
- package/node_modules/typebox/build/type/script/script.mjs +21 -0
- package/node_modules/typebox/build/type/script/token/bigint.d.mts +8 -0
- package/node_modules/typebox/build/type/script/token/bigint.mjs +14 -0
- package/node_modules/typebox/build/type/script/token/const.d.mts +11 -0
- package/node_modules/typebox/build/type/script/token/const.mjs +18 -0
- package/node_modules/typebox/build/type/script/token/ident.d.mts +16 -0
- package/node_modules/typebox/build/type/script/token/ident.mjs +26 -0
- package/node_modules/typebox/build/type/script/token/index.d.mts +12 -0
- package/node_modules/typebox/build/type/script/token/index.mjs +12 -0
- package/node_modules/typebox/build/type/script/token/integer.d.mts +11 -0
- package/node_modules/typebox/build/type/script/token/integer.mjs +19 -0
- package/node_modules/typebox/build/type/script/token/internal/char.d.mts +75 -0
- package/node_modules/typebox/build/type/script/token/internal/char.mjs +26 -0
- package/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -0
- package/node_modules/typebox/build/type/script/token/internal/guard.mjs +15 -0
- package/node_modules/typebox/build/type/script/token/internal/many.d.mts +7 -0
- package/node_modules/typebox/build/type/script/token/internal/many.mjs +14 -0
- package/node_modules/typebox/build/type/script/token/internal/match.d.mts +6 -0
- package/node_modules/typebox/build/type/script/token/internal/match.mjs +11 -0
- package/node_modules/typebox/build/type/script/token/internal/optional.d.mts +5 -0
- package/node_modules/typebox/build/type/script/token/internal/optional.mjs +9 -0
- package/node_modules/typebox/build/type/script/token/internal/take.d.mts +6 -0
- package/node_modules/typebox/build/type/script/token/internal/take.mjs +30 -0
- package/node_modules/typebox/build/type/script/token/internal/trim.d.mts +19 -0
- package/node_modules/typebox/build/type/script/token/internal/trim.mjs +34 -0
- package/node_modules/typebox/build/type/script/token/number.d.mts +11 -0
- package/node_modules/typebox/build/type/script/token/number.mjs +19 -0
- package/node_modules/typebox/build/type/script/token/rest.d.mts +4 -0
- package/node_modules/typebox/build/type/script/token/rest.mjs +9 -0
- package/node_modules/typebox/build/type/script/token/span.d.mts +11 -0
- package/node_modules/typebox/build/type/script/token/span.mjs +24 -0
- package/node_modules/typebox/build/type/script/token/string.d.mts +11 -0
- package/node_modules/typebox/build/type/script/token/string.mjs +20 -0
- package/node_modules/typebox/build/type/script/token/unsigned_integer.d.mts +16 -0
- package/node_modules/typebox/build/type/script/token/unsigned_integer.mjs +26 -0
- package/node_modules/typebox/build/type/script/token/unsigned_number.d.mts +17 -0
- package/node_modules/typebox/build/type/script/token/unsigned_number.mjs +38 -0
- package/node_modules/typebox/build/type/script/token/until.d.mts +7 -0
- package/node_modules/typebox/build/type/script/token/until.mjs +21 -0
- package/node_modules/typebox/build/type/script/token/until_1.d.mts +5 -0
- package/node_modules/typebox/build/type/script/token/until_1.mjs +12 -0
- package/node_modules/typebox/build/type/types/_codec.d.mts +30 -0
- package/node_modules/typebox/build/type/types/_codec.mjs +61 -0
- package/node_modules/typebox/build/type/types/_immutable.d.mts +16 -0
- package/node_modules/typebox/build/type/types/_immutable.mjs +26 -0
- package/node_modules/typebox/build/type/types/_optional.d.mts +16 -0
- package/node_modules/typebox/build/type/types/_optional.mjs +27 -0
- package/node_modules/typebox/build/type/types/_readonly.d.mts +16 -0
- package/node_modules/typebox/build/type/types/_readonly.mjs +26 -0
- package/node_modules/typebox/build/type/types/_refine.d.mts +26 -0
- package/node_modules/typebox/build/type/types/_refine.mjs +37 -0
- package/node_modules/typebox/build/type/types/any.d.mts +10 -0
- package/node_modules/typebox/build/type/types/any.mjs +18 -0
- package/node_modules/typebox/build/type/types/array.d.mts +18 -0
- package/node_modules/typebox/build/type/types/array.mjs +25 -0
- package/node_modules/typebox/build/type/types/async_iterator.d.mts +20 -0
- package/node_modules/typebox/build/type/types/async_iterator.mjs +28 -0
- package/node_modules/typebox/build/type/types/base.d.mts +50 -0
- package/node_modules/typebox/build/type/types/base.mjs +84 -0
- package/node_modules/typebox/build/type/types/bigint.d.mts +12 -0
- package/node_modules/typebox/build/type/types/bigint.mjs +21 -0
- package/node_modules/typebox/build/type/types/boolean.d.mts +11 -0
- package/node_modules/typebox/build/type/types/boolean.mjs +17 -0
- package/node_modules/typebox/build/type/types/call.d.mts +16 -0
- package/node_modules/typebox/build/type/types/call.mjs +22 -0
- package/node_modules/typebox/build/type/types/constructor.d.mts +18 -0
- package/node_modules/typebox/build/type/types/constructor.mjs +24 -0
- package/node_modules/typebox/build/type/types/cyclic.d.mts +16 -0
- package/node_modules/typebox/build/type/types/cyclic.mjs +29 -0
- package/node_modules/typebox/build/type/types/deferred.d.mts +12 -0
- package/node_modules/typebox/build/type/types/deferred.mjs +16 -0
- package/node_modules/typebox/build/type/types/enum.d.mts +16 -0
- package/node_modules/typebox/build/type/types/enum.mjs +17 -0
- package/node_modules/typebox/build/type/types/function.d.mts +21 -0
- package/node_modules/typebox/build/type/types/function.mjs +25 -0
- package/node_modules/typebox/build/type/types/generic.d.mts +13 -0
- package/node_modules/typebox/build/type/types/generic.mjs +17 -0
- package/node_modules/typebox/build/type/types/identifier.d.mts +11 -0
- package/node_modules/typebox/build/type/types/identifier.mjs +17 -0
- package/node_modules/typebox/build/type/types/index.d.mts +48 -0
- package/node_modules/typebox/build/type/types/index.mjs +54 -0
- package/node_modules/typebox/build/type/types/infer.d.mts +15 -0
- package/node_modules/typebox/build/type/types/infer.mjs +20 -0
- package/node_modules/typebox/build/type/types/integer.d.mts +12 -0
- package/node_modules/typebox/build/type/types/integer.mjs +21 -0
- package/node_modules/typebox/build/type/types/intersect.d.mts +15 -0
- package/node_modules/typebox/build/type/types/intersect.mjs +24 -0
- package/node_modules/typebox/build/type/types/iterator.d.mts +20 -0
- package/node_modules/typebox/build/type/types/iterator.mjs +28 -0
- package/node_modules/typebox/build/type/types/literal.d.mts +31 -0
- package/node_modules/typebox/build/type/types/literal.mjs +62 -0
- package/node_modules/typebox/build/type/types/never.d.mts +12 -0
- package/node_modules/typebox/build/type/types/never.mjs +22 -0
- package/node_modules/typebox/build/type/types/null.d.mts +11 -0
- package/node_modules/typebox/build/type/types/null.mjs +17 -0
- package/node_modules/typebox/build/type/types/number.d.mts +12 -0
- package/node_modules/typebox/build/type/types/number.mjs +21 -0
- package/node_modules/typebox/build/type/types/object.d.mts +18 -0
- package/node_modules/typebox/build/type/types/object.mjs +28 -0
- package/node_modules/typebox/build/type/types/parameter.d.mts +17 -0
- package/node_modules/typebox/build/type/types/parameter.mjs +21 -0
- package/node_modules/typebox/build/type/types/promise.d.mts +21 -0
- package/node_modules/typebox/build/type/types/promise.mjs +29 -0
- package/node_modules/typebox/build/type/types/properties.d.mts +43 -0
- package/node_modules/typebox/build/type/types/properties.mjs +15 -0
- package/node_modules/typebox/build/type/types/record.d.mts +46 -0
- package/node_modules/typebox/build/type/types/record.mjs +60 -0
- package/node_modules/typebox/build/type/types/ref.d.mts +19 -0
- package/node_modules/typebox/build/type/types/ref.mjs +18 -0
- package/node_modules/typebox/build/type/types/rest.d.mts +11 -0
- package/node_modules/typebox/build/type/types/rest.mjs +17 -0
- package/node_modules/typebox/build/type/types/schema.d.mts +176 -0
- package/node_modules/typebox/build/type/types/schema.mjs +15 -0
- package/node_modules/typebox/build/type/types/static.d.mts +48 -0
- package/node_modules/typebox/build/type/types/static.mjs +3 -0
- package/node_modules/typebox/build/type/types/string.d.mts +12 -0
- package/node_modules/typebox/build/type/types/string.mjs +22 -0
- package/node_modules/typebox/build/type/types/symbol.d.mts +11 -0
- package/node_modules/typebox/build/type/types/symbol.mjs +17 -0
- package/node_modules/typebox/build/type/types/template_literal.d.mts +28 -0
- package/node_modules/typebox/build/type/types/template_literal.mjs +37 -0
- package/node_modules/typebox/build/type/types/this.d.mts +14 -0
- package/node_modules/typebox/build/type/types/this.mjs +17 -0
- package/node_modules/typebox/build/type/types/tuple.d.mts +38 -0
- package/node_modules/typebox/build/type/types/tuple.mjs +25 -0
- package/node_modules/typebox/build/type/types/undefined.d.mts +11 -0
- package/node_modules/typebox/build/type/types/undefined.mjs +17 -0
- package/node_modules/typebox/build/type/types/union.d.mts +15 -0
- package/node_modules/typebox/build/type/types/union.mjs +24 -0
- package/node_modules/typebox/build/type/types/unknown.d.mts +10 -0
- package/node_modules/typebox/build/type/types/unknown.mjs +17 -0
- package/node_modules/typebox/build/type/types/unsafe.d.mts +10 -0
- package/node_modules/typebox/build/type/types/unsafe.mjs +20 -0
- package/node_modules/typebox/build/type/types/void.d.mts +11 -0
- package/node_modules/typebox/build/type/types/void.mjs +17 -0
- package/node_modules/typebox/build/typebox.d.mts +73 -0
- package/node_modules/typebox/build/typebox.mjs +89 -0
- package/node_modules/typebox/build/value/assert/assert.d.mts +14 -0
- package/node_modules/typebox/build/value/assert/assert.mjs +28 -0
- package/node_modules/typebox/build/value/assert/index.d.mts +1 -0
- package/node_modules/typebox/build/value/assert/index.mjs +1 -0
- package/node_modules/typebox/build/value/check/check.d.mts +5 -0
- package/node_modules/typebox/build/value/check/check.mjs +11 -0
- package/node_modules/typebox/build/value/check/index.d.mts +1 -0
- package/node_modules/typebox/build/value/check/index.mjs +1 -0
- package/node_modules/typebox/build/value/clean/additional.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/additional.mjs +6 -0
- package/node_modules/typebox/build/value/clean/clean.d.mts +15 -0
- package/node_modules/typebox/build/value/clean/clean.mjs +15 -0
- package/node_modules/typebox/build/value/clean/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_array.mjs +8 -0
- package/node_modules/typebox/build/value/clean/from_base.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_base.mjs +4 -0
- package/node_modules/typebox/build/value/clean/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_cyclic.mjs +6 -0
- package/node_modules/typebox/build/value/clean/from_intersect.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_intersect.mjs +26 -0
- package/node_modules/typebox/build/value/clean/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_object.mjs +31 -0
- package/node_modules/typebox/build/value/clean/from_record.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_record.mjs +32 -0
- package/node_modules/typebox/build/value/clean/from_ref.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_ref.mjs +8 -0
- package/node_modules/typebox/build/value/clean/from_tuple.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_tuple.mjs +14 -0
- package/node_modules/typebox/build/value/clean/from_type.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_type.mjs +23 -0
- package/node_modules/typebox/build/value/clean/from_union.d.mts +2 -0
- package/node_modules/typebox/build/value/clean/from_union.mjs +13 -0
- package/node_modules/typebox/build/value/clean/index.d.mts +1 -0
- package/node_modules/typebox/build/value/clean/index.mjs +1 -0
- package/node_modules/typebox/build/value/clone/clone.d.mts +5 -0
- package/node_modules/typebox/build/value/clone/clone.mjs +83 -0
- package/node_modules/typebox/build/value/clone/index.d.mts +1 -0
- package/node_modules/typebox/build/value/clone/index.mjs +1 -0
- package/node_modules/typebox/build/value/codec/callback.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/callback.mjs +25 -0
- package/node_modules/typebox/build/value/codec/decode.d.mts +12 -0
- package/node_modules/typebox/build/value/codec/decode.mjs +50 -0
- package/node_modules/typebox/build/value/codec/encode.d.mts +12 -0
- package/node_modules/typebox/build/value/codec/encode.mjs +50 -0
- package/node_modules/typebox/build/value/codec/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_array.mjs +38 -0
- package/node_modules/typebox/build/value/codec/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_cyclic.mjs +8 -0
- package/node_modules/typebox/build/value/codec/from_intersect.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_intersect.mjs +58 -0
- package/node_modules/typebox/build/value/codec/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_object.mjs +45 -0
- package/node_modules/typebox/build/value/codec/from_record.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_record.mjs +44 -0
- package/node_modules/typebox/build/value/codec/from_ref.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_ref.mjs +31 -0
- package/node_modules/typebox/build/value/codec/from_tuple.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_tuple.mjs +35 -0
- package/node_modules/typebox/build/value/codec/from_type.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_type.mjs +22 -0
- package/node_modules/typebox/build/value/codec/from_union.d.mts +2 -0
- package/node_modules/typebox/build/value/codec/from_union.mjs +40 -0
- package/node_modules/typebox/build/value/codec/has.d.mts +5 -0
- package/node_modules/typebox/build/value/codec/has.mjs +93 -0
- package/node_modules/typebox/build/value/codec/index.d.mts +3 -0
- package/node_modules/typebox/build/value/codec/index.mjs +3 -0
- package/node_modules/typebox/build/value/convert/convert.d.mts +13 -0
- package/node_modules/typebox/build/value/convert/convert.mjs +15 -0
- package/node_modules/typebox/build/value/convert/from_additional.d.mts +6 -0
- package/node_modules/typebox/build/value/convert/from_additional.mjs +18 -0
- package/node_modules/typebox/build/value/convert/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_array.mjs +7 -0
- package/node_modules/typebox/build/value/convert/from_base.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_base.mjs +4 -0
- package/node_modules/typebox/build/value/convert/from_bigint.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_bigint.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_boolean.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_boolean.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_cyclic.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_enum.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_enum.mjs +7 -0
- package/node_modules/typebox/build/value/convert/from_integer.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_integer.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_intersect.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_intersect.mjs +8 -0
- package/node_modules/typebox/build/value/convert/from_literal.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_literal.mjs +44 -0
- package/node_modules/typebox/build/value/convert/from_null.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_null.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_number.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_number.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_object.mjs +28 -0
- package/node_modules/typebox/build/value/convert/from_record.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_record.mjs +23 -0
- package/node_modules/typebox/build/value/convert/from_ref.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_ref.mjs +8 -0
- package/node_modules/typebox/build/value/convert/from_string.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_string.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_template_literal.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_template_literal.mjs +7 -0
- package/node_modules/typebox/build/value/convert/from_tuple.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_tuple.mjs +11 -0
- package/node_modules/typebox/build/value/convert/from_type.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_type.mjs +45 -0
- package/node_modules/typebox/build/value/convert/from_undefined.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_undefined.mjs +6 -0
- package/node_modules/typebox/build/value/convert/from_union.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_union.mjs +13 -0
- package/node_modules/typebox/build/value/convert/from_void.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/from_void.mjs +6 -0
- package/node_modules/typebox/build/value/convert/index.d.mts +1 -0
- package/node_modules/typebox/build/value/convert/index.mjs +1 -0
- package/node_modules/typebox/build/value/convert/try/index.d.mts +1 -0
- package/node_modules/typebox/build/value/convert/try/index.mjs +1 -0
- package/node_modules/typebox/build/value/convert/try/try.d.mts +8 -0
- package/node_modules/typebox/build/value/convert/try/try.mjs +8 -0
- package/node_modules/typebox/build/value/convert/try/try_array.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_array.mjs +6 -0
- package/node_modules/typebox/build/value/convert/try/try_bigint.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_bigint.mjs +45 -0
- package/node_modules/typebox/build/value/convert/try/try_boolean.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_boolean.mjs +41 -0
- package/node_modules/typebox/build/value/convert/try/try_null.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_null.mjs +44 -0
- package/node_modules/typebox/build/value/convert/try/try_number.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_number.mjs +44 -0
- package/node_modules/typebox/build/value/convert/try/try_result.d.mts +8 -0
- package/node_modules/typebox/build/value/convert/try/try_result.mjs +17 -0
- package/node_modules/typebox/build/value/convert/try/try_string.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_string.mjs +12 -0
- package/node_modules/typebox/build/value/convert/try/try_undefined.d.mts +2 -0
- package/node_modules/typebox/build/value/convert/try/try_undefined.mjs +44 -0
- package/node_modules/typebox/build/value/create/create.d.mts +5 -0
- package/node_modules/typebox/build/value/create/create.mjs +11 -0
- package/node_modules/typebox/build/value/create/error.d.mts +5 -0
- package/node_modules/typebox/build/value/create/error.mjs +7 -0
- package/node_modules/typebox/build/value/create/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_array.mjs +10 -0
- package/node_modules/typebox/build/value/create/from_async_iterator.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_async_iterator.mjs +5 -0
- package/node_modules/typebox/build/value/create/from_base.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_base.mjs +4 -0
- package/node_modules/typebox/build/value/create/from_bigint.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_bigint.mjs +7 -0
- package/node_modules/typebox/build/value/create/from_boolean.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_boolean.mjs +4 -0
- package/node_modules/typebox/build/value/create/from_constructor.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_constructor.mjs +10 -0
- package/node_modules/typebox/build/value/create/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_cyclic.mjs +6 -0
- package/node_modules/typebox/build/value/create/from_default.d.mts +3 -0
- package/node_modules/typebox/build/value/create/from_default.mjs +10 -0
- package/node_modules/typebox/build/value/create/from_enum.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_enum.mjs +6 -0
- package/node_modules/typebox/build/value/create/from_function.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_function.mjs +6 -0
- package/node_modules/typebox/build/value/create/from_integer.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_integer.mjs +8 -0
- package/node_modules/typebox/build/value/create/from_intersect.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_intersect.mjs +8 -0
- package/node_modules/typebox/build/value/create/from_iterator.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_iterator.mjs +5 -0
- package/node_modules/typebox/build/value/create/from_literal.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_literal.mjs +4 -0
- package/node_modules/typebox/build/value/create/from_never.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_never.mjs +5 -0
- package/node_modules/typebox/build/value/create/from_null.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_null.mjs +4 -0
- package/node_modules/typebox/build/value/create/from_number.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_number.mjs +8 -0
- package/node_modules/typebox/build/value/create/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_object.mjs +9 -0
- package/node_modules/typebox/build/value/create/from_promise.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_promise.mjs +5 -0
- package/node_modules/typebox/build/value/create/from_record.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_record.mjs +8 -0
- package/node_modules/typebox/build/value/create/from_ref.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_ref.mjs +9 -0
- package/node_modules/typebox/build/value/create/from_string.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_string.mjs +9 -0
- package/node_modules/typebox/build/value/create/from_symbol.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_symbol.mjs +4 -0
- package/node_modules/typebox/build/value/create/from_template_literal.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_template_literal.mjs +11 -0
- package/node_modules/typebox/build/value/create/from_tuple.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_tuple.mjs +5 -0
- package/node_modules/typebox/build/value/create/from_type.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_type.mjs +69 -0
- package/node_modules/typebox/build/value/create/from_undefined.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_undefined.mjs +4 -0
- package/node_modules/typebox/build/value/create/from_union.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_union.mjs +9 -0
- package/node_modules/typebox/build/value/create/from_void.d.mts +2 -0
- package/node_modules/typebox/build/value/create/from_void.mjs +4 -0
- package/node_modules/typebox/build/value/create/index.d.mts +2 -0
- package/node_modules/typebox/build/value/create/index.mjs +2 -0
- package/node_modules/typebox/build/value/default/default.d.mts +13 -0
- package/node_modules/typebox/build/value/default/default.mjs +15 -0
- package/node_modules/typebox/build/value/default/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_array.mjs +12 -0
- package/node_modules/typebox/build/value/default/from_base.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_base.mjs +5 -0
- package/node_modules/typebox/build/value/default/from_cyclic.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_cyclic.mjs +7 -0
- package/node_modules/typebox/build/value/default/from_default.d.mts +3 -0
- package/node_modules/typebox/build/value/default/from_default.mjs +13 -0
- package/node_modules/typebox/build/value/default/from_intersect.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_intersect.mjs +9 -0
- package/node_modules/typebox/build/value/default/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_object.mjs +32 -0
- package/node_modules/typebox/build/value/default/from_record.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_record.mjs +26 -0
- package/node_modules/typebox/build/value/default/from_ref.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_ref.mjs +9 -0
- package/node_modules/typebox/build/value/default/from_tuple.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_tuple.mjs +14 -0
- package/node_modules/typebox/build/value/default/from_type.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_type.mjs +27 -0
- package/node_modules/typebox/build/value/default/from_union.d.mts +2 -0
- package/node_modules/typebox/build/value/default/from_union.mjs +14 -0
- package/node_modules/typebox/build/value/default/index.d.mts +1 -0
- package/node_modules/typebox/build/value/default/index.mjs +1 -0
- package/node_modules/typebox/build/value/delta/diff.d.mts +10 -0
- package/node_modules/typebox/build/value/delta/diff.mjs +135 -0
- package/node_modules/typebox/build/value/delta/edit.d.mts +24 -0
- package/node_modules/typebox/build/value/delta/edit.mjs +17 -0
- package/node_modules/typebox/build/value/delta/index.d.mts +3 -0
- package/node_modules/typebox/build/value/delta/index.mjs +3 -0
- package/node_modules/typebox/build/value/delta/patch.d.mts +8 -0
- package/node_modules/typebox/build/value/delta/patch.mjs +42 -0
- package/node_modules/typebox/build/value/equal/equal.d.mts +2 -0
- package/node_modules/typebox/build/value/equal/equal.mjs +6 -0
- package/node_modules/typebox/build/value/equal/index.d.mts +1 -0
- package/node_modules/typebox/build/value/equal/index.mjs +1 -0
- package/node_modules/typebox/build/value/errors/errors.d.mts +16 -0
- package/node_modules/typebox/build/value/errors/errors.mjs +17 -0
- package/node_modules/typebox/build/value/errors/index.d.mts +1 -0
- package/node_modules/typebox/build/value/errors/index.mjs +1 -0
- package/node_modules/typebox/build/value/hash/hash.d.mts +6 -0
- package/node_modules/typebox/build/value/hash/hash.mjs +10 -0
- package/node_modules/typebox/build/value/hash/index.d.mts +1 -0
- package/node_modules/typebox/build/value/hash/index.mjs +1 -0
- package/node_modules/typebox/build/value/index.d.mts +21 -0
- package/node_modules/typebox/build/value/index.mjs +30 -0
- package/node_modules/typebox/build/value/mutate/error.d.mts +3 -0
- package/node_modules/typebox/build/value/mutate/error.mjs +6 -0
- package/node_modules/typebox/build/value/mutate/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/mutate/from_array.mjs +16 -0
- package/node_modules/typebox/build/value/mutate/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/mutate/from_object.mjs +40 -0
- package/node_modules/typebox/build/value/mutate/from_unknown.d.mts +2 -0
- package/node_modules/typebox/build/value/mutate/from_unknown.mjs +7 -0
- package/node_modules/typebox/build/value/mutate/from_value.d.mts +2 -0
- package/node_modules/typebox/build/value/mutate/from_value.mjs +12 -0
- package/node_modules/typebox/build/value/mutate/index.d.mts +1 -0
- package/node_modules/typebox/build/value/mutate/index.mjs +1 -0
- package/node_modules/typebox/build/value/mutate/mutate.d.mts +11 -0
- package/node_modules/typebox/build/value/mutate/mutate.mjs +41 -0
- package/node_modules/typebox/build/value/parse/index.d.mts +1 -0
- package/node_modules/typebox/build/value/parse/index.mjs +1 -0
- package/node_modules/typebox/build/value/parse/parse.d.mts +11 -0
- package/node_modules/typebox/build/value/parse/parse.mjs +47 -0
- package/node_modules/typebox/build/value/pipeline/index.d.mts +1 -0
- package/node_modules/typebox/build/value/pipeline/index.mjs +1 -0
- package/node_modules/typebox/build/value/pipeline/pipeline.d.mts +10 -0
- package/node_modules/typebox/build/value/pipeline/pipeline.mjs +15 -0
- package/node_modules/typebox/build/value/pointer/index.d.mts +1 -0
- package/node_modules/typebox/build/value/pointer/index.mjs +1 -0
- package/node_modules/typebox/build/value/repair/error.d.mts +7 -0
- package/node_modules/typebox/build/value/repair/error.mjs +8 -0
- package/node_modules/typebox/build/value/repair/from_array.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_array.mjs +39 -0
- package/node_modules/typebox/build/value/repair/from_base.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_base.mjs +8 -0
- package/node_modules/typebox/build/value/repair/from_enum.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_enum.mjs +7 -0
- package/node_modules/typebox/build/value/repair/from_intersect.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_intersect.mjs +8 -0
- package/node_modules/typebox/build/value/repair/from_object.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_object.mjs +33 -0
- package/node_modules/typebox/build/value/repair/from_record.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_record.mjs +33 -0
- package/node_modules/typebox/build/value/repair/from_ref.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_ref.mjs +9 -0
- package/node_modules/typebox/build/value/repair/from_template_literal.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_template_literal.mjs +7 -0
- package/node_modules/typebox/build/value/repair/from_tuple.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_tuple.mjs +12 -0
- package/node_modules/typebox/build/value/repair/from_type.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_type.mjs +86 -0
- package/node_modules/typebox/build/value/repair/from_union.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_union.mjs +24 -0
- package/node_modules/typebox/build/value/repair/from_unknown.d.mts +2 -0
- package/node_modules/typebox/build/value/repair/from_unknown.mjs +12 -0
- package/node_modules/typebox/build/value/repair/index.d.mts +1 -0
- package/node_modules/typebox/build/value/repair/index.mjs +1 -0
- package/node_modules/typebox/build/value/repair/repair.d.mts +17 -0
- package/node_modules/typebox/build/value/repair/repair.mjs +20 -0
- package/node_modules/typebox/build/value/shared/index.d.mts +3 -0
- package/node_modules/typebox/build/value/shared/index.mjs +4 -0
- package/node_modules/typebox/build/value/shared/optional_undefined.d.mts +2 -0
- package/node_modules/typebox/build/value/shared/optional_undefined.mjs +15 -0
- package/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +3 -0
- package/node_modules/typebox/build/value/shared/union_priority_sort.mjs +36 -0
- package/node_modules/typebox/build/value/shared/union_score_select.d.mts +3 -0
- package/node_modules/typebox/build/value/shared/union_score_select.mjs +51 -0
- package/node_modules/typebox/build/value/value.d.mts +16 -0
- package/node_modules/typebox/build/value/value.mjs +16 -0
- package/node_modules/typebox/license +23 -0
- package/node_modules/typebox/package.json +87 -0
- package/node_modules/typebox/readme.md +356 -0
- package/node_modules/undici/LICENSE +21 -0
- package/node_modules/undici/README.md +750 -0
- package/node_modules/undici/docs/docs/api/Agent.md +84 -0
- package/node_modules/undici/docs/docs/api/BalancedPool.md +99 -0
- package/node_modules/undici/docs/docs/api/CacheStorage.md +30 -0
- package/node_modules/undici/docs/docs/api/CacheStore.md +164 -0
- package/node_modules/undici/docs/docs/api/Client.md +287 -0
- package/node_modules/undici/docs/docs/api/ClientStats.md +27 -0
- package/node_modules/undici/docs/docs/api/Connector.md +115 -0
- package/node_modules/undici/docs/docs/api/ContentType.md +57 -0
- package/node_modules/undici/docs/docs/api/Cookies.md +101 -0
- package/node_modules/undici/docs/docs/api/Debug.md +62 -0
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +315 -0
- package/node_modules/undici/docs/docs/api/Dispatcher.md +1427 -0
- package/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +159 -0
- package/node_modules/undici/docs/docs/api/Errors.md +49 -0
- package/node_modules/undici/docs/docs/api/EventSource.md +45 -0
- package/node_modules/undici/docs/docs/api/Fetch.md +60 -0
- package/node_modules/undici/docs/docs/api/GlobalInstallation.md +141 -0
- package/node_modules/undici/docs/docs/api/H2CClient.md +263 -0
- package/node_modules/undici/docs/docs/api/MockAgent.md +603 -0
- package/node_modules/undici/docs/docs/api/MockCallHistory.md +197 -0
- package/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +43 -0
- package/node_modules/undici/docs/docs/api/MockClient.md +81 -0
- package/node_modules/undici/docs/docs/api/MockErrors.md +12 -0
- package/node_modules/undici/docs/docs/api/MockPool.md +555 -0
- package/node_modules/undici/docs/docs/api/Pool.md +84 -0
- package/node_modules/undici/docs/docs/api/PoolStats.md +35 -0
- package/node_modules/undici/docs/docs/api/ProxyAgent.md +229 -0
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +98 -0
- package/node_modules/undici/docs/docs/api/RetryAgent.md +49 -0
- package/node_modules/undici/docs/docs/api/RetryHandler.md +116 -0
- package/node_modules/undici/docs/docs/api/RoundRobinPool.md +145 -0
- package/node_modules/undici/docs/docs/api/SnapshotAgent.md +639 -0
- package/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +274 -0
- package/node_modules/undici/docs/docs/api/Util.md +25 -0
- package/node_modules/undici/docs/docs/api/WebSocket.md +141 -0
- package/node_modules/undici/docs/docs/api/api-lifecycle.md +91 -0
- package/node_modules/undici/docs/docs/best-practices/client-certificate.md +64 -0
- package/node_modules/undici/docs/docs/best-practices/crawling.md +58 -0
- package/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +231 -0
- package/node_modules/undici/docs/docs/best-practices/mocking-request.md +190 -0
- package/node_modules/undici/docs/docs/best-practices/proxy.md +127 -0
- package/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +224 -0
- package/node_modules/undici/docs/docs/best-practices/writing-tests.md +63 -0
- package/node_modules/undici/index-fetch.js +65 -0
- package/node_modules/undici/index.d.ts +3 -0
- package/node_modules/undici/index.js +236 -0
- package/node_modules/undici/lib/api/abort-signal.js +59 -0
- package/node_modules/undici/lib/api/api-connect.js +112 -0
- package/node_modules/undici/lib/api/api-pipeline.js +265 -0
- package/node_modules/undici/lib/api/api-request.js +238 -0
- package/node_modules/undici/lib/api/api-stream.js +270 -0
- package/node_modules/undici/lib/api/api-upgrade.js +121 -0
- package/node_modules/undici/lib/api/index.js +7 -0
- package/node_modules/undici/lib/api/readable.js +581 -0
- package/node_modules/undici/lib/cache/memory-cache-store.js +234 -0
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +463 -0
- package/node_modules/undici/lib/core/connect.js +153 -0
- package/node_modules/undici/lib/core/constants.js +120 -0
- package/node_modules/undici/lib/core/diagnostics.js +227 -0
- package/node_modules/undici/lib/core/errors.js +477 -0
- package/node_modules/undici/lib/core/request.js +535 -0
- package/node_modules/undici/lib/core/socks5-client.js +422 -0
- package/node_modules/undici/lib/core/socks5-utils.js +212 -0
- package/node_modules/undici/lib/core/symbols.js +76 -0
- package/node_modules/undici/lib/core/tree.js +160 -0
- package/node_modules/undici/lib/core/util.js +1019 -0
- package/node_modules/undici/lib/dispatcher/agent.js +172 -0
- package/node_modules/undici/lib/dispatcher/balanced-pool.js +214 -0
- package/node_modules/undici/lib/dispatcher/client-h1.js +1669 -0
- package/node_modules/undici/lib/dispatcher/client-h2.js +1326 -0
- package/node_modules/undici/lib/dispatcher/client.js +666 -0
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +184 -0
- package/node_modules/undici/lib/dispatcher/dispatcher.js +44 -0
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +107 -0
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +146 -0
- package/node_modules/undici/lib/dispatcher/fixed-queue.js +135 -0
- package/node_modules/undici/lib/dispatcher/h2c-client.js +51 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +232 -0
- package/node_modules/undici/lib/dispatcher/pool.js +143 -0
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +343 -0
- package/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +159 -0
- package/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +264 -0
- package/node_modules/undici/lib/encoding/index.js +33 -0
- package/node_modules/undici/lib/global.js +62 -0
- package/node_modules/undici/lib/handler/cache-handler.js +586 -0
- package/node_modules/undici/lib/handler/cache-revalidation-handler.js +124 -0
- package/node_modules/undici/lib/handler/decorator-handler.js +66 -0
- package/node_modules/undici/lib/handler/deduplication-handler.js +460 -0
- package/node_modules/undici/lib/handler/redirect-handler.js +192 -0
- package/node_modules/undici/lib/handler/retry-handler.js +407 -0
- package/node_modules/undici/lib/interceptor/cache.js +508 -0
- package/node_modules/undici/lib/interceptor/decompress.js +285 -0
- package/node_modules/undici/lib/interceptor/deduplicate.js +117 -0
- package/node_modules/undici/lib/interceptor/dns.js +571 -0
- package/node_modules/undici/lib/interceptor/dump.js +112 -0
- package/node_modules/undici/lib/interceptor/redirect.js +21 -0
- package/node_modules/undici/lib/interceptor/response-error.js +95 -0
- package/node_modules/undici/lib/interceptor/retry.js +19 -0
- package/node_modules/undici/lib/llhttp/constants.d.ts +195 -0
- package/node_modules/undici/lib/llhttp/constants.js +531 -0
- package/node_modules/undici/lib/llhttp/llhttp-wasm.js +15 -0
- package/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +15 -0
- package/node_modules/undici/lib/llhttp/utils.d.ts +2 -0
- package/node_modules/undici/lib/llhttp/utils.js +12 -0
- package/node_modules/undici/lib/mock/mock-agent.js +232 -0
- package/node_modules/undici/lib/mock/mock-call-history.js +248 -0
- package/node_modules/undici/lib/mock/mock-client.js +68 -0
- package/node_modules/undici/lib/mock/mock-errors.js +29 -0
- package/node_modules/undici/lib/mock/mock-interceptor.js +209 -0
- package/node_modules/undici/lib/mock/mock-pool.js +68 -0
- package/node_modules/undici/lib/mock/mock-symbols.js +32 -0
- package/node_modules/undici/lib/mock/mock-utils.js +501 -0
- package/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
- package/node_modules/undici/lib/mock/snapshot-agent.js +363 -0
- package/node_modules/undici/lib/mock/snapshot-recorder.js +623 -0
- package/node_modules/undici/lib/mock/snapshot-utils.js +158 -0
- package/node_modules/undici/lib/util/cache.js +408 -0
- package/node_modules/undici/lib/util/date.js +653 -0
- package/node_modules/undici/lib/util/runtime-features.js +93 -0
- package/node_modules/undici/lib/util/stats.js +32 -0
- package/node_modules/undici/lib/util/timers.js +425 -0
- package/node_modules/undici/lib/web/cache/cache.js +862 -0
- package/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
- package/node_modules/undici/lib/web/cache/util.js +45 -0
- package/node_modules/undici/lib/web/cookies/constants.js +12 -0
- package/node_modules/undici/lib/web/cookies/index.js +199 -0
- package/node_modules/undici/lib/web/cookies/parse.js +322 -0
- package/node_modules/undici/lib/web/cookies/util.js +282 -0
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +494 -0
- package/node_modules/undici/lib/web/eventsource/eventsource.js +501 -0
- package/node_modules/undici/lib/web/eventsource/util.js +29 -0
- package/node_modules/undici/lib/web/fetch/LICENSE +21 -0
- package/node_modules/undici/lib/web/fetch/body.js +503 -0
- package/node_modules/undici/lib/web/fetch/constants.js +131 -0
- package/node_modules/undici/lib/web/fetch/data-url.js +596 -0
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +586 -0
- package/node_modules/undici/lib/web/fetch/formdata.js +278 -0
- package/node_modules/undici/lib/web/fetch/global.js +40 -0
- package/node_modules/undici/lib/web/fetch/headers.js +719 -0
- package/node_modules/undici/lib/web/fetch/index.js +2403 -0
- package/node_modules/undici/lib/web/fetch/request.js +1115 -0
- package/node_modules/undici/lib/web/fetch/response.js +641 -0
- package/node_modules/undici/lib/web/fetch/util.js +1522 -0
- package/node_modules/undici/lib/web/infra/index.js +229 -0
- package/node_modules/undici/lib/web/subresource-integrity/Readme.md +9 -0
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +307 -0
- package/node_modules/undici/lib/web/webidl/index.js +1004 -0
- package/node_modules/undici/lib/web/websocket/connection.js +329 -0
- package/node_modules/undici/lib/web/websocket/constants.js +126 -0
- package/node_modules/undici/lib/web/websocket/events.js +331 -0
- package/node_modules/undici/lib/web/websocket/frame.js +127 -0
- package/node_modules/undici/lib/web/websocket/permessage-deflate.js +100 -0
- package/node_modules/undici/lib/web/websocket/receiver.js +490 -0
- package/node_modules/undici/lib/web/websocket/sender.js +109 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +104 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +491 -0
- package/node_modules/undici/lib/web/websocket/util.js +347 -0
- package/node_modules/undici/lib/web/websocket/websocket.js +756 -0
- package/node_modules/undici/package.json +152 -0
- package/node_modules/undici/scripts/strip-comments.js +10 -0
- package/node_modules/undici/types/README.md +6 -0
- package/node_modules/undici/types/agent.d.ts +30 -0
- package/node_modules/undici/types/api.d.ts +43 -0
- package/node_modules/undici/types/balanced-pool.d.ts +30 -0
- package/node_modules/undici/types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici/types/cache.d.ts +36 -0
- package/node_modules/undici/types/client-stats.d.ts +15 -0
- package/node_modules/undici/types/client.d.ts +129 -0
- package/node_modules/undici/types/connector.d.ts +36 -0
- package/node_modules/undici/types/content-type.d.ts +21 -0
- package/node_modules/undici/types/cookies.d.ts +30 -0
- package/node_modules/undici/types/diagnostics-channel.d.ts +74 -0
- package/node_modules/undici/types/dispatcher.d.ts +253 -0
- package/node_modules/undici/types/dispatcher1-wrapper.d.ts +7 -0
- package/node_modules/undici/types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/undici/types/errors.d.ts +177 -0
- package/node_modules/undici/types/eventsource.d.ts +66 -0
- package/node_modules/undici/types/fetch.d.ts +231 -0
- package/node_modules/undici/types/formdata.d.ts +108 -0
- package/node_modules/undici/types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici/types/global-origin.d.ts +7 -0
- package/node_modules/undici/types/h2c-client.d.ts +73 -0
- package/node_modules/undici/types/handlers.d.ts +14 -0
- package/node_modules/undici/types/header.d.ts +165 -0
- package/node_modules/undici/types/index.d.ts +93 -0
- package/node_modules/undici/types/interceptors.d.ts +80 -0
- package/node_modules/undici/types/mock-agent.d.ts +68 -0
- package/node_modules/undici/types/mock-call-history.d.ts +111 -0
- package/node_modules/undici/types/mock-client.d.ts +27 -0
- package/node_modules/undici/types/mock-errors.d.ts +12 -0
- package/node_modules/undici/types/mock-interceptor.d.ts +94 -0
- package/node_modules/undici/types/mock-pool.d.ts +27 -0
- package/node_modules/undici/types/patch.d.ts +29 -0
- package/node_modules/undici/types/pool-stats.d.ts +19 -0
- package/node_modules/undici/types/pool.d.ts +39 -0
- package/node_modules/undici/types/proxy-agent.d.ts +29 -0
- package/node_modules/undici/types/readable.d.ts +68 -0
- package/node_modules/undici/types/retry-agent.d.ts +8 -0
- package/node_modules/undici/types/retry-handler.d.ts +125 -0
- package/node_modules/undici/types/round-robin-pool.d.ts +39 -0
- package/node_modules/undici/types/snapshot-agent.d.ts +113 -0
- package/node_modules/undici/types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/undici/types/util.d.ts +18 -0
- package/node_modules/undici/types/utility.d.ts +7 -0
- package/node_modules/undici/types/webidl.d.ts +346 -0
- package/node_modules/undici/types/websocket.d.ts +188 -0
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +32 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +30 -0
- package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +123 -0
- package/node_modules/undici-types/connector.d.ts +36 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +30 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- package/node_modules/undici-types/dispatcher.d.ts +279 -0
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/undici-types/errors.d.ts +177 -0
- package/node_modules/undici-types/eventsource.d.ts +66 -0
- package/node_modules/undici-types/fetch.d.ts +211 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +15 -0
- package/node_modules/undici-types/header.d.ts +160 -0
- package/node_modules/undici-types/index.d.ts +91 -0
- package/node_modules/undici-types/interceptors.d.ts +80 -0
- package/node_modules/undici-types/mock-agent.d.ts +68 -0
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +27 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- package/node_modules/undici-types/mock-pool.d.ts +27 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +29 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +41 -0
- package/node_modules/undici-types/proxy-agent.d.ts +29 -0
- package/node_modules/undici-types/readable.d.ts +68 -0
- package/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +347 -0
- package/node_modules/undici-types/websocket.d.ts +188 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +22 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +528 -0
- package/node_modules/ws/lib/receiver.js +706 -0
- package/node_modules/ws/lib/sender.js +607 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +554 -0
- package/node_modules/ws/lib/websocket.js +1393 -0
- package/node_modules/ws/package.json +70 -0
- package/node_modules/ws/wrapper.mjs +21 -0
- package/npm-shrinkwrap.json +512 -0
- package/openclaw.plugin.json +14 -0
- package/package.json +15 -9
- package/dist/provider.runtime-CUUefRl3.js +0 -2
- package/dist/runtime-api.monitor-D1psRR2u.js +0 -5
|
@@ -0,0 +1,2920 @@
|
|
|
1
|
+
const _WebAssembly = typeof WebAssembly !== 'undefined'
|
|
2
|
+
? WebAssembly
|
|
3
|
+
: typeof WXWebAssembly !== 'undefined'
|
|
4
|
+
? WXWebAssembly
|
|
5
|
+
: undefined;
|
|
6
|
+
if (!_WebAssembly) {
|
|
7
|
+
throw new Error('WebAssembly is not supported in this environment');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* eslint-disable spaced-comment */
|
|
11
|
+
|
|
12
|
+
function validateObject(value, name) {
|
|
13
|
+
if (value === null || typeof value !== 'object') {
|
|
14
|
+
throw new TypeError(`${name} must be an object. Received ${value === null ? 'null' : typeof value}`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function validateArray(value, name) {
|
|
18
|
+
if (!Array.isArray(value)) {
|
|
19
|
+
throw new TypeError(`${name} must be an array. Received ${value === null ? 'null' : typeof value}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function validateBoolean(value, name) {
|
|
23
|
+
if (typeof value !== 'boolean') {
|
|
24
|
+
throw new TypeError(`${name} must be a boolean. Received ${value === null ? 'null' : typeof value}`);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function validateString(value, name) {
|
|
28
|
+
if (typeof value !== 'string') {
|
|
29
|
+
throw new TypeError(`${name} must be a string. Received ${value === null ? 'null' : typeof value}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function validateFunction(value, name) {
|
|
33
|
+
if (typeof value !== 'function') {
|
|
34
|
+
throw new TypeError(`${name} must be a function. Received ${value === null ? 'null' : typeof value}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function validateUndefined(value, name) {
|
|
38
|
+
if (value !== undefined) {
|
|
39
|
+
throw new TypeError(`${name} must be undefined. Received ${value === null ? 'null' : typeof value}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function isPromiseLike(obj) {
|
|
43
|
+
return !!(obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function');
|
|
44
|
+
}
|
|
45
|
+
function wrapInstanceExports(exports, mapFn) {
|
|
46
|
+
const newExports = Object.create(null);
|
|
47
|
+
Object.keys(exports).forEach(name => {
|
|
48
|
+
const exportValue = exports[name];
|
|
49
|
+
Object.defineProperty(newExports, name, {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
value: mapFn(exportValue, name)
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
return newExports;
|
|
55
|
+
}
|
|
56
|
+
function sleepBreakIf(delay, breakIf) {
|
|
57
|
+
const start = Date.now();
|
|
58
|
+
const end = start + delay;
|
|
59
|
+
let ret = false;
|
|
60
|
+
while (Date.now() < end) {
|
|
61
|
+
if (breakIf()) {
|
|
62
|
+
ret = true;
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return ret;
|
|
67
|
+
}
|
|
68
|
+
function unsharedSlice(view, start, end) {
|
|
69
|
+
return ((typeof SharedArrayBuffer === 'function' && view.buffer instanceof SharedArrayBuffer) || (Object.prototype.toString.call(view.buffer.constructor) === '[object SharedArrayBuffer]'))
|
|
70
|
+
? view.slice(start, end)
|
|
71
|
+
: view.subarray(start, end);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
const ignoreNames = [
|
|
75
|
+
'asyncify_get_state',
|
|
76
|
+
'asyncify_start_rewind',
|
|
77
|
+
'asyncify_start_unwind',
|
|
78
|
+
'asyncify_stop_rewind',
|
|
79
|
+
'asyncify_stop_unwind'
|
|
80
|
+
];
|
|
81
|
+
function tryAllocate(instance, wasm64, size, mallocName) {
|
|
82
|
+
if (typeof instance.exports[mallocName] !== 'function' || size <= 0) {
|
|
83
|
+
return {
|
|
84
|
+
wasm64,
|
|
85
|
+
dataPtr: 16,
|
|
86
|
+
start: wasm64 ? 32 : 24,
|
|
87
|
+
end: 1024
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
const malloc = instance.exports[mallocName];
|
|
91
|
+
const dataPtr = wasm64 ? Number(malloc(BigInt(16) + BigInt(size))) : malloc(8 + size);
|
|
92
|
+
if (dataPtr === 0) {
|
|
93
|
+
throw new Error('Allocate asyncify data failed');
|
|
94
|
+
}
|
|
95
|
+
return wasm64
|
|
96
|
+
? { wasm64, dataPtr, start: dataPtr + 16, end: dataPtr + 16 + size }
|
|
97
|
+
: { wasm64, dataPtr, start: dataPtr + 8, end: dataPtr + 8 + size };
|
|
98
|
+
}
|
|
99
|
+
/** @public */
|
|
100
|
+
class Asyncify {
|
|
101
|
+
constructor() {
|
|
102
|
+
this.value = undefined;
|
|
103
|
+
this.exports = undefined;
|
|
104
|
+
this.dataPtr = 0;
|
|
105
|
+
}
|
|
106
|
+
init(memory, instance, options) {
|
|
107
|
+
var _a, _b;
|
|
108
|
+
if (this.exports) {
|
|
109
|
+
throw new Error('Asyncify has been initialized');
|
|
110
|
+
}
|
|
111
|
+
if (!(memory instanceof _WebAssembly.Memory)) {
|
|
112
|
+
throw new TypeError('Require WebAssembly.Memory object');
|
|
113
|
+
}
|
|
114
|
+
const exports = instance.exports;
|
|
115
|
+
for (let i = 0; i < ignoreNames.length; ++i) {
|
|
116
|
+
if (typeof exports[ignoreNames[i]] !== 'function') {
|
|
117
|
+
throw new TypeError('Invalid asyncify wasm');
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
let address;
|
|
121
|
+
const wasm64 = Boolean(options.wasm64);
|
|
122
|
+
if (!options.tryAllocate) {
|
|
123
|
+
address = {
|
|
124
|
+
wasm64,
|
|
125
|
+
dataPtr: 16,
|
|
126
|
+
start: wasm64 ? 32 : 24,
|
|
127
|
+
end: 1024
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
if (options.tryAllocate === true) {
|
|
132
|
+
address = tryAllocate(instance, wasm64, 4096, 'malloc');
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
address = tryAllocate(instance, wasm64, (_a = options.tryAllocate.size) !== null && _a !== void 0 ? _a : 4096, (_b = options.tryAllocate.name) !== null && _b !== void 0 ? _b : 'malloc');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
this.dataPtr = address.dataPtr;
|
|
139
|
+
if (wasm64) {
|
|
140
|
+
new BigInt64Array(memory.buffer, this.dataPtr).set([BigInt(address.start), BigInt(address.end)]);
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
new Int32Array(memory.buffer, this.dataPtr).set([address.start, address.end]);
|
|
144
|
+
}
|
|
145
|
+
this.exports = this.wrapExports(exports, options.wrapExports);
|
|
146
|
+
const asyncifiedInstance = Object.create(_WebAssembly.Instance.prototype);
|
|
147
|
+
Object.defineProperty(asyncifiedInstance, 'exports', { value: this.exports });
|
|
148
|
+
// Object.setPrototypeOf(instance, Instance.prototype)
|
|
149
|
+
return asyncifiedInstance;
|
|
150
|
+
}
|
|
151
|
+
assertState() {
|
|
152
|
+
if (this.exports.asyncify_get_state() !== 0 /* AsyncifyState.NONE */) {
|
|
153
|
+
throw new Error('Asyncify state error');
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
wrapImportFunction(f) {
|
|
157
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
158
|
+
const _this = this;
|
|
159
|
+
return (function () {
|
|
160
|
+
// eslint-disable-next-line no-unreachable-loop
|
|
161
|
+
while (_this.exports.asyncify_get_state() === 2 /* AsyncifyState.REWINDING */) {
|
|
162
|
+
_this.exports.asyncify_stop_rewind();
|
|
163
|
+
return _this.value;
|
|
164
|
+
}
|
|
165
|
+
_this.assertState();
|
|
166
|
+
const v = f.apply(this, arguments);
|
|
167
|
+
if (!isPromiseLike(v))
|
|
168
|
+
return v;
|
|
169
|
+
_this.exports.asyncify_start_unwind(_this.dataPtr);
|
|
170
|
+
_this.value = v;
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
wrapImports(imports) {
|
|
174
|
+
const importObject = {};
|
|
175
|
+
Object.keys(imports).forEach(k => {
|
|
176
|
+
const mod = imports[k];
|
|
177
|
+
const newModule = {};
|
|
178
|
+
Object.keys(mod).forEach(name => {
|
|
179
|
+
const importValue = mod[name];
|
|
180
|
+
if (typeof importValue === 'function') {
|
|
181
|
+
newModule[name] = this.wrapImportFunction(importValue);
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
newModule[name] = importValue;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
importObject[k] = newModule;
|
|
188
|
+
});
|
|
189
|
+
return importObject;
|
|
190
|
+
}
|
|
191
|
+
wrapExportFunction(f) {
|
|
192
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
193
|
+
const _this = this;
|
|
194
|
+
return (async function () {
|
|
195
|
+
_this.assertState();
|
|
196
|
+
let ret = f.apply(this, arguments);
|
|
197
|
+
while (_this.exports.asyncify_get_state() === 1 /* AsyncifyState.UNWINDING */) {
|
|
198
|
+
_this.exports.asyncify_stop_unwind();
|
|
199
|
+
_this.value = await _this.value;
|
|
200
|
+
_this.assertState();
|
|
201
|
+
_this.exports.asyncify_start_rewind(_this.dataPtr);
|
|
202
|
+
ret = f.call(this);
|
|
203
|
+
}
|
|
204
|
+
_this.assertState();
|
|
205
|
+
return ret;
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
wrapExports(exports, needWrap) {
|
|
209
|
+
return wrapInstanceExports(exports, (exportValue, name) => {
|
|
210
|
+
let ignore = ignoreNames.indexOf(name) !== -1 || typeof exportValue !== 'function';
|
|
211
|
+
if (Array.isArray(needWrap)) {
|
|
212
|
+
ignore = ignore || (needWrap.indexOf(name) === -1);
|
|
213
|
+
}
|
|
214
|
+
return ignore ? exportValue : this.wrapExportFunction(exportValue);
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function validateImports(imports) {
|
|
220
|
+
if (imports && typeof imports !== 'object') {
|
|
221
|
+
throw new TypeError('imports must be an object or undefined');
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
function fetchWasm(urlOrBuffer, imports) {
|
|
225
|
+
if (typeof wx !== 'undefined' && typeof __wxConfig !== 'undefined') {
|
|
226
|
+
return _WebAssembly.instantiate(urlOrBuffer, imports);
|
|
227
|
+
}
|
|
228
|
+
return fetch(urlOrBuffer)
|
|
229
|
+
.then(response => response.arrayBuffer())
|
|
230
|
+
.then(buffer => _WebAssembly.instantiate(buffer, imports));
|
|
231
|
+
}
|
|
232
|
+
/** @public */
|
|
233
|
+
function load(wasmInput, imports) {
|
|
234
|
+
validateImports(imports);
|
|
235
|
+
imports = imports !== null && imports !== void 0 ? imports : {};
|
|
236
|
+
let source;
|
|
237
|
+
if (wasmInput instanceof ArrayBuffer || ArrayBuffer.isView(wasmInput)) {
|
|
238
|
+
return _WebAssembly.instantiate(wasmInput, imports);
|
|
239
|
+
}
|
|
240
|
+
if (wasmInput instanceof _WebAssembly.Module) {
|
|
241
|
+
return _WebAssembly.instantiate(wasmInput, imports).then((instance) => {
|
|
242
|
+
return { instance, module: wasmInput };
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
if (typeof wasmInput !== 'string' && !(wasmInput instanceof URL)) {
|
|
246
|
+
throw new TypeError('Invalid source');
|
|
247
|
+
}
|
|
248
|
+
if (typeof _WebAssembly.instantiateStreaming === 'function') {
|
|
249
|
+
let responsePromise;
|
|
250
|
+
try {
|
|
251
|
+
responsePromise = fetch(wasmInput);
|
|
252
|
+
source = _WebAssembly.instantiateStreaming(responsePromise, imports).catch(() => {
|
|
253
|
+
return fetchWasm(wasmInput, imports);
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
catch (_) {
|
|
257
|
+
source = fetchWasm(wasmInput, imports);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
else {
|
|
261
|
+
source = fetchWasm(wasmInput, imports);
|
|
262
|
+
}
|
|
263
|
+
return source;
|
|
264
|
+
}
|
|
265
|
+
/** @public */
|
|
266
|
+
function asyncifyLoad(asyncify, urlOrBuffer, imports) {
|
|
267
|
+
validateImports(imports);
|
|
268
|
+
imports = imports !== null && imports !== void 0 ? imports : {};
|
|
269
|
+
const asyncifyHelper = new Asyncify();
|
|
270
|
+
imports = asyncifyHelper.wrapImports(imports);
|
|
271
|
+
return load(urlOrBuffer, imports).then(source => {
|
|
272
|
+
var _a;
|
|
273
|
+
const memory = source.instance.exports.memory || ((_a = imports.env) === null || _a === void 0 ? void 0 : _a.memory);
|
|
274
|
+
return { module: source.module, instance: asyncifyHelper.init(memory, source.instance, asyncify) };
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
/** @public */
|
|
278
|
+
function loadSync(wasmInput, imports) {
|
|
279
|
+
validateImports(imports);
|
|
280
|
+
imports = imports !== null && imports !== void 0 ? imports : {};
|
|
281
|
+
let module;
|
|
282
|
+
if ((wasmInput instanceof ArrayBuffer) || ArrayBuffer.isView(wasmInput)) {
|
|
283
|
+
module = new _WebAssembly.Module(wasmInput);
|
|
284
|
+
}
|
|
285
|
+
else if (wasmInput instanceof WebAssembly.Module) {
|
|
286
|
+
module = wasmInput;
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
289
|
+
throw new TypeError('Invalid source');
|
|
290
|
+
}
|
|
291
|
+
const instance = new _WebAssembly.Instance(module, imports);
|
|
292
|
+
const source = { instance, module };
|
|
293
|
+
return source;
|
|
294
|
+
}
|
|
295
|
+
/** @public */
|
|
296
|
+
function asyncifyLoadSync(asyncify, buffer, imports) {
|
|
297
|
+
var _a;
|
|
298
|
+
validateImports(imports);
|
|
299
|
+
imports = imports !== null && imports !== void 0 ? imports : {};
|
|
300
|
+
const asyncifyHelper = new Asyncify();
|
|
301
|
+
imports = asyncifyHelper.wrapImports(imports);
|
|
302
|
+
const source = loadSync(buffer, imports);
|
|
303
|
+
const memory = source.instance.exports.memory || ((_a = imports.env) === null || _a === void 0 ? void 0 : _a.memory);
|
|
304
|
+
return { module: source.module, instance: asyncifyHelper.init(memory, source.instance, asyncify) };
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
const CHAR_DOT = 46; /* . */
|
|
308
|
+
const CHAR_FORWARD_SLASH = 47; /* / */
|
|
309
|
+
const CHAR_BACKWARD_SLASH = 92; /* \ */
|
|
310
|
+
const CHAR_COLON = 58; /* : */
|
|
311
|
+
const CHAR_UPPERCASE_A = 65; /* A */
|
|
312
|
+
const CHAR_UPPERCASE_Z = 90; /* Z */
|
|
313
|
+
const CHAR_LOWERCASE_A = 97; /* a */
|
|
314
|
+
const CHAR_LOWERCASE_Z = 122; /* z */
|
|
315
|
+
function isPathSeparatorWin(code) {
|
|
316
|
+
return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
|
|
317
|
+
}
|
|
318
|
+
function isWindowsDeviceRoot(code) {
|
|
319
|
+
return (code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z) ||
|
|
320
|
+
(code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z);
|
|
321
|
+
}
|
|
322
|
+
const _isWin32 = typeof process !== 'undefined' && process.platform === 'win32';
|
|
323
|
+
/**
|
|
324
|
+
* Windows variant of `resolve()`. Mirrors Node's `path.win32.resolve`
|
|
325
|
+
* semantics enough for the WASI shim's needs (drive-letter absolutes
|
|
326
|
+
* + UNC paths + per-drive cwd lookups via `process.env`/`process.cwd`).
|
|
327
|
+
*
|
|
328
|
+
* Why this is needed: on Windows, `FileDescriptor.realPath` is the
|
|
329
|
+
* host realpath returned by `fs.realpathSync(realPath, 'utf8')` — the
|
|
330
|
+
* backslash form `D:\…`. The POSIX-only `resolveImpl` below only
|
|
331
|
+
* treats `/` as a separator, reads `D` as non-`/`, decides realPath
|
|
332
|
+
* is "relative", and produces a garbage joined path. Downstream
|
|
333
|
+
* `fs.openSync(garbage)` then returns `EINVAL` and the WASI caller
|
|
334
|
+
* sees a permanent failure. This function gives us the correct
|
|
335
|
+
* Windows-style resolution without taking a Node-only `path` import
|
|
336
|
+
* (which would break browser bundles of this package).
|
|
337
|
+
*
|
|
338
|
+
* Cribbed from Node's `lib/path.js` `win32.resolve()` (MIT-licensed),
|
|
339
|
+
* trimmed to what WASI realpath resolution actually exercises.
|
|
340
|
+
*/
|
|
341
|
+
function resolveWin32(args) {
|
|
342
|
+
let resolvedDevice = '';
|
|
343
|
+
let resolvedTail = '';
|
|
344
|
+
let resolvedAbsolute = false;
|
|
345
|
+
for (let i = args.length - 1; i >= -1; i--) {
|
|
346
|
+
let path;
|
|
347
|
+
if (i >= 0) {
|
|
348
|
+
path = args[i];
|
|
349
|
+
validateString(path, 'path');
|
|
350
|
+
if (path.length === 0)
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
else if (resolvedDevice.length === 0) {
|
|
354
|
+
path = (typeof process !== 'undefined' && typeof process.cwd === 'function')
|
|
355
|
+
? process.cwd()
|
|
356
|
+
: '';
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
// Look up per-drive cwd via the `=X:` env var convention; fall back
|
|
360
|
+
// to the global cwd if absent.
|
|
361
|
+
const envKey = `=${resolvedDevice}`;
|
|
362
|
+
const env = (typeof process !== 'undefined') ? process.env : undefined;
|
|
363
|
+
path = (env && typeof env[envKey] === 'string')
|
|
364
|
+
? env[envKey]
|
|
365
|
+
: (typeof process !== 'undefined' && typeof process.cwd === 'function')
|
|
366
|
+
? process.cwd()
|
|
367
|
+
: '';
|
|
368
|
+
if (path === undefined ||
|
|
369
|
+
(path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() &&
|
|
370
|
+
path.charCodeAt(2) === CHAR_BACKWARD_SLASH)) {
|
|
371
|
+
path = `${resolvedDevice}\\`;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
const len = path.length;
|
|
375
|
+
let rootEnd = 0;
|
|
376
|
+
let device = '';
|
|
377
|
+
let isAbsolute = false;
|
|
378
|
+
const code = path.charCodeAt(0);
|
|
379
|
+
if (len === 1) {
|
|
380
|
+
if (isPathSeparatorWin(code)) {
|
|
381
|
+
rootEnd = 1;
|
|
382
|
+
isAbsolute = true;
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
else if (isPathSeparatorWin(code)) {
|
|
386
|
+
isAbsolute = true;
|
|
387
|
+
if (isPathSeparatorWin(path.charCodeAt(1))) {
|
|
388
|
+
// UNC path: `\\server\share\…`
|
|
389
|
+
let j = 2;
|
|
390
|
+
let last = j;
|
|
391
|
+
while (j < len && !isPathSeparatorWin(path.charCodeAt(j)))
|
|
392
|
+
j++;
|
|
393
|
+
if (j < len && j !== last) {
|
|
394
|
+
const firstPart = path.slice(last, j);
|
|
395
|
+
last = j;
|
|
396
|
+
while (j < len && isPathSeparatorWin(path.charCodeAt(j)))
|
|
397
|
+
j++;
|
|
398
|
+
if (j < len && j !== last) {
|
|
399
|
+
last = j;
|
|
400
|
+
while (j < len && !isPathSeparatorWin(path.charCodeAt(j)))
|
|
401
|
+
j++;
|
|
402
|
+
if (j === len || j !== last) {
|
|
403
|
+
device = `\\\\${firstPart}\\${path.slice(last, j)}`;
|
|
404
|
+
rootEnd = j;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
410
|
+
rootEnd = 1;
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
else if (isWindowsDeviceRoot(code) && path.charCodeAt(1) === CHAR_COLON) {
|
|
414
|
+
device = path.slice(0, 2);
|
|
415
|
+
rootEnd = 2;
|
|
416
|
+
if (len > 2 && isPathSeparatorWin(path.charCodeAt(2))) {
|
|
417
|
+
isAbsolute = true;
|
|
418
|
+
rootEnd = 3;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
if (device.length > 0) {
|
|
422
|
+
if (resolvedDevice.length > 0) {
|
|
423
|
+
if (device.toLowerCase() !== resolvedDevice.toLowerCase())
|
|
424
|
+
continue;
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
resolvedDevice = device;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
if (resolvedAbsolute) {
|
|
431
|
+
if (resolvedDevice.length > 0)
|
|
432
|
+
break;
|
|
433
|
+
}
|
|
434
|
+
else {
|
|
435
|
+
resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`;
|
|
436
|
+
resolvedAbsolute = isAbsolute;
|
|
437
|
+
if (isAbsolute && resolvedDevice.length > 0)
|
|
438
|
+
break;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
resolvedTail = normalizeString(resolvedTail, !resolvedAbsolute, '\\', isPathSeparatorWin);
|
|
442
|
+
return resolvedDevice + (resolvedAbsolute ? '\\' : '') + resolvedTail || '.';
|
|
443
|
+
}
|
|
444
|
+
function isPosixPathSeparator(code) {
|
|
445
|
+
return code === CHAR_FORWARD_SLASH;
|
|
446
|
+
}
|
|
447
|
+
function normalizeString(path, allowAboveRoot, separator, isPathSeparator) {
|
|
448
|
+
let res = '';
|
|
449
|
+
let lastSegmentLength = 0;
|
|
450
|
+
let lastSlash = -1;
|
|
451
|
+
let dots = 0;
|
|
452
|
+
let code = 0;
|
|
453
|
+
for (let i = 0; i <= path.length; ++i) {
|
|
454
|
+
if (i < path.length) {
|
|
455
|
+
code = path.charCodeAt(i);
|
|
456
|
+
}
|
|
457
|
+
else if (isPathSeparator(code)) {
|
|
458
|
+
break;
|
|
459
|
+
}
|
|
460
|
+
else {
|
|
461
|
+
code = CHAR_FORWARD_SLASH;
|
|
462
|
+
}
|
|
463
|
+
if (isPathSeparator(code)) {
|
|
464
|
+
if (lastSlash === i - 1 || dots === 1) ;
|
|
465
|
+
else if (dots === 2) {
|
|
466
|
+
if (res.length < 2 || lastSegmentLength !== 2 ||
|
|
467
|
+
res.charCodeAt(res.length - 1) !== CHAR_DOT ||
|
|
468
|
+
res.charCodeAt(res.length - 2) !== CHAR_DOT) {
|
|
469
|
+
if (res.length > 2) {
|
|
470
|
+
const lastSlashIndex = res.indexOf(separator);
|
|
471
|
+
if (lastSlashIndex === -1) {
|
|
472
|
+
res = '';
|
|
473
|
+
lastSegmentLength = 0;
|
|
474
|
+
}
|
|
475
|
+
else {
|
|
476
|
+
res = res.slice(0, lastSlashIndex);
|
|
477
|
+
lastSegmentLength =
|
|
478
|
+
res.length - 1 - res.indexOf(separator);
|
|
479
|
+
}
|
|
480
|
+
lastSlash = i;
|
|
481
|
+
dots = 0;
|
|
482
|
+
continue;
|
|
483
|
+
}
|
|
484
|
+
else if (res.length !== 0) {
|
|
485
|
+
res = '';
|
|
486
|
+
lastSegmentLength = 0;
|
|
487
|
+
lastSlash = i;
|
|
488
|
+
dots = 0;
|
|
489
|
+
continue;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
if (allowAboveRoot) {
|
|
493
|
+
res += res.length > 0 ? `${separator}..` : '..';
|
|
494
|
+
lastSegmentLength = 2;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
if (res.length > 0) {
|
|
499
|
+
res += `${separator}${path.slice(lastSlash + 1, i)}`;
|
|
500
|
+
}
|
|
501
|
+
else {
|
|
502
|
+
res = path.slice(lastSlash + 1, i);
|
|
503
|
+
}
|
|
504
|
+
lastSegmentLength = i - lastSlash - 1;
|
|
505
|
+
}
|
|
506
|
+
lastSlash = i;
|
|
507
|
+
dots = 0;
|
|
508
|
+
}
|
|
509
|
+
else if (code === CHAR_DOT && dots !== -1) {
|
|
510
|
+
++dots;
|
|
511
|
+
}
|
|
512
|
+
else {
|
|
513
|
+
dots = -1;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
return res;
|
|
517
|
+
}
|
|
518
|
+
function resolve(...args) {
|
|
519
|
+
// On Windows, host paths are `D:\…` style. The POSIX-only resolver
|
|
520
|
+
// below treats `D` as a non-`/` character and produces garbage; route
|
|
521
|
+
// to the Windows-aware variant. POSIX hosts (Linux/macOS/browser)
|
|
522
|
+
// run the original code path unchanged — `_isWin32` is constant-folded
|
|
523
|
+
// away on those targets.
|
|
524
|
+
if (_isWin32)
|
|
525
|
+
return resolveWin32(args);
|
|
526
|
+
let resolvedPath = '';
|
|
527
|
+
let resolvedAbsolute = false;
|
|
528
|
+
for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
|
529
|
+
const path = i >= 0 ? args[i] : '/';
|
|
530
|
+
validateString(path, 'path');
|
|
531
|
+
// Skip empty entries
|
|
532
|
+
if (path.length === 0) {
|
|
533
|
+
continue;
|
|
534
|
+
}
|
|
535
|
+
resolvedPath = `${path}/${resolvedPath}`;
|
|
536
|
+
resolvedAbsolute = path.charCodeAt(0) === CHAR_FORWARD_SLASH;
|
|
537
|
+
}
|
|
538
|
+
// At this point the path should be resolved to a full absolute path, but
|
|
539
|
+
// handle relative paths to be safe (might happen when process.cwd() fails)
|
|
540
|
+
// Normalize the path
|
|
541
|
+
resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute, '/', isPosixPathSeparator);
|
|
542
|
+
if (resolvedAbsolute) {
|
|
543
|
+
return `/${resolvedPath}`;
|
|
544
|
+
}
|
|
545
|
+
return resolvedPath.length > 0 ? resolvedPath : '.';
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
const FD_DATASYNC = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(0));
|
|
549
|
+
const FD_READ = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(1));
|
|
550
|
+
const FD_SEEK = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(2));
|
|
551
|
+
const FD_FDSTAT_SET_FLAGS = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(3));
|
|
552
|
+
const FD_SYNC = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(4));
|
|
553
|
+
const FD_TELL = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(5));
|
|
554
|
+
const FD_WRITE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(6));
|
|
555
|
+
const FD_ADVISE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(7));
|
|
556
|
+
const FD_ALLOCATE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(8));
|
|
557
|
+
const PATH_CREATE_DIRECTORY = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(9));
|
|
558
|
+
const PATH_CREATE_FILE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(10));
|
|
559
|
+
const PATH_LINK_SOURCE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(11));
|
|
560
|
+
const PATH_LINK_TARGET = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(12));
|
|
561
|
+
const PATH_OPEN = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(13));
|
|
562
|
+
const FD_READDIR = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(14));
|
|
563
|
+
const PATH_READLINK = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(15));
|
|
564
|
+
const PATH_RENAME_SOURCE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(16));
|
|
565
|
+
const PATH_RENAME_TARGET = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(17));
|
|
566
|
+
const PATH_FILESTAT_GET = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(18));
|
|
567
|
+
const PATH_FILESTAT_SET_SIZE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(19));
|
|
568
|
+
const PATH_FILESTAT_SET_TIMES = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(20));
|
|
569
|
+
const FD_FILESTAT_GET = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(21));
|
|
570
|
+
const FD_FILESTAT_SET_SIZE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(22));
|
|
571
|
+
const FD_FILESTAT_SET_TIMES = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(23));
|
|
572
|
+
const PATH_SYMLINK = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(24));
|
|
573
|
+
const PATH_REMOVE_DIRECTORY = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(25));
|
|
574
|
+
const PATH_UNLINK_FILE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(26));
|
|
575
|
+
const POLL_FD_READWRITE = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(27));
|
|
576
|
+
const SOCK_SHUTDOWN = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(28));
|
|
577
|
+
const SOCK_ACCEPT = ( /*#__PURE__*/BigInt(1) << /*#__PURE__*/ BigInt(29));
|
|
578
|
+
const WasiRights = {
|
|
579
|
+
FD_DATASYNC,
|
|
580
|
+
FD_READ,
|
|
581
|
+
FD_SEEK,
|
|
582
|
+
FD_FDSTAT_SET_FLAGS,
|
|
583
|
+
FD_SYNC,
|
|
584
|
+
FD_TELL,
|
|
585
|
+
FD_WRITE,
|
|
586
|
+
FD_ADVISE,
|
|
587
|
+
FD_ALLOCATE,
|
|
588
|
+
PATH_CREATE_DIRECTORY,
|
|
589
|
+
PATH_CREATE_FILE,
|
|
590
|
+
PATH_LINK_SOURCE,
|
|
591
|
+
PATH_LINK_TARGET,
|
|
592
|
+
PATH_OPEN,
|
|
593
|
+
FD_READDIR,
|
|
594
|
+
PATH_READLINK,
|
|
595
|
+
PATH_RENAME_SOURCE,
|
|
596
|
+
PATH_RENAME_TARGET,
|
|
597
|
+
PATH_FILESTAT_GET,
|
|
598
|
+
PATH_FILESTAT_SET_SIZE,
|
|
599
|
+
PATH_FILESTAT_SET_TIMES,
|
|
600
|
+
FD_FILESTAT_GET,
|
|
601
|
+
FD_FILESTAT_SET_SIZE,
|
|
602
|
+
FD_FILESTAT_SET_TIMES,
|
|
603
|
+
PATH_SYMLINK,
|
|
604
|
+
PATH_REMOVE_DIRECTORY,
|
|
605
|
+
PATH_UNLINK_FILE,
|
|
606
|
+
POLL_FD_READWRITE,
|
|
607
|
+
SOCK_SHUTDOWN,
|
|
608
|
+
SOCK_ACCEPT
|
|
609
|
+
};
|
|
610
|
+
|
|
611
|
+
function strerror(errno) {
|
|
612
|
+
switch (errno) {
|
|
613
|
+
case 0 /* WasiErrno.ESUCCESS */: return 'Success';
|
|
614
|
+
case 1 /* WasiErrno.E2BIG */: return 'Argument list too long';
|
|
615
|
+
case 2 /* WasiErrno.EACCES */: return 'Permission denied';
|
|
616
|
+
case 3 /* WasiErrno.EADDRINUSE */: return 'Address in use';
|
|
617
|
+
case 4 /* WasiErrno.EADDRNOTAVAIL */: return 'Address not available';
|
|
618
|
+
case 5 /* WasiErrno.EAFNOSUPPORT */: return 'Address family not supported by protocol';
|
|
619
|
+
case 6 /* WasiErrno.EAGAIN */: return 'Resource temporarily unavailable';
|
|
620
|
+
case 7 /* WasiErrno.EALREADY */: return 'Operation already in progress';
|
|
621
|
+
case 8 /* WasiErrno.EBADF */: return 'Bad file descriptor';
|
|
622
|
+
case 9 /* WasiErrno.EBADMSG */: return 'Bad message';
|
|
623
|
+
case 10 /* WasiErrno.EBUSY */: return 'Resource busy';
|
|
624
|
+
case 11 /* WasiErrno.ECANCELED */: return 'Operation canceled';
|
|
625
|
+
case 12 /* WasiErrno.ECHILD */: return 'No child process';
|
|
626
|
+
case 13 /* WasiErrno.ECONNABORTED */: return 'Connection aborted';
|
|
627
|
+
case 14 /* WasiErrno.ECONNREFUSED */: return 'Connection refused';
|
|
628
|
+
case 15 /* WasiErrno.ECONNRESET */: return 'Connection reset by peer';
|
|
629
|
+
case 16 /* WasiErrno.EDEADLK */: return 'Resource deadlock would occur';
|
|
630
|
+
case 17 /* WasiErrno.EDESTADDRREQ */: return 'Destination address required';
|
|
631
|
+
case 18 /* WasiErrno.EDOM */: return 'Domain error';
|
|
632
|
+
case 19 /* WasiErrno.EDQUOT */: return 'Quota exceeded';
|
|
633
|
+
case 20 /* WasiErrno.EEXIST */: return 'File exists';
|
|
634
|
+
case 21 /* WasiErrno.EFAULT */: return 'Bad address';
|
|
635
|
+
case 22 /* WasiErrno.EFBIG */: return 'File too large';
|
|
636
|
+
case 23 /* WasiErrno.EHOSTUNREACH */: return 'Host is unreachable';
|
|
637
|
+
case 24 /* WasiErrno.EIDRM */: return 'Identifier removed';
|
|
638
|
+
case 25 /* WasiErrno.EILSEQ */: return 'Illegal byte sequence';
|
|
639
|
+
case 26 /* WasiErrno.EINPROGRESS */: return 'Operation in progress';
|
|
640
|
+
case 27 /* WasiErrno.EINTR */: return 'Interrupted system call';
|
|
641
|
+
case 28 /* WasiErrno.EINVAL */: return 'Invalid argument';
|
|
642
|
+
case 29 /* WasiErrno.EIO */: return 'I/O error';
|
|
643
|
+
case 30 /* WasiErrno.EISCONN */: return 'Socket is connected';
|
|
644
|
+
case 31 /* WasiErrno.EISDIR */: return 'Is a directory';
|
|
645
|
+
case 32 /* WasiErrno.ELOOP */: return 'Symbolic link loop';
|
|
646
|
+
case 33 /* WasiErrno.EMFILE */: return 'No file descriptors available';
|
|
647
|
+
case 34 /* WasiErrno.EMLINK */: return 'Too many links';
|
|
648
|
+
case 35 /* WasiErrno.EMSGSIZE */: return 'Message too large';
|
|
649
|
+
case 36 /* WasiErrno.EMULTIHOP */: return 'Multihop attempted';
|
|
650
|
+
case 37 /* WasiErrno.ENAMETOOLONG */: return 'Filename too long';
|
|
651
|
+
case 38 /* WasiErrno.ENETDOWN */: return 'Network is down';
|
|
652
|
+
case 39 /* WasiErrno.ENETRESET */: return 'Connection reset by network';
|
|
653
|
+
case 40 /* WasiErrno.ENETUNREACH */: return 'Network unreachable';
|
|
654
|
+
case 41 /* WasiErrno.ENFILE */: return 'Too many files open in system';
|
|
655
|
+
case 42 /* WasiErrno.ENOBUFS */: return 'No buffer space available';
|
|
656
|
+
case 43 /* WasiErrno.ENODEV */: return 'No such device';
|
|
657
|
+
case 44 /* WasiErrno.ENOENT */: return 'No such file or directory';
|
|
658
|
+
case 45 /* WasiErrno.ENOEXEC */: return 'Exec format error';
|
|
659
|
+
case 46 /* WasiErrno.ENOLCK */: return 'No locks available';
|
|
660
|
+
case 47 /* WasiErrno.ENOLINK */: return 'Link has been severed';
|
|
661
|
+
case 48 /* WasiErrno.ENOMEM */: return 'Out of memory';
|
|
662
|
+
case 49 /* WasiErrno.ENOMSG */: return 'No message of the desired type';
|
|
663
|
+
case 50 /* WasiErrno.ENOPROTOOPT */: return 'Protocol not available';
|
|
664
|
+
case 51 /* WasiErrno.ENOSPC */: return 'No space left on device';
|
|
665
|
+
case 52 /* WasiErrno.ENOSYS */: return 'Function not implemented';
|
|
666
|
+
case 53 /* WasiErrno.ENOTCONN */: return 'Socket not connected';
|
|
667
|
+
case 54 /* WasiErrno.ENOTDIR */: return 'Not a directory';
|
|
668
|
+
case 55 /* WasiErrno.ENOTEMPTY */: return 'Directory not empty';
|
|
669
|
+
case 56 /* WasiErrno.ENOTRECOVERABLE */: return 'State not recoverable';
|
|
670
|
+
case 57 /* WasiErrno.ENOTSOCK */: return 'Not a socket';
|
|
671
|
+
case 58 /* WasiErrno.ENOTSUP */: return 'Not supported';
|
|
672
|
+
case 59 /* WasiErrno.ENOTTY */: return 'Not a tty';
|
|
673
|
+
case 60 /* WasiErrno.ENXIO */: return 'No such device or address';
|
|
674
|
+
case 61 /* WasiErrno.EOVERFLOW */: return 'Value too large for data type';
|
|
675
|
+
case 62 /* WasiErrno.EOWNERDEAD */: return 'Previous owner died';
|
|
676
|
+
case 63 /* WasiErrno.EPERM */: return 'Operation not permitted';
|
|
677
|
+
case 64 /* WasiErrno.EPIPE */: return 'Broken pipe';
|
|
678
|
+
case 65 /* WasiErrno.EPROTO */: return 'Protocol error';
|
|
679
|
+
case 66 /* WasiErrno.EPROTONOSUPPORT */: return 'Protocol not supported';
|
|
680
|
+
case 67 /* WasiErrno.EPROTOTYPE */: return 'Protocol wrong type for socket';
|
|
681
|
+
case 68 /* WasiErrno.ERANGE */: return 'Result not representable';
|
|
682
|
+
case 69 /* WasiErrno.EROFS */: return 'Read-only file system';
|
|
683
|
+
case 70 /* WasiErrno.ESPIPE */: return 'Invalid seek';
|
|
684
|
+
case 71 /* WasiErrno.ESRCH */: return 'No such process';
|
|
685
|
+
case 72 /* WasiErrno.ESTALE */: return 'Stale file handle';
|
|
686
|
+
case 73 /* WasiErrno.ETIMEDOUT */: return 'Operation timed out';
|
|
687
|
+
case 74 /* WasiErrno.ETXTBSY */: return 'Text file busy';
|
|
688
|
+
case 75 /* WasiErrno.EXDEV */: return 'Cross-device link';
|
|
689
|
+
case 76 /* WasiErrno.ENOTCAPABLE */: return 'Capabilities insufficient';
|
|
690
|
+
default: return 'Unknown error';
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
class WasiError extends Error {
|
|
694
|
+
constructor(message, errno) {
|
|
695
|
+
super(message);
|
|
696
|
+
this.errno = errno;
|
|
697
|
+
}
|
|
698
|
+
getErrorMessage() {
|
|
699
|
+
return strerror(this.errno);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
Object.defineProperty(WasiError.prototype, 'name', {
|
|
703
|
+
configurable: true,
|
|
704
|
+
writable: true,
|
|
705
|
+
value: 'WasiError'
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
const RIGHTS_ALL = WasiRights.FD_DATASYNC |
|
|
709
|
+
WasiRights.FD_READ |
|
|
710
|
+
WasiRights.FD_SEEK |
|
|
711
|
+
WasiRights.FD_FDSTAT_SET_FLAGS |
|
|
712
|
+
WasiRights.FD_SYNC |
|
|
713
|
+
WasiRights.FD_TELL |
|
|
714
|
+
WasiRights.FD_WRITE |
|
|
715
|
+
WasiRights.FD_ADVISE |
|
|
716
|
+
WasiRights.FD_ALLOCATE |
|
|
717
|
+
WasiRights.PATH_CREATE_DIRECTORY |
|
|
718
|
+
WasiRights.PATH_CREATE_FILE |
|
|
719
|
+
WasiRights.PATH_LINK_SOURCE |
|
|
720
|
+
WasiRights.PATH_LINK_TARGET |
|
|
721
|
+
WasiRights.PATH_OPEN |
|
|
722
|
+
WasiRights.FD_READDIR |
|
|
723
|
+
WasiRights.PATH_READLINK |
|
|
724
|
+
WasiRights.PATH_RENAME_SOURCE |
|
|
725
|
+
WasiRights.PATH_RENAME_TARGET |
|
|
726
|
+
WasiRights.PATH_FILESTAT_GET |
|
|
727
|
+
WasiRights.PATH_FILESTAT_SET_SIZE |
|
|
728
|
+
WasiRights.PATH_FILESTAT_SET_TIMES |
|
|
729
|
+
WasiRights.FD_FILESTAT_GET |
|
|
730
|
+
WasiRights.FD_FILESTAT_SET_TIMES |
|
|
731
|
+
WasiRights.FD_FILESTAT_SET_SIZE |
|
|
732
|
+
WasiRights.PATH_SYMLINK |
|
|
733
|
+
WasiRights.PATH_UNLINK_FILE |
|
|
734
|
+
WasiRights.PATH_REMOVE_DIRECTORY |
|
|
735
|
+
WasiRights.POLL_FD_READWRITE |
|
|
736
|
+
WasiRights.SOCK_SHUTDOWN |
|
|
737
|
+
WasiRights.SOCK_ACCEPT;
|
|
738
|
+
const BLOCK_DEVICE_BASE = RIGHTS_ALL;
|
|
739
|
+
const BLOCK_DEVICE_INHERITING = RIGHTS_ALL;
|
|
740
|
+
const CHARACTER_DEVICE_BASE = RIGHTS_ALL;
|
|
741
|
+
const CHARACTER_DEVICE_INHERITING = RIGHTS_ALL;
|
|
742
|
+
const REGULAR_FILE_BASE = WasiRights.FD_DATASYNC |
|
|
743
|
+
WasiRights.FD_READ |
|
|
744
|
+
WasiRights.FD_SEEK |
|
|
745
|
+
WasiRights.FD_FDSTAT_SET_FLAGS |
|
|
746
|
+
WasiRights.FD_SYNC |
|
|
747
|
+
WasiRights.FD_TELL |
|
|
748
|
+
WasiRights.FD_WRITE |
|
|
749
|
+
WasiRights.FD_ADVISE |
|
|
750
|
+
WasiRights.FD_ALLOCATE |
|
|
751
|
+
WasiRights.FD_FILESTAT_GET |
|
|
752
|
+
WasiRights.FD_FILESTAT_SET_SIZE |
|
|
753
|
+
WasiRights.FD_FILESTAT_SET_TIMES |
|
|
754
|
+
WasiRights.POLL_FD_READWRITE;
|
|
755
|
+
const REGULAR_FILE_INHERITING = /*#__PURE__*/ BigInt(0);
|
|
756
|
+
const DIRECTORY_BASE = WasiRights.FD_FDSTAT_SET_FLAGS |
|
|
757
|
+
WasiRights.FD_SYNC |
|
|
758
|
+
WasiRights.FD_ADVISE |
|
|
759
|
+
WasiRights.PATH_CREATE_DIRECTORY |
|
|
760
|
+
WasiRights.PATH_CREATE_FILE |
|
|
761
|
+
WasiRights.PATH_LINK_SOURCE |
|
|
762
|
+
WasiRights.PATH_LINK_TARGET |
|
|
763
|
+
WasiRights.PATH_OPEN |
|
|
764
|
+
WasiRights.FD_READDIR |
|
|
765
|
+
WasiRights.PATH_READLINK |
|
|
766
|
+
WasiRights.PATH_RENAME_SOURCE |
|
|
767
|
+
WasiRights.PATH_RENAME_TARGET |
|
|
768
|
+
WasiRights.PATH_FILESTAT_GET |
|
|
769
|
+
WasiRights.PATH_FILESTAT_SET_SIZE |
|
|
770
|
+
WasiRights.PATH_FILESTAT_SET_TIMES |
|
|
771
|
+
WasiRights.FD_FILESTAT_GET |
|
|
772
|
+
WasiRights.FD_FILESTAT_SET_TIMES |
|
|
773
|
+
WasiRights.PATH_SYMLINK |
|
|
774
|
+
WasiRights.PATH_UNLINK_FILE |
|
|
775
|
+
WasiRights.PATH_REMOVE_DIRECTORY |
|
|
776
|
+
WasiRights.POLL_FD_READWRITE;
|
|
777
|
+
const DIRECTORY_INHERITING = DIRECTORY_BASE | REGULAR_FILE_BASE;
|
|
778
|
+
const SOCKET_BASE = (WasiRights.FD_READ |
|
|
779
|
+
WasiRights.FD_FDSTAT_SET_FLAGS |
|
|
780
|
+
WasiRights.FD_WRITE |
|
|
781
|
+
WasiRights.FD_FILESTAT_GET |
|
|
782
|
+
WasiRights.POLL_FD_READWRITE |
|
|
783
|
+
WasiRights.SOCK_SHUTDOWN);
|
|
784
|
+
const SOCKET_INHERITING = RIGHTS_ALL;
|
|
785
|
+
const TTY_BASE = WasiRights.FD_READ |
|
|
786
|
+
WasiRights.FD_FDSTAT_SET_FLAGS |
|
|
787
|
+
WasiRights.FD_WRITE |
|
|
788
|
+
WasiRights.FD_FILESTAT_GET |
|
|
789
|
+
WasiRights.POLL_FD_READWRITE;
|
|
790
|
+
const TTY_INHERITING = /*#__PURE__*/ BigInt(0);
|
|
791
|
+
function getRights(stdio, fd, flags, type) {
|
|
792
|
+
const ret = {
|
|
793
|
+
base: BigInt(0),
|
|
794
|
+
inheriting: BigInt(0)
|
|
795
|
+
};
|
|
796
|
+
if (type === 0 /* WasiFileType.UNKNOWN */) {
|
|
797
|
+
throw new WasiError('Unknown file type', 28 /* WasiErrno.EINVAL */);
|
|
798
|
+
}
|
|
799
|
+
switch (type) {
|
|
800
|
+
case 4 /* WasiFileType.REGULAR_FILE */:
|
|
801
|
+
ret.base = REGULAR_FILE_BASE;
|
|
802
|
+
ret.inheriting = REGULAR_FILE_INHERITING;
|
|
803
|
+
break;
|
|
804
|
+
case 3 /* WasiFileType.DIRECTORY */:
|
|
805
|
+
ret.base = DIRECTORY_BASE;
|
|
806
|
+
ret.inheriting = DIRECTORY_INHERITING;
|
|
807
|
+
break;
|
|
808
|
+
case 6 /* WasiFileType.SOCKET_STREAM */:
|
|
809
|
+
case 5 /* WasiFileType.SOCKET_DGRAM */:
|
|
810
|
+
ret.base = SOCKET_BASE;
|
|
811
|
+
ret.inheriting = SOCKET_INHERITING;
|
|
812
|
+
break;
|
|
813
|
+
case 2 /* WasiFileType.CHARACTER_DEVICE */:
|
|
814
|
+
if (stdio.indexOf(fd) !== -1) {
|
|
815
|
+
ret.base = TTY_BASE;
|
|
816
|
+
ret.inheriting = TTY_INHERITING;
|
|
817
|
+
}
|
|
818
|
+
else {
|
|
819
|
+
ret.base = CHARACTER_DEVICE_BASE;
|
|
820
|
+
ret.inheriting = CHARACTER_DEVICE_INHERITING;
|
|
821
|
+
}
|
|
822
|
+
break;
|
|
823
|
+
case 1 /* WasiFileType.BLOCK_DEVICE */:
|
|
824
|
+
ret.base = BLOCK_DEVICE_BASE;
|
|
825
|
+
ret.inheriting = BLOCK_DEVICE_INHERITING;
|
|
826
|
+
break;
|
|
827
|
+
default:
|
|
828
|
+
ret.base = BigInt(0);
|
|
829
|
+
ret.inheriting = BigInt(0);
|
|
830
|
+
}
|
|
831
|
+
/* Disable read/write bits depending on access mode. */
|
|
832
|
+
const read_or_write_only = flags & (0 | 1 | 2);
|
|
833
|
+
if (read_or_write_only === 0) {
|
|
834
|
+
ret.base &= ~WasiRights.FD_WRITE;
|
|
835
|
+
}
|
|
836
|
+
else if (read_or_write_only === 1) {
|
|
837
|
+
ret.base &= ~WasiRights.FD_READ;
|
|
838
|
+
}
|
|
839
|
+
return ret;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
function concatBuffer(buffers, size) {
|
|
843
|
+
let total = 0;
|
|
844
|
+
if (typeof size === 'number' && size >= 0) {
|
|
845
|
+
total = size;
|
|
846
|
+
}
|
|
847
|
+
else {
|
|
848
|
+
for (let i = 0; i < buffers.length; i++) {
|
|
849
|
+
const buffer = buffers[i];
|
|
850
|
+
total += buffer.length;
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
let pos = 0;
|
|
854
|
+
const ret = new Uint8Array(total);
|
|
855
|
+
for (let i = 0; i < buffers.length; i++) {
|
|
856
|
+
const buffer = buffers[i];
|
|
857
|
+
ret.set(buffer, pos);
|
|
858
|
+
pos += buffer.length;
|
|
859
|
+
}
|
|
860
|
+
return ret;
|
|
861
|
+
}
|
|
862
|
+
class FileDescriptor {
|
|
863
|
+
constructor(id, fd, path, realPath, type, rightsBase, rightsInheriting, preopen) {
|
|
864
|
+
this.id = id;
|
|
865
|
+
this.fd = fd;
|
|
866
|
+
this.path = path;
|
|
867
|
+
this.realPath = realPath;
|
|
868
|
+
this.type = type;
|
|
869
|
+
this.rightsBase = rightsBase;
|
|
870
|
+
this.rightsInheriting = rightsInheriting;
|
|
871
|
+
this.preopen = preopen;
|
|
872
|
+
this.pos = BigInt(0);
|
|
873
|
+
this.size = BigInt(0);
|
|
874
|
+
}
|
|
875
|
+
seek(offset, whence) {
|
|
876
|
+
if (whence === 0 /* WasiWhence.SET */) {
|
|
877
|
+
this.pos = BigInt(offset);
|
|
878
|
+
}
|
|
879
|
+
else if (whence === 1 /* WasiWhence.CUR */) {
|
|
880
|
+
this.pos += BigInt(offset);
|
|
881
|
+
}
|
|
882
|
+
else if (whence === 2 /* WasiWhence.END */) {
|
|
883
|
+
this.pos = BigInt(this.size) - BigInt(offset);
|
|
884
|
+
}
|
|
885
|
+
else {
|
|
886
|
+
throw new WasiError('Unknown whence', 29 /* WasiErrno.EIO */);
|
|
887
|
+
}
|
|
888
|
+
return this.pos;
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
class StandardOutput extends FileDescriptor {
|
|
892
|
+
constructor(log, id, fd, path, realPath, type, rightsBase, rightsInheriting, preopen) {
|
|
893
|
+
super(id, fd, path, realPath, type, rightsBase, rightsInheriting, preopen);
|
|
894
|
+
this._log = log;
|
|
895
|
+
this._buf = null;
|
|
896
|
+
}
|
|
897
|
+
write(buffer) {
|
|
898
|
+
const originalBuffer = buffer;
|
|
899
|
+
if (this._buf) {
|
|
900
|
+
buffer = concatBuffer([this._buf, buffer]);
|
|
901
|
+
this._buf = null;
|
|
902
|
+
}
|
|
903
|
+
if (buffer.indexOf(10) === -1) {
|
|
904
|
+
this._buf = buffer;
|
|
905
|
+
return originalBuffer.byteLength;
|
|
906
|
+
}
|
|
907
|
+
let written = 0;
|
|
908
|
+
let lastBegin = 0;
|
|
909
|
+
let index;
|
|
910
|
+
while ((index = buffer.indexOf(10, written)) !== -1) {
|
|
911
|
+
const str = new TextDecoder().decode(buffer.subarray(lastBegin, index));
|
|
912
|
+
this._log(str);
|
|
913
|
+
written += index - lastBegin + 1;
|
|
914
|
+
lastBegin = index + 1;
|
|
915
|
+
}
|
|
916
|
+
if (written < buffer.length) {
|
|
917
|
+
this._buf = buffer.slice(written);
|
|
918
|
+
}
|
|
919
|
+
return originalBuffer.byteLength;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
function toFileType(stat) {
|
|
923
|
+
if (stat.isBlockDevice())
|
|
924
|
+
return 1 /* WasiFileType.BLOCK_DEVICE */;
|
|
925
|
+
if (stat.isCharacterDevice())
|
|
926
|
+
return 2 /* WasiFileType.CHARACTER_DEVICE */;
|
|
927
|
+
if (stat.isDirectory())
|
|
928
|
+
return 3 /* WasiFileType.DIRECTORY */;
|
|
929
|
+
if (stat.isSocket())
|
|
930
|
+
return 6 /* WasiFileType.SOCKET_STREAM */;
|
|
931
|
+
if (stat.isFile())
|
|
932
|
+
return 4 /* WasiFileType.REGULAR_FILE */;
|
|
933
|
+
if (stat.isSymbolicLink())
|
|
934
|
+
return 7 /* WasiFileType.SYMBOLIC_LINK */;
|
|
935
|
+
return 0 /* WasiFileType.UNKNOWN */;
|
|
936
|
+
}
|
|
937
|
+
function toFileStat(view, buf, stat) {
|
|
938
|
+
view.setBigUint64(buf, stat.dev, true);
|
|
939
|
+
view.setBigUint64(buf + 8, stat.ino, true);
|
|
940
|
+
view.setBigUint64(buf + 16, BigInt(toFileType(stat)), true);
|
|
941
|
+
view.setBigUint64(buf + 24, stat.nlink, true);
|
|
942
|
+
view.setBigUint64(buf + 32, stat.size, true);
|
|
943
|
+
view.setBigUint64(buf + 40, stat.atimeMs * BigInt(1000000), true);
|
|
944
|
+
view.setBigUint64(buf + 48, stat.mtimeMs * BigInt(1000000), true);
|
|
945
|
+
view.setBigUint64(buf + 56, stat.ctimeMs * BigInt(1000000), true);
|
|
946
|
+
}
|
|
947
|
+
class FileDescriptorTable {
|
|
948
|
+
constructor(options) {
|
|
949
|
+
this.used = 0;
|
|
950
|
+
this.size = options.size;
|
|
951
|
+
this.fds = Array(options.size);
|
|
952
|
+
this.stdio = [options.in, options.out, options.err];
|
|
953
|
+
this.print = options.print;
|
|
954
|
+
this.printErr = options.printErr;
|
|
955
|
+
this.insertStdio(options.in, 0, '<stdin>');
|
|
956
|
+
this.insertStdio(options.out, 1, '<stdout>');
|
|
957
|
+
this.insertStdio(options.err, 2, '<stderr>');
|
|
958
|
+
}
|
|
959
|
+
insertStdio(fd, expected, name) {
|
|
960
|
+
const type = 2 /* WasiFileType.CHARACTER_DEVICE */;
|
|
961
|
+
const { base, inheriting } = getRights(this.stdio, fd, 2 /* FileControlFlag.O_RDWR */, type);
|
|
962
|
+
const wrap = this.insert(fd, name, name, type, base, inheriting, 0);
|
|
963
|
+
if (wrap.id !== expected) {
|
|
964
|
+
throw new WasiError(`id: ${wrap.id} !== expected: ${expected}`, 8 /* WasiErrno.EBADF */);
|
|
965
|
+
}
|
|
966
|
+
return wrap;
|
|
967
|
+
}
|
|
968
|
+
insert(fd, mappedPath, realPath, type, rightsBase, rightsInheriting, preopen) {
|
|
969
|
+
var _a, _b;
|
|
970
|
+
let index = -1;
|
|
971
|
+
if (this.used >= this.size) {
|
|
972
|
+
const newSize = this.size * 2;
|
|
973
|
+
this.fds.length = newSize;
|
|
974
|
+
index = this.size;
|
|
975
|
+
this.size = newSize;
|
|
976
|
+
}
|
|
977
|
+
else {
|
|
978
|
+
for (let i = 0; i < this.size; ++i) {
|
|
979
|
+
if (this.fds[i] == null) {
|
|
980
|
+
index = i;
|
|
981
|
+
break;
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
let entry;
|
|
986
|
+
if (mappedPath === '<stdout>') {
|
|
987
|
+
entry = new StandardOutput((_a = this.print) !== null && _a !== void 0 ? _a : console.log, index, fd, mappedPath, realPath, type, rightsBase, rightsInheriting, preopen);
|
|
988
|
+
}
|
|
989
|
+
else if (mappedPath === '<stderr>') {
|
|
990
|
+
entry = new StandardOutput((_b = this.printErr) !== null && _b !== void 0 ? _b : console.error, index, fd, mappedPath, realPath, type, rightsBase, rightsInheriting, preopen);
|
|
991
|
+
}
|
|
992
|
+
else {
|
|
993
|
+
entry = new FileDescriptor(index, fd, mappedPath, realPath, type, rightsBase, rightsInheriting, preopen);
|
|
994
|
+
}
|
|
995
|
+
this.fds[index] = entry;
|
|
996
|
+
this.used++;
|
|
997
|
+
return entry;
|
|
998
|
+
}
|
|
999
|
+
get(id, base, inheriting) {
|
|
1000
|
+
if (id >= this.size) {
|
|
1001
|
+
throw new WasiError('Invalid fd', 8 /* WasiErrno.EBADF */);
|
|
1002
|
+
}
|
|
1003
|
+
const entry = this.fds[id];
|
|
1004
|
+
if (!entry || entry.id !== id) {
|
|
1005
|
+
throw new WasiError('Bad file descriptor', 8 /* WasiErrno.EBADF */);
|
|
1006
|
+
}
|
|
1007
|
+
/* Validate that the fd has the necessary rights. */
|
|
1008
|
+
if ((~entry.rightsBase & base) !== BigInt(0) || (~entry.rightsInheriting & inheriting) !== BigInt(0)) {
|
|
1009
|
+
throw new WasiError('Capabilities insufficient', 76 /* WasiErrno.ENOTCAPABLE */);
|
|
1010
|
+
}
|
|
1011
|
+
return entry;
|
|
1012
|
+
}
|
|
1013
|
+
remove(id) {
|
|
1014
|
+
if (id >= this.size) {
|
|
1015
|
+
throw new WasiError('Invalid fd', 8 /* WasiErrno.EBADF */);
|
|
1016
|
+
}
|
|
1017
|
+
const entry = this.fds[id];
|
|
1018
|
+
if (!entry || entry.id !== id) {
|
|
1019
|
+
throw new WasiError('Bad file descriptor', 8 /* WasiErrno.EBADF */);
|
|
1020
|
+
}
|
|
1021
|
+
this.fds[id] = undefined;
|
|
1022
|
+
this.used--;
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
class SyncTable extends FileDescriptorTable {
|
|
1026
|
+
constructor(options) {
|
|
1027
|
+
super(options);
|
|
1028
|
+
this.fs = options.fs;
|
|
1029
|
+
}
|
|
1030
|
+
getFileTypeByFd(fd) {
|
|
1031
|
+
const stats = this.fs.fstatSync(fd, { bigint: true });
|
|
1032
|
+
return toFileType(stats);
|
|
1033
|
+
}
|
|
1034
|
+
insertPreopen(fd, mappedPath, realPath) {
|
|
1035
|
+
const type = this.getFileTypeByFd(fd);
|
|
1036
|
+
if (type !== 3 /* WasiFileType.DIRECTORY */) {
|
|
1037
|
+
throw new WasiError(`Preopen not dir: ["${mappedPath}", "${realPath}"]`, 54 /* WasiErrno.ENOTDIR */);
|
|
1038
|
+
}
|
|
1039
|
+
const result = getRights(this.stdio, fd, 0, type);
|
|
1040
|
+
return this.insert(fd, mappedPath, realPath, type, result.base, result.inheriting, 1);
|
|
1041
|
+
}
|
|
1042
|
+
renumber(dst, src) {
|
|
1043
|
+
if (dst === src)
|
|
1044
|
+
return;
|
|
1045
|
+
if (dst >= this.size || src >= this.size) {
|
|
1046
|
+
throw new WasiError('Invalid fd', 8 /* WasiErrno.EBADF */);
|
|
1047
|
+
}
|
|
1048
|
+
const dstEntry = this.fds[dst];
|
|
1049
|
+
const srcEntry = this.fds[src];
|
|
1050
|
+
if (!dstEntry || !srcEntry || dstEntry.id !== dst || srcEntry.id !== src) {
|
|
1051
|
+
throw new WasiError('Invalid fd', 8 /* WasiErrno.EBADF */);
|
|
1052
|
+
}
|
|
1053
|
+
this.fs.closeSync(dstEntry.fd);
|
|
1054
|
+
this.fds[dst] = this.fds[src];
|
|
1055
|
+
this.fds[dst].id = dst;
|
|
1056
|
+
this.fds[src] = undefined;
|
|
1057
|
+
this.used--;
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
class AsyncTable extends FileDescriptorTable {
|
|
1061
|
+
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
1062
|
+
constructor(options) {
|
|
1063
|
+
super(options);
|
|
1064
|
+
}
|
|
1065
|
+
async getFileTypeByFd(fd) {
|
|
1066
|
+
const stats = await fd.stat({ bigint: true });
|
|
1067
|
+
return toFileType(stats);
|
|
1068
|
+
}
|
|
1069
|
+
async insertPreopen(fd, mappedPath, realPath) {
|
|
1070
|
+
const type = await this.getFileTypeByFd(fd);
|
|
1071
|
+
if (type !== 3 /* WasiFileType.DIRECTORY */) {
|
|
1072
|
+
throw new WasiError(`Preopen not dir: ["${mappedPath}", "${realPath}"]`, 54 /* WasiErrno.ENOTDIR */);
|
|
1073
|
+
}
|
|
1074
|
+
const result = getRights(this.stdio, fd.fd, 0, type);
|
|
1075
|
+
return this.insert(fd, mappedPath, realPath, type, result.base, result.inheriting, 1);
|
|
1076
|
+
}
|
|
1077
|
+
async renumber(dst, src) {
|
|
1078
|
+
if (dst === src)
|
|
1079
|
+
return;
|
|
1080
|
+
if (dst >= this.size || src >= this.size) {
|
|
1081
|
+
throw new WasiError('Invalid fd', 8 /* WasiErrno.EBADF */);
|
|
1082
|
+
}
|
|
1083
|
+
const dstEntry = this.fds[dst];
|
|
1084
|
+
const srcEntry = this.fds[src];
|
|
1085
|
+
if (!dstEntry || !srcEntry || dstEntry.id !== dst || srcEntry.id !== src) {
|
|
1086
|
+
throw new WasiError('Invalid fd', 8 /* WasiErrno.EBADF */);
|
|
1087
|
+
}
|
|
1088
|
+
await dstEntry.fd.close();
|
|
1089
|
+
this.fds[dst] = this.fds[src];
|
|
1090
|
+
this.fds[dst].id = dst;
|
|
1091
|
+
this.fds[src] = undefined;
|
|
1092
|
+
this.used--;
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
/** @public */
|
|
1097
|
+
const WebAssemblyMemory = /*#__PURE__*/ (function () { return _WebAssembly.Memory; })();
|
|
1098
|
+
/** @public */
|
|
1099
|
+
class Memory extends WebAssemblyMemory {
|
|
1100
|
+
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
1101
|
+
constructor(descriptor) {
|
|
1102
|
+
super(descriptor);
|
|
1103
|
+
}
|
|
1104
|
+
get HEAP8() { return new Int8Array(super.buffer); }
|
|
1105
|
+
get HEAPU8() { return new Uint8Array(super.buffer); }
|
|
1106
|
+
get HEAP16() { return new Int16Array(super.buffer); }
|
|
1107
|
+
get HEAPU16() { return new Uint16Array(super.buffer); }
|
|
1108
|
+
get HEAP32() { return new Int32Array(super.buffer); }
|
|
1109
|
+
get HEAPU32() { return new Uint32Array(super.buffer); }
|
|
1110
|
+
get HEAP64() { return new BigInt64Array(super.buffer); }
|
|
1111
|
+
get HEAPU64() { return new BigUint64Array(super.buffer); }
|
|
1112
|
+
get HEAPF32() { return new Float32Array(super.buffer); }
|
|
1113
|
+
get HEAPF64() { return new Float64Array(super.buffer); }
|
|
1114
|
+
get view() { return new DataView(super.buffer); }
|
|
1115
|
+
}
|
|
1116
|
+
/** @public */
|
|
1117
|
+
function extendMemory(memory) {
|
|
1118
|
+
if (Object.getPrototypeOf(memory) === _WebAssembly.Memory.prototype) {
|
|
1119
|
+
Object.setPrototypeOf(memory, Memory.prototype);
|
|
1120
|
+
}
|
|
1121
|
+
return memory;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
function checkWebAssemblyFunction() {
|
|
1125
|
+
const WebAssemblyFunction = _WebAssembly.Function;
|
|
1126
|
+
if (typeof WebAssemblyFunction !== 'function') {
|
|
1127
|
+
throw new Error('WebAssembly.Function is not supported in this environment.' +
|
|
1128
|
+
' If you are using V8 based browser like Chrome, try to specify' +
|
|
1129
|
+
' --js-flags="--wasm-staging --experimental-wasm-stack-switching"');
|
|
1130
|
+
}
|
|
1131
|
+
return WebAssemblyFunction;
|
|
1132
|
+
}
|
|
1133
|
+
/** @public */
|
|
1134
|
+
function wrapAsyncImport(f, parameterType, returnType) {
|
|
1135
|
+
const WebAssemblyFunction = checkWebAssemblyFunction();
|
|
1136
|
+
if (typeof f !== 'function') {
|
|
1137
|
+
throw new TypeError('Function required');
|
|
1138
|
+
}
|
|
1139
|
+
const parameters = parameterType.slice(0);
|
|
1140
|
+
parameters.unshift('externref');
|
|
1141
|
+
return new WebAssemblyFunction({ parameters, results: returnType }, f, { suspending: 'first' });
|
|
1142
|
+
}
|
|
1143
|
+
/** @public */
|
|
1144
|
+
function wrapAsyncExport(f) {
|
|
1145
|
+
const WebAssemblyFunction = checkWebAssemblyFunction();
|
|
1146
|
+
if (typeof f !== 'function') {
|
|
1147
|
+
throw new TypeError('Function required');
|
|
1148
|
+
}
|
|
1149
|
+
return new WebAssemblyFunction({ parameters: [...WebAssemblyFunction.type(f).parameters.slice(1)], results: ['externref'] }, f, { promising: 'first' });
|
|
1150
|
+
}
|
|
1151
|
+
/** @public */
|
|
1152
|
+
function wrapExports(exports, needWrap) {
|
|
1153
|
+
return wrapInstanceExports(exports, (exportValue, name) => {
|
|
1154
|
+
let ignore = typeof exportValue !== 'function';
|
|
1155
|
+
if (Array.isArray(needWrap)) {
|
|
1156
|
+
ignore = ignore || (needWrap.indexOf(name) === -1);
|
|
1157
|
+
}
|
|
1158
|
+
return ignore ? exportValue : wrapAsyncExport(exportValue);
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
// Linux fcntl flag bits ↔ Windows libuv flag bits. `pathOpen()` builds
|
|
1163
|
+
// `flagsRes` using Linux constants (O_CREAT=0x40, O_EXCL=0x80,
|
|
1164
|
+
// O_APPEND=0x400). Windows libuv expects different bits (O_CREAT=0x100,
|
|
1165
|
+
// O_EXCL=0x400, O_APPEND=0x8). Without translation,
|
|
1166
|
+
// `fs.openSync(path, 0x241 /* L:WRONLY|CREAT|TRUNC */)` is rejected
|
|
1167
|
+
// with EINVAL because Linux's 0x40 happens to mean O_TEMPORARY on
|
|
1168
|
+
// Windows — and O_TEMPORARY without O_CREAT is invalid.
|
|
1169
|
+
const _isWin32Flags = typeof process !== 'undefined' && process.platform === 'win32';
|
|
1170
|
+
function _toWinOpenFlags(f) {
|
|
1171
|
+
let r = f & 3; // RDONLY/WRONLY/RDWR — same on both
|
|
1172
|
+
if ((f & 0x40) !== 0)
|
|
1173
|
+
r |= 0x100; // O_CREAT: Linux 0x40 -> Windows 0x100
|
|
1174
|
+
if ((f & 0x80) !== 0)
|
|
1175
|
+
r |= 0x400; // O_EXCL: Linux 0x80 -> Windows 0x400
|
|
1176
|
+
if ((f & 0x200) !== 0)
|
|
1177
|
+
r |= 0x200; // O_TRUNC: same value on both
|
|
1178
|
+
if ((f & 0x400) !== 0)
|
|
1179
|
+
r |= 0x8; // O_APPEND: Linux 0x400 -> Windows 0x8
|
|
1180
|
+
return r;
|
|
1181
|
+
}
|
|
1182
|
+
function copyMemory(targets, src) {
|
|
1183
|
+
if (targets.length === 0 || src.length === 0)
|
|
1184
|
+
return 0;
|
|
1185
|
+
let copied = 0;
|
|
1186
|
+
let left = src.length - copied;
|
|
1187
|
+
for (let i = 0; i < targets.length; ++i) {
|
|
1188
|
+
const target = targets[i];
|
|
1189
|
+
if (left < target.length) {
|
|
1190
|
+
target.set(src.subarray(copied, copied + left), 0);
|
|
1191
|
+
copied += left;
|
|
1192
|
+
left = 0;
|
|
1193
|
+
return copied;
|
|
1194
|
+
}
|
|
1195
|
+
target.set(src.subarray(copied, copied + target.length), 0);
|
|
1196
|
+
copied += target.length;
|
|
1197
|
+
left -= target.length;
|
|
1198
|
+
}
|
|
1199
|
+
return copied;
|
|
1200
|
+
}
|
|
1201
|
+
const _memory = new WeakMap();
|
|
1202
|
+
const _wasi = new WeakMap();
|
|
1203
|
+
const _fs = new WeakMap();
|
|
1204
|
+
function getMemory(wasi) {
|
|
1205
|
+
return _memory.get(wasi);
|
|
1206
|
+
}
|
|
1207
|
+
function getFs(wasi) {
|
|
1208
|
+
const fs = _fs.get(wasi);
|
|
1209
|
+
if (!fs)
|
|
1210
|
+
throw new Error('filesystem is unavailable');
|
|
1211
|
+
return fs;
|
|
1212
|
+
}
|
|
1213
|
+
function handleError(err) {
|
|
1214
|
+
if (err instanceof WasiError) {
|
|
1215
|
+
{
|
|
1216
|
+
console.warn(err);
|
|
1217
|
+
}
|
|
1218
|
+
return err.errno;
|
|
1219
|
+
}
|
|
1220
|
+
switch (err.code) {
|
|
1221
|
+
case 'ENOENT': return 44 /* WasiErrno.ENOENT */;
|
|
1222
|
+
case 'EBADF': return 8 /* WasiErrno.EBADF */;
|
|
1223
|
+
case 'EINVAL': return 28 /* WasiErrno.EINVAL */;
|
|
1224
|
+
case 'EPERM': return 63 /* WasiErrno.EPERM */;
|
|
1225
|
+
case 'EPROTO': return 65 /* WasiErrno.EPROTO */;
|
|
1226
|
+
case 'EEXIST': return 20 /* WasiErrno.EEXIST */;
|
|
1227
|
+
case 'ENOTDIR': return 54 /* WasiErrno.ENOTDIR */;
|
|
1228
|
+
case 'EMFILE': return 33 /* WasiErrno.EMFILE */;
|
|
1229
|
+
case 'EACCES': return 2 /* WasiErrno.EACCES */;
|
|
1230
|
+
case 'EISDIR': return 31 /* WasiErrno.EISDIR */;
|
|
1231
|
+
case 'ENOTEMPTY': return 55 /* WasiErrno.ENOTEMPTY */;
|
|
1232
|
+
case 'ENOSYS': return 52 /* WasiErrno.ENOSYS */;
|
|
1233
|
+
}
|
|
1234
|
+
throw err;
|
|
1235
|
+
}
|
|
1236
|
+
function defineName(name, f) {
|
|
1237
|
+
Object.defineProperty(f, 'name', { value: name });
|
|
1238
|
+
return f;
|
|
1239
|
+
}
|
|
1240
|
+
function tryCall(f, wasi, args) {
|
|
1241
|
+
let r;
|
|
1242
|
+
try {
|
|
1243
|
+
r = f.apply(wasi, args);
|
|
1244
|
+
}
|
|
1245
|
+
catch (err) {
|
|
1246
|
+
return handleError(err);
|
|
1247
|
+
}
|
|
1248
|
+
if (isPromiseLike(r)) {
|
|
1249
|
+
return r.then(_ => _, handleError);
|
|
1250
|
+
}
|
|
1251
|
+
return r;
|
|
1252
|
+
}
|
|
1253
|
+
function syscallWrap(self, name, f) {
|
|
1254
|
+
let debug = false;
|
|
1255
|
+
const NODE_DEBUG_NATIVE = (() => {
|
|
1256
|
+
try {
|
|
1257
|
+
return "wasi";
|
|
1258
|
+
}
|
|
1259
|
+
catch (_) {
|
|
1260
|
+
return undefined;
|
|
1261
|
+
}
|
|
1262
|
+
})();
|
|
1263
|
+
if (typeof NODE_DEBUG_NATIVE === 'string' && NODE_DEBUG_NATIVE.split(',').includes('wasi')) {
|
|
1264
|
+
debug = true;
|
|
1265
|
+
}
|
|
1266
|
+
return debug
|
|
1267
|
+
? defineName(name, function () {
|
|
1268
|
+
const args = Array.prototype.slice.call(arguments);
|
|
1269
|
+
let debugArgs = [`${name}(${Array.from({ length: arguments.length }).map(() => '%d').join(', ')})`];
|
|
1270
|
+
debugArgs = debugArgs.concat(args);
|
|
1271
|
+
console.debug.apply(console, debugArgs);
|
|
1272
|
+
return tryCall(f, self, args);
|
|
1273
|
+
})
|
|
1274
|
+
: defineName(name, function () {
|
|
1275
|
+
return tryCall(f, self, arguments);
|
|
1276
|
+
});
|
|
1277
|
+
}
|
|
1278
|
+
function resolvePathSync(fs, fileDescriptor, path, flags) {
|
|
1279
|
+
let resolvedPath = resolve(fileDescriptor.realPath, path);
|
|
1280
|
+
if ((flags & 1) === 1) {
|
|
1281
|
+
try {
|
|
1282
|
+
resolvedPath = fs.readlinkSync(resolvedPath);
|
|
1283
|
+
}
|
|
1284
|
+
catch (err) {
|
|
1285
|
+
if (err.code !== 'EINVAL' && err.code !== 'ENOENT') {
|
|
1286
|
+
throw err;
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
return resolvedPath;
|
|
1291
|
+
}
|
|
1292
|
+
async function resolvePathAsync(fs, fileDescriptor, path, flags) {
|
|
1293
|
+
let resolvedPath = resolve(fileDescriptor.realPath, path);
|
|
1294
|
+
if ((flags & 1) === 1) {
|
|
1295
|
+
try {
|
|
1296
|
+
resolvedPath = await fs.promises.readlink(resolvedPath);
|
|
1297
|
+
}
|
|
1298
|
+
catch (err) {
|
|
1299
|
+
if (err.code !== 'EINVAL' && err.code !== 'ENOENT') {
|
|
1300
|
+
throw err;
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
return resolvedPath;
|
|
1305
|
+
}
|
|
1306
|
+
// eslint-disable-next-line spaced-comment
|
|
1307
|
+
const encoder = /*#__PURE__*/ new TextEncoder();
|
|
1308
|
+
// eslint-disable-next-line spaced-comment
|
|
1309
|
+
const decoder = /*#__PURE__*/ new TextDecoder();
|
|
1310
|
+
const INT64_MAX = (BigInt(1) << BigInt(63)) - BigInt(1);
|
|
1311
|
+
function readStdin() {
|
|
1312
|
+
const value = window.prompt();
|
|
1313
|
+
if (value === null)
|
|
1314
|
+
return new Uint8Array();
|
|
1315
|
+
const buffer = new TextEncoder().encode(value + '\n');
|
|
1316
|
+
return buffer;
|
|
1317
|
+
}
|
|
1318
|
+
function validateFstFlagsOrReturn(flags) {
|
|
1319
|
+
return (Boolean((flags) & ~(1 /* WasiFstFlag.SET_ATIM */ | 2 /* WasiFstFlag.SET_ATIM_NOW */ |
|
|
1320
|
+
4 /* WasiFstFlag.SET_MTIM */ | 8 /* WasiFstFlag.SET_MTIM_NOW */)) ||
|
|
1321
|
+
((flags) & (1 /* WasiFstFlag.SET_ATIM */ | 2 /* WasiFstFlag.SET_ATIM_NOW */)) ===
|
|
1322
|
+
(1 /* WasiFstFlag.SET_ATIM */ | 2 /* WasiFstFlag.SET_ATIM_NOW */) ||
|
|
1323
|
+
((flags) & (4 /* WasiFstFlag.SET_MTIM */ | 8 /* WasiFstFlag.SET_MTIM_NOW */)) ===
|
|
1324
|
+
(4 /* WasiFstFlag.SET_MTIM */ | 8 /* WasiFstFlag.SET_MTIM_NOW */));
|
|
1325
|
+
}
|
|
1326
|
+
class WASI$1 {
|
|
1327
|
+
constructor(args, env, fds, asyncFs, fs, asyncify) {
|
|
1328
|
+
this.args_get = syscallWrap(this, 'args_get', function (argv, argv_buf) {
|
|
1329
|
+
argv = Number(argv);
|
|
1330
|
+
argv_buf = Number(argv_buf);
|
|
1331
|
+
if (argv === 0 || argv_buf === 0) {
|
|
1332
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1333
|
+
}
|
|
1334
|
+
const { HEAPU8, view } = getMemory(this);
|
|
1335
|
+
const wasi = _wasi.get(this);
|
|
1336
|
+
const args = wasi.args;
|
|
1337
|
+
for (let i = 0; i < args.length; ++i) {
|
|
1338
|
+
const arg = args[i];
|
|
1339
|
+
view.setInt32(argv, argv_buf, true);
|
|
1340
|
+
argv += 4;
|
|
1341
|
+
const data = encoder.encode(arg + '\0');
|
|
1342
|
+
HEAPU8.set(data, argv_buf);
|
|
1343
|
+
argv_buf += data.length;
|
|
1344
|
+
}
|
|
1345
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1346
|
+
});
|
|
1347
|
+
this.args_sizes_get = syscallWrap(this, 'args_sizes_get', function (argc, argv_buf_size) {
|
|
1348
|
+
argc = Number(argc);
|
|
1349
|
+
argv_buf_size = Number(argv_buf_size);
|
|
1350
|
+
if (argc === 0 || argv_buf_size === 0) {
|
|
1351
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1352
|
+
}
|
|
1353
|
+
const { view } = getMemory(this);
|
|
1354
|
+
const wasi = _wasi.get(this);
|
|
1355
|
+
const args = wasi.args;
|
|
1356
|
+
view.setUint32(argc, args.length, true);
|
|
1357
|
+
view.setUint32(argv_buf_size, encoder.encode(args.join('\0') + '\0').length, true);
|
|
1358
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1359
|
+
});
|
|
1360
|
+
this.environ_get = syscallWrap(this, 'environ_get', function (environ, environ_buf) {
|
|
1361
|
+
environ = Number(environ);
|
|
1362
|
+
environ_buf = Number(environ_buf);
|
|
1363
|
+
if (environ === 0 || environ_buf === 0) {
|
|
1364
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1365
|
+
}
|
|
1366
|
+
const { HEAPU8, view } = getMemory(this);
|
|
1367
|
+
const wasi = _wasi.get(this);
|
|
1368
|
+
const env = wasi.env;
|
|
1369
|
+
for (let i = 0; i < env.length; ++i) {
|
|
1370
|
+
const pair = env[i];
|
|
1371
|
+
view.setInt32(environ, environ_buf, true);
|
|
1372
|
+
environ += 4;
|
|
1373
|
+
const data = encoder.encode(pair + '\0');
|
|
1374
|
+
HEAPU8.set(data, environ_buf);
|
|
1375
|
+
environ_buf += data.length;
|
|
1376
|
+
}
|
|
1377
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1378
|
+
});
|
|
1379
|
+
this.environ_sizes_get = syscallWrap(this, 'environ_sizes_get', function (len, buflen) {
|
|
1380
|
+
len = Number(len);
|
|
1381
|
+
buflen = Number(buflen);
|
|
1382
|
+
if (len === 0 || buflen === 0) {
|
|
1383
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1384
|
+
}
|
|
1385
|
+
const { view } = getMemory(this);
|
|
1386
|
+
const wasi = _wasi.get(this);
|
|
1387
|
+
view.setUint32(len, wasi.env.length, true);
|
|
1388
|
+
view.setUint32(buflen, encoder.encode(wasi.env.join('\0') + '\0').length, true);
|
|
1389
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1390
|
+
});
|
|
1391
|
+
this.clock_res_get = syscallWrap(this, 'clock_res_get', function (id, resolution) {
|
|
1392
|
+
resolution = Number(resolution);
|
|
1393
|
+
if (resolution === 0) {
|
|
1394
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1395
|
+
}
|
|
1396
|
+
const { view } = getMemory(this);
|
|
1397
|
+
switch (id) {
|
|
1398
|
+
case 0 /* WasiClockid.REALTIME */:
|
|
1399
|
+
view.setBigUint64(resolution, BigInt(1000000), true);
|
|
1400
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1401
|
+
case 1 /* WasiClockid.MONOTONIC */:
|
|
1402
|
+
case 2 /* WasiClockid.PROCESS_CPUTIME_ID */:
|
|
1403
|
+
case 3 /* WasiClockid.THREAD_CPUTIME_ID */:
|
|
1404
|
+
view.setBigUint64(resolution, BigInt(1000), true);
|
|
1405
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1406
|
+
default: return 28 /* WasiErrno.EINVAL */;
|
|
1407
|
+
}
|
|
1408
|
+
});
|
|
1409
|
+
this.clock_time_get = syscallWrap(this, 'clock_time_get', function (id, _percision, time) {
|
|
1410
|
+
time = Number(time);
|
|
1411
|
+
if (time === 0) {
|
|
1412
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1413
|
+
}
|
|
1414
|
+
const { view } = getMemory(this);
|
|
1415
|
+
switch (id) {
|
|
1416
|
+
case 0 /* WasiClockid.REALTIME */:
|
|
1417
|
+
view.setBigUint64(time, BigInt(Date.now()) * BigInt(1000000), true);
|
|
1418
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1419
|
+
case 1 /* WasiClockid.MONOTONIC */:
|
|
1420
|
+
case 2 /* WasiClockid.PROCESS_CPUTIME_ID */:
|
|
1421
|
+
case 3 /* WasiClockid.THREAD_CPUTIME_ID */: {
|
|
1422
|
+
const t = performance.now() / 1000;
|
|
1423
|
+
const s = Math.trunc(t);
|
|
1424
|
+
const ms = Math.floor((t - s) * 1000);
|
|
1425
|
+
const result = BigInt(s) * BigInt(1000000000) + BigInt(ms) * BigInt(1000000);
|
|
1426
|
+
view.setBigUint64(time, result, true);
|
|
1427
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1428
|
+
}
|
|
1429
|
+
default: return 28 /* WasiErrno.EINVAL */;
|
|
1430
|
+
}
|
|
1431
|
+
});
|
|
1432
|
+
this.fd_advise = syscallWrap(this, 'fd_advise', function (_fd, _offset, _len, _advice) {
|
|
1433
|
+
return 52 /* WasiErrno.ENOSYS */;
|
|
1434
|
+
});
|
|
1435
|
+
this.fd_fdstat_get = syscallWrap(this, 'fd_fdstat_get', function (fd, fdstat) {
|
|
1436
|
+
fdstat = Number(fdstat);
|
|
1437
|
+
if (fdstat === 0) {
|
|
1438
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1439
|
+
}
|
|
1440
|
+
const wasi = _wasi.get(this);
|
|
1441
|
+
const fileDescriptor = wasi.fds.get(fd, BigInt(0), BigInt(0));
|
|
1442
|
+
const { view } = getMemory(this);
|
|
1443
|
+
view.setUint16(fdstat, fileDescriptor.type, true);
|
|
1444
|
+
view.setUint16(fdstat + 2, 0, true);
|
|
1445
|
+
view.setBigUint64(fdstat + 8, fileDescriptor.rightsBase, true);
|
|
1446
|
+
view.setBigUint64(fdstat + 16, fileDescriptor.rightsInheriting, true);
|
|
1447
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1448
|
+
});
|
|
1449
|
+
this.fd_fdstat_set_flags = syscallWrap(this, 'fd_fdstat_set_flags', function (_fd, _flags) {
|
|
1450
|
+
return 52 /* WasiErrno.ENOSYS */;
|
|
1451
|
+
});
|
|
1452
|
+
this.fd_fdstat_set_rights = syscallWrap(this, 'fd_fdstat_set_rights', function (fd, rightsBase, rightsInheriting) {
|
|
1453
|
+
const wasi = _wasi.get(this);
|
|
1454
|
+
const fileDescriptor = wasi.fds.get(fd, BigInt(0), BigInt(0));
|
|
1455
|
+
if ((rightsBase | fileDescriptor.rightsBase) > fileDescriptor.rightsBase) {
|
|
1456
|
+
return 76 /* WasiErrno.ENOTCAPABLE */;
|
|
1457
|
+
}
|
|
1458
|
+
if ((rightsInheriting | fileDescriptor.rightsInheriting) >
|
|
1459
|
+
fileDescriptor.rightsInheriting) {
|
|
1460
|
+
return 76 /* WasiErrno.ENOTCAPABLE */;
|
|
1461
|
+
}
|
|
1462
|
+
fileDescriptor.rightsBase = rightsBase;
|
|
1463
|
+
fileDescriptor.rightsInheriting = rightsInheriting;
|
|
1464
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1465
|
+
});
|
|
1466
|
+
this.fd_prestat_get = syscallWrap(this, 'fd_prestat_get', function (fd, prestat) {
|
|
1467
|
+
prestat = Number(prestat);
|
|
1468
|
+
if (prestat === 0) {
|
|
1469
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1470
|
+
}
|
|
1471
|
+
const wasi = _wasi.get(this);
|
|
1472
|
+
let fileDescriptor;
|
|
1473
|
+
try {
|
|
1474
|
+
fileDescriptor = wasi.fds.get(fd, BigInt(0), BigInt(0));
|
|
1475
|
+
}
|
|
1476
|
+
catch (err) {
|
|
1477
|
+
if (err instanceof WasiError)
|
|
1478
|
+
return err.errno;
|
|
1479
|
+
throw err;
|
|
1480
|
+
}
|
|
1481
|
+
if (fileDescriptor.preopen !== 1)
|
|
1482
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1483
|
+
const { view } = getMemory(this);
|
|
1484
|
+
// preopen type is dir(0)
|
|
1485
|
+
view.setUint32(prestat, 0, true);
|
|
1486
|
+
view.setUint32(prestat + 4, encoder.encode(fileDescriptor.path).length, true);
|
|
1487
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1488
|
+
});
|
|
1489
|
+
this.fd_prestat_dir_name = syscallWrap(this, 'fd_prestat_dir_name', function (fd, path, path_len) {
|
|
1490
|
+
path = Number(path);
|
|
1491
|
+
path_len = Number(path_len);
|
|
1492
|
+
if (path === 0) {
|
|
1493
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1494
|
+
}
|
|
1495
|
+
const wasi = _wasi.get(this);
|
|
1496
|
+
const fileDescriptor = wasi.fds.get(fd, BigInt(0), BigInt(0));
|
|
1497
|
+
if (fileDescriptor.preopen !== 1)
|
|
1498
|
+
return 8 /* WasiErrno.EBADF */;
|
|
1499
|
+
const buffer = encoder.encode(fileDescriptor.path);
|
|
1500
|
+
const size = buffer.length;
|
|
1501
|
+
if (size > path_len)
|
|
1502
|
+
return 42 /* WasiErrno.ENOBUFS */;
|
|
1503
|
+
const { HEAPU8 } = getMemory(this);
|
|
1504
|
+
HEAPU8.set(buffer, path);
|
|
1505
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1506
|
+
});
|
|
1507
|
+
this.fd_seek = syscallWrap(this, 'fd_seek', function (fd, offset, whence, newOffset) {
|
|
1508
|
+
newOffset = Number(newOffset);
|
|
1509
|
+
if (newOffset === 0) {
|
|
1510
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1511
|
+
}
|
|
1512
|
+
if (fd === 0 || fd === 1 || fd === 2)
|
|
1513
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1514
|
+
const wasi = _wasi.get(this);
|
|
1515
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_SEEK, BigInt(0));
|
|
1516
|
+
const r = fileDescriptor.seek(offset, whence);
|
|
1517
|
+
const { view } = getMemory(this);
|
|
1518
|
+
view.setBigUint64(newOffset, r, true);
|
|
1519
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1520
|
+
});
|
|
1521
|
+
this.fd_tell = syscallWrap(this, 'fd_tell', function (fd, offset) {
|
|
1522
|
+
const wasi = _wasi.get(this);
|
|
1523
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_TELL, BigInt(0));
|
|
1524
|
+
const pos = BigInt(fileDescriptor.pos);
|
|
1525
|
+
const { view } = getMemory(this);
|
|
1526
|
+
view.setBigUint64(Number(offset), pos, true);
|
|
1527
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1528
|
+
});
|
|
1529
|
+
this.poll_oneoff = syscallWrap(this, 'poll_oneoff', function (in_ptr, out_ptr, nsubscriptions, nevents) {
|
|
1530
|
+
in_ptr = Number(in_ptr);
|
|
1531
|
+
out_ptr = Number(out_ptr);
|
|
1532
|
+
nevents = Number(nevents);
|
|
1533
|
+
nsubscriptions = Number(nsubscriptions);
|
|
1534
|
+
nsubscriptions = nsubscriptions >>> 0;
|
|
1535
|
+
if (in_ptr === 0 || out_ptr === 0 || nsubscriptions === 0 || nevents === 0) {
|
|
1536
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1537
|
+
}
|
|
1538
|
+
const { view } = getMemory(this);
|
|
1539
|
+
view.setUint32(nevents, 0, true);
|
|
1540
|
+
let i = 0;
|
|
1541
|
+
let timer_userdata = BigInt(0);
|
|
1542
|
+
let cur_timeout = BigInt(0);
|
|
1543
|
+
let has_timeout = 0;
|
|
1544
|
+
let min_timeout = BigInt(0);
|
|
1545
|
+
let sub;
|
|
1546
|
+
const subscriptions = Array(nsubscriptions);
|
|
1547
|
+
for (i = 0; i < nsubscriptions; i++) {
|
|
1548
|
+
sub = in_ptr + i * 48;
|
|
1549
|
+
const userdata = view.getBigUint64(sub, true);
|
|
1550
|
+
const type = view.getUint8(sub + 8);
|
|
1551
|
+
const clockIdOrFd = view.getUint32(sub + 16, true);
|
|
1552
|
+
const timeout = view.getBigUint64(sub + 24, true);
|
|
1553
|
+
const precision = view.getBigUint64(sub + 32, true);
|
|
1554
|
+
const flags = view.getUint16(sub + 40, true);
|
|
1555
|
+
subscriptions[i] = {
|
|
1556
|
+
userdata,
|
|
1557
|
+
type,
|
|
1558
|
+
u: {
|
|
1559
|
+
clock: {
|
|
1560
|
+
clock_id: clockIdOrFd,
|
|
1561
|
+
timeout,
|
|
1562
|
+
precision,
|
|
1563
|
+
flags
|
|
1564
|
+
},
|
|
1565
|
+
fd_readwrite: {
|
|
1566
|
+
fd: clockIdOrFd
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
};
|
|
1570
|
+
}
|
|
1571
|
+
const fdevents = [];
|
|
1572
|
+
for (i = 0; i < nsubscriptions; i++) {
|
|
1573
|
+
sub = subscriptions[i];
|
|
1574
|
+
switch (sub.type) {
|
|
1575
|
+
case 0 /* WasiEventType.CLOCK */: {
|
|
1576
|
+
if (sub.u.clock.flags === 1 /* WasiSubclockflags.ABSTIME */) {
|
|
1577
|
+
/* Convert absolute time to relative delay. */
|
|
1578
|
+
const now = BigInt(Date.now()) * BigInt(1000000);
|
|
1579
|
+
cur_timeout = sub.u.clock.timeout - now;
|
|
1580
|
+
}
|
|
1581
|
+
else {
|
|
1582
|
+
cur_timeout = sub.u.clock.timeout;
|
|
1583
|
+
}
|
|
1584
|
+
if (has_timeout === 0 || cur_timeout < min_timeout) {
|
|
1585
|
+
min_timeout = cur_timeout;
|
|
1586
|
+
timer_userdata = sub.userdata;
|
|
1587
|
+
has_timeout = 1;
|
|
1588
|
+
}
|
|
1589
|
+
break;
|
|
1590
|
+
}
|
|
1591
|
+
case 1 /* WasiEventType.FD_READ */:
|
|
1592
|
+
case 2 /* WasiEventType.FD_WRITE */:
|
|
1593
|
+
fdevents.push(sub);
|
|
1594
|
+
break;
|
|
1595
|
+
default: return 28 /* WasiErrno.EINVAL */;
|
|
1596
|
+
}
|
|
1597
|
+
}
|
|
1598
|
+
if (fdevents.length > 0) {
|
|
1599
|
+
for (i = 0; i < fdevents.length; i++) {
|
|
1600
|
+
const fdevent = fdevents[i];
|
|
1601
|
+
const event = out_ptr + 32 * i;
|
|
1602
|
+
view.setBigUint64(event, fdevent.userdata, true);
|
|
1603
|
+
view.setUint32(event + 8, 52 /* WasiErrno.ENOSYS */, true);
|
|
1604
|
+
view.setUint32(event + 12, fdevent.type, true);
|
|
1605
|
+
view.setBigUint64(event + 16, BigInt(0), true);
|
|
1606
|
+
view.setUint16(event + 24, 0, true);
|
|
1607
|
+
view.setUint32(nevents, 1, true);
|
|
1608
|
+
}
|
|
1609
|
+
view.setUint32(nevents, fdevents.length, true);
|
|
1610
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1611
|
+
}
|
|
1612
|
+
if (has_timeout) {
|
|
1613
|
+
const delay = Number(min_timeout / BigInt(1000000));
|
|
1614
|
+
// if (isMainThread || typeof SharedArrayBuffer !== 'function') {
|
|
1615
|
+
sleepBreakIf(delay, () => false);
|
|
1616
|
+
// } else {
|
|
1617
|
+
// const buf = new SharedArrayBuffer(4)
|
|
1618
|
+
// const arr = new Int32Array(buf)
|
|
1619
|
+
// postMsg({
|
|
1620
|
+
// __tybys_wasm_util_wasi__: {
|
|
1621
|
+
// type: 'set-timeout',
|
|
1622
|
+
// payload: {
|
|
1623
|
+
// buffer: buf,
|
|
1624
|
+
// delay
|
|
1625
|
+
// }
|
|
1626
|
+
// }
|
|
1627
|
+
// })
|
|
1628
|
+
// Atomics.wait(arr, 0, 0)
|
|
1629
|
+
// }
|
|
1630
|
+
const event = out_ptr;
|
|
1631
|
+
view.setBigUint64(event, timer_userdata, true);
|
|
1632
|
+
view.setUint32(event + 8, 0 /* WasiErrno.ESUCCESS */, true);
|
|
1633
|
+
view.setUint32(event + 12, 0 /* WasiEventType.CLOCK */, true);
|
|
1634
|
+
view.setUint32(nevents, 1, true);
|
|
1635
|
+
}
|
|
1636
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1637
|
+
});
|
|
1638
|
+
this.proc_exit = syscallWrap(this, 'proc_exit', function (rval) {
|
|
1639
|
+
if ((typeof process === 'object') && (process !== null) && (typeof process.exit === 'function')) {
|
|
1640
|
+
process.exit(rval);
|
|
1641
|
+
}
|
|
1642
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1643
|
+
});
|
|
1644
|
+
this.proc_raise = syscallWrap(this, 'proc_raise', function (_sig) {
|
|
1645
|
+
return 52 /* WasiErrno.ENOSYS */;
|
|
1646
|
+
});
|
|
1647
|
+
this.sched_yield = syscallWrap(this, 'sched_yield', function () {
|
|
1648
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1649
|
+
});
|
|
1650
|
+
this.random_get = typeof crypto !== 'undefined' && typeof crypto.getRandomValues === 'function'
|
|
1651
|
+
? syscallWrap(this, 'random_get', function (buf, buf_len) {
|
|
1652
|
+
buf = Number(buf);
|
|
1653
|
+
if (buf === 0) {
|
|
1654
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1655
|
+
}
|
|
1656
|
+
buf_len = Number(buf_len);
|
|
1657
|
+
const { HEAPU8, view } = getMemory(this);
|
|
1658
|
+
if ((typeof SharedArrayBuffer === 'function' && HEAPU8.buffer instanceof SharedArrayBuffer) ||
|
|
1659
|
+
(Object.prototype.toString.call(HEAPU8.buffer) === '[object SharedArrayBuffer]')) {
|
|
1660
|
+
for (let i = buf; i < buf + buf_len; ++i) {
|
|
1661
|
+
view.setUint8(i, Math.floor(Math.random() * 256));
|
|
1662
|
+
}
|
|
1663
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1664
|
+
}
|
|
1665
|
+
let pos;
|
|
1666
|
+
const stride = 65536;
|
|
1667
|
+
for (pos = 0; pos + stride < buf_len; pos += stride) {
|
|
1668
|
+
crypto.getRandomValues(HEAPU8.subarray(buf + pos, buf + pos + stride));
|
|
1669
|
+
}
|
|
1670
|
+
crypto.getRandomValues(HEAPU8.subarray(buf + pos, buf + buf_len));
|
|
1671
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1672
|
+
})
|
|
1673
|
+
: syscallWrap(this, 'random_get', function (buf, buf_len) {
|
|
1674
|
+
buf = Number(buf);
|
|
1675
|
+
if (buf === 0) {
|
|
1676
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1677
|
+
}
|
|
1678
|
+
buf_len = Number(buf_len);
|
|
1679
|
+
const { view } = getMemory(this);
|
|
1680
|
+
for (let i = buf; i < buf + buf_len; ++i) {
|
|
1681
|
+
view.setUint8(i, Math.floor(Math.random() * 256));
|
|
1682
|
+
}
|
|
1683
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1684
|
+
});
|
|
1685
|
+
this.sock_recv = syscallWrap(this, 'sock_recv', function () {
|
|
1686
|
+
return 58 /* WasiErrno.ENOTSUP */;
|
|
1687
|
+
});
|
|
1688
|
+
this.sock_send = syscallWrap(this, 'sock_send', function () {
|
|
1689
|
+
return 58 /* WasiErrno.ENOTSUP */;
|
|
1690
|
+
});
|
|
1691
|
+
this.sock_shutdown = syscallWrap(this, 'sock_shutdown', function () {
|
|
1692
|
+
return 58 /* WasiErrno.ENOTSUP */;
|
|
1693
|
+
});
|
|
1694
|
+
this.sock_accept = syscallWrap(this, 'sock_accept', function () {
|
|
1695
|
+
return 58 /* WasiErrno.ENOTSUP */;
|
|
1696
|
+
});
|
|
1697
|
+
_wasi.set(this, {
|
|
1698
|
+
fds,
|
|
1699
|
+
args,
|
|
1700
|
+
env
|
|
1701
|
+
});
|
|
1702
|
+
if (fs)
|
|
1703
|
+
_fs.set(this, fs);
|
|
1704
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
1705
|
+
const _this = this;
|
|
1706
|
+
function defineImport(name, syncVersion, asyncVersion, parameterType, returnType) {
|
|
1707
|
+
if (asyncFs) {
|
|
1708
|
+
if (asyncify) {
|
|
1709
|
+
_this[name] = asyncify.wrapImportFunction(syscallWrap(_this, name, asyncVersion));
|
|
1710
|
+
}
|
|
1711
|
+
else {
|
|
1712
|
+
_this[name] = wrapAsyncImport(syscallWrap(_this, name, asyncVersion), parameterType, returnType);
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
else {
|
|
1716
|
+
_this[name] = syscallWrap(_this, name, syncVersion);
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
defineImport('fd_allocate', function fd_allocate(fd, offset, len) {
|
|
1720
|
+
const wasi = _wasi.get(this);
|
|
1721
|
+
const fs = getFs(this);
|
|
1722
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_ALLOCATE, BigInt(0));
|
|
1723
|
+
const stat = fs.fstatSync(fileDescriptor.fd, { bigint: true });
|
|
1724
|
+
if (stat.size < offset + len) {
|
|
1725
|
+
fs.ftruncateSync(fileDescriptor.fd, Number(offset + len));
|
|
1726
|
+
}
|
|
1727
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1728
|
+
}, async function fd_allocate(fd, offset, len) {
|
|
1729
|
+
const wasi = _wasi.get(this);
|
|
1730
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_ALLOCATE, BigInt(0));
|
|
1731
|
+
const h = fileDescriptor.fd;
|
|
1732
|
+
const stat = await h.stat({ bigint: true });
|
|
1733
|
+
if (stat.size < offset + len) {
|
|
1734
|
+
await h.truncate(Number(offset + len));
|
|
1735
|
+
}
|
|
1736
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1737
|
+
}, ['i32', 'i64', 'f64'], ['i32']);
|
|
1738
|
+
defineImport('fd_close', function fd_close(fd) {
|
|
1739
|
+
const wasi = _wasi.get(this);
|
|
1740
|
+
const fileDescriptor = wasi.fds.get(fd, BigInt(0), BigInt(0));
|
|
1741
|
+
const fs = getFs(this);
|
|
1742
|
+
fs.closeSync(fileDescriptor.fd);
|
|
1743
|
+
wasi.fds.remove(fd);
|
|
1744
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1745
|
+
}, async function fd_close(fd) {
|
|
1746
|
+
const wasi = _wasi.get(this);
|
|
1747
|
+
const fileDescriptor = wasi.fds.get(fd, BigInt(0), BigInt(0));
|
|
1748
|
+
await fileDescriptor.fd.close();
|
|
1749
|
+
wasi.fds.remove(fd);
|
|
1750
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1751
|
+
}, ['i32'], ['i32']);
|
|
1752
|
+
defineImport('fd_datasync', function fd_datasync(fd) {
|
|
1753
|
+
const wasi = _wasi.get(this);
|
|
1754
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_DATASYNC, BigInt(0));
|
|
1755
|
+
const fs = getFs(this);
|
|
1756
|
+
fs.fdatasyncSync(fileDescriptor.fd);
|
|
1757
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1758
|
+
}, async function fd_datasync(fd) {
|
|
1759
|
+
const wasi = _wasi.get(this);
|
|
1760
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_DATASYNC, BigInt(0));
|
|
1761
|
+
await fileDescriptor.fd.datasync();
|
|
1762
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1763
|
+
}, ['i32'], ['i32']);
|
|
1764
|
+
defineImport('fd_filestat_get', function fd_filestat_get(fd, buf) {
|
|
1765
|
+
buf = Number(buf);
|
|
1766
|
+
if (buf === 0)
|
|
1767
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1768
|
+
const wasi = _wasi.get(this);
|
|
1769
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_FILESTAT_GET, BigInt(0));
|
|
1770
|
+
const fs = getFs(this);
|
|
1771
|
+
const stat = fs.fstatSync(fileDescriptor.fd, { bigint: true });
|
|
1772
|
+
const { view } = getMemory(this);
|
|
1773
|
+
toFileStat(view, buf, stat);
|
|
1774
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1775
|
+
}, async function fd_filestat_get(fd, buf) {
|
|
1776
|
+
buf = Number(buf);
|
|
1777
|
+
if (buf === 0)
|
|
1778
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1779
|
+
const wasi = _wasi.get(this);
|
|
1780
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_FILESTAT_GET, BigInt(0));
|
|
1781
|
+
const h = fileDescriptor.fd;
|
|
1782
|
+
const stat = await h.stat({ bigint: true });
|
|
1783
|
+
const { view } = getMemory(this);
|
|
1784
|
+
toFileStat(view, buf, stat);
|
|
1785
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1786
|
+
}, ['i32', 'i32'], ['i32']);
|
|
1787
|
+
defineImport('fd_filestat_set_size', function fd_filestat_set_size(fd, size) {
|
|
1788
|
+
const wasi = _wasi.get(this);
|
|
1789
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_FILESTAT_SET_SIZE, BigInt(0));
|
|
1790
|
+
const fs = getFs(this);
|
|
1791
|
+
fs.ftruncateSync(fileDescriptor.fd, Number(size));
|
|
1792
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1793
|
+
}, async function fd_filestat_set_size(fd, size) {
|
|
1794
|
+
const wasi = _wasi.get(this);
|
|
1795
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_FILESTAT_SET_SIZE, BigInt(0));
|
|
1796
|
+
const h = fileDescriptor.fd;
|
|
1797
|
+
await h.truncate(Number(size));
|
|
1798
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1799
|
+
}, ['i32', 'i64'], ['i32']);
|
|
1800
|
+
function fdFilestatGetTimes(fd, atim, mtim, flags) {
|
|
1801
|
+
const wasi = _wasi.get(this);
|
|
1802
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_FILESTAT_SET_TIMES, BigInt(0));
|
|
1803
|
+
if ((flags & 2 /* WasiFstFlag.SET_ATIM_NOW */) === 2 /* WasiFstFlag.SET_ATIM_NOW */) {
|
|
1804
|
+
atim = BigInt(Date.now() * 1000000);
|
|
1805
|
+
}
|
|
1806
|
+
if ((flags & 8 /* WasiFstFlag.SET_MTIM_NOW */) === 8 /* WasiFstFlag.SET_MTIM_NOW */) {
|
|
1807
|
+
mtim = BigInt(Date.now() * 1000000);
|
|
1808
|
+
}
|
|
1809
|
+
return { fileDescriptor, atim, mtim };
|
|
1810
|
+
}
|
|
1811
|
+
defineImport('fd_filestat_set_times', function fd_filestat_set_times(fd, atim, mtim, flags) {
|
|
1812
|
+
if (validateFstFlagsOrReturn(flags)) {
|
|
1813
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1814
|
+
}
|
|
1815
|
+
const { fileDescriptor, atim: atimRes, mtim: mtimRes } = fdFilestatGetTimes.call(this, fd, atim, mtim, flags);
|
|
1816
|
+
const fs = getFs(this);
|
|
1817
|
+
fs.futimesSync(fileDescriptor.fd, Number(atimRes), Number(mtimRes));
|
|
1818
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1819
|
+
}, async function fd_filestat_set_times(fd, atim, mtim, flags) {
|
|
1820
|
+
if (validateFstFlagsOrReturn(flags)) {
|
|
1821
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1822
|
+
}
|
|
1823
|
+
const { fileDescriptor, atim: atimRes, mtim: mtimRes } = fdFilestatGetTimes.call(this, fd, atim, mtim, flags);
|
|
1824
|
+
const h = fileDescriptor.fd;
|
|
1825
|
+
await h.utimes(Number(atimRes), Number(mtimRes));
|
|
1826
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1827
|
+
}, ['i32', 'i64', 'i64', 'i32'], ['i32']);
|
|
1828
|
+
defineImport('fd_pread', function fd_pread(fd, iovs, iovslen, offset, size) {
|
|
1829
|
+
iovs = Number(iovs);
|
|
1830
|
+
size = Number(size);
|
|
1831
|
+
if ((iovs === 0 && iovslen) || size === 0 || offset > INT64_MAX) {
|
|
1832
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1833
|
+
}
|
|
1834
|
+
const { HEAPU8, view } = getMemory(this);
|
|
1835
|
+
const wasi = _wasi.get(this);
|
|
1836
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_READ | WasiRights.FD_SEEK, BigInt(0));
|
|
1837
|
+
if (!iovslen) {
|
|
1838
|
+
view.setUint32(size, 0, true);
|
|
1839
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1840
|
+
}
|
|
1841
|
+
let totalSize = 0;
|
|
1842
|
+
const ioVecs = Array.from({ length: Number(iovslen) }, (_, i) => {
|
|
1843
|
+
const offset = iovs + (i * 8);
|
|
1844
|
+
const buf = view.getInt32(offset, true);
|
|
1845
|
+
const bufLen = view.getUint32(offset + 4, true);
|
|
1846
|
+
totalSize += bufLen;
|
|
1847
|
+
return HEAPU8.subarray(buf, buf + bufLen);
|
|
1848
|
+
});
|
|
1849
|
+
let nread = 0;
|
|
1850
|
+
const buffer = (() => {
|
|
1851
|
+
try {
|
|
1852
|
+
return new Uint8Array(new SharedArrayBuffer(totalSize));
|
|
1853
|
+
}
|
|
1854
|
+
catch (_) {
|
|
1855
|
+
return new Uint8Array(totalSize);
|
|
1856
|
+
}
|
|
1857
|
+
})();
|
|
1858
|
+
buffer._isBuffer = true;
|
|
1859
|
+
const fs = getFs(this);
|
|
1860
|
+
const bytesRead = fs.readSync(fileDescriptor.fd, buffer, 0, buffer.length, Number(offset));
|
|
1861
|
+
nread = buffer ? copyMemory(ioVecs, buffer.subarray(0, bytesRead)) : 0;
|
|
1862
|
+
view.setUint32(size, nread, true);
|
|
1863
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1864
|
+
}, async function (fd, iovs, iovslen, offset, size) {
|
|
1865
|
+
iovs = Number(iovs);
|
|
1866
|
+
size = Number(size);
|
|
1867
|
+
if ((iovs === 0 && iovslen) || size === 0 || offset > INT64_MAX) {
|
|
1868
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1869
|
+
}
|
|
1870
|
+
const { HEAPU8, view } = getMemory(this);
|
|
1871
|
+
const wasi = _wasi.get(this);
|
|
1872
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_READ | WasiRights.FD_SEEK, BigInt(0));
|
|
1873
|
+
if (!iovslen) {
|
|
1874
|
+
view.setUint32(size, 0, true);
|
|
1875
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1876
|
+
}
|
|
1877
|
+
let totalSize = 0;
|
|
1878
|
+
const ioVecs = Array.from({ length: Number(iovslen) }, (_, i) => {
|
|
1879
|
+
const offset = iovs + (i * 8);
|
|
1880
|
+
const buf = view.getInt32(offset, true);
|
|
1881
|
+
const bufLen = view.getUint32(offset + 4, true);
|
|
1882
|
+
totalSize += bufLen;
|
|
1883
|
+
return HEAPU8.subarray(buf, buf + bufLen);
|
|
1884
|
+
});
|
|
1885
|
+
let nread = 0;
|
|
1886
|
+
const buffer = new Uint8Array(totalSize);
|
|
1887
|
+
buffer._isBuffer = true;
|
|
1888
|
+
const { bytesRead } = await fileDescriptor.fd.read(buffer, 0, buffer.length, Number(offset));
|
|
1889
|
+
nread = buffer ? copyMemory(ioVecs, buffer.subarray(0, bytesRead)) : 0;
|
|
1890
|
+
view.setUint32(size, nread, true);
|
|
1891
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1892
|
+
}, ['i32', 'i32', 'i32', 'i64', 'i32'], ['i32']);
|
|
1893
|
+
defineImport('fd_pwrite', function fd_pwrite(fd, iovs, iovslen, offset, size) {
|
|
1894
|
+
iovs = Number(iovs);
|
|
1895
|
+
size = Number(size);
|
|
1896
|
+
if ((iovs === 0 && iovslen) || size === 0 || offset > INT64_MAX) {
|
|
1897
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1898
|
+
}
|
|
1899
|
+
const { HEAPU8, view } = getMemory(this);
|
|
1900
|
+
const wasi = _wasi.get(this);
|
|
1901
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_WRITE | WasiRights.FD_SEEK, BigInt(0));
|
|
1902
|
+
if (!iovslen) {
|
|
1903
|
+
view.setUint32(size, 0, true);
|
|
1904
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1905
|
+
}
|
|
1906
|
+
const buffer = concatBuffer(Array.from({ length: Number(iovslen) }, (_, i) => {
|
|
1907
|
+
const offset = iovs + (i * 8);
|
|
1908
|
+
const buf = view.getInt32(offset, true);
|
|
1909
|
+
const bufLen = view.getUint32(offset + 4, true);
|
|
1910
|
+
return HEAPU8.subarray(buf, buf + bufLen);
|
|
1911
|
+
}));
|
|
1912
|
+
const fs = getFs(this);
|
|
1913
|
+
const nwritten = fs.writeSync(fileDescriptor.fd, buffer, 0, buffer.length, Number(offset));
|
|
1914
|
+
view.setUint32(size, nwritten, true);
|
|
1915
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1916
|
+
}, async function fd_pwrite(fd, iovs, iovslen, offset, size) {
|
|
1917
|
+
iovs = Number(iovs);
|
|
1918
|
+
size = Number(size);
|
|
1919
|
+
if ((iovs === 0 && iovslen) || size === 0 || offset > INT64_MAX) {
|
|
1920
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1921
|
+
}
|
|
1922
|
+
const { HEAPU8, view } = getMemory(this);
|
|
1923
|
+
const wasi = _wasi.get(this);
|
|
1924
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_WRITE | WasiRights.FD_SEEK, BigInt(0));
|
|
1925
|
+
if (!iovslen) {
|
|
1926
|
+
view.setUint32(size, 0, true);
|
|
1927
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1928
|
+
}
|
|
1929
|
+
const buffer = concatBuffer(Array.from({ length: Number(iovslen) }, (_, i) => {
|
|
1930
|
+
const offset = iovs + (i * 8);
|
|
1931
|
+
const buf = view.getInt32(offset, true);
|
|
1932
|
+
const bufLen = view.getUint32(offset + 4, true);
|
|
1933
|
+
return HEAPU8.subarray(buf, buf + bufLen);
|
|
1934
|
+
}));
|
|
1935
|
+
const { bytesWritten } = await fileDescriptor.fd.write(buffer, 0, buffer.length, Number(offset));
|
|
1936
|
+
view.setUint32(size, bytesWritten, true);
|
|
1937
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1938
|
+
}, ['i32', 'i32', 'i32', 'i64', 'i32'], ['i32']);
|
|
1939
|
+
defineImport('fd_read', function fd_read(fd, iovs, iovslen, size) {
|
|
1940
|
+
iovs = Number(iovs);
|
|
1941
|
+
size = Number(size);
|
|
1942
|
+
if ((iovs === 0 && iovslen) || size === 0) {
|
|
1943
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1944
|
+
}
|
|
1945
|
+
const { HEAPU8, view } = getMemory(this);
|
|
1946
|
+
const wasi = _wasi.get(this);
|
|
1947
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_READ, BigInt(0));
|
|
1948
|
+
if (!iovslen) {
|
|
1949
|
+
view.setUint32(size, 0, true);
|
|
1950
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1951
|
+
}
|
|
1952
|
+
let totalSize = 0;
|
|
1953
|
+
const ioVecs = Array.from({ length: Number(iovslen) }, (_, i) => {
|
|
1954
|
+
const offset = iovs + (i * 8);
|
|
1955
|
+
const buf = view.getInt32(offset, true);
|
|
1956
|
+
const bufLen = view.getUint32(offset + 4, true);
|
|
1957
|
+
totalSize += bufLen;
|
|
1958
|
+
return HEAPU8.subarray(buf, buf + bufLen);
|
|
1959
|
+
});
|
|
1960
|
+
let buffer;
|
|
1961
|
+
let nread = 0;
|
|
1962
|
+
if (fd === 0) {
|
|
1963
|
+
if (typeof window === 'undefined' || typeof window.prompt !== 'function') {
|
|
1964
|
+
return 58 /* WasiErrno.ENOTSUP */;
|
|
1965
|
+
}
|
|
1966
|
+
buffer = readStdin();
|
|
1967
|
+
nread = buffer ? copyMemory(ioVecs, buffer) : 0;
|
|
1968
|
+
}
|
|
1969
|
+
else {
|
|
1970
|
+
buffer = (() => {
|
|
1971
|
+
try {
|
|
1972
|
+
return new Uint8Array(new SharedArrayBuffer(totalSize));
|
|
1973
|
+
}
|
|
1974
|
+
catch (_) {
|
|
1975
|
+
return new Uint8Array(totalSize);
|
|
1976
|
+
}
|
|
1977
|
+
})();
|
|
1978
|
+
buffer._isBuffer = true;
|
|
1979
|
+
const fs = getFs(this);
|
|
1980
|
+
const bytesRead = fs.readSync(fileDescriptor.fd, buffer, 0, buffer.length, Number(fileDescriptor.pos));
|
|
1981
|
+
nread = buffer ? copyMemory(ioVecs, buffer.subarray(0, bytesRead)) : 0;
|
|
1982
|
+
fileDescriptor.pos += BigInt(nread);
|
|
1983
|
+
}
|
|
1984
|
+
view.setUint32(size, nread, true);
|
|
1985
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1986
|
+
}, async function fd_read(fd, iovs, iovslen, size) {
|
|
1987
|
+
iovs = Number(iovs);
|
|
1988
|
+
size = Number(size);
|
|
1989
|
+
if ((iovs === 0 && iovslen) || size === 0) {
|
|
1990
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
1991
|
+
}
|
|
1992
|
+
const { HEAPU8, view } = getMemory(this);
|
|
1993
|
+
const wasi = _wasi.get(this);
|
|
1994
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_READ, BigInt(0));
|
|
1995
|
+
if (!iovslen) {
|
|
1996
|
+
view.setUint32(size, 0, true);
|
|
1997
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
1998
|
+
}
|
|
1999
|
+
let totalSize = 0;
|
|
2000
|
+
const ioVecs = Array.from({ length: Number(iovslen) }, (_, i) => {
|
|
2001
|
+
const offset = iovs + (i * 8);
|
|
2002
|
+
const buf = view.getInt32(offset, true);
|
|
2003
|
+
const bufLen = view.getUint32(offset + 4, true);
|
|
2004
|
+
totalSize += bufLen;
|
|
2005
|
+
return HEAPU8.subarray(buf, buf + bufLen);
|
|
2006
|
+
});
|
|
2007
|
+
let buffer;
|
|
2008
|
+
let nread = 0;
|
|
2009
|
+
if (fd === 0) {
|
|
2010
|
+
if (typeof window === 'undefined' || typeof window.prompt !== 'function') {
|
|
2011
|
+
return 58 /* WasiErrno.ENOTSUP */;
|
|
2012
|
+
}
|
|
2013
|
+
buffer = readStdin();
|
|
2014
|
+
nread = buffer ? copyMemory(ioVecs, buffer) : 0;
|
|
2015
|
+
}
|
|
2016
|
+
else {
|
|
2017
|
+
buffer = new Uint8Array(totalSize);
|
|
2018
|
+
buffer._isBuffer = true;
|
|
2019
|
+
const { bytesRead } = await fileDescriptor.fd.read(buffer, 0, buffer.length, Number(fileDescriptor.pos));
|
|
2020
|
+
nread = buffer ? copyMemory(ioVecs, buffer.subarray(0, bytesRead)) : 0;
|
|
2021
|
+
fileDescriptor.pos += BigInt(nread);
|
|
2022
|
+
}
|
|
2023
|
+
view.setUint32(size, nread, true);
|
|
2024
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2025
|
+
}, ['i32', 'i32', 'i32', 'i32'], ['i32']);
|
|
2026
|
+
defineImport('fd_readdir', function fd_readdir(fd, buf, buf_len, cookie, bufused) {
|
|
2027
|
+
buf = Number(buf);
|
|
2028
|
+
buf_len = Number(buf_len);
|
|
2029
|
+
bufused = Number(bufused);
|
|
2030
|
+
if (buf === 0 || bufused === 0)
|
|
2031
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2032
|
+
const wasi = _wasi.get(this);
|
|
2033
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_READDIR, BigInt(0));
|
|
2034
|
+
const fs = getFs(this);
|
|
2035
|
+
const entries = fs.readdirSync(fileDescriptor.realPath, { withFileTypes: true });
|
|
2036
|
+
const { HEAPU8, view } = getMemory(this);
|
|
2037
|
+
let bufferUsed = 0;
|
|
2038
|
+
for (let i = Number(cookie); i < entries.length; i++) {
|
|
2039
|
+
const nameData = encoder.encode(entries[i].name);
|
|
2040
|
+
const entryInfo = fs.statSync(resolve(fileDescriptor.realPath, entries[i].name), { bigint: true });
|
|
2041
|
+
const entryData = new Uint8Array(24 + nameData.byteLength);
|
|
2042
|
+
const entryView = new DataView(entryData.buffer);
|
|
2043
|
+
entryView.setBigUint64(0, BigInt(i + 1), true);
|
|
2044
|
+
entryView.setBigUint64(8, BigInt(entryInfo.ino ? entryInfo.ino : 0), true);
|
|
2045
|
+
entryView.setUint32(16, nameData.byteLength, true);
|
|
2046
|
+
let type;
|
|
2047
|
+
if (entries[i].isFile()) {
|
|
2048
|
+
type = 4 /* WasiFileType.REGULAR_FILE */;
|
|
2049
|
+
}
|
|
2050
|
+
else if (entries[i].isDirectory()) {
|
|
2051
|
+
type = 3 /* WasiFileType.DIRECTORY */;
|
|
2052
|
+
}
|
|
2053
|
+
else if (entries[i].isSymbolicLink()) {
|
|
2054
|
+
type = 7 /* WasiFileType.SYMBOLIC_LINK */;
|
|
2055
|
+
}
|
|
2056
|
+
else if (entries[i].isCharacterDevice()) {
|
|
2057
|
+
type = 2 /* WasiFileType.CHARACTER_DEVICE */;
|
|
2058
|
+
}
|
|
2059
|
+
else if (entries[i].isBlockDevice()) {
|
|
2060
|
+
type = 1 /* WasiFileType.BLOCK_DEVICE */;
|
|
2061
|
+
}
|
|
2062
|
+
else if (entries[i].isSocket()) {
|
|
2063
|
+
type = 6 /* WasiFileType.SOCKET_STREAM */;
|
|
2064
|
+
}
|
|
2065
|
+
else {
|
|
2066
|
+
type = 0 /* WasiFileType.UNKNOWN */;
|
|
2067
|
+
}
|
|
2068
|
+
entryView.setUint8(20, type);
|
|
2069
|
+
entryData.set(nameData, 24);
|
|
2070
|
+
const data = entryData.slice(0, Math.min(entryData.length, buf_len - bufferUsed));
|
|
2071
|
+
HEAPU8.set(data, buf + bufferUsed);
|
|
2072
|
+
bufferUsed += data.byteLength;
|
|
2073
|
+
}
|
|
2074
|
+
view.setUint32(bufused, bufferUsed, true);
|
|
2075
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2076
|
+
}, async function fd_readdir(fd, buf, buf_len, cookie, bufused) {
|
|
2077
|
+
buf = Number(buf);
|
|
2078
|
+
buf_len = Number(buf_len);
|
|
2079
|
+
bufused = Number(bufused);
|
|
2080
|
+
if (buf === 0 || bufused === 0)
|
|
2081
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2082
|
+
const wasi = _wasi.get(this);
|
|
2083
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_READDIR, BigInt(0));
|
|
2084
|
+
const fs = getFs(this);
|
|
2085
|
+
const entries = await fs.promises.readdir(fileDescriptor.realPath, { withFileTypes: true });
|
|
2086
|
+
const { HEAPU8, view } = getMemory(this);
|
|
2087
|
+
let bufferUsed = 0;
|
|
2088
|
+
for (let i = Number(cookie); i < entries.length; i++) {
|
|
2089
|
+
const nameData = encoder.encode(entries[i].name);
|
|
2090
|
+
const entryInfo = await fs.promises.stat(resolve(fileDescriptor.realPath, entries[i].name), { bigint: true });
|
|
2091
|
+
const entryData = new Uint8Array(24 + nameData.byteLength);
|
|
2092
|
+
const entryView = new DataView(entryData.buffer);
|
|
2093
|
+
entryView.setBigUint64(0, BigInt(i + 1), true);
|
|
2094
|
+
entryView.setBigUint64(8, BigInt(entryInfo.ino ? entryInfo.ino : 0), true);
|
|
2095
|
+
entryView.setUint32(16, nameData.byteLength, true);
|
|
2096
|
+
let type;
|
|
2097
|
+
if (entries[i].isFile()) {
|
|
2098
|
+
type = 4 /* WasiFileType.REGULAR_FILE */;
|
|
2099
|
+
}
|
|
2100
|
+
else if (entries[i].isDirectory()) {
|
|
2101
|
+
type = 3 /* WasiFileType.DIRECTORY */;
|
|
2102
|
+
}
|
|
2103
|
+
else if (entries[i].isSymbolicLink()) {
|
|
2104
|
+
type = 7 /* WasiFileType.SYMBOLIC_LINK */;
|
|
2105
|
+
}
|
|
2106
|
+
else if (entries[i].isCharacterDevice()) {
|
|
2107
|
+
type = 2 /* WasiFileType.CHARACTER_DEVICE */;
|
|
2108
|
+
}
|
|
2109
|
+
else if (entries[i].isBlockDevice()) {
|
|
2110
|
+
type = 1 /* WasiFileType.BLOCK_DEVICE */;
|
|
2111
|
+
}
|
|
2112
|
+
else if (entries[i].isSocket()) {
|
|
2113
|
+
type = 6 /* WasiFileType.SOCKET_STREAM */;
|
|
2114
|
+
}
|
|
2115
|
+
else {
|
|
2116
|
+
type = 0 /* WasiFileType.UNKNOWN */;
|
|
2117
|
+
}
|
|
2118
|
+
entryView.setUint8(20, type);
|
|
2119
|
+
entryData.set(nameData, 24);
|
|
2120
|
+
const data = entryData.slice(0, Math.min(entryData.length, buf_len - bufferUsed));
|
|
2121
|
+
HEAPU8.set(data, buf + bufferUsed);
|
|
2122
|
+
bufferUsed += data.byteLength;
|
|
2123
|
+
}
|
|
2124
|
+
view.setUint32(bufused, bufferUsed, true);
|
|
2125
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2126
|
+
}, ['i32', 'i32', 'i32', 'i64', 'i32'], ['i32']);
|
|
2127
|
+
defineImport('fd_renumber', function fd_renumber(from, to) {
|
|
2128
|
+
const wasi = _wasi.get(this);
|
|
2129
|
+
wasi.fds.renumber(to, from);
|
|
2130
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2131
|
+
}, async function fd_renumber(from, to) {
|
|
2132
|
+
const wasi = _wasi.get(this);
|
|
2133
|
+
await wasi.fds.renumber(to, from);
|
|
2134
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2135
|
+
}, ['i32', 'i32'], ['i32']);
|
|
2136
|
+
defineImport('fd_sync', function fd_sync(fd) {
|
|
2137
|
+
const wasi = _wasi.get(this);
|
|
2138
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_SYNC, BigInt(0));
|
|
2139
|
+
const fs = getFs(this);
|
|
2140
|
+
fs.fsyncSync(fileDescriptor.fd);
|
|
2141
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2142
|
+
}, async function fd_sync(fd) {
|
|
2143
|
+
const wasi = _wasi.get(this);
|
|
2144
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_SYNC, BigInt(0));
|
|
2145
|
+
await fileDescriptor.fd.sync();
|
|
2146
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2147
|
+
}, ['i32'], ['i32']);
|
|
2148
|
+
defineImport('fd_write', function fd_write(fd, iovs, iovslen, size) {
|
|
2149
|
+
iovs = Number(iovs);
|
|
2150
|
+
size = Number(size);
|
|
2151
|
+
if ((iovs === 0 && iovslen) || size === 0) {
|
|
2152
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2153
|
+
}
|
|
2154
|
+
const { HEAPU8, view } = getMemory(this);
|
|
2155
|
+
const wasi = _wasi.get(this);
|
|
2156
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_WRITE, BigInt(0));
|
|
2157
|
+
if (!iovslen) {
|
|
2158
|
+
view.setUint32(size, 0, true);
|
|
2159
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2160
|
+
}
|
|
2161
|
+
const buffer = concatBuffer(Array.from({ length: Number(iovslen) }, (_, i) => {
|
|
2162
|
+
const offset = iovs + (i * 8);
|
|
2163
|
+
const buf = view.getInt32(offset, true);
|
|
2164
|
+
const bufLen = view.getUint32(offset + 4, true);
|
|
2165
|
+
return HEAPU8.subarray(buf, buf + bufLen);
|
|
2166
|
+
}));
|
|
2167
|
+
let nwritten;
|
|
2168
|
+
if (fd === 1 || fd === 2) {
|
|
2169
|
+
nwritten = fileDescriptor.write(buffer);
|
|
2170
|
+
}
|
|
2171
|
+
else {
|
|
2172
|
+
const fs = getFs(this);
|
|
2173
|
+
nwritten = fs.writeSync(fileDescriptor.fd, buffer, 0, buffer.length, Number(fileDescriptor.pos));
|
|
2174
|
+
fileDescriptor.pos += BigInt(nwritten);
|
|
2175
|
+
}
|
|
2176
|
+
view.setUint32(size, nwritten, true);
|
|
2177
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2178
|
+
}, async function fd_write(fd, iovs, iovslen, size) {
|
|
2179
|
+
iovs = Number(iovs);
|
|
2180
|
+
size = Number(size);
|
|
2181
|
+
if ((iovs === 0 && iovslen) || size === 0) {
|
|
2182
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2183
|
+
}
|
|
2184
|
+
const { HEAPU8, view } = getMemory(this);
|
|
2185
|
+
const wasi = _wasi.get(this);
|
|
2186
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.FD_WRITE, BigInt(0));
|
|
2187
|
+
if (!iovslen) {
|
|
2188
|
+
view.setUint32(size, 0, true);
|
|
2189
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2190
|
+
}
|
|
2191
|
+
const buffer = concatBuffer(Array.from({ length: Number(iovslen) }, (_, i) => {
|
|
2192
|
+
const offset = iovs + (i * 8);
|
|
2193
|
+
const buf = view.getInt32(offset, true);
|
|
2194
|
+
const bufLen = view.getUint32(offset + 4, true);
|
|
2195
|
+
return HEAPU8.subarray(buf, buf + bufLen);
|
|
2196
|
+
}));
|
|
2197
|
+
let nwritten;
|
|
2198
|
+
if (fd === 1 || fd === 2) {
|
|
2199
|
+
nwritten = fileDescriptor.write(buffer);
|
|
2200
|
+
}
|
|
2201
|
+
else {
|
|
2202
|
+
nwritten = await (await (fileDescriptor.fd.write(buffer, 0, buffer.length, Number(fileDescriptor.pos)))).bytesWritten;
|
|
2203
|
+
fileDescriptor.pos += BigInt(nwritten);
|
|
2204
|
+
}
|
|
2205
|
+
view.setUint32(size, nwritten, true);
|
|
2206
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2207
|
+
}, ['i32', 'i32', 'i32', 'i32'], ['i32']);
|
|
2208
|
+
defineImport('path_create_directory', function path_create_directory(fd, path, path_len) {
|
|
2209
|
+
path = Number(path);
|
|
2210
|
+
path_len = Number(path_len);
|
|
2211
|
+
if (path === 0) {
|
|
2212
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2213
|
+
}
|
|
2214
|
+
const { HEAPU8 } = getMemory(this);
|
|
2215
|
+
const wasi = _wasi.get(this);
|
|
2216
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_CREATE_DIRECTORY, BigInt(0));
|
|
2217
|
+
let pathString = decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
2218
|
+
pathString = resolve(fileDescriptor.realPath, pathString);
|
|
2219
|
+
const fs = getFs(this);
|
|
2220
|
+
fs.mkdirSync(pathString);
|
|
2221
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2222
|
+
}, async function path_create_directory(fd, path, path_len) {
|
|
2223
|
+
path = Number(path);
|
|
2224
|
+
path_len = Number(path_len);
|
|
2225
|
+
if (path === 0) {
|
|
2226
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2227
|
+
}
|
|
2228
|
+
const { HEAPU8 } = getMemory(this);
|
|
2229
|
+
const wasi = _wasi.get(this);
|
|
2230
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_CREATE_DIRECTORY, BigInt(0));
|
|
2231
|
+
let pathString = decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
2232
|
+
pathString = resolve(fileDescriptor.realPath, pathString);
|
|
2233
|
+
const fs = getFs(this);
|
|
2234
|
+
await fs.promises.mkdir(pathString);
|
|
2235
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2236
|
+
}, ['i32', 'i32', 'i32'], ['i32']);
|
|
2237
|
+
defineImport('path_filestat_get', function path_filestat_get(fd, flags, path, path_len, filestat) {
|
|
2238
|
+
path = Number(path);
|
|
2239
|
+
path_len = Number(path_len);
|
|
2240
|
+
filestat = Number(filestat);
|
|
2241
|
+
if (path === 0 || filestat === 0) {
|
|
2242
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2243
|
+
}
|
|
2244
|
+
const { HEAPU8, view } = getMemory(this);
|
|
2245
|
+
const wasi = _wasi.get(this);
|
|
2246
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_FILESTAT_GET, BigInt(0));
|
|
2247
|
+
let pathString = decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
2248
|
+
const fs = getFs(this);
|
|
2249
|
+
pathString = resolve(fileDescriptor.realPath, pathString);
|
|
2250
|
+
let stat;
|
|
2251
|
+
if ((flags & 1) === 1) {
|
|
2252
|
+
stat = fs.statSync(pathString, { bigint: true });
|
|
2253
|
+
}
|
|
2254
|
+
else {
|
|
2255
|
+
stat = fs.lstatSync(pathString, { bigint: true });
|
|
2256
|
+
}
|
|
2257
|
+
toFileStat(view, filestat, stat);
|
|
2258
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2259
|
+
}, async function path_filestat_get(fd, flags, path, path_len, filestat) {
|
|
2260
|
+
path = Number(path);
|
|
2261
|
+
path_len = Number(path_len);
|
|
2262
|
+
filestat = Number(filestat);
|
|
2263
|
+
if (path === 0 || filestat === 0) {
|
|
2264
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2265
|
+
}
|
|
2266
|
+
const { HEAPU8, view } = getMemory(this);
|
|
2267
|
+
const wasi = _wasi.get(this);
|
|
2268
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_FILESTAT_GET, BigInt(0));
|
|
2269
|
+
let pathString = decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
2270
|
+
const fs = getFs(this);
|
|
2271
|
+
pathString = resolve(fileDescriptor.realPath, pathString);
|
|
2272
|
+
let stat;
|
|
2273
|
+
if ((flags & 1) === 1) {
|
|
2274
|
+
stat = await fs.promises.stat(pathString, { bigint: true });
|
|
2275
|
+
}
|
|
2276
|
+
else {
|
|
2277
|
+
stat = await fs.promises.lstat(pathString, { bigint: true });
|
|
2278
|
+
}
|
|
2279
|
+
toFileStat(view, filestat, stat);
|
|
2280
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2281
|
+
}, ['i32', 'i32', 'i32', 'i32', 'i32'], ['i32']);
|
|
2282
|
+
defineImport('path_filestat_set_times', function path_filestat_set_times(fd, flags, path, path_len, atim, mtim, fst_flags) {
|
|
2283
|
+
path = Number(path);
|
|
2284
|
+
path_len = Number(path_len);
|
|
2285
|
+
if (path === 0)
|
|
2286
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2287
|
+
const { HEAPU8 } = getMemory(this);
|
|
2288
|
+
const wasi = _wasi.get(this);
|
|
2289
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_FILESTAT_SET_TIMES, BigInt(0));
|
|
2290
|
+
if (validateFstFlagsOrReturn(fst_flags)) {
|
|
2291
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2292
|
+
}
|
|
2293
|
+
const fs = getFs(this);
|
|
2294
|
+
const resolvedPath = resolvePathSync(fs, fileDescriptor, decoder.decode(unsharedSlice(HEAPU8, path, path + path_len)), flags);
|
|
2295
|
+
if ((fst_flags & 2 /* WasiFstFlag.SET_ATIM_NOW */) === 2 /* WasiFstFlag.SET_ATIM_NOW */) {
|
|
2296
|
+
atim = BigInt(Date.now() * 1000000);
|
|
2297
|
+
}
|
|
2298
|
+
if ((fst_flags & 8 /* WasiFstFlag.SET_MTIM_NOW */) === 8 /* WasiFstFlag.SET_MTIM_NOW */) {
|
|
2299
|
+
mtim = BigInt(Date.now() * 1000000);
|
|
2300
|
+
}
|
|
2301
|
+
fs.utimesSync(resolvedPath, Number(atim), Number(mtim));
|
|
2302
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2303
|
+
}, async function path_filestat_set_times(fd, flags, path, path_len, atim, mtim, fst_flags) {
|
|
2304
|
+
path = Number(path);
|
|
2305
|
+
path_len = Number(path_len);
|
|
2306
|
+
if (path === 0)
|
|
2307
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2308
|
+
const { HEAPU8 } = getMemory(this);
|
|
2309
|
+
const wasi = _wasi.get(this);
|
|
2310
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_FILESTAT_SET_TIMES, BigInt(0));
|
|
2311
|
+
if (validateFstFlagsOrReturn(fst_flags)) {
|
|
2312
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2313
|
+
}
|
|
2314
|
+
const fs = getFs(this);
|
|
2315
|
+
const resolvedPath = await resolvePathAsync(fs, fileDescriptor, decoder.decode(unsharedSlice(HEAPU8, path, path + path_len)), flags);
|
|
2316
|
+
if ((fst_flags & 2 /* WasiFstFlag.SET_ATIM_NOW */) === 2 /* WasiFstFlag.SET_ATIM_NOW */) {
|
|
2317
|
+
atim = BigInt(Date.now() * 1000000);
|
|
2318
|
+
}
|
|
2319
|
+
if ((fst_flags & 8 /* WasiFstFlag.SET_MTIM_NOW */) === 8 /* WasiFstFlag.SET_MTIM_NOW */) {
|
|
2320
|
+
mtim = BigInt(Date.now() * 1000000);
|
|
2321
|
+
}
|
|
2322
|
+
await fs.promises.utimes(resolvedPath, Number(atim), Number(mtim));
|
|
2323
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2324
|
+
}, ['i32', 'i32', 'i32', 'i32', 'i64', 'i64', 'i32'], ['i32']);
|
|
2325
|
+
defineImport('path_link', function path_link(old_fd, old_flags, old_path, old_path_len, new_fd, new_path, new_path_len) {
|
|
2326
|
+
old_path = Number(old_path);
|
|
2327
|
+
old_path_len = Number(old_path_len);
|
|
2328
|
+
new_path = Number(new_path);
|
|
2329
|
+
new_path_len = Number(new_path_len);
|
|
2330
|
+
if (old_path === 0 || new_path === 0) {
|
|
2331
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2332
|
+
}
|
|
2333
|
+
const wasi = _wasi.get(this);
|
|
2334
|
+
let oldWrap;
|
|
2335
|
+
let newWrap;
|
|
2336
|
+
if (old_fd === new_fd) {
|
|
2337
|
+
oldWrap = newWrap = wasi.fds.get(old_fd, WasiRights.PATH_LINK_SOURCE | WasiRights.PATH_LINK_TARGET, BigInt(0));
|
|
2338
|
+
}
|
|
2339
|
+
else {
|
|
2340
|
+
oldWrap = wasi.fds.get(old_fd, WasiRights.PATH_LINK_SOURCE, BigInt(0));
|
|
2341
|
+
newWrap = wasi.fds.get(new_fd, WasiRights.PATH_LINK_TARGET, BigInt(0));
|
|
2342
|
+
}
|
|
2343
|
+
const { HEAPU8 } = getMemory(this);
|
|
2344
|
+
const fs = getFs(this);
|
|
2345
|
+
const resolvedOldPath = resolvePathSync(fs, oldWrap, decoder.decode(unsharedSlice(HEAPU8, old_path, old_path + old_path_len)), old_flags);
|
|
2346
|
+
const resolvedNewPath = resolve(newWrap.realPath, decoder.decode(unsharedSlice(HEAPU8, new_path, new_path + new_path_len)));
|
|
2347
|
+
fs.linkSync(resolvedOldPath, resolvedNewPath);
|
|
2348
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2349
|
+
}, async function path_link(old_fd, old_flags, old_path, old_path_len, new_fd, new_path, new_path_len) {
|
|
2350
|
+
old_path = Number(old_path);
|
|
2351
|
+
old_path_len = Number(old_path_len);
|
|
2352
|
+
new_path = Number(new_path);
|
|
2353
|
+
new_path_len = Number(new_path_len);
|
|
2354
|
+
if (old_path === 0 || new_path === 0) {
|
|
2355
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2356
|
+
}
|
|
2357
|
+
const wasi = _wasi.get(this);
|
|
2358
|
+
let oldWrap;
|
|
2359
|
+
let newWrap;
|
|
2360
|
+
if (old_fd === new_fd) {
|
|
2361
|
+
oldWrap = newWrap = wasi.fds.get(old_fd, WasiRights.PATH_LINK_SOURCE | WasiRights.PATH_LINK_TARGET, BigInt(0));
|
|
2362
|
+
}
|
|
2363
|
+
else {
|
|
2364
|
+
oldWrap = wasi.fds.get(old_fd, WasiRights.PATH_LINK_SOURCE, BigInt(0));
|
|
2365
|
+
newWrap = wasi.fds.get(new_fd, WasiRights.PATH_LINK_TARGET, BigInt(0));
|
|
2366
|
+
}
|
|
2367
|
+
const { HEAPU8 } = getMemory(this);
|
|
2368
|
+
const fs = getFs(this);
|
|
2369
|
+
const resolvedOldPath = await resolvePathAsync(fs, oldWrap, decoder.decode(unsharedSlice(HEAPU8, old_path, old_path + old_path_len)), old_flags);
|
|
2370
|
+
const resolvedNewPath = resolve(newWrap.realPath, decoder.decode(unsharedSlice(HEAPU8, new_path, new_path + new_path_len)));
|
|
2371
|
+
await fs.promises.link(resolvedOldPath, resolvedNewPath);
|
|
2372
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2373
|
+
}, ['i32', 'i32', 'i32', 'i32', 'i32', 'i32', 'i32'], ['i32']);
|
|
2374
|
+
function pathOpen(o_flags, fs_rights_base, fs_rights_inheriting, fs_flags) {
|
|
2375
|
+
const read = (fs_rights_base & (WasiRights.FD_READ |
|
|
2376
|
+
WasiRights.FD_READDIR)) !== BigInt(0);
|
|
2377
|
+
const write = (fs_rights_base & (WasiRights.FD_DATASYNC |
|
|
2378
|
+
WasiRights.FD_WRITE |
|
|
2379
|
+
WasiRights.FD_ALLOCATE |
|
|
2380
|
+
WasiRights.FD_FILESTAT_SET_SIZE)) !== BigInt(0);
|
|
2381
|
+
let flags = write ? read ? 2 /* FileControlFlag.O_RDWR */ : 1 /* FileControlFlag.O_WRONLY */ : 0 /* FileControlFlag.O_RDONLY */;
|
|
2382
|
+
let needed_base = WasiRights.PATH_OPEN;
|
|
2383
|
+
let needed_inheriting = fs_rights_base | fs_rights_inheriting;
|
|
2384
|
+
if ((o_flags & 1 /* WasiFileControlFlag.O_CREAT */) !== 0) {
|
|
2385
|
+
flags |= 64 /* FileControlFlag.O_CREAT */;
|
|
2386
|
+
needed_base |= WasiRights.PATH_CREATE_FILE;
|
|
2387
|
+
}
|
|
2388
|
+
if ((o_flags & 2 /* WasiFileControlFlag.O_DIRECTORY */) !== 0) {
|
|
2389
|
+
flags |= 65536 /* FileControlFlag.O_DIRECTORY */;
|
|
2390
|
+
}
|
|
2391
|
+
if ((o_flags & 4 /* WasiFileControlFlag.O_EXCL */) !== 0) {
|
|
2392
|
+
flags |= 128 /* FileControlFlag.O_EXCL */;
|
|
2393
|
+
}
|
|
2394
|
+
if ((o_flags & 8 /* WasiFileControlFlag.O_TRUNC */) !== 0) {
|
|
2395
|
+
flags |= 512 /* FileControlFlag.O_TRUNC */;
|
|
2396
|
+
needed_base |= WasiRights.PATH_FILESTAT_SET_SIZE;
|
|
2397
|
+
}
|
|
2398
|
+
if ((fs_flags & 1 /* WasiFdFlag.APPEND */) !== 0) {
|
|
2399
|
+
flags |= 1024 /* FileControlFlag.O_APPEND */;
|
|
2400
|
+
}
|
|
2401
|
+
if ((fs_flags & 2 /* WasiFdFlag.DSYNC */) !== 0) {
|
|
2402
|
+
// flags |= FileControlFlag.O_DSYNC;
|
|
2403
|
+
needed_inheriting |= WasiRights.FD_DATASYNC;
|
|
2404
|
+
}
|
|
2405
|
+
if ((fs_flags & 4 /* WasiFdFlag.NONBLOCK */) !== 0) {
|
|
2406
|
+
flags |= 2048 /* FileControlFlag.O_NONBLOCK */;
|
|
2407
|
+
}
|
|
2408
|
+
if ((fs_flags & 8 /* WasiFdFlag.RSYNC */) !== 0) {
|
|
2409
|
+
flags |= 1052672 /* FileControlFlag.O_SYNC */;
|
|
2410
|
+
needed_inheriting |= WasiRights.FD_SYNC;
|
|
2411
|
+
}
|
|
2412
|
+
if ((fs_flags & 16 /* WasiFdFlag.SYNC */) !== 0) {
|
|
2413
|
+
flags |= 1052672 /* FileControlFlag.O_SYNC */;
|
|
2414
|
+
needed_inheriting |= WasiRights.FD_SYNC;
|
|
2415
|
+
}
|
|
2416
|
+
if (write && (flags & (1024 /* FileControlFlag.O_APPEND */ | 512 /* FileControlFlag.O_TRUNC */)) === 0) {
|
|
2417
|
+
needed_inheriting |= WasiRights.FD_SEEK;
|
|
2418
|
+
}
|
|
2419
|
+
return { flags, needed_base, needed_inheriting };
|
|
2420
|
+
}
|
|
2421
|
+
defineImport('path_open', function path_open(dirfd, dirflags, path, path_len, o_flags, fs_rights_base, fs_rights_inheriting, fs_flags, fd) {
|
|
2422
|
+
path = Number(path);
|
|
2423
|
+
fd = Number(fd);
|
|
2424
|
+
if (path === 0 || fd === 0) {
|
|
2425
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2426
|
+
}
|
|
2427
|
+
path_len = Number(path_len);
|
|
2428
|
+
fs_rights_base = BigInt(fs_rights_base);
|
|
2429
|
+
fs_rights_inheriting = BigInt(fs_rights_inheriting);
|
|
2430
|
+
const { flags: flagsRes, needed_base: neededBase, needed_inheriting: neededInheriting } = pathOpen(o_flags, fs_rights_base, fs_rights_inheriting, fs_flags);
|
|
2431
|
+
const wasi = _wasi.get(this);
|
|
2432
|
+
const fileDescriptor = wasi.fds.get(dirfd, neededBase, neededInheriting);
|
|
2433
|
+
const memory = getMemory(this);
|
|
2434
|
+
const HEAPU8 = memory.HEAPU8;
|
|
2435
|
+
const pathString = decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
2436
|
+
const fs = getFs(this);
|
|
2437
|
+
const resolved_path = resolvePathSync(fs, fileDescriptor, pathString, dirflags);
|
|
2438
|
+
const r = fs.openSync(resolved_path, _isWin32Flags ? _toWinOpenFlags(flagsRes) : flagsRes, 0o666);
|
|
2439
|
+
const filetype = wasi.fds.getFileTypeByFd(r);
|
|
2440
|
+
if ((filetype !== 3 /* WasiFileType.DIRECTORY */) &&
|
|
2441
|
+
((o_flags & 2 /* WasiFileControlFlag.O_DIRECTORY */) !== 0 ||
|
|
2442
|
+
(resolved_path.endsWith('/')))) {
|
|
2443
|
+
return 54 /* WasiErrno.ENOTDIR */;
|
|
2444
|
+
}
|
|
2445
|
+
const { base: max_base, inheriting: max_inheriting } = getRights(wasi.fds.stdio, r, flagsRes, filetype);
|
|
2446
|
+
const wrap = wasi.fds.insert(r, resolved_path, resolved_path, filetype, fs_rights_base & max_base, fs_rights_inheriting & max_inheriting, 0);
|
|
2447
|
+
const stat = fs.fstatSync(r, { bigint: true });
|
|
2448
|
+
if (stat.isFile()) {
|
|
2449
|
+
wrap.size = stat.size;
|
|
2450
|
+
if ((flagsRes & 1024 /* FileControlFlag.O_APPEND */) !== 0) {
|
|
2451
|
+
wrap.pos = stat.size;
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
const view = memory.view;
|
|
2455
|
+
view.setInt32(fd, wrap.id, true);
|
|
2456
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2457
|
+
}, async function path_open(dirfd, dirflags, path, path_len, o_flags, fs_rights_base, fs_rights_inheriting, fs_flags, fd) {
|
|
2458
|
+
path = Number(path);
|
|
2459
|
+
fd = Number(fd);
|
|
2460
|
+
if (path === 0 || fd === 0) {
|
|
2461
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2462
|
+
}
|
|
2463
|
+
path_len = Number(path_len);
|
|
2464
|
+
fs_rights_base = BigInt(fs_rights_base);
|
|
2465
|
+
fs_rights_inheriting = BigInt(fs_rights_inheriting);
|
|
2466
|
+
const { flags: flagsRes, needed_base: neededBase, needed_inheriting: neededInheriting } = pathOpen(o_flags, fs_rights_base, fs_rights_inheriting, fs_flags);
|
|
2467
|
+
const wasi = _wasi.get(this);
|
|
2468
|
+
const fileDescriptor = wasi.fds.get(dirfd, neededBase, neededInheriting);
|
|
2469
|
+
const memory = getMemory(this);
|
|
2470
|
+
const HEAPU8 = memory.HEAPU8;
|
|
2471
|
+
const pathString = decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
2472
|
+
const fs = getFs(this);
|
|
2473
|
+
const resolved_path = await resolvePathAsync(fs, fileDescriptor, pathString, dirflags);
|
|
2474
|
+
const r = await fs.promises.open(resolved_path, _isWin32Flags ? _toWinOpenFlags(flagsRes) : flagsRes, 0o666);
|
|
2475
|
+
const filetype = await wasi.fds.getFileTypeByFd(r);
|
|
2476
|
+
if ((o_flags & 2 /* WasiFileControlFlag.O_DIRECTORY */) !== 0 && filetype !== 3 /* WasiFileType.DIRECTORY */) {
|
|
2477
|
+
return 54 /* WasiErrno.ENOTDIR */;
|
|
2478
|
+
}
|
|
2479
|
+
const { base: max_base, inheriting: max_inheriting } = getRights(wasi.fds.stdio, r.fd, flagsRes, filetype);
|
|
2480
|
+
const wrap = wasi.fds.insert(r, resolved_path, resolved_path, filetype, fs_rights_base & max_base, fs_rights_inheriting & max_inheriting, 0);
|
|
2481
|
+
const stat = await r.stat({ bigint: true });
|
|
2482
|
+
if (stat.isFile()) {
|
|
2483
|
+
wrap.size = stat.size;
|
|
2484
|
+
if ((flagsRes & 1024 /* FileControlFlag.O_APPEND */) !== 0) {
|
|
2485
|
+
wrap.pos = stat.size;
|
|
2486
|
+
}
|
|
2487
|
+
}
|
|
2488
|
+
const view = memory.view;
|
|
2489
|
+
view.setInt32(fd, wrap.id, true);
|
|
2490
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2491
|
+
}, ['i32', 'i32', 'i32', 'i32', 'i32', 'i64', 'i64', 'i32', 'i32'], ['i32']);
|
|
2492
|
+
defineImport('path_readlink', function path_readlink(fd, path, path_len, buf, buf_len, bufused) {
|
|
2493
|
+
path = Number(path);
|
|
2494
|
+
path_len = Number(path_len);
|
|
2495
|
+
buf = Number(buf);
|
|
2496
|
+
buf_len = Number(buf_len);
|
|
2497
|
+
bufused = Number(bufused);
|
|
2498
|
+
if (path === 0 || buf === 0 || bufused === 0) {
|
|
2499
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2500
|
+
}
|
|
2501
|
+
const { HEAPU8, view } = getMemory(this);
|
|
2502
|
+
const wasi = _wasi.get(this);
|
|
2503
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_READLINK, BigInt(0));
|
|
2504
|
+
let pathString = decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
2505
|
+
pathString = resolve(fileDescriptor.realPath, pathString);
|
|
2506
|
+
const fs = getFs(this);
|
|
2507
|
+
const link = fs.readlinkSync(pathString);
|
|
2508
|
+
const linkData = encoder.encode(link);
|
|
2509
|
+
const len = Math.min(linkData.length, buf_len);
|
|
2510
|
+
if (len >= buf_len)
|
|
2511
|
+
return 42 /* WasiErrno.ENOBUFS */;
|
|
2512
|
+
HEAPU8.set(linkData.subarray(0, len), buf);
|
|
2513
|
+
HEAPU8[buf + len] = 0;
|
|
2514
|
+
view.setUint32(bufused, len, true);
|
|
2515
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2516
|
+
}, async function path_readlink(fd, path, path_len, buf, buf_len, bufused) {
|
|
2517
|
+
path = Number(path);
|
|
2518
|
+
path_len = Number(path_len);
|
|
2519
|
+
buf = Number(buf);
|
|
2520
|
+
buf_len = Number(buf_len);
|
|
2521
|
+
bufused = Number(bufused);
|
|
2522
|
+
if (path === 0 || buf === 0 || bufused === 0) {
|
|
2523
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2524
|
+
}
|
|
2525
|
+
const { HEAPU8, view } = getMemory(this);
|
|
2526
|
+
const wasi = _wasi.get(this);
|
|
2527
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_READLINK, BigInt(0));
|
|
2528
|
+
let pathString = decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
2529
|
+
pathString = resolve(fileDescriptor.realPath, pathString);
|
|
2530
|
+
const fs = getFs(this);
|
|
2531
|
+
const link = await fs.promises.readlink(pathString);
|
|
2532
|
+
const linkData = encoder.encode(link);
|
|
2533
|
+
const len = Math.min(linkData.length, buf_len);
|
|
2534
|
+
if (len >= buf_len)
|
|
2535
|
+
return 42 /* WasiErrno.ENOBUFS */;
|
|
2536
|
+
HEAPU8.set(linkData.subarray(0, len), buf);
|
|
2537
|
+
HEAPU8[buf + len] = 0;
|
|
2538
|
+
view.setUint32(bufused, len, true);
|
|
2539
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2540
|
+
}, ['i32', 'i32', 'i32', 'i32', 'i32', 'i32'], ['i32']);
|
|
2541
|
+
defineImport('path_remove_directory', function path_remove_directory(fd, path, path_len) {
|
|
2542
|
+
path = Number(path);
|
|
2543
|
+
path_len = Number(path_len);
|
|
2544
|
+
if (path === 0) {
|
|
2545
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2546
|
+
}
|
|
2547
|
+
const { HEAPU8 } = getMemory(this);
|
|
2548
|
+
const wasi = _wasi.get(this);
|
|
2549
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_REMOVE_DIRECTORY, BigInt(0));
|
|
2550
|
+
let pathString = decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
2551
|
+
pathString = resolve(fileDescriptor.realPath, pathString);
|
|
2552
|
+
const fs = getFs(this);
|
|
2553
|
+
fs.rmdirSync(pathString);
|
|
2554
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2555
|
+
}, async function path_remove_directory(fd, path, path_len) {
|
|
2556
|
+
path = Number(path);
|
|
2557
|
+
path_len = Number(path_len);
|
|
2558
|
+
if (path === 0) {
|
|
2559
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2560
|
+
}
|
|
2561
|
+
const { HEAPU8 } = getMemory(this);
|
|
2562
|
+
const wasi = _wasi.get(this);
|
|
2563
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_REMOVE_DIRECTORY, BigInt(0));
|
|
2564
|
+
let pathString = decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
2565
|
+
pathString = resolve(fileDescriptor.realPath, pathString);
|
|
2566
|
+
const fs = getFs(this);
|
|
2567
|
+
await fs.promises.rmdir(pathString);
|
|
2568
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2569
|
+
}, ['i32', 'i32', 'i32'], ['i32']);
|
|
2570
|
+
defineImport('path_rename', function path_rename(old_fd, old_path, old_path_len, new_fd, new_path, new_path_len) {
|
|
2571
|
+
old_path = Number(old_path);
|
|
2572
|
+
old_path_len = Number(old_path_len);
|
|
2573
|
+
new_path = Number(new_path);
|
|
2574
|
+
new_path_len = Number(new_path_len);
|
|
2575
|
+
if (old_path === 0 || new_path === 0) {
|
|
2576
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2577
|
+
}
|
|
2578
|
+
const wasi = _wasi.get(this);
|
|
2579
|
+
let oldWrap;
|
|
2580
|
+
let newWrap;
|
|
2581
|
+
if (old_fd === new_fd) {
|
|
2582
|
+
oldWrap = newWrap = wasi.fds.get(old_fd, WasiRights.PATH_RENAME_SOURCE | WasiRights.PATH_RENAME_TARGET, BigInt(0));
|
|
2583
|
+
}
|
|
2584
|
+
else {
|
|
2585
|
+
oldWrap = wasi.fds.get(old_fd, WasiRights.PATH_RENAME_SOURCE, BigInt(0));
|
|
2586
|
+
newWrap = wasi.fds.get(new_fd, WasiRights.PATH_RENAME_TARGET, BigInt(0));
|
|
2587
|
+
}
|
|
2588
|
+
const { HEAPU8 } = getMemory(this);
|
|
2589
|
+
const resolvedOldPath = resolve(oldWrap.realPath, decoder.decode(unsharedSlice(HEAPU8, old_path, old_path + old_path_len)));
|
|
2590
|
+
const resolvedNewPath = resolve(newWrap.realPath, decoder.decode(unsharedSlice(HEAPU8, new_path, new_path + new_path_len)));
|
|
2591
|
+
const fs = getFs(this);
|
|
2592
|
+
fs.renameSync(resolvedOldPath, resolvedNewPath);
|
|
2593
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2594
|
+
}, async function path_rename(old_fd, old_path, old_path_len, new_fd, new_path, new_path_len) {
|
|
2595
|
+
old_path = Number(old_path);
|
|
2596
|
+
old_path_len = Number(old_path_len);
|
|
2597
|
+
new_path = Number(new_path);
|
|
2598
|
+
new_path_len = Number(new_path_len);
|
|
2599
|
+
if (old_path === 0 || new_path === 0) {
|
|
2600
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2601
|
+
}
|
|
2602
|
+
const wasi = _wasi.get(this);
|
|
2603
|
+
let oldWrap;
|
|
2604
|
+
let newWrap;
|
|
2605
|
+
if (old_fd === new_fd) {
|
|
2606
|
+
oldWrap = newWrap = wasi.fds.get(old_fd, WasiRights.PATH_RENAME_SOURCE | WasiRights.PATH_RENAME_TARGET, BigInt(0));
|
|
2607
|
+
}
|
|
2608
|
+
else {
|
|
2609
|
+
oldWrap = wasi.fds.get(old_fd, WasiRights.PATH_RENAME_SOURCE, BigInt(0));
|
|
2610
|
+
newWrap = wasi.fds.get(new_fd, WasiRights.PATH_RENAME_TARGET, BigInt(0));
|
|
2611
|
+
}
|
|
2612
|
+
const { HEAPU8 } = getMemory(this);
|
|
2613
|
+
const resolvedOldPath = resolve(oldWrap.realPath, decoder.decode(unsharedSlice(HEAPU8, old_path, old_path + old_path_len)));
|
|
2614
|
+
const resolvedNewPath = resolve(newWrap.realPath, decoder.decode(unsharedSlice(HEAPU8, new_path, new_path + new_path_len)));
|
|
2615
|
+
const fs = getFs(this);
|
|
2616
|
+
await fs.promises.rename(resolvedOldPath, resolvedNewPath);
|
|
2617
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2618
|
+
}, ['i32', 'i32', 'i32', 'i32', 'i32', 'i32'], ['i32']);
|
|
2619
|
+
defineImport('path_symlink', function path_symlink(old_path, old_path_len, fd, new_path, new_path_len) {
|
|
2620
|
+
old_path = Number(old_path);
|
|
2621
|
+
old_path_len = Number(old_path_len);
|
|
2622
|
+
new_path = Number(new_path);
|
|
2623
|
+
new_path_len = Number(new_path_len);
|
|
2624
|
+
if (old_path === 0 || new_path === 0) {
|
|
2625
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2626
|
+
}
|
|
2627
|
+
const { HEAPU8 } = getMemory(this);
|
|
2628
|
+
const wasi = _wasi.get(this);
|
|
2629
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_SYMLINK, BigInt(0));
|
|
2630
|
+
const oldPath = decoder.decode(unsharedSlice(HEAPU8, old_path, old_path + old_path_len));
|
|
2631
|
+
if (oldPath.length > 0 && oldPath[0] === '/') {
|
|
2632
|
+
return 63 /* WasiErrno.EPERM */;
|
|
2633
|
+
}
|
|
2634
|
+
let newPath = decoder.decode(unsharedSlice(HEAPU8, new_path, new_path + new_path_len));
|
|
2635
|
+
newPath = resolve(fileDescriptor.realPath, newPath);
|
|
2636
|
+
const fs = getFs(this);
|
|
2637
|
+
fs.symlinkSync(oldPath, newPath);
|
|
2638
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2639
|
+
}, async function path_symlink(old_path, old_path_len, fd, new_path, new_path_len) {
|
|
2640
|
+
old_path = Number(old_path);
|
|
2641
|
+
old_path_len = Number(old_path_len);
|
|
2642
|
+
new_path = Number(new_path);
|
|
2643
|
+
new_path_len = Number(new_path_len);
|
|
2644
|
+
if (old_path === 0 || new_path === 0) {
|
|
2645
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2646
|
+
}
|
|
2647
|
+
const { HEAPU8 } = getMemory(this);
|
|
2648
|
+
const wasi = _wasi.get(this);
|
|
2649
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_SYMLINK, BigInt(0));
|
|
2650
|
+
const oldPath = decoder.decode(unsharedSlice(HEAPU8, old_path, old_path + old_path_len));
|
|
2651
|
+
let newPath = decoder.decode(unsharedSlice(HEAPU8, new_path, new_path + new_path_len));
|
|
2652
|
+
newPath = resolve(fileDescriptor.realPath, newPath);
|
|
2653
|
+
const fs = getFs(this);
|
|
2654
|
+
await fs.promises.symlink(oldPath, newPath);
|
|
2655
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2656
|
+
}, ['i32', 'i32', 'i32', 'i32', 'i32'], ['i32']);
|
|
2657
|
+
defineImport('path_unlink_file', function path_unlink_file(fd, path, path_len) {
|
|
2658
|
+
path = Number(path);
|
|
2659
|
+
path_len = Number(path_len);
|
|
2660
|
+
if (path === 0) {
|
|
2661
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2662
|
+
}
|
|
2663
|
+
const { HEAPU8 } = getMemory(this);
|
|
2664
|
+
const wasi = _wasi.get(this);
|
|
2665
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_UNLINK_FILE, BigInt(0));
|
|
2666
|
+
let pathString = decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
2667
|
+
pathString = resolve(fileDescriptor.realPath, pathString);
|
|
2668
|
+
const fs = getFs(this);
|
|
2669
|
+
fs.unlinkSync(pathString);
|
|
2670
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2671
|
+
}, async function path_unlink_file(fd, path, path_len) {
|
|
2672
|
+
path = Number(path);
|
|
2673
|
+
path_len = Number(path_len);
|
|
2674
|
+
if (path === 0) {
|
|
2675
|
+
return 28 /* WasiErrno.EINVAL */;
|
|
2676
|
+
}
|
|
2677
|
+
const { HEAPU8 } = getMemory(this);
|
|
2678
|
+
const wasi = _wasi.get(this);
|
|
2679
|
+
const fileDescriptor = wasi.fds.get(fd, WasiRights.PATH_UNLINK_FILE, BigInt(0));
|
|
2680
|
+
let pathString = decoder.decode(unsharedSlice(HEAPU8, path, path + path_len));
|
|
2681
|
+
pathString = resolve(fileDescriptor.realPath, pathString);
|
|
2682
|
+
const fs = getFs(this);
|
|
2683
|
+
await fs.promises.unlink(pathString);
|
|
2684
|
+
return 0 /* WasiErrno.ESUCCESS */;
|
|
2685
|
+
}, ['i32', 'i32', 'i32'], ['i32']);
|
|
2686
|
+
this._setMemory = function setMemory(m) {
|
|
2687
|
+
if (!(m instanceof _WebAssembly.Memory)) {
|
|
2688
|
+
throw new TypeError('"instance.exports.memory" property must be a WebAssembly.Memory');
|
|
2689
|
+
}
|
|
2690
|
+
_memory.set(_this, extendMemory(m));
|
|
2691
|
+
};
|
|
2692
|
+
}
|
|
2693
|
+
static createSync(args, env, preopens, stdio, fs, print, printErr) {
|
|
2694
|
+
const fds = new SyncTable({
|
|
2695
|
+
size: 3,
|
|
2696
|
+
in: stdio[0],
|
|
2697
|
+
out: stdio[1],
|
|
2698
|
+
err: stdio[2],
|
|
2699
|
+
fs,
|
|
2700
|
+
print,
|
|
2701
|
+
printErr
|
|
2702
|
+
});
|
|
2703
|
+
const _this = new WASI$1(args, env, fds, false, fs);
|
|
2704
|
+
if (preopens.length > 0) {
|
|
2705
|
+
for (let i = 0; i < preopens.length; ++i) {
|
|
2706
|
+
const realPath = fs.realpathSync(preopens[i].realPath, 'utf8');
|
|
2707
|
+
const fd = fs.openSync(realPath, 'r', 0o666);
|
|
2708
|
+
fds.insertPreopen(fd, preopens[i].mappedPath, realPath);
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
return _this;
|
|
2712
|
+
}
|
|
2713
|
+
static async createAsync(args, env, preopens, stdio, fs, print, printErr, asyncify) {
|
|
2714
|
+
const fds = new AsyncTable({
|
|
2715
|
+
size: 3,
|
|
2716
|
+
in: stdio[0],
|
|
2717
|
+
out: stdio[1],
|
|
2718
|
+
err: stdio[2],
|
|
2719
|
+
print,
|
|
2720
|
+
printErr
|
|
2721
|
+
});
|
|
2722
|
+
const _this = new WASI$1(args, env, fds, true, fs, asyncify);
|
|
2723
|
+
if (preopens.length > 0) {
|
|
2724
|
+
for (let i = 0; i < preopens.length; ++i) {
|
|
2725
|
+
const entry = preopens[i];
|
|
2726
|
+
const realPath = await fs.promises.realpath(entry.realPath);
|
|
2727
|
+
const fd = await fs.promises.open(realPath, 'r', 0o666);
|
|
2728
|
+
await fds.insertPreopen(fd, entry.mappedPath, realPath);
|
|
2729
|
+
}
|
|
2730
|
+
}
|
|
2731
|
+
return _this;
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2734
|
+
|
|
2735
|
+
// eslint-disable-next-line spaced-comment
|
|
2736
|
+
const kEmptyObject = /*#__PURE__*/ Object.freeze(/*#__PURE__*/ Object.create(null));
|
|
2737
|
+
const kExitCode = Symbol('kExitCode');
|
|
2738
|
+
const kSetMemory = Symbol('kSetMemory');
|
|
2739
|
+
const kStarted = Symbol('kStarted');
|
|
2740
|
+
const kInstance = Symbol('kInstance');
|
|
2741
|
+
const kBindingName = Symbol('kBindingName');
|
|
2742
|
+
function validateOptions(options) {
|
|
2743
|
+
var _a;
|
|
2744
|
+
validateObject(options, 'options');
|
|
2745
|
+
let _WASI;
|
|
2746
|
+
if (options.version !== undefined) {
|
|
2747
|
+
validateString(options.version, 'options.version');
|
|
2748
|
+
switch (options.version) {
|
|
2749
|
+
case 'unstable':
|
|
2750
|
+
_WASI = WASI$1;
|
|
2751
|
+
this[kBindingName] = 'wasi_unstable';
|
|
2752
|
+
break;
|
|
2753
|
+
case 'preview1':
|
|
2754
|
+
_WASI = WASI$1;
|
|
2755
|
+
this[kBindingName] = 'wasi_snapshot_preview1';
|
|
2756
|
+
break;
|
|
2757
|
+
default:
|
|
2758
|
+
throw new TypeError(`unsupported WASI version "${options.version}"`);
|
|
2759
|
+
}
|
|
2760
|
+
}
|
|
2761
|
+
else {
|
|
2762
|
+
_WASI = WASI$1;
|
|
2763
|
+
this[kBindingName] = 'wasi_snapshot_preview1';
|
|
2764
|
+
}
|
|
2765
|
+
if (options.args !== undefined) {
|
|
2766
|
+
validateArray(options.args, 'options.args');
|
|
2767
|
+
}
|
|
2768
|
+
const args = ((_a = options.args) !== null && _a !== void 0 ? _a : []).map(String);
|
|
2769
|
+
const env = [];
|
|
2770
|
+
if (options.env !== undefined) {
|
|
2771
|
+
validateObject(options.env, 'options.env');
|
|
2772
|
+
Object.entries(options.env).forEach(({ 0: key, 1: value }) => {
|
|
2773
|
+
if (value !== undefined) {
|
|
2774
|
+
env.push(`${key}=${value}`);
|
|
2775
|
+
}
|
|
2776
|
+
});
|
|
2777
|
+
}
|
|
2778
|
+
const preopens = [];
|
|
2779
|
+
if (options.preopens !== undefined) {
|
|
2780
|
+
validateObject(options.preopens, 'options.preopens');
|
|
2781
|
+
Object.entries(options.preopens).forEach(({ 0: key, 1: value }) => preopens.push({ mappedPath: String(key), realPath: String(value) }));
|
|
2782
|
+
}
|
|
2783
|
+
if (preopens.length > 0) {
|
|
2784
|
+
if (options.fs === undefined) {
|
|
2785
|
+
throw new Error('filesystem is disabled, can not preopen directory');
|
|
2786
|
+
}
|
|
2787
|
+
try {
|
|
2788
|
+
validateObject(options.fs, 'options.fs');
|
|
2789
|
+
}
|
|
2790
|
+
catch (_) {
|
|
2791
|
+
throw new TypeError('Node.js fs like implementation is not provided');
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
// if (options.filesystem !== undefined) {
|
|
2795
|
+
// validateObject(options.filesystem, 'options.filesystem')
|
|
2796
|
+
// validateString(options.filesystem.type, 'options.filesystem.type')
|
|
2797
|
+
// if (options.filesystem.type !== 'memfs' && options.filesystem.type !== 'file-system-access-api') {
|
|
2798
|
+
// throw new Error(`Filesystem type ${(options.filesystem as any).type as string} is not supported, only "memfs" and "file-system-access-api" is supported currently`)
|
|
2799
|
+
// }
|
|
2800
|
+
// try {
|
|
2801
|
+
// validateObject(options.filesystem.fs, 'options.filesystem.fs')
|
|
2802
|
+
// } catch (_) {
|
|
2803
|
+
// throw new Error('Node.js fs like implementation is not provided')
|
|
2804
|
+
// }
|
|
2805
|
+
// }
|
|
2806
|
+
if (options.print !== undefined)
|
|
2807
|
+
validateFunction(options.print, 'options.print');
|
|
2808
|
+
if (options.printErr !== undefined)
|
|
2809
|
+
validateFunction(options.printErr, 'options.printErr');
|
|
2810
|
+
if (options.returnOnExit !== undefined) {
|
|
2811
|
+
validateBoolean(options.returnOnExit, 'options.returnOnExit');
|
|
2812
|
+
}
|
|
2813
|
+
// const { stdin = 0, stdout = 1, stderr = 2 } = options
|
|
2814
|
+
// validateInt32(stdin, 'options.stdin', 0)
|
|
2815
|
+
// validateInt32(stdout, 'options.stdout', 0)
|
|
2816
|
+
// validateInt32(stderr, 'options.stderr', 0)
|
|
2817
|
+
// const stdio = [stdin, stdout, stderr] as const
|
|
2818
|
+
const stdio = [0, 1, 2];
|
|
2819
|
+
return {
|
|
2820
|
+
args,
|
|
2821
|
+
env,
|
|
2822
|
+
preopens,
|
|
2823
|
+
stdio,
|
|
2824
|
+
_WASI
|
|
2825
|
+
};
|
|
2826
|
+
}
|
|
2827
|
+
function initWASI(setMemory, wrap) {
|
|
2828
|
+
this[kSetMemory] = setMemory;
|
|
2829
|
+
this.wasiImport = wrap;
|
|
2830
|
+
this[kStarted] = false;
|
|
2831
|
+
this[kExitCode] = 0;
|
|
2832
|
+
this[kInstance] = undefined;
|
|
2833
|
+
}
|
|
2834
|
+
/** @public */
|
|
2835
|
+
class WASI {
|
|
2836
|
+
constructor(options = kEmptyObject) {
|
|
2837
|
+
const { args, env, preopens, stdio, _WASI } = validateOptions.call(this, options);
|
|
2838
|
+
const wrap = _WASI.createSync(args, env, preopens, stdio, options.fs, options.print, options.printErr);
|
|
2839
|
+
const setMemory = wrap._setMemory;
|
|
2840
|
+
delete wrap._setMemory;
|
|
2841
|
+
initWASI.call(this, setMemory, wrap);
|
|
2842
|
+
if (options.returnOnExit) {
|
|
2843
|
+
wrap.proc_exit = wasiReturnOnProcExit.bind(this);
|
|
2844
|
+
}
|
|
2845
|
+
}
|
|
2846
|
+
finalizeBindings(instance, _a) {
|
|
2847
|
+
var _b;
|
|
2848
|
+
var { memory = (_b = instance === null || instance === void 0 ? void 0 : instance.exports) === null || _b === void 0 ? void 0 : _b.memory } = _a === void 0 ? {} : _a;
|
|
2849
|
+
if (this[kStarted]) {
|
|
2850
|
+
throw new Error('WASI instance has already started');
|
|
2851
|
+
}
|
|
2852
|
+
validateObject(instance, 'instance');
|
|
2853
|
+
validateObject(instance.exports, 'instance.exports');
|
|
2854
|
+
this[kSetMemory](memory);
|
|
2855
|
+
this[kInstance] = instance;
|
|
2856
|
+
this[kStarted] = true;
|
|
2857
|
+
}
|
|
2858
|
+
// Must not export _initialize, must export _start
|
|
2859
|
+
start(instance) {
|
|
2860
|
+
this.finalizeBindings(instance);
|
|
2861
|
+
const { _start, _initialize } = this[kInstance].exports;
|
|
2862
|
+
validateFunction(_start, 'instance.exports._start');
|
|
2863
|
+
validateUndefined(_initialize, 'instance.exports._initialize');
|
|
2864
|
+
let ret;
|
|
2865
|
+
try {
|
|
2866
|
+
ret = _start();
|
|
2867
|
+
}
|
|
2868
|
+
catch (err) {
|
|
2869
|
+
if (err !== kExitCode) {
|
|
2870
|
+
throw err;
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
if (ret instanceof Promise) {
|
|
2874
|
+
return ret.then(() => this[kExitCode], (err) => {
|
|
2875
|
+
if (err !== kExitCode) {
|
|
2876
|
+
throw err;
|
|
2877
|
+
}
|
|
2878
|
+
return this[kExitCode];
|
|
2879
|
+
});
|
|
2880
|
+
}
|
|
2881
|
+
return this[kExitCode];
|
|
2882
|
+
}
|
|
2883
|
+
// Must not export _start, may optionally export _initialize
|
|
2884
|
+
initialize(instance) {
|
|
2885
|
+
this.finalizeBindings(instance);
|
|
2886
|
+
const { _start, _initialize } = this[kInstance].exports;
|
|
2887
|
+
validateUndefined(_start, 'instance.exports._start');
|
|
2888
|
+
if (_initialize !== undefined) {
|
|
2889
|
+
validateFunction(_initialize, 'instance.exports._initialize');
|
|
2890
|
+
return _initialize();
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
getImportObject() {
|
|
2894
|
+
return { [this[kBindingName]]: this.wasiImport };
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
function wasiReturnOnProcExit(rval) {
|
|
2898
|
+
this[kExitCode] = rval;
|
|
2899
|
+
// eslint-disable-next-line @typescript-eslint/no-throw-literal
|
|
2900
|
+
throw kExitCode;
|
|
2901
|
+
}
|
|
2902
|
+
/** @public */
|
|
2903
|
+
async function createAsyncWASI(options = kEmptyObject) {
|
|
2904
|
+
const _this = Object.create(WASI.prototype);
|
|
2905
|
+
const { args, env, preopens, stdio, _WASI } = validateOptions.call(_this, options);
|
|
2906
|
+
if (options.asyncify !== undefined) {
|
|
2907
|
+
validateObject(options.asyncify, 'options.asyncify');
|
|
2908
|
+
validateFunction(options.asyncify.wrapImportFunction, 'options.asyncify.wrapImportFunction');
|
|
2909
|
+
}
|
|
2910
|
+
const wrap = await _WASI.createAsync(args, env, preopens, stdio, options.fs, options.print, options.printErr, options.asyncify);
|
|
2911
|
+
const setMemory = wrap._setMemory;
|
|
2912
|
+
delete wrap._setMemory;
|
|
2913
|
+
initWASI.call(_this, setMemory, wrap);
|
|
2914
|
+
if (options.returnOnExit) {
|
|
2915
|
+
wrap.proc_exit = wasiReturnOnProcExit.bind(_this);
|
|
2916
|
+
}
|
|
2917
|
+
return _this;
|
|
2918
|
+
}
|
|
2919
|
+
|
|
2920
|
+
export { Asyncify, Memory, WASI, WebAssemblyMemory, asyncifyLoad, asyncifyLoadSync, createAsyncWASI, extendMemory, load, loadSync, wrapAsyncExport, wrapAsyncImport, wrapExports };
|