@lvce-editor/ipc 14.2.0 → 14.4.0
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.js +7 -4
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -711,7 +711,7 @@ const listen$3 = async () => {
|
|
|
711
711
|
parentPort
|
|
712
712
|
} = await import('node:worker_threads');
|
|
713
713
|
if (!parentPort) {
|
|
714
|
-
throw new IpcError('parentPort is required');
|
|
714
|
+
throw new IpcError('parentPort is required for node worker threads ipc');
|
|
715
715
|
}
|
|
716
716
|
return parentPort;
|
|
717
717
|
};
|
|
@@ -1631,12 +1631,12 @@ const getFirstNodeWorkerEvent = worker => {
|
|
|
1631
1631
|
});
|
|
1632
1632
|
};
|
|
1633
1633
|
|
|
1634
|
-
// @ts-ignore
|
|
1635
1634
|
const create$1 = async ({
|
|
1636
1635
|
path,
|
|
1637
1636
|
argv = [],
|
|
1638
1637
|
env = process.env,
|
|
1639
|
-
execArgv = []
|
|
1638
|
+
execArgv = [],
|
|
1639
|
+
stdio
|
|
1640
1640
|
}) => {
|
|
1641
1641
|
string(path);
|
|
1642
1642
|
const actualArgv = ['--ipc-type=node-worker', ...argv];
|
|
@@ -1644,13 +1644,16 @@ const create$1 = async ({
|
|
|
1644
1644
|
...env,
|
|
1645
1645
|
ELECTRON_RUN_AS_NODE: '1'
|
|
1646
1646
|
};
|
|
1647
|
+
const ignoreStdio = stdio === 'inherit' ? undefined : true;
|
|
1647
1648
|
const {
|
|
1648
1649
|
Worker
|
|
1649
1650
|
} = await import('node:worker_threads');
|
|
1650
1651
|
const worker = new Worker(path, {
|
|
1651
1652
|
argv: actualArgv,
|
|
1652
1653
|
env: actualEnv,
|
|
1653
|
-
execArgv
|
|
1654
|
+
execArgv,
|
|
1655
|
+
stdout: ignoreStdio,
|
|
1656
|
+
stderr: ignoreStdio
|
|
1654
1657
|
});
|
|
1655
1658
|
const {
|
|
1656
1659
|
type,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/ipc",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.4.0",
|
|
4
4
|
"description": "Inter Process Communication for Lvce Editor",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"url": "https://github.com/lvce-editor/ipc.git"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@lvce-editor/assert": "^1.
|
|
19
|
-
"@lvce-editor/verror": "^1.
|
|
18
|
+
"@lvce-editor/assert": "^1.4.0",
|
|
19
|
+
"@lvce-editor/verror": "^1.7.0",
|
|
20
20
|
"@lvce-editor/web-socket-server": "^2.1.0"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|