spec-controller 0.1.125 → 0.1.126
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 +17 -14
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -28425,7 +28425,7 @@ var init_messages4 = __esm({
|
|
|
28425
28425
|
[CoreMessage.DuplicateScnCodeNotListed]: `A duplicated @SCN code is not listed here: it is reported on its account's rows, as "${DUPLICATE_SCN_CODE}".`,
|
|
28426
28426
|
[CoreMessage.FeatureFileNoun]: "feature file",
|
|
28427
28427
|
[CoreMessage.FeatureCodeNoun]: "feature code",
|
|
28428
|
-
[CoreMessage.NoFeatureFileJudged]: "No feature file was judged, so
|
|
28428
|
+
[CoreMessage.NoFeatureFileJudged]: "No feature file was judged, so no scenario code is vouched for.",
|
|
28429
28429
|
[CoreMessage.ScenarioCodesCleanOver]: (featureFiles, featureCodes) => `Scenario codes are clean over ${featureFiles} carrying ${featureCodes}`,
|
|
28430
28430
|
[CoreMessage.CleanNoCodedScenario]: (over, them) => `${over}: no scenario in ${them} carries an @SCN code to misfile.`,
|
|
28431
28431
|
[CoreMessage.CleanEachFileOwnCode]: (over) => `${over}: each file carries a code of its own, and ${IN_ITS_FILE}.`,
|
|
@@ -28673,8 +28673,6 @@ function counted(n, noun) {
|
|
|
28673
28673
|
return `${n} ${noun}${n === 1 ? "" : "s"}`;
|
|
28674
28674
|
}
|
|
28675
28675
|
function cleanStatement(featureFiles, featureCodes) {
|
|
28676
|
-
if (featureFiles === 0)
|
|
28677
|
-
return CORE_MESSAGES[CoreMessage.NoFeatureFileJudged];
|
|
28678
28676
|
const over = CORE_MESSAGES[CoreMessage.ScenarioCodesCleanOver](counted(featureFiles, CORE_MESSAGES[CoreMessage.FeatureFileNoun]), counted(featureCodes, CORE_MESSAGES[CoreMessage.FeatureCodeNoun]));
|
|
28679
28677
|
if (featureCodes === 0) {
|
|
28680
28678
|
const them = featureFiles === 1 ? CORE_MESSAGES[CoreMessage.ItPronoun] : CORE_MESSAGES[CoreMessage.ThemPronoun];
|
|
@@ -28707,7 +28705,7 @@ function foreignWorded(error) {
|
|
|
28707
28705
|
}
|
|
28708
28706
|
return CORE_MESSAGES[CoreMessage.ForeignScnCodeManyCarriers](file, error.featureCode, error.scnId, error.namedFeatureCode, carriers.length, carriers.join(", "));
|
|
28709
28707
|
}
|
|
28710
|
-
var scenarioCodeErrorsSection;
|
|
28708
|
+
var scenarioCodeErrorsSection, scenarioCodesCleanStatement;
|
|
28711
28709
|
var init_scenarioCodeErrorsSection = __esm({
|
|
28712
28710
|
"../core/dist/render/scenarioCodeErrorsSection.js"() {
|
|
28713
28711
|
"use strict";
|
|
@@ -28715,26 +28713,30 @@ var init_scenarioCodeErrorsSection = __esm({
|
|
|
28715
28713
|
init_messages4();
|
|
28716
28714
|
scenarioCodeErrorsSection = (report) => {
|
|
28717
28715
|
const errors = report.errors?.scenarioCodes;
|
|
28718
|
-
|
|
28719
|
-
|
|
28720
|
-
const duplicateLine = CORE_MESSAGES[CoreMessage.DuplicateScnCodeNotListed];
|
|
28721
|
-
if (errors === void 0) {
|
|
28722
|
-
if (featureFiles === void 0 || featureCodes === void 0)
|
|
28723
|
-
return [];
|
|
28724
|
-
return [heading, "", cleanStatement(featureFiles, featureCodes), "", duplicateLine, ""];
|
|
28725
|
-
}
|
|
28716
|
+
if (errors === void 0)
|
|
28717
|
+
return [];
|
|
28726
28718
|
const count = errors.length === 1 ? CORE_MESSAGES[CoreMessage.OneScenarioCodeError] : CORE_MESSAGES[CoreMessage.ScenarioCodeErrorCount](errors.length);
|
|
28727
28719
|
return [
|
|
28728
|
-
|
|
28720
|
+
CORE_MESSAGES[CoreMessage.ScenarioCodeErrorsHeading],
|
|
28729
28721
|
"",
|
|
28730
28722
|
scenarioCodeErrorsFraming(errors, count),
|
|
28731
28723
|
"",
|
|
28732
28724
|
...errors.map((error) => `- \`${error.kind}\` \u2014 ${worded(error)}`),
|
|
28733
28725
|
"",
|
|
28734
|
-
|
|
28726
|
+
CORE_MESSAGES[CoreMessage.DuplicateScnCodeNotListed],
|
|
28735
28727
|
""
|
|
28736
28728
|
];
|
|
28737
28729
|
};
|
|
28730
|
+
scenarioCodesCleanStatement = (report) => {
|
|
28731
|
+
if (report.errors?.scenarioCodes !== void 0)
|
|
28732
|
+
return [];
|
|
28733
|
+
const { featureFiles, featureCodes } = report.scenarioCodes ?? {};
|
|
28734
|
+
if (featureFiles === void 0 || featureCodes === void 0)
|
|
28735
|
+
return [];
|
|
28736
|
+
if (featureFiles === 0)
|
|
28737
|
+
return [CORE_MESSAGES[CoreMessage.NoFeatureFileJudged], ""];
|
|
28738
|
+
return [cleanStatement(featureFiles, featureCodes), ""];
|
|
28739
|
+
};
|
|
28738
28740
|
}
|
|
28739
28741
|
});
|
|
28740
28742
|
|
|
@@ -29439,6 +29441,7 @@ var init_markdown = __esm({
|
|
|
29439
29441
|
scenarioCodeErrorsSection,
|
|
29440
29442
|
summaryViewsSection,
|
|
29441
29443
|
(report, _inputNames, exitCodeOf2) => runVerdictSection(report, exitCodeOf2),
|
|
29444
|
+
scenarioCodesCleanStatement,
|
|
29442
29445
|
evidenceReconciliationSection,
|
|
29443
29446
|
testVolumeSection,
|
|
29444
29447
|
discoveryScopeSection,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-controller",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.126",
|
|
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.126"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|