@cadenza.io/core 3.0.14 → 3.0.16

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.js CHANGED
@@ -798,7 +798,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
798
798
  uuid: this.id,
799
799
  routineExecutionId: this.routineExecId,
800
800
  executionTraceId: (_b = context.__executionTraceId) != null ? _b : (_a = context.__metadata) == null ? void 0 : _a.__executionTraceId,
801
- context: this.context.export(),
801
+ context: this.previousNodes.length === 0 ? this.context.id : this.context.export(),
802
802
  taskName: this.task.name,
803
803
  taskVersion: this.task.version,
804
804
  isMeta: this.isMeta(),
@@ -863,6 +863,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
863
863
  return this.executionStart;
864
864
  }
865
865
  end() {
866
+ var _a;
866
867
  if (this.executionStart === 0) {
867
868
  return 0;
868
869
  }
@@ -886,6 +887,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
886
887
  isRunning: false,
887
888
  isComplete: true,
888
889
  resultContext: this.context.export(),
890
+ //TODO: this needs processing
889
891
  errored: this.errored,
890
892
  failed: this.failed,
891
893
  errorMessage: context.__error,
@@ -895,10 +897,12 @@ var GraphNode = class _GraphNode extends SignalEmitter {
895
897
  filter: { uuid: this.id }
896
898
  });
897
899
  if (this.graphDone()) {
898
- this.emitWithMetadata(
899
- `meta.node.graph_completed:${this.routineExecId}`,
900
- context
901
- );
900
+ const context2 = this.context.export();
901
+ if ((_a = context2.context.__metadata) == null ? void 0 : _a.__deputyExecId)
902
+ this.emitWithMetadata(
903
+ `meta.node.graph_completed:${context2.context.__metadata.__deputyExecId}`,
904
+ context2
905
+ );
902
906
  this.emitMetricsWithMetadata(
903
907
  `meta.node.ended_routine_execution:${this.routineExecId}`,
904
908
  {