@lvce-editor/ipc 1.0.0 → 1.0.2

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.
@@ -0,0 +1,10 @@
1
+ export const getUtilityProcessPortData = (event) => {
2
+ const { data, ports } = event
3
+ if (ports.length === 0) {
4
+ return data
5
+ }
6
+ return {
7
+ ...data,
8
+ params: [...ports, ...data.params],
9
+ }
10
+ }
@@ -4,7 +4,11 @@ import { VError } from '../VError/VError.js'
4
4
  export class IpcError extends VError {
5
5
  constructor(message, stdout = '', stderr = '') {
6
6
  if (stdout || stderr) {
7
- const cause = GetHelpfulChildProcessError.getHelpfulChildProcessError(message, stdout, stderr)
7
+ const { message, code, stack } = GetHelpfulChildProcessError.getHelpfulChildProcessError(stdout, stderr)
8
+ const cause = new Error(message)
9
+ // @ts-ignore
10
+ cause.code = code
11
+ cause.stack = stack
8
12
  super(cause, message)
9
13
  } else {
10
14
  super(message)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/ipc",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Inter Process Communication for Lvce Editor",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",