@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.mjs CHANGED
@@ -761,7 +761,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
761
761
  uuid: this.id,
762
762
  routineExecutionId: this.routineExecId,
763
763
  executionTraceId: (_b = context.__executionTraceId) != null ? _b : (_a = context.__metadata) == null ? void 0 : _a.__executionTraceId,
764
- context: this.context.export(),
764
+ context: this.previousNodes.length === 0 ? this.context.id : this.context.export(),
765
765
  taskName: this.task.name,
766
766
  taskVersion: this.task.version,
767
767
  isMeta: this.isMeta(),
@@ -826,6 +826,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
826
826
  return this.executionStart;
827
827
  }
828
828
  end() {
829
+ var _a;
829
830
  if (this.executionStart === 0) {
830
831
  return 0;
831
832
  }
@@ -849,6 +850,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
849
850
  isRunning: false,
850
851
  isComplete: true,
851
852
  resultContext: this.context.export(),
853
+ //TODO: this needs processing
852
854
  errored: this.errored,
853
855
  failed: this.failed,
854
856
  errorMessage: context.__error,
@@ -858,10 +860,12 @@ var GraphNode = class _GraphNode extends SignalEmitter {
858
860
  filter: { uuid: this.id }
859
861
  });
860
862
  if (this.graphDone()) {
861
- this.emitWithMetadata(
862
- `meta.node.graph_completed:${this.routineExecId}`,
863
- context
864
- );
863
+ const context2 = this.context.export();
864
+ if ((_a = context2.context.__metadata) == null ? void 0 : _a.__deputyExecId)
865
+ this.emitWithMetadata(
866
+ `meta.node.graph_completed:${context2.context.__metadata.__deputyExecId}`,
867
+ context2
868
+ );
865
869
  this.emitMetricsWithMetadata(
866
870
  `meta.node.ended_routine_execution:${this.routineExecId}`,
867
871
  {