@cadenza.io/core 1.11.2 → 1.11.3

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
@@ -2246,21 +2246,26 @@ var GraphRunner = class extends SignalEmitter {
2246
2246
  }
2247
2247
  return t;
2248
2248
  });
2249
+ const isSubMeta = allTasks.some((t) => t.isSubMeta) || !!context.__isSubMeta;
2250
+ context.__isSubMeta = isSubMeta;
2249
2251
  const ctx = new GraphContext(context || {});
2250
2252
  const routineExecId = (_a = context.__routineExecId) != null ? _a : (0, import_uuid6.v4)();
2251
2253
  context.__routineExecId = routineExecId;
2252
- this.emit("meta.runner.added_tasks", {
2253
- data: {
2254
- uuid: routineExecId,
2255
- name: routineName,
2256
- isMeta,
2257
- contractId: (_d = (_c = (_b = context.__metaData) == null ? void 0 : _b.__contractId) != null ? _c : context.__contractId) != null ? _d : null,
2258
- context: ctx.export(),
2259
- previousRoutineExecution: (_f = (_e = context.__metaData) == null ? void 0 : _e.__routineExecId) != null ? _f : null,
2260
- // TODO: There is a chance this is not added to the database yet...
2261
- created: formatTimestamp(Date.now())
2262
- }
2263
- });
2254
+ if (!isSubMeta) {
2255
+ this.emit("meta.runner.added_tasks", {
2256
+ data: {
2257
+ uuid: routineExecId,
2258
+ name: routineName,
2259
+ isMeta,
2260
+ routineId,
2261
+ contractId: (_d = (_c = (_b = context.__metaData) == null ? void 0 : _b.__contractId) != null ? _c : context.__contractId) != null ? _d : null,
2262
+ context: ctx.export(),
2263
+ previousRoutineExecution: (_f = (_e = context.__metaData) == null ? void 0 : _e.__routineExecId) != null ? _f : null,
2264
+ // TODO: There is a chance this is not added to the database yet...
2265
+ created: formatTimestamp(Date.now())
2266
+ }
2267
+ });
2268
+ }
2264
2269
  allTasks.forEach(
2265
2270
  (task) => this.currentRun.addNode(
2266
2271
  new GraphNode(task, ctx, routineExecId, [], this.debug)