spec-controller 0.1.74 → 0.1.75

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.
Files changed (155) hide show
  1. package/dist/THIRD-PARTY-LICENSES.txt +382 -0
  2. package/dist/cli.js +28998 -3
  3. package/package.json +6 -3
  4. package/LICENSE +0 -21
  5. package/dist/cli-allocate/cli.d.ts +0 -2
  6. package/dist/cli-allocate/cli.d.ts.map +0 -1
  7. package/dist/cli-allocate/cli.js +0 -63
  8. package/dist/cli-allocate/cli.js.map +0 -1
  9. package/dist/cli-allocate/readHistory.d.ts +0 -14
  10. package/dist/cli-allocate/readHistory.d.ts.map +0 -1
  11. package/dist/cli-allocate/readHistory.js +0 -109
  12. package/dist/cli-allocate/readHistory.js.map +0 -1
  13. package/dist/cli-allocate/readParts.d.ts +0 -2
  14. package/dist/cli-allocate/readParts.d.ts.map +0 -1
  15. package/dist/cli-allocate/readParts.js +0 -26
  16. package/dist/cli-allocate/readParts.js.map +0 -1
  17. package/dist/cli-allocate/readTree.d.ts +0 -5
  18. package/dist/cli-allocate/readTree.d.ts.map +0 -1
  19. package/dist/cli-allocate/readTree.js +0 -74
  20. package/dist/cli-allocate/readTree.js.map +0 -1
  21. package/dist/cli-allocate/refStore.d.ts +0 -2
  22. package/dist/cli-allocate/refStore.d.ts.map +0 -1
  23. package/dist/cli-allocate/refStore.js +0 -35
  24. package/dist/cli-allocate/refStore.js.map +0 -1
  25. package/dist/cli-allocate/request.d.ts +0 -9
  26. package/dist/cli-allocate/request.d.ts.map +0 -1
  27. package/dist/cli-allocate/request.js +0 -23
  28. package/dist/cli-allocate/request.js.map +0 -1
  29. package/dist/cli-allocate/stderr.d.ts +0 -7
  30. package/dist/cli-allocate/stderr.d.ts.map +0 -1
  31. package/dist/cli-allocate/stderr.js +0 -32
  32. package/dist/cli-allocate/stderr.js.map +0 -1
  33. package/dist/cli-allocate/unreadable.d.ts +0 -19
  34. package/dist/cli-allocate/unreadable.d.ts.map +0 -1
  35. package/dist/cli-allocate/unreadable.js +0 -47
  36. package/dist/cli-allocate/unreadable.js.map +0 -1
  37. package/dist/cli-args.d.ts +0 -18
  38. package/dist/cli-args.d.ts.map +0 -1
  39. package/dist/cli-args.js +0 -196
  40. package/dist/cli-args.js.map +0 -1
  41. package/dist/cli-balance/cli.d.ts +0 -10
  42. package/dist/cli-balance/cli.d.ts.map +0 -1
  43. package/dist/cli-balance/cli.js +0 -163
  44. package/dist/cli-balance/cli.js.map +0 -1
  45. package/dist/cli-balance/corpusDir.d.ts +0 -3
  46. package/dist/cli-balance/corpusDir.d.ts.map +0 -1
  47. package/dist/cli-balance/corpusDir.js +0 -14
  48. package/dist/cli-balance/corpusDir.js.map +0 -1
  49. package/dist/cli-balance/emit/format.d.ts +0 -39
  50. package/dist/cli-balance/emit/format.d.ts.map +0 -1
  51. package/dist/cli-balance/emit/format.js +0 -59
  52. package/dist/cli-balance/emit/format.js.map +0 -1
  53. package/dist/cli-balance/emit/writer.d.ts +0 -13
  54. package/dist/cli-balance/emit/writer.d.ts.map +0 -1
  55. package/dist/cli-balance/emit/writer.js +0 -73
  56. package/dist/cli-balance/emit/writer.js.map +0 -1
  57. package/dist/cli-balance/evidenceInputs.d.ts +0 -136
  58. package/dist/cli-balance/evidenceInputs.d.ts.map +0 -1
  59. package/dist/cli-balance/evidenceInputs.js +0 -125
  60. package/dist/cli-balance/evidenceInputs.js.map +0 -1
  61. package/dist/cli-balance/exitStatus.d.ts +0 -4
  62. package/dist/cli-balance/exitStatus.d.ts.map +0 -1
  63. package/dist/cli-balance/exitStatus.js +0 -18
  64. package/dist/cli-balance/exitStatus.js.map +0 -1
  65. package/dist/cli-balance/inputsRead.d.ts +0 -11
  66. package/dist/cli-balance/inputsRead.d.ts.map +0 -1
  67. package/dist/cli-balance/inputsRead.js +0 -51
  68. package/dist/cli-balance/inputsRead.js.map +0 -1
  69. package/dist/cli-balance/reRender.d.ts +0 -8
  70. package/dist/cli-balance/reRender.d.ts.map +0 -1
  71. package/dist/cli-balance/reRender.js +0 -23
  72. package/dist/cli-balance/reRender.js.map +0 -1
  73. package/dist/cli-balance/unreadableInputs.d.ts +0 -52
  74. package/dist/cli-balance/unreadableInputs.d.ts.map +0 -1
  75. package/dist/cli-balance/unreadableInputs.js +0 -118
  76. package/dist/cli-balance/unreadableInputs.js.map +0 -1
  77. package/dist/cli-registry.d.ts +0 -36
  78. package/dist/cli-registry.d.ts.map +0 -1
  79. package/dist/cli-registry.js +0 -147
  80. package/dist/cli-registry.js.map +0 -1
  81. package/dist/cli.d.ts +0 -3
  82. package/dist/cli.d.ts.map +0 -1
  83. package/dist/cli.js.map +0 -1
  84. package/dist/crashGuards.d.ts +0 -18
  85. package/dist/crashGuards.d.ts.map +0 -1
  86. package/dist/crashGuards.js +0 -81
  87. package/dist/crashGuards.js.map +0 -1
  88. package/dist/defaultCorpus.d.ts +0 -2
  89. package/dist/defaultCorpus.d.ts.map +0 -1
  90. package/dist/defaultCorpus.js +0 -2
  91. package/dist/defaultCorpus.js.map +0 -1
  92. package/dist/exitCode.d.ts +0 -21
  93. package/dist/exitCode.d.ts.map +0 -1
  94. package/dist/exitCode.js +0 -30
  95. package/dist/exitCode.js.map +0 -1
  96. package/dist/host.d.ts +0 -19
  97. package/dist/host.d.ts.map +0 -1
  98. package/dist/host.js +0 -119
  99. package/dist/host.js.map +0 -1
  100. package/dist/ingest/ciSourcePaths.d.ts +0 -8
  101. package/dist/ingest/ciSourcePaths.d.ts.map +0 -1
  102. package/dist/ingest/ciSourcePaths.js +0 -20
  103. package/dist/ingest/ciSourcePaths.js.map +0 -1
  104. package/dist/ingest/ingestQualityChecks.d.ts +0 -41
  105. package/dist/ingest/ingestQualityChecks.d.ts.map +0 -1
  106. package/dist/ingest/ingestQualityChecks.js +0 -105
  107. package/dist/ingest/ingestQualityChecks.js.map +0 -1
  108. package/dist/ingest/ingestScenarios.d.ts +0 -16
  109. package/dist/ingest/ingestScenarios.d.ts.map +0 -1
  110. package/dist/ingest/ingestScenarios.js +0 -61
  111. package/dist/ingest/ingestScenarios.js.map +0 -1
  112. package/dist/ingest/inputReading.d.ts +0 -12
  113. package/dist/ingest/inputReading.d.ts.map +0 -1
  114. package/dist/ingest/inputReading.js +0 -28
  115. package/dist/ingest/inputReading.js.map +0 -1
  116. package/dist/ingest/inputShapes.d.ts +0 -18
  117. package/dist/ingest/inputShapes.d.ts.map +0 -1
  118. package/dist/ingest/inputShapes.js +0 -135
  119. package/dist/ingest/inputShapes.js.map +0 -1
  120. package/dist/ingest/junitReportPaths.d.ts +0 -3
  121. package/dist/ingest/junitReportPaths.d.ts.map +0 -1
  122. package/dist/ingest/junitReportPaths.js +0 -16
  123. package/dist/ingest/junitReportPaths.js.map +0 -1
  124. package/dist/ingest/junitXml.d.ts +0 -4
  125. package/dist/ingest/junitXml.d.ts.map +0 -1
  126. package/dist/ingest/junitXml.js +0 -22
  127. package/dist/ingest/junitXml.js.map +0 -1
  128. package/dist/ingest/reportReading.d.ts +0 -20
  129. package/dist/ingest/reportReading.d.ts.map +0 -1
  130. package/dist/ingest/reportReading.js +0 -28
  131. package/dist/ingest/reportReading.js.map +0 -1
  132. package/dist/main.d.ts +0 -2
  133. package/dist/main.d.ts.map +0 -1
  134. package/dist/main.js +0 -107
  135. package/dist/main.js.map +0 -1
  136. package/dist/messages.d.ts +0 -242
  137. package/dist/messages.d.ts.map +0 -1
  138. package/dist/messages.js +0 -343
  139. package/dist/messages.js.map +0 -1
  140. package/dist/outputLocation.d.ts +0 -23
  141. package/dist/outputLocation.d.ts.map +0 -1
  142. package/dist/outputLocation.js +0 -139
  143. package/dist/outputLocation.js.map +0 -1
  144. package/dist/run-management/keptRun.d.ts +0 -55
  145. package/dist/run-management/keptRun.d.ts.map +0 -1
  146. package/dist/run-management/keptRun.js +0 -93
  147. package/dist/run-management/keptRun.js.map +0 -1
  148. package/dist/run-management/resolveRunInputs.d.ts +0 -17
  149. package/dist/run-management/resolveRunInputs.d.ts.map +0 -1
  150. package/dist/run-management/resolveRunInputs.js +0 -137
  151. package/dist/run-management/resolveRunInputs.js.map +0 -1
  152. package/dist/storedRun.d.ts +0 -6
  153. package/dist/storedRun.d.ts.map +0 -1
  154. package/dist/storedRun.js +0 -27
  155. package/dist/storedRun.js.map +0 -1
