@nocobase/plugin-workflow-javascript 2.1.0-beta.9 → 2.2.0-alpha.1
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/build.config.ts +52 -0
- package/dist/client/615.a016da4e5f572288.js +10 -0
- package/dist/client/944.18159d8a1521708e.js +10 -0
- package/dist/client/CodeEditor.d.ts +8 -0
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +4 -4
- package/dist/node_modules/@jitl/quickjs-ffi-types/LICENSE +21 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/README.md +5 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/dist/index.d.mts +549 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/dist/index.d.ts +549 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/dist/index.js +2 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/dist/index.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/dist/index.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/dist/index.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-ffi-types/package.json +36 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/LICENSE +47 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/README.md +93 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.browser.d.ts +15 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.browser.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.cjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.cloudflare.cjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.cloudflare.d.ts +15 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.d.ts +15 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.wasm +0 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/emscripten-module.wasm.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.d.mts +94 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.d.ts +94 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/ffi.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.d.mts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.d.ts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/dist/index.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-asyncify/package.json +61 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/LICENSE +47 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/README.md +88 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.browser.d.ts +11 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.browser.mjs +5430 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.cjs +5485 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.cloudflare.cjs +5424 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.cloudflare.d.ts +11 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.d.ts +11 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.mjs +5541 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.wasm +0 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.wasm.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.d.mts +85 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.d.ts +85 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/ffi.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.d.mts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.d.ts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/dist/index.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-debug-sync/package.json +61 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/LICENSE +47 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/README.md +89 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.browser.d.ts +15 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.browser.mjs +26 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.cjs +25 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.cloudflare.cjs +25 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.cloudflare.d.ts +15 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.d.ts +15 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.mjs +30 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.wasm +0 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.d.mts +94 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.d.ts +94 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/ffi.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.d.mts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.d.ts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/index.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/package.json +61 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/LICENSE +47 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/README.md +82 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.d.ts +11 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.mjs +22 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cjs +21 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.cjs +21 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.d.ts +11 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.d.ts +11 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.mjs +25 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.wasm +0 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.mts +85 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.ts +85 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.mts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.ts +20 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs +2 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs.map +1 -0
- package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/package.json +61 -0
- package/dist/node_modules/joi/dist/joi-browser.min.js +1 -0
- package/dist/node_modules/joi/lib/annotate.js +175 -0
- package/dist/node_modules/joi/lib/base.js +1069 -0
- package/dist/node_modules/joi/lib/cache.js +143 -0
- package/dist/node_modules/joi/lib/common.js +216 -0
- package/dist/node_modules/joi/lib/compile.js +283 -0
- package/dist/node_modules/joi/lib/errors.js +271 -0
- package/dist/node_modules/joi/lib/extend.js +312 -0
- package/dist/node_modules/joi/lib/index.d.ts +2365 -0
- package/dist/node_modules/joi/lib/index.js +1 -0
- package/dist/node_modules/joi/lib/manifest.js +476 -0
- package/dist/node_modules/joi/lib/messages.js +178 -0
- package/dist/node_modules/joi/lib/modify.js +267 -0
- package/dist/node_modules/joi/lib/ref.js +414 -0
- package/dist/node_modules/joi/lib/schemas.js +302 -0
- package/dist/node_modules/joi/lib/state.js +166 -0
- package/dist/node_modules/joi/lib/template.js +463 -0
- package/dist/node_modules/joi/lib/trace.js +346 -0
- package/dist/node_modules/joi/lib/types/alternatives.js +364 -0
- package/dist/node_modules/joi/lib/types/any.js +174 -0
- package/dist/node_modules/joi/lib/types/array.js +809 -0
- package/dist/node_modules/joi/lib/types/binary.js +100 -0
- package/dist/node_modules/joi/lib/types/boolean.js +150 -0
- package/dist/node_modules/joi/lib/types/date.js +233 -0
- package/dist/node_modules/joi/lib/types/function.js +93 -0
- package/dist/node_modules/joi/lib/types/keys.js +1067 -0
- package/dist/node_modules/joi/lib/types/link.js +168 -0
- package/dist/node_modules/joi/lib/types/number.js +363 -0
- package/dist/node_modules/joi/lib/types/object.js +22 -0
- package/dist/node_modules/joi/lib/types/string.js +850 -0
- package/dist/node_modules/joi/lib/types/symbol.js +102 -0
- package/dist/node_modules/joi/lib/validator.js +750 -0
- package/dist/node_modules/joi/lib/values.js +263 -0
- package/dist/node_modules/joi/node_modules/@hapi/topo/lib/index.d.ts +60 -0
- package/dist/node_modules/joi/node_modules/@hapi/topo/lib/index.js +225 -0
- package/dist/node_modules/joi/node_modules/@hapi/topo/package.json +30 -0
- package/dist/node_modules/joi/package.json +1 -0
- package/dist/node_modules/quickjs-emscripten/LICENSE +21 -0
- package/dist/node_modules/quickjs-emscripten/README.md +928 -0
- package/dist/node_modules/quickjs-emscripten/dist/chunk-OHAYRCBA.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten/dist/chunk-OHAYRCBA.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten/dist/index.d.mts +57 -0
- package/dist/node_modules/quickjs-emscripten/dist/index.d.ts +57 -0
- package/dist/node_modules/quickjs-emscripten/dist/index.global.js +7309 -0
- package/dist/node_modules/quickjs-emscripten/dist/index.js +2 -0
- package/dist/node_modules/quickjs-emscripten/dist/index.js.map +1 -0
- package/dist/node_modules/quickjs-emscripten/dist/index.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten/dist/index.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten/dist/variants.d.mts +39 -0
- package/dist/node_modules/quickjs-emscripten/dist/variants.d.ts +39 -0
- package/dist/node_modules/quickjs-emscripten/dist/variants.js +2 -0
- package/dist/node_modules/quickjs-emscripten/dist/variants.js.map +1 -0
- package/dist/node_modules/quickjs-emscripten/dist/variants.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten/dist/variants.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten/package.json +69 -0
- package/dist/node_modules/quickjs-emscripten-core/LICENSE +21 -0
- package/dist/node_modules/quickjs-emscripten-core/README.md +341 -0
- package/dist/node_modules/quickjs-emscripten-core/README.template.md +70 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/chunk-TAV5CUKK.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/chunk-TAV5CUKK.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/chunk-V2S4ZYJR.mjs +7 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/chunk-V2S4ZYJR.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/index.d.mts +2033 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/index.d.ts +2033 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/index.js +7 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/index.js.map +1 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/index.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/index.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/module-ES6BEMUI.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/module-ES6BEMUI.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/module-asyncify-2EFITU5U.mjs +2 -0
- package/dist/node_modules/quickjs-emscripten-core/dist/module-asyncify-2EFITU5U.mjs.map +1 -0
- package/dist/node_modules/quickjs-emscripten-core/package.json +49 -0
- package/dist/node_modules/winston-transport/index.js +2 -2
- package/dist/node_modules/winston-transport/package.json +1 -1
- package/dist/server/QuickJs.js +145 -0
- package/dist/server/ScriptInstruction.d.ts +24 -10
- package/dist/server/ScriptInstruction.js +51 -11
- package/dist/server/Vm.js +42 -27
- package/package.json +4 -7
- package/dist/client/907399554f340b0a.js +0 -10
- package/dist/client/d608e8e5c2f2b5cf.js +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ffi.ts"],"sourcesContent":["// This file generated by \"generate.ts ffi\" in the root of the repo.\nimport {\n QuickJSAsyncEmscriptenModule,\n JSRuntimePointer,\n JSContextPointer,\n JSContextPointerPointer,\n JSModuleDefPointer,\n JSValuePointer,\n JSValueConstPointer,\n JSValuePointerPointer,\n JSValuePointerPointerPointer,\n JSValueConstPointerPointer,\n QTS_C_To_HostCallbackFuncPointer,\n QTS_C_To_HostInterruptFuncPointer,\n QTS_C_To_HostLoadModuleFuncPointer,\n BorrowedHeapCharPointer,\n OwnedHeapCharPointer,\n JSBorrowedCharPointer,\n JSVoidPointer,\n UInt32Pointer,\n EvalFlags,\n IntrinsicsFlags,\n EvalDetectModule,\n GetOwnPropertyNamesFlags,\n IsEqualOp,\n HostRefId,\n JSPromiseStateEnum,\n assertSync,\n} from \"@jitl/quickjs-ffi-types\"\n\n/**\n * Low-level FFI bindings to QuickJS's Emscripten module.\n * See instead {@link QuickJSContext}, the public Javascript interface exposed by this\n * library.\n *\n * @unstable The FFI interface is considered private and may change.\n */\nexport class QuickJSAsyncFFI {\n constructor(private module: QuickJSAsyncEmscriptenModule) {}\n /** Set at compile time. */\n readonly DEBUG = false\n\n QTS_Throw: (\n ctx: JSContextPointer,\n error: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_Throw\", \"number\", [\"number\", \"number\"])\n\n QTS_NewError: (ctx: JSContextPointer) => JSValuePointer = this.module.cwrap(\n \"QTS_NewError\",\n \"number\",\n [\"number\"],\n )\n\n QTS_RuntimeSetMemoryLimit: (rt: JSRuntimePointer, limit: number) => void = this.module.cwrap(\n \"QTS_RuntimeSetMemoryLimit\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer =\n this.module.cwrap(\"QTS_RuntimeComputeMemoryUsage\", \"number\", [\"number\", \"number\"])\n\n QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap(\n \"QTS_RuntimeDumpMemoryUsage\",\n \"number\",\n [\"number\"],\n )\n\n QTS_RecoverableLeakCheck: () => number = this.module.cwrap(\n \"QTS_RecoverableLeakCheck\",\n \"number\",\n [],\n )\n\n QTS_BuildIsSanitizeLeak: () => number = this.module.cwrap(\"QTS_BuildIsSanitizeLeak\", \"number\", [])\n\n QTS_RuntimeSetMaxStackSize: (rt: JSRuntimePointer, stack_size: number) => void =\n this.module.cwrap(\"QTS_RuntimeSetMaxStackSize\", null, [\"number\", \"number\"])\n\n QTS_GetUndefined: () => JSValueConstPointer = this.module.cwrap(\"QTS_GetUndefined\", \"number\", [])\n\n QTS_GetNull: () => JSValueConstPointer = this.module.cwrap(\"QTS_GetNull\", \"number\", [])\n\n QTS_GetFalse: () => JSValueConstPointer = this.module.cwrap(\"QTS_GetFalse\", \"number\", [])\n\n QTS_GetTrue: () => JSValueConstPointer = this.module.cwrap(\"QTS_GetTrue\", \"number\", [])\n\n QTS_NewHostRef: (ctx: JSContextPointer, id: HostRefId) => JSValuePointer = this.module.cwrap(\n \"QTS_NewHostRef\",\n \"number\",\n [\"number\", \"number\"],\n )\n\n QTS_GetHostRefId: (value: JSValuePointer | JSValueConstPointer) => HostRefId = this.module.cwrap(\n \"QTS_GetHostRefId\",\n \"number\",\n [\"number\"],\n )\n\n QTS_NewRuntime: () => JSRuntimePointer = this.module.cwrap(\"QTS_NewRuntime\", \"number\", [])\n\n QTS_FreeRuntime: (rt: JSRuntimePointer) => void = this.module.cwrap(\"QTS_FreeRuntime\", null, [\n \"number\",\n ])\n\n QTS_NewContext: (rt: JSRuntimePointer, intrinsics: IntrinsicsFlags) => JSContextPointer =\n this.module.cwrap(\"QTS_NewContext\", \"number\", [\"number\", \"number\"])\n\n QTS_FreeContext: (ctx: JSContextPointer) => void = this.module.cwrap(\"QTS_FreeContext\", null, [\n \"number\",\n ])\n\n QTS_FreeValuePointer: (ctx: JSContextPointer, value: JSValuePointer) => void = this.module.cwrap(\n \"QTS_FreeValuePointer\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_FreeValuePointerRuntime: (rt: JSRuntimePointer, value: JSValuePointer) => void =\n this.module.cwrap(\"QTS_FreeValuePointerRuntime\", null, [\"number\", \"number\"])\n\n QTS_FreeVoidPointer: (ctx: JSContextPointer, ptr: JSVoidPointer) => void = this.module.cwrap(\n \"QTS_FreeVoidPointer\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_FreeCString: (ctx: JSContextPointer, str: JSBorrowedCharPointer) => void = this.module.cwrap(\n \"QTS_FreeCString\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_DupValuePointer: (\n ctx: JSContextPointer,\n val: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_DupValuePointer\", \"number\", [\"number\", \"number\"])\n\n QTS_NewObject: (ctx: JSContextPointer) => JSValuePointer = this.module.cwrap(\n \"QTS_NewObject\",\n \"number\",\n [\"number\"],\n )\n\n QTS_NewObjectProto: (\n ctx: JSContextPointer,\n proto: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewObjectProto\", \"number\", [\"number\", \"number\"])\n\n QTS_NewArray: (ctx: JSContextPointer) => JSValuePointer = this.module.cwrap(\n \"QTS_NewArray\",\n \"number\",\n [\"number\"],\n )\n\n QTS_NewArrayBuffer: (\n ctx: JSContextPointer,\n buffer: JSVoidPointer,\n length: number,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewArrayBuffer\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_NewFloat64: (ctx: JSContextPointer, num: number) => JSValuePointer = this.module.cwrap(\n \"QTS_NewFloat64\",\n \"number\",\n [\"number\", \"number\"],\n )\n\n QTS_GetFloat64: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => number =\n this.module.cwrap(\"QTS_GetFloat64\", \"number\", [\"number\", \"number\"])\n\n QTS_NewString: (ctx: JSContextPointer, string: BorrowedHeapCharPointer) => JSValuePointer =\n this.module.cwrap(\"QTS_NewString\", \"number\", [\"number\", \"number\"])\n\n QTS_GetString: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer = this.module.cwrap(\"QTS_GetString\", \"number\", [\"number\", \"number\"])\n\n QTS_GetArrayBuffer: (\n ctx: JSContextPointer,\n data: JSValuePointer | JSValueConstPointer,\n ) => JSVoidPointer = this.module.cwrap(\"QTS_GetArrayBuffer\", \"number\", [\"number\", \"number\"])\n\n QTS_GetArrayBufferLength: (\n ctx: JSContextPointer,\n data: JSValuePointer | JSValueConstPointer,\n ) => number = this.module.cwrap(\"QTS_GetArrayBufferLength\", \"number\", [\"number\", \"number\"])\n\n QTS_NewSymbol: (\n ctx: JSContextPointer,\n description: BorrowedHeapCharPointer,\n isGlobal: number,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewSymbol\", \"number\", [\"number\", \"number\", \"number\"])\n\n QTS_GetSymbolDescriptionOrKey: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer = assertSync(\n this.module.cwrap(\"QTS_GetSymbolDescriptionOrKey\", \"number\", [\"number\", \"number\"]),\n )\n\n QTS_GetSymbolDescriptionOrKey_MaybeAsync: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer | Promise<JSBorrowedCharPointer> = this.module.cwrap(\n \"QTS_GetSymbolDescriptionOrKey\",\n \"number\",\n [\"number\", \"number\"],\n )\n\n QTS_IsGlobalSymbol: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => number = this.module.cwrap(\"QTS_IsGlobalSymbol\", \"number\", [\"number\", \"number\"])\n\n QTS_IsJobPending: (rt: JSRuntimePointer) => number = this.module.cwrap(\n \"QTS_IsJobPending\",\n \"number\",\n [\"number\"],\n )\n\n QTS_ExecutePendingJob: (\n rt: JSRuntimePointer,\n maxJobsToExecute: number,\n lastJobContext: JSContextPointerPointer,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_ExecutePendingJob\", \"number\", [\"number\", \"number\", \"number\"]),\n )\n\n QTS_ExecutePendingJob_MaybeAsync: (\n rt: JSRuntimePointer,\n maxJobsToExecute: number,\n lastJobContext: JSContextPointerPointer,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\n \"QTS_ExecutePendingJob\",\n \"number\",\n [\"number\", \"number\", \"number\"],\n )\n\n QTS_GetProp: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_GetProp\", \"number\", [\"number\", \"number\", \"number\"]),\n )\n\n QTS_GetProp_MaybeAsync: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\"QTS_GetProp\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_GetPropNumber: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: number,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_GetPropNumber\", \"number\", [\"number\", \"number\", \"number\"]),\n )\n\n QTS_GetPropNumber_MaybeAsync: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: number,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\"QTS_GetPropNumber\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_SetProp: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n prop_value: JSValuePointer | JSValueConstPointer,\n ) => void = assertSync(\n this.module.cwrap(\"QTS_SetProp\", null, [\"number\", \"number\", \"number\", \"number\"]),\n )\n\n QTS_SetProp_MaybeAsync: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n prop_value: JSValuePointer | JSValueConstPointer,\n ) => void | Promise<void> = this.module.cwrap(\"QTS_SetProp\", null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_DefineProp: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n prop_value: JSValuePointer | JSValueConstPointer,\n get: JSValuePointer | JSValueConstPointer,\n set: JSValuePointer | JSValueConstPointer,\n configurable: boolean,\n enumerable: boolean,\n has_value: boolean,\n ) => void = this.module.cwrap(\"QTS_DefineProp\", null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"boolean\",\n \"boolean\",\n \"boolean\",\n ])\n\n QTS_GetOwnPropertyNames: (\n ctx: JSContextPointer,\n out_ptrs: JSValuePointerPointerPointer,\n out_len: UInt32Pointer,\n obj: JSValuePointer | JSValueConstPointer,\n flags: number,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_GetOwnPropertyNames\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n ]),\n )\n\n QTS_GetOwnPropertyNames_MaybeAsync: (\n ctx: JSContextPointer,\n out_ptrs: JSValuePointerPointerPointer,\n out_len: UInt32Pointer,\n obj: JSValuePointer | JSValueConstPointer,\n flags: number,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\n \"QTS_GetOwnPropertyNames\",\n \"number\",\n [\"number\", \"number\", \"number\", \"number\", \"number\"],\n )\n\n QTS_Call: (\n ctx: JSContextPointer,\n func_obj: JSValuePointer | JSValueConstPointer,\n this_obj: JSValuePointer | JSValueConstPointer,\n argc: number,\n argv_ptrs: JSValueConstPointerPointer,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_Call\", \"number\", [\"number\", \"number\", \"number\", \"number\", \"number\"]),\n )\n\n QTS_Call_MaybeAsync: (\n ctx: JSContextPointer,\n func_obj: JSValuePointer | JSValueConstPointer,\n this_obj: JSValuePointer | JSValueConstPointer,\n argc: number,\n argv_ptrs: JSValueConstPointerPointer,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\"QTS_Call\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_ResolveException: (ctx: JSContextPointer, maybe_exception: JSValuePointer) => JSValuePointer =\n this.module.cwrap(\"QTS_ResolveException\", \"number\", [\"number\", \"number\"])\n\n QTS_Dump: (\n ctx: JSContextPointer,\n obj: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer = assertSync(\n this.module.cwrap(\"QTS_Dump\", \"number\", [\"number\", \"number\"]),\n )\n\n QTS_Dump_MaybeAsync: (\n ctx: JSContextPointer,\n obj: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer | Promise<JSBorrowedCharPointer> = this.module.cwrap(\n \"QTS_Dump\",\n \"number\",\n [\"number\", \"number\"],\n )\n\n QTS_Eval: (\n ctx: JSContextPointer,\n js_code: BorrowedHeapCharPointer,\n js_code_length: number,\n filename: string,\n detectModule: EvalDetectModule,\n evalFlags: EvalFlags,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_Eval\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"string\",\n \"number\",\n \"number\",\n ]),\n )\n\n QTS_Eval_MaybeAsync: (\n ctx: JSContextPointer,\n js_code: BorrowedHeapCharPointer,\n js_code_length: number,\n filename: string,\n detectModule: EvalDetectModule,\n evalFlags: EvalFlags,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\"QTS_Eval\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"string\",\n \"number\",\n \"number\",\n ])\n\n QTS_GetModuleNamespace: (\n ctx: JSContextPointer,\n module_func_obj: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_GetModuleNamespace\", \"number\", [\"number\", \"number\"])\n\n QTS_Typeof: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => OwnedHeapCharPointer = this.module.cwrap(\"QTS_Typeof\", \"number\", [\"number\", \"number\"])\n\n QTS_GetLength: (\n ctx: JSContextPointer,\n out_len: UInt32Pointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => number = this.module.cwrap(\"QTS_GetLength\", \"number\", [\"number\", \"number\", \"number\"])\n\n QTS_IsEqual: (\n ctx: JSContextPointer,\n a: JSValuePointer | JSValueConstPointer,\n b: JSValuePointer | JSValueConstPointer,\n op: IsEqualOp,\n ) => number = this.module.cwrap(\"QTS_IsEqual\", \"number\", [\"number\", \"number\", \"number\", \"number\"])\n\n QTS_GetGlobalObject: (ctx: JSContextPointer) => JSValuePointer = this.module.cwrap(\n \"QTS_GetGlobalObject\",\n \"number\",\n [\"number\"],\n )\n\n QTS_NewPromiseCapability: (\n ctx: JSContextPointer,\n resolve_funcs_out: JSValuePointerPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewPromiseCapability\", \"number\", [\n \"number\",\n \"number\",\n ])\n\n QTS_PromiseState: (\n ctx: JSContextPointer,\n promise: JSValuePointer | JSValueConstPointer,\n ) => JSPromiseStateEnum = this.module.cwrap(\"QTS_PromiseState\", \"number\", [\"number\", \"number\"])\n\n QTS_PromiseResult: (\n ctx: JSContextPointer,\n promise: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_PromiseResult\", \"number\", [\"number\", \"number\"])\n\n QTS_TestStringArg: (string: string) => void = this.module.cwrap(\"QTS_TestStringArg\", null, [\n \"string\",\n ])\n\n QTS_GetDebugLogEnabled: (rt: JSRuntimePointer) => number = this.module.cwrap(\n \"QTS_GetDebugLogEnabled\",\n \"number\",\n [\"number\"],\n )\n\n QTS_SetDebugLogEnabled: (rt: JSRuntimePointer, is_enabled: number) => void = this.module.cwrap(\n \"QTS_SetDebugLogEnabled\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_BuildIsDebug: () => number = this.module.cwrap(\"QTS_BuildIsDebug\", \"number\", [])\n\n QTS_BuildIsAsyncify: () => number = this.module.cwrap(\"QTS_BuildIsAsyncify\", \"number\", [])\n\n QTS_NewFunction: (\n ctx: JSContextPointer,\n name: string,\n arg_length: number,\n is_constructor: boolean,\n host_ref_id: HostRefId,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewFunction\", \"number\", [\n \"number\",\n \"string\",\n \"number\",\n \"boolean\",\n \"number\",\n ])\n\n QTS_ArgvGetJSValueConstPointer: (\n argv: JSValuePointer | JSValueConstPointer,\n index: number,\n ) => JSValueConstPointer = this.module.cwrap(\"QTS_ArgvGetJSValueConstPointer\", \"number\", [\n \"number\",\n \"number\",\n ])\n\n QTS_RuntimeEnableInterruptHandler: (rt: JSRuntimePointer) => void = this.module.cwrap(\n \"QTS_RuntimeEnableInterruptHandler\",\n null,\n [\"number\"],\n )\n\n QTS_RuntimeDisableInterruptHandler: (rt: JSRuntimePointer) => void = this.module.cwrap(\n \"QTS_RuntimeDisableInterruptHandler\",\n null,\n [\"number\"],\n )\n\n QTS_RuntimeEnableModuleLoader: (rt: JSRuntimePointer, use_custom_normalize: number) => void =\n this.module.cwrap(\"QTS_RuntimeEnableModuleLoader\", null, [\"number\", \"number\"])\n\n QTS_RuntimeDisableModuleLoader: (rt: JSRuntimePointer) => void = this.module.cwrap(\n \"QTS_RuntimeDisableModuleLoader\",\n null,\n [\"number\"],\n )\n\n QTS_bjson_encode: (\n ctx: JSContextPointer,\n val: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_bjson_encode\", \"number\", [\"number\", \"number\"])\n\n QTS_bjson_decode: (\n ctx: JSContextPointer,\n data: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_bjson_decode\", \"number\", [\"number\", \"number\"])\n}\n"],"mappings":"wpBAAA,wHACA,6BA2BO,mCASM,gBAAN,KAAsB,CAC3B,YAAoBA,QAAsC,CAAtC,YAAAA,QAEpB,KAAS,MAAQ,GAEjB,eAGsB,KAAK,OAAO,MAAM,YAAa,SAAU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C,CAAC,EAEzF,qBAMsB,KAAK,OAAO,MAAM,kBAAmB,SAAU,CACnE,SACA,SACA,SACA,UACA,QACF,CAAC,EAED,oCAG2B,KAAK,OAAO,MAAM,iCAAkC,SAAU,CACvF,SACA,QACF,CAAC,EAED,uCAAoE,KAAK,OAAO,MAC9E,oCACA,KACA,CAAC,QAAQ,CACX,EAEA,wCAAqE,KAAK,OAAO,MAC/E,qCACA,KACA,CAAC,QAAQ,CACX,EAEA,mCACE,KAAK,OAAO,MAAM,gCAAiC,KAAM,CAAC,SAAU,QAAQ,CAAC,EAE/E,oCAAiE,KAAK,OAAO,MAC3E,iCACA,KACA,CAAC,QAAQ,CACX,EAEA,sBAGsB,KAAK,OAAO,MAAM,mBAAoB,SAAU,CAAC,SAAU,QAAQ,CAAC,EAE1F,sBAGsB,KAAK,OAAO,MAAM,mBAAoB,SAAU,CAAC,SAAU,QAAQ,CAAC,CA3f/B,CA4f7D","names":["module"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{assertSync}from"@jitl/quickjs-ffi-types";var QuickJSAsyncFFI=class{constructor(module){this.module=module;this.DEBUG=!1;this.QTS_Throw=this.module.cwrap("QTS_Throw","number",["number","number"]);this.QTS_NewError=this.module.cwrap("QTS_NewError","number",["number"]);this.QTS_RuntimeSetMemoryLimit=this.module.cwrap("QTS_RuntimeSetMemoryLimit",null,["number","number"]);this.QTS_RuntimeComputeMemoryUsage=this.module.cwrap("QTS_RuntimeComputeMemoryUsage","number",["number","number"]);this.QTS_RuntimeDumpMemoryUsage=this.module.cwrap("QTS_RuntimeDumpMemoryUsage","number",["number"]);this.QTS_RecoverableLeakCheck=this.module.cwrap("QTS_RecoverableLeakCheck","number",[]);this.QTS_BuildIsSanitizeLeak=this.module.cwrap("QTS_BuildIsSanitizeLeak","number",[]);this.QTS_RuntimeSetMaxStackSize=this.module.cwrap("QTS_RuntimeSetMaxStackSize",null,["number","number"]);this.QTS_GetUndefined=this.module.cwrap("QTS_GetUndefined","number",[]);this.QTS_GetNull=this.module.cwrap("QTS_GetNull","number",[]);this.QTS_GetFalse=this.module.cwrap("QTS_GetFalse","number",[]);this.QTS_GetTrue=this.module.cwrap("QTS_GetTrue","number",[]);this.QTS_NewHostRef=this.module.cwrap("QTS_NewHostRef","number",["number","number"]);this.QTS_GetHostRefId=this.module.cwrap("QTS_GetHostRefId","number",["number"]);this.QTS_NewRuntime=this.module.cwrap("QTS_NewRuntime","number",[]);this.QTS_FreeRuntime=this.module.cwrap("QTS_FreeRuntime",null,["number"]);this.QTS_NewContext=this.module.cwrap("QTS_NewContext","number",["number","number"]);this.QTS_FreeContext=this.module.cwrap("QTS_FreeContext",null,["number"]);this.QTS_FreeValuePointer=this.module.cwrap("QTS_FreeValuePointer",null,["number","number"]);this.QTS_FreeValuePointerRuntime=this.module.cwrap("QTS_FreeValuePointerRuntime",null,["number","number"]);this.QTS_FreeVoidPointer=this.module.cwrap("QTS_FreeVoidPointer",null,["number","number"]);this.QTS_FreeCString=this.module.cwrap("QTS_FreeCString",null,["number","number"]);this.QTS_DupValuePointer=this.module.cwrap("QTS_DupValuePointer","number",["number","number"]);this.QTS_NewObject=this.module.cwrap("QTS_NewObject","number",["number"]);this.QTS_NewObjectProto=this.module.cwrap("QTS_NewObjectProto","number",["number","number"]);this.QTS_NewArray=this.module.cwrap("QTS_NewArray","number",["number"]);this.QTS_NewArrayBuffer=this.module.cwrap("QTS_NewArrayBuffer","number",["number","number","number"]);this.QTS_NewFloat64=this.module.cwrap("QTS_NewFloat64","number",["number","number"]);this.QTS_GetFloat64=this.module.cwrap("QTS_GetFloat64","number",["number","number"]);this.QTS_NewString=this.module.cwrap("QTS_NewString","number",["number","number"]);this.QTS_GetString=this.module.cwrap("QTS_GetString","number",["number","number"]);this.QTS_GetArrayBuffer=this.module.cwrap("QTS_GetArrayBuffer","number",["number","number"]);this.QTS_GetArrayBufferLength=this.module.cwrap("QTS_GetArrayBufferLength","number",["number","number"]);this.QTS_NewSymbol=this.module.cwrap("QTS_NewSymbol","number",["number","number","number"]);this.QTS_GetSymbolDescriptionOrKey=assertSync(this.module.cwrap("QTS_GetSymbolDescriptionOrKey","number",["number","number"]));this.QTS_GetSymbolDescriptionOrKey_MaybeAsync=this.module.cwrap("QTS_GetSymbolDescriptionOrKey","number",["number","number"]);this.QTS_IsGlobalSymbol=this.module.cwrap("QTS_IsGlobalSymbol","number",["number","number"]);this.QTS_IsJobPending=this.module.cwrap("QTS_IsJobPending","number",["number"]);this.QTS_ExecutePendingJob=assertSync(this.module.cwrap("QTS_ExecutePendingJob","number",["number","number","number"]));this.QTS_ExecutePendingJob_MaybeAsync=this.module.cwrap("QTS_ExecutePendingJob","number",["number","number","number"]);this.QTS_GetProp=assertSync(this.module.cwrap("QTS_GetProp","number",["number","number","number"]));this.QTS_GetProp_MaybeAsync=this.module.cwrap("QTS_GetProp","number",["number","number","number"]);this.QTS_GetPropNumber=assertSync(this.module.cwrap("QTS_GetPropNumber","number",["number","number","number"]));this.QTS_GetPropNumber_MaybeAsync=this.module.cwrap("QTS_GetPropNumber","number",["number","number","number"]);this.QTS_SetProp=assertSync(this.module.cwrap("QTS_SetProp",null,["number","number","number","number"]));this.QTS_SetProp_MaybeAsync=this.module.cwrap("QTS_SetProp",null,["number","number","number","number"]);this.QTS_DefineProp=this.module.cwrap("QTS_DefineProp",null,["number","number","number","number","number","number","boolean","boolean","boolean"]);this.QTS_GetOwnPropertyNames=assertSync(this.module.cwrap("QTS_GetOwnPropertyNames","number",["number","number","number","number","number"]));this.QTS_GetOwnPropertyNames_MaybeAsync=this.module.cwrap("QTS_GetOwnPropertyNames","number",["number","number","number","number","number"]);this.QTS_Call=assertSync(this.module.cwrap("QTS_Call","number",["number","number","number","number","number"]));this.QTS_Call_MaybeAsync=this.module.cwrap("QTS_Call","number",["number","number","number","number","number"]);this.QTS_ResolveException=this.module.cwrap("QTS_ResolveException","number",["number","number"]);this.QTS_Dump=assertSync(this.module.cwrap("QTS_Dump","number",["number","number"]));this.QTS_Dump_MaybeAsync=this.module.cwrap("QTS_Dump","number",["number","number"]);this.QTS_Eval=assertSync(this.module.cwrap("QTS_Eval","number",["number","number","number","string","number","number"]));this.QTS_Eval_MaybeAsync=this.module.cwrap("QTS_Eval","number",["number","number","number","string","number","number"]);this.QTS_GetModuleNamespace=this.module.cwrap("QTS_GetModuleNamespace","number",["number","number"]);this.QTS_Typeof=this.module.cwrap("QTS_Typeof","number",["number","number"]);this.QTS_GetLength=this.module.cwrap("QTS_GetLength","number",["number","number","number"]);this.QTS_IsEqual=this.module.cwrap("QTS_IsEqual","number",["number","number","number","number"]);this.QTS_GetGlobalObject=this.module.cwrap("QTS_GetGlobalObject","number",["number"]);this.QTS_NewPromiseCapability=this.module.cwrap("QTS_NewPromiseCapability","number",["number","number"]);this.QTS_PromiseState=this.module.cwrap("QTS_PromiseState","number",["number","number"]);this.QTS_PromiseResult=this.module.cwrap("QTS_PromiseResult","number",["number","number"]);this.QTS_TestStringArg=this.module.cwrap("QTS_TestStringArg",null,["string"]);this.QTS_GetDebugLogEnabled=this.module.cwrap("QTS_GetDebugLogEnabled","number",["number"]);this.QTS_SetDebugLogEnabled=this.module.cwrap("QTS_SetDebugLogEnabled",null,["number","number"]);this.QTS_BuildIsDebug=this.module.cwrap("QTS_BuildIsDebug","number",[]);this.QTS_BuildIsAsyncify=this.module.cwrap("QTS_BuildIsAsyncify","number",[]);this.QTS_NewFunction=this.module.cwrap("QTS_NewFunction","number",["number","string","number","boolean","number"]);this.QTS_ArgvGetJSValueConstPointer=this.module.cwrap("QTS_ArgvGetJSValueConstPointer","number",["number","number"]);this.QTS_RuntimeEnableInterruptHandler=this.module.cwrap("QTS_RuntimeEnableInterruptHandler",null,["number"]);this.QTS_RuntimeDisableInterruptHandler=this.module.cwrap("QTS_RuntimeDisableInterruptHandler",null,["number"]);this.QTS_RuntimeEnableModuleLoader=this.module.cwrap("QTS_RuntimeEnableModuleLoader",null,["number","number"]);this.QTS_RuntimeDisableModuleLoader=this.module.cwrap("QTS_RuntimeDisableModuleLoader",null,["number"]);this.QTS_bjson_encode=this.module.cwrap("QTS_bjson_encode","number",["number","number"]);this.QTS_bjson_decode=this.module.cwrap("QTS_bjson_decode","number",["number","number"])}};export{QuickJSAsyncFFI};
|
|
2
|
+
//# sourceMappingURL=ffi.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ffi.ts"],"sourcesContent":["// This file generated by \"generate.ts ffi\" in the root of the repo.\nimport {\n QuickJSAsyncEmscriptenModule,\n JSRuntimePointer,\n JSContextPointer,\n JSContextPointerPointer,\n JSModuleDefPointer,\n JSValuePointer,\n JSValueConstPointer,\n JSValuePointerPointer,\n JSValuePointerPointerPointer,\n JSValueConstPointerPointer,\n QTS_C_To_HostCallbackFuncPointer,\n QTS_C_To_HostInterruptFuncPointer,\n QTS_C_To_HostLoadModuleFuncPointer,\n BorrowedHeapCharPointer,\n OwnedHeapCharPointer,\n JSBorrowedCharPointer,\n JSVoidPointer,\n UInt32Pointer,\n EvalFlags,\n IntrinsicsFlags,\n EvalDetectModule,\n GetOwnPropertyNamesFlags,\n IsEqualOp,\n HostRefId,\n JSPromiseStateEnum,\n assertSync,\n} from \"@jitl/quickjs-ffi-types\"\n\n/**\n * Low-level FFI bindings to QuickJS's Emscripten module.\n * See instead {@link QuickJSContext}, the public Javascript interface exposed by this\n * library.\n *\n * @unstable The FFI interface is considered private and may change.\n */\nexport class QuickJSAsyncFFI {\n constructor(private module: QuickJSAsyncEmscriptenModule) {}\n /** Set at compile time. */\n readonly DEBUG = false\n\n QTS_Throw: (\n ctx: JSContextPointer,\n error: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_Throw\", \"number\", [\"number\", \"number\"])\n\n QTS_NewError: (ctx: JSContextPointer) => JSValuePointer = this.module.cwrap(\n \"QTS_NewError\",\n \"number\",\n [\"number\"],\n )\n\n QTS_RuntimeSetMemoryLimit: (rt: JSRuntimePointer, limit: number) => void = this.module.cwrap(\n \"QTS_RuntimeSetMemoryLimit\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer =\n this.module.cwrap(\"QTS_RuntimeComputeMemoryUsage\", \"number\", [\"number\", \"number\"])\n\n QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap(\n \"QTS_RuntimeDumpMemoryUsage\",\n \"number\",\n [\"number\"],\n )\n\n QTS_RecoverableLeakCheck: () => number = this.module.cwrap(\n \"QTS_RecoverableLeakCheck\",\n \"number\",\n [],\n )\n\n QTS_BuildIsSanitizeLeak: () => number = this.module.cwrap(\"QTS_BuildIsSanitizeLeak\", \"number\", [])\n\n QTS_RuntimeSetMaxStackSize: (rt: JSRuntimePointer, stack_size: number) => void =\n this.module.cwrap(\"QTS_RuntimeSetMaxStackSize\", null, [\"number\", \"number\"])\n\n QTS_GetUndefined: () => JSValueConstPointer = this.module.cwrap(\"QTS_GetUndefined\", \"number\", [])\n\n QTS_GetNull: () => JSValueConstPointer = this.module.cwrap(\"QTS_GetNull\", \"number\", [])\n\n QTS_GetFalse: () => JSValueConstPointer = this.module.cwrap(\"QTS_GetFalse\", \"number\", [])\n\n QTS_GetTrue: () => JSValueConstPointer = this.module.cwrap(\"QTS_GetTrue\", \"number\", [])\n\n QTS_NewHostRef: (ctx: JSContextPointer, id: HostRefId) => JSValuePointer = this.module.cwrap(\n \"QTS_NewHostRef\",\n \"number\",\n [\"number\", \"number\"],\n )\n\n QTS_GetHostRefId: (value: JSValuePointer | JSValueConstPointer) => HostRefId = this.module.cwrap(\n \"QTS_GetHostRefId\",\n \"number\",\n [\"number\"],\n )\n\n QTS_NewRuntime: () => JSRuntimePointer = this.module.cwrap(\"QTS_NewRuntime\", \"number\", [])\n\n QTS_FreeRuntime: (rt: JSRuntimePointer) => void = this.module.cwrap(\"QTS_FreeRuntime\", null, [\n \"number\",\n ])\n\n QTS_NewContext: (rt: JSRuntimePointer, intrinsics: IntrinsicsFlags) => JSContextPointer =\n this.module.cwrap(\"QTS_NewContext\", \"number\", [\"number\", \"number\"])\n\n QTS_FreeContext: (ctx: JSContextPointer) => void = this.module.cwrap(\"QTS_FreeContext\", null, [\n \"number\",\n ])\n\n QTS_FreeValuePointer: (ctx: JSContextPointer, value: JSValuePointer) => void = this.module.cwrap(\n \"QTS_FreeValuePointer\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_FreeValuePointerRuntime: (rt: JSRuntimePointer, value: JSValuePointer) => void =\n this.module.cwrap(\"QTS_FreeValuePointerRuntime\", null, [\"number\", \"number\"])\n\n QTS_FreeVoidPointer: (ctx: JSContextPointer, ptr: JSVoidPointer) => void = this.module.cwrap(\n \"QTS_FreeVoidPointer\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_FreeCString: (ctx: JSContextPointer, str: JSBorrowedCharPointer) => void = this.module.cwrap(\n \"QTS_FreeCString\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_DupValuePointer: (\n ctx: JSContextPointer,\n val: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_DupValuePointer\", \"number\", [\"number\", \"number\"])\n\n QTS_NewObject: (ctx: JSContextPointer) => JSValuePointer = this.module.cwrap(\n \"QTS_NewObject\",\n \"number\",\n [\"number\"],\n )\n\n QTS_NewObjectProto: (\n ctx: JSContextPointer,\n proto: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewObjectProto\", \"number\", [\"number\", \"number\"])\n\n QTS_NewArray: (ctx: JSContextPointer) => JSValuePointer = this.module.cwrap(\n \"QTS_NewArray\",\n \"number\",\n [\"number\"],\n )\n\n QTS_NewArrayBuffer: (\n ctx: JSContextPointer,\n buffer: JSVoidPointer,\n length: number,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewArrayBuffer\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_NewFloat64: (ctx: JSContextPointer, num: number) => JSValuePointer = this.module.cwrap(\n \"QTS_NewFloat64\",\n \"number\",\n [\"number\", \"number\"],\n )\n\n QTS_GetFloat64: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => number =\n this.module.cwrap(\"QTS_GetFloat64\", \"number\", [\"number\", \"number\"])\n\n QTS_NewString: (ctx: JSContextPointer, string: BorrowedHeapCharPointer) => JSValuePointer =\n this.module.cwrap(\"QTS_NewString\", \"number\", [\"number\", \"number\"])\n\n QTS_GetString: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer = this.module.cwrap(\"QTS_GetString\", \"number\", [\"number\", \"number\"])\n\n QTS_GetArrayBuffer: (\n ctx: JSContextPointer,\n data: JSValuePointer | JSValueConstPointer,\n ) => JSVoidPointer = this.module.cwrap(\"QTS_GetArrayBuffer\", \"number\", [\"number\", \"number\"])\n\n QTS_GetArrayBufferLength: (\n ctx: JSContextPointer,\n data: JSValuePointer | JSValueConstPointer,\n ) => number = this.module.cwrap(\"QTS_GetArrayBufferLength\", \"number\", [\"number\", \"number\"])\n\n QTS_NewSymbol: (\n ctx: JSContextPointer,\n description: BorrowedHeapCharPointer,\n isGlobal: number,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewSymbol\", \"number\", [\"number\", \"number\", \"number\"])\n\n QTS_GetSymbolDescriptionOrKey: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer = assertSync(\n this.module.cwrap(\"QTS_GetSymbolDescriptionOrKey\", \"number\", [\"number\", \"number\"]),\n )\n\n QTS_GetSymbolDescriptionOrKey_MaybeAsync: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer | Promise<JSBorrowedCharPointer> = this.module.cwrap(\n \"QTS_GetSymbolDescriptionOrKey\",\n \"number\",\n [\"number\", \"number\"],\n )\n\n QTS_IsGlobalSymbol: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => number = this.module.cwrap(\"QTS_IsGlobalSymbol\", \"number\", [\"number\", \"number\"])\n\n QTS_IsJobPending: (rt: JSRuntimePointer) => number = this.module.cwrap(\n \"QTS_IsJobPending\",\n \"number\",\n [\"number\"],\n )\n\n QTS_ExecutePendingJob: (\n rt: JSRuntimePointer,\n maxJobsToExecute: number,\n lastJobContext: JSContextPointerPointer,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_ExecutePendingJob\", \"number\", [\"number\", \"number\", \"number\"]),\n )\n\n QTS_ExecutePendingJob_MaybeAsync: (\n rt: JSRuntimePointer,\n maxJobsToExecute: number,\n lastJobContext: JSContextPointerPointer,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\n \"QTS_ExecutePendingJob\",\n \"number\",\n [\"number\", \"number\", \"number\"],\n )\n\n QTS_GetProp: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_GetProp\", \"number\", [\"number\", \"number\", \"number\"]),\n )\n\n QTS_GetProp_MaybeAsync: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\"QTS_GetProp\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_GetPropNumber: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: number,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_GetPropNumber\", \"number\", [\"number\", \"number\", \"number\"]),\n )\n\n QTS_GetPropNumber_MaybeAsync: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: number,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\"QTS_GetPropNumber\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_SetProp: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n prop_value: JSValuePointer | JSValueConstPointer,\n ) => void = assertSync(\n this.module.cwrap(\"QTS_SetProp\", null, [\"number\", \"number\", \"number\", \"number\"]),\n )\n\n QTS_SetProp_MaybeAsync: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n prop_value: JSValuePointer | JSValueConstPointer,\n ) => void | Promise<void> = this.module.cwrap(\"QTS_SetProp\", null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_DefineProp: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n prop_value: JSValuePointer | JSValueConstPointer,\n get: JSValuePointer | JSValueConstPointer,\n set: JSValuePointer | JSValueConstPointer,\n configurable: boolean,\n enumerable: boolean,\n has_value: boolean,\n ) => void = this.module.cwrap(\"QTS_DefineProp\", null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"boolean\",\n \"boolean\",\n \"boolean\",\n ])\n\n QTS_GetOwnPropertyNames: (\n ctx: JSContextPointer,\n out_ptrs: JSValuePointerPointerPointer,\n out_len: UInt32Pointer,\n obj: JSValuePointer | JSValueConstPointer,\n flags: number,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_GetOwnPropertyNames\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n ]),\n )\n\n QTS_GetOwnPropertyNames_MaybeAsync: (\n ctx: JSContextPointer,\n out_ptrs: JSValuePointerPointerPointer,\n out_len: UInt32Pointer,\n obj: JSValuePointer | JSValueConstPointer,\n flags: number,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\n \"QTS_GetOwnPropertyNames\",\n \"number\",\n [\"number\", \"number\", \"number\", \"number\", \"number\"],\n )\n\n QTS_Call: (\n ctx: JSContextPointer,\n func_obj: JSValuePointer | JSValueConstPointer,\n this_obj: JSValuePointer | JSValueConstPointer,\n argc: number,\n argv_ptrs: JSValueConstPointerPointer,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_Call\", \"number\", [\"number\", \"number\", \"number\", \"number\", \"number\"]),\n )\n\n QTS_Call_MaybeAsync: (\n ctx: JSContextPointer,\n func_obj: JSValuePointer | JSValueConstPointer,\n this_obj: JSValuePointer | JSValueConstPointer,\n argc: number,\n argv_ptrs: JSValueConstPointerPointer,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\"QTS_Call\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_ResolveException: (ctx: JSContextPointer, maybe_exception: JSValuePointer) => JSValuePointer =\n this.module.cwrap(\"QTS_ResolveException\", \"number\", [\"number\", \"number\"])\n\n QTS_Dump: (\n ctx: JSContextPointer,\n obj: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer = assertSync(\n this.module.cwrap(\"QTS_Dump\", \"number\", [\"number\", \"number\"]),\n )\n\n QTS_Dump_MaybeAsync: (\n ctx: JSContextPointer,\n obj: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer | Promise<JSBorrowedCharPointer> = this.module.cwrap(\n \"QTS_Dump\",\n \"number\",\n [\"number\", \"number\"],\n )\n\n QTS_Eval: (\n ctx: JSContextPointer,\n js_code: BorrowedHeapCharPointer,\n js_code_length: number,\n filename: string,\n detectModule: EvalDetectModule,\n evalFlags: EvalFlags,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_Eval\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"string\",\n \"number\",\n \"number\",\n ]),\n )\n\n QTS_Eval_MaybeAsync: (\n ctx: JSContextPointer,\n js_code: BorrowedHeapCharPointer,\n js_code_length: number,\n filename: string,\n detectModule: EvalDetectModule,\n evalFlags: EvalFlags,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\"QTS_Eval\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"string\",\n \"number\",\n \"number\",\n ])\n\n QTS_GetModuleNamespace: (\n ctx: JSContextPointer,\n module_func_obj: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_GetModuleNamespace\", \"number\", [\"number\", \"number\"])\n\n QTS_Typeof: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => OwnedHeapCharPointer = this.module.cwrap(\"QTS_Typeof\", \"number\", [\"number\", \"number\"])\n\n QTS_GetLength: (\n ctx: JSContextPointer,\n out_len: UInt32Pointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => number = this.module.cwrap(\"QTS_GetLength\", \"number\", [\"number\", \"number\", \"number\"])\n\n QTS_IsEqual: (\n ctx: JSContextPointer,\n a: JSValuePointer | JSValueConstPointer,\n b: JSValuePointer | JSValueConstPointer,\n op: IsEqualOp,\n ) => number = this.module.cwrap(\"QTS_IsEqual\", \"number\", [\"number\", \"number\", \"number\", \"number\"])\n\n QTS_GetGlobalObject: (ctx: JSContextPointer) => JSValuePointer = this.module.cwrap(\n \"QTS_GetGlobalObject\",\n \"number\",\n [\"number\"],\n )\n\n QTS_NewPromiseCapability: (\n ctx: JSContextPointer,\n resolve_funcs_out: JSValuePointerPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewPromiseCapability\", \"number\", [\n \"number\",\n \"number\",\n ])\n\n QTS_PromiseState: (\n ctx: JSContextPointer,\n promise: JSValuePointer | JSValueConstPointer,\n ) => JSPromiseStateEnum = this.module.cwrap(\"QTS_PromiseState\", \"number\", [\"number\", \"number\"])\n\n QTS_PromiseResult: (\n ctx: JSContextPointer,\n promise: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_PromiseResult\", \"number\", [\"number\", \"number\"])\n\n QTS_TestStringArg: (string: string) => void = this.module.cwrap(\"QTS_TestStringArg\", null, [\n \"string\",\n ])\n\n QTS_GetDebugLogEnabled: (rt: JSRuntimePointer) => number = this.module.cwrap(\n \"QTS_GetDebugLogEnabled\",\n \"number\",\n [\"number\"],\n )\n\n QTS_SetDebugLogEnabled: (rt: JSRuntimePointer, is_enabled: number) => void = this.module.cwrap(\n \"QTS_SetDebugLogEnabled\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_BuildIsDebug: () => number = this.module.cwrap(\"QTS_BuildIsDebug\", \"number\", [])\n\n QTS_BuildIsAsyncify: () => number = this.module.cwrap(\"QTS_BuildIsAsyncify\", \"number\", [])\n\n QTS_NewFunction: (\n ctx: JSContextPointer,\n name: string,\n arg_length: number,\n is_constructor: boolean,\n host_ref_id: HostRefId,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewFunction\", \"number\", [\n \"number\",\n \"string\",\n \"number\",\n \"boolean\",\n \"number\",\n ])\n\n QTS_ArgvGetJSValueConstPointer: (\n argv: JSValuePointer | JSValueConstPointer,\n index: number,\n ) => JSValueConstPointer = this.module.cwrap(\"QTS_ArgvGetJSValueConstPointer\", \"number\", [\n \"number\",\n \"number\",\n ])\n\n QTS_RuntimeEnableInterruptHandler: (rt: JSRuntimePointer) => void = this.module.cwrap(\n \"QTS_RuntimeEnableInterruptHandler\",\n null,\n [\"number\"],\n )\n\n QTS_RuntimeDisableInterruptHandler: (rt: JSRuntimePointer) => void = this.module.cwrap(\n \"QTS_RuntimeDisableInterruptHandler\",\n null,\n [\"number\"],\n )\n\n QTS_RuntimeEnableModuleLoader: (rt: JSRuntimePointer, use_custom_normalize: number) => void =\n this.module.cwrap(\"QTS_RuntimeEnableModuleLoader\", null, [\"number\", \"number\"])\n\n QTS_RuntimeDisableModuleLoader: (rt: JSRuntimePointer) => void = this.module.cwrap(\n \"QTS_RuntimeDisableModuleLoader\",\n null,\n [\"number\"],\n )\n\n QTS_bjson_encode: (\n ctx: JSContextPointer,\n val: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_bjson_encode\", \"number\", [\"number\", \"number\"])\n\n QTS_bjson_decode: (\n ctx: JSContextPointer,\n data: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_bjson_decode\", \"number\", [\"number\", \"number\"])\n}\n"],"mappings":"AACA,OA0BE,eACK,0BASA,IAAM,gBAAN,KAAsB,CAC3B,YAAoB,OAAsC,CAAtC,mBAEpB,KAAS,MAAQ,GAEjB,eAGsB,KAAK,OAAO,MAAM,YAAa,SAAU,CAAC,SAAU,QAAQ,CAAC,EAEnF,kBAA0D,KAAK,OAAO,MACpE,eACA,SACA,CAAC,QAAQ,CACX,EAEA,+BAA2E,KAAK,OAAO,MACrF,4BACA,KACA,CAAC,SAAU,QAAQ,CACrB,EAEA,mCACE,KAAK,OAAO,MAAM,gCAAiC,SAAU,CAAC,SAAU,QAAQ,CAAC,EAEnF,gCAA6E,KAAK,OAAO,MACvF,6BACA,SACA,CAAC,QAAQ,CACX,EAEA,8BAAyC,KAAK,OAAO,MACnD,2BACA,SACA,CAAC,CACH,EAEA,6BAAwC,KAAK,OAAO,MAAM,0BAA2B,SAAU,CAAC,CAAC,EAEjG,gCACE,KAAK,OAAO,MAAM,6BAA8B,KAAM,CAAC,SAAU,QAAQ,CAAC,EAE5E,sBAA8C,KAAK,OAAO,MAAM,mBAAoB,SAAU,CAAC,CAAC,EAEhG,iBAAyC,KAAK,OAAO,MAAM,cAAe,SAAU,CAAC,CAAC,EAEtF,kBAA0C,KAAK,OAAO,MAAM,eAAgB,SAAU,CAAC,CAAC,EAExF,iBAAyC,KAAK,OAAO,MAAM,cAAe,SAAU,CAAC,CAAC,EAEtF,oBAA2E,KAAK,OAAO,MACrF,iBACA,SACA,CAAC,SAAU,QAAQ,CACrB,EAEA,sBAA+E,KAAK,OAAO,MACzF,mBACA,SACA,CAAC,QAAQ,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,CAAC,EAE9F,uBAGsB,KAAK,OAAO,MAAM,oBAAqB,SAAU,CAAC,SAAU,QAAQ,CAAC,EAE3F,uBAA8C,KAAK,OAAO,MAAM,oBAAqB,KAAM,CACzF,QACF,CAAC,EAED,4BAA2D,KAAK,OAAO,MACrE,yBACA,SACA,CAAC,QAAQ,CACX,EAEA,4BAA6E,KAAK,OAAO,MACvF,yBACA,KACA,CAAC,SAAU,QAAQ,CACrB,EAEA,sBAAiC,KAAK,OAAO,MAAM,mBAAoB,SAAU,CAAC,CAAC,EAEnF,yBAAoC,KAAK,OAAO,MAAM,sBAAuB,SAAU,CAAC,CAAC,EAEzF,qBAMsB,KAAK,OAAO,MAAM,kBAAmB,SAAU,CACnE,SACA,SACA,SACA,UACA,QACF,CAAC,EAED,oCAG2B,KAAK,OAAO,MAAM,iCAAkC,SAAU,CACvF,SACA,QACF,CAAC,EAED,uCAAoE,KAAK,OAAO,MAC9E,oCACA,KACA,CAAC,QAAQ,CACX,EAEA,wCAAqE,KAAK,OAAO,MAC/E,qCACA,KACA,CAAC,QAAQ,CACX,EAEA,mCACE,KAAK,OAAO,MAAM,gCAAiC,KAAM,CAAC,SAAU,QAAQ,CAAC,EAE/E,oCAAiE,KAAK,OAAO,MAC3E,iCACA,KACA,CAAC,QAAQ,CACX,EAEA,sBAGsB,KAAK,OAAO,MAAM,mBAAoB,SAAU,CAAC,SAAU,QAAQ,CAAC,EAE1F,sBAGsB,KAAK,OAAO,MAAM,mBAAoB,SAAU,CAAC,SAAU,QAAQ,CAAC,CA3f/B,CA4f7D","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { QuickJSAsyncVariant } from '@jitl/quickjs-ffi-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ### @jitl/quickjs-wasmfile-release-asyncify
|
|
5
|
+
*
|
|
6
|
+
* [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md) |
|
|
7
|
+
* Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.
|
|
8
|
+
*
|
|
9
|
+
* | Variable | Setting | Description |
|
|
10
|
+
* | -- | -- | -- |
|
|
11
|
+
* | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Version [2025-09-13+f1139494](https://github.com/bellard/quickjs/commit/f1139494d18a2053630c5ed3384a42bb70db3c53) vendored to quickjs-emscripten on 2026-02-15. |
|
|
12
|
+
* | releaseMode | release | Optimized for performance; use when building/deploying your application. |
|
|
13
|
+
* | syncMode | asyncify | Build run through the ASYNCIFY WebAssembly transform. This imposes substantial size (2x the size of sync) and speed penalties (40% the speed of sync). In return, allows synchronous calls from the QuickJS WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to! The [QuickJSAsyncRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) classes expose the ASYNCIFY-specific APIs. |
|
|
14
|
+
* | emscriptenInclusion | wasm | Has a separate .wasm file. May offer better caching in your browser, and reduces the size of your JS bundle. If you have issues, try a 'singlefile' variant. |
|
|
15
|
+
* | exports | require import browser workerd | Has these package.json export conditions |
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
declare const variant: QuickJSAsyncVariant;
|
|
19
|
+
|
|
20
|
+
export { variant as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { QuickJSAsyncVariant } from '@jitl/quickjs-ffi-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ### @jitl/quickjs-wasmfile-release-asyncify
|
|
5
|
+
*
|
|
6
|
+
* [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md) |
|
|
7
|
+
* Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.
|
|
8
|
+
*
|
|
9
|
+
* | Variable | Setting | Description |
|
|
10
|
+
* | -- | -- | -- |
|
|
11
|
+
* | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Version [2025-09-13+f1139494](https://github.com/bellard/quickjs/commit/f1139494d18a2053630c5ed3384a42bb70db3c53) vendored to quickjs-emscripten on 2026-02-15. |
|
|
12
|
+
* | releaseMode | release | Optimized for performance; use when building/deploying your application. |
|
|
13
|
+
* | syncMode | asyncify | Build run through the ASYNCIFY WebAssembly transform. This imposes substantial size (2x the size of sync) and speed penalties (40% the speed of sync). In return, allows synchronous calls from the QuickJS WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to! The [QuickJSAsyncRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) classes expose the ASYNCIFY-specific APIs. |
|
|
14
|
+
* | emscriptenInclusion | wasm | Has a separate .wasm file. May offer better caching in your browser, and reduces the size of your JS bundle. If you have issues, try a 'singlefile' variant. |
|
|
15
|
+
* | exports | require import browser workerd | Has these package.json export conditions |
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
18
|
+
declare const variant: QuickJSAsyncVariant;
|
|
19
|
+
|
|
20
|
+
export { variant as default };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __esm=(fn,res)=>function(){return fn&&(res=(0,fn[__getOwnPropNames(fn)[0]])(fn=0)),res};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod)),__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var ffi_exports={};__export(ffi_exports,{QuickJSAsyncFFI:()=>QuickJSAsyncFFI});var import_quickjs_ffi_types,QuickJSAsyncFFI,init_ffi=__esm({"src/ffi.ts"(){"use strict";import_quickjs_ffi_types=require("@jitl/quickjs-ffi-types"),QuickJSAsyncFFI=class{constructor(module2){this.module=module2;this.DEBUG=!1;this.QTS_Throw=this.module.cwrap("QTS_Throw","number",["number","number"]);this.QTS_NewError=this.module.cwrap("QTS_NewError","number",["number"]);this.QTS_RuntimeSetMemoryLimit=this.module.cwrap("QTS_RuntimeSetMemoryLimit",null,["number","number"]);this.QTS_RuntimeComputeMemoryUsage=this.module.cwrap("QTS_RuntimeComputeMemoryUsage","number",["number","number"]);this.QTS_RuntimeDumpMemoryUsage=this.module.cwrap("QTS_RuntimeDumpMemoryUsage","number",["number"]);this.QTS_RecoverableLeakCheck=this.module.cwrap("QTS_RecoverableLeakCheck","number",[]);this.QTS_BuildIsSanitizeLeak=this.module.cwrap("QTS_BuildIsSanitizeLeak","number",[]);this.QTS_RuntimeSetMaxStackSize=this.module.cwrap("QTS_RuntimeSetMaxStackSize",null,["number","number"]);this.QTS_GetUndefined=this.module.cwrap("QTS_GetUndefined","number",[]);this.QTS_GetNull=this.module.cwrap("QTS_GetNull","number",[]);this.QTS_GetFalse=this.module.cwrap("QTS_GetFalse","number",[]);this.QTS_GetTrue=this.module.cwrap("QTS_GetTrue","number",[]);this.QTS_NewHostRef=this.module.cwrap("QTS_NewHostRef","number",["number","number"]);this.QTS_GetHostRefId=this.module.cwrap("QTS_GetHostRefId","number",["number"]);this.QTS_NewRuntime=this.module.cwrap("QTS_NewRuntime","number",[]);this.QTS_FreeRuntime=this.module.cwrap("QTS_FreeRuntime",null,["number"]);this.QTS_NewContext=this.module.cwrap("QTS_NewContext","number",["number","number"]);this.QTS_FreeContext=this.module.cwrap("QTS_FreeContext",null,["number"]);this.QTS_FreeValuePointer=this.module.cwrap("QTS_FreeValuePointer",null,["number","number"]);this.QTS_FreeValuePointerRuntime=this.module.cwrap("QTS_FreeValuePointerRuntime",null,["number","number"]);this.QTS_FreeVoidPointer=this.module.cwrap("QTS_FreeVoidPointer",null,["number","number"]);this.QTS_FreeCString=this.module.cwrap("QTS_FreeCString",null,["number","number"]);this.QTS_DupValuePointer=this.module.cwrap("QTS_DupValuePointer","number",["number","number"]);this.QTS_NewObject=this.module.cwrap("QTS_NewObject","number",["number"]);this.QTS_NewObjectProto=this.module.cwrap("QTS_NewObjectProto","number",["number","number"]);this.QTS_NewArray=this.module.cwrap("QTS_NewArray","number",["number"]);this.QTS_NewArrayBuffer=this.module.cwrap("QTS_NewArrayBuffer","number",["number","number","number"]);this.QTS_NewFloat64=this.module.cwrap("QTS_NewFloat64","number",["number","number"]);this.QTS_GetFloat64=this.module.cwrap("QTS_GetFloat64","number",["number","number"]);this.QTS_NewString=this.module.cwrap("QTS_NewString","number",["number","number"]);this.QTS_GetString=this.module.cwrap("QTS_GetString","number",["number","number"]);this.QTS_GetArrayBuffer=this.module.cwrap("QTS_GetArrayBuffer","number",["number","number"]);this.QTS_GetArrayBufferLength=this.module.cwrap("QTS_GetArrayBufferLength","number",["number","number"]);this.QTS_NewSymbol=this.module.cwrap("QTS_NewSymbol","number",["number","number","number"]);this.QTS_GetSymbolDescriptionOrKey=(0,import_quickjs_ffi_types.assertSync)(this.module.cwrap("QTS_GetSymbolDescriptionOrKey","number",["number","number"]));this.QTS_GetSymbolDescriptionOrKey_MaybeAsync=this.module.cwrap("QTS_GetSymbolDescriptionOrKey","number",["number","number"]);this.QTS_IsGlobalSymbol=this.module.cwrap("QTS_IsGlobalSymbol","number",["number","number"]);this.QTS_IsJobPending=this.module.cwrap("QTS_IsJobPending","number",["number"]);this.QTS_ExecutePendingJob=(0,import_quickjs_ffi_types.assertSync)(this.module.cwrap("QTS_ExecutePendingJob","number",["number","number","number"]));this.QTS_ExecutePendingJob_MaybeAsync=this.module.cwrap("QTS_ExecutePendingJob","number",["number","number","number"]);this.QTS_GetProp=(0,import_quickjs_ffi_types.assertSync)(this.module.cwrap("QTS_GetProp","number",["number","number","number"]));this.QTS_GetProp_MaybeAsync=this.module.cwrap("QTS_GetProp","number",["number","number","number"]);this.QTS_GetPropNumber=(0,import_quickjs_ffi_types.assertSync)(this.module.cwrap("QTS_GetPropNumber","number",["number","number","number"]));this.QTS_GetPropNumber_MaybeAsync=this.module.cwrap("QTS_GetPropNumber","number",["number","number","number"]);this.QTS_SetProp=(0,import_quickjs_ffi_types.assertSync)(this.module.cwrap("QTS_SetProp",null,["number","number","number","number"]));this.QTS_SetProp_MaybeAsync=this.module.cwrap("QTS_SetProp",null,["number","number","number","number"]);this.QTS_DefineProp=this.module.cwrap("QTS_DefineProp",null,["number","number","number","number","number","number","boolean","boolean","boolean"]);this.QTS_GetOwnPropertyNames=(0,import_quickjs_ffi_types.assertSync)(this.module.cwrap("QTS_GetOwnPropertyNames","number",["number","number","number","number","number"]));this.QTS_GetOwnPropertyNames_MaybeAsync=this.module.cwrap("QTS_GetOwnPropertyNames","number",["number","number","number","number","number"]);this.QTS_Call=(0,import_quickjs_ffi_types.assertSync)(this.module.cwrap("QTS_Call","number",["number","number","number","number","number"]));this.QTS_Call_MaybeAsync=this.module.cwrap("QTS_Call","number",["number","number","number","number","number"]);this.QTS_ResolveException=this.module.cwrap("QTS_ResolveException","number",["number","number"]);this.QTS_Dump=(0,import_quickjs_ffi_types.assertSync)(this.module.cwrap("QTS_Dump","number",["number","number"]));this.QTS_Dump_MaybeAsync=this.module.cwrap("QTS_Dump","number",["number","number"]);this.QTS_Eval=(0,import_quickjs_ffi_types.assertSync)(this.module.cwrap("QTS_Eval","number",["number","number","number","string","number","number"]));this.QTS_Eval_MaybeAsync=this.module.cwrap("QTS_Eval","number",["number","number","number","string","number","number"]);this.QTS_GetModuleNamespace=this.module.cwrap("QTS_GetModuleNamespace","number",["number","number"]);this.QTS_Typeof=this.module.cwrap("QTS_Typeof","number",["number","number"]);this.QTS_GetLength=this.module.cwrap("QTS_GetLength","number",["number","number","number"]);this.QTS_IsEqual=this.module.cwrap("QTS_IsEqual","number",["number","number","number","number"]);this.QTS_GetGlobalObject=this.module.cwrap("QTS_GetGlobalObject","number",["number"]);this.QTS_NewPromiseCapability=this.module.cwrap("QTS_NewPromiseCapability","number",["number","number"]);this.QTS_PromiseState=this.module.cwrap("QTS_PromiseState","number",["number","number"]);this.QTS_PromiseResult=this.module.cwrap("QTS_PromiseResult","number",["number","number"]);this.QTS_TestStringArg=this.module.cwrap("QTS_TestStringArg",null,["string"]);this.QTS_GetDebugLogEnabled=this.module.cwrap("QTS_GetDebugLogEnabled","number",["number"]);this.QTS_SetDebugLogEnabled=this.module.cwrap("QTS_SetDebugLogEnabled",null,["number","number"]);this.QTS_BuildIsDebug=this.module.cwrap("QTS_BuildIsDebug","number",[]);this.QTS_BuildIsAsyncify=this.module.cwrap("QTS_BuildIsAsyncify","number",[]);this.QTS_NewFunction=this.module.cwrap("QTS_NewFunction","number",["number","string","number","boolean","number"]);this.QTS_ArgvGetJSValueConstPointer=this.module.cwrap("QTS_ArgvGetJSValueConstPointer","number",["number","number"]);this.QTS_RuntimeEnableInterruptHandler=this.module.cwrap("QTS_RuntimeEnableInterruptHandler",null,["number"]);this.QTS_RuntimeDisableInterruptHandler=this.module.cwrap("QTS_RuntimeDisableInterruptHandler",null,["number"]);this.QTS_RuntimeEnableModuleLoader=this.module.cwrap("QTS_RuntimeEnableModuleLoader",null,["number","number"]);this.QTS_RuntimeDisableModuleLoader=this.module.cwrap("QTS_RuntimeDisableModuleLoader",null,["number"]);this.QTS_bjson_encode=this.module.cwrap("QTS_bjson_encode","number",["number","number"]);this.QTS_bjson_decode=this.module.cwrap("QTS_bjson_decode","number",["number","number"])}}}});var src_exports={};__export(src_exports,{default:()=>src_default});module.exports=__toCommonJS(src_exports);var variant={type:"async",importFFI:()=>Promise.resolve().then(()=>(init_ffi(),ffi_exports)).then(mod=>mod.QuickJSAsyncFFI),importModuleLoader:()=>import("@jitl/quickjs-wasmfile-release-asyncify/emscripten-module").then(mod=>mod.default)},src_default=variant;
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ffi.ts","../src/index.ts"],"sourcesContent":["// This file generated by \"generate.ts ffi\" in the root of the repo.\nimport {\n QuickJSAsyncEmscriptenModule,\n JSRuntimePointer,\n JSContextPointer,\n JSContextPointerPointer,\n JSModuleDefPointer,\n JSValuePointer,\n JSValueConstPointer,\n JSValuePointerPointer,\n JSValuePointerPointerPointer,\n JSValueConstPointerPointer,\n QTS_C_To_HostCallbackFuncPointer,\n QTS_C_To_HostInterruptFuncPointer,\n QTS_C_To_HostLoadModuleFuncPointer,\n BorrowedHeapCharPointer,\n OwnedHeapCharPointer,\n JSBorrowedCharPointer,\n JSVoidPointer,\n UInt32Pointer,\n EvalFlags,\n IntrinsicsFlags,\n EvalDetectModule,\n GetOwnPropertyNamesFlags,\n IsEqualOp,\n HostRefId,\n JSPromiseStateEnum,\n assertSync,\n} from \"@jitl/quickjs-ffi-types\"\n\n/**\n * Low-level FFI bindings to QuickJS's Emscripten module.\n * See instead {@link QuickJSContext}, the public Javascript interface exposed by this\n * library.\n *\n * @unstable The FFI interface is considered private and may change.\n */\nexport class QuickJSAsyncFFI {\n constructor(private module: QuickJSAsyncEmscriptenModule) {}\n /** Set at compile time. */\n readonly DEBUG = false\n\n QTS_Throw: (\n ctx: JSContextPointer,\n error: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_Throw\", \"number\", [\"number\", \"number\"])\n\n QTS_NewError: (ctx: JSContextPointer) => JSValuePointer = this.module.cwrap(\n \"QTS_NewError\",\n \"number\",\n [\"number\"],\n )\n\n QTS_RuntimeSetMemoryLimit: (rt: JSRuntimePointer, limit: number) => void = this.module.cwrap(\n \"QTS_RuntimeSetMemoryLimit\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer =\n this.module.cwrap(\"QTS_RuntimeComputeMemoryUsage\", \"number\", [\"number\", \"number\"])\n\n QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer = this.module.cwrap(\n \"QTS_RuntimeDumpMemoryUsage\",\n \"number\",\n [\"number\"],\n )\n\n QTS_RecoverableLeakCheck: () => number = this.module.cwrap(\n \"QTS_RecoverableLeakCheck\",\n \"number\",\n [],\n )\n\n QTS_BuildIsSanitizeLeak: () => number = this.module.cwrap(\"QTS_BuildIsSanitizeLeak\", \"number\", [])\n\n QTS_RuntimeSetMaxStackSize: (rt: JSRuntimePointer, stack_size: number) => void =\n this.module.cwrap(\"QTS_RuntimeSetMaxStackSize\", null, [\"number\", \"number\"])\n\n QTS_GetUndefined: () => JSValueConstPointer = this.module.cwrap(\"QTS_GetUndefined\", \"number\", [])\n\n QTS_GetNull: () => JSValueConstPointer = this.module.cwrap(\"QTS_GetNull\", \"number\", [])\n\n QTS_GetFalse: () => JSValueConstPointer = this.module.cwrap(\"QTS_GetFalse\", \"number\", [])\n\n QTS_GetTrue: () => JSValueConstPointer = this.module.cwrap(\"QTS_GetTrue\", \"number\", [])\n\n QTS_NewHostRef: (ctx: JSContextPointer, id: HostRefId) => JSValuePointer = this.module.cwrap(\n \"QTS_NewHostRef\",\n \"number\",\n [\"number\", \"number\"],\n )\n\n QTS_GetHostRefId: (value: JSValuePointer | JSValueConstPointer) => HostRefId = this.module.cwrap(\n \"QTS_GetHostRefId\",\n \"number\",\n [\"number\"],\n )\n\n QTS_NewRuntime: () => JSRuntimePointer = this.module.cwrap(\"QTS_NewRuntime\", \"number\", [])\n\n QTS_FreeRuntime: (rt: JSRuntimePointer) => void = this.module.cwrap(\"QTS_FreeRuntime\", null, [\n \"number\",\n ])\n\n QTS_NewContext: (rt: JSRuntimePointer, intrinsics: IntrinsicsFlags) => JSContextPointer =\n this.module.cwrap(\"QTS_NewContext\", \"number\", [\"number\", \"number\"])\n\n QTS_FreeContext: (ctx: JSContextPointer) => void = this.module.cwrap(\"QTS_FreeContext\", null, [\n \"number\",\n ])\n\n QTS_FreeValuePointer: (ctx: JSContextPointer, value: JSValuePointer) => void = this.module.cwrap(\n \"QTS_FreeValuePointer\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_FreeValuePointerRuntime: (rt: JSRuntimePointer, value: JSValuePointer) => void =\n this.module.cwrap(\"QTS_FreeValuePointerRuntime\", null, [\"number\", \"number\"])\n\n QTS_FreeVoidPointer: (ctx: JSContextPointer, ptr: JSVoidPointer) => void = this.module.cwrap(\n \"QTS_FreeVoidPointer\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_FreeCString: (ctx: JSContextPointer, str: JSBorrowedCharPointer) => void = this.module.cwrap(\n \"QTS_FreeCString\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_DupValuePointer: (\n ctx: JSContextPointer,\n val: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_DupValuePointer\", \"number\", [\"number\", \"number\"])\n\n QTS_NewObject: (ctx: JSContextPointer) => JSValuePointer = this.module.cwrap(\n \"QTS_NewObject\",\n \"number\",\n [\"number\"],\n )\n\n QTS_NewObjectProto: (\n ctx: JSContextPointer,\n proto: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewObjectProto\", \"number\", [\"number\", \"number\"])\n\n QTS_NewArray: (ctx: JSContextPointer) => JSValuePointer = this.module.cwrap(\n \"QTS_NewArray\",\n \"number\",\n [\"number\"],\n )\n\n QTS_NewArrayBuffer: (\n ctx: JSContextPointer,\n buffer: JSVoidPointer,\n length: number,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewArrayBuffer\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_NewFloat64: (ctx: JSContextPointer, num: number) => JSValuePointer = this.module.cwrap(\n \"QTS_NewFloat64\",\n \"number\",\n [\"number\", \"number\"],\n )\n\n QTS_GetFloat64: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => number =\n this.module.cwrap(\"QTS_GetFloat64\", \"number\", [\"number\", \"number\"])\n\n QTS_NewString: (ctx: JSContextPointer, string: BorrowedHeapCharPointer) => JSValuePointer =\n this.module.cwrap(\"QTS_NewString\", \"number\", [\"number\", \"number\"])\n\n QTS_GetString: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer = this.module.cwrap(\"QTS_GetString\", \"number\", [\"number\", \"number\"])\n\n QTS_GetArrayBuffer: (\n ctx: JSContextPointer,\n data: JSValuePointer | JSValueConstPointer,\n ) => JSVoidPointer = this.module.cwrap(\"QTS_GetArrayBuffer\", \"number\", [\"number\", \"number\"])\n\n QTS_GetArrayBufferLength: (\n ctx: JSContextPointer,\n data: JSValuePointer | JSValueConstPointer,\n ) => number = this.module.cwrap(\"QTS_GetArrayBufferLength\", \"number\", [\"number\", \"number\"])\n\n QTS_NewSymbol: (\n ctx: JSContextPointer,\n description: BorrowedHeapCharPointer,\n isGlobal: number,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewSymbol\", \"number\", [\"number\", \"number\", \"number\"])\n\n QTS_GetSymbolDescriptionOrKey: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer = assertSync(\n this.module.cwrap(\"QTS_GetSymbolDescriptionOrKey\", \"number\", [\"number\", \"number\"]),\n )\n\n QTS_GetSymbolDescriptionOrKey_MaybeAsync: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer | Promise<JSBorrowedCharPointer> = this.module.cwrap(\n \"QTS_GetSymbolDescriptionOrKey\",\n \"number\",\n [\"number\", \"number\"],\n )\n\n QTS_IsGlobalSymbol: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => number = this.module.cwrap(\"QTS_IsGlobalSymbol\", \"number\", [\"number\", \"number\"])\n\n QTS_IsJobPending: (rt: JSRuntimePointer) => number = this.module.cwrap(\n \"QTS_IsJobPending\",\n \"number\",\n [\"number\"],\n )\n\n QTS_ExecutePendingJob: (\n rt: JSRuntimePointer,\n maxJobsToExecute: number,\n lastJobContext: JSContextPointerPointer,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_ExecutePendingJob\", \"number\", [\"number\", \"number\", \"number\"]),\n )\n\n QTS_ExecutePendingJob_MaybeAsync: (\n rt: JSRuntimePointer,\n maxJobsToExecute: number,\n lastJobContext: JSContextPointerPointer,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\n \"QTS_ExecutePendingJob\",\n \"number\",\n [\"number\", \"number\", \"number\"],\n )\n\n QTS_GetProp: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_GetProp\", \"number\", [\"number\", \"number\", \"number\"]),\n )\n\n QTS_GetProp_MaybeAsync: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\"QTS_GetProp\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_GetPropNumber: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: number,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_GetPropNumber\", \"number\", [\"number\", \"number\", \"number\"]),\n )\n\n QTS_GetPropNumber_MaybeAsync: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: number,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\"QTS_GetPropNumber\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_SetProp: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n prop_value: JSValuePointer | JSValueConstPointer,\n ) => void = assertSync(\n this.module.cwrap(\"QTS_SetProp\", null, [\"number\", \"number\", \"number\", \"number\"]),\n )\n\n QTS_SetProp_MaybeAsync: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n prop_value: JSValuePointer | JSValueConstPointer,\n ) => void | Promise<void> = this.module.cwrap(\"QTS_SetProp\", null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_DefineProp: (\n ctx: JSContextPointer,\n this_val: JSValuePointer | JSValueConstPointer,\n prop_name: JSValuePointer | JSValueConstPointer,\n prop_value: JSValuePointer | JSValueConstPointer,\n get: JSValuePointer | JSValueConstPointer,\n set: JSValuePointer | JSValueConstPointer,\n configurable: boolean,\n enumerable: boolean,\n has_value: boolean,\n ) => void = this.module.cwrap(\"QTS_DefineProp\", null, [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"boolean\",\n \"boolean\",\n \"boolean\",\n ])\n\n QTS_GetOwnPropertyNames: (\n ctx: JSContextPointer,\n out_ptrs: JSValuePointerPointerPointer,\n out_len: UInt32Pointer,\n obj: JSValuePointer | JSValueConstPointer,\n flags: number,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_GetOwnPropertyNames\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n ]),\n )\n\n QTS_GetOwnPropertyNames_MaybeAsync: (\n ctx: JSContextPointer,\n out_ptrs: JSValuePointerPointerPointer,\n out_len: UInt32Pointer,\n obj: JSValuePointer | JSValueConstPointer,\n flags: number,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\n \"QTS_GetOwnPropertyNames\",\n \"number\",\n [\"number\", \"number\", \"number\", \"number\", \"number\"],\n )\n\n QTS_Call: (\n ctx: JSContextPointer,\n func_obj: JSValuePointer | JSValueConstPointer,\n this_obj: JSValuePointer | JSValueConstPointer,\n argc: number,\n argv_ptrs: JSValueConstPointerPointer,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_Call\", \"number\", [\"number\", \"number\", \"number\", \"number\", \"number\"]),\n )\n\n QTS_Call_MaybeAsync: (\n ctx: JSContextPointer,\n func_obj: JSValuePointer | JSValueConstPointer,\n this_obj: JSValuePointer | JSValueConstPointer,\n argc: number,\n argv_ptrs: JSValueConstPointerPointer,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\"QTS_Call\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n ])\n\n QTS_ResolveException: (ctx: JSContextPointer, maybe_exception: JSValuePointer) => JSValuePointer =\n this.module.cwrap(\"QTS_ResolveException\", \"number\", [\"number\", \"number\"])\n\n QTS_Dump: (\n ctx: JSContextPointer,\n obj: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer = assertSync(\n this.module.cwrap(\"QTS_Dump\", \"number\", [\"number\", \"number\"]),\n )\n\n QTS_Dump_MaybeAsync: (\n ctx: JSContextPointer,\n obj: JSValuePointer | JSValueConstPointer,\n ) => JSBorrowedCharPointer | Promise<JSBorrowedCharPointer> = this.module.cwrap(\n \"QTS_Dump\",\n \"number\",\n [\"number\", \"number\"],\n )\n\n QTS_Eval: (\n ctx: JSContextPointer,\n js_code: BorrowedHeapCharPointer,\n js_code_length: number,\n filename: string,\n detectModule: EvalDetectModule,\n evalFlags: EvalFlags,\n ) => JSValuePointer = assertSync(\n this.module.cwrap(\"QTS_Eval\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"string\",\n \"number\",\n \"number\",\n ]),\n )\n\n QTS_Eval_MaybeAsync: (\n ctx: JSContextPointer,\n js_code: BorrowedHeapCharPointer,\n js_code_length: number,\n filename: string,\n detectModule: EvalDetectModule,\n evalFlags: EvalFlags,\n ) => JSValuePointer | Promise<JSValuePointer> = this.module.cwrap(\"QTS_Eval\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"string\",\n \"number\",\n \"number\",\n ])\n\n QTS_GetModuleNamespace: (\n ctx: JSContextPointer,\n module_func_obj: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_GetModuleNamespace\", \"number\", [\"number\", \"number\"])\n\n QTS_Typeof: (\n ctx: JSContextPointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => OwnedHeapCharPointer = this.module.cwrap(\"QTS_Typeof\", \"number\", [\"number\", \"number\"])\n\n QTS_GetLength: (\n ctx: JSContextPointer,\n out_len: UInt32Pointer,\n value: JSValuePointer | JSValueConstPointer,\n ) => number = this.module.cwrap(\"QTS_GetLength\", \"number\", [\"number\", \"number\", \"number\"])\n\n QTS_IsEqual: (\n ctx: JSContextPointer,\n a: JSValuePointer | JSValueConstPointer,\n b: JSValuePointer | JSValueConstPointer,\n op: IsEqualOp,\n ) => number = this.module.cwrap(\"QTS_IsEqual\", \"number\", [\"number\", \"number\", \"number\", \"number\"])\n\n QTS_GetGlobalObject: (ctx: JSContextPointer) => JSValuePointer = this.module.cwrap(\n \"QTS_GetGlobalObject\",\n \"number\",\n [\"number\"],\n )\n\n QTS_NewPromiseCapability: (\n ctx: JSContextPointer,\n resolve_funcs_out: JSValuePointerPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewPromiseCapability\", \"number\", [\n \"number\",\n \"number\",\n ])\n\n QTS_PromiseState: (\n ctx: JSContextPointer,\n promise: JSValuePointer | JSValueConstPointer,\n ) => JSPromiseStateEnum = this.module.cwrap(\"QTS_PromiseState\", \"number\", [\"number\", \"number\"])\n\n QTS_PromiseResult: (\n ctx: JSContextPointer,\n promise: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_PromiseResult\", \"number\", [\"number\", \"number\"])\n\n QTS_TestStringArg: (string: string) => void = this.module.cwrap(\"QTS_TestStringArg\", null, [\n \"string\",\n ])\n\n QTS_GetDebugLogEnabled: (rt: JSRuntimePointer) => number = this.module.cwrap(\n \"QTS_GetDebugLogEnabled\",\n \"number\",\n [\"number\"],\n )\n\n QTS_SetDebugLogEnabled: (rt: JSRuntimePointer, is_enabled: number) => void = this.module.cwrap(\n \"QTS_SetDebugLogEnabled\",\n null,\n [\"number\", \"number\"],\n )\n\n QTS_BuildIsDebug: () => number = this.module.cwrap(\"QTS_BuildIsDebug\", \"number\", [])\n\n QTS_BuildIsAsyncify: () => number = this.module.cwrap(\"QTS_BuildIsAsyncify\", \"number\", [])\n\n QTS_NewFunction: (\n ctx: JSContextPointer,\n name: string,\n arg_length: number,\n is_constructor: boolean,\n host_ref_id: HostRefId,\n ) => JSValuePointer = this.module.cwrap(\"QTS_NewFunction\", \"number\", [\n \"number\",\n \"string\",\n \"number\",\n \"boolean\",\n \"number\",\n ])\n\n QTS_ArgvGetJSValueConstPointer: (\n argv: JSValuePointer | JSValueConstPointer,\n index: number,\n ) => JSValueConstPointer = this.module.cwrap(\"QTS_ArgvGetJSValueConstPointer\", \"number\", [\n \"number\",\n \"number\",\n ])\n\n QTS_RuntimeEnableInterruptHandler: (rt: JSRuntimePointer) => void = this.module.cwrap(\n \"QTS_RuntimeEnableInterruptHandler\",\n null,\n [\"number\"],\n )\n\n QTS_RuntimeDisableInterruptHandler: (rt: JSRuntimePointer) => void = this.module.cwrap(\n \"QTS_RuntimeDisableInterruptHandler\",\n null,\n [\"number\"],\n )\n\n QTS_RuntimeEnableModuleLoader: (rt: JSRuntimePointer, use_custom_normalize: number) => void =\n this.module.cwrap(\"QTS_RuntimeEnableModuleLoader\", null, [\"number\", \"number\"])\n\n QTS_RuntimeDisableModuleLoader: (rt: JSRuntimePointer) => void = this.module.cwrap(\n \"QTS_RuntimeDisableModuleLoader\",\n null,\n [\"number\"],\n )\n\n QTS_bjson_encode: (\n ctx: JSContextPointer,\n val: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_bjson_encode\", \"number\", [\"number\", \"number\"])\n\n QTS_bjson_decode: (\n ctx: JSContextPointer,\n data: JSValuePointer | JSValueConstPointer,\n ) => JSValuePointer = this.module.cwrap(\"QTS_bjson_decode\", \"number\", [\"number\", \"number\"])\n}\n","import type { QuickJSAsyncVariant } from \"@jitl/quickjs-ffi-types\"\n\n/**\n * ### @jitl/quickjs-wasmfile-release-asyncify\n *\n * [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md) |\n * Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.\n *\n * | Variable | Setting | Description |\n * | -- | -- | -- |\n * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Version [2025-09-13+f1139494](https://github.com/bellard/quickjs/commit/f1139494d18a2053630c5ed3384a42bb70db3c53) vendored to quickjs-emscripten on 2026-02-15. |\n * | releaseMode | release | Optimized for performance; use when building/deploying your application. |\n * | syncMode | asyncify | Build run through the ASYNCIFY WebAssembly transform. This imposes substantial size (2x the size of sync) and speed penalties (40% the speed of sync). In return, allows synchronous calls from the QuickJS WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to! The [QuickJSAsyncRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) classes expose the ASYNCIFY-specific APIs. |\n * | emscriptenInclusion | wasm | Has a separate .wasm file. May offer better caching in your browser, and reduces the size of your JS bundle. If you have issues, try a 'singlefile' variant. |\n * | exports | require import browser workerd | Has these package.json export conditions |\n *\n */\nconst variant: QuickJSAsyncVariant = {\n type: \"async\",\n importFFI: () => import(\"./ffi.js\").then((mod) => mod.QuickJSAsyncFFI),\n importModuleLoader: () =>\n import(\"@jitl/quickjs-wasmfile-release-asyncify/emscripten-module\").then((mod) => mod.default),\n} as const\n\nexport default variant\n"],"mappings":"q/BAAA,mFACA,yBAoCa,gBArCb,4CACA,yBA2BO,mCASM,gBAAN,KAAsB,CAC3B,YAAoBA,QAAsC,CAAtC,YAAAA,QAEpB,KAAS,MAAQ,GAEjB,eAGsB,KAAK,OAAO,MAAM,YAAa,SAAU,CAAC,SAAU,QAAQ,CAAC,EAEnF,kBAA0D,KAAK,OAAO,MACpE,eACA,SACA,CAAC,QAAQ,CACX,EAEA,+BAA2E,KAAK,OAAO,MACrF,4BACA,KACA,CAAC,SAAU,QAAQ,CACrB,EAEA,mCACE,KAAK,OAAO,MAAM,gCAAiC,SAAU,CAAC,SAAU,QAAQ,CAAC,EAEnF,gCAA6E,KAAK,OAAO,MACvF,6BACA,SACA,CAAC,QAAQ,CACX,EAEA,8BAAyC,KAAK,OAAO,MACnD,2BACA,SACA,CAAC,CACH,EAEA,6BAAwC,KAAK,OAAO,MAAM,0BAA2B,SAAU,CAAC,CAAC,EAEjG,gCACE,KAAK,OAAO,MAAM,6BAA8B,KAAM,CAAC,SAAU,QAAQ,CAAC,EAE5E,sBAA8C,KAAK,OAAO,MAAM,mBAAoB,SAAU,CAAC,CAAC,EAEhG,iBAAyC,KAAK,OAAO,MAAM,cAAe,SAAU,CAAC,CAAC,EAEtF,kBAA0C,KAAK,OAAO,MAAM,eAAgB,SAAU,CAAC,CAAC,EAEx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AAQ,IAAI,eAAe,EACrE,mBAAoB,IAClB,OAAO,2DAA2D,EAAE,KAAM,KAAQ,IAAI,OAAO,CACjG,EAEO,YAAQ","names":["module"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var variant={type:"async",importFFI:()=>import("./ffi.mjs").then(mod=>mod.QuickJSAsyncFFI),importModuleLoader:()=>import("@jitl/quickjs-wasmfile-release-asyncify/emscripten-module").then(mod=>mod.default)},src_default=variant;export{src_default as default};
|
|
2
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { QuickJSAsyncVariant } from \"@jitl/quickjs-ffi-types\"\n\n/**\n * ### @jitl/quickjs-wasmfile-release-asyncify\n *\n * [Docs](https://github.com/justjake/quickjs-emscripten/blob/main/doc/@jitl/quickjs-wasmfile-release-asyncify/README.md) |\n * Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.\n *\n * | Variable | Setting | Description |\n * | -- | -- | -- |\n * | library | quickjs | The original [bellard/quickjs](https://github.com/bellard/quickjs) library. Version [2025-09-13+f1139494](https://github.com/bellard/quickjs/commit/f1139494d18a2053630c5ed3384a42bb70db3c53) vendored to quickjs-emscripten on 2026-02-15. |\n * | releaseMode | release | Optimized for performance; use when building/deploying your application. |\n * | syncMode | asyncify | Build run through the ASYNCIFY WebAssembly transform. This imposes substantial size (2x the size of sync) and speed penalties (40% the speed of sync). In return, allows synchronous calls from the QuickJS WASM runtime to async functions on the host. The extra magic makes this variant slower than sync variants. Note that both variants support regular async functions. Only adopt ASYNCIFY if you need to! The [QuickJSAsyncRuntime](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncRuntime.md) and [QuickJSAsyncContext](https://github.com/justjake/quickjs-emscripten/blob/main/doc/quickjs-emscripten/classes/QuickJSAsyncContext.md) classes expose the ASYNCIFY-specific APIs. |\n * | emscriptenInclusion | wasm | Has a separate .wasm file. May offer better caching in your browser, and reduces the size of your JS bundle. If you have issues, try a 'singlefile' variant. |\n * | exports | require import browser workerd | Has these package.json export conditions |\n *\n */\nconst variant: QuickJSAsyncVariant = {\n type: \"async\",\n importFFI: () => import(\"./ffi.js\").then((mod) => mod.QuickJSAsyncFFI),\n importModuleLoader: () =>\n import(\"@jitl/quickjs-wasmfile-release-asyncify/emscripten-module\").then((mod) => mod.default),\n} as const\n\nexport default variant\n"],"mappings":"AAiBA,IAAM,QAA+B,CACnC,KAAM,QACN,UAAW,IAAM,OAAO,WAAU,EAAE,KAAM,KAAQ,IAAI,eAAe,EACrE,mBAAoB,IAClB,OAAO,2DAA2D,EAAE,KAAM,KAAQ,IAAI,OAAO,CACjG,EAEO,YAAQ","names":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jitl/quickjs-wasmfile-release-asyncify",
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"version": "0.32.0",
|
|
5
|
+
"description": "Variant of quickjs library: Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/justjake/quickjs-emscripten"
|
|
10
|
+
},
|
|
11
|
+
"author": {
|
|
12
|
+
"name": "Jake Teton-Landis",
|
|
13
|
+
"url": "https://jake.tl"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "yarn build:c && yarn build:ts",
|
|
17
|
+
"build:c": "make",
|
|
18
|
+
"build:ts": "npx tsup",
|
|
19
|
+
"check:types": "npx tsc --project . --noEmit",
|
|
20
|
+
"clean": "make clean",
|
|
21
|
+
"prepare": "yarn clean && yarn build"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"LICENSE",
|
|
25
|
+
"README.md",
|
|
26
|
+
"dist/**/*",
|
|
27
|
+
"!dist/*.tsbuildinfo"
|
|
28
|
+
],
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"main": "./dist/index.js",
|
|
31
|
+
"module": "./dist/index.mjs",
|
|
32
|
+
"browser": "./dist/index.mjs",
|
|
33
|
+
"exports": {
|
|
34
|
+
".": {
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"import": "./dist/index.mjs",
|
|
37
|
+
"require": "./dist/index.js",
|
|
38
|
+
"default": "./dist/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./package.json": "./package.json",
|
|
41
|
+
"./ffi": {
|
|
42
|
+
"types": "./dist/ffi.d.ts",
|
|
43
|
+
"import": "./dist/ffi.mjs",
|
|
44
|
+
"require": "./dist/ffi.js",
|
|
45
|
+
"default": "./dist/ffi.js"
|
|
46
|
+
},
|
|
47
|
+
"./wasm": "./dist/emscripten-module.wasm",
|
|
48
|
+
"./emscripten-module": {
|
|
49
|
+
"types": "./dist/emscripten-module.browser.d.ts",
|
|
50
|
+
"iife": "./dist/emscripten-module.cjs",
|
|
51
|
+
"workerd": "./dist/emscripten-module.cloudflare.cjs",
|
|
52
|
+
"browser": "./dist/emscripten-module.browser.mjs",
|
|
53
|
+
"import": "./dist/emscripten-module.mjs",
|
|
54
|
+
"require": "./dist/emscripten-module.cjs",
|
|
55
|
+
"default": "./dist/emscripten-module.cjs"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@jitl/quickjs-ffi-types": "0.32.0"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
quickjs-emscripten:
|
|
2
|
+
The MIT License
|
|
3
|
+
|
|
4
|
+
quickjs-emscripten copyright (c) 2019-2024 Jake Teton-Landis
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
quickjs:
|
|
26
|
+
QuickJS Javascript Engine
|
|
27
|
+
|
|
28
|
+
Copyright (c) 2017-2021 Fabrice Bellard
|
|
29
|
+
Copyright (c) 2017-2021 Charlie Gordon
|
|
30
|
+
|
|
31
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
32
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
33
|
+
in the Software without restriction, including without limitation the rights
|
|
34
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
35
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
36
|
+
furnished to do so, subject to the following conditions:
|
|
37
|
+
|
|
38
|
+
The above copyright notice and this permission notice shall be included in
|
|
39
|
+
all copies or substantial portions of the Software.
|
|
40
|
+
|
|
41
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
42
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
43
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
44
|
+
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
45
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
46
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
47
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# @jitl/quickjs-wasmfile-release-sync
|
|
2
|
+
|
|
3
|
+
Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.
|
|
4
|
+
|
|
5
|
+
This generated package is part of [quickjs-emscripten](https://github.com/justjake/quickjs-emscripten).
|
|
6
|
+
It contains a variant of the quickjs WASM library, and can be used with quickjs-emscripten-core.
|
|
7
|
+
|
|
8
|
+
```typescript
|
|
9
|
+
import variant from "@jitl/quickjs-wasmfile-release-sync"
|
|
10
|
+
import { newQuickJSWASMModuleFromVariant } from "quickjs-emscripten-core"
|
|
11
|
+
const QuickJS = await newQuickJSWASMModuleFromVariant(variant)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
This variant was built with the following settings:
|
|
15
|
+
|
|
16
|
+
## Library: quickjs
|
|
17
|
+
|
|
18
|
+
The original [bellard/quickjs](https://github.com/bellard/quickjs) library.
|
|
19
|
+
|
|
20
|
+
Version [2025-09-13+f1139494](https://github.com/bellard/quickjs/commit/f1139494d18a2053630c5ed3384a42bb70db3c53) vendored to quickjs-emscripten on 2026-02-15.
|
|
21
|
+
|
|
22
|
+
## Release mode: release
|
|
23
|
+
|
|
24
|
+
Optimized for performance; use when building/deploying your application.
|
|
25
|
+
|
|
26
|
+
## Exports: require import browser workerd
|
|
27
|
+
|
|
28
|
+
Exports the following in package.json for the package entrypoint:
|
|
29
|
+
|
|
30
|
+
- Exports a NodeJS-compatible CommonJS module, which is faster to load and run compared to an ESModule.
|
|
31
|
+
- Exports a NodeJS-compatible ESModule. Cannot be imported synchronously from a NodeJS CommonJS module.
|
|
32
|
+
- Exports a browser-compatible ESModule, designed to work in browsers and browser-like environments.
|
|
33
|
+
- Targets Cloudflare Workers.
|
|
34
|
+
|
|
35
|
+
## Extra async magic? No
|
|
36
|
+
|
|
37
|
+
The default, normal build. Note that both variants support regular async functions.
|
|
38
|
+
|
|
39
|
+
## Single-file, or separate .wasm file? wasm
|
|
40
|
+
|
|
41
|
+
Has a separate .wasm file. May offer better caching in your browser, and reduces the size of your JS bundle. If you have issues, try a 'singlefile' variant.
|
|
42
|
+
|
|
43
|
+
## More details
|
|
44
|
+
|
|
45
|
+
Full variant JSON description:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"library": "quickjs",
|
|
50
|
+
"releaseMode": "release",
|
|
51
|
+
"syncMode": "sync",
|
|
52
|
+
"description": "Variant with separate .WASM file. Supports browser ESM, NodeJS ESM, and NodeJS CommonJS.",
|
|
53
|
+
"emscriptenInclusion": "wasm",
|
|
54
|
+
"exports": {
|
|
55
|
+
"require": {
|
|
56
|
+
"emscriptenEnvironment": ["node"]
|
|
57
|
+
},
|
|
58
|
+
"import": {
|
|
59
|
+
"emscriptenEnvironment": ["node"]
|
|
60
|
+
},
|
|
61
|
+
"browser": {
|
|
62
|
+
"emscriptenEnvironment": ["web", "worker"]
|
|
63
|
+
},
|
|
64
|
+
"workerd": {
|
|
65
|
+
"emscriptenEnvironment": ["web"]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Variant-specific Emscripten build flags:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
[
|
|
75
|
+
"-Oz",
|
|
76
|
+
"-flto",
|
|
77
|
+
"--closure 1",
|
|
78
|
+
"-s FILESYSTEM=0",
|
|
79
|
+
"--pre-js $(TEMPLATES)/pre-extension.js",
|
|
80
|
+
"--pre-js $(TEMPLATES)/pre-wasmMemory.js"
|
|
81
|
+
]
|
|
82
|
+
```
|
package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// Generated from ../../templates/emscripten-module.SYNC.d.ts
|
|
2
|
+
import type { EmscriptenModuleLoader, QuickJSEmscriptenModule } from "@jitl/quickjs-ffi-types"
|
|
3
|
+
/**
|
|
4
|
+
* Emscripten module built from the unmodified [`quickjs/quickjs.h`](../quickjs/quickjs.h)
|
|
5
|
+
* and our FFI support functions [c/interface.c](../c/interface.c).
|
|
6
|
+
*
|
|
7
|
+
* Note that emscripten modules returned by a `MODULARIZE=1` emscripten build
|
|
8
|
+
* (like this one) load asynchronously.
|
|
9
|
+
*/
|
|
10
|
+
declare const ModuleLoader: EmscriptenModuleLoader<QuickJSEmscriptenModule>
|
|
11
|
+
export default ModuleLoader
|
package/dist/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.mjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
async function QuickJSRaw(moduleArg={}){var moduleRtn;var c=moduleArg,aa=!!globalThis.window,n=!!globalThis.WorkerGlobalScope;function q(a){a={log:a||function(){}};for(const d of q.Pa)d(a);return c.quickJSEmscriptenExtensions=a}q.Pa=[];c.quickjsEmscriptenInit=q;q.Pa.push(a=>{a.getWasmMemory=function(){return r}});var t="./this.program",ba=import.meta.url,u="",v,w;
|
|
2
|
+
if(aa||n){try{u=(new URL(".",ba)).href}catch{}n&&(w=a=>{var d=new XMLHttpRequest;d.open("GET",a,!1);d.responseType="arraybuffer";d.send(null);return new Uint8Array(d.response)});v=async a=>{a=await fetch(a,{credentials:"same-origin"});if(a.ok)return a.arrayBuffer();throw Error(a.status+" : "+a.url);}}var y=console.log.bind(console),z=console.error.bind(console),A,B=!1,C,D,E,F,G,H,I,J=!1;
|
|
3
|
+
function K(){var a=r.buffer;c.HEAP8=F=new Int8Array(a);new Int16Array(a);c.HEAPU8=G=new Uint8Array(a);new Uint16Array(a);H=new Int32Array(a);I=new Uint32Array(a);new Float32Array(a);new Float64Array(a);new BigInt64Array(a);new BigUint64Array(a)}function L(a){c.onAbort?.(a);a="Aborted("+a+")";z(a);B=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");E?.(a);throw a;}var M;
|
|
4
|
+
async function ca(a){if(!A)try{var d=await v(a);return new Uint8Array(d)}catch{}if(a==M&&A)a=new Uint8Array(A);else if(w)a=w(a);else throw"both async and sync fetching of the wasm failed";return a}async function da(a,d){try{var b=await ca(a);return await WebAssembly.instantiate(b,d)}catch(e){z(`failed to asynchronously prepare wasm: ${e}`),L(e)}}
|
|
5
|
+
async function ea(a){var d=M;if(!A)try{var b=fetch(d,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(b,a)}catch(e){z(`wasm streaming compile failed: ${e}`),z("falling back to ArrayBuffer instantiation")}return da(d,a)}class N{name="ExitStatus";constructor(a){this.message=`Program terminated with exit(${a})`;this.status=a}}
|
|
6
|
+
var O=a=>{for(;0<a.length;)a.shift()(c)},P=[],fa=[],ha=()=>{var a=c.preRun.shift();fa.push(a)},Q=!0,r,ia=new TextDecoder,ja=(a,d,b,e)=>{b=d+b;if(e)return b;for(;a[d]&&!(d>=b);)++d;return d},R=(a,d,b)=>a?ia.decode(G.subarray(a,ja(G,a,d,b))):"",S=0,ka=[0,31,60,91,121,152,182,213,244,274,305,335],la=[0,31,59,90,120,151,181,212,243,273,304,334],T={},ma=a=>{if(!(a instanceof N||"unwind"==a))throw a;},na=a=>{C=a;Q||0<S||(c.onExit?.(a),B=!0);throw new N(a);},oa=a=>{if(!B)try{a()}catch(d){ma(d)}finally{if(!(Q||
|
|
7
|
+
0<S))try{C=a=C,na(a)}catch(d){ma(d)}}},U=(a,d,b)=>{var e=G;if(!(0<b))return 0;var f=d;b=d+b-1;for(var g=0;g<a.length;++g){var h=a.codePointAt(g);if(127>=h){if(d>=b)break;e[d++]=h}else if(2047>=h){if(d+1>=b)break;e[d++]=192|h>>6;e[d++]=128|h&63}else if(65535>=h){if(d+2>=b)break;e[d++]=224|h>>12;e[d++]=128|h>>6&63;e[d++]=128|h&63}else{if(d+3>=b)break;e[d++]=240|h>>18;e[d++]=128|h>>12&63;e[d++]=128|h>>6&63;e[d++]=128|h&63;g++}}e[d]=0;return d-f},V={},pa=()=>{if(!W){var a={USER:"web_user",LOGNAME:"web_user",
|
|
8
|
+
PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:t||"./this.program"},d;for(d in V)void 0===V[d]?delete a[d]:a[d]=V[d];var b=[];for(d in a)b.push(`${d}=${a[d]}`);W=b}return W},W,X=a=>{for(var d=0,b=0;b<a.length;++b){var e=a.charCodeAt(b);127>=e?d++:2047>=e?d+=2:55296<=e&&57343>=e?(d+=4,++b):d+=3}return d},qa=[null,[],[]],ta=(a,d,b,e)=>{var f={string:k=>{var l=0;if(null!==k&&void 0!==k&&0!==k){l=X(k)+1;var p=Y(l);U(k,p,l);l=p}return l},array:k=>
|
|
9
|
+
{var l=Y(k.length);F.set(k,l);return l}};a=c["_"+a];var g=[],h=0;if(e)for(var m=0;m<e.length;m++){var x=f[b[m]];x?(0===h&&(h=ra()),g[m]=x(e[m])):g[m]=e[m]}b=a(...g);return b=function(k){0!==h&&sa(h);return"string"===d?R(k):"boolean"===d?!!k:k}(b)};c.wasmMemory?r=c.wasmMemory:r=new WebAssembly.Memory({initial:(c.INITIAL_MEMORY||16777216)/65536,maximum:32768});K();c.noExitRuntime&&(Q=c.noExitRuntime);c.print&&(y=c.print);c.printErr&&(z=c.printErr);c.wasmBinary&&(A=c.wasmBinary);c.thisProgram&&(t=c.thisProgram);
|
|
10
|
+
if(c.preInit)for("function"==typeof c.preInit&&(c.preInit=[c.preInit]);0<c.preInit.length;)c.preInit.shift()();c.cwrap=(a,d,b,e)=>{var f=!b||b.every(g=>"number"===g||"boolean"===g);return"string"!==d&&f&&!e?c["_"+a]:(...g)=>ta(a,d,b,g)};c.UTF8ToString=R;c.stringToUTF8=(a,d,b)=>U(a,d,b);c.lengthBytesUTF8=X;
|
|
11
|
+
var ua,sa,Y,ra,va={b:(a,d,b,e)=>L(`Assertion failed: ${R(a)}, at: `+[d?R(d):"unknown filename",b,e?R(e):"unknown function"]),q:()=>L(""),l:()=>{Q=!1;S=0},m:function(a,d){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);a=new Date(1E3*a);H[d>>2]=a.getSeconds();H[d+4>>2]=a.getMinutes();H[d+8>>2]=a.getHours();H[d+12>>2]=a.getDate();H[d+16>>2]=a.getMonth();H[d+20>>2]=a.getFullYear()-1900;H[d+24>>2]=a.getDay();var b=a.getFullYear();H[d+28>>2]=(0!==b%4||0===b%100&&0!==b%400?la:ka)[a.getMonth()]+
|
|
12
|
+
a.getDate()-1|0;H[d+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();var e=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();H[d+32>>2]=(b!=e&&a.getTimezoneOffset()==Math.min(e,b))|0},j:(a,d)=>{T[a]&&(clearTimeout(T[a].id),delete T[a]);if(!d)return 0;var b=setTimeout(()=>{delete T[a];oa(()=>ua(a,performance.now()))},d);T[a]={id:b,Qa:d};return 0},n:(a,d,b,e)=>{var f=(new Date).getFullYear(),g=(new Date(f,0,1)).getTimezoneOffset();f=(new Date(f,6,1)).getTimezoneOffset();
|
|
13
|
+
I[a>>2]=60*Math.max(g,f);H[d>>2]=Number(g!=f);d=h=>{var m=Math.abs(h);return`UTC${0<=h?"-":"+"}${String(Math.floor(m/60)).padStart(2,"0")}${String(m%60).padStart(2,"0")}`};a=d(g);d=d(f);f<g?(U(a,b,17),U(d,e,17)):(U(a,e,17),U(d,b,17))},p:()=>Date.now(),k:a=>{var d=G.length;a>>>=0;if(2147483648<a)return!1;for(var b=1;4>=b;b*=2){var e=d*(1+.2/b);e=Math.min(e,a+100663296);a:{e=(Math.min(2147483648,65536*Math.ceil(Math.max(a,e)/65536))-r.buffer.byteLength+65535)/65536|0;try{r.grow(e);K();var f=1;break a}catch(g){}f=
|
|
14
|
+
void 0}if(f)return!0}return!1},e:(a,d)=>{var b=0,e=0,f;for(f of pa()){var g=d+b;I[a+e>>2]=g;b+=U(f,g,Infinity)+1;e+=4}return 0},f:(a,d)=>{var b=pa();I[a>>2]=b.length;a=0;for(var e of b)a+=X(e)+1;I[d>>2]=a;return 0},d:()=>52,o:function(){return 70},c:(a,d,b,e)=>{for(var f=0,g=0;g<b;g++){var h=I[d>>2],m=I[d+4>>2];d+=8;for(var x=0;x<m;x++){var k=a,l=G[h+x],p=qa[k];0===l||10===l?(k=1===k?y:z,l=ja(p,0),l=ia.decode(p.buffer?p.subarray(0,l):new Uint8Array(p.slice(0,l))),k(l),p.length=0):p.push(l)}f+=m}I[e>>
|
|
15
|
+
2]=f;return 0},a:r,r:na,s:function(a,d,b,e,f){return c.callbacks.callFunction(void 0,a,d,b,e,f)},i:function(a){return c.callbacks.shouldInterrupt(void 0,a)},h:function(a,d,b){b=R(b);return c.callbacks.loadModuleSource(void 0,a,d,b)},g:function(a,d,b,e){b=R(b);e=R(e);return c.callbacks.normalizeModule(void 0,a,d,b,e)},t:function(a,d){c.callbacks.freeHostRef(void 0,a,d)}},Z;
|
|
16
|
+
Z=await (async function(){function a(b){b=Z=b.exports;c._malloc=b.v;c._QTS_Throw=b.w;c._QTS_NewError=b.x;c._QTS_RuntimeSetMemoryLimit=b.y;c._QTS_RuntimeComputeMemoryUsage=b.z;c._QTS_RuntimeDumpMemoryUsage=b.A;c._QTS_RecoverableLeakCheck=b.B;c._QTS_BuildIsSanitizeLeak=b.C;c._QTS_RuntimeSetMaxStackSize=b.D;c._QTS_GetUndefined=b.E;c._QTS_GetNull=b.F;c._QTS_GetFalse=b.G;c._QTS_GetTrue=b.H;c._QTS_NewHostRef=b.I;c._QTS_GetHostRefId=b.J;c._QTS_NewRuntime=b.K;c._QTS_FreeRuntime=b.L;c._free=b.M;
|
|
17
|
+
c._QTS_NewContext=b.N;c._QTS_FreeContext=b.O;c._QTS_FreeValuePointer=b.P;c._QTS_FreeValuePointerRuntime=b.Q;c._QTS_FreeVoidPointer=b.R;c._QTS_FreeCString=b.S;c._QTS_DupValuePointer=b.T;c._QTS_NewObject=b.U;c._QTS_NewObjectProto=b.V;c._QTS_NewArray=b.W;c._QTS_NewArrayBuffer=b.X;c._QTS_NewFloat64=b.Y;c._QTS_GetFloat64=b.Z;c._QTS_NewString=b._;c._QTS_GetString=b.$;c._QTS_GetArrayBuffer=b.aa;c._QTS_GetArrayBufferLength=b.ba;c._QTS_NewSymbol=b.ca;c._QTS_GetSymbolDescriptionOrKey=b.da;c._QTS_IsGlobalSymbol=
|
|
18
|
+
b.ea;c._QTS_IsJobPending=b.fa;c._QTS_ExecutePendingJob=b.ga;c._QTS_GetProp=b.ha;c._QTS_GetPropNumber=b.ia;c._QTS_SetProp=b.ja;c._QTS_DefineProp=b.ka;c._QTS_GetOwnPropertyNames=b.la;c._QTS_Call=b.ma;c._QTS_ResolveException=b.na;c._QTS_Dump=b.oa;c._QTS_Eval=b.pa;c._QTS_GetModuleNamespace=b.qa;c._QTS_Typeof=b.ra;c._QTS_GetLength=b.sa;c._QTS_IsEqual=b.ta;c._QTS_GetGlobalObject=b.ua;c._QTS_NewPromiseCapability=b.va;c._QTS_PromiseState=b.wa;c._QTS_PromiseResult=b.xa;c._QTS_TestStringArg=b.ya;c._QTS_GetDebugLogEnabled=
|
|
19
|
+
b.za;c._QTS_SetDebugLogEnabled=b.Aa;c._QTS_BuildIsDebug=b.Ba;c._QTS_BuildIsAsyncify=b.Ca;c._QTS_NewFunction=b.Da;c._QTS_ArgvGetJSValueConstPointer=b.Ea;c._QTS_RuntimeEnableInterruptHandler=b.Fa;c._QTS_RuntimeDisableInterruptHandler=b.Ga;c._QTS_RuntimeEnableModuleLoader=b.Ha;c._QTS_RuntimeDisableModuleLoader=b.Ia;c._QTS_bjson_encode=b.Ja;c._QTS_bjson_decode=b.Ka;ua=b.La;sa=b.Ma;Y=b.Na;ra=b.Oa;return Z}var d={a:va};if(c.instantiateWasm)return new Promise(b=>{c.instantiateWasm(d,(e,f)=>{b(a(e,f))})});
|
|
20
|
+
M??=c.locateFile?c.locateFile?c.locateFile("emscripten-module.wasm",u):u+"emscripten-module.wasm":(new URL("emscripten-module.wasm",import.meta.url)).href;return a((await ea(d)).instance)}());
|
|
21
|
+
(function(){function a(){c.calledRun=!0;if(!B){J=!0;Z.u();D?.(c);c.onRuntimeInitialized?.();if(c.postRun)for("function"==typeof c.postRun&&(c.postRun=[c.postRun]);c.postRun.length;){var d=c.postRun.shift();P.push(d)}O(P)}}if(c.preRun)for("function"==typeof c.preRun&&(c.preRun=[c.preRun]);c.preRun.length;)ha();O(fa);c.setStatus?(c.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>c.setStatus(""),1);a()},1)):a()})();J?moduleRtn=c:moduleRtn=new Promise((a,d)=>{D=a;E=d});
|
|
22
|
+
;return moduleRtn}export default QuickJSRaw;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
async function QuickJSRaw(moduleArg={}){var moduleRtn;var c=moduleArg;function n(a){a={log:a||function(){}};for(const d of n.Pa)d(a);return c.quickJSEmscriptenExtensions=a}n.Pa=[];c.quickjsEmscriptenInit=n;n.Pa.push(a=>{a.getWasmMemory=function(){return q}});var r="./this.program",t=(a,d)=>{throw d;},u="",v,x,fs=require("node:fs");u=__dirname+"/";x=a=>{a=y(a)?new URL(a):a;return fs.readFileSync(a)};v=async a=>{a=y(a)?new URL(a):a;return fs.readFileSync(a,void 0)};1<process.argv.length&&(r=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);
|
|
2
|
+
t=(a,d)=>{process.exitCode=a;throw d;};var z=console.log.bind(console),A=console.error.bind(console),B,C=!1,D,y=a=>a.startsWith("file://"),E,F,G,H,I,J,K=!1;function L(){var a=q.buffer;c.HEAP8=G=new Int8Array(a);new Int16Array(a);c.HEAPU8=H=new Uint8Array(a);new Uint16Array(a);I=new Int32Array(a);J=new Uint32Array(a);new Float32Array(a);new Float64Array(a);new BigInt64Array(a);new BigUint64Array(a)}
|
|
3
|
+
function M(a){c.onAbort?.(a);a="Aborted("+a+")";A(a);C=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");F?.(a);throw a;}var N;async function aa(a){if(!B)try{var d=await v(a);return new Uint8Array(d)}catch{}if(a==N&&B)a=new Uint8Array(B);else if(x)a=x(a);else throw"both async and sync fetching of the wasm failed";return a}
|
|
4
|
+
async function ba(a){var d=N;try{var b=await aa(d);return await WebAssembly.instantiate(b,a)}catch(e){A(`failed to asynchronously prepare wasm: ${e}`),M(e)}}async function ca(a){return ba(a)}class O{name="ExitStatus";constructor(a){this.message=`Program terminated with exit(${a})`;this.status=a}}
|
|
5
|
+
var P=a=>{for(;0<a.length;)a.shift()(c)},da=[],ea=[],fa=()=>{var a=c.preRun.shift();ea.push(a)},Q=!0,q,ha=new TextDecoder,ia=(a,d,b,e)=>{b=d+b;if(e)return b;for(;a[d]&&!(d>=b);)++d;return d},R=(a,d,b)=>a?ha.decode(H.subarray(a,ia(H,a,d,b))):"",S=0,ja=[0,31,60,91,121,152,182,213,244,274,305,335],ka=[0,31,59,90,120,151,181,212,243,273,304,334],T={},la=a=>{D=a;Q||0<S||(c.onExit?.(a),C=!0);t(a,new O(a))},ma=a=>{if(!C)try{a()}catch(d){d instanceof O||"unwind"==d||t(1,d)}finally{if(!(Q||0<S))try{D=a=D,
|
|
6
|
+
la(a)}catch(d){d instanceof O||"unwind"==d||t(1,d)}}},U=(a,d,b)=>{var e=H;if(!(0<b))return 0;var f=d;b=d+b-1;for(var g=0;g<a.length;++g){var h=a.codePointAt(g);if(127>=h){if(d>=b)break;e[d++]=h}else if(2047>=h){if(d+1>=b)break;e[d++]=192|h>>6;e[d++]=128|h&63}else if(65535>=h){if(d+2>=b)break;e[d++]=224|h>>12;e[d++]=128|h>>6&63;e[d++]=128|h&63}else{if(d+3>=b)break;e[d++]=240|h>>18;e[d++]=128|h>>12&63;e[d++]=128|h>>6&63;e[d++]=128|h&63;g++}}e[d]=0;return d-f},V={},na=()=>{if(!W){var a={USER:"web_user",
|
|
7
|
+
LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:r||"./this.program"},d;for(d in V)void 0===V[d]?delete a[d]:a[d]=V[d];var b=[];for(d in a)b.push(`${d}=${a[d]}`);W=b}return W},W,X=a=>{for(var d=0,b=0;b<a.length;++b){var e=a.charCodeAt(b);127>=e?d++:2047>=e?d+=2:55296<=e&&57343>=e?(d+=4,++b):d+=3}return d},oa=[null,[],[]],ra=(a,d,b,e)=>{var f={string:k=>{var l=0;if(null!==k&&void 0!==k&&0!==k){l=X(k)+1;var p=Y(l);U(k,p,
|
|
8
|
+
l);l=p}return l},array:k=>{var l=Y(k.length);G.set(k,l);return l}};a=c["_"+a];var g=[],h=0;if(e)for(var m=0;m<e.length;m++){var w=f[b[m]];w?(0===h&&(h=pa()),g[m]=w(e[m])):g[m]=e[m]}b=a(...g);return b=function(k){0!==h&&qa(h);return"string"===d?R(k):"boolean"===d?!!k:k}(b)};c.wasmMemory?q=c.wasmMemory:q=new WebAssembly.Memory({initial:(c.INITIAL_MEMORY||16777216)/65536,maximum:32768});L();c.noExitRuntime&&(Q=c.noExitRuntime);c.print&&(z=c.print);c.printErr&&(A=c.printErr);c.wasmBinary&&(B=c.wasmBinary);
|
|
9
|
+
c.thisProgram&&(r=c.thisProgram);if(c.preInit)for("function"==typeof c.preInit&&(c.preInit=[c.preInit]);0<c.preInit.length;)c.preInit.shift()();c.cwrap=(a,d,b,e)=>{var f=!b||b.every(g=>"number"===g||"boolean"===g);return"string"!==d&&f&&!e?c["_"+a]:(...g)=>ra(a,d,b,g)};c.UTF8ToString=R;c.stringToUTF8=(a,d,b)=>U(a,d,b);c.lengthBytesUTF8=X;
|
|
10
|
+
var sa,qa,Y,pa,ta={b:(a,d,b,e)=>M(`Assertion failed: ${R(a)}, at: `+[d?R(d):"unknown filename",b,e?R(e):"unknown function"]),q:()=>M(""),l:()=>{Q=!1;S=0},m:function(a,d){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);a=new Date(1E3*a);I[d>>2]=a.getSeconds();I[d+4>>2]=a.getMinutes();I[d+8>>2]=a.getHours();I[d+12>>2]=a.getDate();I[d+16>>2]=a.getMonth();I[d+20>>2]=a.getFullYear()-1900;I[d+24>>2]=a.getDay();var b=a.getFullYear();I[d+28>>2]=(0!==b%4||0===b%100&&0!==b%400?ka:ja)[a.getMonth()]+
|
|
11
|
+
a.getDate()-1|0;I[d+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();var e=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();I[d+32>>2]=(b!=e&&a.getTimezoneOffset()==Math.min(e,b))|0},j:(a,d)=>{T[a]&&(clearTimeout(T[a].id),delete T[a]);if(!d)return 0;var b=setTimeout(()=>{delete T[a];ma(()=>sa(a,performance.now()))},d);T[a]={id:b,Qa:d};return 0},n:(a,d,b,e)=>{var f=(new Date).getFullYear(),g=(new Date(f,0,1)).getTimezoneOffset();f=(new Date(f,6,1)).getTimezoneOffset();
|
|
12
|
+
J[a>>2]=60*Math.max(g,f);I[d>>2]=Number(g!=f);d=h=>{var m=Math.abs(h);return`UTC${0<=h?"-":"+"}${String(Math.floor(m/60)).padStart(2,"0")}${String(m%60).padStart(2,"0")}`};a=d(g);d=d(f);f<g?(U(a,b,17),U(d,e,17)):(U(a,e,17),U(d,b,17))},p:()=>Date.now(),k:a=>{var d=H.length;a>>>=0;if(2147483648<a)return!1;for(var b=1;4>=b;b*=2){var e=d*(1+.2/b);e=Math.min(e,a+100663296);a:{e=(Math.min(2147483648,65536*Math.ceil(Math.max(a,e)/65536))-q.buffer.byteLength+65535)/65536|0;try{q.grow(e);L();var f=1;break a}catch(g){}f=
|
|
13
|
+
void 0}if(f)return!0}return!1},e:(a,d)=>{var b=0,e=0,f;for(f of na()){var g=d+b;J[a+e>>2]=g;b+=U(f,g,Infinity)+1;e+=4}return 0},f:(a,d)=>{var b=na();J[a>>2]=b.length;a=0;for(var e of b)a+=X(e)+1;J[d>>2]=a;return 0},d:()=>52,o:function(){return 70},c:(a,d,b,e)=>{for(var f=0,g=0;g<b;g++){var h=J[d>>2],m=J[d+4>>2];d+=8;for(var w=0;w<m;w++){var k=a,l=H[h+w],p=oa[k];0===l||10===l?(k=1===k?z:A,l=ia(p,0),l=ha.decode(p.buffer?p.subarray(0,l):new Uint8Array(p.slice(0,l))),k(l),p.length=0):p.push(l)}f+=m}J[e>>
|
|
14
|
+
2]=f;return 0},a:q,r:la,s:function(a,d,b,e,f){return c.callbacks.callFunction(void 0,a,d,b,e,f)},i:function(a){return c.callbacks.shouldInterrupt(void 0,a)},h:function(a,d,b){b=R(b);return c.callbacks.loadModuleSource(void 0,a,d,b)},g:function(a,d,b,e){b=R(b);e=R(e);return c.callbacks.normalizeModule(void 0,a,d,b,e)},t:function(a,d){c.callbacks.freeHostRef(void 0,a,d)}},Z;
|
|
15
|
+
Z=await (async function(){function a(b){b=Z=b.exports;c._malloc=b.v;c._QTS_Throw=b.w;c._QTS_NewError=b.x;c._QTS_RuntimeSetMemoryLimit=b.y;c._QTS_RuntimeComputeMemoryUsage=b.z;c._QTS_RuntimeDumpMemoryUsage=b.A;c._QTS_RecoverableLeakCheck=b.B;c._QTS_BuildIsSanitizeLeak=b.C;c._QTS_RuntimeSetMaxStackSize=b.D;c._QTS_GetUndefined=b.E;c._QTS_GetNull=b.F;c._QTS_GetFalse=b.G;c._QTS_GetTrue=b.H;c._QTS_NewHostRef=b.I;c._QTS_GetHostRefId=b.J;c._QTS_NewRuntime=b.K;c._QTS_FreeRuntime=b.L;c._free=b.M;
|
|
16
|
+
c._QTS_NewContext=b.N;c._QTS_FreeContext=b.O;c._QTS_FreeValuePointer=b.P;c._QTS_FreeValuePointerRuntime=b.Q;c._QTS_FreeVoidPointer=b.R;c._QTS_FreeCString=b.S;c._QTS_DupValuePointer=b.T;c._QTS_NewObject=b.U;c._QTS_NewObjectProto=b.V;c._QTS_NewArray=b.W;c._QTS_NewArrayBuffer=b.X;c._QTS_NewFloat64=b.Y;c._QTS_GetFloat64=b.Z;c._QTS_NewString=b._;c._QTS_GetString=b.$;c._QTS_GetArrayBuffer=b.aa;c._QTS_GetArrayBufferLength=b.ba;c._QTS_NewSymbol=b.ca;c._QTS_GetSymbolDescriptionOrKey=b.da;c._QTS_IsGlobalSymbol=
|
|
17
|
+
b.ea;c._QTS_IsJobPending=b.fa;c._QTS_ExecutePendingJob=b.ga;c._QTS_GetProp=b.ha;c._QTS_GetPropNumber=b.ia;c._QTS_SetProp=b.ja;c._QTS_DefineProp=b.ka;c._QTS_GetOwnPropertyNames=b.la;c._QTS_Call=b.ma;c._QTS_ResolveException=b.na;c._QTS_Dump=b.oa;c._QTS_Eval=b.pa;c._QTS_GetModuleNamespace=b.qa;c._QTS_Typeof=b.ra;c._QTS_GetLength=b.sa;c._QTS_IsEqual=b.ta;c._QTS_GetGlobalObject=b.ua;c._QTS_NewPromiseCapability=b.va;c._QTS_PromiseState=b.wa;c._QTS_PromiseResult=b.xa;c._QTS_TestStringArg=b.ya;c._QTS_GetDebugLogEnabled=
|
|
18
|
+
b.za;c._QTS_SetDebugLogEnabled=b.Aa;c._QTS_BuildIsDebug=b.Ba;c._QTS_BuildIsAsyncify=b.Ca;c._QTS_NewFunction=b.Da;c._QTS_ArgvGetJSValueConstPointer=b.Ea;c._QTS_RuntimeEnableInterruptHandler=b.Fa;c._QTS_RuntimeDisableInterruptHandler=b.Ga;c._QTS_RuntimeEnableModuleLoader=b.Ha;c._QTS_RuntimeDisableModuleLoader=b.Ia;c._QTS_bjson_encode=b.Ja;c._QTS_bjson_decode=b.Ka;sa=b.La;qa=b.Ma;Y=b.Na;pa=b.Oa;return Z}var d={a:ta};if(c.instantiateWasm)return new Promise(b=>{c.instantiateWasm(d,(e,f)=>{b(a(e,f))})});
|
|
19
|
+
N??=c.locateFile?c.locateFile("emscripten-module.wasm",u):u+"emscripten-module.wasm";return a((await ca(d)).instance)}());
|
|
20
|
+
(function(){function a(){c.calledRun=!0;if(!C){K=!0;Z.u();E?.(c);c.onRuntimeInitialized?.();if(c.postRun)for("function"==typeof c.postRun&&(c.postRun=[c.postRun]);c.postRun.length;){var d=c.postRun.shift();da.push(d)}P(da)}}if(c.preRun)for("function"==typeof c.preRun&&(c.preRun=[c.preRun]);c.preRun.length;)fa();P(ea);c.setStatus?(c.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>c.setStatus(""),1);a()},1)):a()})();K?moduleRtn=c:moduleRtn=new Promise((a,d)=>{E=a;F=d});
|
|
21
|
+
;return moduleRtn}if(typeof exports==="object"&&typeof module==="object"){module.exports=QuickJSRaw;module.exports.default=QuickJSRaw}else if(typeof define==="function"&&define["amd"])define([],()=>QuickJSRaw);
|