spec-controller 0.1.271 → 0.1.273
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 +13 -13
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -568,12 +568,14 @@ function recordedObservationOf(recorded2, steps) {
|
|
|
568
568
|
return { cites, result, kind: "fitness", place, notes: [] };
|
|
569
569
|
}
|
|
570
570
|
function fitnessObservationsOf(steps, dispositionOf, recorded2) {
|
|
571
|
-
const
|
|
571
|
+
const candidates = steps.filter((step) => dispositionOf(step) === "candidate");
|
|
572
572
|
if (recorded2 === void 0)
|
|
573
|
-
return
|
|
573
|
+
return candidates.map(workflowObservationOf);
|
|
574
|
+
const fitnessEntries = recorded2.filter(isKeyedByAClaimCode);
|
|
575
|
+
const isRecorded = (step) => fitnessEntries.some(({ key }) => key === step.id);
|
|
574
576
|
return [
|
|
575
|
-
...
|
|
576
|
-
...
|
|
577
|
+
...candidates.filter((step) => !isRecorded(step)).map(workflowObservationOf),
|
|
578
|
+
...fitnessEntries.map((entry) => recordedObservationOf(entry, steps))
|
|
577
579
|
];
|
|
578
580
|
}
|
|
579
581
|
function neverRanObservation(kind, place, message2) {
|
|
@@ -670,10 +672,10 @@ function kindsTheTagsName(tags) {
|
|
|
670
672
|
}
|
|
671
673
|
function scenarioResultOf(steps) {
|
|
672
674
|
const endings = steps.map(endingOf);
|
|
673
|
-
if (endings.includes("failed"))
|
|
674
|
-
return "failed";
|
|
675
675
|
if (endings.includes("could-not-run"))
|
|
676
676
|
return "never-ran";
|
|
677
|
+
if (endings.includes("failed"))
|
|
678
|
+
return "failed";
|
|
677
679
|
return endings.length > 0 && endings.every((ending) => ending === "passed") ? "passed" : void 0;
|
|
678
680
|
}
|
|
679
681
|
function scenarioRunObservationOf(run3, root, claimCodesAt) {
|
|
@@ -682,12 +684,10 @@ function scenarioRunObservationOf(run3, root, claimCodesAt) {
|
|
|
682
684
|
return [];
|
|
683
685
|
const place = relativizeToRoot(String(run3.featurePath ?? run3.featureName), root);
|
|
684
686
|
const rowCodes = run3.line === void 0 ? [] : claimCodesAt(place, run3.line);
|
|
685
|
-
const [firstKind, ...otherKinds] = kindsTheTagsName(run3.tags);
|
|
686
687
|
const cites = nearestCitation([codesIn2([...run3.tags, ...rowCodes])]);
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
}
|
|
690
|
-
return [firstKind, ...otherKinds].map((kind) => ({ cites, result, kind, place, notes: [], name: run3.name }));
|
|
688
|
+
const neverRan = result === "never-ran";
|
|
689
|
+
const notes = neverRan ? run3.steps.filter((step) => endingOf(step) === "could-not-run").map(stepText) : [];
|
|
690
|
+
return kindsTheTagsName(run3.tags).map((kind) => ({ cites, result, kind, place, notes, ...neverRan ? {} : { name: run3.name } }));
|
|
691
691
|
}
|
|
692
692
|
function scenarioRunObservationsOf(runs2, root, claimCodesAt) {
|
|
693
693
|
return runs2.flatMap((run3) => scenarioRunObservationOf(run3, root, claimCodesAt));
|
|
@@ -30531,7 +30531,7 @@ var init_refusal = __esm({
|
|
|
30531
30531
|
import { closeSync, constants, existsSync as existsSync2, fstatSync, lstatSync, openSync, readlinkSync, realpathSync, statSync as statSync2 } from "node:fs";
|
|
30532
30532
|
import { dirname, resolve, sep } from "node:path";
|
|
30533
30533
|
function unwritableRefusal(format, path, err) {
|
|
30534
|
-
const reason = err
|
|
30534
|
+
const reason = err.message;
|
|
30535
30535
|
return refusal("report-not-written" /* ReportNotWritten */, { format, path, reason });
|
|
30536
30536
|
}
|
|
30537
30537
|
function probeDestination(path) {
|
|
@@ -35456,7 +35456,7 @@ function corpusDirOf(args, defaultCorpus) {
|
|
|
35456
35456
|
try {
|
|
35457
35457
|
return join4(process.cwd(), defaultCorpus);
|
|
35458
35458
|
} catch (err) {
|
|
35459
|
-
return { path: defaultCorpus, reason: err
|
|
35459
|
+
return { path: defaultCorpus, reason: err.message };
|
|
35460
35460
|
}
|
|
35461
35461
|
}
|
|
35462
35462
|
var init_corpusDir = __esm({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-controller",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.273",
|
|
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.273"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|