spec-controller 0.1.0-alpha.31 → 0.1.0-alpha.33
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 +2 -0
- package/dist/cli-args.d.ts +17 -18
- package/dist/cli-args.d.ts.map +1 -1
- package/dist/cli-args.js +22 -21
- package/dist/cli-args.js.map +1 -1
- package/dist/cli-balance/cli.d.ts +11 -11
- package/dist/cli-balance/cli.d.ts.map +1 -1
- package/dist/cli-balance/cli.js +68 -161
- package/dist/cli-balance/cli.js.map +1 -1
- package/dist/cli-balance/exitStatus.d.ts +3 -0
- package/dist/cli-balance/exitStatus.d.ts.map +1 -0
- package/dist/cli-balance/exitStatus.js +12 -0
- package/dist/cli-balance/exitStatus.js.map +1 -0
- package/dist/cli-balance/reRender.d.ts +22 -0
- package/dist/cli-balance/reRender.d.ts.map +1 -0
- package/dist/cli-balance/reRender.js +36 -0
- package/dist/cli-balance/reRender.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +14 -13
- package/dist/cli.js.map +1 -1
- package/dist/run-management/keptRun.d.ts +16 -9
- package/dist/run-management/keptRun.d.ts.map +1 -1
- package/dist/run-management/keptRun.js +8 -4
- package/dist/run-management/keptRun.js.map +1 -1
- package/dist/storedRun.d.ts +18 -0
- package/dist/storedRun.d.ts.map +1 -0
- package/dist/storedRun.js +29 -0
- package/dist/storedRun.js.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -74,6 +74,8 @@ The whole report is written before the code is set, so a failing run still tells
|
|
|
74
74
|
|
|
75
75
|
`--exit-zero` moves `1` and `3` to `0` and leaves every other code alone: see *Report first, gate later*.
|
|
76
76
|
|
|
77
|
+
`balance --render-from-json <saved.json>` re-renders a saved report and exits the code its verdict names, from the same table: a saved run that failed fails again when it is read back. A report saved under `--strict` records it, so its re-render exits `3` too, and `--strict` or `--exit-zero` beside the re-render work as they do live. Any other flag beside it is refused at `2`, because a re-render reads no live input and writes only to stdout.
|
|
78
|
+
|
|
77
79
|
**Node's default is never one of these.** A run that cannot reconcile ends on an enumerated code of
|
|
78
80
|
its own rather than falling out of the process — a crash that exits `1` would be indistinguishable,
|
|
79
81
|
by status, from an honest disagreement. **An input the tool cannot read is part of `2`**: a mistyped
|
package/dist/cli-args.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* THE ONE READING OF A COMMAND'S ARGV, and the one bounding of it against the registry.
|
|
3
3
|
*
|
|
4
|
-
* WHY IT IS ITS OWN MODULE
|
|
4
|
+
* WHY IT IS ITS OWN MODULE. Both halves lived inside `cli-balance/cli.ts` while
|
|
5
5
|
* `balance` was the only command — `parseArgs` private to it, `checkUnknownFlags` exported for
|
|
6
6
|
* its own `@unit` arm. A second command needs both, and the two ways of giving it them were
|
|
7
7
|
* worse than moving them: copying `parseArgs` would put a second reading of argv in a tree whose
|
|
@@ -12,10 +12,12 @@
|
|
|
12
12
|
* THE BOUNDING IS PER-COMMAND, which is what makes "accepted = registry = help" hold for every
|
|
13
13
|
* command rather than for the one this code was written beside. `checkUnknownFlags` took the
|
|
14
14
|
* registry and looked `balance` up inside itself; the command is a parameter now, exactly as it
|
|
15
|
-
* became one for `renderCommandHelp
|
|
15
|
+
* became one for `renderCommandHelp`. The unknown-flag scenario is unchanged and still
|
|
16
16
|
* asks about `balance`: a command added later gets the same bounding BY CONSTRUCTION.
|
|
17
17
|
*/
|
|
18
18
|
import type { CliRegistry, FlagSpec } from "./cli-registry.js";
|
|
19
|
+
/** True when a command's argv asks for its help, wherever `--help` or `-h` stands in it. */
|
|
20
|
+
export declare function asksForHelp(argv: readonly string[]): boolean;
|
|
19
21
|
/**
|
|
20
22
|
* Parse `--flag value` pairs from a command's argv into a record, keys with the `--` stripped.
|
|
21
23
|
*
|
|
@@ -26,7 +28,7 @@ import type { CliRegistry, FlagSpec } from "./cli-registry.js";
|
|
|
26
28
|
* PERMISSIVE BY ITSELF, AND BOUNDED BY THE CALLER. It records whatever it is given — a flag no
|
|
27
29
|
* registry names, the last of two copies, a word after a flag that takes none — and drops a word
|
|
28
30
|
* that follows no flag. `checkArgvShape` and `checkUnknownFlags` below are what refuse those, before
|
|
29
|
-
* anything reads the record
|
|
31
|
+
* anything reads the record. The split is deliberate — the parse has no opinion about which
|
|
30
32
|
* command it is reading for, and the bounding has nothing else to do.
|
|
31
33
|
*/
|
|
32
34
|
export declare function parseArgs(argv: readonly string[]): Record<string, string>;
|
|
@@ -41,7 +43,7 @@ export declare function valueFlagsOf(flags: readonly FlagSpec[]): Map<string, Fl
|
|
|
41
43
|
*/
|
|
42
44
|
export declare function isMissingValue(next: string | undefined): boolean;
|
|
43
45
|
/**
|
|
44
|
-
* A flag that takes a value, given none, is a usage fault
|
|
46
|
+
* A flag that takes a value, given none, is a usage fault. It reads the
|
|
45
47
|
* RAW argv, because `parseArgs` has already turned a missing value into the string "true" — which a
|
|
46
48
|
* path flag then looked for on disk, `--target` recorded, and `--format` dropped on its way to a
|
|
47
49
|
* verdict `--exit-zero` turned green. Returns the refusal for the first such flag, else null.
|
|
@@ -50,7 +52,7 @@ export declare function checkMissingValues(argv: readonly string[], registry: Cl
|
|
|
50
52
|
/** The refusal for a value flag given none: the flag, the value it takes, and where the flags are listed. */
|
|
51
53
|
export declare function missingValueRefusal(given: string, flag: FlagSpec, scope: string): string;
|
|
52
54
|
/**
|
|
53
|
-
* The shape of a command's argv, read against its registry scope
|
|
55
|
+
* The shape of a command's argv, read against its registry scope: every token is a flag,
|
|
54
56
|
* or the value of the flag before it, or a usage fault. Returns the refusal for the first token that
|
|
55
57
|
* is neither, else null.
|
|
56
58
|
*/
|
|
@@ -66,7 +68,7 @@ export declare function givenTwiceRefusal(given: string, scope: string): string;
|
|
|
66
68
|
/** A flag written with its value after an `=`, as in `--format=json`: a form this CLI does not read. */
|
|
67
69
|
export declare function isEqualsForm(token: string): boolean;
|
|
68
70
|
/**
|
|
69
|
-
* The refusal for a flag written `--flag=value
|
|
71
|
+
* The refusal for a flag written `--flag=value`: the form as given, and the
|
|
70
72
|
* spelling that is read — the flag and its value as two arguments, or the flag alone when it takes
|
|
71
73
|
* none. Never the unknown-flag pin advice: no version reads the form, so no pin cures it. Refused
|
|
72
74
|
* rather than split, by ruling: one spelling means one reader of argv, where splitting would teach
|
|
@@ -74,21 +76,19 @@ export declare function isEqualsForm(token: string): boolean;
|
|
|
74
76
|
*/
|
|
75
77
|
export declare function equalsFormRefusal(token: string, flags: ReadonlyMap<string, FlagSpec>, scope: string): string;
|
|
76
78
|
/**
|
|
77
|
-
* A host modifier given after the command is out of place, not unknown
|
|
78
|
-
* flag exists, so
|
|
79
|
-
*
|
|
80
|
-
* `process.exit` — the unknown-flag path sets a status and returns, which inside a stored run reaches
|
|
81
|
-
* the scaffold that stamps a run.yaml (3F-3650). Returns the refusal for the first such flag, else null.
|
|
79
|
+
* A host modifier given after the command is out of place, not unknown: the
|
|
80
|
+
* flag exists, so the unknown-flag advice to bump a pin to a version that accepts it is false. Returns the
|
|
81
|
+
* refusal for the first such flag, else null.
|
|
82
82
|
*/
|
|
83
83
|
export declare function checkMisplacedHostModifiers(args: Record<string, string>, registry: CliRegistry, command: string): string | null;
|
|
84
84
|
/**
|
|
85
|
-
* The registry-bounded flag check at a command's CLI edge
|
|
85
|
+
* The registry-bounded flag check at a command's CLI edge. A command accepts ONLY
|
|
86
86
|
* the flags its per-command registry scope LISTS (by `name` or `alias`); an unregistered flag — a
|
|
87
87
|
* typo like `--strcit`, a stray `--bogus` — is a usage error, where the permissive parse above would
|
|
88
88
|
* have recorded it. It bounds flag NAMES and nothing else: a word that is no flag, a value given to a
|
|
89
89
|
* flag that takes none, a second copy, a `--flag=value` form, are `checkArgvShape`'s, which runs
|
|
90
|
-
* first
|
|
91
|
-
* = help": a flag cannot affect behaviour without a registry entry, and so (by
|
|
90
|
+
* first. This is the structural teeth behind "accepted = registry
|
|
91
|
+
* = help": a flag cannot affect behaviour without a registry entry, and so (by the help-completeness
|
|
92
92
|
* guard) without appearing in that command's help.
|
|
93
93
|
*
|
|
94
94
|
* PURE and `@unit`-testable: the parsed args (keys already `--`-stripped) plus the registry and
|
|
@@ -96,15 +96,14 @@ export declare function checkMisplacedHostModifiers(args: Record<string, string>
|
|
|
96
96
|
* naming it WITH its dashes — routed to stderr and the enumerated usage status 2 by the caller,
|
|
97
97
|
* never 1, never a silent run — else null. The global `--store`/`--run-id` modifiers are consumed
|
|
98
98
|
* by the top-level dispatcher when they come BEFORE the command; written after it they reach the
|
|
99
|
-
* command, and `checkMisplacedHostModifiers` refuses them as out of place before this runs
|
|
100
|
-
* (@SCN-CLI-061).
|
|
99
|
+
* command, and `checkMisplacedHostModifiers` refuses them as out of place before this runs.
|
|
101
100
|
*
|
|
102
101
|
* A COMMAND THE REGISTRY DOES NOT NAME ACCEPTS NOTHING, which is the honest reading rather than a
|
|
103
102
|
* degenerate one: an unregistered command has no scope, so every flag given to it is outside it.
|
|
104
103
|
* The dispatcher refuses such a command before this is ever reached, so the case is unreachable
|
|
105
104
|
* today and stated here so it cannot become a silent "accept everything" later.
|
|
106
105
|
*
|
|
107
|
-
* IT NAMES THE VERSION THAT REFUSED, AND THAT IS FOR THE PINNED READER
|
|
106
|
+
* IT NAMES THE VERSION THAT REFUSED, AND THAT IS FOR THE PINNED READER.
|
|
108
107
|
* A consumer pins spec-controller and then moves their own tree; the pinned reader is handed argv
|
|
109
108
|
* it was published too early — or too late — to understand, and an unadorned "unknown flag" is
|
|
110
109
|
* indistinguishable from a typo. Naming the running version makes version skew legible from the CI
|
|
@@ -119,7 +118,7 @@ export declare function checkMisplacedHostModifiers(args: Record<string, string>
|
|
|
119
118
|
* refusal is the tool's own, which makes it universal rather than local.
|
|
120
119
|
*
|
|
121
120
|
* EXCEPT FOR A FLAG THE COMMAND HAS RETIRED, where the bump is false advice: `retiredFlagRefusal`
|
|
122
|
-
* below names the retirement and its replacement instead
|
|
121
|
+
* below names the retirement and its replacement instead.
|
|
123
122
|
*
|
|
124
123
|
* THE STATUS DOES NOT MOVE. The caller still routes this to stderr and exit 2. A mistyped `--strcit`
|
|
125
124
|
* is still a usage fault, and giving skew its own status would cost every adopter the ordinary
|
package/dist/cli-args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-args.d.ts","sourceRoot":"","sources":["../src/cli-args.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAe,QAAQ,EAAkB,MAAM,mBAAmB,CAAC;AAE5F;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAgBzE;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,QAAQ,CAAC,CAO9E;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAEhE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,IAAI,CAUf;AAED,6GAA6G;AAC7G,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxF;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAW7G;AAgBD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,MA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
|
3
3
|
*
|
|
4
|
-
* WHY IT IS ITS OWN MODULE
|
|
4
|
+
* WHY IT IS ITS OWN MODULE. Both halves lived inside `cli-balance/cli.ts` while
|
|
5
5
|
* `balance` was the only command — `parseArgs` private to it, `checkUnknownFlags` exported for
|
|
6
6
|
* its own `@unit` arm. A second command needs both, and the two ways of giving it them were
|
|
7
7
|
* worse than moving them: copying `parseArgs` would put a second reading of argv in a tree whose
|
|
@@ -12,9 +12,13 @@
|
|
|
12
12
|
* THE BOUNDING IS PER-COMMAND, which is what makes "accepted = registry = help" hold for every
|
|
13
13
|
* command rather than for the one this code was written beside. `checkUnknownFlags` took the
|
|
14
14
|
* registry and looked `balance` up inside itself; the command is a parameter now, exactly as it
|
|
15
|
-
* became one for `renderCommandHelp
|
|
15
|
+
* became one for `renderCommandHelp`. The unknown-flag scenario is unchanged and still
|
|
16
16
|
* asks about `balance`: a command added later gets the same bounding BY CONSTRUCTION.
|
|
17
17
|
*/
|
|
18
|
+
/** True when a command's argv asks for its help, wherever `--help` or `-h` stands in it. */
|
|
19
|
+
export function asksForHelp(argv) {
|
|
20
|
+
return argv.includes("--help") || argv.includes("-h");
|
|
21
|
+
}
|
|
18
22
|
/**
|
|
19
23
|
* Parse `--flag value` pairs from a command's argv into a record, keys with the `--` stripped.
|
|
20
24
|
*
|
|
@@ -25,7 +29,7 @@
|
|
|
25
29
|
* PERMISSIVE BY ITSELF, AND BOUNDED BY THE CALLER. It records whatever it is given — a flag no
|
|
26
30
|
* registry names, the last of two copies, a word after a flag that takes none — and drops a word
|
|
27
31
|
* that follows no flag. `checkArgvShape` and `checkUnknownFlags` below are what refuse those, before
|
|
28
|
-
* anything reads the record
|
|
32
|
+
* anything reads the record. The split is deliberate — the parse has no opinion about which
|
|
29
33
|
* command it is reading for, and the bounding has nothing else to do.
|
|
30
34
|
*/
|
|
31
35
|
export function parseArgs(argv) {
|
|
@@ -68,7 +72,7 @@ export function isMissingValue(next) {
|
|
|
68
72
|
return next === undefined || next === "" || next.startsWith("--");
|
|
69
73
|
}
|
|
70
74
|
/**
|
|
71
|
-
* A flag that takes a value, given none, is a usage fault
|
|
75
|
+
* A flag that takes a value, given none, is a usage fault. It reads the
|
|
72
76
|
* RAW argv, because `parseArgs` has already turned a missing value into the string "true" — which a
|
|
73
77
|
* path flag then looked for on disk, `--target` recorded, and `--format` dropped on its way to a
|
|
74
78
|
* verdict `--exit-zero` turned green. Returns the refusal for the first such flag, else null.
|
|
@@ -90,7 +94,7 @@ export function missingValueRefusal(given, flag, scope) {
|
|
|
90
94
|
`Run '${scope} --help' to see the flags this version accepts and the values they take.`);
|
|
91
95
|
}
|
|
92
96
|
/**
|
|
93
|
-
* The shape of a command's argv, read against its registry scope
|
|
97
|
+
* The shape of a command's argv, read against its registry scope: every token is a flag,
|
|
94
98
|
* or the value of the flag before it, or a usage fault. Returns the refusal for the first token that
|
|
95
99
|
* is neither, else null.
|
|
96
100
|
*/
|
|
@@ -177,7 +181,7 @@ export function isEqualsForm(token) {
|
|
|
177
181
|
return isFlagShaped(token) && token.includes("=");
|
|
178
182
|
}
|
|
179
183
|
/**
|
|
180
|
-
* The refusal for a flag written `--flag=value
|
|
184
|
+
* The refusal for a flag written `--flag=value`: the form as given, and the
|
|
181
185
|
* spelling that is read — the flag and its value as two arguments, or the flag alone when it takes
|
|
182
186
|
* none. Never the unknown-flag pin advice: no version reads the form, so no pin cures it. Refused
|
|
183
187
|
* rather than split, by ruling: one spelling means one reader of argv, where splitting would teach
|
|
@@ -195,8 +199,8 @@ export function equalsFormRefusal(token, flags, scope) {
|
|
|
195
199
|
/**
|
|
196
200
|
* How many tokens after a flag are its value: one for a value flag given one, and — for a flag the
|
|
197
201
|
* scope does not have — one for the word after it, exactly as `parseArgs` pairs them, so an unknown
|
|
198
|
-
* flag and its word stay
|
|
199
|
-
*
|
|
202
|
+
* flag and its word stay the unknown-flag check's to refuse. An empty value is consumed as one, so it
|
|
203
|
+
* stays a missing value rather than becoming a stray argument.
|
|
200
204
|
*/
|
|
201
205
|
function valueTokensAfter(flag, next) {
|
|
202
206
|
if (next === undefined || isFlagShaped(next))
|
|
@@ -229,11 +233,9 @@ function notAFlagRefusal(token, command) {
|
|
|
229
233
|
`Run 'spec-controller ${command} --help' to see the flags this version accepts.`);
|
|
230
234
|
}
|
|
231
235
|
/**
|
|
232
|
-
* A host modifier given after the command is out of place, not unknown
|
|
233
|
-
* flag exists, so
|
|
234
|
-
*
|
|
235
|
-
* `process.exit` — the unknown-flag path sets a status and returns, which inside a stored run reaches
|
|
236
|
-
* the scaffold that stamps a run.yaml (3F-3650). Returns the refusal for the first such flag, else null.
|
|
236
|
+
* A host modifier given after the command is out of place, not unknown: the
|
|
237
|
+
* flag exists, so the unknown-flag advice to bump a pin to a version that accepts it is false. Returns the
|
|
238
|
+
* refusal for the first such flag, else null.
|
|
237
239
|
*/
|
|
238
240
|
export function checkMisplacedHostModifiers(args, registry, command) {
|
|
239
241
|
const modifiers = new Set(registry.global.map((flag) => flag.name.replace(/^-+/, "")));
|
|
@@ -245,13 +247,13 @@ export function checkMisplacedHostModifiers(args, registry, command) {
|
|
|
245
247
|
`Run 'spec-controller --help' to see the host modifiers this version accepts.`);
|
|
246
248
|
}
|
|
247
249
|
/**
|
|
248
|
-
* The registry-bounded flag check at a command's CLI edge
|
|
250
|
+
* The registry-bounded flag check at a command's CLI edge. A command accepts ONLY
|
|
249
251
|
* the flags its per-command registry scope LISTS (by `name` or `alias`); an unregistered flag — a
|
|
250
252
|
* typo like `--strcit`, a stray `--bogus` — is a usage error, where the permissive parse above would
|
|
251
253
|
* have recorded it. It bounds flag NAMES and nothing else: a word that is no flag, a value given to a
|
|
252
254
|
* flag that takes none, a second copy, a `--flag=value` form, are `checkArgvShape`'s, which runs
|
|
253
|
-
* first
|
|
254
|
-
* = help": a flag cannot affect behaviour without a registry entry, and so (by
|
|
255
|
+
* first. This is the structural teeth behind "accepted = registry
|
|
256
|
+
* = help": a flag cannot affect behaviour without a registry entry, and so (by the help-completeness
|
|
255
257
|
* guard) without appearing in that command's help.
|
|
256
258
|
*
|
|
257
259
|
* PURE and `@unit`-testable: the parsed args (keys already `--`-stripped) plus the registry and
|
|
@@ -259,15 +261,14 @@ export function checkMisplacedHostModifiers(args, registry, command) {
|
|
|
259
261
|
* naming it WITH its dashes — routed to stderr and the enumerated usage status 2 by the caller,
|
|
260
262
|
* never 1, never a silent run — else null. The global `--store`/`--run-id` modifiers are consumed
|
|
261
263
|
* by the top-level dispatcher when they come BEFORE the command; written after it they reach the
|
|
262
|
-
* command, and `checkMisplacedHostModifiers` refuses them as out of place before this runs
|
|
263
|
-
* (@SCN-CLI-061).
|
|
264
|
+
* command, and `checkMisplacedHostModifiers` refuses them as out of place before this runs.
|
|
264
265
|
*
|
|
265
266
|
* A COMMAND THE REGISTRY DOES NOT NAME ACCEPTS NOTHING, which is the honest reading rather than a
|
|
266
267
|
* degenerate one: an unregistered command has no scope, so every flag given to it is outside it.
|
|
267
268
|
* The dispatcher refuses such a command before this is ever reached, so the case is unreachable
|
|
268
269
|
* today and stated here so it cannot become a silent "accept everything" later.
|
|
269
270
|
*
|
|
270
|
-
* IT NAMES THE VERSION THAT REFUSED, AND THAT IS FOR THE PINNED READER
|
|
271
|
+
* IT NAMES THE VERSION THAT REFUSED, AND THAT IS FOR THE PINNED READER.
|
|
271
272
|
* A consumer pins spec-controller and then moves their own tree; the pinned reader is handed argv
|
|
272
273
|
* it was published too early — or too late — to understand, and an unadorned "unknown flag" is
|
|
273
274
|
* indistinguishable from a typo. Naming the running version makes version skew legible from the CI
|
|
@@ -282,7 +283,7 @@ export function checkMisplacedHostModifiers(args, registry, command) {
|
|
|
282
283
|
* refusal is the tool's own, which makes it universal rather than local.
|
|
283
284
|
*
|
|
284
285
|
* EXCEPT FOR A FLAG THE COMMAND HAS RETIRED, where the bump is false advice: `retiredFlagRefusal`
|
|
285
|
-
* below names the retirement and its replacement instead
|
|
286
|
+
* below names the retirement and its replacement instead.
|
|
286
287
|
*
|
|
287
288
|
* THE STATUS DOES NOT MOVE. The caller still routes this to stderr and exit 2. A mistyped `--strcit`
|
|
288
289
|
* is still a usage fault, and giving skew its own status would cost every adopter the ordinary
|
|
@@ -316,7 +317,7 @@ export function checkUnknownFlags(args, registry, command, toolVersion) {
|
|
|
316
317
|
return null;
|
|
317
318
|
}
|
|
318
319
|
/**
|
|
319
|
-
* THE REFUSAL FOR A FLAG THE COMMAND HAS RETIRED
|
|
320
|
+
* THE REFUSAL FOR A FLAG THE COMMAND HAS RETIRED, or `undefined` when the
|
|
320
321
|
* flag is merely unregistered. The drift advice above is true of a flag newer than the pin and
|
|
321
322
|
* false of a retired one: every earlier version accepts it and no later one will, so the only pin
|
|
322
323
|
* that satisfies "bump the pin to a version that accepts it" is a downgrade back onto the route
|
package/dist/cli-args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-args.js","sourceRoot":"","sources":["../src/cli-args.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,SAAS,CAAC,IAAuB;IAC/C,MAAM,IAAI,GAA2B,EAAE,CAAC;IACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1C,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACvB,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAC1B,IAAI,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnD,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,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,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,CAAC,CAAC;IAC1F,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC5C,OAAO,CACL,gBAAgB,OAAO,CAAC,IAAI,yBAAyB,OAAO,iCAAiC;QAC7F,GAAG,OAAO,CAAC,SAAS,8DAA8D,WAAW,MAAM;QACnG,6FAA6F;QAC7F,GAAG,OAAO,CAAC,WAAW,IAAI;QAC1B,wBAAwB,OAAO,iDAAiD,CACjF,CAAC;AACJ,CAAC"}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* [--format <fmt>[:<path>]]
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
|
-
* The legacy-`--json` guard at the CLI edge
|
|
15
|
+
* The legacy-`--json` guard at the CLI edge. The earlier
|
|
16
16
|
* `--json <path>` flag is removed; supplying it must fail fast with a migration hint to
|
|
17
17
|
* `--format json:<path>`, so the removed flag never silently no-ops and drops output. PURE
|
|
18
18
|
* and `@unit`-testable: the removed flag is NOT a `--format` spec (planOutput never sees
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
*/
|
|
23
23
|
export declare function checkLegacyJson(args: Record<string, string>): string | null;
|
|
24
24
|
/**
|
|
25
|
-
* Source the provenance "Target repo:" name for a run
|
|
26
|
-
*
|
|
25
|
+
* Source the provenance "Target repo:" name for a run. The
|
|
26
|
+
* operator's `--target` is recorded VERBATIM — no resolution — defaulting to
|
|
27
27
|
* `"unknown-target"` when omitted (parallel to `sourceSha`'s `"unknown"`; the facts
|
|
28
28
|
* artefact is self-describing, so the line always renders). PURE and `@unit`-testable at
|
|
29
29
|
* the CLI edge, like `checkLegacyJson`. It never inspects `--features`: the prior
|
|
@@ -33,7 +33,7 @@ export declare function checkLegacyJson(args: Record<string, string>): string |
|
|
|
33
33
|
*/
|
|
34
34
|
export declare function sourceTarget(args: Record<string, string>): string;
|
|
35
35
|
/**
|
|
36
|
-
* Guard the supplied input-file/dir flags at the CLI edge
|
|
36
|
+
* Guard the supplied input-file/dir flags at the CLI edge. A
|
|
37
37
|
* mistyped `--vitest` / `--cucumber` / `--features` / `--ci` / `--package-json`
|
|
38
38
|
* pointing at a non-existent path used to reconcile silently against ZERO evidence —
|
|
39
39
|
* a terrifying false all-red report meaning "you forgot the reports", not "your code
|
|
@@ -51,13 +51,13 @@ export declare function sourceTarget(args: Record<string, string>): string;
|
|
|
51
51
|
*/
|
|
52
52
|
export declare function checkInputsExist(args: Record<string, string>, exists: (path: string) => boolean): string | null;
|
|
53
53
|
/**
|
|
54
|
-
* Guard the READABILITY of the supplied JSON inputs at the CLI edge
|
|
54
|
+
* Guard the READABILITY of the supplied JSON inputs at the CLI edge.
|
|
55
55
|
* `checkInputsExist` already guards their PRESENCE — but a path that is present yet
|
|
56
56
|
* UNPARSEABLE fell straight through it: the reader threw mid-parse, nothing caught it, and
|
|
57
57
|
* the process hit Node's default exit 1 — the code reserved for a genuine OUT-OF-BALANCE
|
|
58
58
|
* verdict. A crashed invocation was therefore indistinguishable, by exit code, from an
|
|
59
|
-
* honest disagreement
|
|
60
|
-
* sibling to a missing path
|
|
59
|
+
* honest disagreement. An input the tool cannot read is a USAGE fault: exit 2,
|
|
60
|
+
* sibling to a missing path and an unrecognised flag.
|
|
61
61
|
*
|
|
62
62
|
* PURE and `@unit`-testable like its sibling guards: reads the parsed args + an injected
|
|
63
63
|
* `read` fn (no fs), returns the FIRST supplied-but-unparseable `(flag, path, failure)` as
|
|
@@ -67,12 +67,12 @@ export declare function checkInputsExist(args: Record<string, string>, exists: (
|
|
|
67
67
|
*/
|
|
68
68
|
export declare function checkInputsParse(args: Record<string, string>, read: (path: string) => string): string | null;
|
|
69
69
|
/**
|
|
70
|
-
* Guard the readability of `--render-from-json` at the CLI edge
|
|
70
|
+
* Guard the readability of `--render-from-json` at the CLI edge. The
|
|
71
71
|
* render-from-saved-JSON branch RETURNS before the input guards ever run, so it honoured
|
|
72
72
|
* NEITHER: a missing path crashed to `ENOENT` and a malformed file to `SyntaxError`, both
|
|
73
|
-
* landing on Node's default exit 1 — the out-of-balance code
|
|
73
|
+
* landing on Node's default exit 1 — the out-of-balance code.
|
|
74
74
|
*
|
|
75
|
-
* The missing-path case was a live violation of
|
|
75
|
+
* The missing-path case was a live violation of the missing-input rule's own shipped principle: a
|
|
76
76
|
* supplied input path that does not exist is a hard error at exit 2, enforced for the five
|
|
77
77
|
* evidence flags and not for this one. The CLI shipped a guard that half-honoured its Rule.
|
|
78
78
|
*
|
|
@@ -83,5 +83,5 @@ export declare function checkInputsParse(args: Record<string, string>, read: (pa
|
|
|
83
83
|
* not an error (the ordinary reconcile path).
|
|
84
84
|
*/
|
|
85
85
|
export declare function checkRenderFromJson(args: Record<string, string>, read: (path: string) => string): string | null;
|
|
86
|
-
export declare function runBalance(argv: string[]):
|
|
86
|
+
export declare function runBalance(argv: string[]): boolean;
|
|
87
87
|
//# sourceMappingURL=cli.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli-balance/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/cli-balance/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAqDH;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAS3E;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAEjE;AAqBD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,GAChC,MAAM,GAAG,IAAI,CAcf;AAYD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAC7B,MAAM,GAAG,IAAI,CAef;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAC7B,MAAM,GAAG,IAAI,CAcf;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAwGlD"}
|