@cadenza.io/core 3.1.3 → 3.1.5
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 +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -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
|
};
|
|
@@ -2369,7 +2370,7 @@ var GraphRunner = class extends SignalEmitter {
|
|
|
2369
2370
|
* @edge Empty tasks warns no-op.
|
|
2370
2371
|
*/
|
|
2371
2372
|
addTasks(tasks, context = {}) {
|
|
2372
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
2373
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
2373
2374
|
let _tasks = Array.isArray(tasks) ? tasks : [tasks];
|
|
2374
2375
|
if (_tasks.length === 0) {
|
|
2375
2376
|
console.warn("No tasks/routines to add.");
|
|
@@ -2424,7 +2425,7 @@ var GraphRunner = class extends SignalEmitter {
|
|
|
2424
2425
|
isMeta,
|
|
2425
2426
|
executionTraceId,
|
|
2426
2427
|
context: isNewTrace ? contextData.id : contextData,
|
|
2427
|
-
previousRoutineExecution: (_m = (_l = context.__metadata) == null ? void 0 : _l.__routineExecId) != null ?
|
|
2428
|
+
previousRoutineExecution: (_n = (_m = context.__localRoutineExecId) != null ? _m : (_l = context.__metadata) == null ? void 0 : _l.__routineExecId) != null ? _n : null,
|
|
2428
2429
|
// TODO: There is a chance this is not added to the database yet...
|
|
2429
2430
|
created: formatTimestamp(Date.now())
|
|
2430
2431
|
},
|
|
@@ -2490,6 +2491,7 @@ var GraphRunner = class extends SignalEmitter {
|
|
|
2490
2491
|
this.currentRun = new GraphRun(this.strategy);
|
|
2491
2492
|
}
|
|
2492
2493
|
}
|
|
2494
|
+
// TODO This should not live here. This is deputy related.
|
|
2493
2495
|
startRun(context, emit) {
|
|
2494
2496
|
var _a, _b, _c;
|
|
2495
2497
|
if (context.__task || context.__routine) {
|