@cadenza.io/core 1.11.10 → 1.11.12
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.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -206,7 +206,8 @@ declare class GraphNode extends SignalEmitter implements Graph {
|
|
|
206
206
|
private errored;
|
|
207
207
|
destroyed: boolean;
|
|
208
208
|
protected debug: boolean;
|
|
209
|
-
|
|
209
|
+
protected verbose: boolean;
|
|
210
|
+
constructor(task: Task, context: GraphContext, routineExecId: string, prevNodes?: GraphNode[], debug?: boolean, verbose?: boolean);
|
|
210
211
|
setDebug(value: boolean): void;
|
|
211
212
|
isUnique(): boolean;
|
|
212
213
|
isMeta(): boolean;
|
|
@@ -598,6 +599,7 @@ declare class GraphRunner extends SignalEmitter {
|
|
|
598
599
|
readonly id: string;
|
|
599
600
|
protected currentRun: GraphRun;
|
|
600
601
|
private debug;
|
|
602
|
+
private verbose;
|
|
601
603
|
protected isRunning: boolean;
|
|
602
604
|
private readonly isMeta;
|
|
603
605
|
protected strategy: GraphRunStrategy;
|
|
@@ -628,6 +630,7 @@ declare class GraphRunner extends SignalEmitter {
|
|
|
628
630
|
private runAsync;
|
|
629
631
|
protected reset(): GraphRun;
|
|
630
632
|
setDebug(value: boolean): void;
|
|
633
|
+
setVerbose(value: boolean): void;
|
|
631
634
|
destroy(): void;
|
|
632
635
|
setStrategy(strategy: GraphRunStrategy): void;
|
|
633
636
|
private startRun;
|
package/dist/index.d.ts
CHANGED
|
@@ -206,7 +206,8 @@ declare class GraphNode extends SignalEmitter implements Graph {
|
|
|
206
206
|
private errored;
|
|
207
207
|
destroyed: boolean;
|
|
208
208
|
protected debug: boolean;
|
|
209
|
-
|
|
209
|
+
protected verbose: boolean;
|
|
210
|
+
constructor(task: Task, context: GraphContext, routineExecId: string, prevNodes?: GraphNode[], debug?: boolean, verbose?: boolean);
|
|
210
211
|
setDebug(value: boolean): void;
|
|
211
212
|
isUnique(): boolean;
|
|
212
213
|
isMeta(): boolean;
|
|
@@ -598,6 +599,7 @@ declare class GraphRunner extends SignalEmitter {
|
|
|
598
599
|
readonly id: string;
|
|
599
600
|
protected currentRun: GraphRun;
|
|
600
601
|
private debug;
|
|
602
|
+
private verbose;
|
|
601
603
|
protected isRunning: boolean;
|
|
602
604
|
private readonly isMeta;
|
|
603
605
|
protected strategy: GraphRunStrategy;
|
|
@@ -628,6 +630,7 @@ declare class GraphRunner extends SignalEmitter {
|
|
|
628
630
|
private runAsync;
|
|
629
631
|
protected reset(): GraphRun;
|
|
630
632
|
setDebug(value: boolean): void;
|
|
633
|
+
setVerbose(value: boolean): void;
|
|
631
634
|
destroy(): void;
|
|
632
635
|
setStrategy(strategy: GraphRunStrategy): void;
|
|
633
636
|
private startRun;
|
package/dist/index.js
CHANGED
|
@@ -200,7 +200,7 @@ var SignalBroker = class _SignalBroker {
|
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
execute(signal, context) {
|
|
203
|
-
var _a;
|
|
203
|
+
var _a, _b, _c;
|
|
204
204
|
const isMeta = signal.startsWith("meta.");
|
|
205
205
|
const isSubMeta = signal.startsWith("sub_meta.");
|
|
206
206
|
const isMetric = (_a = context.__signalEmission) == null ? void 0 : _a.isMetric;
|
|
@@ -222,7 +222,7 @@ var SignalBroker = class _SignalBroker {
|
|
|
222
222
|
}
|
|
223
223
|
if (this.debug && (!isMetric || this.verbose)) {
|
|
224
224
|
console.log(
|
|
225
|
-
`
|
|
225
|
+
`EMITTING signal ${signal} to listeners ${(_c = (_b = this.signalObservers.get(signal)) == null ? void 0 : _b.tasks.size) != null ? _c : 0} with context ${JSON.stringify(context)}`
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
228
|
let executed;
|
|
@@ -696,7 +696,7 @@ function sleep(ms) {
|
|
|
696
696
|
|
|
697
697
|
// src/graph/execution/GraphNode.ts
|
|
698
698
|
var GraphNode = class _GraphNode extends SignalEmitter {
|
|
699
|
-
constructor(task, context, routineExecId, prevNodes = [], debug = false) {
|
|
699
|
+
constructor(task, context, routineExecId, prevNodes = [], debug = false, verbose = false) {
|
|
700
700
|
var _a;
|
|
701
701
|
super(
|
|
702
702
|
task.isMeta && !debug || task.isSubMeta || ((_a = context == null ? void 0 : context.getMetaData()) == null ? void 0 : _a.__isSubMeta)
|
|
@@ -718,6 +718,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
|
|
|
718
718
|
this.errored = false;
|
|
719
719
|
this.destroyed = false;
|
|
720
720
|
this.debug = false;
|
|
721
|
+
this.verbose = false;
|
|
721
722
|
this.id = (0, import_uuid3.v4)();
|
|
722
723
|
this.task = task;
|
|
723
724
|
this.context = context;
|
|
@@ -727,6 +728,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
|
|
|
727
728
|
this.routineExecId = routineExecId;
|
|
728
729
|
this.splitGroupId = routineExecId;
|
|
729
730
|
this.debug = debug;
|
|
731
|
+
this.verbose = verbose;
|
|
730
732
|
}
|
|
731
733
|
setDebug(value) {
|
|
732
734
|
this.debug = value;
|
|
@@ -856,7 +858,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
|
|
|
856
858
|
filter: { uuid: this.routineExecId }
|
|
857
859
|
});
|
|
858
860
|
}
|
|
859
|
-
if (this.debug) {
|
|
861
|
+
if (this.debug && !this.task.isSubMeta && !this.context.getMetaData().__isSubMeta || this.verbose) {
|
|
860
862
|
this.log();
|
|
861
863
|
}
|
|
862
864
|
this.emitMetricsWithMetadata("meta.node.started", {
|
|
@@ -1194,7 +1196,8 @@ var GraphNode = class _GraphNode extends SignalEmitter {
|
|
|
1194
1196
|
this.context,
|
|
1195
1197
|
this.routineExecId,
|
|
1196
1198
|
[this],
|
|
1197
|
-
this.debug
|
|
1199
|
+
this.debug,
|
|
1200
|
+
this.verbose
|
|
1198
1201
|
);
|
|
1199
1202
|
}
|
|
1200
1203
|
consume(node) {
|
|
@@ -1292,7 +1295,7 @@ var GraphNode = class _GraphNode extends SignalEmitter {
|
|
|
1292
1295
|
}
|
|
1293
1296
|
log() {
|
|
1294
1297
|
console.log(
|
|
1295
|
-
"Node
|
|
1298
|
+
"Node EXECUTION:",
|
|
1296
1299
|
this.task.name,
|
|
1297
1300
|
JSON.stringify(this.context.getFullContext())
|
|
1298
1301
|
);
|
|
@@ -2246,6 +2249,7 @@ var GraphRunner = class extends SignalEmitter {
|
|
|
2246
2249
|
constructor(isMeta = false) {
|
|
2247
2250
|
super(isMeta);
|
|
2248
2251
|
this.debug = false;
|
|
2252
|
+
this.verbose = false;
|
|
2249
2253
|
this.isRunning = false;
|
|
2250
2254
|
this.isMeta = false;
|
|
2251
2255
|
this.id = (0, import_uuid6.v4)();
|
|
@@ -2315,7 +2319,7 @@ var GraphRunner = class extends SignalEmitter {
|
|
|
2315
2319
|
}
|
|
2316
2320
|
allTasks.forEach(
|
|
2317
2321
|
(task) => this.currentRun.addNode(
|
|
2318
|
-
new GraphNode(task, ctx, routineExecId, [], this.debug)
|
|
2322
|
+
new GraphNode(task, ctx, routineExecId, [], this.debug, this.verbose)
|
|
2319
2323
|
)
|
|
2320
2324
|
);
|
|
2321
2325
|
}
|
|
@@ -2358,6 +2362,9 @@ var GraphRunner = class extends SignalEmitter {
|
|
|
2358
2362
|
setDebug(value) {
|
|
2359
2363
|
this.debug = value;
|
|
2360
2364
|
}
|
|
2365
|
+
setVerbose(value) {
|
|
2366
|
+
this.verbose = value;
|
|
2367
|
+
}
|
|
2361
2368
|
destroy() {
|
|
2362
2369
|
this.currentRun.destroy();
|
|
2363
2370
|
}
|
|
@@ -3094,6 +3101,7 @@ var Cadenza = class {
|
|
|
3094
3101
|
this.broker.setDebug(true);
|
|
3095
3102
|
this.broker.setVerbose(true);
|
|
3096
3103
|
this.runner.setDebug(true);
|
|
3104
|
+
this.runner.setVerbose(true);
|
|
3097
3105
|
}
|
|
3098
3106
|
}
|
|
3099
3107
|
/**
|