@lvce-editor/ipc 13.4.0 → 13.6.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.d.ts CHANGED
@@ -21,7 +21,13 @@ interface IpcChildWithMessagePortListenOptions {
21
21
 
22
22
  // MessagePort specific implementations
23
23
  export const IpcChildWithMessagePort: IpcChild<MessagePort, IpcChildWithMessagePortListenOptions>
24
- export const IpcParentWithMessagePort: IpcParent<MessagePort>
24
+
25
+ interface IpcParentWithMessagePortCreateOptions {
26
+ readonly messagePort: MessagePort
27
+ readonly isMessagePortOpen?: boolean
28
+ }
29
+
30
+ export const IpcParentWithMessagePort: IpcParent<MessagePort, IpcParentWithMessagePortCreateOptions>
25
31
 
26
32
  interface IpcChildWithElectronMessagePortListenOptions {
27
33
  readonly messagePort: import('electron').MessagePortMain
package/dist/index.js CHANGED
@@ -1227,8 +1227,13 @@ const create$5 = async ({
1227
1227
  message: Message$1
1228
1228
  });
1229
1229
  messagePort.start();
1230
- const event = await eventPromise;
1231
- // @ts-ignore
1230
+ const {
1231
+ type,
1232
+ event
1233
+ } = await eventPromise;
1234
+ if (type !== Message$1) {
1235
+ throw new IpcError('Failed to wait for ipc message');
1236
+ }
1232
1237
  if (event.data !== readyMessage) {
1233
1238
  throw new IpcError('unexpected first message');
1234
1239
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/ipc",
3
- "version": "13.4.0",
3
+ "version": "13.6.0",
4
4
  "description": "Inter Process Communication for Lvce Editor",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",