next-issue 16.6.0 → 16.7.0
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/shared/watch.mjs
CHANGED
|
@@ -94,9 +94,9 @@ async function watchPasses(failed, watch) {
|
|
|
94
94
|
}
|
|
95
95
|
const minutes = backOffMinutes(step);
|
|
96
96
|
step += 1;
|
|
97
|
-
const woken = watch.watching?.changed();
|
|
97
|
+
const woken = AbortSignal.any([watch.watching?.changed(), watch.lookNow?.()].filter((signal) => signal !== undefined));
|
|
98
98
|
if (!(await watch.wait(minutes, woken))) {
|
|
99
|
-
if (woken
|
|
99
|
+
if (!woken.aborted || watch.stop() || !watching()) {
|
|
100
100
|
return { reports };
|
|
101
101
|
}
|
|
102
102
|
step = 0;
|
package/dist/worker/run.mjs
CHANGED
|
@@ -86,6 +86,7 @@ export function watchRun(args, loop, context, controls, print) {
|
|
|
86
86
|
hunter: hunt,
|
|
87
87
|
hunting: controls.hunting ?? onOff(args.hunt),
|
|
88
88
|
watching: controls.watching,
|
|
89
|
+
lookNow: controls.lookNow,
|
|
89
90
|
});
|
|
90
91
|
}
|
|
91
92
|
function recordLoopEnd(recorder, stoppedAt, stopped, error) {
|
|
@@ -7,6 +7,7 @@ export function newRun(progress) {
|
|
|
7
7
|
return {
|
|
8
8
|
progress,
|
|
9
9
|
children: runChildren(),
|
|
10
|
+
lookNow: new AbortController(),
|
|
10
11
|
watching: onOff(progress.watching === true),
|
|
11
12
|
hunting: onOff(progress.hunting),
|
|
12
13
|
};
|
|
@@ -51,6 +52,8 @@ export function joinRun(run, given) {
|
|
|
51
52
|
if (given.hunt !== undefined) {
|
|
52
53
|
setHunting(run, given.hunt);
|
|
53
54
|
}
|
|
55
|
+
run.lookNow.abort();
|
|
56
|
+
run.lookNow = new AbortController();
|
|
54
57
|
return undefined;
|
|
55
58
|
}
|
|
56
59
|
export function stopPoint(after) {
|
|
@@ -137,6 +140,7 @@ export function runControls(run, update) {
|
|
|
137
140
|
interrupts: runInterrupts(run),
|
|
138
141
|
hunting: run.hunting,
|
|
139
142
|
watching: run.watching,
|
|
143
|
+
lookNow: () => run.lookNow.signal,
|
|
140
144
|
onEvent: (record) => update(applyEvent(run.progress, record)),
|
|
141
145
|
onHunter: (busy) => {
|
|
142
146
|
run.huntBusy = busy;
|