@cadenza.io/core 3.0.12 → 3.0.14

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
@@ -48,6 +48,10 @@ function deepCloneFilter(input, filterOut = () => false) {
48
48
  while (stack.length) {
49
49
  const { source, target, key } = stack.pop();
50
50
  const currentTarget = key !== void 0 ? target[key] : target;
51
+ if (key === "__taskInstance" || key === "__routineInstance" || key === "__task" || key === "__routine") {
52
+ target[key] = source;
53
+ continue;
54
+ }
51
55
  for (const [k, value] of Object.entries(source)) {
52
56
  if (filterOut(k)) continue;
53
57
  if (value && typeof value === "object") {
@@ -891,6 +895,10 @@ var GraphNode = class _GraphNode extends SignalEmitter {
891
895
  filter: { uuid: this.id }
892
896
  });
893
897
  if (this.graphDone()) {
898
+ this.emitWithMetadata(
899
+ `meta.node.graph_completed:${this.routineExecId}`,
900
+ context
901
+ );
894
902
  this.emitMetricsWithMetadata(
895
903
  `meta.node.ended_routine_execution:${this.routineExecId}`,
896
904
  {
@@ -1956,7 +1964,7 @@ var Task = class extends SignalEmitter {
1956
1964
  this.observedSignals.add(signal);
1957
1965
  this.emitWithMetadata("meta.task.observed_signal", {
1958
1966
  data: {
1959
- signalName: signal,
1967
+ signalName: signal.split(":")[0],
1960
1968
  taskName: this.name,
1961
1969
  taskVersion: this.version
1962
1970
  }
@@ -1975,7 +1983,7 @@ var Task = class extends SignalEmitter {
1975
1983
  this.emitsSignals.add(signal);
1976
1984
  this.emitWithMetadata("meta.task.attached_signal", {
1977
1985
  data: {
1978
- signalName: signal,
1986
+ signalName: signal.split(":")[0],
1979
1987
  taskName: this.name,
1980
1988
  taskVersion: this.version
1981
1989
  }
@@ -2470,7 +2478,6 @@ var GraphRunner = class extends SignalEmitter {
2470
2478
  var _a;
2471
2479
  if (context.__task || context.__routine) {
2472
2480
  const routine = (_a = context.__task) != null ? _a : context.__routine;
2473
- console.log("starting routine", routine, context);
2474
2481
  this.run(routine, context);
2475
2482
  return true;
2476
2483
  } else {