@mantaq/traversal 0.1.1 → 0.1.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.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { AnyActor, Context, Snapshot, TransitionInfo } from "@mantaq/core";
1
+ import { AnyActor, Context, ErrorInfo, InternalEvent, Snapshot, TransitionInfo } from "@mantaq/core";
2
2
  //#region src/types.d.ts
3
3
  interface GraphNode {
4
4
  id: string;
@@ -84,12 +84,16 @@ interface InstrumentedActor<C = Record<string, unknown>> {
84
84
  on(event: "change", fn: (snapshot: Snapshot<C>, prev: Snapshot<C>) => void): () => void;
85
85
  on(event: "transition", fn: (info: TransitionInfo) => void): () => void;
86
86
  on(event: "done", fn: () => void): () => void;
87
+ on(event: "error", fn: (info: ErrorInfo) => void): () => void;
88
+ on(event: "output", fn: (event: InternalEvent) => void): () => void;
87
89
  recover(target: {
88
90
  state: AnyActor["state"];
89
91
  context: C;
90
92
  }): void;
91
93
  settled(): Promise<void>;
92
94
  options?: AnyActor["options"];
95
+ inject(event: InternalEvent): void;
96
+ dispose(): void;
93
97
  }
94
98
  declare function instrument<C>(actor: AnyActor<C>): InstrumentedActor<C>;
95
99
  //#endregion
package/dist/index.mjs CHANGED
@@ -300,6 +300,8 @@ function wrapWithProxy(actor, history) {
300
300
  return actor.snapshot();
301
301
  },
302
302
  on: actor.on.bind(actor),
303
+ inject: actor.inject.bind(actor),
304
+ dispose: actor.dispose.bind(actor),
303
305
  recover: actor.recover.bind(actor),
304
306
  settled: actor.settled.bind(actor)
305
307
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mantaq/traversal",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Graph extraction, traversal algorithms, and runtime tracking for mantaq actors.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -20,8 +20,8 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@mantaq/core": "0.2.0",
24
- "@mantaq/utils": "0.0.2"
23
+ "@mantaq/core": "0.3.0",
24
+ "@mantaq/utils": "0.0.3"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^26.2.0",