@cadenza.io/core 1.11.1 → 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 +18 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -221,7 +221,7 @@ var SignalBroker = class _SignalBroker {
|
|
|
221
221
|
executed = this.executeListener(signal, context);
|
|
222
222
|
if (!isSubMeta) {
|
|
223
223
|
const parts = signal.slice(0, Math.max(signal.lastIndexOf(":"), signal.lastIndexOf("."))).split(".");
|
|
224
|
-
for (let i = parts.length; i >
|
|
224
|
+
for (let i = parts.length; i > -1; i--) {
|
|
225
225
|
const parent = parts.slice(0, i).join(".");
|
|
226
226
|
executed = executed || this.executeListener(parent + ".*", context);
|
|
227
227
|
}
|
|
@@ -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
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
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)
|