spec-controller 0.1.0-alpha.9 → 0.1.0
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/README.md +18 -11
- package/dist/cli-allocate/cli.d.ts +2 -0
- package/dist/cli-allocate/cli.d.ts.map +1 -0
- package/dist/cli-allocate/cli.js +61 -0
- package/dist/cli-allocate/cli.js.map +1 -0
- package/dist/cli-allocate/readHistory.d.ts +14 -0
- package/dist/cli-allocate/readHistory.d.ts.map +1 -0
- package/dist/cli-allocate/readHistory.js +109 -0
- package/dist/cli-allocate/readHistory.js.map +1 -0
- package/dist/cli-allocate/readParts.d.ts +2 -0
- package/dist/cli-allocate/readParts.d.ts.map +1 -0
- package/dist/cli-allocate/readParts.js +23 -0
- package/dist/cli-allocate/readParts.js.map +1 -0
- package/dist/cli-allocate/readTree.d.ts +5 -0
- package/dist/cli-allocate/readTree.d.ts.map +1 -0
- package/dist/cli-allocate/readTree.js +74 -0
- package/dist/cli-allocate/readTree.js.map +1 -0
- package/dist/cli-allocate/refStore.d.ts +2 -0
- package/dist/cli-allocate/refStore.d.ts.map +1 -0
- package/dist/cli-allocate/refStore.js +35 -0
- package/dist/cli-allocate/refStore.js.map +1 -0
- package/dist/cli-allocate/request.d.ts +9 -0
- package/dist/cli-allocate/request.d.ts.map +1 -0
- package/dist/cli-allocate/request.js +23 -0
- package/dist/cli-allocate/request.js.map +1 -0
- package/dist/cli-allocate/stderr.d.ts +7 -0
- package/dist/cli-allocate/stderr.d.ts.map +1 -0
- package/dist/cli-allocate/stderr.js +32 -0
- package/dist/cli-allocate/stderr.js.map +1 -0
- package/dist/cli-allocate/unreadable.d.ts +13 -0
- package/dist/cli-allocate/unreadable.d.ts.map +1 -0
- package/dist/cli-allocate/unreadable.js +37 -0
- package/dist/cli-allocate/unreadable.js.map +1 -0
- package/dist/cli-args.d.ts +15 -70
- package/dist/cli-args.d.ts.map +1 -1
- package/dist/cli-args.js +167 -85
- package/dist/cli-args.js.map +1 -1
- package/dist/cli-balance/cli.d.ts +1 -82
- package/dist/cli-balance/cli.d.ts.map +1 -1
- package/dist/cli-balance/cli.js +86 -397
- package/dist/cli-balance/cli.js.map +1 -1
- package/dist/cli-balance/emit/format.d.ts +18 -39
- package/dist/cli-balance/emit/format.d.ts.map +1 -1
- package/dist/cli-balance/emit/format.js +32 -63
- package/dist/cli-balance/emit/format.js.map +1 -1
- package/dist/cli-balance/emit/writer.d.ts +2 -34
- package/dist/cli-balance/emit/writer.d.ts.map +1 -1
- package/dist/cli-balance/emit/writer.js +62 -37
- package/dist/cli-balance/emit/writer.js.map +1 -1
- package/dist/cli-balance/exitStatus.d.ts +2 -0
- package/dist/cli-balance/exitStatus.d.ts.map +1 -0
- package/dist/cli-balance/exitStatus.js +5 -0
- package/dist/cli-balance/exitStatus.js.map +1 -0
- package/dist/cli-balance/inputsRead.d.ts +11 -0
- package/dist/cli-balance/inputsRead.d.ts.map +1 -0
- package/dist/cli-balance/inputsRead.js +54 -0
- package/dist/cli-balance/inputsRead.js.map +1 -0
- package/dist/cli-balance/reRender.d.ts +8 -0
- package/dist/cli-balance/reRender.d.ts.map +1 -0
- package/dist/cli-balance/reRender.js +21 -0
- package/dist/cli-balance/reRender.js.map +1 -0
- package/dist/cli-balance/unreadableInputs.d.ts +15 -0
- package/dist/cli-balance/unreadableInputs.d.ts.map +1 -0
- package/dist/cli-balance/unreadableInputs.js +100 -0
- package/dist/cli-balance/unreadableInputs.js.map +1 -0
- package/dist/cli-registry.d.ts +16 -71
- package/dist/cli-registry.d.ts.map +1 -1
- package/dist/cli-registry.js +71 -136
- package/dist/cli-registry.js.map +1 -1
- package/dist/cli.d.ts +0 -21
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -85
- package/dist/cli.js.map +1 -1
- package/dist/deferralTags.d.ts +0 -14
- package/dist/deferralTags.d.ts.map +1 -1
- package/dist/deferralTags.js +0 -14
- package/dist/deferralTags.js.map +1 -1
- package/dist/host.d.ts +10 -41
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +99 -50
- package/dist/host.js.map +1 -1
- package/dist/ingest/ciSourcePaths.d.ts +0 -39
- package/dist/ingest/ciSourcePaths.d.ts.map +1 -1
- package/dist/ingest/ciSourcePaths.js +1 -39
- package/dist/ingest/ciSourcePaths.js.map +1 -1
- package/dist/ingest/gherkinValidation.d.ts +0 -80
- package/dist/ingest/gherkinValidation.d.ts.map +1 -1
- package/dist/ingest/gherkinValidation.js +3 -82
- package/dist/ingest/gherkinValidation.js.map +1 -1
- package/dist/ingest/ingestQualityChecks.d.ts +8 -93
- package/dist/ingest/ingestQualityChecks.d.ts.map +1 -1
- package/dist/ingest/ingestQualityChecks.js +61 -224
- package/dist/ingest/ingestQualityChecks.js.map +1 -1
- package/dist/ingest/ingestScenarios.d.ts +0 -45
- package/dist/ingest/ingestScenarios.d.ts.map +1 -1
- package/dist/ingest/ingestScenarios.js +24 -110
- package/dist/ingest/ingestScenarios.js.map +1 -1
- package/dist/ingest/inputShapes.d.ts +16 -0
- package/dist/ingest/inputShapes.d.ts.map +1 -0
- package/dist/ingest/inputShapes.js +114 -0
- package/dist/ingest/inputShapes.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +93 -0
- package/dist/main.js.map +1 -0
- package/dist/messages.d.ts +223 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +319 -0
- package/dist/messages.js.map +1 -0
- package/dist/outputLocation.d.ts +23 -0
- package/dist/outputLocation.d.ts.map +1 -0
- package/dist/outputLocation.js +139 -0
- package/dist/outputLocation.js.map +1 -0
- package/dist/run-management/keptRun.d.ts +8 -109
- package/dist/run-management/keptRun.d.ts.map +1 -1
- package/dist/run-management/keptRun.js +49 -89
- package/dist/run-management/keptRun.js.map +1 -1
- package/dist/run-management/resolveRunInputs.d.ts +0 -67
- package/dist/run-management/resolveRunInputs.d.ts.map +1 -1
- package/dist/run-management/resolveRunInputs.js +13 -117
- package/dist/run-management/resolveRunInputs.js.map +1 -1
- package/dist/storedRun.d.ts +6 -0
- package/dist/storedRun.d.ts.map +1 -0
- package/dist/storedRun.js +27 -0
- package/dist/storedRun.js.map +1 -0
- package/package.json +2 -2
- package/dist/corpus/cli.d.ts +0 -34
- package/dist/corpus/cli.d.ts.map +0 -1
- package/dist/corpus/cli.js +0 -125
- package/dist/corpus/cli.js.map +0 -1
|
@@ -1,74 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolve a run's git-derived inputs — the target's source SHA and repo root. The
|
|
3
|
-
* IMPURE half of the old run/runContext.ts: both shell out to `git` over the
|
|
4
|
-
* target tree, so they live in the app's run-management layer, apart from the pure
|
|
5
|
-
* provenance projection (packages/core/src/provenance/provenance.ts) they feed. The
|
|
6
|
-
* CLI (cli-balance/cli.ts) calls these once to build the RunContext.
|
|
7
|
-
*
|
|
8
|
-
* Scenarios: @SCN-RPT-001 (the run-provenance slice); the --source-sha override;
|
|
9
|
-
* @SCN-RPT-016 (target-root derivation); @SCN-RPT-026 / @SCN-RPT-029 (the tool's own identity).
|
|
10
|
-
*/
|
|
11
1
|
import { execFileSync } from "node:child_process";
|
|
12
2
|
import { readFileSync } from "node:fs";
|
|
13
3
|
import { dirname, join, sep } from "node:path";
|
|
14
4
|
import { fileURLToPath } from "node:url";
|
|
15
|
-
/**
|
|
16
|
-
* Resolve the target's source SHA (project design §4). An explicit non-empty
|
|
17
|
-
* `sourceSha` wins — the override for non-git / zip / detached-HEAD targets (the
|
|
18
|
-
* --source-sha flag). Otherwise `git -C <targetDir> rev-parse HEAD` (trimmed) as a
|
|
19
|
-
* READ-ONLY pure read. On any throw —
|
|
20
|
-
* a non-git target, git absent, an empty answer — resolve to `null` ("unknown")
|
|
21
|
-
* rather than crashing. `targetDir` = dirname(--features) when given, else cwd.
|
|
22
|
-
*/
|
|
23
5
|
export function resolveSourceSha(opts) {
|
|
24
6
|
if (opts.sourceSha !== undefined && opts.sourceSha.trim() !== "") {
|
|
25
7
|
return opts.sourceSha.trim();
|
|
26
8
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
const out = execFileSync("git", ["-C", dir, "rev-parse", "HEAD"], {
|
|
32
|
-
encoding: "utf8",
|
|
33
|
-
stdio: ["ignore", "pipe", "ignore"],
|
|
34
|
-
});
|
|
35
|
-
const sha = out.trim();
|
|
36
|
-
return sha === "" ? null : sha;
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
9
|
+
const dir = opts.targetDir !== undefined && opts.targetDir.trim() !== ""
|
|
10
|
+
? opts.targetDir
|
|
11
|
+
: undefined;
|
|
12
|
+
return readGit(dir, ["rev-parse", "HEAD"]);
|
|
41
13
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Resolve the TOOL's own identity (3F-1916) — which spec-controller produced this run,
|
|
44
|
-
* distinct from the TARGET's `sourceSha`. Two facts, one call, threaded to both the
|
|
45
|
-
* report provenance (RunContext) and the run.yaml manifest.
|
|
46
|
-
*
|
|
47
|
-
* **TWO TRAPS, AND THIS DOCBLOCK ONLY NAMED THE FIRST FOR ELEVEN WEEKS** (@SCN-RPT-029,
|
|
48
|
-
* 3F-3418). Nothing typechecks a comment, and the sentence below — true, and the whole of
|
|
49
|
-
* what was written here — is what made the second trap read as already-handled.
|
|
50
|
-
*
|
|
51
|
-
* **Trap one, cwd:** at run time the process cwd is the TARGET repo (reconcile runs
|
|
52
|
-
* there), so a bare `git rev-parse HEAD` would re-record the TARGET's SHA. So the SHA is
|
|
53
|
-
* read `git -C <the tool's OWN dir>`, derived from `import.meta.url`, never cwd (3F-1916).
|
|
54
|
-
*
|
|
55
|
-
* **Trap two, which the `-C` guard could not see:** the tool's own dir is ITSELF inside the
|
|
56
|
-
* target. For an installed package that dir is `<consumer>/node_modules/…`, which is inside
|
|
57
|
-
* the consumer's worktree, so `git -C` walks up to the consumer's `.git` and answers with
|
|
58
|
-
* the consumer's HEAD — being `.gitignore`d makes no difference, git does not stop at
|
|
59
|
-
* ignored directories. That is not an absent tool SHA, it is a WRONG one, and nothing on
|
|
60
|
-
* the rendered report distinguishes it from a genuine one. It is also the only case a
|
|
61
|
-
* consumer ever sees: every adopter installs into a git repository. `resolveToolSha`
|
|
62
|
-
* therefore answers a `node_modules` SEGMENT before it asks git at all.
|
|
63
|
-
*
|
|
64
|
-
* `toolSha` is `null` for a tool resolved out of `node_modules`, and otherwise
|
|
65
|
-
* `git -C <toolDir> rev-parse HEAD` (trimmed) or `null` on any throw — no `.git` above the
|
|
66
|
-
* tool, git absent, or an empty answer — mirroring `resolveSourceSha`'s fail-soft.
|
|
67
|
-
* `toolVersion` is read from the tool's own `package.json` (walked up from `toolDir`), or
|
|
68
|
-
* `"unknown"` when none is found — so a run stays attributable by version even when no SHA
|
|
69
|
-
* can be read. `toolDir` / `packageJsonPath` are injectable for the `@unit` teeth
|
|
70
|
-
* (@SCN-RPT-026, @SCN-RPT-029).
|
|
71
|
-
*/
|
|
72
14
|
export function resolveToolIdentity(opts = {}) {
|
|
73
15
|
const toolDir = opts.toolDir !== undefined && opts.toolDir.trim() !== ""
|
|
74
16
|
? opts.toolDir
|
|
@@ -78,44 +20,11 @@ export function resolveToolIdentity(opts = {}) {
|
|
|
78
20
|
toolVersion: resolveToolVersion(opts.packageJsonPath ?? findPackageJson(toolDir)),
|
|
79
21
|
};
|
|
80
22
|
}
|
|
81
|
-
/**
|
|
82
|
-
* The tool's own git HEAD, read `-C <toolDir>` (never cwd), null on any throw — and null
|
|
83
|
-
* without asking at all for a tool resolved out of `node_modules` (@SCN-RPT-029).
|
|
84
|
-
*
|
|
85
|
-
* A SEGMENT, NEVER A SUBSTRING. A directory honestly named `my_node_modules_backup` is not an
|
|
86
|
-
* install, and a checkout living under a directory literally named `node_modules` reporting null is
|
|
87
|
-
* the pathological trade every tool making this distinction takes.
|
|
88
|
-
*
|
|
89
|
-
* `sep`, NOT A REGEX OVER BOTH SEPARATORS. `[/\\]` would carry a branch no arm on this platform can
|
|
90
|
-
* reach, so a mutant deleting its second half would survive the mutation gate while nothing was
|
|
91
|
-
* worse. `sep` is what `fileURLToPath` produces on each platform, which is the only thing `toolDir`
|
|
92
|
-
* is ever built from.
|
|
93
|
-
*
|
|
94
|
-
* IT ANSWERS BEFORE THE `try`, NOT INSIDE IT. Returning null from a thrown git read and returning
|
|
95
|
-
* null because the tool is an install are the same recorded answer and not the same fact, and only
|
|
96
|
-
* the first of them is allowed to depend on git being present.
|
|
97
|
-
*
|
|
98
|
-
* WHAT IT DOES NOT CLAIM. Under `--preserve-symlinks` Node reports the symlink path rather than the
|
|
99
|
-
* realpath, so a linked development checkout would carry a `node_modules` segment and report null.
|
|
100
|
-
* That is a strictly safer wrong answer than today's, nothing in this repository passes the flag,
|
|
101
|
-
* and no arm covers it — named rather than guarded.
|
|
102
|
-
*/
|
|
103
23
|
function resolveToolSha(toolDir) {
|
|
104
24
|
if (toolDir.split(sep).includes("node_modules"))
|
|
105
25
|
return null;
|
|
106
|
-
|
|
107
|
-
const out = execFileSync("git", ["-C", toolDir, "rev-parse", "HEAD"], {
|
|
108
|
-
encoding: "utf8",
|
|
109
|
-
stdio: ["ignore", "pipe", "ignore"],
|
|
110
|
-
});
|
|
111
|
-
const sha = out.trim();
|
|
112
|
-
return sha === "" ? null : sha;
|
|
113
|
-
}
|
|
114
|
-
catch {
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
26
|
+
return readGit(toolDir, ["rev-parse", "HEAD"]);
|
|
117
27
|
}
|
|
118
|
-
/** Read the `version` from a package.json, or "unknown" when the path is null / unreadable / versionless. */
|
|
119
28
|
function resolveToolVersion(packageJsonPath) {
|
|
120
29
|
if (packageJsonPath === null)
|
|
121
30
|
return "unknown";
|
|
@@ -127,7 +36,6 @@ function resolveToolVersion(packageJsonPath) {
|
|
|
127
36
|
return "unknown";
|
|
128
37
|
}
|
|
129
38
|
}
|
|
130
|
-
/** Walk up from a dir to the nearest package.json, or null when the filesystem root is reached. */
|
|
131
39
|
function findPackageJson(fromDir) {
|
|
132
40
|
let dir = fromDir;
|
|
133
41
|
for (;;) {
|
|
@@ -144,37 +52,25 @@ function findPackageJson(fromDir) {
|
|
|
144
52
|
}
|
|
145
53
|
}
|
|
146
54
|
}
|
|
147
|
-
/**
|
|
148
|
-
* Resolve the TARGET repo root — the root the recorded input paths (`presentInputs`)
|
|
149
|
-
* and the evidence-observation locators (`countRuntimeEvidenceObservationKinds`) are both made
|
|
150
|
-
* portable against (@SCN-RPT-016). The bug it fixes: the prior CLI relativized
|
|
151
|
-
* against `process.cwd()` — the TOOL's own repo — so a cross-repo reconcile
|
|
152
|
-
* (cwd ≠ target) kept the target's absolute paths (they aren't under cwd → the
|
|
153
|
-
* "absolute-not-under-root" branch of `relativizeToRoot` → leaked verbatim).
|
|
154
|
-
*
|
|
155
|
-
* The rule (mirrors `resolveSourceSha`'s targetDir derivation): the root is derived from
|
|
156
|
-
* the TARGET, never the run cwd — the git top-level of `dirname(--features)` when the
|
|
157
|
-
* target is a git repo (the robust case: `--features` may sit in a nested dir), else
|
|
158
|
-
* `dirname(--features)` itself (a non-git target — a zip / extracted tree), else
|
|
159
|
-
* `process.cwd()` for a self-reconcile with no `--features` (the legacy cwd = target
|
|
160
|
-
* assumption, preserved as the fallback). A READ-ONLY `git -C … rev-parse --show-toplevel`
|
|
161
|
-
* (read-only-target-safe); any throw falls back to `dirname(--features)`.
|
|
162
|
-
*/
|
|
163
55
|
export function resolveTargetRoot(opts) {
|
|
164
56
|
if (opts.features === undefined || opts.features.trim() === "") {
|
|
165
57
|
return process.cwd();
|
|
166
58
|
}
|
|
167
59
|
const targetDir = dirname(opts.features);
|
|
60
|
+
return readGit(targetDir, ["rev-parse", "--show-toplevel"]) ?? targetDir;
|
|
61
|
+
}
|
|
62
|
+
// An undefined dir means the working directory. It is read inside the try because
|
|
63
|
+
// process.cwd() throws once that directory is removed, which must read as no output.
|
|
64
|
+
function readGit(dir, args) {
|
|
168
65
|
try {
|
|
169
|
-
const out = execFileSync("git", ["-C",
|
|
66
|
+
const out = execFileSync("git", ["-C", dir ?? process.cwd(), ...args], {
|
|
170
67
|
encoding: "utf8",
|
|
171
68
|
stdio: ["ignore", "pipe", "ignore"],
|
|
172
69
|
});
|
|
173
|
-
|
|
174
|
-
return root === "" ? targetDir : root;
|
|
70
|
+
return out.trim() || null;
|
|
175
71
|
}
|
|
176
72
|
catch {
|
|
177
|
-
return
|
|
73
|
+
return null;
|
|
178
74
|
}
|
|
179
75
|
}
|
|
180
76
|
//# sourceMappingURL=resolveRunInputs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveRunInputs.js","sourceRoot":"","sources":["../../src/run-management/resolveRunInputs.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"resolveRunInputs.js","sourceRoot":"","sources":["../../src/run-management/resolveRunInputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,gBAAgB,CAAC,IAAgD;IAC/E,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACjE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IAC/B,CAAC;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,KAAK,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE;QACtE,CAAC,CAAC,IAAI,CAAC,SAAS;QAChB,CAAC,CAAC,SAAS,CAAC;IACd,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,WA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type CommandSpec } from "./cli-registry.js";
|
|
2
|
+
import type { HostInvocation } from "./host.js";
|
|
3
|
+
export declare function dispatchesUnstored(inv: HostInvocation): boolean;
|
|
4
|
+
export declare function storedReRenderRefusal(inv: HostInvocation): string | undefined;
|
|
5
|
+
export declare function unstoredRunIdRefusal(inv: HostInvocation, commands?: readonly CommandSpec[]): string | undefined;
|
|
6
|
+
//# sourceMappingURL=storedRun.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storedRun.d.ts","sourceRoot":"","sources":["../src/storedRun.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAE/D;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAS7E;AAED,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,cAAc,EACnB,QAAQ,GAAE,SAAS,WAAW,EAAyB,GACtD,MAAM,GAAG,SAAS,CAQpB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { asksForHelp } from "./cli-args.js";
|
|
2
|
+
import { cliRegistry } from "./cli-registry.js";
|
|
3
|
+
import { APP_MESSAGES, AppMessage } from "./messages.js";
|
|
4
|
+
export function dispatchesUnstored(inv) {
|
|
5
|
+
return inv.store === undefined || asksForHelp(inv.commandArgs);
|
|
6
|
+
}
|
|
7
|
+
export function storedReRenderRefusal(inv) {
|
|
8
|
+
if (inv.command !== "balance" || asksForHelp(inv.commandArgs))
|
|
9
|
+
return undefined;
|
|
10
|
+
if (!inv.commandArgs.includes("--render-from-json"))
|
|
11
|
+
return undefined;
|
|
12
|
+
const given = [inv.store === undefined ? [] : ["--store"], inv.runId === undefined ? [] : ["--run-id"]].flat();
|
|
13
|
+
if (given.length === 0)
|
|
14
|
+
return undefined;
|
|
15
|
+
return (`${APP_MESSAGES[AppMessage.HostUsageError](APP_MESSAGES[AppMessage.ReRenderNotStored](given.join(", ")))}\n` +
|
|
16
|
+
APP_MESSAGES[given.length === 1 ? AppMessage.ReRenderWithoutIt : AppMessage.ReRenderWithoutThem]());
|
|
17
|
+
}
|
|
18
|
+
export function unstoredRunIdRefusal(inv, commands = cliRegistry.commands) {
|
|
19
|
+
if (inv.runId === undefined || inv.store !== undefined || asksForHelp(inv.commandArgs))
|
|
20
|
+
return undefined;
|
|
21
|
+
const entry = commands.find((command) => command.name === inv.command);
|
|
22
|
+
if (entry === undefined || entry.acceptsHostModifiers === false)
|
|
23
|
+
return undefined;
|
|
24
|
+
return (`${APP_MESSAGES[AppMessage.HostUsageError](APP_MESSAGES[AppMessage.RunIdWithoutStore](inv.runId))}\n` +
|
|
25
|
+
APP_MESSAGES[AppMessage.KeepRunUnderName](entry.name));
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=storedRun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storedRun.js","sourceRoot":"","sources":["../src/storedRun.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAoB,MAAM,mBAAmB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEzD,MAAM,UAAU,kBAAkB,CAAC,GAAmB;IACpD,OAAO,GAAG,CAAC,KAAK,KAAK,SAAS,IAAI,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,GAAmB;IACvD,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS,IAAI,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC;QAAE,OAAO,SAAS,CAAC;IAChF,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ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,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI;QACrG,YAAY,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CACtD,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-controller",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
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
|
"@cucumber/gherkin": "^41.0.0",
|
|
26
26
|
"@cucumber/messages": "^34.0.1",
|
|
27
27
|
"yaml": "^2.9.0",
|
|
28
|
-
"@3f-consulting/spec-controller-core": "0.1.0
|
|
28
|
+
"@3f-consulting/spec-controller-core": "0.1.0"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
package/dist/corpus/cli.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `tags` command — `spec-controller tags`, the `@SCN` scheme policing itself over a
|
|
3
|
-
* target's Gherkin corpus.
|
|
4
|
-
*
|
|
5
|
-
* THIS EDGE OWNS ONLY THE READS. The rule is `corpusFaults`, in core, reached through the ROOT
|
|
6
|
-
* barrel and nothing else: `./internal` is dropped by `publishConfig.exports` at pack time, and
|
|
7
|
-
* this module travels in the tarball. That is not a style preference — an installed
|
|
8
|
-
* `balance --help` once threw ERR_PACKAGE_PATH_NOT_EXPORTED behind thirteen green gates because a
|
|
9
|
-
* published module reached that subpath (3F-3086). So what happens here is: discover the corpus,
|
|
10
|
-
* read the manifest, build the mutation-record reader, hand over the bytes.
|
|
11
|
-
*
|
|
12
|
-
* ITS OWN COMMAND RATHER THAN A `balance` FLAG. `balance`'s exit code IS its verdict — 0
|
|
13
|
-
* balanced, 1 out of balance, 3 pending-under-strict, 4 unsound, 5 nothing to reconcile — and a
|
|
14
|
-
* corpus FAULT is not a reconciliation verdict. A flag would either overload one of those codes or
|
|
15
|
-
* add a further meaning to a status a consumer's CI branches on. A second command costs one registry entry and gives
|
|
16
|
-
* the fault its own ladder:
|
|
17
|
-
*
|
|
18
|
-
* 0 — the corpus obeys the scheme.
|
|
19
|
-
* 1 — findings; the corpus was read and it breaks a rule.
|
|
20
|
-
* 2 — the corpus (or the manifest) could not be READ at all. Not a verdict, because nothing was
|
|
21
|
-
* concluded. Sibling to @SCN-CLI-014/015/016 on `balance`, and the same argument: an input
|
|
22
|
-
* the tool cannot read is a usage error, never a verdict.
|
|
23
|
-
*
|
|
24
|
-
* Usage:
|
|
25
|
-
* spec-controller tags [--features <dir>] [--package-json <path>]
|
|
26
|
-
*/
|
|
27
|
-
/**
|
|
28
|
-
* Police a target's corpus against the `@SCN` scheme's own rules.
|
|
29
|
-
*
|
|
30
|
-
* `process.exitCode` RATHER THAN `process.exit`, so whatever has been written is flushed intact
|
|
31
|
-
* rather than truncated mid-write — the convention `balance`'s own gate settled on.
|
|
32
|
-
*/
|
|
33
|
-
export declare function runTags(argv: string[]): void;
|
|
34
|
-
//# sourceMappingURL=cli.d.ts.map
|
package/dist/corpus/cli.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/corpus/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AA8DH;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAiD5C"}
|
package/dist/corpus/cli.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `tags` command — `spec-controller tags`, the `@SCN` scheme policing itself over a
|
|
3
|
-
* target's Gherkin corpus.
|
|
4
|
-
*
|
|
5
|
-
* THIS EDGE OWNS ONLY THE READS. The rule is `corpusFaults`, in core, reached through the ROOT
|
|
6
|
-
* barrel and nothing else: `./internal` is dropped by `publishConfig.exports` at pack time, and
|
|
7
|
-
* this module travels in the tarball. That is not a style preference — an installed
|
|
8
|
-
* `balance --help` once threw ERR_PACKAGE_PATH_NOT_EXPORTED behind thirteen green gates because a
|
|
9
|
-
* published module reached that subpath (3F-3086). So what happens here is: discover the corpus,
|
|
10
|
-
* read the manifest, build the mutation-record reader, hand over the bytes.
|
|
11
|
-
*
|
|
12
|
-
* ITS OWN COMMAND RATHER THAN A `balance` FLAG. `balance`'s exit code IS its verdict — 0
|
|
13
|
-
* balanced, 1 out of balance, 3 pending-under-strict, 4 unsound, 5 nothing to reconcile — and a
|
|
14
|
-
* corpus FAULT is not a reconciliation verdict. A flag would either overload one of those codes or
|
|
15
|
-
* add a further meaning to a status a consumer's CI branches on. A second command costs one registry entry and gives
|
|
16
|
-
* the fault its own ladder:
|
|
17
|
-
*
|
|
18
|
-
* 0 — the corpus obeys the scheme.
|
|
19
|
-
* 1 — findings; the corpus was read and it breaks a rule.
|
|
20
|
-
* 2 — the corpus (or the manifest) could not be READ at all. Not a verdict, because nothing was
|
|
21
|
-
* concluded. Sibling to @SCN-CLI-014/015/016 on `balance`, and the same argument: an input
|
|
22
|
-
* the tool cannot read is a usage error, never a verdict.
|
|
23
|
-
*
|
|
24
|
-
* Usage:
|
|
25
|
-
* spec-controller tags [--features <dir>] [--package-json <path>]
|
|
26
|
-
*/
|
|
27
|
-
import { existsSync, readFileSync } from "node:fs";
|
|
28
|
-
import { corpusFaults } from "@3f-consulting/spec-controller-core";
|
|
29
|
-
import { cliRegistry, renderCommandHelp } from "../cli-registry.js";
|
|
30
|
-
import { checkUnknownFlags, parseArgs } from "../cli-args.js";
|
|
31
|
-
import { DEFAULT_DEFERRAL_TAGS } from "../deferralTags.js";
|
|
32
|
-
import { UnreadableFeatureCorpusError } from "../ingest/gherkinValidation.js";
|
|
33
|
-
import { discoverFeatures } from "../ingest/ingestScenarios.js";
|
|
34
|
-
import { resolveToolIdentity } from "../run-management/resolveRunInputs.js";
|
|
35
|
-
/**
|
|
36
|
-
* Read everything the rule takes, or say why it could not be read.
|
|
37
|
-
*
|
|
38
|
-
* ONE PLACE, ONE STATUS, because it is one Rule. A corpus the Gherkin parser rejects, a features
|
|
39
|
-
* directory that is not there, and a manifest that is not JSON are three spellings of "the tool
|
|
40
|
-
* could not read its input" — and every one of them, left to escape, lands on Node's default exit
|
|
41
|
-
* 1, which is this command's code for FINDINGS. A crashed invocation would then be
|
|
42
|
-
* indistinguishable by status from a corpus that genuinely breaks a rule, which is exactly the
|
|
43
|
-
* collision 3F-1742 closed on `balance`.
|
|
44
|
-
*
|
|
45
|
-
* THE PARSE REFUSAL IS INHERITED, NOT RESTATED (@SCN-GPG-001). `discoverFeatures` refuses a corpus
|
|
46
|
-
* cucumber could not run rather than returning one, so this command gets that refusal by going
|
|
47
|
-
* through the shared discovery — the same way `balance` does — and what is left here is turning
|
|
48
|
-
* it into this command's status. Its message carries the parser's own words verbatim.
|
|
49
|
-
*
|
|
50
|
-
* THE SOURCES ARE READ HERE because the rule is pure and takes bytes. `DiscoveredFeature` carries
|
|
51
|
-
* the header code and the scenario ids but not the file's text, and the grammar rules that follow
|
|
52
|
-
* this one need the text to walk the tags.
|
|
53
|
-
*/
|
|
54
|
-
function readCorpusInputs(featuresDir, manifestPath) {
|
|
55
|
-
try {
|
|
56
|
-
const discovered = featuresDir === undefined ? discoverFeatures() : discoverFeatures(featuresDir);
|
|
57
|
-
return {
|
|
58
|
-
ok: true,
|
|
59
|
-
features: discovered.map((f) => ({
|
|
60
|
-
slug: f.slug,
|
|
61
|
-
featureCode: f.featureCode,
|
|
62
|
-
source: readFileSync(f.path, "utf8"),
|
|
63
|
-
})),
|
|
64
|
-
packageJson: existsSync(manifestPath)
|
|
65
|
-
? JSON.parse(readFileSync(manifestPath, "utf8"))
|
|
66
|
-
: {},
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
catch (err) {
|
|
70
|
-
if (err instanceof UnreadableFeatureCorpusError)
|
|
71
|
-
return { ok: false, error: err.message };
|
|
72
|
-
const failure = err instanceof Error ? err.message : String(err);
|
|
73
|
-
return { ok: false, error: `The corpus could not be read: ${failure}` };
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Police a target's corpus against the `@SCN` scheme's own rules.
|
|
78
|
-
*
|
|
79
|
-
* `process.exitCode` RATHER THAN `process.exit`, so whatever has been written is flushed intact
|
|
80
|
-
* rather than truncated mid-write — the convention `balance`'s own gate settled on.
|
|
81
|
-
*/
|
|
82
|
-
export function runTags(argv) {
|
|
83
|
-
// Answer `--help`/`-h` from the registry BEFORE any parse, so it never falls through as a stray
|
|
84
|
-
// flag while the command runs anyway. The registry is the single source, so a flag that exists
|
|
85
|
-
// is a flag that appears in help — there is no hand-kept list here to drift.
|
|
86
|
-
if (argv.includes("--help") || argv.includes("-h")) {
|
|
87
|
-
process.stdout.write(renderCommandHelp(cliRegistry, "tags") + "\n");
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
const args = parseArgs(argv);
|
|
91
|
-
// Registry-bounded parse (@SCN-CLI-009's rule, applied to this command's own scope): `tags`
|
|
92
|
-
// accepts ONLY the flags its registry entry lists. By construction, not by assertion — the
|
|
93
|
-
// helper is the one `balance` uses, given this command's name.
|
|
94
|
-
const unknownFlagError = checkUnknownFlags(args, cliRegistry, "tags", resolveToolIdentity().toolVersion);
|
|
95
|
-
if (unknownFlagError) {
|
|
96
|
-
process.stderr.write(unknownFlagError + "\n");
|
|
97
|
-
process.exitCode = 2;
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
// `--package-json` defaults to the manifest at the cwd, matching `balance`'s default: the
|
|
101
|
-
// target is the tree you are standing in unless you say otherwise.
|
|
102
|
-
const inputs = readCorpusInputs(args["features"], args["package-json"] ?? "package.json");
|
|
103
|
-
if (!inputs.ok) {
|
|
104
|
-
process.stderr.write(inputs.error + "\n");
|
|
105
|
-
process.exitCode = 2;
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
const faults = corpusFaults({
|
|
109
|
-
features: inputs.features,
|
|
110
|
-
packageJson: inputs.packageJson,
|
|
111
|
-
// The STARTER deferral set — the application layer's own policy, which a target's config may
|
|
112
|
-
// only extend. Single-sourced here for the reason the reconcile composition takes it as a
|
|
113
|
-
// parameter: which words the community recognises is the product's answer, not the engine's.
|
|
114
|
-
deferralTags: DEFAULT_DEFERRAL_TAGS,
|
|
115
|
-
});
|
|
116
|
-
if (faults.length === 0) {
|
|
117
|
-
process.stdout.write("tags: OK — every feature code names one feature file, and every tag on the corpus obeys the @SCN scheme's own rules.\n");
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
process.stderr.write(`tags: FAILED — ${faults.length} finding(s):\n`);
|
|
121
|
-
for (const fault of faults)
|
|
122
|
-
process.stderr.write(` ${fault.message}\n`);
|
|
123
|
-
process.exitCode = 1;
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=cli.js.map
|
package/dist/corpus/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/corpus/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,gBAAgB,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