@@ -1,73 +0,0 @@
1
- import { unlinkSync, writeFileSync } from "node:fs";
2
- import { renderMarkdown } from "@3f-consulting/spec-controller-core";
3
- import { renderJson } from "@3f-consulting/spec-controller-core";
4
- import { inputOverwriteRefusal, sharedFileRefusal } from "./format.js";
5
- import { probeDestination, refuse, unwritableRefusal, writeOrRefuse } from "../../outputLocation.js";
6
- import { APP_MESSAGES, AppMessage } from "../../messages.js";
7
- import { reportedExitCodeOf } from "../exitStatus.js";
8
- function render(fmt, p) {
9
- return fmt === "json"
10
- ? renderJson(p.balance, p.ctx, p.evidenceObligations, p.featureNames)
11
- : renderMarkdown(p.balance, p.ctx, reportedExitCodeOf, p.evidenceObligations, p.featureNames);
12
- }
13
- export function writeOutputs(plan, payloads, stdoutFile, inputs, earlierStoredRunDirOf) {
14
- const emissions = plan.outputs.map((output) => ({ output, text: render(output.fmt, payloads) + "\n" }));
15
- const refusal = vetDestinations(plan.outputs, stdoutFile, inputs) ?? earlierStoredRunRefusal(plan.outputs, earlierStoredRunDirOf);
16
- if (refusal !== undefined)
17
- refuse(refusal);
18
- for (const { output, text } of emissions)
19
- emit(output, text);
20
- }
21
- function vetDestinations(outputs, stdoutFile, inputs) {
22
- const created = [];
23
- try {
24
- const identified = [];
25
- for (const output of outputs) {
26
- const probe = identify(output, stdoutFile, created);
27
- if (typeof probe === "string")
28
- return probe;
29
- identified.push({ output, identity: probe });
30
- }
31
- return sharedFileRefusal(identified) ?? inputOverwriteRefusal(identified, inputs);
32
- }
33
- finally {
34
- for (const path of created)
35
- unlinkSync(path);
36
- }
37
- }
38
- function earlierStoredRunRefusal(outputs, earlierStoredRunDirOf) {
39
- for (const { dest } of outputs) {
40
- if (dest.kind === "stdout")
41
- continue;
42
- const runDir = earlierStoredRunDirOf(dest.path);
43
- if (runDir !== undefined)
44
- return APP_MESSAGES[AppMessage.OutputOverwritesStoredRun](dest.path, runDir);
45
- }
46
- return undefined;
47
- }
48
- function identify(output, stdoutFile, created) {
49
- const dest = output.dest;
50
- if (dest.kind === "stdout")
51
- return stdoutFile();
52
- try {
53
- const probed = probeDestination(dest.path);
54
- if (probed.created !== undefined)
55
- created.push(probed.created);
56
- return probed.identity;
57
- }
58
- catch (err) {
59
- return unwritableRefusal(refusalSubject(output), dest.path, err);
60
- }
61
- }
62
- function refusalSubject(output) {
63
- return APP_MESSAGES[AppMessage.ReportNotWritten](output.fmt);
64
- }
65
- function emit(output, text) {
66
- const dest = output.dest;
67
- if (dest.kind === "stdout") {
68
- process.stdout.write(text);
69
- return;
70
- }
71
- writeOrRefuse(refusalSubject(output), dest.path, () => writeFileSync(dest.path, text));
72
- }
73
- //# sourceMappingURL=writer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"writer.js","sourceRoot":"","sources":["../../../src/cli-balance/emit/writer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAA0H,MAAM,aAAa,CAAC;AAI/L,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACrG,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAStD,SAAS,MAAM,CAAC,GAAiB,EAAE,CAAiB;IAClD,OAAO,GAAG,KAAK,MAAM;QACnB,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,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C,IAAI,EAAE,GAAG,CAAC,CAAC;IACnE,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CAAC,MAAqB;IAC3C,OAAO,YAAY,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,IAAI,CAAC,MAAqB,EAAE,IAAY;IAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IACzB,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC3B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO;IACT,CAAC;IACD,aAAa,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AACzF,CAAC"}
@@ -1,136 +0,0 @@
1
- import { AppMessage, type PlainAppMessage } from "../messages.js";
2
- import { type Shape } from "../ingest/inputShapes.js";
3
- import type { EvidenceReader } from "../ingest/ingestQualityChecks.js";
4
- import type { ReportFormat } from "../ingest/reportReading.js";
5
- import type { RunInput, RunInputName } from "@3f-consulting/spec-controller-core";
6
- export interface ReportInput {
7
- readonly reader: EvidenceReader;
8
- readonly format: ReportFormat;
9
- readonly shape: Shape;
10
- readonly subject: AppMessage.FlaggedReport | AppMessage.FlaggedRecord | AppMessage.FlaggedManifest;
11
- readonly writer: PlainAppMessage;
12
- readonly takesADirectory?: true;
13
- }
14
- export interface EvidenceInput {
15
- readonly flag: string;
16
- readonly key: string;
17
- readonly arg: string;
18
- readonly description: PlainAppMessage;
19
- readonly report?: ReportInput;
20
- }
21
- declare const DECLARED: readonly [{
22
- readonly flag: "features";
23
- readonly key: "features";
24
- readonly arg: "<dir>";
25
- readonly description: AppMessage.FeaturesFlag;
26
- }, {
27
- readonly flag: "vitest";
28
- readonly key: "vitest";
29
- readonly arg: "<report.json>";
30
- readonly description: AppMessage.VitestFlag;
31
- readonly report: {
32
- readonly reader: "vitest";
33
- readonly format: "json";
34
- readonly shape: Shape;
35
- readonly subject: AppMessage.FlaggedReport;
36
- readonly writer: AppMessage.VitestReportShape;
37
- };
38
- }, {
39
- readonly flag: "pytest";
40
- readonly key: "pytest";
41
- readonly arg: "<report.xml>";
42
- readonly description: AppMessage.PytestFlag;
43
- readonly report: {
44
- readonly reader: "pytest";
45
- readonly format: "junit-xml";
46
- readonly shape: Shape;
47
- readonly subject: AppMessage.FlaggedReport;
48
- readonly writer: AppMessage.JunitReportShape;
49
- };
50
- }, {
51
- readonly flag: "jest";
52
- readonly key: "jest";
53
- readonly arg: "<report.json>";
54
- readonly description: AppMessage.JestFlag;
55
- readonly report: {
56
- readonly reader: "jest";
57
- readonly format: "json-naming-its-shape";
58
- readonly shape: Shape;
59
- readonly subject: AppMessage.FlaggedReport;
60
- readonly writer: AppMessage.JestReportShape;
61
- };
62
- }, {
63
- readonly flag: "junit";
64
- readonly key: "junit";
65
- readonly arg: "<report.xml>";
66
- readonly description: AppMessage.JunitFlag;
67
- readonly report: {
68
- readonly reader: "junit";
69
- readonly format: "junit-xml-or-one-suite";
70
- readonly shape: Shape;
71
- readonly subject: AppMessage.FlaggedReport;
72
- readonly writer: AppMessage.JunitXmlReportShape;
73
- readonly takesADirectory: true;
74
- };
75
- }, {
76
- readonly flag: "rspec";
77
- readonly key: "rspec";
78
- readonly arg: "<report.json>";
79
- readonly description: AppMessage.RspecFlag;
80
- readonly report: {
81
- readonly reader: "rspec";
82
- readonly format: "json-naming-its-shape";
83
- readonly shape: Shape;
84
- readonly subject: AppMessage.FlaggedReport;
85
- readonly writer: AppMessage.RspecReportShape;
86
- };
87
- }, {
88
- readonly flag: "cucumber";
89
- readonly key: "cucumber";
90
- readonly arg: "<report.json>";
91
- readonly description: AppMessage.CucumberFlag;
92
- readonly report: {
93
- readonly reader: "cucumber";
94
- readonly format: "json";
95
- readonly shape: Shape;
96
- readonly subject: AppMessage.FlaggedReport;
97
- readonly writer: AppMessage.CucumberReportShape;
98
- };
99
- }, {
100
- readonly flag: "ci";
101
- readonly key: "ci";
102
- readonly arg: "<ci.yml>";
103
- readonly description: AppMessage.CiFlag;
104
- }, {
105
- readonly flag: "package-json";
106
- readonly key: "packageJson";
107
- readonly arg: "<path>";
108
- readonly description: AppMessage.PackageJsonFlag;
109
- readonly report: {
110
- readonly reader: "package-manifest";
111
- readonly format: "json";
112
- readonly shape: Shape;
113
- readonly subject: AppMessage.FlaggedManifest;
114
- readonly writer: AppMessage.PackageManifestShape;
115
- };
116
- }, {
117
- readonly flag: "ci-steps";
118
- readonly key: "ciSteps";
119
- readonly arg: "<record.json>";
120
- readonly description: AppMessage.CiStepsFlag;
121
- readonly report: {
122
- readonly reader: "ci-step-record";
123
- readonly format: "json";
124
- readonly shape: Shape;
125
- readonly subject: AppMessage.FlaggedRecord;
126
- readonly writer: AppMessage.CiStepRecordShape;
127
- };
128
- }];
129
- export declare const EVIDENCE_INPUTS: readonly EvidenceInput[];
130
- type InputKey = (typeof DECLARED)[number]["key"];
131
- export type InputPaths = Readonly<Partial<Record<InputKey, string>>>;
132
- export declare function inputPathsOf(args: Readonly<Record<string, string>>): InputPaths;
133
- export declare const INPUT_NAMES: readonly RunInputName[];
134
- export declare function runInputsOf(paths: InputPaths): RunInput[];
135
- export {};
136
- //# sourceMappingURL=evidenceInputs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"evidenceInputs.d.ts","sourceRoot":"","sources":["../../src/cli-balance/evidenceInputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAOL,KAAK,KAAK,EACX,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;A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,MAAM,WAAW,EAAE,SAAS,YAAY,EAA+E,CAAC;AAE/H,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,QAAQ,EAAE,CAKzD"}
@@ -1,125 +0,0 @@
1
- import { AppMessage } from "../messages.js";
2
- import { CI_STEP_RECORD, CUCUMBER_REPORT, JUNIT_REPORT, PACKAGE_MANIFEST, RSPEC_REPORT, VITEST_REPORT, } from "../ingest/inputShapes.js";
3
- // The order is the canonical order: the help lists the flags in it, the pre-checks take the inputs in it,
4
- // and the run provenance names them in it.
5
- const DECLARED = [
6
- { flag: "features", key: "features", arg: "<dir>", description: AppMessage.FeaturesFlag },
7
- {
8
- flag: "vitest",
9
- key: "vitest",
10
- arg: "<report.json>",
11
- description: AppMessage.VitestFlag,
12
- report: {
13
- reader: "vitest",
14
- format: "json",
15
- shape: VITEST_REPORT,
16
- subject: AppMessage.FlaggedReport,
17
- writer: AppMessage.VitestReportShape,
18
- },
19
- },
20
- {
21
- flag: "pytest",
22
- key: "pytest",
23
- arg: "<report.xml>",
24
- description: AppMessage.PytestFlag,
25
- report: {
26
- reader: "pytest",
27
- format: "junit-xml",
28
- shape: JUNIT_REPORT,
29
- subject: AppMessage.FlaggedReport,
30
- writer: AppMessage.JunitReportShape,
31
- },
32
- },
33
- {
34
- flag: "jest",
35
- key: "jest",
36
- arg: "<report.json>",
37
- description: AppMessage.JestFlag,
38
- report: {
39
- reader: "jest",
40
- format: "json-naming-its-shape",
41
- shape: VITEST_REPORT,
42
- subject: AppMessage.FlaggedReport,
43
- writer: AppMessage.JestReportShape,
44
- },
45
- },
46
- {
47
- flag: "junit",
48
- key: "junit",
49
- arg: "<report.xml>",
50
- description: AppMessage.JunitFlag,
51
- report: {
52
- reader: "junit",
53
- format: "junit-xml-or-one-suite",
54
- shape: JUNIT_REPORT,
55
- subject: AppMessage.FlaggedReport,
56
- writer: AppMessage.JunitXmlReportShape,
57
- takesADirectory: true,
58
- },
59
- },
60
- {
61
- flag: "rspec",
62
- key: "rspec",
63
- arg: "<report.json>",
64
- description: AppMessage.RspecFlag,
65
- report: {
66
- reader: "rspec",
67
- format: "json-naming-its-shape",
68
- shape: RSPEC_REPORT,
69
- subject: AppMessage.FlaggedReport,
70
- writer: AppMessage.RspecReportShape,
71
- },
72
- },
73
- {
74
- flag: "cucumber",
75
- key: "cucumber",
76
- arg: "<report.json>",
77
- description: AppMessage.CucumberFlag,
78
- report: {
79
- reader: "cucumber",
80
- format: "json",
81
- shape: CUCUMBER_REPORT,
82
- subject: AppMessage.FlaggedReport,
83
- writer: AppMessage.CucumberReportShape,
84
- },
85
- },
86
- { flag: "ci", key: "ci", arg: "<ci.yml>", description: AppMessage.CiFlag },
87
- {
88
- flag: "package-json",
89
- key: "packageJson",
90
- arg: "<path>",
91
- description: AppMessage.PackageJsonFlag,
92
- report: {
93
- reader: "package-manifest",
94
- format: "json",
95
- shape: PACKAGE_MANIFEST,
96
- subject: AppMessage.FlaggedManifest,
97
- writer: AppMessage.PackageManifestShape,
98
- },
99
- },
100
- {
101
- flag: "ci-steps",
102
- key: "ciSteps",
103
- arg: "<record.json>",
104
- description: AppMessage.CiStepsFlag,
105
- report: {
106
- reader: "ci-step-record",
107
- format: "json",
108
- shape: CI_STEP_RECORD,
109
- subject: AppMessage.FlaggedRecord,
110
- writer: AppMessage.CiStepRecordShape,
111
- },
112
- },
113
- ];
114
- export const EVIDENCE_INPUTS = DECLARED;
115
- export function inputPathsOf(args) {
116
- return Object.fromEntries(EVIDENCE_INPUTS.map(({ flag, key }) => [key, args[flag]]));
117
- }
118
- export const INPUT_NAMES = EVIDENCE_INPUTS.map(({ flag, key }) => ({ name: key, flag: `--${flag}` }));
119
- export function runInputsOf(paths) {
120
- return INPUT_NAMES.map((input) => {
121
- const path = paths[input.name];
122
- return path === undefined ? input : { ...input, path };
123
- });
124
- }
125
- //# sourceMappingURL=evidenceInputs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"evidenceInputs.js","sourceRoot":"","sources":["../../src/cli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-controller-core";
2
- export declare function exitCodeOf(verdict: RunVerdict, exitZero: boolean): number;
3
- export declare const reportedExitCodeOf: ExitCodeOf;
4
- //# sourceMappingURL=exitStatus.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exitStatus.d.ts","sourceRoot":"","sources":["../../src/cli-balance/exitStatus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAiBlF,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CAEzE;AAED,eAAO,MAAM,kBAAkB,EAAE,UAAoD,CAAC"}
@@ -1,18 +0,0 @@
1
- const EXIT_CODE = {
2
- balanced: 0,
3
- "out-of-balance": 1,
4
- "scenario-code-errors": 1,
5
- pending: 3,
6
- unsound: 4,
7
- "nothing-to-reconcile": 5,
8
- };
9
- const MOVED_BY_EXIT_ZERO = new Set([
10
- "out-of-balance",
11
- "scenario-code-errors",
12
- "pending",
13
- ]);
14
- export function exitCodeOf(verdict, exitZero) {
15
- return exitZero && MOVED_BY_EXIT_ZERO.has(verdict) ? 0 : EXIT_CODE[verdict];
16
- }
17
- export const reportedExitCodeOf = (verdict) => exitCodeOf(verdict, false);
18
- //# sourceMappingURL=exitStatus.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exitStatus.js","sourceRoot":"","sources":["../../src/cli-balance/exitStatus.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAyC;IACtD,QAAQ,EAAE,CAAC;IACX,gBAAgB,EAAE,CAAC;IACnB,sBAAsB,EAAE,CAAC;IACzB,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,sBAAsB,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,kBAAkB,GAA4B,IAAI,GAAG,CAAa;IACtE,gBAAgB;IAChB,sBAAsB;IACtB,SAAS;CACV,CAAC,CAAC;AAEH,MAAM,UAAU,UAAU,CAAC,OAAmB,EAAE,QAAiB;IAC/D,OAAO,QAAQ,IAAI,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAe,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC"}
@@ -1,11 +0,0 @@
1
- import { type ReadInput } from "../outputLocation.js";
2
- import type { IdentifiedInput } from "./emit/format.js";
3
- export interface InputReader {
4
- exists(path: string): boolean;
5
- featureFiles(dir: string): string[];
6
- workflowFiles(path: string): string[];
7
- }
8
- export declare const NODE_INPUT_READER: InputReader;
9
- export declare function inputsReadBy(args: Record<string, string>, reader: InputReader): ReadInput[];
10
- export declare function identifiedInputs(inputs: readonly ReadInput[]): IdentifiedInput[];
11
- //# sourceMappingURL=inputsRead.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inputsRead.d.ts","sourceRoot":"","sources":["../../src/cli-balance/inputsRead.ts"],"names":[],"mappings":"AAMA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACpC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACvC;AAED,eAAO,MAAM,iBAAiB,EAAE,WAgB/B,CAAC;AAEF,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,CAG3F;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,SAAS,EAAE,GAAG,eAAe,EAAE,CAEhF"}
@@ -1,51 +0,0 @@
1
- import { existsSync } from "node:fs";
2
- import { ciSourcePathsOf } from "../ingest/ciSourcePaths.js";
3
- import { DEFAULT_CI_PATH } from "../ingest/ingestQualityChecks.js";
4
- import { corpusFeatureFiles } from "../ingest/ingestScenarios.js";
5
- import { DEFAULT_FEATURES_DIR } from "../defaultCorpus.js";
6
- import { APP_MESSAGES, AppMessage } from "../messages.js";
7
- import { regularFileIdentity } from "../outputLocation.js";
8
- import { jsonInputsOf } from "./unreadableInputs.js";
9
- export const NODE_INPUT_READER = {
10
- exists: existsSync,
11
- featureFiles: (dir) => {
12
- try {
13
- return corpusFeatureFiles(dir).map(({ path }) => path);
14
- }
15
- catch {
16
- return [];
17
- }
18
- },
19
- workflowFiles: (path) => {
20
- try {
21
- return ciSourcePathsOf(path);
22
- }
23
- catch {
24
- return [];
25
- }
26
- },
27
- };
28
- export function inputsReadBy(args, reader) {
29
- const reports = jsonInputsOf(args, reader.exists).map(({ subject, path }) => ({ subject: lowerFirst(subject), path }));
30
- return [...reports, ...featureInputs(args["features"], reader), ...workflowInputs(args["ci"], reader)];
31
- }
32
- export function identifiedInputs(inputs) {
33
- return inputs.map((input) => ({ ...input, identity: regularFileIdentity(input.path) }));
34
- }
35
- function featureInputs(dir, reader) {
36
- const subject = APP_MESSAGES[dir === undefined ? AppMessage.DefaultCorpusFeatureFile : AppMessage.FlaggedCorpusFeatureFile]();
37
- return reader.featureFiles(dir ?? DEFAULT_FEATURES_DIR).map((path) => ({ subject, path }));
38
- }
39
- function workflowInputs(ci, reader) {
40
- const files = reader.workflowFiles(ci ?? DEFAULT_CI_PATH);
41
- return files.map((path) => ({ subject: workflowSubject(ci, path), path }));
42
- }
43
- function workflowSubject(ci, path) {
44
- if (ci === undefined)
45
- return APP_MESSAGES[AppMessage.DefaultCiWorkflow]();
46
- return APP_MESSAGES[path === ci ? AppMessage.FlaggedCiWorkflow : AppMessage.FlaggedCiFolderWorkflow]();
47
- }
48
- function lowerFirst(text) {
49
- return text.charAt(0).toLowerCase() + text.slice(1);
50
- }
51
- //# sourceMappingURL=inputsRead.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inputsRead.js","sourceRoot":"","sources":["../../src/cli-balance/inputsRead.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAkB,MAAM,sBAAsB,CAAC;AAE3E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAQrD,MAAM,CAAC,MAAM,iBAAiB,GAAgB;IAC5C,MAAM,EAAE,UAAU;IAClB,YAAY,EAAE,CAAC,GAAG,EAAE,EAAE;QACpB,IAAI,CAAC;YACH,OAAO,kBAAkB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;QACzD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;IACD,aAAa,EAAE,CAAC,IAAI,EAAE,EAAE;QACtB,IAAI,CAAC;YACH,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC;CACF,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,IAA4B,EAAE,MAAmB;IAC5E,MAAM,OAAO,GAAG,YAAY,CA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E,IAAI,EAAE,CAAC,CAAC,CAAC;AAC7E,CAAC;AAED,SAAS,eAAe,CAAC,EAAsB,EAAE,IAAY;IAC3D,IAAI,EAAE,KAAK,SAAS;QAAE,OAAO,YAAY,CAAC,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;IAC1E,OAAO,YAAY,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,UAAU,CAAC,uBAAuB,CAAC,EAAE,CAAC;AACzG,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { RunVerdict } from "@3f-consulting/spec-controller-core";
2
- export interface ReRendered {
3
- readonly markdown: string;
4
- readonly verdict: RunVerdict;
5
- }
6
- export declare function reRender(document: unknown, strictGiven: boolean): ReRendered;
7
- export declare function checkReRenderFlags(args: Record<string, string>): string | null;
8
- //# sourceMappingURL=reRender.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reRender.d.ts","sourceRoot":"","sources":["../../src/cli-balance/reRender.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAKnF,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;CAC9B;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,GAAG,UAAU,CAQ5E;AAID,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,GAAG,IAAI,CAK9E"}
@@ -1,23 +0,0 @@
1
- import { renderReport, runVerdict } from "@3f-consulting/spec-controller-core";
2
- import { APP_MESSAGES, AppMessage } from "../messages.js";
3
- import { reportedExitCodeOf } from "./exitStatus.js";
4
- import { INPUT_NAMES } from "./evidenceInputs.js";
5
- export function reRender(document, strictGiven) {
6
- const saved = document;
7
- const strict = saved.runProvenance.strict === true || strictGiven;
8
- const report = { ...saved, runProvenance: { ...saved.runProvenance, strict } };
9
- return {
10
- markdown: renderReport(report, INPUT_NAMES, reportedExitCodeOf),
11
- verdict: runVerdict({ ledger: report.ledger, scenarioCodeErrors: report.scenarioCodeErrors, strict }),
12
- };
13
- }
14
- const READ_BY_A_RE_RENDER = new Set(["render-from-json", "strict", "exit-zero"]);
15
- export function checkReRenderFlags(args) {
16
- if (args["render-from-json"] === undefined)
17
- return null;
18
- const ignored = Object.keys(args).find((key) => !READ_BY_A_RE_RENDER.has(key));
19
- if (ignored === undefined)
20
- return null;
21
- return APP_MESSAGES[AppMessage.ReRenderReadsOnly](`--${ignored}`);
22
- }
23
- //# sourceMappingURL=reRender.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reRender.js","sourceRoot":"","sources":["../../src/cli-balance/reRender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAE/E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOlD,MAAM,UAAU,QAAQ,CAAC,QAAiB,EAAE,WAAoB;IAC9D,MAAM,KAAK,GAAG,QAAuB,CAAC;IACtC,MAAM,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC,MAAM,KAAK,IAAI,IAAI,WAAW,CAAC;IAClE,MAAM,MAAM,GAAgB,EAAE,GAAG,KAAK,EAAE,aAAa,EAAE,EAAE,GAAG,KAAK,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,CAAC;IAC5F,OAAO;QACL,QAAQ,EAAE,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,kBAAkB,CAAC;QAC/D,OAAO,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,EAAE,CAAC;KACtG,CAAC;AACJ,CAAC;AAED,MAAM,mBAAmB,GAAwB,IAAI,GAAG,CAAC,CAAC,kBAAkB,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;AAEtG,MAAM,UAAU,kBAAkB,CAAC,IAA4B;IAC7D,IAAI,IAAI,CAAC,kBAAkB,CAAC,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACxD,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/E,IAAI,OAAO,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACvC,OAAO,YAAY,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC;AACpE,CAAC"}
@@ -1,52 +0,0 @@
1
- import { type CorpusReading, type EvidenceReport, type WorkflowReading } from "../ingest/ingestQualityChecks.js";
2
- import { type InputReadFault, type ReadFault } from "../ingest/inputReading.js";
3
- import { type DocumentReading, type ReportReading } from "../ingest/reportReading.js";
4
- import { type ReRendered } from "./reRender.js";
5
- import { type ReportInput } from "./evidenceInputs.js";
6
- export interface JsonInput {
7
- readonly subject: string;
8
- readonly path: string;
9
- readonly report: ReportInput;
10
- readonly flagged: boolean;
11
- }
12
- export declare function jsonInputsOf(args: Record<string, string>, exists: (path: string) => boolean): JsonInput[];
13
- interface ReadReport extends JsonInput {
14
- readonly reading: ReportReading;
15
- }
16
- export type FaultyReport = ReadReport & {
17
- readonly reading: Exclude<ReportReading, {
18
- kind: "parsed";
19
- }>;
20
- };
21
- export type ReportsReading = {
22
- readonly kind: "read";
23
- readonly files: readonly ReadReport[];
24
- readonly reports: readonly EvidenceReport[];
25
- } | {
26
- readonly kind: "faulty";
27
- readonly files: readonly ReadReport[];
28
- readonly first: FaultyReport;
29
- };
30
- type FaultyReports = Extract<ReportsReading, {
31
- kind: "faulty";
32
- }>;
33
- export declare function readReports(inputs: readonly JsonInput[], read?: (path: string) => string): ReportsReading;
34
- export declare function reportRefusal({ subject, path, report, reading }: FaultyReport): string;
35
- export declare function checkInputShapes(reports: FaultyReports): string;
36
- export declare function checkInputShapes(reports: ReportsReading): string | null;
37
- export declare function corpusDirRefusal(fault: InputReadFault): string;
38
- export declare function checkInputPaths(args: Record<string, string>, corpusReading: ReadFault, workflowReading: WorkflowReading): string;
39
- export declare function checkInputPaths(args: Record<string, string>, corpusReading: CorpusReading, workflowReading: ReadFault): string;
40
- export declare function checkInputPaths(args: Record<string, string>, corpusReading: CorpusReading, workflowReading: WorkflowReading): string | null;
41
- export declare function savedReportRefusal(path: string, reading: Exclude<DocumentReading, {
42
- kind: "parsed";
43
- }>): string;
44
- export declare function checkSavedReconciliation(path: string, saved: unknown): string | null;
45
- export declare function reRenderOrRefusal(path: string, saved: unknown, strict: boolean): ReRendered | string;
46
- type UnparseableWorkflows = Extract<WorkflowReading, {
47
- kind: "unparseable";
48
- }>;
49
- export declare function checkWorkflowsParse(args: Record<string, string>, workflowReading: UnparseableWorkflows): string;
50
- export declare function checkWorkflowsParse(args: Record<string, string>, workflowReading: WorkflowReading): string | null;
51
- export {};
52
- //# sourceMappingURL=unreadableInputs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"unreadableInputs.d.ts","sourceRoot":"","sources":["../../src/cli-balance/unreadableInputs.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACrB,MAAM,kCAAkC,C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