spec-controller 0.1.0-alpha.24 → 0.1.0-alpha.26
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/cli-args.d.ts +27 -6
- package/dist/cli-args.d.ts.map +1 -1
- package/dist/cli-args.js +111 -6
- package/dist/cli-args.js.map +1 -1
- package/dist/cli-balance/cli.d.ts.map +1 -1
- package/dist/cli-balance/cli.js +16 -9
- package/dist/cli-balance/cli.js.map +1 -1
- package/dist/host.d.ts +1 -1
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +46 -11
- package/dist/host.js.map +1 -1
- package/dist/ingest/ingestScenarios.d.ts +8 -14
- package/dist/ingest/ingestScenarios.d.ts.map +1 -1
- package/dist/ingest/ingestScenarios.js +32 -55
- package/dist/ingest/ingestScenarios.js.map +1 -1
- package/package.json +2 -2
package/dist/cli-args.d.ts
CHANGED
|
@@ -23,10 +23,11 @@ import type { CliRegistry, FlagSpec } from "./cli-registry.js";
|
|
|
23
23
|
* the boolean flags — `--strict`, `--help` — are recognised: presence is what matters, so callers
|
|
24
24
|
* read them with `!== undefined`.
|
|
25
25
|
*
|
|
26
|
-
* PERMISSIVE BY ITSELF, AND BOUNDED BY THE CALLER. It records whatever it is given
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
26
|
+
* PERMISSIVE BY ITSELF, AND BOUNDED BY THE CALLER. It records whatever it is given — a flag no
|
|
27
|
+
* registry names, the last of two copies, a word after a flag that takes none — and drops a word
|
|
28
|
+
* that follows no flag. `checkArgvShape` and `checkUnknownFlags` below are what refuse those, before
|
|
29
|
+
* anything reads the record (3F-3672). The split is deliberate — the parse has no opinion about which
|
|
30
|
+
* command it is reading for, and the bounding has nothing else to do.
|
|
30
31
|
*/
|
|
31
32
|
export declare function parseArgs(argv: readonly string[]): Record<string, string>;
|
|
32
33
|
/**
|
|
@@ -48,6 +49,24 @@ export declare function isMissingValue(next: string | undefined): boolean;
|
|
|
48
49
|
export declare function checkMissingValues(argv: readonly string[], registry: CliRegistry, command: string): string | null;
|
|
49
50
|
/** The refusal for a value flag given none: the flag, the value it takes, and where the flags are listed. */
|
|
50
51
|
export declare function missingValueRefusal(given: string, flag: FlagSpec, scope: string): string;
|
|
52
|
+
/**
|
|
53
|
+
* The shape of a command's argv, read against its registry scope (3F-3672): every token is a flag,
|
|
54
|
+
* or the value of the flag before it, or a usage fault. Returns the refusal for the first token that
|
|
55
|
+
* is neither, else null.
|
|
56
|
+
*/
|
|
57
|
+
export declare function checkArgvShape(argv: readonly string[], registry: CliRegistry, command: string): string | null;
|
|
58
|
+
/** The refusal for a flag given more than once that is read once: the flag, and where. */
|
|
59
|
+
export declare function givenTwiceRefusal(given: string, scope: string): string;
|
|
60
|
+
/** A flag written with its value after an `=`, as in `--format=json`: a form this CLI does not read. */
|
|
61
|
+
export declare function isEqualsForm(token: string): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* The refusal for a flag written `--flag=value` (@SCN-CLI-065, 3F-3672): the form as given, and the
|
|
64
|
+
* spelling that is read — the flag and its value as two arguments, or the flag alone when it takes
|
|
65
|
+
* none. Never the unknown-flag pin advice: no version reads the form, so no pin cures it. Refused
|
|
66
|
+
* rather than split, by ruling: one spelling means one reader of argv, where splitting would teach
|
|
67
|
+
* every reader of it the same answer.
|
|
68
|
+
*/
|
|
69
|
+
export declare function equalsFormRefusal(token: string, flags: ReadonlyMap<string, FlagSpec>, scope: string): string;
|
|
51
70
|
/**
|
|
52
71
|
* A host modifier given after the command is out of place, not unknown (@SCN-CLI-061, 3F-3639): the
|
|
53
72
|
* flag exists, so @SCN-CLI-009's advice to bump a pin to a version that accepts it is false. Its own
|
|
@@ -59,8 +78,10 @@ export declare function checkMisplacedHostModifiers(args: Record<string, string>
|
|
|
59
78
|
/**
|
|
60
79
|
* The registry-bounded flag check at a command's CLI edge (@SCN-CLI-009). A command accepts ONLY
|
|
61
80
|
* the flags its per-command registry scope LISTS (by `name` or `alias`); an unregistered flag — a
|
|
62
|
-
* typo like `--strcit`, a stray `--bogus` — is a usage error,
|
|
63
|
-
*
|
|
81
|
+
* typo like `--strcit`, a stray `--bogus` — is a usage error, where the permissive parse above would
|
|
82
|
+
* have recorded it. It bounds flag NAMES and nothing else: a word that is no flag, a value given to a
|
|
83
|
+
* flag that takes none, a second copy, a `--flag=value` form, are `checkArgvShape`'s, which runs
|
|
84
|
+
* first (@SCN-CLI-062–066, 3F-3672). This is the structural teeth behind "accepted = registry
|
|
64
85
|
* = help": a flag cannot affect behaviour without a registry entry, and so (by @SCN-CLI-008's
|
|
65
86
|
* guard) without appearing in that command's help.
|
|
66
87
|
*
|
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,EAAE,MAAM,mBAAmB,CAAC;AAE5E
|
|
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,EAAE,MAAM,mBAAmB,CAAC;AAE5E;;;;;;;;;;;;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,E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ers
|
|
23
23
|
* read them with `!== undefined`.
|
|
24
24
|
*
|
|
25
|
-
* PERMISSIVE BY ITSELF, AND BOUNDED BY THE CALLER. It records whatever it is given
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
25
|
+
* PERMISSIVE BY ITSELF, AND BOUNDED BY THE CALLER. It records whatever it is given — a flag no
|
|
26
|
+
* registry names, the last of two copies, a word after a flag that takes none — and drops a word
|
|
27
|
+
* that follows no flag. `checkArgvShape` and `checkUnknownFlags` below are what refuse those, before
|
|
28
|
+
* anything reads the record (3F-3672). The split is deliberate — the parse has no opinion about which
|
|
29
|
+
* command it is reading for, and the bounding has nothing else to do.
|
|
29
30
|
*/
|
|
30
31
|
export function parseArgs(argv) {
|
|
31
32
|
const args = {};
|
|
@@ -88,6 +89,108 @@ export function missingValueRefusal(given, flag, scope) {
|
|
|
88
89
|
return (`The ${given} flag of '${scope}' needs a value — ${given} ${flag.arg ?? ""} — and was given none.\n` +
|
|
89
90
|
`Run '${scope} --help' to see the flags this version accepts and the values they take.`);
|
|
90
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* The shape of a command's argv, read against its registry scope (3F-3672): every token is a flag,
|
|
94
|
+
* or the value of the flag before it, or a usage fault. Returns the refusal for the first token that
|
|
95
|
+
* is neither, else null.
|
|
96
|
+
*/
|
|
97
|
+
export function checkArgvShape(argv, registry, command) {
|
|
98
|
+
const scope = flagScopeOf(registry, command);
|
|
99
|
+
const seen = new Set();
|
|
100
|
+
for (let i = 0; i < argv.length; i++) {
|
|
101
|
+
const read = readToken(argv, i, { scope, seen }, command);
|
|
102
|
+
if (typeof read === "string")
|
|
103
|
+
return read;
|
|
104
|
+
i += read;
|
|
105
|
+
}
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
/** One token of the walk: the refusal it earns, or how many of the tokens after it are its value. */
|
|
109
|
+
function readToken(argv, i, walk, command) {
|
|
110
|
+
const token = argv[i] ?? "";
|
|
111
|
+
const next = argv[i + 1];
|
|
112
|
+
if (isEqualsForm(token))
|
|
113
|
+
return equalsFormRefusal(token, walk.scope, `spec-controller ${command}`);
|
|
114
|
+
if (!isFlagShaped(token) && !walk.scope.has(token))
|
|
115
|
+
return notAFlagRefusal(token, command);
|
|
116
|
+
const flag = walk.scope.get(token);
|
|
117
|
+
if (flag === undefined)
|
|
118
|
+
return valueTokensAfter(undefined, next);
|
|
119
|
+
return registeredFlagRefusal(flag, token, next, walk, command) ?? valueTokensAfter(flag, next);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* The refusal a registered flag earns where it stands: given a second time when the registry does not
|
|
123
|
+
* mark it `repeatable` (by name or alias, one flag), or given a value it does not take.
|
|
124
|
+
*/
|
|
125
|
+
function registeredFlagRefusal(flag, token, next, walk, command) {
|
|
126
|
+
if (walk.seen.has(flag) && flag.repeatable !== true)
|
|
127
|
+
return givenTwiceRefusal(token, `spec-controller ${command}`);
|
|
128
|
+
walk.seen.add(flag);
|
|
129
|
+
if (flag.arg === undefined && next !== undefined && !isFlagShaped(next) && !walk.scope.has(next)) {
|
|
130
|
+
return takesNoValueRefusal(token, next, command);
|
|
131
|
+
}
|
|
132
|
+
return undefined;
|
|
133
|
+
}
|
|
134
|
+
/** The refusal for a flag given more than once that is read once: the flag, and where. */
|
|
135
|
+
export function givenTwiceRefusal(given, scope) {
|
|
136
|
+
return (`The ${given} flag of '${scope}' was given more than once, and is read once: give it once.\n` +
|
|
137
|
+
`Run '${scope} --help' to see the flags this version accepts.`);
|
|
138
|
+
}
|
|
139
|
+
/** Every flag of one command's scope, by name and alias, dashes kept. */
|
|
140
|
+
function flagScopeOf(registry, command) {
|
|
141
|
+
const scope = new Map();
|
|
142
|
+
for (const flag of registry.commands.find((c) => c.name === command)?.flags ?? []) {
|
|
143
|
+
for (const name of [flag.name, ...(flag.aliases ?? [])])
|
|
144
|
+
scope.set(name, flag);
|
|
145
|
+
}
|
|
146
|
+
return scope;
|
|
147
|
+
}
|
|
148
|
+
/** A token read as a flag whether or not the scope has it: two dashes, as `parseArgs` reads one. */
|
|
149
|
+
function isFlagShaped(token) {
|
|
150
|
+
return token.startsWith("--");
|
|
151
|
+
}
|
|
152
|
+
/** A flag written with its value after an `=`, as in `--format=json`: a form this CLI does not read. */
|
|
153
|
+
export function isEqualsForm(token) {
|
|
154
|
+
return isFlagShaped(token) && token.includes("=");
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* The refusal for a flag written `--flag=value` (@SCN-CLI-065, 3F-3672): the form as given, and the
|
|
158
|
+
* spelling that is read — the flag and its value as two arguments, or the flag alone when it takes
|
|
159
|
+
* none. Never the unknown-flag pin advice: no version reads the form, so no pin cures it. Refused
|
|
160
|
+
* rather than split, by ruling: one spelling means one reader of argv, where splitting would teach
|
|
161
|
+
* every reader of it the same answer.
|
|
162
|
+
*/
|
|
163
|
+
export function equalsFormRefusal(token, flags, scope) {
|
|
164
|
+
const at = token.indexOf("=");
|
|
165
|
+
const name = token.slice(0, at);
|
|
166
|
+
const value = token.slice(at + 1);
|
|
167
|
+
const flag = flags.get(name);
|
|
168
|
+
const spelling = flag !== undefined && flag.arg === undefined ? name : `${name} ${value === "" ? (flag?.arg ?? "<value>") : value}`;
|
|
169
|
+
return (`The ${token} form is not read by '${scope}': a flag and its value are two arguments, as in '${spelling}'.\n` +
|
|
170
|
+
`Run '${scope} --help' to see the flags this version accepts.`);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* How many tokens after a flag are its value: one for a value flag given one, and — for a flag the
|
|
174
|
+
* scope does not have — one for the word after it, exactly as `parseArgs` pairs them, so an unknown
|
|
175
|
+
* flag and its word stay @SCN-CLI-009's to refuse. An empty value is consumed as one, so it stays
|
|
176
|
+
* @SCN-CLI-058's missing value rather than becoming a stray argument.
|
|
177
|
+
*/
|
|
178
|
+
function valueTokensAfter(flag, next) {
|
|
179
|
+
if (next === undefined || isFlagShaped(next))
|
|
180
|
+
return 0;
|
|
181
|
+
return flag === undefined || flag.arg !== undefined ? 1 : 0;
|
|
182
|
+
}
|
|
183
|
+
/** The refusal for a value given to a flag that takes none: the flag, and the value it was given. */
|
|
184
|
+
function takesNoValueRefusal(flag, value, command) {
|
|
185
|
+
return (`The ${flag} flag of 'spec-controller ${command}' takes no value, and was given one: '${value}'.\n` +
|
|
186
|
+
`Run 'spec-controller ${command} --help' to see the flags this version accepts and the values they take.`);
|
|
187
|
+
}
|
|
188
|
+
/** The refusal for a token that is no flag and no flag's value: the token, and what the command takes. */
|
|
189
|
+
function notAFlagRefusal(token, command) {
|
|
190
|
+
return (`The argument '${token}' is not a flag, nor the value of the flag before it: ` +
|
|
191
|
+
`'spec-controller ${command}' takes only flags and their values.\n` +
|
|
192
|
+
`Run 'spec-controller ${command} --help' to see the flags this version accepts.`);
|
|
193
|
+
}
|
|
91
194
|
/**
|
|
92
195
|
* A host modifier given after the command is out of place, not unknown (@SCN-CLI-061, 3F-3639): the
|
|
93
196
|
* flag exists, so @SCN-CLI-009's advice to bump a pin to a version that accepts it is false. Its own
|
|
@@ -107,8 +210,10 @@ export function checkMisplacedHostModifiers(args, registry, command) {
|
|
|
107
210
|
/**
|
|
108
211
|
* The registry-bounded flag check at a command's CLI edge (@SCN-CLI-009). A command accepts ONLY
|
|
109
212
|
* the flags its per-command registry scope LISTS (by `name` or `alias`); an unregistered flag — a
|
|
110
|
-
* typo like `--strcit`, a stray `--bogus` — is a usage error,
|
|
111
|
-
*
|
|
213
|
+
* typo like `--strcit`, a stray `--bogus` — is a usage error, where the permissive parse above would
|
|
214
|
+
* have recorded it. It bounds flag NAMES and nothing else: a word that is no flag, a value given to a
|
|
215
|
+
* flag that takes none, a second copy, a `--flag=value` form, are `checkArgvShape`'s, which runs
|
|
216
|
+
* first (@SCN-CLI-062–066, 3F-3672). This is the structural teeth behind "accepted = registry
|
|
112
217
|
* = help": a flag cannot affect behaviour without a registry entry, and so (by @SCN-CLI-008's
|
|
113
218
|
* guard) without appearing in that command's help.
|
|
114
219
|
*
|
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
|
|
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,CAAC;gBAClB,CAAC,EAAE,CAAC;YACN,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;YACrB,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAA0B;IACrD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAoB,CAAC;IAC/C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS;YAA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pF,oCAAoC,OAAO,eAAe,GAAG,KAAK;oBAClE,kCAAkC,OAAO,iDAAiD,CAC3F,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,SAAS,kBAAkB,CACzB,KAA8B,EAC9B,GAAW,EACX,OAAe,EACf,WAAmB;IAEnB,MAAM,OAAO,GAAG,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,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"}
|
|
@@ -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;AAuDH;;;;;;;;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,IAAI,CAoK/C"}
|
package/dist/cli-balance/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ import { cliRegistry, renderCommandHelp } from "../cli-registry.js";
|
|
|
22
22
|
// THE ARGV READING AND ITS REGISTRY BOUNDING, SHARED WITH EVERY OTHER COMMAND (3F-3300). Both
|
|
23
23
|
// lived here while `balance` was the only command; a second command needs them, and a second
|
|
24
24
|
// copy of "what did the operator type" is the one thing this tree least wants two of.
|
|
25
|
-
import { parseArgs, checkUnknownFlags, checkMissingValues, checkMisplacedHostModifiers } from "../cli-args.js";
|
|
25
|
+
import { parseArgs, checkArgvShape, checkUnknownFlags, checkMissingValues, checkMisplacedHostModifiers, } from "../cli-args.js";
|
|
26
26
|
/**
|
|
27
27
|
* Collect the `--format <spec>` values from argv in order (the flag is REPEATABLE, unlike
|
|
28
28
|
* the single-valued flags `parseArgs` records) — the raw specs `planOutput` parses. Empty
|
|
@@ -223,14 +223,21 @@ export function runBalance(argv) {
|
|
|
223
223
|
const misplacedModifierError = checkMisplacedHostModifiers(args, cliRegistry, "balance");
|
|
224
224
|
if (misplacedModifierError)
|
|
225
225
|
exitUsage(misplacedModifierError);
|
|
226
|
-
//
|
|
227
|
-
//
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
//
|
|
232
|
-
//
|
|
233
|
-
//
|
|
226
|
+
// Every token is a flag or the value of the flag before it (3F-3672), refused through
|
|
227
|
+
// `process.exit` so a stored run is never stamped, and before the unknown-flag check below.
|
|
228
|
+
const shapeError = checkArgvShape(argv, cliRegistry, "balance");
|
|
229
|
+
if (shapeError)
|
|
230
|
+
exitUsage(shapeError);
|
|
231
|
+
// Registry-bounded flag NAMES (@SCN-CLI-009): `balance` accepts ONLY the flags its registry
|
|
232
|
+
// scope LISTS. An unregistered flag — a typo `--strcit`, a stray `--bogus` — is a USAGE error:
|
|
233
|
+
// name it on stderr, set process.exitCode = 2 (the enumerated usage code, 3F-1414's 0/1/2
|
|
234
|
+
// taxonomy — never 1, never 0), and RETURN before any reconcile. It bounds names only; that every
|
|
235
|
+
// other token is read or refused is the argv-shape check above (@SCN-CLI-062–066, 3F-3672).
|
|
236
|
+
// Runs AFTER the legacy-`--json` guard so `--json` keeps its specific migration hint, after the
|
|
237
|
+
// misplaced-modifier refusal, so a `--store` / `--run-id` written after the command is named as
|
|
238
|
+
// out of place rather than given pin advice, and after the argv-shape check, so `--format=json` is
|
|
239
|
+
// refused as a form and never given pin advice. This is the structural teeth behind "accepted =
|
|
240
|
+
// registry = help" — a flag can't affect behaviour without a registry entry.
|
|
234
241
|
const unknownFlagError = checkUnknownFlags(args, cliRegistry, "balance", resolveToolIdentity().toolVersion);
|
|
235
242
|
if (unknownFlagError) {
|
|
236
243
|
process.stderr.write(unknownFlagError + "\n");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli-balance/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,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B,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,eAAe,CAAC,OAA+B,EAAE,MAAe;IACvE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAC3B,IAAI,qBAAqB,CAAC,MAAM,CAAC;QAAE,OAAO,CAAC,CAAC;IAC5C,IAAI,iBAAiB,CAAC,MAAM,CAAC;QAAE,OAAO,CAAC,CAAC;IACxC,kGAAkG;IAClG,IAAI,qBAAqB,CAAC,OAAO,CAAC;QAAE,OAAO,CAAC,CAAC;IAC7C,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;QAAE,OAAO,CAAC,CAAC;IAClC,IAAI,MAAM,IAAI,eAAe,CAAC,MAAM,CAAC;QAAE,OAAO,CAAC,CAAC;IAChD,OAAO,CAAC,CAAC;AACX,CAAC;AAED;;;;;GAKG;AACH,MAAM,aAAa,GAAwB,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAE3D,SAAS,cAAc,CAAC,IAAY;IAClC,OAAO,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5C,CAAC;AAED,qEAAqE;AACrE,mFAAmF;AACnF,mEAAmE;AACnE,MAAM,eAAe,GACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACnF,IAAI,eAAe;IAAE,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/host.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface HostInvocation {
|
|
|
38
38
|
* /s` leaves `--store` in the command's args (a `--store` AFTER the command is the
|
|
39
39
|
* command's own arg, never a host store directive) — the "global before command" contract.
|
|
40
40
|
*/
|
|
41
|
-
export declare function parseHostInvocation(argv: readonly string[], globalFlags?: readonly FlagSpec[]): HostInvocation;
|
|
41
|
+
export declare function parseHostInvocation(argv: readonly string[], globalFlags?: readonly FlagSpec[], commands?: readonly string[]): HostInvocation;
|
|
42
42
|
/**
|
|
43
43
|
* Build the wrapped command argv: the command's clean args followed by a repeated
|
|
44
44
|
* `--format <spec>` per store-dir output spec. Pure — the impure runner hands the result
|
package/dist/host.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAUH,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE/D,6FAA6F;AAC7F,MAAM,WAAW,cAAc;IAC7B,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6EAA6E;IAC7E,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,WAAW,GAAE,SAAS,QAAQ,EAAuB,EACrD,QAAQ,GAAE,SAAS,MAAM,EAAwD,GAChF,cAAc,CA0BhB;AA2ED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,EAAE,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAExG;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASlF;AAED,4FAA4F;AAC5F,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,oBAAoB,CAKxF"}
|
package/dist/host.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*
|
|
13
13
|
* @SCN-RMG-004 — features/run-management.feature.
|
|
14
14
|
*/
|
|
15
|
-
import { isMissingValue, missingValueRefusal, valueFlagsOf } from "./cli-args.js";
|
|
15
|
+
import { equalsFormRefusal, givenTwiceRefusal, isEqualsForm, isMissingValue, missingValueRefusal, valueFlagsOf, } from "./cli-args.js";
|
|
16
16
|
import { cliRegistry } from "./cli-registry.js";
|
|
17
17
|
/**
|
|
18
18
|
* Parse the host argv into its leading global options (`--store`, `--run-id`) and the
|
|
@@ -23,7 +23,7 @@ import { cliRegistry } from "./cli-registry.js";
|
|
|
23
23
|
* /s` leaves `--store` in the command's args (a `--store` AFTER the command is the
|
|
24
24
|
* command's own arg, never a host store directive) — the "global before command" contract.
|
|
25
25
|
*/
|
|
26
|
-
export function parseHostInvocation(argv, globalFlags = cliRegistry.global) {
|
|
26
|
+
export function parseHostInvocation(argv, globalFlags = cliRegistry.global, commands = cliRegistry.commands.map((command) => command.name)) {
|
|
27
27
|
// The modifiers and the values they take are the registry's global scope, never a list kept here
|
|
28
28
|
// (@SCN-CLI-059): a modifier added later is read, and refused without its value, by construction.
|
|
29
29
|
const modifiers = valueFlagsOf(globalFlags);
|
|
@@ -33,18 +33,15 @@ export function parseHostInvocation(argv, globalFlags = cliRegistry.global) {
|
|
|
33
33
|
const token = argv[i] ?? "";
|
|
34
34
|
const modifier = modifiers.get(token);
|
|
35
35
|
if (modifier === undefined) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return { commandArgs: [], refusal: flagBeforeCommandRefusal(token, globalFlags) };
|
|
36
|
+
const refusal = leadingFlagRefusal(token, modifiers, globalFlags);
|
|
37
|
+
if (refusal !== undefined)
|
|
38
|
+
return { commandArgs: [], refusal };
|
|
40
39
|
break; // first non-modifier token is the command
|
|
41
40
|
}
|
|
42
41
|
const value = argv[i + 1];
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return { commandArgs: [], refusal: missingValueRefusal(token, modifier, "spec-controller") };
|
|
47
|
-
}
|
|
42
|
+
const refusal = modifierRefusal(token, modifier, argv.slice(i + 1, i + 3), { values, commands });
|
|
43
|
+
if (refusal !== undefined)
|
|
44
|
+
return { commandArgs: [], refusal };
|
|
48
45
|
values.set(modifier.name, value ?? "");
|
|
49
46
|
i++;
|
|
50
47
|
}
|
|
@@ -55,6 +52,44 @@ export function parseHostInvocation(argv, globalFlags = cliRegistry.global) {
|
|
|
55
52
|
commandArgs: argv.slice(i + 1),
|
|
56
53
|
};
|
|
57
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* The refusal a modifier earns where it stands, else undefined; `ahead` is its value and the token
|
|
57
|
+
* after it. Given twice, it is never read as its last value (@SCN-CLI-064): `--store A --store B` used
|
|
58
|
+
* to store under B without a word. Given no value, it is never handed the next token (@SCN-CLI-059):
|
|
59
|
+
* `--store --run-id r1` used to store under a directory called `--run-id`. Given the command as its
|
|
60
|
+
* value with no command after it, it has eaten the command (@SCN-CLI-066): `--store balance
|
|
61
|
+
* --features f` used to blame `--features`, and `--store balance` alone answered help at exit 0. A
|
|
62
|
+
* command name followed by the command is still a value: `--store balance balance …` is read.
|
|
63
|
+
*/
|
|
64
|
+
function modifierRefusal(token, modifier, [value, after], read) {
|
|
65
|
+
if (read.values.has(modifier.name))
|
|
66
|
+
return givenTwiceRefusal(token, "spec-controller");
|
|
67
|
+
if (isMissingValue(value))
|
|
68
|
+
return missingValueRefusal(token, modifier, "spec-controller");
|
|
69
|
+
if (read.commands.includes(value ?? "") && (after === undefined || after.startsWith("-"))) {
|
|
70
|
+
return commandAsValueRefusal(token, modifier, value ?? "");
|
|
71
|
+
}
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
/** The refusal for a modifier that took the command as its value: the modifier, the command, and the fix. */
|
|
75
|
+
function commandAsValueRefusal(token, modifier, command) {
|
|
76
|
+
return (`The ${token} host modifier took '${command}', a command, as its value, and left no command to run.\n` +
|
|
77
|
+
`Give ${token} its own value, as in 'spec-controller ${token} ${modifier.arg ?? ""} ${command} …'. ` +
|
|
78
|
+
`Run 'spec-controller --help' to see the commands and host modifiers this version accepts.`);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The refusal a leading token that is no modifier earns, else undefined (it is the command). A
|
|
82
|
+
* modifier written `--store=<root>` is a form that is not read (@SCN-CLI-065), never a flag out of
|
|
83
|
+
* place; any other flag here is out of place, never a command (@SCN-CLI-060): `--exit-zero balance`
|
|
84
|
+
* used to answer `unknown command "--exit-zero"`. The top-level help stays where it was.
|
|
85
|
+
*/
|
|
86
|
+
function leadingFlagRefusal(token, modifiers, globalFlags) {
|
|
87
|
+
if (isEqualsForm(token))
|
|
88
|
+
return equalsFormRefusal(token, modifiers, "spec-controller");
|
|
89
|
+
if (isFlagOutOfPlace(token))
|
|
90
|
+
return flagBeforeCommandRefusal(token, globalFlags);
|
|
91
|
+
return undefined;
|
|
92
|
+
}
|
|
58
93
|
/** The help the host answers in the command's place, which is the one flag it takes there. */
|
|
59
94
|
const TOP_LEVEL_HELP = new Set(["--help", "-h"]);
|
|
60
95
|
/** True for a flag-shaped token that is not the top-level help. */
|
package/dist/host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.js","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"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AC5F,OAAO,CAAC,GAAG,WAAW,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;AAChF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAuB,EAAE,IAAY;IAC5D,MAAM,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;IACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACrB,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YAC1B,OAAO,KAAK,KAAK,SAAS,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QAC5E,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAQD;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAe,EAAE,IAAY;IAChE,OAAO;QACL,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,qCAAqC,OAAO,SAAS,IAAI,IAAI;KACtE,CAAC;AACJ,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Ingest the target's feature files — the IMPURE reader that walks features/ on disk
|
|
3
|
-
* and
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* the `scnId → feature-code` grammar helper is engine-side (packages/core/src/lib/
|
|
3
|
+
* and reads each file's header code into DiscoveredFeature records (split out of the old
|
|
4
|
+
* spec/featureCodes.ts). The pure header parser (extractFeatureCode) lives here with its sole
|
|
5
|
+
* consumer; the `scnId → feature-code` grammar helper is engine-side (packages/core/src/lib/
|
|
7
6
|
* featureCode.ts); the duplicate-code lint is engine-side too since 3F-3313, as @SCN-STG-010 in
|
|
8
|
-
* parse/
|
|
7
|
+
* parse/scenarioCodeErrors.ts, and no longer a private check under tests/checks/.
|
|
8
|
+
*
|
|
9
|
+
* NO PER-FILE LIST OF SCENARIO CODES (3F-3636). One used to ride here, read by a copy of the
|
|
10
|
+
* @SCN grammar of its own, and nothing but its own test read it; a scenario's code is read by the
|
|
11
|
+
* engine's scenario walk, which is the reading the ledger's accounts are minted from.
|
|
9
12
|
*
|
|
10
13
|
* The foundation, folded into the @LDG runtime spine.
|
|
11
14
|
*/
|
|
@@ -16,8 +19,6 @@ export interface DiscoveredFeature {
|
|
|
16
19
|
/** Absolute path to the feature file. */
|
|
17
20
|
path: string;
|
|
18
21
|
featureCode: string | null;
|
|
19
|
-
/** Every @SCN-<FFF>-<NNN> scenario code in the file, in order, duplicates kept. */
|
|
20
|
-
scenarioCodes: string[];
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
* Read the Feature-level @<FFF> header tag from a feature file's source — the
|
|
@@ -25,13 +26,6 @@ export interface DiscoveredFeature {
|
|
|
25
26
|
* or a recognised evidence/routing tag. Returns null if absent.
|
|
26
27
|
*/
|
|
27
28
|
export declare function extractFeatureCode(source: string): string | null;
|
|
28
|
-
/**
|
|
29
|
-
* Parse every @SCN-<FFF>-<NNN> scenario code in a feature file's source, in
|
|
30
|
-
* document order, duplicates preserved. Only genuine TAG LINES are scanned (a
|
|
31
|
-
* line whose first non-blank character is `@` and whose every whitespace-
|
|
32
|
-
* separated token is a tag) — prose that merely mentions a code is skipped.
|
|
33
|
-
*/
|
|
34
|
-
export declare function parseScenarioCodes(source: string): string[];
|
|
35
29
|
/**
|
|
36
30
|
* Discover every feature file on disk and its header code — REFUSING a corpus the Gherkin
|
|
37
31
|
* parser rejects (@SCN-GPG-001, 3F-2817).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingestScenarios.d.ts","sourceRoot":"","sources":["../../src/ingest/ingestScenarios.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ingestScenarios.d.ts","sourceRoot":"","sources":["../../src/ingest/ingestScenarios.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAeH,iFAAiF;AACjF,MAAM,WAAW,iBAAiB;IAChC,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKhE;AA8DD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,GAAE,MAAsB,GAAG,iBAAiB,EAAE,CAiBjF"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Ingest the target's feature files — the IMPURE reader that walks features/ on disk
|
|
3
|
-
* and
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* the `scnId → feature-code` grammar helper is engine-side (packages/core/src/lib/
|
|
3
|
+
* and reads each file's header code into DiscoveredFeature records (split out of the old
|
|
4
|
+
* spec/featureCodes.ts). The pure header parser (extractFeatureCode) lives here with its sole
|
|
5
|
+
* consumer; the `scnId → feature-code` grammar helper is engine-side (packages/core/src/lib/
|
|
7
6
|
* featureCode.ts); the duplicate-code lint is engine-side too since 3F-3313, as @SCN-STG-010 in
|
|
8
|
-
* parse/
|
|
7
|
+
* parse/scenarioCodeErrors.ts, and no longer a private check under tests/checks/.
|
|
8
|
+
*
|
|
9
|
+
* NO PER-FILE LIST OF SCENARIO CODES (3F-3636). One used to ride here, read by a copy of the
|
|
10
|
+
* @SCN grammar of its own, and nothing but its own test read it; a scenario's code is read by the
|
|
11
|
+
* engine's scenario walk, which is the reading the ledger's accounts are minted from.
|
|
9
12
|
*
|
|
10
13
|
* The foundation, folded into the @LDG runtime spine.
|
|
11
14
|
*/
|
|
@@ -21,56 +24,32 @@ const CODE_PATTERN = /^[A-Z0-9]{2,5}$/;
|
|
|
21
24
|
*/
|
|
22
25
|
export function extractFeatureCode(source) {
|
|
23
26
|
const lines = source.split(/\r?\n/);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
break;
|
|
35
|
-
const tags = prev.split(/\s+/).filter((t) => t.startsWith("@"));
|
|
36
|
-
for (const tag of tags) {
|
|
37
|
-
const bare = tag.slice(1);
|
|
38
|
-
if (bare.startsWith("SCN-"))
|
|
39
|
-
continue;
|
|
40
|
-
if (["unit", "integration", "e2e", "performance", "smoke"].includes(bare))
|
|
41
|
-
continue;
|
|
42
|
-
if (CODE_PATTERN.test(bare))
|
|
43
|
-
return bare;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return null;
|
|
27
|
+
const featureLine = lines.findIndex((line) => line.trim().startsWith("Feature:"));
|
|
28
|
+
if (featureLine < 0)
|
|
29
|
+
return null;
|
|
30
|
+
return headerTagsAbove(lines, featureLine).find(isHeaderCode) ?? null;
|
|
31
|
+
}
|
|
32
|
+
/** The tags a tier or routing concern owns, which are never a file's header code. */
|
|
33
|
+
const NON_CODE_TAGS = ["unit", "integration", "e2e", "performance", "smoke"];
|
|
34
|
+
/** Is this bare tag the file's header code — not an @SCN id, not a tier tag, and code-shaped? */
|
|
35
|
+
function isHeaderCode(bare) {
|
|
36
|
+
return !bare.startsWith("SCN-") && !NON_CODE_TAGS.includes(bare) && CODE_PATTERN.test(bare);
|
|
50
37
|
}
|
|
51
38
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* line whose first non-blank character is `@` and whose every whitespace-
|
|
55
|
-
* separated token is a tag) — prose that merely mentions a code is skipped.
|
|
39
|
+
* The bare tags on the tag lines directly above the `Feature:` line, nearest line first and each
|
|
40
|
+
* line left to right. Blank lines are passed over; the first line that is not a tag line ends it.
|
|
56
41
|
*/
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (!line.startsWith("@"))
|
|
63
|
-
continue;
|
|
64
|
-
const tokens = line.split(/\s+/);
|
|
65
|
-
if (!tokens.every((t) => t.startsWith("@")))
|
|
42
|
+
function headerTagsAbove(lines, featureLine) {
|
|
43
|
+
const tags = [];
|
|
44
|
+
for (let j = featureLine - 1; j >= 0; j--) {
|
|
45
|
+
const prev = lines[j].trim();
|
|
46
|
+
if (prev === "")
|
|
66
47
|
continue;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
codes.push(bare);
|
|
71
|
-
}
|
|
48
|
+
if (!prev.startsWith("@"))
|
|
49
|
+
break;
|
|
50
|
+
tags.push(...prev.split(/\s+/).filter((t) => t.startsWith("@")).map((t) => t.slice(1)));
|
|
72
51
|
}
|
|
73
|
-
return
|
|
52
|
+
return tags;
|
|
74
53
|
}
|
|
75
54
|
/**
|
|
76
55
|
* Locate the default features/ directory — `./features` under the current
|
|
@@ -88,10 +67,9 @@ function featuresDir() {
|
|
|
88
67
|
*
|
|
89
68
|
* Absence stays a REFUSAL AT THE READER — what changed is that it is typed, so a caller can decide.
|
|
90
69
|
* `balance` opts in to reporting on a target that has no corpus (most targets have no `features/`
|
|
91
|
-
* at all, and `new-client` is a supported adoption state)
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* into `tags: OK …` at exit 0.
|
|
70
|
+
* at all, and `new-client` is a supported adoption state) by catching `MissingFeatureCorpusError` by
|
|
71
|
+
* name. Returning `[]` here instead would make that decision for every caller, and one that
|
|
72
|
+
* certifies a corpus would certify an absent one as empty.
|
|
95
73
|
*
|
|
96
74
|
* ONLY `ENOENT`. A `features` path that exists but is a FILE, or one the process may not read, is
|
|
97
75
|
* a different fault and is not ours to reinterpret — it rethrows.
|
|
@@ -142,7 +120,6 @@ export function discoverFeatures(dir = featuresDir()) {
|
|
|
142
120
|
slug: name.replace(/\.feature$/, ""),
|
|
143
121
|
path,
|
|
144
122
|
featureCode: extractFeatureCode(source),
|
|
145
|
-
scenarioCodes: parseScenarioCodes(source),
|
|
146
123
|
}));
|
|
147
124
|
}
|
|
148
125
|
//# sourceMappingURL=ingestScenarios.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ingestScenarios.js","sourceRoot":"","sources":["../../src/ingest/ingestScenarios.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ingestScenarios.js","sourceRoot":"","sources":["../../src/ingest/ingestScenarios.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,EAAW,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EACL,yBAAyB,EACzB,4BAA4B,EAC5B,aAAa,GACd,MAAM,wBAAwB,CAAC;AAEhC,8DAA8D;AAC9D,MAAM,YAAY,GAAG,iBAAiB,CAAC;AAWvC;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAc;IAC/C,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACpC,MAAM,WAAW,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC;IAClF,IAAI,WAAW,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACjC,OAAO,eAAe,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC;AACxE,CAAC;AAED,qFAAqF;AACrF,MAAM,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
"name": "spec-controller",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.26",
|
|
4
4
|
"description": "Reconcile the behaviour your scenarios name against the evidence that actually ran — the deterministic `balance` CLI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"reconciliation",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@cucumber/gherkin": "^41.0.0",
|
|
26
26
|
"@cucumber/messages": "^34.0.1",
|
|
27
27
|
"yaml": "^2.9.0",
|
|
28
|
-
"@3f-consulting/spec-controller-core": "0.1.0-alpha.
|
|
28
|
+
"@3f-consulting/spec-controller-core": "0.1.0-alpha.26"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|