@ricsam/isolate-fetch 0.1.14 → 0.1.15

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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@ricsam/isolate-fetch",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "type": "module"
5
5
  }
@@ -64,6 +64,10 @@ export interface FetchHandle {
64
64
  dispatchClientWebSocketError(socketId: string): void;
65
65
  /** Register callback for client WebSocket commands from isolate */
66
66
  onClientWebSocketCommand(callback: (cmd: ClientWebSocketCommand) => void): () => void;
67
+ /** Register callback for events emitted from isolate code */
68
+ onEvent(callback: (event: string, payload: unknown) => void): () => void;
69
+ /** Dispatch an event into the isolate (calls __on listeners) */
70
+ dispatchEvent(event: string, payload: unknown): void;
67
71
  }
68
72
  /**
69
73
  * Setup Fetch API in an isolated-vm context
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ricsam/isolate-fetch",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "main": "./dist/cjs/index.cjs",
5
5
  "types": "./dist/types/index.d.ts",
6
6
  "exports": {