reg-cli 0.0.0-experimental-wasm9 → 0.0.0-experimental-wasm11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/shared/reg.wasm +0 -0
- package/dist/worker.cjs +1 -1
- package/dist/worker.mjs +3 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -23,7 +23,7 @@ const run = (argv) => {
|
|
|
23
23
|
let nextTid = 1;
|
|
24
24
|
const workers = [worker];
|
|
25
25
|
const spawn = (startArg, threadId, memory) => {
|
|
26
|
-
const worker2 = new node_worker_threads.Worker(node_path.join(dir(), `./worker.${utils.resolveExtention()}`));
|
|
26
|
+
const worker2 = new node_worker_threads.Worker(node_path.join(dir(), `./worker.${utils.resolveExtention()}`), { workerData: { argv } });
|
|
27
27
|
workers.push(worker2);
|
|
28
28
|
worker2.on("message", ({ cmd, startArg: startArg2, threadId: threadId2, memory: memory2 }) => {
|
|
29
29
|
if (cmd === "loaded") {
|
|
@@ -74,7 +74,7 @@ const compare = (input) => {
|
|
|
74
74
|
actualDir,
|
|
75
75
|
expectedDir,
|
|
76
76
|
diffDir,
|
|
77
|
-
...Object.entries(rest).flatMap(([k, v]) => [`--${k}`, String(v)])
|
|
77
|
+
...Object.entries(rest).flatMap(([k, v]) => v == null ? [] : [`--${k}`, String(v)])
|
|
78
78
|
];
|
|
79
79
|
return run(args);
|
|
80
80
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -16,7 +16,7 @@ const run = (argv) => {
|
|
|
16
16
|
let nextTid = 1;
|
|
17
17
|
const workers = [worker];
|
|
18
18
|
const spawn = (startArg, threadId, memory) => {
|
|
19
|
-
const worker2 = new Worker(join(dir(), `./worker.${resolveExtention()}`));
|
|
19
|
+
const worker2 = new Worker(join(dir(), `./worker.${resolveExtention()}`), { workerData: { argv } });
|
|
20
20
|
workers.push(worker2);
|
|
21
21
|
worker2.on("message", ({ cmd, startArg: startArg2, threadId: threadId2, memory: memory2 }) => {
|
|
22
22
|
if (cmd === "loaded") {
|
|
@@ -67,7 +67,7 @@ const compare = (input) => {
|
|
|
67
67
|
actualDir,
|
|
68
68
|
expectedDir,
|
|
69
69
|
diffDir,
|
|
70
|
-
...Object.entries(rest).flatMap(([k, v]) => [`--${k}`, String(v)])
|
|
70
|
+
...Object.entries(rest).flatMap(([k, v]) => v == null ? [] : [`--${k}`, String(v)])
|
|
71
71
|
];
|
|
72
72
|
return run(args);
|
|
73
73
|
};
|
package/dist/shared/reg.wasm
CHANGED
|
Binary file
|
package/dist/worker.cjs
CHANGED
|
@@ -83,7 +83,7 @@ const createInstanceProxy = (instance, memory) => {
|
|
|
83
83
|
|
|
84
84
|
const wasi = new wasmUtil.WASI({
|
|
85
85
|
version: "preview1",
|
|
86
|
-
args:
|
|
86
|
+
args: node_worker_threads.workerData.argv,
|
|
87
87
|
env: node_process.env,
|
|
88
88
|
returnOnExit: true,
|
|
89
89
|
preopens: { "./": "./" },
|
package/dist/worker.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { parentPort } from 'node:worker_threads';
|
|
1
|
+
import { workerData, parentPort } from 'node:worker_threads';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import { WASI } from '@tybys/wasm-util';
|
|
4
|
-
import {
|
|
4
|
+
import { env } from 'node:process';
|
|
5
5
|
import { a as readWasm } from './shared/reg-cli.899e776d.mjs';
|
|
6
6
|
import 'path';
|
|
7
7
|
import 'url';
|
|
@@ -77,7 +77,7 @@ const createInstanceProxy = (instance, memory) => {
|
|
|
77
77
|
|
|
78
78
|
const wasi = new WASI({
|
|
79
79
|
version: "preview1",
|
|
80
|
-
args: argv,
|
|
80
|
+
args: workerData.argv,
|
|
81
81
|
env,
|
|
82
82
|
returnOnExit: true,
|
|
83
83
|
preopens: { "./": "./" },
|