@cadenza.io/core 3.1.2 → 3.1.4

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
@@ -164,14 +164,14 @@ var SignalBroker = class _SignalBroker {
164
164
  }
165
165
  }
166
166
  execute(signal, context) {
167
- var _a, _b, _c;
168
- const isMeta = signal.startsWith("meta.");
169
- const isSubMeta = signal.startsWith("sub_meta.") || context.__isSubMeta;
167
+ var _a, _b, _c, _d;
168
+ const isMeta = signal.includes("meta.");
169
+ const isSubMeta = signal.includes("sub_meta.") || context.__isSubMeta;
170
170
  const isMetric = (_a = context.__signalEmission) == null ? void 0 : _a.isMetric;
171
171
  if (!isSubMeta && (!isMeta || this.debug)) {
172
172
  const emittedAt = Date.now();
173
173
  context.__signalEmission = {
174
- ...context.__signalEmission,
174
+ ...(_b = context.__signalEmission) != null ? _b : {},
175
175
  signalName: signal,
176
176
  emittedAt: formatTimestamp(emittedAt),
177
177
  consumed: false,
@@ -186,7 +186,7 @@ var SignalBroker = class _SignalBroker {
186
186
  }
187
187
  if (this.debug && (!isMetric && !isSubMeta || this.verbose)) {
188
188
  console.log(
189
- `EMITTING ${signal} to listeners ${(_c = (_b = this.signalObservers.get(signal)) == null ? void 0 : _b.tasks.size) != null ? _c : 0} with context ${this.verbose ? JSON.stringify(context) : JSON.stringify(context).slice(0, 100)}`
189
+ `EMITTING ${signal} to listeners ${(_d = (_c = this.signalObservers.get(signal)) == null ? void 0 : _c.tasks.size) != null ? _d : 0} with context ${this.verbose ? JSON.stringify(context) : JSON.stringify(context).slice(0, 100)}`
190
190
  );
191
191
  }
192
192
  let executed;
@@ -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
  };