spec-controller 0.1.95 → 0.1.97
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 +59 -36
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -12470,28 +12470,6 @@ var init_pendingItems = __esm({
|
|
|
12470
12470
|
}
|
|
12471
12471
|
});
|
|
12472
12472
|
|
|
12473
|
-
// ../core/dist/domain/runVerdict.js
|
|
12474
|
-
function runVerdict(run3) {
|
|
12475
|
-
if (hasNothingToReconcile(run3.ledger))
|
|
12476
|
-
return "nothing-to-reconcile";
|
|
12477
|
-
if (hasBrokenEvidence(run3.ledger))
|
|
12478
|
-
return "unsound";
|
|
12479
|
-
if (hasScenarioCodeErrors(run3))
|
|
12480
|
-
return "scenario-code-errors";
|
|
12481
|
-
if (!isBalanced(run3.ledger))
|
|
12482
|
-
return "out-of-balance";
|
|
12483
|
-
if (run3.strict && hasPendingItems(run3.ledger))
|
|
12484
|
-
return "pending";
|
|
12485
|
-
return "balanced";
|
|
12486
|
-
}
|
|
12487
|
-
var init_runVerdict = __esm({
|
|
12488
|
-
"../core/dist/domain/runVerdict.js"() {
|
|
12489
|
-
"use strict";
|
|
12490
|
-
init_ledger();
|
|
12491
|
-
init_scnTags();
|
|
12492
|
-
}
|
|
12493
|
-
});
|
|
12494
|
-
|
|
12495
12473
|
// ../core/dist/domain/scnAllocation.js
|
|
12496
12474
|
function numberOf(code) {
|
|
12497
12475
|
return Number(code.slice(code.lastIndexOf("-") + 1));
|
|
@@ -27788,11 +27766,45 @@ var init_provenance = __esm({
|
|
|
27788
27766
|
}
|
|
27789
27767
|
});
|
|
27790
27768
|
|
|
27769
|
+
// ../core/dist/domain/runVerdict.js
|
|
27770
|
+
function runVerdict(run3) {
|
|
27771
|
+
if (hasNothingToReconcile(run3.ledger))
|
|
27772
|
+
return "nothing-to-reconcile";
|
|
27773
|
+
if (hasBrokenEvidence(run3.ledger))
|
|
27774
|
+
return "unsound";
|
|
27775
|
+
if (hasScenarioCodeErrors(run3))
|
|
27776
|
+
return "scenario-code-errors";
|
|
27777
|
+
if (!isBalanced(run3.ledger))
|
|
27778
|
+
return "out-of-balance";
|
|
27779
|
+
if (run3.strict && hasPendingItems(run3.ledger))
|
|
27780
|
+
return "pending";
|
|
27781
|
+
return "balanced";
|
|
27782
|
+
}
|
|
27783
|
+
var init_runVerdict = __esm({
|
|
27784
|
+
"../core/dist/domain/runVerdict.js"() {
|
|
27785
|
+
"use strict";
|
|
27786
|
+
init_ledger();
|
|
27787
|
+
init_scnTags();
|
|
27788
|
+
}
|
|
27789
|
+
});
|
|
27790
|
+
|
|
27791
27791
|
// ../core/dist/assemble/renderInput.js
|
|
27792
|
+
function concludedSummary({ stepAccounting: stepAccounting2, ...summary }, verdictInputs) {
|
|
27793
|
+
return {
|
|
27794
|
+
...summary,
|
|
27795
|
+
...stepAccounting2 ? { stepAccounting: { ...stepAccounting2, everyStepAccountedFor: everyStepAccountedFor(stepAccounting2) } } : {},
|
|
27796
|
+
runVerdict: runVerdict(verdictInputs)
|
|
27797
|
+
};
|
|
27798
|
+
}
|
|
27792
27799
|
function assembleRenderInput(evidenceReconciliation, ctx, evidenceObligations2, featureNames) {
|
|
27793
27800
|
return {
|
|
27794
27801
|
runProvenance: provenanceObject(ctx),
|
|
27795
27802
|
...evidenceReconciliation,
|
|
27803
|
+
summary: concludedSummary(evidenceReconciliation.summary, {
|
|
27804
|
+
ledger: evidenceReconciliation.ledger,
|
|
27805
|
+
scenarioCodeErrors: evidenceReconciliation.scenarioCodeErrors,
|
|
27806
|
+
strict: ctx.strict === true
|
|
27807
|
+
}),
|
|
27796
27808
|
...evidenceObligations2 ? {
|
|
27797
27809
|
evidenceObligations: {
|
|
27798
27810
|
excludedOccurrences: evidenceObligations2.excludedOccurrences,
|
|
@@ -27807,6 +27819,8 @@ var init_renderInput = __esm({
|
|
|
27807
27819
|
"../core/dist/assemble/renderInput.js"() {
|
|
27808
27820
|
"use strict";
|
|
27809
27821
|
init_provenance();
|
|
27822
|
+
init_runVerdict();
|
|
27823
|
+
init_uncitedFitnessFunctions();
|
|
27810
27824
|
}
|
|
27811
27825
|
});
|
|
27812
27826
|
|
|
@@ -28117,6 +28131,22 @@ var init_evidenceReconciliationFromSources = __esm({
|
|
|
28117
28131
|
}
|
|
28118
28132
|
});
|
|
28119
28133
|
|
|
28134
|
+
// ../core/dist/assemble/savedReport.js
|
|
28135
|
+
function assembleSavedReport(saved, strictGiven) {
|
|
28136
|
+
const strict = saved.runProvenance.strict === true || strictGiven;
|
|
28137
|
+
return {
|
|
28138
|
+
...saved,
|
|
28139
|
+
runProvenance: { ...saved.runProvenance, strict },
|
|
28140
|
+
summary: concludedSummary(saved.summary, { ledger: saved.ledger, scenarioCodeErrors: saved.scenarioCodeErrors, strict })
|
|
28141
|
+
};
|
|
28142
|
+
}
|
|
28143
|
+
var init_savedReport = __esm({
|
|
28144
|
+
"../core/dist/assemble/savedReport.js"() {
|
|
28145
|
+
"use strict";
|
|
28146
|
+
init_renderInput();
|
|
28147
|
+
}
|
|
28148
|
+
});
|
|
28149
|
+
|
|
28120
28150
|
// ../core/dist/model.js
|
|
28121
28151
|
var init_model = __esm({
|
|
28122
28152
|
"../core/dist/model.js"() {
|
|
@@ -28535,7 +28565,6 @@ var init_runVerdict2 = __esm({
|
|
|
28535
28565
|
"use strict";
|
|
28536
28566
|
init_ledger();
|
|
28537
28567
|
init_scnTags();
|
|
28538
|
-
init_runVerdict();
|
|
28539
28568
|
init_messages4();
|
|
28540
28569
|
OUT_OF_BALANCE = {
|
|
28541
28570
|
headline: CORE_MESSAGES[CoreMessage.OutOfBalanceHeadline],
|
|
@@ -28555,11 +28584,7 @@ var init_runVerdict2 = __esm({
|
|
|
28555
28584
|
};
|
|
28556
28585
|
runVerdictSection = (report, exitCodeOf2) => {
|
|
28557
28586
|
const reconciliation = { claimReconciliations: report.ledger.claimReconciliations };
|
|
28558
|
-
const verdict = runVerdict
|
|
28559
|
-
ledger: reconciliation,
|
|
28560
|
-
scenarioCodeErrors: report.scenarioCodeErrors,
|
|
28561
|
-
strict: report.runProvenance.strict === true
|
|
28562
|
-
});
|
|
28587
|
+
const verdict = report.summary.runVerdict;
|
|
28563
28588
|
const line = verdictFor2(verdict, reconciliation, report.runProvenance.corpus, report.scenarioCodeErrors ?? []);
|
|
28564
28589
|
const exit = CORE_MESSAGES[CoreMessage.VerdictExit](exitCodeOf2(verdict));
|
|
28565
28590
|
const lines = [CORE_MESSAGES[CoreMessage.RunVerdictHeading], "", `${line.headline} \u2014 ${line.gloss} (${exit})`];
|
|
@@ -28879,9 +28904,8 @@ var verdictOf, stepAccountingSection;
|
|
|
28879
28904
|
var init_stepAccounting = __esm({
|
|
28880
28905
|
"../core/dist/render/stepAccounting.js"() {
|
|
28881
28906
|
"use strict";
|
|
28882
|
-
init_uncitedFitnessFunctions();
|
|
28883
28907
|
init_messages4();
|
|
28884
|
-
verdictOf = (accounting) => everyStepAccountedFor
|
|
28908
|
+
verdictOf = (accounting) => accounting.everyStepAccountedFor ? `- ${CORE_MESSAGES[CoreMessage.EveryStepAccountedFor]}` : `- ${CORE_MESSAGES[CoreMessage.StepsNotAccountedFor](accounting.stepsRead, accounting.accountedFor)}`;
|
|
28885
28909
|
stepAccountingSection = (report) => {
|
|
28886
28910
|
const accounting = report.summary.stepAccounting;
|
|
28887
28911
|
if (accounting === void 0)
|
|
@@ -29373,6 +29397,7 @@ var init_composers = __esm({
|
|
|
29373
29397
|
"../core/dist/assemble/composers.js"() {
|
|
29374
29398
|
"use strict";
|
|
29375
29399
|
init_renderInput();
|
|
29400
|
+
init_savedReport();
|
|
29376
29401
|
init_markdown();
|
|
29377
29402
|
init_provenanceFacts();
|
|
29378
29403
|
init_provenance();
|
|
@@ -29389,7 +29414,6 @@ var init_dist3 = __esm({
|
|
|
29389
29414
|
init_scnTags();
|
|
29390
29415
|
init_ledger();
|
|
29391
29416
|
init_pendingItems();
|
|
29392
|
-
init_runVerdict();
|
|
29393
29417
|
init_scnAllocation();
|
|
29394
29418
|
init_vitest();
|
|
29395
29419
|
init_pytest();
|
|
@@ -29401,6 +29425,7 @@ var init_dist3 = __esm({
|
|
|
29401
29425
|
init_renderInput();
|
|
29402
29426
|
init_evidenceReconciliationFromSources();
|
|
29403
29427
|
init_composers();
|
|
29428
|
+
init_savedReport();
|
|
29404
29429
|
init_markdown();
|
|
29405
29430
|
init_provenance();
|
|
29406
29431
|
init_provenanceFacts();
|
|
@@ -34468,12 +34493,10 @@ var init_reportReading = __esm({
|
|
|
34468
34493
|
|
|
34469
34494
|
// src/cli-balance/reRender.ts
|
|
34470
34495
|
function reRender(document, strictGiven) {
|
|
34471
|
-
const
|
|
34472
|
-
const strict = saved.runProvenance.strict === true || strictGiven;
|
|
34473
|
-
const report = { ...saved, runProvenance: { ...saved.runProvenance, strict } };
|
|
34496
|
+
const report = assembleSavedReport(document, strictGiven);
|
|
34474
34497
|
return {
|
|
34475
34498
|
markdown: renderReport(report, INPUT_NAMES, reportedExitCodeOf),
|
|
34476
|
-
verdict:
|
|
34499
|
+
verdict: report.summary.runVerdict
|
|
34477
34500
|
};
|
|
34478
34501
|
}
|
|
34479
34502
|
function checkReRenderFlags(args) {
|
|
@@ -35331,7 +35354,7 @@ function reconcile2(argv, ownRunDir) {
|
|
|
35331
35354
|
identifiedInputs(inputsReadBy(args, NODE_INPUT_READER)),
|
|
35332
35355
|
(path) => earlierStoredRunDirOf(path, ownRunDir)
|
|
35333
35356
|
);
|
|
35334
|
-
const verdict =
|
|
35357
|
+
const verdict = assembleRenderInput(balance2, ctx).summary.runVerdict;
|
|
35335
35358
|
endRunOn({ kind: "verdict", code: exitCodeOf(verdict, args["exit-zero"] !== void 0) });
|
|
35336
35359
|
return true;
|
|
35337
35360
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-controller",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.97",
|
|
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
|
"esbuild": "0.28.1",
|
|
26
26
|
"fast-xml-parser": "^5.11.2",
|
|
27
27
|
"yaml": "^2.9.0",
|
|
28
|
-
"@3f-consulting/spec-controller-core": "0.1.
|
|
28
|
+
"@3f-consulting/spec-controller-core": "0.1.97"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|