@cadenza.io/core 3.1.3 → 3.1.5

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.mjs CHANGED
@@ -934,7 +934,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
934
934
  this.emitWithMetadata.bind(this),
935
935
  this.onProgress.bind(this)
936
936
  );
937
- if (result.errored || result.failed) {
937
+ if ((result == null ? void 0 : result.errored) || (result == null ? void 0 : result.failed)) {
938
938
  return this.retry(result);
939
939
  }
940
940
  return result;
@@ -1052,6 +1052,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1052
1052
  __error: `Node error: ${error}`,
1053
1053
  __retries: this.retries,
1054
1054
  error: `Node error: ${error}`,
1055
+ errored: true,
1055
1056
  returnedValue: this.result,
1056
1057
  ...errorData
1057
1058
  };
@@ -2332,7 +2333,7 @@ var GraphRunner = class extends SignalEmitter {
2332
2333
  * @edge Empty tasks warns no-op.
2333
2334
  */
2334
2335
  addTasks(tasks, context = {}) {
2335
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
2336
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
2336
2337
  let _tasks = Array.isArray(tasks) ? tasks : [tasks];
2337
2338
  if (_tasks.length === 0) {
2338
2339
  console.warn("No tasks/routines to add.");
@@ -2387,7 +2388,7 @@ var GraphRunner = class extends SignalEmitter {
2387
2388
  isMeta,
2388
2389
  executionTraceId,
2389
2390
  context: isNewTrace ? contextData.id : contextData,
2390
- previousRoutineExecution: (_m = (_l = context.__metadata) == null ? void 0 : _l.__routineExecId) != null ? _m : null,
2391
+ previousRoutineExecution: (_n = (_m = context.__localRoutineExecId) != null ? _m : (_l = context.__metadata) == null ? void 0 : _l.__routineExecId) != null ? _n : null,
2391
2392
  // TODO: There is a chance this is not added to the database yet...
2392
2393
  created: formatTimestamp(Date.now())
2393
2394
  },
@@ -2453,6 +2454,7 @@ var GraphRunner = class extends SignalEmitter {
2453
2454
  this.currentRun = new GraphRun(this.strategy);
2454
2455
  }
2455
2456
  }
2457
+ // TODO This should not live here. This is deputy related.
2456
2458
  startRun(context, emit) {
2457
2459
  var _a, _b, _c;
2458
2460
  if (context.__task || context.__routine) {