plumbbob 0.8.13 → 0.8.17
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/.claude-plugin/plugin.json +1 -1
- package/dist/lib/agents.js +1 -1
- package/dist/lib/check.js +9 -6
- package/dist/lib/intent.js +20 -0
- package/dist/lib/orient.js +4 -3
- package/dist/verbs/checkpoint.js +30 -11
- package/dist/verbs/finish.js +24 -8
- package/node_modules/checkride/CHANGELOG.md +234 -0
- package/node_modules/checkride/README.md +134 -31
- package/node_modules/checkride/dist/adapters.d.ts +50 -1
- package/node_modules/checkride/dist/adapters.d.ts.map +1 -1
- package/node_modules/checkride/dist/adapters.js +123 -7
- package/node_modules/checkride/dist/adapters.js.map +1 -1
- package/node_modules/checkride/dist/agent-setup/hook.d.ts.map +1 -1
- package/node_modules/checkride/dist/agent-setup/hook.js +15 -1
- package/node_modules/checkride/dist/agent-setup/hook.js.map +1 -1
- package/node_modules/checkride/dist/agent-setup/index.d.ts +0 -1
- package/node_modules/checkride/dist/agent-setup/index.d.ts.map +1 -1
- package/node_modules/checkride/dist/agent-setup/index.js.map +1 -1
- package/node_modules/checkride/dist/baseline/fallow.d.ts +64 -0
- package/node_modules/checkride/dist/baseline/fallow.d.ts.map +1 -0
- package/node_modules/checkride/dist/baseline/fallow.js +256 -0
- package/node_modules/checkride/dist/baseline/fallow.js.map +1 -0
- package/node_modules/checkride/dist/baseline/fingerprint.d.ts +4 -6
- package/node_modules/checkride/dist/baseline/fingerprint.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/fingerprint.js +9 -4
- package/node_modules/checkride/dist/baseline/fingerprint.js.map +1 -1
- package/node_modules/checkride/dist/baseline/index.d.ts +4 -5
- package/node_modules/checkride/dist/baseline/index.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/index.js +2 -2
- package/node_modules/checkride/dist/baseline/index.js.map +1 -1
- package/node_modules/checkride/dist/{baseline/command.d.ts → baseline-command.d.ts} +11 -9
- package/node_modules/checkride/dist/baseline-command.d.ts.map +1 -0
- package/node_modules/checkride/dist/{baseline/command.js → baseline-command.js} +9 -7
- package/node_modules/checkride/dist/baseline-command.js.map +1 -0
- package/node_modules/checkride/dist/cli.d.ts.map +1 -1
- package/node_modules/checkride/dist/cli.js +95 -8
- package/node_modules/checkride/dist/cli.js.map +1 -1
- package/node_modules/checkride/dist/config.d.ts +37 -12
- package/node_modules/checkride/dist/config.d.ts.map +1 -1
- package/node_modules/checkride/dist/config.js +268 -60
- package/node_modules/checkride/dist/config.js.map +1 -1
- package/node_modules/checkride/dist/digest/digest.d.ts +0 -6
- package/node_modules/checkride/dist/digest/digest.d.ts.map +1 -1
- package/node_modules/checkride/dist/digest/digest.js +3 -3
- package/node_modules/checkride/dist/digest/digest.js.map +1 -1
- package/node_modules/checkride/dist/digest/index.d.ts +1 -2
- package/node_modules/checkride/dist/digest/index.d.ts.map +1 -1
- package/node_modules/checkride/dist/digest/index.js +1 -1
- package/node_modules/checkride/dist/digest/index.js.map +1 -1
- package/node_modules/checkride/dist/doctor.d.ts +14 -1
- package/node_modules/checkride/dist/doctor.d.ts.map +1 -1
- package/node_modules/checkride/dist/doctor.js +124 -55
- package/node_modules/checkride/dist/doctor.js.map +1 -1
- package/node_modules/checkride/dist/init.d.ts +6 -0
- package/node_modules/checkride/dist/init.d.ts.map +1 -1
- package/node_modules/checkride/dist/init.js +347 -121
- package/node_modules/checkride/dist/init.js.map +1 -1
- package/node_modules/checkride/dist/links.d.ts.map +1 -1
- package/node_modules/checkride/dist/links.js +8 -9
- package/node_modules/checkride/dist/links.js.map +1 -1
- package/node_modules/checkride/dist/orchestrator.d.ts +56 -1
- package/node_modules/checkride/dist/orchestrator.d.ts.map +1 -1
- package/node_modules/checkride/dist/orchestrator.js +506 -138
- package/node_modules/checkride/dist/orchestrator.js.map +1 -1
- package/node_modules/checkride/dist/pack.d.ts +76 -0
- package/node_modules/checkride/dist/pack.d.ts.map +1 -0
- package/node_modules/checkride/dist/pack.js +217 -0
- package/node_modules/checkride/dist/pack.js.map +1 -0
- package/node_modules/checkride/dist/pm/translate.d.ts +18 -10
- package/node_modules/checkride/dist/pm/translate.d.ts.map +1 -1
- package/node_modules/checkride/dist/pm/translate.js +27 -13
- package/node_modules/checkride/dist/pm/translate.js.map +1 -1
- package/node_modules/checkride/dist/smoke.d.ts +86 -0
- package/node_modules/checkride/dist/smoke.d.ts.map +1 -0
- package/node_modules/checkride/dist/smoke.js +346 -0
- package/node_modules/checkride/dist/smoke.js.map +1 -0
- package/node_modules/checkride/dist/snippets.d.ts +215 -0
- package/node_modules/checkride/dist/snippets.d.ts.map +1 -0
- package/node_modules/checkride/dist/snippets.js +360 -0
- package/node_modules/checkride/dist/snippets.js.map +1 -0
- package/node_modules/checkride/package.json +4 -2
- package/node_modules/checkride/schema/checkride.config.schema.json +11 -6
- package/package.json +3 -2
- package/skills/pb-build/SKILL.md +7 -0
- package/skills/pb-park/SKILL.md +3 -2
- package/skills/pb-plan/SKILL.md +30 -9
- package/skills/pb-refine/SKILL.md +21 -6
- package/skills/pb-step/SKILL.md +10 -5
- package/skills/pb-verify/SKILL.md +12 -1
- package/templates/intent.md +55 -11
- package/node_modules/checkride/dist/baseline/command.d.ts.map +0 -1
- package/node_modules/checkride/dist/baseline/command.js.map +0 -1
|
@@ -69,6 +69,20 @@ async function readIfExists(path) {
|
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Parse an existing settings file, naming the file on malformed JSON so a
|
|
74
|
+
* consumer sees `invalid .claude/settings.json: <reason>` instead of a bare
|
|
75
|
+
* `SyntaxError` stack (mirrors `invalidConfig` in `config.ts`).
|
|
76
|
+
*/
|
|
77
|
+
function parseSettings(raw) {
|
|
78
|
+
try {
|
|
79
|
+
return JSON.parse(raw);
|
|
80
|
+
}
|
|
81
|
+
catch (err) {
|
|
82
|
+
const reason = err instanceof Error ? err.message : String(err);
|
|
83
|
+
throw new Error(`invalid ${CLAUDE_SETTINGS_FILE}: ${reason}`, { cause: err });
|
|
84
|
+
}
|
|
85
|
+
}
|
|
72
86
|
/**
|
|
73
87
|
* Write or refresh the Stop hook in `cwd/.claude/settings.json` for the detected
|
|
74
88
|
* (or provided) package manager, preserving any other settings. Returns whether
|
|
@@ -79,7 +93,7 @@ export async function writeStopHook(cwd, opts = {}) {
|
|
|
79
93
|
const path = join(cwd, CLAUDE_SETTINGS_FILE);
|
|
80
94
|
const pm = opts.pm ?? detectPackageManager({ cwd });
|
|
81
95
|
const raw = await readIfExists(path);
|
|
82
|
-
const settings = raw ?
|
|
96
|
+
const settings = raw ? parseSettings(raw) : {};
|
|
83
97
|
const next = applyStopHook(settings, stopHookCommand(pm));
|
|
84
98
|
const nextRaw = `${JSON.stringify(next, null, 2)}\n`;
|
|
85
99
|
const changed = raw !== nextRaw;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../src/agent-setup/hook.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,oBAAoB,EAAuB,MAAM,gBAAgB,CAAC;AAE3E,kFAAkF;AAClF,MAAM,CAAC,MAAM,oBAAoB,GAAG,uBAAuB,CAAC;AAE5D;;;;GAIG;AACH,MAAM,aAAa,GAAG,4BAA4B,CAAC;AASnD,sFAAsF;AACtF,SAAS,eAAe,CAAC,IAAiB;IACxC,OAAO,IAAI,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;AAC7G,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,EAAkB;I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AI,CAAC,CAAC;IACrC,MAAM,QAAQ,GAAmB,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/D,MAAM,IAAI,GAAG,aAAa,CAAC,QAAQ,EAAE,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC;IAC1D,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;IACrD,MAAM,OAAO,GAAG,GAAG,KAAK,OAAO,CAAC;IAChC,IAAI,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;QAC5B,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAChD,MAAM,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAC;AACjD,CAAC"}
|
|
@@ -3,6 +3,5 @@
|
|
|
3
3
|
* module's only public surface (C2): siblings import from `../agent-setup`,
|
|
4
4
|
* never from `./hook.js` directly.
|
|
5
5
|
*/
|
|
6
|
-
export type { StopHookResult } from './hook.js';
|
|
7
6
|
export { applyStopHook, CLAUDE_SETTINGS_FILE, stopHookCommand, writeStopHook } from './hook.js';
|
|
8
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent-setup/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent-setup/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent-setup/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agent-setup/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fallow (v7) report parsing, gating, and fingerprinting.
|
|
3
|
+
*
|
|
4
|
+
* Fallow fills three slots — `dead` (dead-code), `dupes` (duplication), and
|
|
5
|
+
* `health` (complexity) — and checkride owns the pass/fail *verdict* for all
|
|
6
|
+
* three by parsing fallow's JSON, rather than trusting its process exit code.
|
|
7
|
+
* That is deliberate: fallow 3.5.0's exit code does NOT reliably gate. Verified
|
|
8
|
+
* against fallow 3.5.0:
|
|
9
|
+
* - `fallow --format json --fail-on-issues` (combined) exits 0 with issues.
|
|
10
|
+
* - `fallow dupes --format json` exits 0 no matter how much duplication (its
|
|
11
|
+
* `--threshold` defaults to `0` = "no limit").
|
|
12
|
+
* - only `fallow dead-code`/`health` with `--fail-on-issues` exit 1 on findings.
|
|
13
|
+
* Keying pass/fail off the exit code (as the orchestrator does for every other
|
|
14
|
+
* adapter) therefore let a green ✔ hide real findings. checkride reads the
|
|
15
|
+
* authoritative issue count out of the JSON instead, so every fallow slot gates
|
|
16
|
+
* uniformly — and an *unrecognized* schema fails loudly rather than passing
|
|
17
|
+
* silently (the count can't be trusted, so the slot can't be green).
|
|
18
|
+
*
|
|
19
|
+
* The JSON is fallow's `schema_version: 7` shape (fallow >= 3.5; fallow 2.x was
|
|
20
|
+
* schema 4 with a different layout and is no longer supported). Each analysis
|
|
21
|
+
* kind has its own layout, so parsing dispatches on the top-level `kind`.
|
|
22
|
+
*/
|
|
23
|
+
import type { Fingerprint } from './fingerprint.js';
|
|
24
|
+
/**
|
|
25
|
+
* Fallow's fingerprint extractor (baseline part 1), for the extractor registry.
|
|
26
|
+
* Returns the finding keys for a recognized, readable report and an empty set
|
|
27
|
+
* for anything else — the "never throw, empty on malformed" contract every
|
|
28
|
+
* extractor honours. The *gating* verdict (`fallowVerdict`) is where an
|
|
29
|
+
* unreadable report becomes a failure; capture and masking only need the keys.
|
|
30
|
+
*/
|
|
31
|
+
export declare function fallowFindings(raw: string): Fingerprint;
|
|
32
|
+
/** The verdict for one fallow slot: pass/fail plus the baseline bookkeeping. */
|
|
33
|
+
export type FallowVerdict = {
|
|
34
|
+
/** Slot verdict after baseline masking. */
|
|
35
|
+
ok: boolean;
|
|
36
|
+
/** Current findings the baseline grandfathered (the `baselined` count). */
|
|
37
|
+
baselined: number;
|
|
38
|
+
/** Sorted current findings the baseline does NOT cover. */
|
|
39
|
+
newKeys: string[];
|
|
40
|
+
/** All current findings — fed to the ratchet's observed map. */
|
|
41
|
+
findings: Fingerprint;
|
|
42
|
+
/**
|
|
43
|
+
* True only when the report parsed to a recognized schema. The ratchet must
|
|
44
|
+
* not prune a slot's baseline from an *unreadable* run (findings unknown, not
|
|
45
|
+
* "all fixed"), so an unobserved slot is preserved untouched.
|
|
46
|
+
*/
|
|
47
|
+
observed: boolean;
|
|
48
|
+
/** A one-line failure explanation for the console, or `null` when green. */
|
|
49
|
+
reason: string | null;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Decide a fallow slot's verdict from its raw JSON and (optionally) the slot's
|
|
53
|
+
* grandfathered keys. `baselineKeys === null` means no baseline is active (a
|
|
54
|
+
* plain run or a `checkride baseline` capture): the verdict is simply whether
|
|
55
|
+
* fallow found anything. With a baseline, findings are masked — the slot passes
|
|
56
|
+
* when every current finding is grandfathered and fails on any new one.
|
|
57
|
+
*
|
|
58
|
+
* A report that parses to *fewer* fingerprints than its issue count has findings
|
|
59
|
+
* that can't be individually grandfathered; a baseline must never mask such a
|
|
60
|
+
* slot to green, so it stays at the raw findings-based verdict. Correctness over
|
|
61
|
+
* precision: better to keep re-surfacing a finding than to silently pass one.
|
|
62
|
+
*/
|
|
63
|
+
export declare function fallowVerdict(raw: string, baselineKeys: readonly string[] | null): FallowVerdict;
|
|
64
|
+
//# sourceMappingURL=fallow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fallow.d.ts","sourceRoot":"","sources":["../../src/baseline/fallow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAmMpD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAGvD;AAED,gFAAgF;AAChF,MAAM,MAAM,aAAa,GAAG;IAC1B,2CAA2C;IAC3C,EAAE,EAAE,OAAO,CAAC;IACZ,2EAA2E;IAC3E,SAAS,EAAE,MAAM,CAAC;IAClB,2DAA2D;IAC3D,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,gEAAgE;IAChE,QAAQ,EAAE,WAAW,CAAC;IACtB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,GAAG,aAAa,CAuBhG"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fallow (v7) report parsing, gating, and fingerprinting.
|
|
3
|
+
*
|
|
4
|
+
* Fallow fills three slots — `dead` (dead-code), `dupes` (duplication), and
|
|
5
|
+
* `health` (complexity) — and checkride owns the pass/fail *verdict* for all
|
|
6
|
+
* three by parsing fallow's JSON, rather than trusting its process exit code.
|
|
7
|
+
* That is deliberate: fallow 3.5.0's exit code does NOT reliably gate. Verified
|
|
8
|
+
* against fallow 3.5.0:
|
|
9
|
+
* - `fallow --format json --fail-on-issues` (combined) exits 0 with issues.
|
|
10
|
+
* - `fallow dupes --format json` exits 0 no matter how much duplication (its
|
|
11
|
+
* `--threshold` defaults to `0` = "no limit").
|
|
12
|
+
* - only `fallow dead-code`/`health` with `--fail-on-issues` exit 1 on findings.
|
|
13
|
+
* Keying pass/fail off the exit code (as the orchestrator does for every other
|
|
14
|
+
* adapter) therefore let a green ✔ hide real findings. checkride reads the
|
|
15
|
+
* authoritative issue count out of the JSON instead, so every fallow slot gates
|
|
16
|
+
* uniformly — and an *unrecognized* schema fails loudly rather than passing
|
|
17
|
+
* silently (the count can't be trusted, so the slot can't be green).
|
|
18
|
+
*
|
|
19
|
+
* The JSON is fallow's `schema_version: 7` shape (fallow >= 3.5; fallow 2.x was
|
|
20
|
+
* schema 4 with a different layout and is no longer supported). Each analysis
|
|
21
|
+
* kind has its own layout, so parsing dispatches on the top-level `kind`.
|
|
22
|
+
*/
|
|
23
|
+
import { applyBaseline } from './store.js';
|
|
24
|
+
/**
|
|
25
|
+
* Minimum fallow JSON schema version checkride understands. fallow 3.5.0 and
|
|
26
|
+
* 3.6.0 both emit schema_version 7; 2.x emitted 4 with an incompatible layout.
|
|
27
|
+
* A report below this floor — or one whose kind/shape we can't read — is a
|
|
28
|
+
* hard failure, never a silent pass.
|
|
29
|
+
*/
|
|
30
|
+
const FALLOW_SCHEMA_MIN = 7;
|
|
31
|
+
/** Narrow to a plain object (arrays and null excluded). */
|
|
32
|
+
function isPlainObject(value) {
|
|
33
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
34
|
+
}
|
|
35
|
+
/** Read a field as a trimmed string, or `''` when missing/not a string. */
|
|
36
|
+
function str(value) {
|
|
37
|
+
return typeof value === 'string' ? value.trim() : '';
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Fingerprint key for one dead-code finding: `dead-code:<category>:<identity>`,
|
|
41
|
+
* where identity is a file and/or symbol (never a line or column, so the key
|
|
42
|
+
* survives edits that only move the code). Cross-file findings (cycles) key on
|
|
43
|
+
* the sorted set of files. Returns `null` when no stable identity can be read —
|
|
44
|
+
* the finding still counts toward `issueCount`, it just can't be individually
|
|
45
|
+
* grandfathered (which keeps the slot conservatively red, never silently green).
|
|
46
|
+
*/
|
|
47
|
+
/** Finding fields that carry a single stable symbol identity, in priority order. */
|
|
48
|
+
const SYMBOL_FIELDS = [
|
|
49
|
+
'export_name',
|
|
50
|
+
'name',
|
|
51
|
+
'type_name',
|
|
52
|
+
'member',
|
|
53
|
+
'package_name',
|
|
54
|
+
'dependency',
|
|
55
|
+
'specifier',
|
|
56
|
+
];
|
|
57
|
+
/** The first non-empty symbol field on a finding, or `''` when none is present. */
|
|
58
|
+
function symbolIdentity(item) {
|
|
59
|
+
for (const field of SYMBOL_FIELDS) {
|
|
60
|
+
const value = str(item[field]);
|
|
61
|
+
if (value)
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return '';
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Key a cross-file finding (circular_dependencies, re_export_cycles) on its
|
|
68
|
+
* sorted file membership — a list of files/segments rather than one location.
|
|
69
|
+
* Returns `null` when the item carries no such list.
|
|
70
|
+
*/
|
|
71
|
+
function cycleKey(category, item) {
|
|
72
|
+
for (const field of ['cycle', 'files', 'chain']) {
|
|
73
|
+
const arr = item[field];
|
|
74
|
+
if (!Array.isArray(arr))
|
|
75
|
+
continue;
|
|
76
|
+
const files = arr
|
|
77
|
+
.map((x) => (typeof x === 'string' ? x : isPlainObject(x) ? str(x['path']) || str(x['file']) : ''))
|
|
78
|
+
.filter(Boolean)
|
|
79
|
+
.toSorted();
|
|
80
|
+
if (files.length > 0)
|
|
81
|
+
return `dead-code:${category}:${files.join('->')}`;
|
|
82
|
+
}
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
function deadKey(category, item) {
|
|
86
|
+
if (!isPlainObject(item))
|
|
87
|
+
return null;
|
|
88
|
+
const file = str(item['path']) || str(item['file']);
|
|
89
|
+
const symbol = symbolIdentity(item);
|
|
90
|
+
if (file || symbol) {
|
|
91
|
+
const identity = [file, symbol].filter(Boolean).join(':');
|
|
92
|
+
return `dead-code:${category}:${identity}`;
|
|
93
|
+
}
|
|
94
|
+
return cycleKey(category, item);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Extract dead-code findings and the authoritative issue count (`total_issues`).
|
|
98
|
+
* Findings come from the top-level detail arrays (`unused_exports`,
|
|
99
|
+
* `unused_dev_dependencies`, `circular_dependencies`, …) rather than the summary
|
|
100
|
+
* keys: the summary aggregates a few categories under one name (e.g. dev and
|
|
101
|
+
* optional deps both count as `unused_dependencies`) whose items live in
|
|
102
|
+
* separately-named arrays, so keying off the summary would miss them. Iterating
|
|
103
|
+
* every array and letting {@link deadKey} return `null` for non-finding arrays
|
|
104
|
+
* (`next_steps`) covers whatever categories fallow reports — including ones added
|
|
105
|
+
* in a future minor — without a hand-maintained list. A category whose items
|
|
106
|
+
* carry no stable identity simply isn't fingerprinted; it still counts toward
|
|
107
|
+
* `total_issues`, so the slot stays red (never masked) until it's fixed.
|
|
108
|
+
*/
|
|
109
|
+
function parseDeadCode(j) {
|
|
110
|
+
const summary = isPlainObject(j['summary']) ? j['summary'] : {};
|
|
111
|
+
const total = summary['total_issues'] ?? j['total_issues'];
|
|
112
|
+
if (typeof total !== 'number') {
|
|
113
|
+
return { ok: false, reason: 'fallow dead-code JSON missing summary.total_issues' };
|
|
114
|
+
}
|
|
115
|
+
const findings = [];
|
|
116
|
+
for (const [category, value] of Object.entries(j)) {
|
|
117
|
+
if (!Array.isArray(value))
|
|
118
|
+
continue;
|
|
119
|
+
for (const item of value) {
|
|
120
|
+
const key = deadKey(category, item);
|
|
121
|
+
if (key !== null)
|
|
122
|
+
findings.push(key);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return { ok: true, kind: 'dead-code', findings, issueCount: total };
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Extract duplication findings. Each clone group carries a content-hash
|
|
129
|
+
* `fingerprint` (`dup:…`) that is stable across line moves — the ideal key. The
|
|
130
|
+
* issue count is the number of clone groups.
|
|
131
|
+
*/
|
|
132
|
+
function parseDupes(j) {
|
|
133
|
+
const groups = j['clone_groups'];
|
|
134
|
+
if (!Array.isArray(groups)) {
|
|
135
|
+
return { ok: false, reason: 'fallow dupes JSON missing clone_groups' };
|
|
136
|
+
}
|
|
137
|
+
const findings = [];
|
|
138
|
+
for (const g of groups) {
|
|
139
|
+
if (!isPlainObject(g))
|
|
140
|
+
continue;
|
|
141
|
+
const fp = str(g['fingerprint']);
|
|
142
|
+
if (fp)
|
|
143
|
+
findings.push(`dupes:${fp}`);
|
|
144
|
+
}
|
|
145
|
+
return { ok: true, kind: 'dupes', findings, issueCount: groups.length };
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Extract health (complexity) findings — one per function over threshold, keyed
|
|
149
|
+
* on file + function name (no line, so the key survives edits above it). The
|
|
150
|
+
* issue count is the number of findings.
|
|
151
|
+
*/
|
|
152
|
+
function parseHealth(j) {
|
|
153
|
+
const findings = j['findings'];
|
|
154
|
+
if (!Array.isArray(findings)) {
|
|
155
|
+
return { ok: false, reason: 'fallow health JSON missing findings' };
|
|
156
|
+
}
|
|
157
|
+
const keys = [];
|
|
158
|
+
for (const f of findings) {
|
|
159
|
+
if (!isPlainObject(f))
|
|
160
|
+
continue;
|
|
161
|
+
keys.push(`health:${str(f['path'])}:${str(f['name'])}`);
|
|
162
|
+
}
|
|
163
|
+
return { ok: true, kind: 'health', findings: keys, issueCount: findings.length };
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Parse a fallow report into findings + an issue count, or the reason it could
|
|
167
|
+
* not be trusted. Every failure path (bad JSON, missing/old schema, unknown
|
|
168
|
+
* kind, missing count field) is a *loud* failure the caller turns into a red
|
|
169
|
+
* slot — checkride never treats an unreadable fallow report as "clean".
|
|
170
|
+
*/
|
|
171
|
+
/**
|
|
172
|
+
* The reason a report's schema can't be trusted, or `null` when it is a
|
|
173
|
+
* supported version. Split out so {@link parseFallow} stays a thin dispatcher.
|
|
174
|
+
*/
|
|
175
|
+
function fallowSchemaError(j) {
|
|
176
|
+
const schema = j['schema_version'];
|
|
177
|
+
if (typeof schema !== 'number')
|
|
178
|
+
return 'fallow JSON has no schema_version';
|
|
179
|
+
if (schema < FALLOW_SCHEMA_MIN) {
|
|
180
|
+
return `unsupported fallow schema_version ${schema}; checkride needs fallow >= 3.5 (schema_version ${FALLOW_SCHEMA_MIN}). Run \`pnpm up fallow\`.`;
|
|
181
|
+
}
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
function parseFallow(raw) {
|
|
185
|
+
if (raw.trim() === '')
|
|
186
|
+
return { ok: false, reason: 'fallow produced no JSON output' };
|
|
187
|
+
let j;
|
|
188
|
+
try {
|
|
189
|
+
j = JSON.parse(raw);
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
return { ok: false, reason: 'fallow did not emit valid JSON' };
|
|
193
|
+
}
|
|
194
|
+
if (!isPlainObject(j))
|
|
195
|
+
return { ok: false, reason: 'fallow output was not a JSON object' };
|
|
196
|
+
const schemaError = fallowSchemaError(j);
|
|
197
|
+
if (schemaError !== null)
|
|
198
|
+
return { ok: false, reason: schemaError };
|
|
199
|
+
const kind = str(j['kind']);
|
|
200
|
+
switch (kind) {
|
|
201
|
+
case 'dead-code':
|
|
202
|
+
return parseDeadCode(j);
|
|
203
|
+
case 'dupes':
|
|
204
|
+
return parseDupes(j);
|
|
205
|
+
case 'health':
|
|
206
|
+
return parseHealth(j);
|
|
207
|
+
default:
|
|
208
|
+
return { ok: false, reason: `unrecognized fallow report kind '${kind || '(missing)'}'` };
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Fallow's fingerprint extractor (baseline part 1), for the extractor registry.
|
|
213
|
+
* Returns the finding keys for a recognized, readable report and an empty set
|
|
214
|
+
* for anything else — the "never throw, empty on malformed" contract every
|
|
215
|
+
* extractor honours. The *gating* verdict (`fallowVerdict`) is where an
|
|
216
|
+
* unreadable report becomes a failure; capture and masking only need the keys.
|
|
217
|
+
*/
|
|
218
|
+
export function fallowFindings(raw) {
|
|
219
|
+
const parsed = parseFallow(raw);
|
|
220
|
+
return new Set(parsed.ok ? parsed.findings : []);
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Decide a fallow slot's verdict from its raw JSON and (optionally) the slot's
|
|
224
|
+
* grandfathered keys. `baselineKeys === null` means no baseline is active (a
|
|
225
|
+
* plain run or a `checkride baseline` capture): the verdict is simply whether
|
|
226
|
+
* fallow found anything. With a baseline, findings are masked — the slot passes
|
|
227
|
+
* when every current finding is grandfathered and fails on any new one.
|
|
228
|
+
*
|
|
229
|
+
* A report that parses to *fewer* fingerprints than its issue count has findings
|
|
230
|
+
* that can't be individually grandfathered; a baseline must never mask such a
|
|
231
|
+
* slot to green, so it stays at the raw findings-based verdict. Correctness over
|
|
232
|
+
* precision: better to keep re-surfacing a finding than to silently pass one.
|
|
233
|
+
*/
|
|
234
|
+
export function fallowVerdict(raw, baselineKeys) {
|
|
235
|
+
const parsed = parseFallow(raw);
|
|
236
|
+
if (!parsed.ok) {
|
|
237
|
+
return { ok: false, baselined: 0, newKeys: [], findings: new Set(), observed: false, reason: parsed.reason };
|
|
238
|
+
}
|
|
239
|
+
const findings = new Set(parsed.findings);
|
|
240
|
+
const rawOk = parsed.issueCount === 0;
|
|
241
|
+
const issueReason = rawOk ? null : `${parsed.issueCount} finding(s)`;
|
|
242
|
+
if (baselineKeys === null) {
|
|
243
|
+
return { ok: rawOk, baselined: 0, newKeys: [], findings, observed: true, reason: issueReason };
|
|
244
|
+
}
|
|
245
|
+
const adj = applyBaseline(findings, baselineKeys, rawOk);
|
|
246
|
+
const fullyTracked = findings.size === parsed.issueCount;
|
|
247
|
+
// Untracked findings block masking: hold the slot at its raw verdict.
|
|
248
|
+
if (!fullyTracked) {
|
|
249
|
+
return { ok: rawOk, baselined: adj.baselined, newKeys: adj.newKeys, findings, observed: true, reason: issueReason };
|
|
250
|
+
}
|
|
251
|
+
// Fully tracked: a masked slot (all findings grandfathered) is green; a slot
|
|
252
|
+
// that fails does so on `newKeys`, which the orchestrator lists — so no extra
|
|
253
|
+
// reason line is needed either way.
|
|
254
|
+
return { ok: adj.ok, baselined: adj.baselined, newKeys: adj.newKeys, findings, observed: true, reason: null };
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=fallow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fallow.js","sourceRoot":"","sources":["../../src/baseline/fallow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAO5B,2DAA2D;AAC3D,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,2EAA2E;AAC3E,SAAS,GAAG,CAAC,KAAc;IACzB,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACvD,CAAC;AAED;;;;;;;GAOG;AACH,oFAAoF;AACpF,MAAM,aAAa,GAAG;IACpB,aAAa;IACb,MAAM;IACN,WAAW;IACX,QAAQ;IACR,cAAc;IACd,YAAY;IACZ,WAAW;CACH,CAAC;AAEX,mFAAmF;AACnF,SAAS,cAAc,CAAC,IAA6B;IACnD,KAAK,MAAM,KAAK,IAAI,aAAa,EAA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CAAC;IAErE,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC1B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IACjG,CAAC;IAED,MAAM,GAAG,GAAG,aAAa,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;IACzD,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,KAAK,MAAM,CAAC,UAAU,CAAC;IACzD,sEAAsE;IACtE,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;IACtH,CAAC;IACD,6EAA6E;IAC7E,8EAA8E;IAC9E,oCAAoC;IACpC,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AAChH,CAAC"}
|
|
@@ -12,15 +12,13 @@
|
|
|
12
12
|
* owns its own key string, the raw `.check/<slot>.json` stays authoritative, and
|
|
13
13
|
* an adapter whose output isn't a stable diagnostic set simply has no extractor
|
|
14
14
|
* and returns `null` — baseline is unsupported for that slot, decided
|
|
15
|
-
* per-adapter against real fixtures (D12), not from an up-front list.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* per-adapter against real fixtures (D12), not from an up-front list. Extractors
|
|
16
|
+
* ship for the blessed lint/struct/spell adapters (oxlint, ast-grep, cspell) and
|
|
17
|
+
* for fallow's three analyses (dead-code, dupes, health — see `./fallow.ts`,
|
|
18
|
+
* which also owns fallow's gating verdict).
|
|
19
19
|
*/
|
|
20
20
|
/** A stable, order-independent set of diagnostic keys for one adapter's output. */
|
|
21
21
|
export type Fingerprint = ReadonlySet<string>;
|
|
22
|
-
/** Turns one adapter's raw output (JSON or text) into a fingerprint. */
|
|
23
|
-
export type Extractor = (raw: string) => Fingerprint;
|
|
24
22
|
/**
|
|
25
23
|
* Fingerprint one adapter's raw output, or `null` when the adapter has no
|
|
26
24
|
* extractor (baseline unsupported for that slot). Keyed on adapter name, so an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../../src/baseline/fingerprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"fingerprint.d.ts","sourceRoot":"","sources":["../../src/baseline/fingerprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,mFAAmF;AACnF,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AA0F9C;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAG5E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE1D"}
|
|
@@ -12,11 +12,12 @@
|
|
|
12
12
|
* owns its own key string, the raw `.check/<slot>.json` stays authoritative, and
|
|
13
13
|
* an adapter whose output isn't a stable diagnostic set simply has no extractor
|
|
14
14
|
* and returns `null` — baseline is unsupported for that slot, decided
|
|
15
|
-
* per-adapter against real fixtures (D12), not from an up-front list.
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
15
|
+
* per-adapter against real fixtures (D12), not from an up-front list. Extractors
|
|
16
|
+
* ship for the blessed lint/struct/spell adapters (oxlint, ast-grep, cspell) and
|
|
17
|
+
* for fallow's three analyses (dead-code, dupes, health — see `./fallow.ts`,
|
|
18
|
+
* which also owns fallow's gating verdict).
|
|
19
19
|
*/
|
|
20
|
+
import { fallowFindings } from './fallow.js';
|
|
20
21
|
/**
|
|
21
22
|
* Build a finding's key from its identity. Line and column are intentionally
|
|
22
23
|
* excluded so the key survives edits that only move the code; the message is
|
|
@@ -93,6 +94,10 @@ const EXTRACTORS = {
|
|
|
93
94
|
oxlint: extractOxlint,
|
|
94
95
|
'ast-grep': extractAstGrep,
|
|
95
96
|
cspell: extractCspell,
|
|
97
|
+
// One `fallow` adapter fills all three fallow slots (dead/dupes/health); its
|
|
98
|
+
// extractor dispatches on the report's `kind`, so a single registration serves
|
|
99
|
+
// every slot. See `./fallow.ts`.
|
|
100
|
+
fallow: fallowFindings,
|
|
96
101
|
};
|
|
97
102
|
/**
|
|
98
103
|
* Fingerprint one adapter's raw output, or `null` when the adapter has no
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fingerprint.js","sourceRoot":"","sources":["../../src/baseline/fingerprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"fingerprint.js","sourceRoot":"","sources":["../../src/baseline/fingerprint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAQ7C;;;;;GAKG;AACH,SAAS,GAAG,CAAC,IAAY,EAAE,IAAY,EAAE,OAAe;IACtD,OAAO,GAAG,IAAI,IAAI,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;AAClE,CAAC;AAED,mFAAmF;AACnF,SAAS,SAAS,CAAC,GAAW;IAC5B,IAAI,CAAC;QACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC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AAC,CAAC;AAEF,6EAA6E;AAC7E,MAAM,UAAU,GAAwC;IACtD,MAAM,EAAE,aAAa;IACrB,UAAU,EAAE,cAAc;IAC1B,MAAM,EAAE,aAAa;IACrB,6EAA6E;IAC7E,+EAA+E;IAC/E,iCAAiC;IACjC,MAAM,EAAE,cAAc;CACvB,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,OAAe,EAAE,GAAW;IACtD,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACtC,OAAO,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAC3C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,OAAO,UAAU,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC;AAC3C,CAAC"}
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
* the module's only public surface (C2): siblings import from `../baseline`,
|
|
5
5
|
* never from `./fingerprint.js` directly.
|
|
6
6
|
*/
|
|
7
|
-
export type {
|
|
7
|
+
export type { Fingerprint } from './fingerprint.js';
|
|
8
8
|
export { fingerprint, isFingerprintable } from './fingerprint.js';
|
|
9
|
-
export
|
|
10
|
-
export {
|
|
11
|
-
export
|
|
12
|
-
export { runBaseline } from './command.js';
|
|
9
|
+
export { fallowVerdict } from './fallow.js';
|
|
10
|
+
export type { Baseline } from './store.js';
|
|
11
|
+
export { applyBaseline, BASELINE_FILE, baselinesEqual, countBaselineKeys, loadBaseline, ratchet, writeBaseline, } from './store.js';
|
|
13
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/baseline/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/baseline/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EACL,aAAa,EACb,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACP,aAAa,GACd,MAAM,YAAY,CAAC"}
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* never from `./fingerprint.js` directly.
|
|
6
6
|
*/
|
|
7
7
|
export { fingerprint, isFingerprintable } from './fingerprint.js';
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
8
|
+
export { fallowVerdict } from './fallow.js';
|
|
9
|
+
export { applyBaseline, BASELINE_FILE, baselinesEqual, countBaselineKeys, loadBaseline, ratchet, writeBaseline, } from './store.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/baseline/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/baseline/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EACL,aAAa,EACb,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,OAAO,EACP,aAAa,GACd,MAAM,YAAY,CAAC"}
|
|
@@ -10,17 +10,19 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Only slots whose adapter has an extractor participate: a supported-but-clean
|
|
12
12
|
* slot records an empty array (it opted in and had nothing to grandfather),
|
|
13
|
-
* while a slot with no extractor (
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* while a slot with no extractor (tsc, links, …) simply never appears — exactly
|
|
14
|
+
* the "supported vs. unsupported" distinction the fingerprint contract draws.
|
|
15
|
+
* The fallow slots (dead/dupes/health) are fingerprintable, so `checkride
|
|
16
|
+
* baseline` grandfathers their findings like any other. Running each check under
|
|
17
|
+
* the resolved package manager and capturing raw
|
|
16
18
|
* output is delegated to {@link runChecks}, so baseline fingerprints precisely
|
|
17
19
|
* the bytes a normal run would.
|
|
18
20
|
*/
|
|
19
|
-
import type { Adapter, Slot } from '
|
|
20
|
-
import type {
|
|
21
|
-
import type {
|
|
22
|
-
import type {
|
|
23
|
-
import type {
|
|
21
|
+
import type { Adapter, Slot } from './adapters.js';
|
|
22
|
+
import type { Baseline } from './baseline/store.js';
|
|
23
|
+
import type { CheckrideConfig } from './config.js';
|
|
24
|
+
import type { CheckRunner, Out } from './orchestrator.js';
|
|
25
|
+
import type { PackageManager } from './pm/index.js';
|
|
24
26
|
export type BaselineOptions = {
|
|
25
27
|
cwd?: string;
|
|
26
28
|
slots?: readonly Slot[];
|
|
@@ -39,4 +41,4 @@ export type BaselineResult = {
|
|
|
39
41
|
};
|
|
40
42
|
/** Run the pipeline and write the per-adapter fingerprint baseline to `cwd`. */
|
|
41
43
|
export declare function runBaseline(options: BaselineOptions): Promise<BaselineResult>;
|
|
42
|
-
//# sourceMappingURL=command.d.ts.map
|
|
44
|
+
//# sourceMappingURL=baseline-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseline-command.d.ts","sourceRoot":"","sources":["../src/baseline-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAc,MAAM,mBAAmB,CAAC;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,IAAI,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAC9B,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,sEAAsE;IACtE,EAAE,CAAC,EAAE,cAAc,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE,CAAC;AAEnF,gFAAgF;AAChF,wBAAsB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAsCnF"}
|
|
@@ -10,15 +10,17 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Only slots whose adapter has an extractor participate: a supported-but-clean
|
|
12
12
|
* slot records an empty array (it opted in and had nothing to grandfather),
|
|
13
|
-
* while a slot with no extractor (
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* while a slot with no extractor (tsc, links, …) simply never appears — exactly
|
|
14
|
+
* the "supported vs. unsupported" distinction the fingerprint contract draws.
|
|
15
|
+
* The fallow slots (dead/dupes/health) are fingerprintable, so `checkride
|
|
16
|
+
* baseline` grandfathers their findings like any other. Running each check under
|
|
17
|
+
* the resolved package manager and capturing raw
|
|
16
18
|
* output is delegated to {@link runChecks}, so baseline fingerprints precisely
|
|
17
19
|
* the bytes a normal run would.
|
|
18
20
|
*/
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
21
|
+
import { fingerprint } from './baseline/fingerprint.js';
|
|
22
|
+
import { BASELINE_FILE, BASELINE_SCHEMA_VERSION, writeBaseline } from './baseline/store.js';
|
|
23
|
+
import { runChecks } from './orchestrator.js';
|
|
22
24
|
/** Run the pipeline and write the per-adapter fingerprint baseline to `cwd`. */
|
|
23
25
|
export async function runBaseline(options) {
|
|
24
26
|
const cwd = options.cwd ?? process.cwd();
|
|
@@ -55,4 +57,4 @@ export async function runBaseline(options) {
|
|
|
55
57
|
stderr.write(`\nbaseline: wrote ${BASELINE_FILE} — ${total} diagnostic(s) across ${where}\n`);
|
|
56
58
|
return { ok: true, exitCode: 0, baseline };
|
|
57
59
|
}
|
|
58
|
-
//# sourceMappingURL=command.js.map
|
|
60
|
+
//# sourceMappingURL=baseline-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseline-command.js","sourceRoot":"","sources":["../src/baseline-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAG5F,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAiB9C,gFAAgF;AAChF,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAAwB;IACxD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACzC,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC;IAEhD,8EAA8E;IAC9E,gFAAgF;IAChF,gFAAgF;IAChF,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