@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.js CHANGED
@@ -201,14 +201,14 @@ var SignalBroker = class _SignalBroker {
201
201
  }
202
202
  }
203
203
  execute(signal, context) {
204
- var _a, _b, _c;
205
- const isMeta = signal.startsWith("meta.");
206
- const isSubMeta = signal.startsWith("sub_meta.") || context.__isSubMeta;
204
+ var _a, _b, _c, _d;
205
+ const isMeta = signal.includes("meta.");
206
+ const isSubMeta = signal.includes("sub_meta.") || context.__isSubMeta;
207
207
  const isMetric = (_a = context.__signalEmission) == null ? void 0 : _a.isMetric;
208
208
  if (!isSubMeta && (!isMeta || this.debug)) {
209
209
  const emittedAt = Date.now();
210
210
  context.__signalEmission = {
211
- ...context.__signalEmission,
211
+ ...(_b = context.__signalEmission) != null ? _b : {},
212
212
  signalName: signal,
213
213
  emittedAt: formatTimestamp(emittedAt),
214
214
  consumed: false,
@@ -223,7 +223,7 @@ var SignalBroker = class _SignalBroker {
223
223
  }
224
224
  if (this.debug && (!isMetric && !isSubMeta || this.verbose)) {
225
225
  console.log(
226
- `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)}`
226
+ `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)}`
227
227
  );
228
228
  }
229
229
  let executed;
@@ -971,7 +971,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
971
971
  this.emitWithMetadata.bind(this),
972
972
  this.onProgress.bind(this)
973
973
  );
974
- if (result.errored || result.failed) {
974
+ if ((result == null ? void 0 : result.errored) || (result == null ? void 0 : result.failed)) {
975
975
  return this.retry(result);
976
976
  }
977
977
  return result;
@@ -1089,6 +1089,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
1089
1089
  __error: `Node error: ${error}`,
1090
1090
  __retries: this.retries,
1091
1091
  error: `Node error: ${error}`,
1092
+ errored: true,
1092
1093
  returnedValue: this.result,
1093
1094
  ...errorData
1094
1095
  };