next-issue 6.3.2 → 6.3.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/README.md +3 -0
- package/dist/serve.mjs +7 -0
- package/dist/worker-run.mjs +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -547,6 +547,9 @@ affect another. The worker:
|
|
|
547
547
|
- holds `.next-issue/worker.lock` in the repository, with its process id, so
|
|
548
548
|
only one worker runs per repository. A lock whose process is no longer alive
|
|
549
549
|
is taken over;
|
|
550
|
+
- refuses a `start`, `stop` or `questions` message whose `root` is not
|
|
551
|
+
the exact path of its repository with an `error` message, and starts or
|
|
552
|
+
stops nothing;
|
|
550
553
|
- runs at most one run at a time. A client starts it with
|
|
551
554
|
`{ "type": "start", "root": "<path>", "args": [...] }`. Each run is like
|
|
552
555
|
`next-issue` with those args, or with none when `args` is left out. It takes
|
package/dist/serve.mjs
CHANGED
|
@@ -81,6 +81,13 @@ export async function startWorker(options) {
|
|
|
81
81
|
closeWhenIdle();
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
else if (value.root !== options.root) {
|
|
85
|
+
send(socket, {
|
|
86
|
+
type: 'error',
|
|
87
|
+
root: value.root,
|
|
88
|
+
message: `the worker serves ${options.root} only`,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
84
91
|
else if (value.type === 'start') {
|
|
85
92
|
start(socket, value.root, value.args ?? []);
|
|
86
93
|
}
|
package/dist/worker-run.mjs
CHANGED
|
@@ -15,12 +15,12 @@ export function endStatus(run) {
|
|
|
15
15
|
return run.progress.error === undefined ? 'finished' : 'failed';
|
|
16
16
|
}
|
|
17
17
|
export function startRefusal(run, restart) {
|
|
18
|
-
if (active(run)) {
|
|
19
|
-
return 'a run is going in this repository already';
|
|
20
|
-
}
|
|
21
18
|
if (restart) {
|
|
22
19
|
return 'the worker is restarting, try again soon';
|
|
23
20
|
}
|
|
21
|
+
if (active(run)) {
|
|
22
|
+
return 'a run is going in this repository already';
|
|
23
|
+
}
|
|
24
24
|
return undefined;
|
|
25
25
|
}
|
|
26
26
|
export function runsMessage(runs) {
|