@vue-jsx-vapor/compiler-rs-wasm32-wasi 2.6.12 → 2.7.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.
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/* prettier-ignore */
|
|
3
|
+
|
|
1
4
|
import {
|
|
2
|
-
createOnMessage as __wasmCreateOnMessageForFsProxy,
|
|
3
5
|
getDefaultContext as __emnapiGetDefaultContext,
|
|
4
6
|
instantiateNapiModuleSync as __emnapiInstantiateNapiModuleSync,
|
|
5
7
|
WASI as __WASI,
|
|
8
|
+
createOnMessage as __wasmCreateOnMessageForFsProxy,
|
|
6
9
|
} from '@napi-rs/wasm-runtime'
|
|
7
10
|
|
|
8
11
|
const __wasi = new __WASI({
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-jsx-vapor/compiler-rs-wasm32-wasi",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"cpu": [
|
|
5
5
|
"wasm32"
|
|
6
6
|
],
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"node": ">=14.0.0"
|
|
27
27
|
},
|
|
28
28
|
"repository": {
|
|
29
|
-
"url": "git+
|
|
29
|
+
"url": "git+https://github.com/vuejs/vue-jsx-vapor.git",
|
|
30
30
|
"type": "git"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
package/wasi-worker-browser.mjs
CHANGED
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
const handler = new MessageHandler({
|
|
8
8
|
onLoad({ wasmModule, wasmMemory }) {
|
|
9
9
|
const wasi = new WASI({
|
|
10
|
-
print
|
|
11
|
-
// eslint-disable-next-line no-console
|
|
10
|
+
print() {
|
|
11
|
+
// eslint-disable-next-line prefer-spread, prefer-rest-params, no-console
|
|
12
12
|
console.log.apply(console, arguments)
|
|
13
13
|
},
|
|
14
|
-
printErr
|
|
15
|
-
// eslint-disable-next-line
|
|
14
|
+
printErr() {
|
|
15
|
+
// eslint-disable-next-line prefer-spread, prefer-rest-params
|
|
16
16
|
console.error.apply(console, arguments)
|
|
17
17
|
},
|
|
18
18
|
})
|
|
@@ -31,6 +31,7 @@ const handler = new MessageHandler({
|
|
|
31
31
|
},
|
|
32
32
|
})
|
|
33
33
|
|
|
34
|
+
// eslint-disable-next-line unicorn/prefer-add-event-listener
|
|
34
35
|
globalThis.onmessage = function (e) {
|
|
35
36
|
handler.handle(e)
|
|
36
37
|
}
|
package/wasi-worker.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs'
|
|
2
2
|
import { createRequire } from 'node:module'
|
|
3
3
|
import { parse } from 'node:path'
|
|
4
|
+
import process from 'node:process'
|
|
4
5
|
import { WASI } from 'node:wasi'
|
|
5
6
|
import { parentPort, Worker } from 'node:worker_threads'
|
|
6
7
|
|
|
@@ -22,10 +23,10 @@ Object.assign(globalThis, {
|
|
|
22
23
|
self: globalThis,
|
|
23
24
|
require,
|
|
24
25
|
Worker,
|
|
25
|
-
importScripts
|
|
26
|
-
;(0, eval)(fs.readFileSync(f, 'utf8')
|
|
26
|
+
importScripts(f) {
|
|
27
|
+
;(0, eval)(`${fs.readFileSync(f, 'utf8')}//# sourceURL=${f}`)
|
|
27
28
|
},
|
|
28
|
-
postMessage
|
|
29
|
+
postMessage(msg) {
|
|
29
30
|
if (parentPort) {
|
|
30
31
|
parentPort.postMessage(msg)
|
|
31
32
|
}
|
|
@@ -62,6 +63,7 @@ const handler = new MessageHandler({
|
|
|
62
63
|
},
|
|
63
64
|
})
|
|
64
65
|
|
|
66
|
+
// eslint-disable-next-line unicorn/prefer-add-event-listener
|
|
65
67
|
globalThis.onmessage = function (e) {
|
|
66
68
|
handler.handle(e)
|
|
67
69
|
}
|