spec-controller 0.1.236 → 0.1.238
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.js +23 -7
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -229,7 +229,9 @@ var init_messages_en = __esm({
|
|
|
229
229
|
"highest-seen-in-tree": "highest seen: {code}, {path}:{line}",
|
|
230
230
|
"highest-seen-in-commit": "highest seen: {code}, {path}:{line} in {commit}",
|
|
231
231
|
"part-already-headed": "note: a feature file's header already carries {part}, so --new was not needed",
|
|
232
|
-
"help-usage-line": "spec-controller {modifierUsage} <command> [command-args]"
|
|
232
|
+
"help-usage-line": "spec-controller {modifierUsage} <command> [command-args]",
|
|
233
|
+
"help-command-title": "spec-controller {command} \u2014 {summary}",
|
|
234
|
+
"help-command-usage-line": "spec-controller {command} {arguments} [options]"
|
|
233
235
|
};
|
|
234
236
|
}
|
|
235
237
|
});
|
|
@@ -38302,7 +38304,7 @@ function renderCommandHelp(command) {
|
|
|
38302
38304
|
);
|
|
38303
38305
|
const configHelp = command.configHelp ?? [];
|
|
38304
38306
|
return [
|
|
38305
|
-
|
|
38307
|
+
message("help-command-title" /* HelpCommandTitle */, { command: command.name, summary: command.summary }),
|
|
38306
38308
|
...positionalHelp(command.name, command.positionals ?? []),
|
|
38307
38309
|
"",
|
|
38308
38310
|
message("help-options" /* HelpOptions */),
|
|
@@ -38315,7 +38317,7 @@ function positionalHelp(command, positionals) {
|
|
|
38315
38317
|
const width = Math.max(...positionals.map((positional) => positional.name.length));
|
|
38316
38318
|
return [
|
|
38317
38319
|
"",
|
|
38318
|
-
`${message("help-usage" /* HelpUsage */)}
|
|
38320
|
+
`${message("help-usage" /* HelpUsage */)} ${message("help-command-usage-line" /* HelpCommandUsageLine */, { command, arguments: positionals.map((positional) => positional.name).join(" ") })}`,
|
|
38319
38321
|
"",
|
|
38320
38322
|
message("help-arguments" /* HelpArguments */),
|
|
38321
38323
|
...positionals.map((positional) => ` ${positional.name.padEnd(width + 2)}${positional.description}`)
|
|
@@ -38499,7 +38501,7 @@ function checkArgvShape(argv, registry, command) {
|
|
|
38499
38501
|
const scope = flagScopeOf(registry, command);
|
|
38500
38502
|
const seen = /* @__PURE__ */ new Set();
|
|
38501
38503
|
const positionals = positionalsOf(registry, command);
|
|
38502
|
-
const walk2 = { scope, seen, positionals, slotsLeft: positionals.length };
|
|
38504
|
+
const walk2 = { scope, seen, takes: argumentsOf(positionals), slotsLeft: positionals.length };
|
|
38503
38505
|
for (let i = 0; i < argv.length; i++) {
|
|
38504
38506
|
const read = readToken(argv, i, walk2, command);
|
|
38505
38507
|
if (typeof read !== "number") return read;
|
|
@@ -38577,13 +38579,21 @@ function takesNoValueRefusal(flag, value, command) {
|
|
|
38577
38579
|
}
|
|
38578
38580
|
function positionalRead(token, walk2, command) {
|
|
38579
38581
|
if (walk2.slotsLeft === 0) {
|
|
38580
|
-
return
|
|
38582
|
+
return strayArgumentRefusal(token, walk2.takes, command);
|
|
38581
38583
|
}
|
|
38582
38584
|
walk2.slotsLeft--;
|
|
38583
38585
|
return 0;
|
|
38584
38586
|
}
|
|
38585
|
-
function
|
|
38586
|
-
|
|
38587
|
+
function strayArgumentRefusal(token, takes, command) {
|
|
38588
|
+
switch (takes.kind) {
|
|
38589
|
+
case "flags-only":
|
|
38590
|
+
return notAFlagRefusal(token, command);
|
|
38591
|
+
case "some":
|
|
38592
|
+
return extraPositionalRefusal(token, takes.positionals, command);
|
|
38593
|
+
}
|
|
38594
|
+
}
|
|
38595
|
+
function extraPositionalRefusal(token, positionals, command) {
|
|
38596
|
+
const takes = positionals.map((positional) => positional.name).join(" ");
|
|
38587
38597
|
const scope = `spec-controller ${command}`;
|
|
38588
38598
|
return refusal("extra-argument" /* ExtraArgument */, { token, scope, takes }, [message("see-arguments" /* SeeArguments */, { scope })]);
|
|
38589
38599
|
}
|
|
@@ -38627,12 +38637,18 @@ function retiredFlagRefusal(entry, key, command, toolVersion) {
|
|
|
38627
38637
|
message("see-flags" /* SeeFlags */, { scope })
|
|
38628
38638
|
]);
|
|
38629
38639
|
}
|
|
38640
|
+
var argumentsOf;
|
|
38630
38641
|
var init_cliArgs = __esm({
|
|
38631
38642
|
"src/cliArgs.ts"() {
|
|
38632
38643
|
"use strict";
|
|
38633
38644
|
init_messages();
|
|
38634
38645
|
init_appText();
|
|
38635
38646
|
init_refusal();
|
|
38647
|
+
argumentsOf = (positionals) => {
|
|
38648
|
+
const [first, ...rest] = positionals;
|
|
38649
|
+
if (first === void 0) return { kind: "flags-only" };
|
|
38650
|
+
return { kind: "some", positionals: [first, ...rest] };
|
|
38651
|
+
};
|
|
38636
38652
|
}
|
|
38637
38653
|
});
|
|
38638
38654
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-controller",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.238",
|
|
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",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"fast-xml-parser": "^5.11.2",
|
|
27
27
|
"ts-json-schema-generator": "^2.9.0",
|
|
28
28
|
"yaml": "^2.9.0",
|
|
29
|
-
"@3f-consulting/spec-controller-core": "0.1.
|
|
29
|
+
"@3f-consulting/spec-controller-core": "0.1.238"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|