reg-cli 0.0.0-experimental-wasm2 → 0.0.0-experimental-wasm3
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/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/entry.cjs +1 -1
- package/dist/entry.mjs +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +4 -4
- package/dist/shared/{reg-cli.f4850117.cjs → reg-cli.023bb9e7.cjs} +6 -2
- package/dist/shared/{reg-cli.011d012d.mjs → reg-cli.05d5cc1c.mjs} +6 -3
- package/dist/worker.cjs +1 -1
- package/dist/worker.mjs +1 -1
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
package/dist/cli.mjs
CHANGED
package/dist/entry.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const fs = require('node:fs');
|
|
|
4
4
|
const wasmUtil = require('@tybys/wasm-util');
|
|
5
5
|
const node_process = require('node:process');
|
|
6
6
|
const node_worker_threads = require('node:worker_threads');
|
|
7
|
-
const utils = require('./shared/reg-cli.
|
|
7
|
+
const utils = require('./shared/reg-cli.023bb9e7.cjs');
|
|
8
8
|
require('path');
|
|
9
9
|
require('url');
|
|
10
10
|
require('node:fs/promises');
|
package/dist/entry.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import fs from 'node:fs';
|
|
|
2
2
|
import { WASI } from '@tybys/wasm-util';
|
|
3
3
|
import { env } from 'node:process';
|
|
4
4
|
import { workerData, parentPort } from 'node:worker_threads';
|
|
5
|
-
import { a as readWasm } from './shared/reg-cli.
|
|
5
|
+
import { a as readWasm } from './shared/reg-cli.05d5cc1c.mjs';
|
|
6
6
|
import 'path';
|
|
7
7
|
import 'url';
|
|
8
8
|
import 'node:fs/promises';
|
package/dist/index.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
const EventEmitter = require('node:events');
|
|
4
4
|
const node_worker_threads = require('node:worker_threads');
|
|
5
|
-
const utils = require('./shared/reg-cli.
|
|
5
|
+
const utils = require('./shared/reg-cli.023bb9e7.cjs');
|
|
6
|
+
const node_path = require('node:path');
|
|
6
7
|
require('path');
|
|
7
8
|
require('url');
|
|
8
9
|
require('node:fs/promises');
|
|
9
|
-
require('node:path');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
12
12
|
|
|
@@ -14,11 +14,11 @@ const EventEmitter__default = /*#__PURE__*/_interopDefaultCompat(EventEmitter);
|
|
|
14
14
|
|
|
15
15
|
const run = (argv) => {
|
|
16
16
|
const emitter = new EventEmitter__default();
|
|
17
|
-
const worker = new node_worker_threads.Worker(`./entry.${utils.resolveExtention()}
|
|
17
|
+
const worker = new node_worker_threads.Worker(node_path.join(utils.dir(), `./entry.${utils.resolveExtention()}`), { workerData: { argv } });
|
|
18
18
|
let nextTid = 1;
|
|
19
19
|
const workers = [worker];
|
|
20
20
|
const spawn = (startArg, threadId, memory) => {
|
|
21
|
-
const worker2 = new node_worker_threads.Worker(`./worker.${utils.resolveExtention()}`);
|
|
21
|
+
const worker2 = new node_worker_threads.Worker(node_path.join(utils.dir(), `./worker.${utils.resolveExtention()}`));
|
|
22
22
|
workers.push(worker2);
|
|
23
23
|
worker2.on("message", ({ cmd, startArg: startArg2, threadId: threadId2, memory: memory2 }) => {
|
|
24
24
|
if (cmd === "loaded") {
|
package/dist/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import EventEmitter from 'node:events';
|
|
2
2
|
import { Worker } from 'node:worker_threads';
|
|
3
|
-
import { r as resolveExtention } from './shared/reg-cli.
|
|
3
|
+
import { d as dir, r as resolveExtention } from './shared/reg-cli.05d5cc1c.mjs';
|
|
4
|
+
import { join } from 'node:path';
|
|
4
5
|
import 'path';
|
|
5
6
|
import 'url';
|
|
6
7
|
import 'node:fs/promises';
|
|
7
|
-
import 'node:path';
|
|
8
8
|
|
|
9
9
|
const run = (argv) => {
|
|
10
10
|
const emitter = new EventEmitter();
|
|
11
|
-
const worker = new Worker(`./entry.${resolveExtention()}
|
|
11
|
+
const worker = new Worker(join(dir(), `./entry.${resolveExtention()}`), { workerData: { argv } });
|
|
12
12
|
let nextTid = 1;
|
|
13
13
|
const workers = [worker];
|
|
14
14
|
const spawn = (startArg, threadId, memory) => {
|
|
15
|
-
const worker2 = new Worker(`./worker.${resolveExtention()}`);
|
|
15
|
+
const worker2 = new Worker(join(dir(), `./worker.${resolveExtention()}`));
|
|
16
16
|
workers.push(worker2);
|
|
17
17
|
worker2.on("message", ({ cmd, startArg: startArg2, threadId: threadId2, memory: memory2 }) => {
|
|
18
18
|
if (cmd === "loaded") {
|
|
@@ -11,14 +11,18 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
const path__default = /*#__PURE__*/_interopDefaultCompat(path);
|
|
12
12
|
|
|
13
13
|
const isCJS = typeof __dirname !== "undefined";
|
|
14
|
+
const dir = () => {
|
|
15
|
+
const dir2 = isCJS ? __dirname : path__default.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('shared/reg-cli.023bb9e7.cjs', document.baseURI).href))));
|
|
16
|
+
return dir2;
|
|
17
|
+
};
|
|
14
18
|
const readWasm = () => {
|
|
15
|
-
const
|
|
16
|
-
const file = promises.readFile(node_path.join(dir, "./reg.wasm"));
|
|
19
|
+
const file = promises.readFile(node_path.join(dir(), "./reg.wasm"));
|
|
17
20
|
return file;
|
|
18
21
|
};
|
|
19
22
|
const resolveExtention = () => {
|
|
20
23
|
return isCJS ? "cjs" : "mjs";
|
|
21
24
|
};
|
|
22
25
|
|
|
26
|
+
exports.dir = dir;
|
|
23
27
|
exports.readWasm = readWasm;
|
|
24
28
|
exports.resolveExtention = resolveExtention;
|
|
@@ -4,13 +4,16 @@ import { readFile } from 'node:fs/promises';
|
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
|
|
6
6
|
const isCJS = typeof __dirname !== "undefined";
|
|
7
|
+
const dir = () => {
|
|
8
|
+
const dir2 = isCJS ? __dirname : path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
return dir2;
|
|
10
|
+
};
|
|
7
11
|
const readWasm = () => {
|
|
8
|
-
const
|
|
9
|
-
const file = readFile(join(dir, "./reg.wasm"));
|
|
12
|
+
const file = readFile(join(dir(), "./reg.wasm"));
|
|
10
13
|
return file;
|
|
11
14
|
};
|
|
12
15
|
const resolveExtention = () => {
|
|
13
16
|
return isCJS ? "cjs" : "mjs";
|
|
14
17
|
};
|
|
15
18
|
|
|
16
|
-
export { readWasm as a, resolveExtention as r };
|
|
19
|
+
export { readWasm as a, dir as d, resolveExtention as r };
|
package/dist/worker.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const node_worker_threads = require('node:worker_threads');
|
|
|
4
4
|
const fs = require('node:fs');
|
|
5
5
|
const wasmUtil = require('@tybys/wasm-util');
|
|
6
6
|
const node_process = require('node:process');
|
|
7
|
-
const utils = require('./shared/reg-cli.
|
|
7
|
+
const utils = require('./shared/reg-cli.023bb9e7.cjs');
|
|
8
8
|
require('path');
|
|
9
9
|
require('url');
|
|
10
10
|
require('node:fs/promises');
|
package/dist/worker.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { parentPort } from 'node:worker_threads';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import { WASI } from '@tybys/wasm-util';
|
|
4
4
|
import { argv, env } from 'node:process';
|
|
5
|
-
import { a as readWasm } from './shared/reg-cli.
|
|
5
|
+
import { a as readWasm } from './shared/reg-cli.05d5cc1c.mjs';
|
|
6
6
|
import 'path';
|
|
7
7
|
import 'url';
|
|
8
8
|
import 'node:fs/promises';
|