loop-task 2.1.5 → 2.1.8
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.
|
@@ -50,6 +50,8 @@ export class LoopController extends EventEmitter {
|
|
|
50
50
|
return this._status;
|
|
51
51
|
}
|
|
52
52
|
start() {
|
|
53
|
+
if (this._status === "running")
|
|
54
|
+
return;
|
|
53
55
|
this.skippedCount = 0;
|
|
54
56
|
this.logStream?.end();
|
|
55
57
|
this.abortController = new AbortController();
|
|
@@ -111,7 +113,6 @@ export class LoopController extends EventEmitter {
|
|
|
111
113
|
this.sessionStartedAt = new Date().toISOString();
|
|
112
114
|
this._resetSchedule = true;
|
|
113
115
|
this._paused = false;
|
|
114
|
-
this._status = "waiting";
|
|
115
116
|
const phase = this.options.offset !== null
|
|
116
117
|
? this.options.offset
|
|
117
118
|
: computePhase(this.id, this.options.interval);
|
|
@@ -122,6 +123,7 @@ export class LoopController extends EventEmitter {
|
|
|
122
123
|
this.resumeResolve = null;
|
|
123
124
|
}
|
|
124
125
|
this.start();
|
|
126
|
+
this._status = "waiting";
|
|
125
127
|
this.emit("resumed");
|
|
126
128
|
return true;
|
|
127
129
|
}
|
|
@@ -136,8 +138,8 @@ export class LoopController extends EventEmitter {
|
|
|
136
138
|
if (needsStart) {
|
|
137
139
|
this._stopAfterRun = true;
|
|
138
140
|
this._paused = false;
|
|
139
|
-
this._status = "running";
|
|
140
141
|
this.start();
|
|
142
|
+
this._status = "running";
|
|
141
143
|
}
|
|
142
144
|
else {
|
|
143
145
|
if (this._paused)
|
|
@@ -47,14 +47,13 @@ export async function runLoop(ctrl) {
|
|
|
47
47
|
break;
|
|
48
48
|
}
|
|
49
49
|
const runStartedAtMs = Date.now();
|
|
50
|
-
const { exitCode, totalDuration } = await executeRunImpl(ctrl, signal);
|
|
50
|
+
const { exitCode, totalDuration, chainContext } = await executeRunImpl(ctrl, signal);
|
|
51
51
|
const chainTargetId = exitCode === 0
|
|
52
52
|
? (ctrl.options.taskId ? ctrl.taskResolver(ctrl.options.taskId)?.onSuccessTaskId : undefined)
|
|
53
53
|
: (ctrl.options.taskId ? ctrl.taskResolver(ctrl.options.taskId)?.onFailureTaskId : undefined);
|
|
54
54
|
if (chainTargetId) {
|
|
55
55
|
const task = ctrl.options.taskId ? ctrl.taskResolver(ctrl.options.taskId) : null;
|
|
56
56
|
const cwd = resolveEffectiveCwd(ctrl.options.cwd, ctrl.projectDirectory);
|
|
57
|
-
const chainContext = {};
|
|
58
57
|
const chainResult = await executeChain({
|
|
59
58
|
chainTargetId,
|
|
60
59
|
exitCode,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "loop-task",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.8",
|
|
4
4
|
"description": "Loop engineering toolkit. Run any command on a cadence, in the background, managed from a terminal board. Schedule tests, builds, syncs, or agent prompts.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|