@lvce-editor/ipc 9.0.0 → 9.2.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/browser.js +7 -3
- package/dist/index.js +7 -3
- package/package.json +2 -2
package/dist/browser.js
CHANGED
|
@@ -245,7 +245,7 @@ class VError extends Error {
|
|
|
245
245
|
|
|
246
246
|
class IpcError extends VError {
|
|
247
247
|
// @ts-ignore
|
|
248
|
-
constructor(
|
|
248
|
+
constructor(betterMessage, stdout = '', stderr = '') {
|
|
249
249
|
if (stdout || stderr) {
|
|
250
250
|
// @ts-ignore
|
|
251
251
|
const {
|
|
@@ -257,9 +257,9 @@ class IpcError extends VError {
|
|
|
257
257
|
// @ts-ignore
|
|
258
258
|
cause.code = code;
|
|
259
259
|
cause.stack = stack;
|
|
260
|
-
super(cause,
|
|
260
|
+
super(cause, betterMessage);
|
|
261
261
|
} else {
|
|
262
|
-
super(
|
|
262
|
+
super(betterMessage);
|
|
263
263
|
}
|
|
264
264
|
// @ts-ignore
|
|
265
265
|
this.name = 'IpcError';
|
|
@@ -311,6 +311,9 @@ const listen$1 = async () => {
|
|
|
311
311
|
return globalThis;
|
|
312
312
|
};
|
|
313
313
|
class IpcChildWithModuleWorkerAndMessagePort extends Ipc {
|
|
314
|
+
constructor(port) {
|
|
315
|
+
super(port);
|
|
316
|
+
}
|
|
314
317
|
getData(event) {
|
|
315
318
|
return getData$1(event);
|
|
316
319
|
}
|
|
@@ -330,6 +333,7 @@ class IpcChildWithModuleWorkerAndMessagePort extends Ipc {
|
|
|
330
333
|
}
|
|
331
334
|
onMessage(callback) {
|
|
332
335
|
this._rawIpc.addEventListener('message', callback);
|
|
336
|
+
this._rawIpc.start();
|
|
333
337
|
}
|
|
334
338
|
}
|
|
335
339
|
const wrap$3 = port => {
|
package/dist/index.js
CHANGED
|
@@ -143,7 +143,7 @@ const getHelpfulChildProcessError = (stdout, stderr) => {
|
|
|
143
143
|
|
|
144
144
|
class IpcError extends VError {
|
|
145
145
|
// @ts-ignore
|
|
146
|
-
constructor(
|
|
146
|
+
constructor(betterMessage, stdout = '', stderr = '') {
|
|
147
147
|
if (stdout || stderr) {
|
|
148
148
|
// @ts-ignore
|
|
149
149
|
const {
|
|
@@ -155,9 +155,9 @@ class IpcError extends VError {
|
|
|
155
155
|
// @ts-ignore
|
|
156
156
|
cause.code = code;
|
|
157
157
|
cause.stack = stack;
|
|
158
|
-
super(cause,
|
|
158
|
+
super(cause, betterMessage);
|
|
159
159
|
} else {
|
|
160
|
-
super(
|
|
160
|
+
super(betterMessage);
|
|
161
161
|
}
|
|
162
162
|
// @ts-ignore
|
|
163
163
|
this.name = 'IpcError';
|
|
@@ -379,6 +379,9 @@ const listen$5 = async () => {
|
|
|
379
379
|
return globalThis;
|
|
380
380
|
};
|
|
381
381
|
class IpcChildWithModuleWorkerAndMessagePort extends Ipc {
|
|
382
|
+
constructor(port) {
|
|
383
|
+
super(port);
|
|
384
|
+
}
|
|
382
385
|
getData(event) {
|
|
383
386
|
return getData$1(event);
|
|
384
387
|
}
|
|
@@ -398,6 +401,7 @@ class IpcChildWithModuleWorkerAndMessagePort extends Ipc {
|
|
|
398
401
|
}
|
|
399
402
|
onMessage(callback) {
|
|
400
403
|
this._rawIpc.addEventListener('message', callback);
|
|
404
|
+
this._rawIpc.start();
|
|
401
405
|
}
|
|
402
406
|
}
|
|
403
407
|
const wrap$8 = port => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lvce-editor/ipc",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"description": "Inter Process Communication for Lvce Editor",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@lvce-editor/assert": "^1.2.0",
|
|
18
|
-
"@lvce-editor/verror": "^1.
|
|
18
|
+
"@lvce-editor/verror": "^1.3.0",
|
|
19
19
|
"@lvce-editor/web-socket-server": "^1.2.0"
|
|
20
20
|
},
|
|
21
21
|
"engines": {
|