spec-controller 0.1.230 → 0.1.232
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 +116 -103
- package/dist/spec-reconciliation.schema.json +0 -3
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -88,52 +88,6 @@ var init_messages = __esm({
|
|
|
88
88
|
"src/messages.ts"() {
|
|
89
89
|
"use strict";
|
|
90
90
|
APP_MESSAGES = {
|
|
91
|
-
[0 /* HelpTitle */]: () => "spec-controller \u2014 reconcile scenarios against observed evidence",
|
|
92
|
-
[1 /* HelpUsage */]: () => "Usage:",
|
|
93
|
-
[2 /* HelpCommands */]: () => "Commands:",
|
|
94
|
-
[3 /* HelpHostModifiers */]: () => "Host modifiers (before the command):",
|
|
95
|
-
[4 /* HelpOptions */]: () => "Options:",
|
|
96
|
-
[5 /* HelpArguments */]: () => "Arguments:",
|
|
97
|
-
[6 /* HelpPointer */]: () => "Full flags, examples, and CI wiring: docs/user-guide.md.",
|
|
98
|
-
[7 /* HelpFlag */]: () => "Show this help and exit.",
|
|
99
|
-
[8 /* StoreModifier */]: () => "Store the run: write <root>/<target>/<run-id>/ with the reconciliation outputs + a run.yaml manifest. Required to store; there is no default (a default would write inside the repo).",
|
|
100
|
-
[9 /* RunIdModifier */]: () => "Name the stored run (default: an ISO-8601 UTC timestamp). Read only with --store: given without it, the run is refused, since no run would be kept under the name.",
|
|
101
|
-
[10 /* BalanceSummary */]: () => "Reconcile Gherkin scenarios against test/CI evidence and emit the Evidence Reconciliation (Markdown to stdout by default).",
|
|
102
|
-
[11 /* FeaturesFlag */]: () => "Directory of Gherkin .feature files \u2014 the scenarios, and the `@`-tags naming what each must prove (@unit, @integration, @fitness, \u2026).",
|
|
103
|
-
[12 /* VitestFlag */]: () => "A Vitest JSON report \u2014 runtime test evidence.",
|
|
104
|
-
[13 /* PytestFlag */]: () => "A pytest JUnit XML report (pytest --junitxml) \u2014 runtime unit test evidence.",
|
|
105
|
-
[14 /* JestFlag */]: () => "A Jest JSON report (jest --json --outputFile) \u2014 runtime unit test evidence.",
|
|
106
|
-
[15 /* JunitFlag */]: () => "A JUnit XML report from any test runner that writes one, such as gotestsum --junitfile, or a directory of them, such as Maven Surefire's \u2014 runtime unit test evidence.",
|
|
107
|
-
[16 /* RspecFlag */]: () => "An RSpec JSON report (rspec --format json --out) \u2014 runtime unit test evidence.",
|
|
108
|
-
[17 /* CucumberFlag */]: () => "A Cucumber JSON report \u2014 runtime test evidence.",
|
|
109
|
-
[18 /* CiFlag */]: () => "Your CI workflows \u2014 a file, or a directory of them (default .github/workflows). Where a fitness function you have not converted is found running over the real source, and where a check step's `id:` supplies the @SCN its result cites.",
|
|
110
|
-
[19 /* PackageJsonFlag */]: () => "The target's package.json \u2014 its `scripts`, and its specController.runners, specController.notChecks and specController.deferralTags. A fitness function is named by its @fitness scenario and the CI step whose id: is that scenario's @SCN; no manifest key names one.",
|
|
111
|
-
[20 /* CiStepsFlag */]: () => "The CI run's own record of what each of its steps did \u2014 your pipeline's `toJSON(steps)` dump, evidence for the converted fitness functions. Omit it if you have converted none.",
|
|
112
|
-
[21 /* TargetFlag */]: () => "A name recorded verbatim in the report's provenance (which project this run reconciled).",
|
|
113
|
-
[22 /* SourceShaFlag */]: () => "Override the git commit SHA recorded in provenance (defaults to the resolved HEAD).",
|
|
114
|
-
[23 /* FormatFlag */]: () => "Where to send output (md or json, optionally :<path> to write to a file). Repeatable.",
|
|
115
|
-
[24 /* RenderFromJsonFlag */]: () => "Re-render Markdown from a previously saved Evidence Reconciliation JSON \u2014 no reconcile, no live inputs.",
|
|
116
|
-
[25 /* StrictFlag */]: () => "Fail the run (exit 3) when it carries Pending Items \u2014 the opt-in that escalates otherwise-run-neutral deferred obligations.",
|
|
117
|
-
[26 /* ExitZeroFlag */]: () => "Print the same report but exit 0 on an out-of-balance or scenario-code-error (1) or --strict pending (3) verdict \u2014 the on-ramp before gating. Usage (2), unsound (4) and nothing-to-reconcile (5) still fail.",
|
|
118
|
-
[27 /* ConfigurationHeading */]: () => "Configuration (in the target repo's package.json):",
|
|
119
|
-
[28 /* DeferralTagsKey */]: () => "specController.deferralTags: string[]",
|
|
120
|
-
[29 /* DeferralTagsExtend */]: () => "Extra recognised deferral tags. A scenario carrying one defers every obligation it",
|
|
121
|
-
[30 /* DeferralTagsNeverReplace */]: () => "names to a Pending Item, extending (never replacing) the built-in set.",
|
|
122
|
-
[31 /* BuiltInDeferralTags */]: (tags) => `Built-in deferral tags: ${tags}`,
|
|
123
|
-
[32 /* MeasurementsReplacement */]: () => "A fitness function's evidence observation is the outcome of its own CI step: put the check's @SCN on that step's `id:` and hand balance the run's step record with --ci-steps.",
|
|
124
|
-
[33 /* AllocateSummary */]: () => "Print the next @SCN code for a feature part: one past the highest the repository has ever carried, the code alone on stdout.",
|
|
125
|
-
[34 /* FeaturePartArgument */]: () => "The feature part: a feature file's header code, two to five of A-Z and 0-9.",
|
|
126
|
-
[35 /* NewFlag */]: () => "Start a part no feature file's header carries yet: its first code, or one past any number the repository already carries for it.",
|
|
127
|
-
[36 /* HistoryBoundary */]: (unread, risk) => `history: ${unread}; ${risk} may have been used before`,
|
|
128
|
-
[37 /* ShallowHistoryUnread */]: (before) => `shallow clone \u2014 history before ${before} unread`,
|
|
129
|
-
[38 /* NoRepositoryHistoryRead */]: () => "not a git repository \u2014 none read",
|
|
130
|
-
[39 /* RiskOfPartCode */]: (part) => `a code of ${part}`,
|
|
131
|
-
[40 /* RiskAboveCode */]: (code) => `a code above ${code}`,
|
|
132
|
-
[41 /* HighestSeenNone */]: () => "highest seen: none",
|
|
133
|
-
[42 /* HighestSeenInTree */]: (code, path, line) => `highest seen: ${code}, ${path}:${line}`,
|
|
134
|
-
[43 /* HighestSeenInCommit */]: (code, path, line, commit) => `highest seen: ${code}, ${path}:${line} in ${commit}`,
|
|
135
|
-
[44 /* PartAlreadyHeaded */]: (part) => `note: a feature file's header already carries ${part}, so --new was not needed`,
|
|
136
|
-
[45 /* HelpUsageLine */]: (modifierUsage) => `spec-controller ${modifierUsage} <command> [command-args]`,
|
|
137
91
|
["unexpected-error" /* UnexpectedError */]: (name, firstLine2) => `spec-controller stopped on an unexpected error [${"unexpected-error" /* UnexpectedError */}], and gives no verdict: ${name}: ${firstLine2}`,
|
|
138
92
|
["unexpected-error-after-verdict" /* UnexpectedErrorAfterVerdict */]: (name, firstLine2) => `spec-controller hit an unexpected error [${"unexpected-error-after-verdict" /* UnexpectedErrorAfterVerdict */}] after its verdict: ${name}: ${firstLine2}`
|
|
139
93
|
};
|
|
@@ -11852,19 +11806,18 @@ function noScnCodeReconciliations() {
|
|
|
11852
11806
|
}
|
|
11853
11807
|
function duplicateScnCodeReconciliationsOf(obligations, scenario) {
|
|
11854
11808
|
const naming = scenario === void 0 ? {} : { scenario };
|
|
11855
|
-
const
|
|
11809
|
+
const kinds = /* @__PURE__ */ new Set();
|
|
11856
11810
|
for (const obligation of obligations) {
|
|
11857
|
-
if (obligation.qualityCheckKind !== void 0
|
|
11858
|
-
|
|
11859
|
-
}
|
|
11811
|
+
if (obligation.qualityCheckKind !== void 0)
|
|
11812
|
+
kinds.add(obligation.qualityCheckKind);
|
|
11860
11813
|
}
|
|
11861
|
-
if (
|
|
11814
|
+
if (kinds.size === 0) {
|
|
11862
11815
|
return [makeQualityCheckReconciliation({ outcome: "duplicate-scn-code", evidenceObligation: { qualityCheckKind: null }, ...naming })];
|
|
11863
11816
|
}
|
|
11864
|
-
return [...
|
|
11817
|
+
return [...kinds].map((qualityCheckKind) => makeQualityCheckReconciliation({
|
|
11865
11818
|
qualityCheckKind,
|
|
11866
11819
|
outcome: "duplicate-scn-code",
|
|
11867
|
-
evidenceObligation: {
|
|
11820
|
+
evidenceObligation: { qualityCheckKind },
|
|
11868
11821
|
...naming
|
|
11869
11822
|
}));
|
|
11870
11823
|
}
|
|
@@ -11965,7 +11918,7 @@ function carriesQualityCheckKind(row, qualityCheckKind) {
|
|
|
11965
11918
|
return row.qualityCheckReconciliations.some((r) => r.qualityCheckKind === qualityCheckKind && linesOf(r).some((line) => line.outcome !== "broken"));
|
|
11966
11919
|
}
|
|
11967
11920
|
function namesQualityCheckKind(row, qualityCheckKind) {
|
|
11968
|
-
return
|
|
11921
|
+
return obligationsOf(row).some((o) => o.qualityCheckKind === qualityCheckKind);
|
|
11969
11922
|
}
|
|
11970
11923
|
function observationCountOf(row, qualityCheckKind) {
|
|
11971
11924
|
return ranObservationsOf(row).filter((o) => o.qualityCheckKind === qualityCheckKind).length;
|
|
@@ -28377,7 +28330,7 @@ var init_messages_en = __esm({
|
|
|
28377
28330
|
"verdict-column": "Verdict",
|
|
28378
28331
|
"reconciling-items-column": "Reconciling items",
|
|
28379
28332
|
"ci-steps-column": "CI steps",
|
|
28380
|
-
"evidence-cell-key": "Key: each evidence cell reads *obligation*/*observations*.\n- The letter says the scenario's tags raise an Evidence Obligation of that kind: (F)itness, (U)nit, (I)ntegration, (E)2e, (P)erformance. `-` means they raise none of that kind, as a pending tag raises none.\n- The number counts the scenario's Evidence Observations of that kind that ran. `-` means none.\n- For example, `U/2` is a unit obligation answered by two unit tests; `U/-` is a unit obligation that no unit test answered; `-/1` is one unit test citing a scenario that raises no unit obligation, which puts the row out of balance even where its unit evidence is pending.\n- A blank cell means no obligation and no Evidence Observation that ran; `\u2014` marks the row of a phantom claim or of the unnamed claim.\n- A row named `feature file : scenario title` is a scenario that carries no @SCN code. The run reads none of its tags, so its evidence cells are blank, and its reconciling item says that no Evidence Observation can link to it.\n- In Reconciling items, `\u2014` means the row has no reconciling item, and *untagged* means a scenario that carries an @SCN code and no tag that raises an Evidence Obligation.\n- On the unnamed claim's row, the counts after an item, such as `1 ran, 1 passed, 0 failed`, are of that item's own tests, and a fitness item counts its CI steps; a broken item stands alone, outside those counts.\n- CI steps names the steps the Evidence observations table gives for each kind of quality check other than fitness that the row obligates or observes, whether or not an Evidence Observation of that kind ran for the row, and the step each of the row's fitness Evidence Observations names: `U/-` beside a step names the step that runs unit tests, none of which answered this row. A blank CI steps cell means no such step is known.",
|
|
28333
|
+
"evidence-cell-key": "Key: each evidence cell reads *obligation*/*observations*.\n- The letter says the scenario's tags raise an Evidence Obligation of that kind: (F)itness, (U)nit, (I)ntegration, (E)2e, (P)erformance. `-` means they raise none of that kind, as a pending tag raises none unless the scenario shares its `@SCN` code with another.\n- The number counts the scenario's Evidence Observations of that kind that ran. `-` means none.\n- For example, `U/2` is a unit obligation answered by two unit tests; `U/-` is a unit obligation that no unit test answered; `-/1` is one unit test citing a scenario that raises no unit obligation, which puts the row out of balance even where its unit evidence is pending.\n- A blank cell means no obligation and no Evidence Observation that ran; `\u2014` marks the row of a phantom claim or of the unnamed claim.\n- A row named `feature file : scenario title` is a scenario that carries no @SCN code. The run reads none of its tags, so its evidence cells are blank, and its reconciling item says that no Evidence Observation can link to it.\n- In Reconciling items, `\u2014` means the row has no reconciling item, and *untagged* means a scenario that carries an @SCN code and no tag that raises an Evidence Obligation.\n- On the unnamed claim's row, the counts after an item, such as `1 ran, 1 passed, 0 failed`, are of that item's own tests, and a fitness item counts its CI steps; a broken item stands alone, outside those counts.\n- CI steps names the steps the Evidence observations table gives for each kind of quality check other than fitness that the row obligates or observes, whether or not an Evidence Observation of that kind ran for the row, and the step each of the row's fitness Evidence Observations names: `U/-` beside a step names the step that runs unit tests, none of which answered this row. A blank CI steps cell means no such step is known.",
|
|
28381
28334
|
"watermelon-item-key": "- Where a row's item says its CI step or its job sets `continue-on-error`, the name in parentheses after it is its fitness function. Remove `continue-on-error` from its CI step and from its job, or set it to false, and the check's red fails the CI run.",
|
|
28382
28335
|
"pending-item": "pending",
|
|
28383
28336
|
"pending-item-for": "pending: {qualityCheckKind}",
|
|
@@ -32602,7 +32555,51 @@ var init_messages_en2 = __esm({
|
|
|
32602
32555
|
"shape-kind-of-type": "a {type}",
|
|
32603
32556
|
"shape-top-level": "the top level",
|
|
32604
32557
|
"shape-wrong-kind": "{where} is {found}, not {expected}",
|
|
32605
|
-
"shape-field-missing": "{path} is missing"
|
|
32558
|
+
"shape-field-missing": "{path} is missing",
|
|
32559
|
+
"help-title": "spec-controller \u2014 reconcile scenarios against observed evidence",
|
|
32560
|
+
"help-usage": "Usage:",
|
|
32561
|
+
"help-commands": "Commands:",
|
|
32562
|
+
"help-host-modifiers": "Host modifiers (before the command):",
|
|
32563
|
+
"help-options": "Options:",
|
|
32564
|
+
"help-arguments": "Arguments:",
|
|
32565
|
+
"help-pointer": "Full flags, examples, and CI wiring: docs/user-guide.md.",
|
|
32566
|
+
"help-flag": "Show this help and exit.",
|
|
32567
|
+
"store-modifier": "Store the run: write <root>/<target>/<run-id>/ with the reconciliation outputs + a run.yaml manifest. Required to store; there is no default (a default would write inside the repo).",
|
|
32568
|
+
"run-id-modifier": "Name the stored run (default: an ISO-8601 UTC timestamp). Read only with --store: given without it, the run is refused, since no run would be kept under the name.",
|
|
32569
|
+
"balance-summary": "Reconcile Gherkin scenarios against test/CI evidence and emit the Evidence Reconciliation (Markdown to stdout by default).",
|
|
32570
|
+
"features-flag": "Directory of Gherkin .feature files \u2014 the scenarios, and the `@`-tags naming what each must prove (@unit, @integration, @fitness, \u2026).",
|
|
32571
|
+
"vitest-flag": "A Vitest JSON report \u2014 runtime test evidence.",
|
|
32572
|
+
"pytest-flag": "A pytest JUnit XML report (pytest --junitxml) \u2014 runtime unit test evidence.",
|
|
32573
|
+
"jest-flag": "A Jest JSON report (jest --json --outputFile) \u2014 runtime unit test evidence.",
|
|
32574
|
+
"junit-flag": "A JUnit XML report from any test runner that writes one, such as gotestsum --junitfile, or a directory of them, such as Maven Surefire's \u2014 runtime unit test evidence.",
|
|
32575
|
+
"rspec-flag": "An RSpec JSON report (rspec --format json --out) \u2014 runtime unit test evidence.",
|
|
32576
|
+
"cucumber-flag": "A Cucumber JSON report \u2014 runtime test evidence.",
|
|
32577
|
+
"ci-flag": "Your CI workflows \u2014 a file, or a directory of them (default .github/workflows). Where a fitness function you have not converted is found running over the real source, and where a check step's `id:` supplies the @SCN its result cites.",
|
|
32578
|
+
"package-json-flag": "The target's package.json \u2014 its `scripts`, and its specController.runners, specController.notChecks and specController.deferralTags. A fitness function is named by its @fitness scenario and the CI step whose id: is that scenario's @SCN; no manifest key names one.",
|
|
32579
|
+
"ci-steps-flag": "The CI run's own record of what each of its steps did \u2014 your pipeline's `toJSON(steps)` dump, evidence for the converted fitness functions. Omit it if you have converted none.",
|
|
32580
|
+
"target-flag": "A name recorded verbatim in the report's provenance (which project this run reconciled).",
|
|
32581
|
+
"source-sha-flag": "Override the git commit SHA recorded in provenance (defaults to the resolved HEAD).",
|
|
32582
|
+
"format-flag": "Where to send output (md or json, optionally :<path> to write to a file). Repeatable.",
|
|
32583
|
+
"render-from-json-flag": "Re-render Markdown from a previously saved Evidence Reconciliation JSON \u2014 no reconcile, no live inputs.",
|
|
32584
|
+
"strict-flag": "Fail the run (exit 3) when it carries Pending Items \u2014 the opt-in that escalates otherwise-run-neutral deferred obligations.",
|
|
32585
|
+
"exit-zero-flag": "Print the same report but exit 0 on an out-of-balance or scenario-code-error (1) or --strict pending (3) verdict \u2014 the on-ramp before gating. Usage (2), unsound (4) and nothing-to-reconcile (5) still fail.",
|
|
32586
|
+
"configuration-heading": "Configuration (in the target repo's package.json):",
|
|
32587
|
+
"deferral-tags-key": "specController.deferralTags: string[]",
|
|
32588
|
+
"deferral-tags-explanation": "Extra recognised deferral tags. A scenario carrying one defers every obligation it\nnames to a Pending Item, extending (never replacing) the built-in set.",
|
|
32589
|
+
"built-in-deferral-tags": "Built-in deferral tags: {tags}",
|
|
32590
|
+
"measurements-replacement": "A fitness function's evidence observation is the outcome of its own CI step: put the check's @SCN on that step's `id:` and hand balance the run's step record with --ci-steps.",
|
|
32591
|
+
"allocate-summary": "Print the next @SCN code for a feature part: one past the highest the repository has ever carried, the code alone on stdout.",
|
|
32592
|
+
"feature-part-argument": "The feature part: a feature file's header code, two to five of A-Z and 0-9.",
|
|
32593
|
+
"new-flag": "Start a part no feature file's header carries yet: its first code, or one past any number the repository already carries for it.",
|
|
32594
|
+
"shallow-history-risks-part-code": "history: shallow clone \u2014 history before {before} unread; a code of {part} may have been used before",
|
|
32595
|
+
"shallow-history-risks-code-above": "history: shallow clone \u2014 history before {before} unread; a code above {code} may have been used before",
|
|
32596
|
+
"no-repository-risks-part-code": "history: not a git repository \u2014 none read; a code of {part} may have been used before",
|
|
32597
|
+
"no-repository-risks-code-above": "history: not a git repository \u2014 none read; a code above {code} may have been used before",
|
|
32598
|
+
"highest-seen-none": "highest seen: none",
|
|
32599
|
+
"highest-seen-in-tree": "highest seen: {code}, {path}:{line}",
|
|
32600
|
+
"highest-seen-in-commit": "highest seen: {code}, {path}:{line} in {commit}",
|
|
32601
|
+
"part-already-headed": "note: a feature file's header already carries {part}, so --new was not needed",
|
|
32602
|
+
"help-usage-line": "spec-controller {modifierUsage} <command> [command-args]"
|
|
32606
32603
|
};
|
|
32607
32604
|
}
|
|
32608
32605
|
});
|
|
@@ -32990,12 +32987,12 @@ var init_evidenceInputs = __esm({
|
|
|
32990
32987
|
init_messages();
|
|
32991
32988
|
init_inputShapes();
|
|
32992
32989
|
DECLARED = [
|
|
32993
|
-
{ flag: "features", key: "features", arg: "<dir>", description:
|
|
32990
|
+
{ flag: "features", key: "features", arg: "<dir>", description: "features-flag" /* FeaturesFlag */ },
|
|
32994
32991
|
{
|
|
32995
32992
|
flag: "vitest",
|
|
32996
32993
|
key: "vitest",
|
|
32997
32994
|
arg: "<report.json>",
|
|
32998
|
-
description:
|
|
32995
|
+
description: "vitest-flag" /* VitestFlag */,
|
|
32999
32996
|
report: {
|
|
33000
32997
|
reader: "vitest",
|
|
33001
32998
|
format: "json",
|
|
@@ -33008,7 +33005,7 @@ var init_evidenceInputs = __esm({
|
|
|
33008
33005
|
flag: "pytest",
|
|
33009
33006
|
key: "pytest",
|
|
33010
33007
|
arg: "<report.xml>",
|
|
33011
|
-
description:
|
|
33008
|
+
description: "pytest-flag" /* PytestFlag */,
|
|
33012
33009
|
report: {
|
|
33013
33010
|
reader: "pytest",
|
|
33014
33011
|
format: "junit-xml",
|
|
@@ -33021,7 +33018,7 @@ var init_evidenceInputs = __esm({
|
|
|
33021
33018
|
flag: "jest",
|
|
33022
33019
|
key: "jest",
|
|
33023
33020
|
arg: "<report.json>",
|
|
33024
|
-
description:
|
|
33021
|
+
description: "jest-flag" /* JestFlag */,
|
|
33025
33022
|
report: {
|
|
33026
33023
|
reader: "jest",
|
|
33027
33024
|
format: "json-naming-its-shape",
|
|
@@ -33034,7 +33031,7 @@ var init_evidenceInputs = __esm({
|
|
|
33034
33031
|
flag: "junit",
|
|
33035
33032
|
key: "junit",
|
|
33036
33033
|
arg: "<report.xml>",
|
|
33037
|
-
description:
|
|
33034
|
+
description: "junit-flag" /* JunitFlag */,
|
|
33038
33035
|
report: {
|
|
33039
33036
|
reader: "junit",
|
|
33040
33037
|
format: "junit-xml-or-one-suite",
|
|
@@ -33048,7 +33045,7 @@ var init_evidenceInputs = __esm({
|
|
|
33048
33045
|
flag: "rspec",
|
|
33049
33046
|
key: "rspec",
|
|
33050
33047
|
arg: "<report.json>",
|
|
33051
|
-
description:
|
|
33048
|
+
description: "rspec-flag" /* RspecFlag */,
|
|
33052
33049
|
report: {
|
|
33053
33050
|
reader: "rspec",
|
|
33054
33051
|
format: "json-naming-its-shape",
|
|
@@ -33061,7 +33058,7 @@ var init_evidenceInputs = __esm({
|
|
|
33061
33058
|
flag: "cucumber",
|
|
33062
33059
|
key: "cucumber",
|
|
33063
33060
|
arg: "<report.json>",
|
|
33064
|
-
description:
|
|
33061
|
+
description: "cucumber-flag" /* CucumberFlag */,
|
|
33065
33062
|
report: {
|
|
33066
33063
|
reader: "cucumber",
|
|
33067
33064
|
format: "json",
|
|
@@ -33070,12 +33067,12 @@ var init_evidenceInputs = __esm({
|
|
|
33070
33067
|
writer: "cucumber-report-shape" /* CucumberReportShape */
|
|
33071
33068
|
}
|
|
33072
33069
|
},
|
|
33073
|
-
{ flag: "ci", key: "ci", arg: "<ci.yml>", description:
|
|
33070
|
+
{ flag: "ci", key: "ci", arg: "<ci.yml>", description: "ci-flag" /* CiFlag */ },
|
|
33074
33071
|
{
|
|
33075
33072
|
flag: "package-json",
|
|
33076
33073
|
key: "packageJson",
|
|
33077
33074
|
arg: "<path>",
|
|
33078
|
-
description:
|
|
33075
|
+
description: "package-json-flag" /* PackageJsonFlag */,
|
|
33079
33076
|
report: {
|
|
33080
33077
|
reader: "package-manifest",
|
|
33081
33078
|
format: "json",
|
|
@@ -33088,7 +33085,7 @@ var init_evidenceInputs = __esm({
|
|
|
33088
33085
|
flag: "ci-steps",
|
|
33089
33086
|
key: "ciSteps",
|
|
33090
33087
|
arg: "<record.json>",
|
|
33091
|
-
description:
|
|
33088
|
+
description: "ci-steps-flag" /* CiStepsFlag */,
|
|
33092
33089
|
report: {
|
|
33093
33090
|
reader: "ci-step-record",
|
|
33094
33091
|
format: "json",
|
|
@@ -38282,6 +38279,9 @@ var init_keptRun = __esm({
|
|
|
38282
38279
|
});
|
|
38283
38280
|
|
|
38284
38281
|
// src/cliRegistry.ts
|
|
38282
|
+
function explainingLines(entry) {
|
|
38283
|
+
return entry.split("\n").map((line) => ` ${line}`);
|
|
38284
|
+
}
|
|
38285
38285
|
function flagLabel(flag) {
|
|
38286
38286
|
const names = [flag.name, ...flag.aliases ?? []].join(", ");
|
|
38287
38287
|
return flag.arg !== void 0 ? `${names} ${flag.arg}` : names;
|
|
@@ -38298,7 +38298,7 @@ function renderCommandHelp(command) {
|
|
|
38298
38298
|
`spec-controller ${command.name} \u2014 ${command.summary}`,
|
|
38299
38299
|
...positionalHelp(command.name, command.positionals ?? []),
|
|
38300
38300
|
"",
|
|
38301
|
-
|
|
38301
|
+
message("help-options" /* HelpOptions */),
|
|
38302
38302
|
...lines,
|
|
38303
38303
|
...configHelp.length > 0 ? ["", ...configHelp] : []
|
|
38304
38304
|
].join("\n");
|
|
@@ -38308,9 +38308,9 @@ function positionalHelp(command, positionals) {
|
|
|
38308
38308
|
const width = Math.max(...positionals.map((positional) => positional.name.length));
|
|
38309
38309
|
return [
|
|
38310
38310
|
"",
|
|
38311
|
-
`${
|
|
38311
|
+
`${message("help-usage" /* HelpUsage */)} spec-controller ${command} ${positionals.map((positional) => positional.name).join(" ")} [options]`,
|
|
38312
38312
|
"",
|
|
38313
|
-
|
|
38313
|
+
message("help-arguments" /* HelpArguments */),
|
|
38314
38314
|
...positionals.map((positional) => ` ${positional.name.padEnd(width + 2)}${positional.description}`)
|
|
38315
38315
|
];
|
|
38316
38316
|
}
|
|
@@ -38327,18 +38327,18 @@ function renderTopLevelHelp(registry) {
|
|
|
38327
38327
|
);
|
|
38328
38328
|
const modifierUsage = registry.global.map((flag) => `[${flagLabel(flag)}]`).join(" ");
|
|
38329
38329
|
return [
|
|
38330
|
-
|
|
38330
|
+
message("help-title" /* HelpTitle */),
|
|
38331
38331
|
"",
|
|
38332
|
-
|
|
38333
|
-
` ${
|
|
38332
|
+
message("help-usage" /* HelpUsage */),
|
|
38333
|
+
` ${message("help-usage-line" /* HelpUsageLine */, { modifierUsage })}`,
|
|
38334
38334
|
"",
|
|
38335
|
-
|
|
38335
|
+
message("help-commands" /* HelpCommands */),
|
|
38336
38336
|
...commandLines,
|
|
38337
38337
|
"",
|
|
38338
|
-
|
|
38338
|
+
message("help-host-modifiers" /* HelpHostModifiers */),
|
|
38339
38339
|
...modifierLines,
|
|
38340
38340
|
"",
|
|
38341
|
-
|
|
38341
|
+
message("help-pointer" /* HelpPointer */)
|
|
38342
38342
|
].join("\n");
|
|
38343
38343
|
}
|
|
38344
38344
|
var balanceFlags, balanceConfigHelp, balanceRetiredFlags, globalFlags, balanceCommand, allocateCommand, cliRegistry;
|
|
@@ -38347,90 +38347,90 @@ var init_cliRegistry = __esm({
|
|
|
38347
38347
|
"use strict";
|
|
38348
38348
|
init_dist3();
|
|
38349
38349
|
init_messages();
|
|
38350
|
+
init_appText();
|
|
38350
38351
|
init_evidenceInputs();
|
|
38351
38352
|
balanceFlags = [
|
|
38352
|
-
...EVIDENCE_INPUTS.map(({ flag, arg, description }) => ({ name: `--${flag}`, arg, description:
|
|
38353
|
+
...EVIDENCE_INPUTS.map(({ flag, arg, description }) => ({ name: `--${flag}`, arg, description: message(description) })),
|
|
38353
38354
|
{
|
|
38354
38355
|
name: "--target",
|
|
38355
38356
|
arg: "<name>",
|
|
38356
|
-
description:
|
|
38357
|
+
description: message("target-flag" /* TargetFlag */)
|
|
38357
38358
|
},
|
|
38358
38359
|
{
|
|
38359
38360
|
name: "--source-sha",
|
|
38360
38361
|
arg: "<sha>",
|
|
38361
|
-
description:
|
|
38362
|
+
description: message("source-sha-flag" /* SourceShaFlag */)
|
|
38362
38363
|
},
|
|
38363
38364
|
{
|
|
38364
38365
|
name: "--format",
|
|
38365
38366
|
arg: "<fmt>[:<path>]",
|
|
38366
38367
|
repeatable: true,
|
|
38367
|
-
description:
|
|
38368
|
+
description: message("format-flag" /* FormatFlag */)
|
|
38368
38369
|
},
|
|
38369
38370
|
{
|
|
38370
38371
|
name: "--render-from-json",
|
|
38371
38372
|
arg: "<path>",
|
|
38372
|
-
description:
|
|
38373
|
+
description: message("render-from-json-flag" /* RenderFromJsonFlag */)
|
|
38373
38374
|
},
|
|
38374
38375
|
{
|
|
38375
38376
|
name: "--strict",
|
|
38376
|
-
description:
|
|
38377
|
+
description: message("strict-flag" /* StrictFlag */)
|
|
38377
38378
|
},
|
|
38378
38379
|
{
|
|
38379
38380
|
name: "--exit-zero",
|
|
38380
|
-
description:
|
|
38381
|
+
description: message("exit-zero-flag" /* ExitZeroFlag */)
|
|
38381
38382
|
},
|
|
38382
38383
|
{
|
|
38383
38384
|
name: "--help",
|
|
38384
38385
|
aliases: ["-h"],
|
|
38385
|
-
description:
|
|
38386
|
+
description: message("help-flag" /* HelpFlag */)
|
|
38386
38387
|
}
|
|
38387
38388
|
];
|
|
38388
38389
|
balanceConfigHelp = [
|
|
38389
|
-
|
|
38390
|
-
` ${
|
|
38391
|
-
|
|
38392
|
-
|
|
38393
|
-
` ${APP_MESSAGES[31 /* BuiltInDeferralTags */](BUILT_IN_DEFERRAL_TAGS.map((tag) => `@${tag}`).join(", "))}`
|
|
38390
|
+
message("configuration-heading" /* ConfigurationHeading */),
|
|
38391
|
+
` ${message("deferral-tags-key" /* DeferralTagsKey */)}`,
|
|
38392
|
+
...explainingLines(message("deferral-tags-explanation" /* DeferralTagsExplanation */)),
|
|
38393
|
+
...explainingLines(message("built-in-deferral-tags" /* BuiltInDeferralTags */, { tags: BUILT_IN_DEFERRAL_TAGS.map((tag) => `@${tag}`).join(", ") }))
|
|
38394
38394
|
];
|
|
38395
38395
|
balanceRetiredFlags = [
|
|
38396
38396
|
{
|
|
38397
38397
|
name: "--measurements",
|
|
38398
38398
|
retiredIn: "0.1.0-alpha.5",
|
|
38399
|
-
replacement:
|
|
38399
|
+
replacement: message("measurements-replacement" /* MeasurementsReplacement */)
|
|
38400
38400
|
}
|
|
38401
38401
|
];
|
|
38402
38402
|
globalFlags = [
|
|
38403
38403
|
{
|
|
38404
38404
|
name: "--store",
|
|
38405
38405
|
arg: "<root>",
|
|
38406
|
-
description:
|
|
38406
|
+
description: message("store-modifier" /* StoreModifier */)
|
|
38407
38407
|
},
|
|
38408
38408
|
{
|
|
38409
38409
|
name: "--run-id",
|
|
38410
38410
|
arg: "<id>",
|
|
38411
|
-
description:
|
|
38411
|
+
description: message("run-id-modifier" /* RunIdModifier */)
|
|
38412
38412
|
}
|
|
38413
38413
|
];
|
|
38414
38414
|
balanceCommand = {
|
|
38415
38415
|
name: "balance",
|
|
38416
|
-
summary:
|
|
38416
|
+
summary: message("balance-summary" /* BalanceSummary */),
|
|
38417
38417
|
flags: balanceFlags,
|
|
38418
38418
|
configHelp: balanceConfigHelp,
|
|
38419
38419
|
retiredFlags: balanceRetiredFlags
|
|
38420
38420
|
};
|
|
38421
38421
|
allocateCommand = {
|
|
38422
38422
|
name: "allocate",
|
|
38423
|
-
summary:
|
|
38423
|
+
summary: message("allocate-summary" /* AllocateSummary */),
|
|
38424
38424
|
acceptsHostModifiers: false,
|
|
38425
38425
|
positionals: [
|
|
38426
|
-
{ name: "<FFF>", description:
|
|
38426
|
+
{ name: "<FFF>", description: message("feature-part-argument" /* FeaturePartArgument */) }
|
|
38427
38427
|
],
|
|
38428
38428
|
flags: [
|
|
38429
38429
|
{
|
|
38430
38430
|
name: "--new",
|
|
38431
|
-
description:
|
|
38431
|
+
description: message("new-flag" /* NewFlag */)
|
|
38432
38432
|
},
|
|
38433
|
-
{ name: "--help", aliases: ["-h"], description:
|
|
38433
|
+
{ name: "--help", aliases: ["-h"], description: message("help-flag" /* HelpFlag */) }
|
|
38434
38434
|
]
|
|
38435
38435
|
};
|
|
38436
38436
|
cliRegistry = {
|
|
@@ -39106,16 +39106,29 @@ var init_readTree = __esm({
|
|
|
39106
39106
|
|
|
39107
39107
|
// src/cli-allocate/stderr.ts
|
|
39108
39108
|
function historyBoundaryLine(boundary, allocation) {
|
|
39109
|
-
|
|
39110
|
-
|
|
39111
|
-
|
|
39112
|
-
|
|
39109
|
+
switch (boundary.kind) {
|
|
39110
|
+
case "complete":
|
|
39111
|
+
return null;
|
|
39112
|
+
case "shallow":
|
|
39113
|
+
return shallowHistoryLine(boundary.before, allocation);
|
|
39114
|
+
case "not-a-repository":
|
|
39115
|
+
return noRepositoryLine(allocation);
|
|
39116
|
+
}
|
|
39117
|
+
}
|
|
39118
|
+
function shallowHistoryLine(before, allocation) {
|
|
39119
|
+
return allocation.highest === null ? message("shallow-history-risks-part-code" /* ShallowHistoryRisksPartCode */, { before, part: partOf(allocation) }) : message("shallow-history-risks-code-above" /* ShallowHistoryRisksCodeAbove */, { before, code: allocation.highest.code });
|
|
39120
|
+
}
|
|
39121
|
+
function noRepositoryLine(allocation) {
|
|
39122
|
+
return allocation.highest === null ? message("no-repository-risks-part-code" /* NoRepositoryRisksPartCode */, { part: partOf(allocation) }) : message("no-repository-risks-code-above" /* NoRepositoryRisksCodeAbove */, { code: allocation.highest.code });
|
|
39123
|
+
}
|
|
39124
|
+
function partOf(allocation) {
|
|
39125
|
+
return featureCodeOf(allocation.code) ?? "";
|
|
39113
39126
|
}
|
|
39114
39127
|
function highestSeenLine(allocation) {
|
|
39115
39128
|
const highest = allocation.highest;
|
|
39116
|
-
if (highest === null) return
|
|
39129
|
+
if (highest === null) return message("highest-seen-none" /* HighestSeenNone */);
|
|
39117
39130
|
const { path, line, commit } = highest.occurrence;
|
|
39118
|
-
return commit === void 0 ?
|
|
39131
|
+
return commit === void 0 ? message("highest-seen-in-tree" /* HighestSeenInTree */, { code: highest.code, path, line }) : message("highest-seen-in-commit" /* HighestSeenInCommit */, { code: highest.code, path, line, commit });
|
|
39119
39132
|
}
|
|
39120
39133
|
function carriedParts(carried) {
|
|
39121
39134
|
return CARRIED_PARTS[carried.kind](carried);
|
|
@@ -39125,7 +39138,7 @@ function unknownPartRefusal(unknown) {
|
|
|
39125
39138
|
}
|
|
39126
39139
|
function alreadyHeadedNote(allocation) {
|
|
39127
39140
|
if (allocation.alreadyHeaded !== true) return null;
|
|
39128
|
-
return
|
|
39141
|
+
return message("part-already-headed" /* PartAlreadyHeaded */, { part: partOf(allocation) });
|
|
39129
39142
|
}
|
|
39130
39143
|
var CARRIED_PARTS;
|
|
39131
39144
|
var init_stderr = __esm({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-controller",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.232",
|
|
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.232"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|