@cadenza.io/core 3.0.19 → 3.0.21

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
@@ -651,7 +651,7 @@ declare class GraphRunner extends SignalEmitter {
651
651
  setVerbose(value: boolean): void;
652
652
  destroy(): void;
653
653
  setStrategy(strategy: GraphRunStrategy): void;
654
- startRun(context: AnyObject): boolean;
654
+ startRun(context: AnyObject, emit: (signal: string, ctx: AnyObject) => void): boolean;
655
655
  }
656
656
 
657
657
  declare class SignalBroker {
package/dist/index.d.ts CHANGED
@@ -651,7 +651,7 @@ declare class GraphRunner extends SignalEmitter {
651
651
  setVerbose(value: boolean): void;
652
652
  destroy(): void;
653
653
  setStrategy(strategy: GraphRunStrategy): void;
654
- startRun(context: AnyObject): boolean;
654
+ startRun(context: AnyObject, emit: (signal: string, ctx: AnyObject) => void): boolean;
655
655
  }
656
656
 
657
657
  declare class SignalBroker {
package/dist/index.js CHANGED
@@ -1574,7 +1574,7 @@ var Task = class extends SignalEmitter {
1574
1574
  this.getTag = (context) => getTagCallback(context, this);
1575
1575
  this.throttled = true;
1576
1576
  }
1577
- if (register && !this.isHidden && !this.isSubMeta) {
1577
+ if (register && !this.isHidden) {
1578
1578
  const { __functionString, __getTagCallback } = this.export();
1579
1579
  this.emitWithMetadata("meta.task.created", {
1580
1580
  data: {
@@ -1601,7 +1601,8 @@ var Task = class extends SignalEmitter {
1601
1601
  // inputContextSchemaId: this.inputContextSchema,
1602
1602
  // outputContextSchemaId: this.outputContextSchema,
1603
1603
  },
1604
- __taskInstance: this
1604
+ __taskInstance: this,
1605
+ __isSubMeta: this.isSubMeta
1605
1606
  });
1606
1607
  }
1607
1608
  }
@@ -2211,6 +2212,7 @@ var GraphRegistry = class _GraphRegistry {
2211
2212
  const { __name } = context;
2212
2213
  for (const task of this.tasks.values()) {
2213
2214
  if (task.name === __name) {
2215
+ console.log("TASK FOUND", task.name);
2214
2216
  return { ...context, __task: task };
2215
2217
  }
2216
2218
  }
@@ -2475,8 +2477,9 @@ var GraphRunner = class extends SignalEmitter {
2475
2477
  this.currentRun = new GraphRun(this.strategy);
2476
2478
  }
2477
2479
  }
2478
- startRun(context) {
2480
+ startRun(context, emit) {
2479
2481
  var _a, _b, _c;
2482
+ console.log("START RUN", context);
2480
2483
  if (context.__task || context.__routine) {
2481
2484
  const routine = (_a = context.__task) != null ? _a : context.__routine;
2482
2485
  delete context.__task;
@@ -2488,6 +2491,7 @@ var GraphRunner = class extends SignalEmitter {
2488
2491
  } else {
2489
2492
  context.errored = true;
2490
2493
  context.__error = "No routine or task defined.";
2494
+ emit("meta.runner.failed", context);
2491
2495
  return false;
2492
2496
  }
2493
2497
  }