@nocobase/plugin-workflow-javascript 2.1.0-beta.33 → 2.1.0-beta.35
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/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/{quickjs-emscripten/712.index.js → @jitl/quickjs-wasmfile-debug-sync/dist/emscripten-module.mjs} +3 -28
- 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/{quickjs-emscripten/302.index.js → @jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.mjs} +3 -28
- 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/{quickjs-emscripten/161.index.js → @jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.mjs} +3 -28
- 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/package.json +1 -1
- 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.js +2 -1
- 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.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 -1
- 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/package.json +1 -1
- package/dist/server/QuickJs.js +11 -1
- package/package.json +2 -2
- package/dist/node_modules/quickjs-emscripten/017c8a1a1898bfe7b7ae.wasm +0 -0
- package/dist/node_modules/quickjs-emscripten/277.index.js +0 -27
- package/dist/node_modules/quickjs-emscripten/45d53437811cf6eec760.wasm +0 -0
- package/dist/node_modules/quickjs-emscripten/96b24985ab62871ec2a0.wasm +0 -0
- package/dist/node_modules/quickjs-emscripten/9a4b9654a8a7f4d515ba.wasm +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jitl/quickjs-wasmfile-debug-sync",
|
|
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,89 @@
|
|
|
1
|
+
# @jitl/quickjs-wasmfile-release-asyncify
|
|
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-asyncify"
|
|
10
|
+
import { newQuickJSAsyncWASMModuleFromVariant } from "quickjs-emscripten-core"
|
|
11
|
+
const QuickJS = await newQuickJSAsyncWASMModuleFromVariant(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? Yes
|
|
36
|
+
|
|
37
|
+
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.
|
|
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": "asyncify",
|
|
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
|
+
"-s ASYNCIFY=1",
|
|
76
|
+
"-DQTS_ASYNCIFY=1",
|
|
77
|
+
"-DQTS_ASYNCIFY_DEFAULT_STACK_SIZE=81920",
|
|
78
|
+
"-s ASYNCIFY_STACK_SIZE=81920",
|
|
79
|
+
"-s ASYNCIFY_REMOVE=@$(BUILD_WRAPPER)/asyncify-remove.json",
|
|
80
|
+
"-s ASYNCIFY_IMPORTS=@$(BUILD_WRAPPER)/asyncify-imports.json",
|
|
81
|
+
"-lasync.js",
|
|
82
|
+
"-Oz",
|
|
83
|
+
"-flto",
|
|
84
|
+
"--closure 1",
|
|
85
|
+
"-s FILESYSTEM=0",
|
|
86
|
+
"--pre-js $(TEMPLATES)/pre-extension.js",
|
|
87
|
+
"--pre-js $(TEMPLATES)/pre-wasmMemory.js"
|
|
88
|
+
]
|
|
89
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated from ../../templates/emscripten-module.ASYNCIFY.d.ts
|
|
2
|
+
import type { EmscriptenModuleLoader, QuickJSAsyncEmscriptenModule } from "@jitl/quickjs-ffi-types"
|
|
3
|
+
/**
|
|
4
|
+
* Emscripten module built from [`quickjs/quickjs.h`](../quickjs/quickjs.h) and
|
|
5
|
+
* our FFI support functions [c/interface.c](../c/interface.c), compiled with -s
|
|
6
|
+
* ASYNCIFY=1.
|
|
7
|
+
*
|
|
8
|
+
* Because this version is built with ASYNCIFY, the C code can call asynchronous
|
|
9
|
+
* Javascript functions as though they were synchronous.
|
|
10
|
+
*
|
|
11
|
+
* Note that emscripten modules returned by a `MODULARIZE=1` emscripten build
|
|
12
|
+
* (like this one) load asynchronously.
|
|
13
|
+
*/
|
|
14
|
+
declare const ModuleLoader: EmscriptenModuleLoader<QuickJSAsyncEmscriptenModule>
|
|
15
|
+
export default ModuleLoader
|
package/dist/node_modules/@jitl/quickjs-wasmfile-release-asyncify/dist/emscripten-module.browser.mjs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
async function QuickJSRaw(moduleArg={}){var moduleRtn;var d=moduleArg,aa=!!globalThis.window,f=!!globalThis.WorkerGlobalScope;function m(a){a={log:a||function(){}};for(const c of m.eb)c(a);return d.quickJSEmscriptenExtensions=a}m.eb=[];d.quickjsEmscriptenInit=m;m.eb.push(a=>{a.getWasmMemory=function(){return r}});var t="./this.program",ba=import.meta.url,w="",x,y;
|
|
2
|
+
if(aa||f){try{w=(new URL(".",ba)).href}catch{}f&&(y=a=>{var c=new XMLHttpRequest;c.open("GET",a,!1);c.responseType="arraybuffer";c.send(null);return new Uint8Array(c.response)});x=async a=>{a=await fetch(a,{credentials:"same-origin"});if(a.ok)return a.arrayBuffer();throw Error(a.status+" : "+a.url);}}var z=console.log.bind(console),A=console.error.bind(console),B,C=!1,D,E,F,G,H,I,J,K=!1;
|
|
3
|
+
function ca(){var a=r.buffer;d.HEAP8=G=new Int8Array(a);new Int16Array(a);d.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)}function L(a){d.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 M;
|
|
4
|
+
async function da(a){if(!B)try{var c=await x(a);return new Uint8Array(c)}catch{}if(a==M&&B)a=new Uint8Array(B);else if(y)a=y(a);else throw"both async and sync fetching of the wasm failed";return a}async function ea(a,c){try{var b=await da(a);return await WebAssembly.instantiate(b,c)}catch(e){A(`failed to asynchronously prepare wasm: ${e}`),L(e)}}
|
|
5
|
+
async function fa(a){var c=M;if(!B)try{var b=fetch(c,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(b,a)}catch(e){A(`wasm streaming compile failed: ${e}`),A("falling back to ArrayBuffer instantiation")}return ea(c,a)}class ha{name="ExitStatus";constructor(a){this.message=`Program terminated with exit(${a})`;this.status=a}}
|
|
6
|
+
var ia=a=>{for(;0<a.length;)a.shift()(d)},ja=[],ka=[],la=()=>{var a=d.preRun.shift();ka.push(a)},N=!0,r,ma=new TextDecoder,na=(a,c,b,e)=>{b=c+b;if(e)return b;for(;a[c]&&!(c>=b);)++c;return c},O=(a,c,b)=>a?ma.decode(H.subarray(a,na(H,a,c,b))):"",P=0,oa=[0,31,60,91,121,152,182,213,244,274,305,335],pa=[0,31,59,90,120,151,181,212,243,273,304,334],Q={},qa=a=>{if(!(a instanceof ha||"unwind"==a))throw a;},ra=a=>{D=a;N||0<P||(d.onExit?.(a),C=!0);throw new ha(a);},R=a=>{if(!C)try{return a()}catch(c){qa(c)}finally{if(!(N||
|
|
7
|
+
0<P))try{D=a=D,ra(a)}catch(c){qa(c)}}},S=(a,c,b)=>{var e=H;if(!(0<b))return 0;var g=c;b=c+b-1;for(var h=0;h<a.length;++h){var k=a.codePointAt(h);if(127>=k){if(c>=b)break;e[c++]=k}else if(2047>=k){if(c+1>=b)break;e[c++]=192|k>>6;e[c++]=128|k&63}else if(65535>=k){if(c+2>=b)break;e[c++]=224|k>>12;e[c++]=128|k>>6&63;e[c++]=128|k&63}else{if(c+3>=b)break;e[c++]=240|k>>18;e[c++]=128|k>>12&63;e[c++]=128|k>>6&63;e[c++]=128|k&63;h++}}e[c]=0;return c-g},T={},ta=()=>{if(!U){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"},c;for(c in T)void 0===T[c]?delete a[c]:a[c]=T[c];var b=[];for(c in a)b.push(`${c}=${a[c]}`);U=b}return U},U,V=a=>{for(var c=0,b=0;b<a.length;++b){var e=a.charCodeAt(b);127>=e?c++:2047>=e?c+=2:55296<=e&&57343>=e?(c+=4,++b):c+=3}return c},ua=[null,[],[]],W=a=>{try{a()}catch(c){L(c)}};
|
|
9
|
+
function va(a){var c=(...b)=>{X.Sa.push(a);try{return a(...b)}finally{C||(X.Sa.pop(),X.Qa&&X.state===X.Ra.Za&&0===X.Sa.length&&(X.state=X.Ra.Ua,W(wa),"undefined"!=typeof Fibers&&Fibers.nb()))}};X.ab.set(a,c);return c}function xa(){return new Promise((a,c)=>{X.Wa={resolve:a,reject:c}})}function ya(){var a=za(12+X.Va),c=a+12,b=X.Va;J[a>>2]=c;J[a+4>>2]=c+b;c=X.Sa[0];X.Xa.has(c)||(b=X.fb++,X.Xa.set(c,b),X.$a.set(b,c));c=X.Xa.get(c);I[a+8>>2]=c;return a}
|
|
10
|
+
function Aa(){var a=X.$a.get(I[X.Qa+8>>2]);a=X.ab.get(a);return R(a)}
|
|
11
|
+
var X={kb(a){var c=/^(qts_host_call_function|qts_host_load_module_source|qts_host_normalize_module|invoke_.*|__asyncjs__.*)$/;for(let [b,e]of Object.entries(a))"function"==typeof e&&(e.lb||c.test(b))},Ra:{Ua:0,Za:1,Ya:2,ib:3},state:0,Va:81920,Qa:null,cb:0,Sa:[],Xa:new Map,$a:new Map,ab:new Map,fb:0,Wa:null,hb:[],Ta(a){if(!C){if(X.state===X.Ra.Ua){var c=!1,b=!1;a((e=0)=>{if(!C&&(X.cb=e,c=!0,b)){X.state=X.Ra.Ya;W(()=>Ba(X.Qa));"undefined"!=typeof MainLoop&&MainLoop.gb&&MainLoop.resume();e=!1;try{var g=
|
|
12
|
+
Aa()}catch(p){g=p,e=!0}var h=!1;if(!X.Qa){var k=X.Wa;k&&(X.Wa=null,(e?k.reject:k.resolve)(g),h=!0)}if(e&&!h)throw g;}});b=!0;c||(X.state=X.Ra.Za,X.Qa=ya(),"undefined"!=typeof MainLoop&&MainLoop.gb&&MainLoop.pause(),W(()=>Ca(X.Qa)))}else X.state===X.Ra.Ya?(X.state=X.Ra.Ua,W(Da),Ea(X.Qa),X.Qa=null,X.hb.forEach(R)):L(`invalid state: ${X.state}`);return X.cb}},jb:a=>X.Ta(async c=>{c(await a())})},Ha=(a,c,b,e,g)=>{function h(l){--P;0!==u&&Fa(u);return"string"===c?O(l):"boolean"===c?!!l:l}var k={string:l=>
|
|
13
|
+
{var v=0;if(null!==l&&void 0!==l&&0!==l){v=V(l)+1;var sa=Y(v);S(l,sa,v);v=sa}return v},array:l=>{var v=Y(l.length);G.set(l,v);return v}};a=d["_"+a];var p=[],u=0;if(e)for(var n=0;n<e.length;n++){var q=k[b[n]];q?(0===u&&(u=Ga()),p[n]=q(e[n])):p[n]=e[n]}b=X.Qa;e=a(...p);g=g?.async;P+=1;if(X.Qa!=b)return xa().then(h);e=h(e);return g?Promise.resolve(e):e};d.wasmMemory?r=d.wasmMemory:r=new WebAssembly.Memory({initial:(d.INITIAL_MEMORY||16777216)/65536,maximum:32768});ca();d.noExitRuntime&&(N=d.noExitRuntime);
|
|
14
|
+
d.print&&(z=d.print);d.printErr&&(A=d.printErr);d.wasmBinary&&(B=d.wasmBinary);d.thisProgram&&(t=d.thisProgram);if(d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);0<d.preInit.length;)d.preInit.shift()();d.cwrap=(a,c,b,e)=>{var g=!b||b.every(h=>"number"===h||"boolean"===h);return"string"!==c&&g&&!e?d["_"+a]:(...h)=>Ha(a,c,b,h,e)};d.UTF8ToString=O;d.stringToUTF8=(a,c,b)=>S(a,c,b);d.lengthBytesUTF8=V;d.Asyncify=X;
|
|
15
|
+
var za,Ea,Ia,Fa,Y,Ga,dynCall_iii,dynCall_vii,dynCall_vi,Ca,wa,Ba,Da,Ja={b:(a,c,b,e)=>L(`Assertion failed: ${O(a)}, at: `+[c?O(c):"unknown filename",b,e?O(e):"unknown function"]),q:()=>L(""),l:()=>{N=!1;P=0},m:function(a,c){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);a=new Date(1E3*a);I[c>>2]=a.getSeconds();I[c+4>>2]=a.getMinutes();I[c+8>>2]=a.getHours();I[c+12>>2]=a.getDate();I[c+16>>2]=a.getMonth();I[c+20>>2]=a.getFullYear()-1900;I[c+24>>2]=a.getDay();var b=a.getFullYear();I[c+28>>2]=
|
|
16
|
+
(0!==b%4||0===b%100&&0!==b%400?pa:oa)[a.getMonth()]+a.getDate()-1|0;I[c+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();var e=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();I[c+32>>2]=(b!=e&&a.getTimezoneOffset()==Math.min(e,b))|0},j:(a,c)=>{Q[a]&&(clearTimeout(Q[a].id),delete Q[a]);if(!c)return 0;var b=setTimeout(()=>{delete Q[a];R(()=>Ia(a,performance.now()))},c);Q[a]={id:b,mb:c};return 0},n:(a,c,b,e)=>{var g=(new Date).getFullYear(),h=(new Date(g,0,
|
|
17
|
+
1)).getTimezoneOffset();g=(new Date(g,6,1)).getTimezoneOffset();J[a>>2]=60*Math.max(h,g);I[c>>2]=Number(h!=g);c=k=>{var p=Math.abs(k);return`UTC${0<=k?"-":"+"}${String(Math.floor(p/60)).padStart(2,"0")}${String(p%60).padStart(2,"0")}`};a=c(h);c=c(g);g<h?(S(a,b,17),S(c,e,17)):(S(a,e,17),S(c,b,17))},p:()=>Date.now(),k:a=>{var c=H.length;a>>>=0;if(2147483648<a)return!1;for(var b=1;4>=b;b*=2){var e=c*(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+
|
|
18
|
+
65535)/65536|0;try{r.grow(e);ca();var g=1;break a}catch(h){}g=void 0}if(g)return!0}return!1},d:(a,c)=>{var b=0,e=0,g;for(g of ta()){var h=c+b;J[a+e>>2]=h;b+=S(g,h,Infinity)+1;e+=4}return 0},e:(a,c)=>{var b=ta();J[a>>2]=b.length;a=0;for(var e of b)a+=V(e)+1;J[c>>2]=a;return 0},c:()=>52,o:function(){return 70},s:(a,c,b,e)=>{for(var g=0,h=0;h<b;h++){var k=J[c>>2],p=J[c+4>>2];c+=8;for(var u=0;u<p;u++){var n=a,q=H[k+u],l=ua[n];0===q||10===q?(n=1===n?z:A,q=na(l,0),q=ma.decode(l.buffer?l.subarray(0,q):new Uint8Array(l.slice(0,
|
|
19
|
+
q))),n(q),l.length=0):l.push(q)}g+=p}J[e>>2]=g;return 0},a:r,r:ra,i:function(a,c,b,e,g){return d.callbacks.callFunction({handleSleep:X.Ta},a,c,b,e,g)},h:function(a){return d.callbacks.shouldInterrupt(void 0,a)},g:function(a,c,b){const e={handleSleep:X.Ta};b=O(b);return d.callbacks.loadModuleSource(e,a,c,b)},f:function(a,c,b,e){const g={handleSleep:X.Ta};b=O(b);e=O(e);return d.callbacks.normalizeModule(g,a,c,b,e)},t:function(a,c){d.callbacks.freeHostRef(void 0,a,c)},u:function(a,c){X.Va=a||c}},Z;
|
|
20
|
+
Z=await (async function(){function a(b){var e=Z=b.exports;b={};for(let [g,h]of Object.entries(e))"function"==typeof h?(e=va(h),b[g]=e):b[g]=h;b=Z=b;za=d._malloc=b.w;d._QTS_Throw=b.x;d._QTS_NewError=b.y;d._QTS_RuntimeSetMemoryLimit=b.z;d._QTS_RuntimeComputeMemoryUsage=b.A;d._QTS_RuntimeDumpMemoryUsage=b.B;d._QTS_RecoverableLeakCheck=b.C;d._QTS_BuildIsSanitizeLeak=b.D;d._QTS_RuntimeSetMaxStackSize=b.E;d._QTS_GetUndefined=b.F;d._QTS_GetNull=b.G;d._QTS_GetFalse=b.H;d._QTS_GetTrue=b.I;d._QTS_NewHostRef=
|
|
21
|
+
b.J;d._QTS_GetHostRefId=b.K;d._QTS_NewRuntime=b.L;d._QTS_FreeRuntime=b.M;Ea=d._free=b.N;d._QTS_NewContext=b.O;d._QTS_FreeContext=b.P;d._QTS_FreeValuePointer=b.Q;d._QTS_FreeValuePointerRuntime=b.R;d._QTS_FreeVoidPointer=b.S;d._QTS_FreeCString=b.T;d._QTS_DupValuePointer=b.U;d._QTS_NewObject=b.V;d._QTS_NewObjectProto=b.W;d._QTS_NewArray=b.X;d._QTS_NewArrayBuffer=b.Y;d._QTS_NewFloat64=b.Z;d._QTS_GetFloat64=b._;d._QTS_NewString=b.$;d._QTS_GetString=b.aa;d._QTS_GetArrayBuffer=b.ba;d._QTS_GetArrayBufferLength=
|
|
22
|
+
b.ca;d._QTS_NewSymbol=b.da;d._QTS_GetSymbolDescriptionOrKey=b.ea;d._QTS_IsGlobalSymbol=b.fa;d._QTS_IsJobPending=b.ga;d._QTS_ExecutePendingJob=b.ha;d._QTS_GetProp=b.ia;d._QTS_GetPropNumber=b.ja;d._QTS_SetProp=b.ka;d._QTS_DefineProp=b.la;d._QTS_GetOwnPropertyNames=b.ma;d._QTS_Call=b.na;d._QTS_ResolveException=b.oa;d._QTS_Dump=b.pa;d._QTS_Eval=b.qa;d._QTS_GetModuleNamespace=b.ra;d._QTS_Typeof=b.sa;d._QTS_GetLength=b.ta;d._QTS_IsEqual=b.ua;d._QTS_GetGlobalObject=b.va;d._QTS_NewPromiseCapability=b.wa;
|
|
23
|
+
d._QTS_PromiseState=b.xa;d._QTS_PromiseResult=b.ya;d._QTS_TestStringArg=b.za;d._QTS_GetDebugLogEnabled=b.Aa;d._QTS_SetDebugLogEnabled=b.Ba;d._QTS_BuildIsDebug=b.Ca;d._QTS_BuildIsAsyncify=b.Da;d._QTS_NewFunction=b.Ea;d._QTS_ArgvGetJSValueConstPointer=b.Fa;d._QTS_RuntimeEnableInterruptHandler=b.Ga;d._QTS_RuntimeDisableInterruptHandler=b.Ha;d._QTS_RuntimeEnableModuleLoader=b.Ia;d._QTS_RuntimeDisableModuleLoader=b.Ja;d._QTS_bjson_encode=b.Ka;d._QTS_bjson_decode=b.La;Ia=b.Ma;Fa=b.Na;Y=b.Oa;Ga=b.Pa;dynCall_iii=
|
|
24
|
+
b._a;dynCall_vii=b.bb;dynCall_vi=b.sb;Ca=b.tb;wa=b.ub;Ba=b.vb;Da=b.wb;return Z}var c={a:Ja};if(d.instantiateWasm)return new Promise(b=>{d.instantiateWasm(c,(e,g)=>{b(a(e,g))})});M??=d.locateFile?d.locateFile?d.locateFile("emscripten-module.wasm",w):w+"emscripten-module.wasm":(new URL("emscripten-module.wasm",import.meta.url)).href;return a((await fa(c)).instance)}());
|
|
25
|
+
(function(){function a(){d.calledRun=!0;if(!C){K=!0;Z.v();E?.(d);d.onRuntimeInitialized?.();if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;){var c=d.postRun.shift();ja.push(c)}ia(ja)}}if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)la();ia(ka);d.setStatus?(d.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>d.setStatus(""),1);a()},1)):a()})();K?moduleRtn=d:moduleRtn=new Promise((a,c)=>{E=a;F=c});
|
|
26
|
+
;return moduleRtn}export default QuickJSRaw;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
async function QuickJSRaw(moduleArg={}){var moduleRtn;var d=moduleArg;function f(a){a={log:a||function(){}};for(const c of f.eb)c(a);return d.quickJSEmscriptenExtensions=a}f.eb=[];d.quickjsEmscriptenInit=f;f.eb.push(a=>{a.getWasmMemory=function(){return m}});var r="./this.program",t=(a,c)=>{throw c;},w="",x,y,fs=require("node:fs");w=__dirname+"/";y=a=>{a=z(a)?new URL(a):a;return fs.readFileSync(a)};x=async a=>{a=z(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,c)=>{process.exitCode=a;throw c;};var A=console.log.bind(console),B=console.error.bind(console),C,D=!1,E,z=a=>a.startsWith("file://"),F,G,aa,H,I,J,ba=!1;function ca(){var a=m.buffer;d.HEAP8=aa=new Int8Array(a);new Int16Array(a);d.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 K(a){d.onAbort?.(a);a="Aborted("+a+")";B(a);D=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");G?.(a);throw a;}var L;async function da(a){if(!C)try{var c=await x(a);return new Uint8Array(c)}catch{}if(a==L&&C)a=new Uint8Array(C);else if(y)a=y(a);else throw"both async and sync fetching of the wasm failed";return a}
|
|
4
|
+
async function ea(a){var c=L;try{var b=await da(c);return await WebAssembly.instantiate(b,a)}catch(e){B(`failed to asynchronously prepare wasm: ${e}`),K(e)}}async function fa(a){return ea(a)}class M{name="ExitStatus";constructor(a){this.message=`Program terminated with exit(${a})`;this.status=a}}
|
|
5
|
+
var ha=a=>{for(;0<a.length;)a.shift()(d)},ia=[],ja=[],ka=()=>{var a=d.preRun.shift();ja.push(a)},N=!0,m,la=new TextDecoder,ma=(a,c,b,e)=>{b=c+b;if(e)return b;for(;a[c]&&!(c>=b);)++c;return c},O=(a,c,b)=>a?la.decode(H.subarray(a,ma(H,a,c,b))):"",P=0,na=[0,31,60,91,121,152,182,213,244,274,305,335],oa=[0,31,59,90,120,151,181,212,243,273,304,334],Q={},pa=a=>{E=a;N||0<P||(d.onExit?.(a),D=!0);t(a,new M(a))},R=a=>{if(!D)try{return a()}catch(c){c instanceof M||"unwind"==c||t(1,c)}finally{if(!(N||0<P))try{E=
|
|
6
|
+
a=E,pa(a)}catch(c){c instanceof M||"unwind"==c||t(1,c)}}},S=(a,c,b)=>{var e=H;if(!(0<b))return 0;var g=c;b=c+b-1;for(var h=0;h<a.length;++h){var k=a.codePointAt(h);if(127>=k){if(c>=b)break;e[c++]=k}else if(2047>=k){if(c+1>=b)break;e[c++]=192|k>>6;e[c++]=128|k&63}else if(65535>=k){if(c+2>=b)break;e[c++]=224|k>>12;e[c++]=128|k>>6&63;e[c++]=128|k&63}else{if(c+3>=b)break;e[c++]=240|k>>18;e[c++]=128|k>>12&63;e[c++]=128|k>>6&63;e[c++]=128|k&63;h++}}e[c]=0;return c-g},T={},qa=()=>{if(!U){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"},c;for(c in T)void 0===T[c]?delete a[c]:a[c]=T[c];var b=[];for(c in a)b.push(`${c}=${a[c]}`);U=b}return U},U,V=a=>{for(var c=0,b=0;b<a.length;++b){var e=a.charCodeAt(b);127>=e?c++:2047>=e?c+=2:55296<=e&&57343>=e?(c+=4,++b):c+=3}return c},ra=[null,[],[]],W=a=>{try{a()}catch(c){K(c)}};
|
|
8
|
+
function ta(a){var c=(...b)=>{X.Sa.push(a);try{return a(...b)}finally{D||(X.Sa.pop(),X.Qa&&X.state===X.Ra.Za&&0===X.Sa.length&&(X.state=X.Ra.Ua,W(ua),"undefined"!=typeof Fibers&&Fibers.nb()))}};X.ab.set(a,c);return c}function va(){return new Promise((a,c)=>{X.Wa={resolve:a,reject:c}})}function wa(){var a=xa(12+X.Va),c=a+12,b=X.Va;J[a>>2]=c;J[a+4>>2]=c+b;c=X.Sa[0];X.Xa.has(c)||(b=X.fb++,X.Xa.set(c,b),X.$a.set(b,c));c=X.Xa.get(c);I[a+8>>2]=c;return a}
|
|
9
|
+
function ya(){var a=X.$a.get(I[X.Qa+8>>2]);a=X.ab.get(a);return R(a)}
|
|
10
|
+
var X={kb(a){var c=/^(qts_host_call_function|qts_host_load_module_source|qts_host_normalize_module|invoke_.*|__asyncjs__.*)$/;for(let [b,e]of Object.entries(a))"function"==typeof e&&(e.lb||c.test(b))},Ra:{Ua:0,Za:1,Ya:2,ib:3},state:0,Va:81920,Qa:null,cb:0,Sa:[],Xa:new Map,$a:new Map,ab:new Map,fb:0,Wa:null,hb:[],Ta(a){if(!D){if(X.state===X.Ra.Ua){var c=!1,b=!1;a((e=0)=>{if(!D&&(X.cb=e,c=!0,b)){X.state=X.Ra.Ya;W(()=>za(X.Qa));"undefined"!=typeof MainLoop&&MainLoop.gb&&MainLoop.resume();e=!1;try{var g=
|
|
11
|
+
ya()}catch(p){g=p,e=!0}var h=!1;if(!X.Qa){var k=X.Wa;k&&(X.Wa=null,(e?k.reject:k.resolve)(g),h=!0)}if(e&&!h)throw g;}});b=!0;c||(X.state=X.Ra.Za,X.Qa=wa(),"undefined"!=typeof MainLoop&&MainLoop.gb&&MainLoop.pause(),W(()=>Aa(X.Qa)))}else X.state===X.Ra.Ya?(X.state=X.Ra.Ua,W(Ba),Ca(X.Qa),X.Qa=null,X.hb.forEach(R)):K(`invalid state: ${X.state}`);return X.cb}},jb:a=>X.Ta(async c=>{c(await a())})},Fa=(a,c,b,e,g)=>{function h(l){--P;0!==u&&Da(u);return"string"===c?O(l):"boolean"===c?!!l:l}var k={string:l=>
|
|
12
|
+
{var v=0;if(null!==l&&void 0!==l&&0!==l){v=V(l)+1;var sa=Y(v);S(l,sa,v);v=sa}return v},array:l=>{var v=Y(l.length);aa.set(l,v);return v}};a=d["_"+a];var p=[],u=0;if(e)for(var n=0;n<e.length;n++){var q=k[b[n]];q?(0===u&&(u=Ea()),p[n]=q(e[n])):p[n]=e[n]}b=X.Qa;e=a(...p);g=g?.async;P+=1;if(X.Qa!=b)return va().then(h);e=h(e);return g?Promise.resolve(e):e};d.wasmMemory?m=d.wasmMemory:m=new WebAssembly.Memory({initial:(d.INITIAL_MEMORY||16777216)/65536,maximum:32768});ca();d.noExitRuntime&&(N=d.noExitRuntime);
|
|
13
|
+
d.print&&(A=d.print);d.printErr&&(B=d.printErr);d.wasmBinary&&(C=d.wasmBinary);d.thisProgram&&(r=d.thisProgram);if(d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);0<d.preInit.length;)d.preInit.shift()();d.cwrap=(a,c,b,e)=>{var g=!b||b.every(h=>"number"===h||"boolean"===h);return"string"!==c&&g&&!e?d["_"+a]:(...h)=>Fa(a,c,b,h,e)};d.UTF8ToString=O;d.stringToUTF8=(a,c,b)=>S(a,c,b);d.lengthBytesUTF8=V;d.Asyncify=X;
|
|
14
|
+
var xa,Ca,Ga,Da,Y,Ea,dynCall_iii,dynCall_vii,dynCall_vi,Aa,ua,za,Ba,Ha={b:(a,c,b,e)=>K(`Assertion failed: ${O(a)}, at: `+[c?O(c):"unknown filename",b,e?O(e):"unknown function"]),q:()=>K(""),l:()=>{N=!1;P=0},m:function(a,c){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);a=new Date(1E3*a);I[c>>2]=a.getSeconds();I[c+4>>2]=a.getMinutes();I[c+8>>2]=a.getHours();I[c+12>>2]=a.getDate();I[c+16>>2]=a.getMonth();I[c+20>>2]=a.getFullYear()-1900;I[c+24>>2]=a.getDay();var b=a.getFullYear();I[c+28>>2]=
|
|
15
|
+
(0!==b%4||0===b%100&&0!==b%400?oa:na)[a.getMonth()]+a.getDate()-1|0;I[c+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();var e=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();I[c+32>>2]=(b!=e&&a.getTimezoneOffset()==Math.min(e,b))|0},j:(a,c)=>{Q[a]&&(clearTimeout(Q[a].id),delete Q[a]);if(!c)return 0;var b=setTimeout(()=>{delete Q[a];R(()=>Ga(a,performance.now()))},c);Q[a]={id:b,mb:c};return 0},n:(a,c,b,e)=>{var g=(new Date).getFullYear(),h=(new Date(g,0,
|
|
16
|
+
1)).getTimezoneOffset();g=(new Date(g,6,1)).getTimezoneOffset();J[a>>2]=60*Math.max(h,g);I[c>>2]=Number(h!=g);c=k=>{var p=Math.abs(k);return`UTC${0<=k?"-":"+"}${String(Math.floor(p/60)).padStart(2,"0")}${String(p%60).padStart(2,"0")}`};a=c(h);c=c(g);g<h?(S(a,b,17),S(c,e,17)):(S(a,e,17),S(c,b,17))},p:()=>Date.now(),k:a=>{var c=H.length;a>>>=0;if(2147483648<a)return!1;for(var b=1;4>=b;b*=2){var e=c*(1+.2/b);e=Math.min(e,a+100663296);a:{e=(Math.min(2147483648,65536*Math.ceil(Math.max(a,e)/65536))-m.buffer.byteLength+
|
|
17
|
+
65535)/65536|0;try{m.grow(e);ca();var g=1;break a}catch(h){}g=void 0}if(g)return!0}return!1},d:(a,c)=>{var b=0,e=0,g;for(g of qa()){var h=c+b;J[a+e>>2]=h;b+=S(g,h,Infinity)+1;e+=4}return 0},e:(a,c)=>{var b=qa();J[a>>2]=b.length;a=0;for(var e of b)a+=V(e)+1;J[c>>2]=a;return 0},c:()=>52,o:function(){return 70},s:(a,c,b,e)=>{for(var g=0,h=0;h<b;h++){var k=J[c>>2],p=J[c+4>>2];c+=8;for(var u=0;u<p;u++){var n=a,q=H[k+u],l=ra[n];0===q||10===q?(n=1===n?A:B,q=ma(l,0),q=la.decode(l.buffer?l.subarray(0,q):new Uint8Array(l.slice(0,
|
|
18
|
+
q))),n(q),l.length=0):l.push(q)}g+=p}J[e>>2]=g;return 0},a:m,r:pa,i:function(a,c,b,e,g){return d.callbacks.callFunction({handleSleep:X.Ta},a,c,b,e,g)},h:function(a){return d.callbacks.shouldInterrupt(void 0,a)},g:function(a,c,b){const e={handleSleep:X.Ta};b=O(b);return d.callbacks.loadModuleSource(e,a,c,b)},f:function(a,c,b,e){const g={handleSleep:X.Ta};b=O(b);e=O(e);return d.callbacks.normalizeModule(g,a,c,b,e)},t:function(a,c){d.callbacks.freeHostRef(void 0,a,c)},u:function(a,c){X.Va=a||c}},Z;
|
|
19
|
+
Z=await (async function(){function a(b){var e=Z=b.exports;b={};for(let [g,h]of Object.entries(e))"function"==typeof h?(e=ta(h),b[g]=e):b[g]=h;b=Z=b;xa=d._malloc=b.w;d._QTS_Throw=b.x;d._QTS_NewError=b.y;d._QTS_RuntimeSetMemoryLimit=b.z;d._QTS_RuntimeComputeMemoryUsage=b.A;d._QTS_RuntimeDumpMemoryUsage=b.B;d._QTS_RecoverableLeakCheck=b.C;d._QTS_BuildIsSanitizeLeak=b.D;d._QTS_RuntimeSetMaxStackSize=b.E;d._QTS_GetUndefined=b.F;d._QTS_GetNull=b.G;d._QTS_GetFalse=b.H;d._QTS_GetTrue=b.I;d._QTS_NewHostRef=
|
|
20
|
+
b.J;d._QTS_GetHostRefId=b.K;d._QTS_NewRuntime=b.L;d._QTS_FreeRuntime=b.M;Ca=d._free=b.N;d._QTS_NewContext=b.O;d._QTS_FreeContext=b.P;d._QTS_FreeValuePointer=b.Q;d._QTS_FreeValuePointerRuntime=b.R;d._QTS_FreeVoidPointer=b.S;d._QTS_FreeCString=b.T;d._QTS_DupValuePointer=b.U;d._QTS_NewObject=b.V;d._QTS_NewObjectProto=b.W;d._QTS_NewArray=b.X;d._QTS_NewArrayBuffer=b.Y;d._QTS_NewFloat64=b.Z;d._QTS_GetFloat64=b._;d._QTS_NewString=b.$;d._QTS_GetString=b.aa;d._QTS_GetArrayBuffer=b.ba;d._QTS_GetArrayBufferLength=
|
|
21
|
+
b.ca;d._QTS_NewSymbol=b.da;d._QTS_GetSymbolDescriptionOrKey=b.ea;d._QTS_IsGlobalSymbol=b.fa;d._QTS_IsJobPending=b.ga;d._QTS_ExecutePendingJob=b.ha;d._QTS_GetProp=b.ia;d._QTS_GetPropNumber=b.ja;d._QTS_SetProp=b.ka;d._QTS_DefineProp=b.la;d._QTS_GetOwnPropertyNames=b.ma;d._QTS_Call=b.na;d._QTS_ResolveException=b.oa;d._QTS_Dump=b.pa;d._QTS_Eval=b.qa;d._QTS_GetModuleNamespace=b.ra;d._QTS_Typeof=b.sa;d._QTS_GetLength=b.ta;d._QTS_IsEqual=b.ua;d._QTS_GetGlobalObject=b.va;d._QTS_NewPromiseCapability=b.wa;
|
|
22
|
+
d._QTS_PromiseState=b.xa;d._QTS_PromiseResult=b.ya;d._QTS_TestStringArg=b.za;d._QTS_GetDebugLogEnabled=b.Aa;d._QTS_SetDebugLogEnabled=b.Ba;d._QTS_BuildIsDebug=b.Ca;d._QTS_BuildIsAsyncify=b.Da;d._QTS_NewFunction=b.Ea;d._QTS_ArgvGetJSValueConstPointer=b.Fa;d._QTS_RuntimeEnableInterruptHandler=b.Ga;d._QTS_RuntimeDisableInterruptHandler=b.Ha;d._QTS_RuntimeEnableModuleLoader=b.Ia;d._QTS_RuntimeDisableModuleLoader=b.Ja;d._QTS_bjson_encode=b.Ka;d._QTS_bjson_decode=b.La;Ga=b.Ma;Da=b.Na;Y=b.Oa;Ea=b.Pa;dynCall_iii=
|
|
23
|
+
b._a;dynCall_vii=b.bb;dynCall_vi=b.sb;Aa=b.tb;ua=b.ub;za=b.vb;Ba=b.wb;return Z}var c={a:Ha};if(d.instantiateWasm)return new Promise(b=>{d.instantiateWasm(c,(e,g)=>{b(a(e,g))})});L??=d.locateFile?d.locateFile("emscripten-module.wasm",w):w+"emscripten-module.wasm";return a((await fa(c)).instance)}());
|
|
24
|
+
(function(){function a(){d.calledRun=!0;if(!D){ba=!0;Z.v();F?.(d);d.onRuntimeInitialized?.();if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;){var c=d.postRun.shift();ia.push(c)}ha(ia)}}if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)ka();ha(ja);d.setStatus?(d.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>d.setStatus(""),1);a()},1)):a()})();ba?moduleRtn=d:moduleRtn=new Promise((a,c)=>{F=a;G=c});
|
|
25
|
+
;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);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var QuickJSRaw=(()=>{var _scriptName=globalThis.document?.currentScript?.src;return async function(moduleArg={}){var moduleRtn;var d=moduleArg;function f(a){a={log:a||function(){}};for(const c of f.eb)c(a);return d.quickJSEmscriptenExtensions=a}f.eb=[];d.quickjsEmscriptenInit=f;f.eb.push(a=>{a.getWasmMemory=function(){return m}});var r="./this.program",t="",w;try{t=(new URL(".",_scriptName)).href}catch{}w=async a=>{a=await fetch(a,{credentials:"same-origin"});if(a.ok)return a.arrayBuffer();throw Error(a.status+" : "+a.url);};var x=console.log.bind(console),y=console.error.bind(console),z,A=!1,B,C,D,E,F,G,H,I=!1;
|
|
2
|
+
function J(){var a=m.buffer;d.HEAP8=E=new Int8Array(a);new Int16Array(a);d.HEAPU8=F=new Uint8Array(a);new Uint16Array(a);G=new Int32Array(a);H=new Uint32Array(a);new Float32Array(a);new Float64Array(a);new BigInt64Array(a);new BigUint64Array(a)}function K(a){d.onAbort?.(a);a="Aborted("+a+")";y(a);A=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");D?.(a);throw a;}var L;
|
|
3
|
+
async function aa(a){if(!z)try{var c=await w(a);return new Uint8Array(c)}catch{}if(a==L&&z)a=new Uint8Array(z);else throw"both async and sync fetching of the wasm failed";return a}async function ba(a,c){try{var b=await aa(a);return await WebAssembly.instantiate(b,c)}catch(e){y(`failed to asynchronously prepare wasm: ${e}`),K(e)}}
|
|
4
|
+
async function ca(a){var c=L;if(!z)try{var b=fetch(c,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(b,a)}catch(e){y(`wasm streaming compile failed: ${e}`),y("falling back to ArrayBuffer instantiation")}return ba(c,a)}class M{name="ExitStatus";constructor(a){this.message=`Program terminated with exit(${a})`;this.status=a}}
|
|
5
|
+
var da=a=>{for(;0<a.length;)a.shift()(d)},ea=[],fa=[],ha=()=>{var a=d.preRun.shift();fa.push(a)},N=!0,m,ia=new TextDecoder,ja=(a,c,b,e)=>{b=c+b;if(e)return b;for(;a[c]&&!(c>=b);)++c;return c},O=(a,c,b)=>a?ia.decode(F.subarray(a,ja(F,a,c,b))):"",P=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],Q={},ma=a=>{if(!(a instanceof M||"unwind"==a))throw a;},na=a=>{B=a;N||0<P||(d.onExit?.(a),A=!0);throw new M(a);},R=a=>{if(!A)try{return a()}catch(c){ma(c)}finally{if(!(N||
|
|
6
|
+
0<P))try{B=a=B,na(a)}catch(c){ma(c)}}},S=(a,c,b)=>{var e=F;if(!(0<b))return 0;var g=c;b=c+b-1;for(var h=0;h<a.length;++h){var k=a.codePointAt(h);if(127>=k){if(c>=b)break;e[c++]=k}else if(2047>=k){if(c+1>=b)break;e[c++]=192|k>>6;e[c++]=128|k&63}else if(65535>=k){if(c+2>=b)break;e[c++]=224|k>>12;e[c++]=128|k>>6&63;e[c++]=128|k&63}else{if(c+3>=b)break;e[c++]=240|k>>18;e[c++]=128|k>>12&63;e[c++]=128|k>>6&63;e[c++]=128|k&63;h++}}e[c]=0;return c-g},T={},oa=()=>{if(!U){var a={USER:"web_user",LOGNAME:"web_user",
|
|
7
|
+
PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:r||"./this.program"},c;for(c in T)void 0===T[c]?delete a[c]:a[c]=T[c];var b=[];for(c in a)b.push(`${c}=${a[c]}`);U=b}return U},U,V=a=>{for(var c=0,b=0;b<a.length;++b){var e=a.charCodeAt(b);127>=e?c++:2047>=e?c+=2:55296<=e&&57343>=e?(c+=4,++b):c+=3}return c},pa=[null,[],[]],W=a=>{try{a()}catch(c){K(c)}};
|
|
8
|
+
function ra(a){var c=(...b)=>{X.Sa.push(a);try{return a(...b)}finally{A||(X.Sa.pop(),X.Qa&&X.state===X.Ra.Za&&0===X.Sa.length&&(X.state=X.Ra.Ua,W(sa),"undefined"!=typeof Fibers&&Fibers.nb()))}};X.ab.set(a,c);return c}function ta(){return new Promise((a,c)=>{X.Wa={resolve:a,reject:c}})}function ua(){var a=va(12+X.Va),c=a+12,b=X.Va;H[a>>2]=c;H[a+4>>2]=c+b;c=X.Sa[0];X.Xa.has(c)||(b=X.fb++,X.Xa.set(c,b),X.$a.set(b,c));c=X.Xa.get(c);G[a+8>>2]=c;return a}
|
|
9
|
+
function wa(){var a=X.$a.get(G[X.Qa+8>>2]);a=X.ab.get(a);return R(a)}
|
|
10
|
+
var X={kb(a){var c=/^(qts_host_call_function|qts_host_load_module_source|qts_host_normalize_module|invoke_.*|__asyncjs__.*)$/;for(let [b,e]of Object.entries(a))"function"==typeof e&&(e.lb||c.test(b))},Ra:{Ua:0,Za:1,Ya:2,ib:3},state:0,Va:81920,Qa:null,cb:0,Sa:[],Xa:new Map,$a:new Map,ab:new Map,fb:0,Wa:null,hb:[],Ta(a){if(!A){if(X.state===X.Ra.Ua){var c=!1,b=!1;a((e=0)=>{if(!A&&(X.cb=e,c=!0,b)){X.state=X.Ra.Ya;W(()=>xa(X.Qa));"undefined"!=typeof MainLoop&&MainLoop.gb&&MainLoop.resume();e=!1;try{var g=
|
|
11
|
+
wa()}catch(p){g=p,e=!0}var h=!1;if(!X.Qa){var k=X.Wa;k&&(X.Wa=null,(e?k.reject:k.resolve)(g),h=!0)}if(e&&!h)throw g;}});b=!0;c||(X.state=X.Ra.Za,X.Qa=ua(),"undefined"!=typeof MainLoop&&MainLoop.gb&&MainLoop.pause(),W(()=>ya(X.Qa)))}else X.state===X.Ra.Ya?(X.state=X.Ra.Ua,W(za),Aa(X.Qa),X.Qa=null,X.hb.forEach(R)):K(`invalid state: ${X.state}`);return X.cb}},jb:a=>X.Ta(async c=>{c(await a())})},Da=(a,c,b,e,g)=>{function h(l){--P;0!==u&&Ba(u);return"string"===c?O(l):"boolean"===c?!!l:l}var k={string:l=>
|
|
12
|
+
{var v=0;if(null!==l&&void 0!==l&&0!==l){v=V(l)+1;var qa=Y(v);S(l,qa,v);v=qa}return v},array:l=>{var v=Y(l.length);E.set(l,v);return v}};a=d["_"+a];var p=[],u=0;if(e)for(var n=0;n<e.length;n++){var q=k[b[n]];q?(0===u&&(u=Ca()),p[n]=q(e[n])):p[n]=e[n]}b=X.Qa;e=a(...p);g=g?.async;P+=1;if(X.Qa!=b)return ta().then(h);e=h(e);return g?Promise.resolve(e):e};d.wasmMemory?m=d.wasmMemory:m=new WebAssembly.Memory({initial:(d.INITIAL_MEMORY||16777216)/65536,maximum:32768});J();d.noExitRuntime&&(N=d.noExitRuntime);
|
|
13
|
+
d.print&&(x=d.print);d.printErr&&(y=d.printErr);d.wasmBinary&&(z=d.wasmBinary);d.thisProgram&&(r=d.thisProgram);if(d.preInit)for("function"==typeof d.preInit&&(d.preInit=[d.preInit]);0<d.preInit.length;)d.preInit.shift()();d.cwrap=(a,c,b,e)=>{var g=!b||b.every(h=>"number"===h||"boolean"===h);return"string"!==c&&g&&!e?d["_"+a]:(...h)=>Da(a,c,b,h,e)};d.UTF8ToString=O;d.stringToUTF8=(a,c,b)=>S(a,c,b);d.lengthBytesUTF8=V;d.Asyncify=X;
|
|
14
|
+
var va,Aa,Ea,Ba,Y,Ca,dynCall_iii,dynCall_vii,dynCall_vi,ya,sa,xa,za,Fa={b:(a,c,b,e)=>K(`Assertion failed: ${O(a)}, at: `+[c?O(c):"unknown filename",b,e?O(e):"unknown function"]),q:()=>K(""),l:()=>{N=!1;P=0},m:function(a,c){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);a=new Date(1E3*a);G[c>>2]=a.getSeconds();G[c+4>>2]=a.getMinutes();G[c+8>>2]=a.getHours();G[c+12>>2]=a.getDate();G[c+16>>2]=a.getMonth();G[c+20>>2]=a.getFullYear()-1900;G[c+24>>2]=a.getDay();var b=a.getFullYear();G[c+28>>2]=
|
|
15
|
+
(0!==b%4||0===b%100&&0!==b%400?la:ka)[a.getMonth()]+a.getDate()-1|0;G[c+36>>2]=-(60*a.getTimezoneOffset());b=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();var e=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();G[c+32>>2]=(b!=e&&a.getTimezoneOffset()==Math.min(e,b))|0},j:(a,c)=>{Q[a]&&(clearTimeout(Q[a].id),delete Q[a]);if(!c)return 0;var b=setTimeout(()=>{delete Q[a];R(()=>Ea(a,performance.now()))},c);Q[a]={id:b,mb:c};return 0},n:(a,c,b,e)=>{var g=(new Date).getFullYear(),h=(new Date(g,0,
|
|
16
|
+
1)).getTimezoneOffset();g=(new Date(g,6,1)).getTimezoneOffset();H[a>>2]=60*Math.max(h,g);G[c>>2]=Number(h!=g);c=k=>{var p=Math.abs(k);return`UTC${0<=k?"-":"+"}${String(Math.floor(p/60)).padStart(2,"0")}${String(p%60).padStart(2,"0")}`};a=c(h);c=c(g);g<h?(S(a,b,17),S(c,e,17)):(S(a,e,17),S(c,b,17))},p:()=>Date.now(),k:a=>{var c=F.length;a>>>=0;if(2147483648<a)return!1;for(var b=1;4>=b;b*=2){var e=c*(1+.2/b);e=Math.min(e,a+100663296);a:{e=(Math.min(2147483648,65536*Math.ceil(Math.max(a,e)/65536))-m.buffer.byteLength+
|
|
17
|
+
65535)/65536|0;try{m.grow(e);J();var g=1;break a}catch(h){}g=void 0}if(g)return!0}return!1},d:(a,c)=>{var b=0,e=0,g;for(g of oa()){var h=c+b;H[a+e>>2]=h;b+=S(g,h,Infinity)+1;e+=4}return 0},e:(a,c)=>{var b=oa();H[a>>2]=b.length;a=0;for(var e of b)a+=V(e)+1;H[c>>2]=a;return 0},c:()=>52,o:function(){return 70},s:(a,c,b,e)=>{for(var g=0,h=0;h<b;h++){var k=H[c>>2],p=H[c+4>>2];c+=8;for(var u=0;u<p;u++){var n=a,q=F[k+u],l=pa[n];0===q||10===q?(n=1===n?x:y,q=ja(l,0),q=ia.decode(l.buffer?l.subarray(0,q):new Uint8Array(l.slice(0,
|
|
18
|
+
q))),n(q),l.length=0):l.push(q)}g+=p}H[e>>2]=g;return 0},a:m,r:na,i:function(a,c,b,e,g){return d.callbacks.callFunction({handleSleep:X.Ta},a,c,b,e,g)},h:function(a){return d.callbacks.shouldInterrupt(void 0,a)},g:function(a,c,b){const e={handleSleep:X.Ta};b=O(b);return d.callbacks.loadModuleSource(e,a,c,b)},f:function(a,c,b,e){const g={handleSleep:X.Ta};b=O(b);e=O(e);return d.callbacks.normalizeModule(g,a,c,b,e)},t:function(a,c){d.callbacks.freeHostRef(void 0,a,c)},u:function(a,c){X.Va=a||c}},Z;
|
|
19
|
+
Z=await (async function(){function a(b){var e=Z=b.exports;b={};for(let [g,h]of Object.entries(e))"function"==typeof h?(e=ra(h),b[g]=e):b[g]=h;b=Z=b;va=d._malloc=b.w;d._QTS_Throw=b.x;d._QTS_NewError=b.y;d._QTS_RuntimeSetMemoryLimit=b.z;d._QTS_RuntimeComputeMemoryUsage=b.A;d._QTS_RuntimeDumpMemoryUsage=b.B;d._QTS_RecoverableLeakCheck=b.C;d._QTS_BuildIsSanitizeLeak=b.D;d._QTS_RuntimeSetMaxStackSize=b.E;d._QTS_GetUndefined=b.F;d._QTS_GetNull=b.G;d._QTS_GetFalse=b.H;d._QTS_GetTrue=b.I;d._QTS_NewHostRef=
|
|
20
|
+
b.J;d._QTS_GetHostRefId=b.K;d._QTS_NewRuntime=b.L;d._QTS_FreeRuntime=b.M;Aa=d._free=b.N;d._QTS_NewContext=b.O;d._QTS_FreeContext=b.P;d._QTS_FreeValuePointer=b.Q;d._QTS_FreeValuePointerRuntime=b.R;d._QTS_FreeVoidPointer=b.S;d._QTS_FreeCString=b.T;d._QTS_DupValuePointer=b.U;d._QTS_NewObject=b.V;d._QTS_NewObjectProto=b.W;d._QTS_NewArray=b.X;d._QTS_NewArrayBuffer=b.Y;d._QTS_NewFloat64=b.Z;d._QTS_GetFloat64=b._;d._QTS_NewString=b.$;d._QTS_GetString=b.aa;d._QTS_GetArrayBuffer=b.ba;d._QTS_GetArrayBufferLength=
|
|
21
|
+
b.ca;d._QTS_NewSymbol=b.da;d._QTS_GetSymbolDescriptionOrKey=b.ea;d._QTS_IsGlobalSymbol=b.fa;d._QTS_IsJobPending=b.ga;d._QTS_ExecutePendingJob=b.ha;d._QTS_GetProp=b.ia;d._QTS_GetPropNumber=b.ja;d._QTS_SetProp=b.ka;d._QTS_DefineProp=b.la;d._QTS_GetOwnPropertyNames=b.ma;d._QTS_Call=b.na;d._QTS_ResolveException=b.oa;d._QTS_Dump=b.pa;d._QTS_Eval=b.qa;d._QTS_GetModuleNamespace=b.ra;d._QTS_Typeof=b.sa;d._QTS_GetLength=b.ta;d._QTS_IsEqual=b.ua;d._QTS_GetGlobalObject=b.va;d._QTS_NewPromiseCapability=b.wa;
|
|
22
|
+
d._QTS_PromiseState=b.xa;d._QTS_PromiseResult=b.ya;d._QTS_TestStringArg=b.za;d._QTS_GetDebugLogEnabled=b.Aa;d._QTS_SetDebugLogEnabled=b.Ba;d._QTS_BuildIsDebug=b.Ca;d._QTS_BuildIsAsyncify=b.Da;d._QTS_NewFunction=b.Ea;d._QTS_ArgvGetJSValueConstPointer=b.Fa;d._QTS_RuntimeEnableInterruptHandler=b.Ga;d._QTS_RuntimeDisableInterruptHandler=b.Ha;d._QTS_RuntimeEnableModuleLoader=b.Ia;d._QTS_RuntimeDisableModuleLoader=b.Ja;d._QTS_bjson_encode=b.Ka;d._QTS_bjson_decode=b.La;Ea=b.Ma;Ba=b.Na;Y=b.Oa;Ca=b.Pa;dynCall_iii=
|
|
23
|
+
b._a;dynCall_vii=b.bb;dynCall_vi=b.sb;ya=b.tb;sa=b.ub;xa=b.vb;za=b.wb;return Z}var c={a:Fa};if(d.instantiateWasm)return new Promise(b=>{d.instantiateWasm(c,(e,g)=>{b(a(e,g))})});L??=d.locateFile?d.locateFile("emscripten-module.wasm",t):t+"emscripten-module.wasm";return a((await ca(c)).instance)}());
|
|
24
|
+
(function(){function a(){d.calledRun=!0;if(!A){I=!0;Z.v();C?.(d);d.onRuntimeInitialized?.();if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;){var c=d.postRun.shift();ea.push(c)}da(ea)}}if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)ha();da(fa);d.setStatus?(d.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>d.setStatus(""),1);a()},1)):a()})();I?moduleRtn=d:moduleRtn=new Promise((a,c)=>{C=a;D=c});
|
|
25
|
+
;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);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated from ../../templates/emscripten-module.ASYNCIFY.d.ts
|
|
2
|
+
import type { EmscriptenModuleLoader, QuickJSAsyncEmscriptenModule } from "@jitl/quickjs-ffi-types"
|
|
3
|
+
/**
|
|
4
|
+
* Emscripten module built from [`quickjs/quickjs.h`](../quickjs/quickjs.h) and
|
|
5
|
+
* our FFI support functions [c/interface.c](../c/interface.c), compiled with -s
|
|
6
|
+
* ASYNCIFY=1.
|
|
7
|
+
*
|
|
8
|
+
* Because this version is built with ASYNCIFY, the C code can call asynchronous
|
|
9
|
+
* Javascript functions as though they were synchronous.
|
|
10
|
+
*
|
|
11
|
+
* Note that emscripten modules returned by a `MODULARIZE=1` emscripten build
|
|
12
|
+
* (like this one) load asynchronously.
|
|
13
|
+
*/
|
|
14
|
+
declare const ModuleLoader: EmscriptenModuleLoader<QuickJSAsyncEmscriptenModule>
|
|
15
|
+
export default ModuleLoader
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Generated from ../../templates/emscripten-module.ASYNCIFY.d.ts
|
|
2
|
+
import type { EmscriptenModuleLoader, QuickJSAsyncEmscriptenModule } from "@jitl/quickjs-ffi-types"
|
|
3
|
+
/**
|
|
4
|
+
* Emscripten module built from [`quickjs/quickjs.h`](../quickjs/quickjs.h) and
|
|
5
|
+
* our FFI support functions [c/interface.c](../c/interface.c), compiled with -s
|
|
6
|
+
* ASYNCIFY=1.
|
|
7
|
+
*
|
|
8
|
+
* Because this version is built with ASYNCIFY, the C code can call asynchronous
|
|
9
|
+
* Javascript functions as though they were synchronous.
|
|
10
|
+
*
|
|
11
|
+
* Note that emscripten modules returned by a `MODULARIZE=1` emscripten build
|
|
12
|
+
* (like this one) load asynchronously.
|
|
13
|
+
*/
|
|
14
|
+
declare const ModuleLoader: EmscriptenModuleLoader<QuickJSAsyncEmscriptenModule>
|
|
15
|
+
export default ModuleLoader
|
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
"
|
|
2
|
-
exports.id = 302;
|
|
3
|
-
exports.ids = [302];
|
|
4
|
-
exports.modules = {
|
|
5
|
-
|
|
6
|
-
/***/ 891:
|
|
7
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8
|
-
|
|
9
|
-
module.exports = __webpack_require__.p + "96b24985ab62871ec2a0.wasm";
|
|
10
|
-
|
|
11
|
-
/***/ }),
|
|
12
|
-
|
|
13
|
-
/***/ 302:
|
|
14
|
-
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
15
|
-
|
|
16
|
-
__webpack_require__.r(__webpack_exports__);
|
|
17
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
19
|
-
/* harmony export */ });
|
|
20
|
-
async function QuickJSRaw(moduleArg={}){var moduleRtn;var d=moduleArg,aa=!!globalThis.window,f=!!globalThis.WorkerGlobalScope,m=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type;if(m){const {createRequire:a}=await Promise.resolve(/* import() */).then(__webpack_require__.t.bind(__webpack_require__, 33, 19));var require=a(import.meta.url)}function r(a){a={log:a||function(){}};for(const c of r.eb)c(a);return d.quickJSEmscriptenExtensions=a}r.eb=[];d.quickjsEmscriptenInit=r;r.eb.push(a=>{a.getWasmMemory=function(){return t}});
|
|
1
|
+
async function QuickJSRaw(moduleArg={}){var moduleRtn;var d=moduleArg,aa=!!globalThis.window,f=!!globalThis.WorkerGlobalScope,m=globalThis.process?.versions?.node&&"renderer"!=globalThis.process?.type;if(m){const {createRequire:a}=await import("node:module");var require=a(import.meta.url)}function r(a){a={log:a||function(){}};for(const c of r.eb)c(a);return d.quickJSEmscriptenExtensions=a}r.eb=[];d.quickjsEmscriptenInit=r;r.eb.push(a=>{a.getWasmMemory=function(){return t}});
|
|
21
2
|
var w="./this.program",x=(a,c)=>{throw c;},y=import.meta.url,z="",A,B;
|
|
22
3
|
if(m){var fs=require("node:fs");y.startsWith("file:")&&(z=require("node:path").dirname(require("node:url").fileURLToPath(y))+"/");B=a=>{a=C(a)?new URL(a):a;return fs.readFileSync(a)};A=async a=>{a=C(a)?new URL(a):a;return fs.readFileSync(a,void 0)};1<process.argv.length&&(w=process.argv[1].replace(/\\/g,"/"));process.argv.slice(2);x=(a,c)=>{process.exitCode=a;throw c;}}else if(aa||f){try{z=(new URL(".",y)).href}catch{}f&&(B=a=>{var c=new XMLHttpRequest;c.open("GET",a,!1);c.responseType="arraybuffer";
|
|
23
4
|
c.send(null);return new Uint8Array(c.response)});A=async a=>{if(C(a))return new Promise((b,e)=>{var g=new XMLHttpRequest;g.open("GET",a,!0);g.responseType="arraybuffer";g.onload=()=>{200==g.status||0==g.status&&g.response?b(g.response):e(g.status)};g.onerror=e;g.send(null)});var c=await fetch(a,{credentials:"same-origin"});if(c.ok)return c.arrayBuffer();throw Error(c.status+" : "+c.url);}}
|
|
@@ -44,12 +25,6 @@ Z=await (async function(){function a(b){var e=Z=b.exports;b={};for(let [g,h]of O
|
|
|
44
25
|
b.J;d._QTS_GetHostRefId=b.K;d._QTS_NewRuntime=b.L;d._QTS_FreeRuntime=b.M;Ga=d._free=b.N;d._QTS_NewContext=b.O;d._QTS_FreeContext=b.P;d._QTS_FreeValuePointer=b.Q;d._QTS_FreeValuePointerRuntime=b.R;d._QTS_FreeVoidPointer=b.S;d._QTS_FreeCString=b.T;d._QTS_DupValuePointer=b.U;d._QTS_NewObject=b.V;d._QTS_NewObjectProto=b.W;d._QTS_NewArray=b.X;d._QTS_NewArrayBuffer=b.Y;d._QTS_NewFloat64=b.Z;d._QTS_GetFloat64=b._;d._QTS_NewString=b.$;d._QTS_GetString=b.aa;d._QTS_GetArrayBuffer=b.ba;d._QTS_GetArrayBufferLength=
|
|
45
26
|
b.ca;d._QTS_NewSymbol=b.da;d._QTS_GetSymbolDescriptionOrKey=b.ea;d._QTS_IsGlobalSymbol=b.fa;d._QTS_IsJobPending=b.ga;d._QTS_ExecutePendingJob=b.ha;d._QTS_GetProp=b.ia;d._QTS_GetPropNumber=b.ja;d._QTS_SetProp=b.ka;d._QTS_DefineProp=b.la;d._QTS_GetOwnPropertyNames=b.ma;d._QTS_Call=b.na;d._QTS_ResolveException=b.oa;d._QTS_Dump=b.pa;d._QTS_Eval=b.qa;d._QTS_GetModuleNamespace=b.ra;d._QTS_Typeof=b.sa;d._QTS_GetLength=b.ta;d._QTS_IsEqual=b.ua;d._QTS_GetGlobalObject=b.va;d._QTS_NewPromiseCapability=b.wa;
|
|
46
27
|
d._QTS_PromiseState=b.xa;d._QTS_PromiseResult=b.ya;d._QTS_TestStringArg=b.za;d._QTS_GetDebugLogEnabled=b.Aa;d._QTS_SetDebugLogEnabled=b.Ba;d._QTS_BuildIsDebug=b.Ca;d._QTS_BuildIsAsyncify=b.Da;d._QTS_NewFunction=b.Ea;d._QTS_ArgvGetJSValueConstPointer=b.Fa;d._QTS_RuntimeEnableInterruptHandler=b.Ga;d._QTS_RuntimeDisableInterruptHandler=b.Ha;d._QTS_RuntimeEnableModuleLoader=b.Ia;d._QTS_RuntimeDisableModuleLoader=b.Ja;d._QTS_bjson_encode=b.Ka;d._QTS_bjson_decode=b.La;Ka=b.Ma;Ha=b.Na;Y=b.Oa;Ia=b.Pa;dynCall_iii=
|
|
47
|
-
b._a;dynCall_vii=b.bb;dynCall_vi=b.sb;Ea=b.tb;ya=b.ub;Da=b.vb;Fa=b.wb;return Z}var c={a:La};if(d.instantiateWasm)return new Promise(b=>{d.instantiateWasm(c,(e,g)=>{b(a(e,g))})});L??=d.locateFile?d.locateFile?d.locateFile("emscripten-module.wasm",z):z+"emscripten-module.wasm":(new URL(
|
|
28
|
+
b._a;dynCall_vii=b.bb;dynCall_vi=b.sb;Ea=b.tb;ya=b.ub;Da=b.vb;Fa=b.wb;return Z}var c={a:La};if(d.instantiateWasm)return new Promise(b=>{d.instantiateWasm(c,(e,g)=>{b(a(e,g))})});L??=d.locateFile?d.locateFile?d.locateFile("emscripten-module.wasm",z):z+"emscripten-module.wasm":(new URL("emscripten-module.wasm",import.meta.url)).href;return a((await ka(c)).instance)}());
|
|
48
29
|
(function(){function a(){d.calledRun=!0;if(!F){fa=!0;Z.v();ca?.(d);d.onRuntimeInitialized?.();if(d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;){var c=d.postRun.shift();ma.push(c)}la(ma)}}if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)oa();la(na);d.setStatus?(d.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>d.setStatus(""),1);a()},1)):a()})();fa?moduleRtn=d:moduleRtn=new Promise((a,c)=>{ca=a;da=c});
|
|
49
|
-
;return moduleRtn}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/***/ })
|
|
53
|
-
|
|
54
|
-
};
|
|
55
|
-
;
|
|
30
|
+
;return moduleRtn}export default QuickJSRaw;
|
|
Binary file
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { QuickJSAsyncEmscriptenModule, JSContextPointer, JSValuePointer, JSValueConstPointer, JSRuntimePointer, OwnedHeapCharPointer, HostRefId, IntrinsicsFlags, JSVoidPointer, JSBorrowedCharPointer, BorrowedHeapCharPointer, JSContextPointerPointer, JSValuePointerPointerPointer, UInt32Pointer, JSValueConstPointerPointer, EvalDetectModule, EvalFlags, IsEqualOp, JSValuePointerPointer, JSPromiseStateEnum } from '@jitl/quickjs-ffi-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Low-level FFI bindings to QuickJS's Emscripten module.
|
|
5
|
+
* See instead {@link QuickJSContext}, the public Javascript interface exposed by this
|
|
6
|
+
* library.
|
|
7
|
+
*
|
|
8
|
+
* @unstable The FFI interface is considered private and may change.
|
|
9
|
+
*/
|
|
10
|
+
declare class QuickJSAsyncFFI {
|
|
11
|
+
private module;
|
|
12
|
+
constructor(module: QuickJSAsyncEmscriptenModule);
|
|
13
|
+
/** Set at compile time. */
|
|
14
|
+
readonly DEBUG = false;
|
|
15
|
+
QTS_Throw: (ctx: JSContextPointer, error: JSValuePointer | JSValueConstPointer) => JSValuePointer;
|
|
16
|
+
QTS_NewError: (ctx: JSContextPointer) => JSValuePointer;
|
|
17
|
+
QTS_RuntimeSetMemoryLimit: (rt: JSRuntimePointer, limit: number) => void;
|
|
18
|
+
QTS_RuntimeComputeMemoryUsage: (rt: JSRuntimePointer, ctx: JSContextPointer) => JSValuePointer;
|
|
19
|
+
QTS_RuntimeDumpMemoryUsage: (rt: JSRuntimePointer) => OwnedHeapCharPointer;
|
|
20
|
+
QTS_RecoverableLeakCheck: () => number;
|
|
21
|
+
QTS_BuildIsSanitizeLeak: () => number;
|
|
22
|
+
QTS_RuntimeSetMaxStackSize: (rt: JSRuntimePointer, stack_size: number) => void;
|
|
23
|
+
QTS_GetUndefined: () => JSValueConstPointer;
|
|
24
|
+
QTS_GetNull: () => JSValueConstPointer;
|
|
25
|
+
QTS_GetFalse: () => JSValueConstPointer;
|
|
26
|
+
QTS_GetTrue: () => JSValueConstPointer;
|
|
27
|
+
QTS_NewHostRef: (ctx: JSContextPointer, id: HostRefId) => JSValuePointer;
|
|
28
|
+
QTS_GetHostRefId: (value: JSValuePointer | JSValueConstPointer) => HostRefId;
|
|
29
|
+
QTS_NewRuntime: () => JSRuntimePointer;
|
|
30
|
+
QTS_FreeRuntime: (rt: JSRuntimePointer) => void;
|
|
31
|
+
QTS_NewContext: (rt: JSRuntimePointer, intrinsics: IntrinsicsFlags) => JSContextPointer;
|
|
32
|
+
QTS_FreeContext: (ctx: JSContextPointer) => void;
|
|
33
|
+
QTS_FreeValuePointer: (ctx: JSContextPointer, value: JSValuePointer) => void;
|
|
34
|
+
QTS_FreeValuePointerRuntime: (rt: JSRuntimePointer, value: JSValuePointer) => void;
|
|
35
|
+
QTS_FreeVoidPointer: (ctx: JSContextPointer, ptr: JSVoidPointer) => void;
|
|
36
|
+
QTS_FreeCString: (ctx: JSContextPointer, str: JSBorrowedCharPointer) => void;
|
|
37
|
+
QTS_DupValuePointer: (ctx: JSContextPointer, val: JSValuePointer | JSValueConstPointer) => JSValuePointer;
|
|
38
|
+
QTS_NewObject: (ctx: JSContextPointer) => JSValuePointer;
|
|
39
|
+
QTS_NewObjectProto: (ctx: JSContextPointer, proto: JSValuePointer | JSValueConstPointer) => JSValuePointer;
|
|
40
|
+
QTS_NewArray: (ctx: JSContextPointer) => JSValuePointer;
|
|
41
|
+
QTS_NewArrayBuffer: (ctx: JSContextPointer, buffer: JSVoidPointer, length: number) => JSValuePointer;
|
|
42
|
+
QTS_NewFloat64: (ctx: JSContextPointer, num: number) => JSValuePointer;
|
|
43
|
+
QTS_GetFloat64: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => number;
|
|
44
|
+
QTS_NewString: (ctx: JSContextPointer, string: BorrowedHeapCharPointer) => JSValuePointer;
|
|
45
|
+
QTS_GetString: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => JSBorrowedCharPointer;
|
|
46
|
+
QTS_GetArrayBuffer: (ctx: JSContextPointer, data: JSValuePointer | JSValueConstPointer) => JSVoidPointer;
|
|
47
|
+
QTS_GetArrayBufferLength: (ctx: JSContextPointer, data: JSValuePointer | JSValueConstPointer) => number;
|
|
48
|
+
QTS_NewSymbol: (ctx: JSContextPointer, description: BorrowedHeapCharPointer, isGlobal: number) => JSValuePointer;
|
|
49
|
+
QTS_GetSymbolDescriptionOrKey: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => JSBorrowedCharPointer;
|
|
50
|
+
QTS_GetSymbolDescriptionOrKey_MaybeAsync: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => JSBorrowedCharPointer | Promise<JSBorrowedCharPointer>;
|
|
51
|
+
QTS_IsGlobalSymbol: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => number;
|
|
52
|
+
QTS_IsJobPending: (rt: JSRuntimePointer) => number;
|
|
53
|
+
QTS_ExecutePendingJob: (rt: JSRuntimePointer, maxJobsToExecute: number, lastJobContext: JSContextPointerPointer) => JSValuePointer;
|
|
54
|
+
QTS_ExecutePendingJob_MaybeAsync: (rt: JSRuntimePointer, maxJobsToExecute: number, lastJobContext: JSContextPointerPointer) => JSValuePointer | Promise<JSValuePointer>;
|
|
55
|
+
QTS_GetProp: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: JSValuePointer | JSValueConstPointer) => JSValuePointer;
|
|
56
|
+
QTS_GetProp_MaybeAsync: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: JSValuePointer | JSValueConstPointer) => JSValuePointer | Promise<JSValuePointer>;
|
|
57
|
+
QTS_GetPropNumber: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: number) => JSValuePointer;
|
|
58
|
+
QTS_GetPropNumber_MaybeAsync: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: number) => JSValuePointer | Promise<JSValuePointer>;
|
|
59
|
+
QTS_SetProp: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: JSValuePointer | JSValueConstPointer, prop_value: JSValuePointer | JSValueConstPointer) => void;
|
|
60
|
+
QTS_SetProp_MaybeAsync: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: JSValuePointer | JSValueConstPointer, prop_value: JSValuePointer | JSValueConstPointer) => void | Promise<void>;
|
|
61
|
+
QTS_DefineProp: (ctx: JSContextPointer, this_val: JSValuePointer | JSValueConstPointer, prop_name: JSValuePointer | JSValueConstPointer, prop_value: JSValuePointer | JSValueConstPointer, get: JSValuePointer | JSValueConstPointer, set: JSValuePointer | JSValueConstPointer, configurable: boolean, enumerable: boolean, has_value: boolean) => void;
|
|
62
|
+
QTS_GetOwnPropertyNames: (ctx: JSContextPointer, out_ptrs: JSValuePointerPointerPointer, out_len: UInt32Pointer, obj: JSValuePointer | JSValueConstPointer, flags: number) => JSValuePointer;
|
|
63
|
+
QTS_GetOwnPropertyNames_MaybeAsync: (ctx: JSContextPointer, out_ptrs: JSValuePointerPointerPointer, out_len: UInt32Pointer, obj: JSValuePointer | JSValueConstPointer, flags: number) => JSValuePointer | Promise<JSValuePointer>;
|
|
64
|
+
QTS_Call: (ctx: JSContextPointer, func_obj: JSValuePointer | JSValueConstPointer, this_obj: JSValuePointer | JSValueConstPointer, argc: number, argv_ptrs: JSValueConstPointerPointer) => JSValuePointer;
|
|
65
|
+
QTS_Call_MaybeAsync: (ctx: JSContextPointer, func_obj: JSValuePointer | JSValueConstPointer, this_obj: JSValuePointer | JSValueConstPointer, argc: number, argv_ptrs: JSValueConstPointerPointer) => JSValuePointer | Promise<JSValuePointer>;
|
|
66
|
+
QTS_ResolveException: (ctx: JSContextPointer, maybe_exception: JSValuePointer) => JSValuePointer;
|
|
67
|
+
QTS_Dump: (ctx: JSContextPointer, obj: JSValuePointer | JSValueConstPointer) => JSBorrowedCharPointer;
|
|
68
|
+
QTS_Dump_MaybeAsync: (ctx: JSContextPointer, obj: JSValuePointer | JSValueConstPointer) => JSBorrowedCharPointer | Promise<JSBorrowedCharPointer>;
|
|
69
|
+
QTS_Eval: (ctx: JSContextPointer, js_code: BorrowedHeapCharPointer, js_code_length: number, filename: string, detectModule: EvalDetectModule, evalFlags: EvalFlags) => JSValuePointer;
|
|
70
|
+
QTS_Eval_MaybeAsync: (ctx: JSContextPointer, js_code: BorrowedHeapCharPointer, js_code_length: number, filename: string, detectModule: EvalDetectModule, evalFlags: EvalFlags) => JSValuePointer | Promise<JSValuePointer>;
|
|
71
|
+
QTS_GetModuleNamespace: (ctx: JSContextPointer, module_func_obj: JSValuePointer | JSValueConstPointer) => JSValuePointer;
|
|
72
|
+
QTS_Typeof: (ctx: JSContextPointer, value: JSValuePointer | JSValueConstPointer) => OwnedHeapCharPointer;
|
|
73
|
+
QTS_GetLength: (ctx: JSContextPointer, out_len: UInt32Pointer, value: JSValuePointer | JSValueConstPointer) => number;
|
|
74
|
+
QTS_IsEqual: (ctx: JSContextPointer, a: JSValuePointer | JSValueConstPointer, b: JSValuePointer | JSValueConstPointer, op: IsEqualOp) => number;
|
|
75
|
+
QTS_GetGlobalObject: (ctx: JSContextPointer) => JSValuePointer;
|
|
76
|
+
QTS_NewPromiseCapability: (ctx: JSContextPointer, resolve_funcs_out: JSValuePointerPointer) => JSValuePointer;
|
|
77
|
+
QTS_PromiseState: (ctx: JSContextPointer, promise: JSValuePointer | JSValueConstPointer) => JSPromiseStateEnum;
|
|
78
|
+
QTS_PromiseResult: (ctx: JSContextPointer, promise: JSValuePointer | JSValueConstPointer) => JSValuePointer;
|
|
79
|
+
QTS_TestStringArg: (string: string) => void;
|
|
80
|
+
QTS_GetDebugLogEnabled: (rt: JSRuntimePointer) => number;
|
|
81
|
+
QTS_SetDebugLogEnabled: (rt: JSRuntimePointer, is_enabled: number) => void;
|
|
82
|
+
QTS_BuildIsDebug: () => number;
|
|
83
|
+
QTS_BuildIsAsyncify: () => number;
|
|
84
|
+
QTS_NewFunction: (ctx: JSContextPointer, name: string, arg_length: number, is_constructor: boolean, host_ref_id: HostRefId) => JSValuePointer;
|
|
85
|
+
QTS_ArgvGetJSValueConstPointer: (argv: JSValuePointer | JSValueConstPointer, index: number) => JSValueConstPointer;
|
|
86
|
+
QTS_RuntimeEnableInterruptHandler: (rt: JSRuntimePointer) => void;
|
|
87
|
+
QTS_RuntimeDisableInterruptHandler: (rt: JSRuntimePointer) => void;
|
|
88
|
+
QTS_RuntimeEnableModuleLoader: (rt: JSRuntimePointer, use_custom_normalize: number) => void;
|
|
89
|
+
QTS_RuntimeDisableModuleLoader: (rt: JSRuntimePointer) => void;
|
|
90
|
+
QTS_bjson_encode: (ctx: JSContextPointer, val: JSValuePointer | JSValueConstPointer) => JSValuePointer;
|
|
91
|
+
QTS_bjson_decode: (ctx: JSContextPointer, data: JSValuePointer | JSValueConstPointer) => JSValuePointer;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { QuickJSAsyncFFI };
|