@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.mjs CHANGED
@@ -11,6 +11,10 @@ function deepCloneFilter(input, filterOut = () => false) {
11
11
  while (stack.length) {
12
12
  const { source, target, key } = stack.pop();
13
13
  const currentTarget = key !== void 0 ? target[key] : target;
14
+ if (key === "__taskInstance" || key === "__routineInstance" || key === "__task" || key === "__routine") {
15
+ target[key] = source;
16
+ continue;
17
+ }
14
18
  for (const [k, value] of Object.entries(source)) {
15
19
  if (filterOut(k)) continue;
16
20
  if (value && typeof value === "object") {
@@ -854,6 +858,10 @@ var GraphNode = class _GraphNode extends SignalEmitter {
854
858
  filter: { uuid: this.id }
855
859
  });
856
860
  if (this.graphDone()) {
861
+ this.emitWithMetadata(
862
+ `meta.node.graph_completed:${this.routineExecId}`,
863
+ context
864
+ );
857
865
  this.emitMetricsWithMetadata(
858
866
  `meta.node.ended_routine_execution:${this.routineExecId}`,
859
867
  {
@@ -1919,7 +1927,7 @@ var Task = class extends SignalEmitter {
1919
1927
  this.observedSignals.add(signal);
1920
1928
  this.emitWithMetadata("meta.task.observed_signal", {
1921
1929
  data: {
1922
- signalName: signal,
1930
+ signalName: signal.split(":")[0],
1923
1931
  taskName: this.name,
1924
1932
  taskVersion: this.version
1925
1933
  }
@@ -1938,7 +1946,7 @@ var Task = class extends SignalEmitter {
1938
1946
  this.emitsSignals.add(signal);
1939
1947
  this.emitWithMetadata("meta.task.attached_signal", {
1940
1948
  data: {
1941
- signalName: signal,
1949
+ signalName: signal.split(":")[0],
1942
1950
  taskName: this.name,
1943
1951
  taskVersion: this.version
1944
1952
  }
@@ -2433,7 +2441,6 @@ var GraphRunner = class extends SignalEmitter {
2433
2441
  var _a;
2434
2442
  if (context.__task || context.__routine) {
2435
2443
  const routine = (_a = context.__task) != null ? _a : context.__routine;
2436
- console.log("starting routine", routine, context);
2437
2444
  this.run(routine, context);
2438
2445
  return true;
2439
2446
  } else {