mikser-io 9.95.0 → 9.96.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/app.js +21 -1
- package/package.json +1 -1
package/app.js
CHANGED
|
@@ -32,6 +32,21 @@ function locate(argv) {
|
|
|
32
32
|
// exited with nothing on the port.
|
|
33
33
|
const longRunning = has('--watch', '-w', '--server', '-s')
|
|
34
34
|
|
|
35
|
+
// Answerable without an engine, and therefore never forwarded.
|
|
36
|
+
//
|
|
37
|
+
// `--help` and `--version` do not describe a build: commander answers them
|
|
38
|
+
// from the option table and exits. Forwarding them sent an instance a
|
|
39
|
+
// request it could not recognise — commander does not list help among the
|
|
40
|
+
// options parseOptions reports on — so refuseUnknownFlags rejected
|
|
41
|
+
// `--help` as an unknown flag, with a detail line claiming "the same
|
|
42
|
+
// command with nothing listening would have been rejected too", which is
|
|
43
|
+
// the opposite of true: with nothing listening it prints the help.
|
|
44
|
+
//
|
|
45
|
+
// Which made the help unreachable in exactly the situation that sends
|
|
46
|
+
// someone to it — a watcher running, wondering which check answers which
|
|
47
|
+
// question — and made a correct refusal say something false.
|
|
48
|
+
const answeredLocally = has('--help', '-h', '--version', '-V')
|
|
49
|
+
|
|
35
50
|
// What to ask the instance for. Report-only commands go over the same
|
|
36
51
|
// socket as a build: they read, so running them locally never damaged
|
|
37
52
|
// anything, but a catalogue being written by another process is not a
|
|
@@ -56,6 +71,7 @@ function locate(argv) {
|
|
|
56
71
|
|
|
57
72
|
return {
|
|
58
73
|
longRunning,
|
|
74
|
+
answeredLocally,
|
|
59
75
|
// The flags this process was invoked with, forwarded so the INSTANCE
|
|
60
76
|
// can reject an unknown one. This pre-parser reads the few options it
|
|
61
77
|
// needs and passes the rest along, so commander never runs on a
|
|
@@ -85,7 +101,11 @@ async function main() {
|
|
|
85
101
|
}
|
|
86
102
|
}
|
|
87
103
|
|
|
88
|
-
|
|
104
|
+
// `--help` and `--version` never travel. Commander answers them from the
|
|
105
|
+
// option table and exits, so there is nothing to ask an instance for — and
|
|
106
|
+
// asking got them refused as unknown flags, since commander does not list
|
|
107
|
+
// help among the options parseOptions reports on.
|
|
108
|
+
if (!where.longRunning && !where.answeredLocally) {
|
|
89
109
|
const code = await forward({
|
|
90
110
|
workingFolder,
|
|
91
111
|
config: path.resolve(where.workingFolder, where.config),
|