plumbbob 0.9.3 → 0.10.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/.claude-plugin/plugin.json +1 -1
- package/README.md +92 -89
- package/dist/cli-core.js +25 -8
- package/dist/cli.js +1 -1
- package/dist/lib/agents.js +26 -26
- package/dist/lib/buildlog.js +11 -11
- package/dist/lib/buildlogsync.js +8 -8
- package/dist/lib/check.js +55 -22
- package/dist/lib/commitbody.js +72 -0
- package/dist/lib/commitmsg.js +7 -7
- package/dist/lib/git.js +44 -15
- package/dist/lib/intent.js +21 -20
- package/dist/lib/latch.js +19 -19
- package/dist/lib/orient.js +36 -17
- package/dist/lib/reentry.js +70 -0
- package/dist/lib/settings.js +16 -16
- package/dist/lib/sidecar.js +54 -54
- package/dist/lib/templates.js +1 -1
- package/dist/verbs/agent.js +27 -27
- package/dist/verbs/build.js +9 -9
- package/dist/verbs/check.js +6 -6
- package/dist/verbs/checkpoint.js +48 -47
- package/dist/verbs/doctor.js +31 -30
- package/dist/verbs/finish.js +28 -41
- package/dist/verbs/handoff.js +9 -8
- package/dist/verbs/init.js +9 -9
- package/dist/verbs/park.js +3 -3
- package/dist/verbs/recover.js +297 -0
- package/dist/verbs/revert.js +13 -13
- package/dist/verbs/spike.js +25 -19
- package/dist/verbs/start.js +49 -19
- package/dist/verbs/status.js +8 -8
- package/dist/verbs/turn.js +16 -16
- package/dist/verbs/use.js +4 -4
- package/hooks/post-edit.sh +4 -4
- package/hooks/pre-bash-commit.sh +3 -3
- package/node_modules/checkride/.claude-plugin/plugin.json +11 -0
- package/node_modules/checkride/CHANGELOG.md +1404 -0
- package/node_modules/checkride/LICENSE +201 -21
- package/node_modules/checkride/README.md +197 -38
- package/node_modules/checkride/dist/__tests__/fixtures/released-stanzas.d.ts +15 -0
- package/node_modules/checkride/dist/__tests__/fixtures/released-stanzas.d.ts.map +1 -0
- package/node_modules/checkride/dist/__tests__/fixtures/released-stanzas.js +17 -0
- package/node_modules/checkride/dist/__tests__/fixtures/released-stanzas.js.map +1 -0
- package/node_modules/checkride/dist/adapters.d.ts +30 -10
- package/node_modules/checkride/dist/adapters.d.ts.map +1 -1
- package/node_modules/checkride/dist/adapters.js +62 -23
- package/node_modules/checkride/dist/adapters.js.map +1 -1
- package/node_modules/checkride/dist/agent-setup/claude.d.ts +88 -0
- package/node_modules/checkride/dist/agent-setup/claude.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/claude.js +305 -0
- package/node_modules/checkride/dist/agent-setup/claude.js.map +1 -0
- package/node_modules/checkride/dist/agent-setup/command.d.ts +43 -0
- package/node_modules/checkride/dist/agent-setup/command.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/command.js +77 -0
- package/node_modules/checkride/dist/agent-setup/command.js.map +1 -0
- package/node_modules/checkride/dist/agent-setup/cursor.d.ts +69 -0
- package/node_modules/checkride/dist/agent-setup/cursor.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/cursor.js +247 -0
- package/node_modules/checkride/dist/agent-setup/cursor.js.map +1 -0
- package/node_modules/checkride/dist/agent-setup/files.d.ts +50 -0
- package/node_modules/checkride/dist/agent-setup/files.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/files.js +80 -0
- package/node_modules/checkride/dist/agent-setup/files.js.map +1 -0
- package/node_modules/checkride/dist/agent-setup/harness.d.ts +101 -0
- package/node_modules/checkride/dist/agent-setup/harness.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/harness.js +93 -0
- package/node_modules/checkride/dist/agent-setup/harness.js.map +1 -0
- package/node_modules/checkride/dist/agent-setup/hook.d.ts +45 -52
- package/node_modules/checkride/dist/agent-setup/hook.d.ts.map +1 -1
- package/node_modules/checkride/dist/agent-setup/hook.js +64 -95
- package/node_modules/checkride/dist/agent-setup/hook.js.map +1 -1
- package/node_modules/checkride/dist/agent-setup/index.d.ts +10 -4
- package/node_modules/checkride/dist/agent-setup/index.d.ts.map +1 -1
- package/node_modules/checkride/dist/agent-setup/index.js +9 -4
- package/node_modules/checkride/dist/agent-setup/index.js.map +1 -1
- package/node_modules/checkride/dist/agent-setup/scripts.d.ts +81 -0
- package/node_modules/checkride/dist/agent-setup/scripts.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/scripts.js +604 -0
- package/node_modules/checkride/dist/agent-setup/scripts.js.map +1 -0
- package/node_modules/checkride/dist/agent-setup/skills.d.ts +31 -0
- package/node_modules/checkride/dist/agent-setup/skills.d.ts.map +1 -0
- package/node_modules/checkride/dist/agent-setup/skills.js +56 -0
- package/node_modules/checkride/dist/agent-setup/skills.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/configured.d.ts +30 -0
- package/node_modules/checkride/dist/artifacts/configured.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/configured.js +45 -0
- package/node_modules/checkride/dist/artifacts/configured.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/format.d.ts +33 -0
- package/node_modules/checkride/dist/artifacts/format.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/format.js +56 -0
- package/node_modules/checkride/dist/artifacts/format.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/freshness.d.ts +32 -0
- package/node_modules/checkride/dist/artifacts/freshness.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/freshness.js +37 -0
- package/node_modules/checkride/dist/artifacts/freshness.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/index.d.ts +22 -0
- package/node_modules/checkride/dist/artifacts/index.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/index.js +19 -0
- package/node_modules/checkride/dist/artifacts/index.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/json.d.ts +31 -0
- package/node_modules/checkride/dist/artifacts/json.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/json.js +47 -0
- package/node_modules/checkride/dist/artifacts/json.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/raw.d.ts +60 -0
- package/node_modules/checkride/dist/artifacts/raw.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/raw.js +91 -0
- package/node_modules/checkride/dist/artifacts/raw.js.map +1 -0
- package/node_modules/checkride/dist/artifacts/summary.d.ts +69 -0
- package/node_modules/checkride/dist/artifacts/summary.d.ts.map +1 -0
- package/node_modules/checkride/dist/artifacts/summary.js +108 -0
- package/node_modules/checkride/dist/artifacts/summary.js.map +1 -0
- package/node_modules/checkride/dist/atomic.d.ts +16 -1
- package/node_modules/checkride/dist/atomic.d.ts.map +1 -1
- package/node_modules/checkride/dist/atomic.js +25 -3
- package/node_modules/checkride/dist/atomic.js.map +1 -1
- package/node_modules/checkride/dist/baseline/fallow.d.ts +9 -5
- package/node_modules/checkride/dist/baseline/fallow.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/fallow.js +163 -60
- package/node_modules/checkride/dist/baseline/fallow.js.map +1 -1
- package/node_modules/checkride/dist/baseline/fingerprint.d.ts +20 -11
- package/node_modules/checkride/dist/baseline/fingerprint.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/fingerprint.js +73 -23
- package/node_modules/checkride/dist/baseline/fingerprint.js.map +1 -1
- package/node_modules/checkride/dist/baseline/history.d.ts +98 -0
- package/node_modules/checkride/dist/baseline/history.d.ts.map +1 -0
- package/node_modules/checkride/dist/baseline/history.js +232 -0
- package/node_modules/checkride/dist/baseline/history.js.map +1 -0
- package/node_modules/checkride/dist/baseline/index.d.ts +7 -5
- package/node_modules/checkride/dist/baseline/index.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/index.js +5 -4
- package/node_modules/checkride/dist/baseline/index.js.map +1 -1
- package/node_modules/checkride/dist/baseline/store.d.ts +41 -10
- package/node_modules/checkride/dist/baseline/store.d.ts.map +1 -1
- package/node_modules/checkride/dist/baseline/store.js +65 -24
- package/node_modules/checkride/dist/baseline/store.js.map +1 -1
- package/node_modules/checkride/dist/baseline-command.d.ts +5 -5
- package/node_modules/checkride/dist/baseline-command.js +7 -7
- package/node_modules/checkride/dist/baseline-command.js.map +1 -1
- package/node_modules/checkride/dist/cli.d.ts +21 -4
- package/node_modules/checkride/dist/cli.d.ts.map +1 -1
- package/node_modules/checkride/dist/cli.js +350 -36
- package/node_modules/checkride/dist/cli.js.map +1 -1
- package/node_modules/checkride/dist/config.d.ts +114 -9
- package/node_modules/checkride/dist/config.d.ts.map +1 -1
- package/node_modules/checkride/dist/config.js +142 -23
- package/node_modules/checkride/dist/config.js.map +1 -1
- package/node_modules/checkride/dist/digest/digest.d.ts +5 -5
- package/node_modules/checkride/dist/digest/digest.js +6 -6
- package/node_modules/checkride/dist/digest/index.d.ts +2 -2
- package/node_modules/checkride/dist/digest/index.js +2 -2
- package/node_modules/checkride/dist/doctor.d.ts +27 -6
- package/node_modules/checkride/dist/doctor.d.ts.map +1 -1
- package/node_modules/checkride/dist/doctor.js +231 -27
- package/node_modules/checkride/dist/doctor.js.map +1 -1
- package/node_modules/checkride/dist/gate.d.ts +180 -0
- package/node_modules/checkride/dist/gate.d.ts.map +1 -0
- package/node_modules/checkride/dist/gate.js +617 -0
- package/node_modules/checkride/dist/gate.js.map +1 -0
- package/node_modules/checkride/dist/init.d.ts +79 -12
- package/node_modules/checkride/dist/init.d.ts.map +1 -1
- package/node_modules/checkride/dist/init.js +385 -81
- package/node_modules/checkride/dist/init.js.map +1 -1
- package/node_modules/checkride/dist/json.d.ts +21 -0
- package/node_modules/checkride/dist/json.d.ts.map +1 -0
- package/node_modules/checkride/dist/json.js +21 -0
- package/node_modules/checkride/dist/json.js.map +1 -0
- package/node_modules/checkride/dist/links.d.ts +31 -5
- package/node_modules/checkride/dist/links.d.ts.map +1 -1
- package/node_modules/checkride/dist/links.js +141 -32
- package/node_modules/checkride/dist/links.js.map +1 -1
- package/node_modules/checkride/dist/node-pin.d.ts +129 -0
- package/node_modules/checkride/dist/node-pin.d.ts.map +1 -0
- package/node_modules/checkride/dist/node-pin.js +211 -0
- package/node_modules/checkride/dist/node-pin.js.map +1 -0
- package/node_modules/checkride/dist/orchestrator.d.ts +53 -10
- package/node_modules/checkride/dist/orchestrator.d.ts.map +1 -1
- package/node_modules/checkride/dist/orchestrator.js +312 -113
- package/node_modules/checkride/dist/orchestrator.js.map +1 -1
- package/node_modules/checkride/dist/pack.d.ts +8 -9
- package/node_modules/checkride/dist/pack.d.ts.map +1 -1
- package/node_modules/checkride/dist/pack.js +53 -17
- package/node_modules/checkride/dist/pack.js.map +1 -1
- package/node_modules/checkride/dist/pm/detect.d.ts +6 -1
- package/node_modules/checkride/dist/pm/detect.d.ts.map +1 -1
- package/node_modules/checkride/dist/pm/detect.js +6 -1
- package/node_modules/checkride/dist/pm/detect.js.map +1 -1
- package/node_modules/checkride/dist/pm/index.d.ts +7 -2
- package/node_modules/checkride/dist/pm/index.d.ts.map +1 -1
- package/node_modules/checkride/dist/pm/index.js +6 -2
- package/node_modules/checkride/dist/pm/index.js.map +1 -1
- package/node_modules/checkride/dist/pm/launch.d.ts +72 -0
- package/node_modules/checkride/dist/pm/launch.d.ts.map +1 -0
- package/node_modules/checkride/dist/pm/launch.js +108 -0
- package/node_modules/checkride/dist/pm/launch.js.map +1 -0
- package/node_modules/checkride/dist/pm/tools.d.ts +73 -0
- package/node_modules/checkride/dist/pm/tools.d.ts.map +1 -0
- package/node_modules/checkride/dist/pm/tools.js +124 -0
- package/node_modules/checkride/dist/pm/tools.js.map +1 -0
- package/node_modules/checkride/dist/pm/translate.d.ts +35 -9
- package/node_modules/checkride/dist/pm/translate.d.ts.map +1 -1
- package/node_modules/checkride/dist/pm/translate.js +78 -18
- package/node_modules/checkride/dist/pm/translate.js.map +1 -1
- package/node_modules/checkride/dist/proc.d.ts +30 -0
- package/node_modules/checkride/dist/proc.d.ts.map +1 -0
- package/node_modules/checkride/dist/proc.js +42 -0
- package/node_modules/checkride/dist/proc.js.map +1 -0
- package/node_modules/checkride/dist/qa/cli.d.ts +20 -0
- package/node_modules/checkride/dist/qa/cli.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/cli.js +24 -0
- package/node_modules/checkride/dist/qa/cli.js.map +1 -0
- package/node_modules/checkride/dist/qa/dead.d.ts +39 -0
- package/node_modules/checkride/dist/qa/dead.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/dead.js +88 -0
- package/node_modules/checkride/dist/qa/dead.js.map +1 -0
- package/node_modules/checkride/dist/qa/dupes.d.ts +45 -0
- package/node_modules/checkride/dist/qa/dupes.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/dupes.js +62 -0
- package/node_modules/checkride/dist/qa/dupes.js.map +1 -0
- package/node_modules/checkride/dist/qa/health.d.ts +85 -0
- package/node_modules/checkride/dist/qa/health.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/health.js +109 -0
- package/node_modules/checkride/dist/qa/health.js.map +1 -0
- package/node_modules/checkride/dist/qa/index.d.ts +23 -0
- package/node_modules/checkride/dist/qa/index.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/index.js +22 -0
- package/node_modules/checkride/dist/qa/index.js.map +1 -0
- package/node_modules/checkride/dist/qa/mutation.d.ts +80 -0
- package/node_modules/checkride/dist/qa/mutation.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/mutation.js +195 -0
- package/node_modules/checkride/dist/qa/mutation.js.map +1 -0
- package/node_modules/checkride/dist/qa/qa.d.ts +71 -0
- package/node_modules/checkride/dist/qa/qa.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/qa.js +158 -0
- package/node_modules/checkride/dist/qa/qa.js.map +1 -0
- package/node_modules/checkride/dist/qa/read.d.ts +40 -0
- package/node_modules/checkride/dist/qa/read.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/read.js +47 -0
- package/node_modules/checkride/dist/qa/read.js.map +1 -0
- package/node_modules/checkride/dist/qa/render.d.ts +26 -0
- package/node_modules/checkride/dist/qa/render.d.ts.map +1 -0
- package/node_modules/checkride/dist/qa/render.js +310 -0
- package/node_modules/checkride/dist/qa/render.js.map +1 -0
- package/node_modules/checkride/dist/recover.d.ts +48 -0
- package/node_modules/checkride/dist/recover.d.ts.map +1 -0
- package/node_modules/checkride/dist/recover.js +220 -0
- package/node_modules/checkride/dist/recover.js.map +1 -0
- package/node_modules/checkride/dist/security.d.ts +45 -0
- package/node_modules/checkride/dist/security.d.ts.map +1 -0
- package/node_modules/checkride/dist/security.js +86 -0
- package/node_modules/checkride/dist/security.js.map +1 -0
- package/node_modules/checkride/dist/smoke.d.ts +6 -6
- package/node_modules/checkride/dist/smoke.js +6 -6
- package/node_modules/checkride/dist/snippets.d.ts +27 -30
- package/node_modules/checkride/dist/snippets.d.ts.map +1 -1
- package/node_modules/checkride/dist/snippets.js +26 -30
- package/node_modules/checkride/dist/snippets.js.map +1 -1
- package/node_modules/checkride/dist/tool-json.d.ts +33 -0
- package/node_modules/checkride/dist/tool-json.d.ts.map +1 -0
- package/node_modules/checkride/dist/tool-json.js +58 -0
- package/node_modules/checkride/dist/tool-json.js.map +1 -0
- package/node_modules/checkride/dist/triage/cli.d.ts +21 -0
- package/node_modules/checkride/dist/triage/cli.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/cli.js +26 -0
- package/node_modules/checkride/dist/triage/cli.js.map +1 -0
- package/node_modules/checkride/dist/triage/doctor-fold.d.ts +51 -0
- package/node_modules/checkride/dist/triage/doctor-fold.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/doctor-fold.js +88 -0
- package/node_modules/checkride/dist/triage/doctor-fold.js.map +1 -0
- package/node_modules/checkride/dist/triage/env.d.ts +54 -0
- package/node_modules/checkride/dist/triage/env.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/env.js +81 -0
- package/node_modules/checkride/dist/triage/env.js.map +1 -0
- package/node_modules/checkride/dist/triage/gate.d.ts +61 -0
- package/node_modules/checkride/dist/triage/gate.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/gate.js +121 -0
- package/node_modules/checkride/dist/triage/gate.js.map +1 -0
- package/node_modules/checkride/dist/triage/index.d.ts +22 -0
- package/node_modules/checkride/dist/triage/index.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/index.js +20 -0
- package/node_modules/checkride/dist/triage/index.js.map +1 -0
- package/node_modules/checkride/dist/triage/render.d.ts +19 -0
- package/node_modules/checkride/dist/triage/render.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/render.js +419 -0
- package/node_modules/checkride/dist/triage/render.js.map +1 -0
- package/node_modules/checkride/dist/triage/triage.d.ts +83 -0
- package/node_modules/checkride/dist/triage/triage.d.ts.map +1 -0
- package/node_modules/checkride/dist/triage/triage.js +131 -0
- package/node_modules/checkride/dist/triage/triage.js.map +1 -0
- package/node_modules/checkride/package.json +18 -15
- package/node_modules/checkride/schema/checkride.config.schema.json +70 -5
- package/node_modules/checkride/schema/checkride.summary.schema.json +1 -1
- package/node_modules/checkride/skills/check/SKILL.md +265 -0
- package/node_modules/checkride/skills/qa/SKILL.md +231 -0
- package/node_modules/checkride/templates/shared/cspell.json +1 -0
- package/node_modules/checkride/templates/shared/oxlintrc.json +1 -1
- package/node_modules/checkride/templates/shared/styles/Repo/Drift.yml +41 -0
- package/node_modules/checkride/templates/shared/styles/Repo/Latin.yml +14 -0
- package/node_modules/checkride/templates/shared/styles/Repo/LyHyphen.yml +28 -0
- package/node_modules/checkride/templates/shared/styles/Repo/Minted.yml +33 -0
- package/node_modules/checkride/templates/shared/styles/Repo/ThereIs.yml +16 -0
- package/node_modules/checkride/templates/shared/styles/Repo/Weasel.yml +26 -0
- package/node_modules/checkride/templates/shared/vale.ini +34 -0
- package/package.json +10 -9
- package/skills/build/SKILL.md +85 -76
- package/skills/doctor/SKILL.md +11 -11
- package/skills/finish/SKILL.md +21 -18
- package/skills/harvest/SKILL.md +13 -11
- package/skills/park/SKILL.md +10 -10
- package/skills/plan/SKILL.md +69 -59
- package/skills/recover/SKILL.md +28 -0
- package/skills/refine/SKILL.md +21 -18
- package/skills/revert/SKILL.md +6 -6
- package/skills/spike/SKILL.md +9 -9
- package/skills/status/SKILL.md +5 -5
- package/skills/step/SKILL.md +20 -15
- package/skills/verify/SKILL.md +56 -46
- package/templates/build-log.md +7 -7
- package/templates/intent.md +52 -41
- package/templates/spike-report.md +10 -10
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in `security` check — `pnpm audit` with checkride owning the verdict.
|
|
3
|
+
*
|
|
4
|
+
* pnpm's JSON mode exits 1 on *any* advisory regardless of `--audit-level`
|
|
5
|
+
* (only table mode lets the level gate the exit code), so judging this slot by
|
|
6
|
+
* exit code made it gate at zero advisories of any severity — not the level
|
|
7
|
+
* the adapter's args declare. The evaluator here runs the audit with `--json`,
|
|
8
|
+
* parses `metadata.vulnerabilities`, and fails only when advisories sit at or
|
|
9
|
+
* above the threshold parsed from the args themselves, so a consumer override
|
|
10
|
+
* of `--audit-level` keeps meaning what it says.
|
|
11
|
+
*
|
|
12
|
+
* "Could not run" (registry unreachable, malformed output) is distinguished
|
|
13
|
+
* from "ran; everything below the level": the former fails with the error
|
|
14
|
+
* surfaced, the latter is green. The raw audit JSON is passed through on
|
|
15
|
+
* stdout, so the orchestrator persists `.check/security.json` as before.
|
|
16
|
+
*/
|
|
17
|
+
import type { CheckOutcome } from './links.js';
|
|
18
|
+
/** The audit subprocess spawner — same signature as the orchestrator's `spawnCheck`. */
|
|
19
|
+
export type AuditSpawn = (command: string, args: string[], cwd: string, timeoutSec?: number) => Promise<CheckOutcome>;
|
|
20
|
+
/** `--audit-level` vocabulary, weakest first. `info` never gates (as in pnpm). */
|
|
21
|
+
declare const LEVELS: readonly ["low", "moderate", "high", "critical"];
|
|
22
|
+
export type AuditLevel = (typeof LEVELS)[number];
|
|
23
|
+
/**
|
|
24
|
+
* The gate threshold the args declare. Absent flag → `'low'`, mirroring the
|
|
25
|
+
* tool's own default so the invocation and the verdict can never disagree; an
|
|
26
|
+
* unrecognized value also falls back to `'low'` (gate wider, never narrower,
|
|
27
|
+
* on a typo).
|
|
28
|
+
*/
|
|
29
|
+
export declare function auditLevelFromArgs(args: readonly string[]): AuditLevel;
|
|
30
|
+
/**
|
|
31
|
+
* Run the `security` check against `cwd`. `args` are the resolved adapter args
|
|
32
|
+
* (`audit --audit-level=<l> …`, config overrides included); `--json` is
|
|
33
|
+
* appended when an override dropped it, since the evaluator needs the payload.
|
|
34
|
+
* Never throws: a spawn failure or unparseable output resolves to a failing
|
|
35
|
+
* outcome that surfaces the tool's own message.
|
|
36
|
+
*/
|
|
37
|
+
export declare function checkSecurity(opts: {
|
|
38
|
+
cwd: string;
|
|
39
|
+
command: string;
|
|
40
|
+
args: readonly string[];
|
|
41
|
+
spawn: AuditSpawn;
|
|
42
|
+
timeoutSec?: number;
|
|
43
|
+
}): Promise<CheckOutcome>;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=security.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../src/security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,wFAAwF;AACxF,MAAM,MAAM,UAAU,GAAG,CACvB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,MAAM,KAChB,OAAO,CAAC,YAAY,CAAC,CAAC;AAE3B,kFAAkF;AAClF,QAAA,MAAM,MAAM,kDAAmD,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,UAAU,CAItE;AAoBD;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,YAAY,CAAC,CAqCxB"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in `security` check — `pnpm audit` with checkride owning the verdict.
|
|
3
|
+
*
|
|
4
|
+
* pnpm's JSON mode exits 1 on *any* advisory regardless of `--audit-level`
|
|
5
|
+
* (only table mode lets the level gate the exit code), so judging this slot by
|
|
6
|
+
* exit code made it gate at zero advisories of any severity — not the level
|
|
7
|
+
* the adapter's args declare. The evaluator here runs the audit with `--json`,
|
|
8
|
+
* parses `metadata.vulnerabilities`, and fails only when advisories sit at or
|
|
9
|
+
* above the threshold parsed from the args themselves, so a consumer override
|
|
10
|
+
* of `--audit-level` keeps meaning what it says.
|
|
11
|
+
*
|
|
12
|
+
* "Could not run" (registry unreachable, malformed output) is distinguished
|
|
13
|
+
* from "ran; everything below the level": the former fails with the error
|
|
14
|
+
* surfaced, the latter is green. The raw audit JSON is passed through on
|
|
15
|
+
* stdout, so the orchestrator persists `.check/security.json` as before.
|
|
16
|
+
*/
|
|
17
|
+
import { isRecord } from './json.js';
|
|
18
|
+
import { parseToolJson } from './tool-json.js';
|
|
19
|
+
/** `--audit-level` vocabulary, weakest first. `info` never gates (as in pnpm). */
|
|
20
|
+
const LEVELS = ['low', 'moderate', 'high', 'critical'];
|
|
21
|
+
/**
|
|
22
|
+
* The gate threshold the args declare. Absent flag → `'low'`, mirroring the
|
|
23
|
+
* tool's own default so the invocation and the verdict can never disagree; an
|
|
24
|
+
* unrecognized value also falls back to `'low'` (gate wider, never narrower,
|
|
25
|
+
* on a typo).
|
|
26
|
+
*/
|
|
27
|
+
export function auditLevelFromArgs(args) {
|
|
28
|
+
const flag = args.find((a) => a.startsWith('--audit-level='));
|
|
29
|
+
const value = flag?.slice('--audit-level='.length);
|
|
30
|
+
return LEVELS.find((l) => l === value) ?? 'low';
|
|
31
|
+
}
|
|
32
|
+
/** Per-severity advisory counts out of `metadata.vulnerabilities`, absent keys as 0. */
|
|
33
|
+
function severityCounts(value) {
|
|
34
|
+
if (!isRecord(value))
|
|
35
|
+
return null;
|
|
36
|
+
const metadata = value['metadata'];
|
|
37
|
+
if (!isRecord(metadata))
|
|
38
|
+
return null;
|
|
39
|
+
const vulnerabilities = metadata['vulnerabilities'];
|
|
40
|
+
if (!isRecord(vulnerabilities))
|
|
41
|
+
return null;
|
|
42
|
+
const counts = {};
|
|
43
|
+
for (const [severity, count] of Object.entries(vulnerabilities)) {
|
|
44
|
+
counts[severity] = typeof count === 'number' ? count : 0;
|
|
45
|
+
}
|
|
46
|
+
return counts;
|
|
47
|
+
}
|
|
48
|
+
function fail(stdout, stderr) {
|
|
49
|
+
return { ok: false, exit_code: 1, stdout, stderr };
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Run the `security` check against `cwd`. `args` are the resolved adapter args
|
|
53
|
+
* (`audit --audit-level=<l> …`, config overrides included); `--json` is
|
|
54
|
+
* appended when an override dropped it, since the evaluator needs the payload.
|
|
55
|
+
* Never throws: a spawn failure or unparseable output resolves to a failing
|
|
56
|
+
* outcome that surfaces the tool's own message.
|
|
57
|
+
*/
|
|
58
|
+
export async function checkSecurity(opts) {
|
|
59
|
+
const { cwd, command, spawn, timeoutSec } = opts;
|
|
60
|
+
const args = opts.args.includes('--json') ? [...opts.args] : [...opts.args, '--json'];
|
|
61
|
+
const level = auditLevelFromArgs(args);
|
|
62
|
+
const outcome = await spawn(command, args, cwd, timeoutSec);
|
|
63
|
+
const json = parseToolJson(outcome.stdout);
|
|
64
|
+
const counts = json ? severityCounts(json.value) : null;
|
|
65
|
+
if (!counts) {
|
|
66
|
+
// No parseable verdict — the audit didn't run (registry down, bad flag,
|
|
67
|
+
// timeout), which is a failure to verify, never a pass.
|
|
68
|
+
const detail = outcome.stderr.trim() || outcome.stdout.trim();
|
|
69
|
+
return fail(outcome.stdout, `check-security: ${command} audit produced no readable JSON verdict (exit ${outcome.exit_code})${detail ? `\n${detail.slice(0, 500)}` : ''}\n`);
|
|
70
|
+
}
|
|
71
|
+
const gating = LEVELS.slice(LEVELS.indexOf(level));
|
|
72
|
+
const above = gating.map((s) => [s, counts[s] ?? 0]).filter(([, n]) => n > 0);
|
|
73
|
+
const total = Object.values(counts).reduce((a, b) => a + b, 0);
|
|
74
|
+
if (above.length === 0) {
|
|
75
|
+
const note = total > 0 ? `${total} advisor${total === 1 ? 'y' : 'ies'} below --audit-level=${level}` : 'no advisories';
|
|
76
|
+
return {
|
|
77
|
+
ok: true,
|
|
78
|
+
exit_code: 0,
|
|
79
|
+
stdout: outcome.stdout,
|
|
80
|
+
stderr: `check-security: ${note}; gate clean\n`,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
const breakdown = above.map(([s, n]) => `${n} ${s}`).join(', ');
|
|
84
|
+
return fail(outcome.stdout, `check-security: advisories at or above --audit-level=${level}: ${breakdown}\n`);
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=security.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"security.js","sourceRoot":"","sources":["../src/security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAU/C,kFAAkF;AAClF,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,CAAU,CAAC;AAGhE;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAuB;IACxD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAC9D,MAAM,KAAK,GAAG,IAAI,EAAE,KAAK,CAAC,gBA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AAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAE/D,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,wBAAwB,KAAK,EAAE,CAAC,CAAC,CAAC,eAAe,CAAC;QACvH,OAAO;YACL,EAAE,EAAE,IAAI;YACR,SAAS,EAAE,CAAC;YACZ,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE,mBAAmB,IAAI,gBAAgB;SAChD,CAAC;IACJ,CAAC;IAED,MAAM,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChE,OAAO,IAAI,CACT,OAAO,CAAC,MAAM,EACd,wDAAwD,KAAK,KAAK,SAAS,IAAI,CAChF,CAAC;AACJ,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Built-in `smoke` check
|
|
2
|
+
* Built-in `smoke` check — a **liveness** probe of the built package, not a
|
|
3
3
|
* type check (runtime *shapes* stay attw's job; the slots don't overlap).
|
|
4
4
|
*
|
|
5
5
|
* It enumerates the manifest's `exports` subpaths (falling back to `main`),
|
|
6
6
|
* writes a self-contained probe script under `.check/`, and spawns a fresh
|
|
7
7
|
* `node` on it (never in-process — isolation, the per-check timeout, and the
|
|
8
|
-
* orchestrator's SIGTERM→SIGKILL reaping all apply
|
|
8
|
+
* orchestrator's SIGTERM→SIGKILL reaping all apply). The probe asserts,
|
|
9
9
|
* for every literal subpath:
|
|
10
10
|
*
|
|
11
11
|
* - the built entry `await import()`s without throwing, and (for a dual
|
|
12
|
-
* package,
|
|
12
|
+
* package, that is, a subpath carrying an explicit `require` condition) also
|
|
13
13
|
* `require()`s cleanly — both through package **self-reference**
|
|
14
14
|
* (`import '<pkg>/<subpath>'`), exercising the real `exports`-map resolution
|
|
15
|
-
* a consumer would hit
|
|
15
|
+
* a consumer would hit;
|
|
16
16
|
* - every **value** export named in the matching dist `.d.ts` is present at
|
|
17
17
|
* runtime. Export names come from a conservative, dependency-free `.d.ts`
|
|
18
18
|
* scanner ({@link scanValueExports}) that errs toward *under*-collection: a
|
|
@@ -52,7 +52,7 @@ export type SmokeTarget = {
|
|
|
52
52
|
hasRequire: boolean;
|
|
53
53
|
};
|
|
54
54
|
/**
|
|
55
|
-
* Enumerate the smoke targets from a manifest
|
|
55
|
+
* Enumerate the smoke targets from a manifest: every literal `exports`
|
|
56
56
|
* subpath, or the `main` entry when there is no `exports` field. Wildcard and
|
|
57
57
|
* `null` subpaths are skipped with a reason (they name no single file). The
|
|
58
58
|
* self-reference `specifier` is derived from the package `name`.
|
|
@@ -62,7 +62,7 @@ export declare function enumerateExports(manifest: Record<string, unknown>): {
|
|
|
62
62
|
skipped: SmokeSkip[];
|
|
63
63
|
};
|
|
64
64
|
/**
|
|
65
|
-
* Scan a dist `.d.ts` for the **value** exports a live module must expose
|
|
65
|
+
* Scan a dist `.d.ts` for the **value** exports a live module must expose:
|
|
66
66
|
* `export declare function|const|class|enum` and the non-`type` specifiers of
|
|
67
67
|
* `export { … }` (aliases resolve to the exported name). Type-only forms —
|
|
68
68
|
* `export type`, `export interface`, `export type { … }`, and `{ type X }`
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Built-in `smoke` check
|
|
2
|
+
* Built-in `smoke` check — a **liveness** probe of the built package, not a
|
|
3
3
|
* type check (runtime *shapes* stay attw's job; the slots don't overlap).
|
|
4
4
|
*
|
|
5
5
|
* It enumerates the manifest's `exports` subpaths (falling back to `main`),
|
|
6
6
|
* writes a self-contained probe script under `.check/`, and spawns a fresh
|
|
7
7
|
* `node` on it (never in-process — isolation, the per-check timeout, and the
|
|
8
|
-
* orchestrator's SIGTERM→SIGKILL reaping all apply
|
|
8
|
+
* orchestrator's SIGTERM→SIGKILL reaping all apply). The probe asserts,
|
|
9
9
|
* for every literal subpath:
|
|
10
10
|
*
|
|
11
11
|
* - the built entry `await import()`s without throwing, and (for a dual
|
|
12
|
-
* package,
|
|
12
|
+
* package, that is, a subpath carrying an explicit `require` condition) also
|
|
13
13
|
* `require()`s cleanly — both through package **self-reference**
|
|
14
14
|
* (`import '<pkg>/<subpath>'`), exercising the real `exports`-map resolution
|
|
15
|
-
* a consumer would hit
|
|
15
|
+
* a consumer would hit;
|
|
16
16
|
* - every **value** export named in the matching dist `.d.ts` is present at
|
|
17
17
|
* runtime. Export names come from a conservative, dependency-free `.d.ts`
|
|
18
18
|
* scanner ({@link scanValueExports}) that errs toward *under*-collection: a
|
|
@@ -142,7 +142,7 @@ function mainTarget(manifest) {
|
|
|
142
142
|
return { subpath: '.', specifier: null, importFile: normalize(main), requireFile: null, typesFile, hasRequire: false };
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
|
-
* Enumerate the smoke targets from a manifest
|
|
145
|
+
* Enumerate the smoke targets from a manifest: every literal `exports`
|
|
146
146
|
* subpath, or the `main` entry when there is no `exports` field. Wildcard and
|
|
147
147
|
* `null` subpaths are skipped with a reason (they name no single file). The
|
|
148
148
|
* self-reference `specifier` is derived from the package `name`.
|
|
@@ -196,7 +196,7 @@ function namedExportBinding(spec) {
|
|
|
196
196
|
return exported !== undefined && /^[A-Za-z_$][\w$]*$/.test(exported) ? exported : null;
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
|
-
* Scan a dist `.d.ts` for the **value** exports a live module must expose
|
|
199
|
+
* Scan a dist `.d.ts` for the **value** exports a live module must expose:
|
|
200
200
|
* `export declare function|const|class|enum` and the non-`type` specifiers of
|
|
201
201
|
* `export { … }` (aliases resolve to the exported name). Type-only forms —
|
|
202
202
|
* `export type`, `export interface`, `export type { … }`, and `{ type X }`
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Built-in `snippets` check.
|
|
3
3
|
*
|
|
4
|
-
* A doc snippet typecheck
|
|
5
|
-
* byte-for-byte so the origin repo can adopt the slot verbatim (D11). It pulls
|
|
4
|
+
* A doc snippet typecheck. It pulls
|
|
6
5
|
* fenced ```ts / ```typescript blocks out of `README.md` and the non-recursive
|
|
7
6
|
* `docs/*.md`, and typechecks only the ones explicitly opted in with an HTML
|
|
8
7
|
* comment on the line immediately above the fence:
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
* A tagged snippet that fails to compile is documentation that lies — this
|
|
15
14
|
* turns that into a build failure. Opting the slot in but tagging *nothing* is
|
|
16
15
|
* a misconfiguration, not a vacuous pass, so zero tagged snippets is a hard
|
|
17
|
-
* error ({@link vacuousOptInError}
|
|
16
|
+
* error ({@link vacuousOptInError}).
|
|
18
17
|
*
|
|
19
18
|
* The pure machinery — no filesystem, no spawning:
|
|
20
19
|
*
|
|
@@ -30,7 +29,7 @@
|
|
|
30
29
|
* fields a `tsc --build` project carries, embeds the caller's mode-specific
|
|
31
30
|
* `paths`).
|
|
32
31
|
*
|
|
33
|
-
* Execution
|
|
32
|
+
* Execution, consuming the primitives above:
|
|
34
33
|
*
|
|
35
34
|
* - {@link deriveSrcPaths} resolves **src mode**'s `paths` mapping: the repo's
|
|
36
35
|
* own tsconfig `paths` when present, else the `src/index.ts` convention,
|
|
@@ -46,19 +45,18 @@ import type { CheckOutcome } from './links.js';
|
|
|
46
45
|
import type { PackageManager } from './pm/index.js';
|
|
47
46
|
/**
|
|
48
47
|
* The opt-in marker: an HTML comment `<!-- snippet: check -->` that must sit on
|
|
49
|
-
* the line immediately above a fence for its snippet to be typechecked.
|
|
50
|
-
* fascicle regex (D11).
|
|
48
|
+
* the line immediately above a fence for its snippet to be typechecked.
|
|
51
49
|
*/
|
|
52
50
|
export declare const CHECK_MARKER_RE: RegExp;
|
|
53
|
-
/** An opening fence — `ts` or `typescript` only, nothing else on the line
|
|
51
|
+
/** An opening fence — `ts` or `typescript` only, nothing else on the line. */
|
|
54
52
|
export declare const FENCE_OPEN_RE: RegExp;
|
|
55
53
|
/** A closing fence: three backticks alone on the line. */
|
|
56
54
|
export declare const FENCE_CLOSE_RE: RegExp;
|
|
57
55
|
/**
|
|
58
56
|
* One `ts`/`typescript` fenced block extracted from a doc. `code` is the fence
|
|
59
|
-
* body verbatim (no trailing newline —
|
|
57
|
+
* body verbatim (no trailing newline — {@link checkSnippets} appends one on write); `startLine`
|
|
60
58
|
* is the 1-based line of the opening fence; `checked` is true when a
|
|
61
|
-
* {@link CHECK_MARKER_RE} marker sits on the immediately
|
|
59
|
+
* {@link CHECK_MARKER_RE} marker sits on the immediately preceding line.
|
|
62
60
|
*/
|
|
63
61
|
export type Snippet = {
|
|
64
62
|
code: string;
|
|
@@ -73,7 +71,7 @@ export type DocInput = {
|
|
|
73
71
|
/**
|
|
74
72
|
* One checked snippet in the emission plan: the scratch file to write
|
|
75
73
|
* (`<slug>__<n>.ts`), and the source doc + line it maps back to (the
|
|
76
|
-
* `snippet -> source map:` legend
|
|
74
|
+
* `snippet -> source map:` legend rendered on failure).
|
|
77
75
|
*/
|
|
78
76
|
export type SnippetPlanEntry = {
|
|
79
77
|
name: string;
|
|
@@ -87,7 +85,7 @@ export type SnippetsPlan = {
|
|
|
87
85
|
checked: number;
|
|
88
86
|
skipped: number;
|
|
89
87
|
};
|
|
90
|
-
/** The two modes `snippets` runs in
|
|
88
|
+
/** The two modes `snippets` runs in: fast against `src`, or against built `dist/*.d.ts`. */
|
|
91
89
|
export type SnippetMode = 'src' | 'dist';
|
|
92
90
|
/** The generated tsconfig object (serialized to `.check/doc-snippets/tsconfig.json`). */
|
|
93
91
|
export type SnippetTsconfig = {
|
|
@@ -108,59 +106,58 @@ export type SnippetTsconfig = {
|
|
|
108
106
|
exclude: string[];
|
|
109
107
|
};
|
|
110
108
|
/**
|
|
111
|
-
* Select the doc files to check from a `docs/` directory listing
|
|
109
|
+
* Select the doc files to check from a `docs/` directory listing: always
|
|
112
110
|
* `README.md`, then every non-recursive `docs/*.md` entry, README first and the
|
|
113
111
|
* `docs/` entries in the order given. Pure — the caller does the (non-recursive)
|
|
114
112
|
* `readdir` and passes its entries; a plain entry list means a nested
|
|
115
|
-
* `docs/sub/x.md` never appears (its listing entry `sub` fails `.md`)
|
|
116
|
-
*
|
|
113
|
+
* `docs/sub/x.md` never appears (its listing entry `sub` fails `.md`) —
|
|
114
|
+
* discovery is deliberately non-recursive.
|
|
117
115
|
*/
|
|
118
116
|
export declare function selectDocFiles(docsEntries: readonly string[]): string[];
|
|
119
117
|
/**
|
|
120
|
-
* Parse a doc's markdown into its `ts`/`typescript` fenced blocks
|
|
118
|
+
* Parse a doc's markdown into its `ts`/`typescript` fenced blocks. A block
|
|
121
119
|
* is `checked` when a {@link CHECK_MARKER_RE} marker sits on the line immediately
|
|
122
120
|
* above its opening fence — a marker anywhere else does not count. Untagged
|
|
123
|
-
* blocks are still returned (the caller counts them as skipped).
|
|
124
|
-
* fascicle's `extract_blocks` exactly.
|
|
121
|
+
* blocks are still returned (the caller counts them as skipped).
|
|
125
122
|
*/
|
|
126
123
|
export declare function extractSnippets(text: string): Snippet[];
|
|
127
124
|
/**
|
|
128
125
|
* The scratch-file slug for a doc's repo-relative path: every non-alphanumeric
|
|
129
126
|
* run collapses to a single `_`, with leading/trailing `_` trimmed
|
|
130
|
-
* (`README.md` → `README_md`, `docs/guide.md` → `docs_guide_md`).
|
|
131
|
-
*
|
|
127
|
+
* (`README.md` → `README_md`, `docs/guide.md` → `docs_guide_md`).
|
|
128
|
+
* Distinct docs in the discovered namespace (`README.md` plus the
|
|
132
129
|
* flat `docs/*.md`) map to distinct slugs, so their emitted files never collide.
|
|
133
130
|
*/
|
|
134
131
|
export declare function slugForDoc(relPath: string): string;
|
|
135
132
|
/**
|
|
136
133
|
* The scratch-file name for a block: `<slug>__<n>.ts`, where `n` is the block's
|
|
137
134
|
* 1-based position among *all* ts/typescript fences in its doc (checked or not) —
|
|
138
|
-
* so a skipped fence still advances the number
|
|
135
|
+
* so a skipped fence still advances the number.
|
|
139
136
|
*/
|
|
140
137
|
export declare function snippetFileName(relPath: string, blockIndex: number): string;
|
|
141
138
|
/**
|
|
142
139
|
* Fold a set of docs into the emission plan: every checked block becomes a
|
|
143
140
|
* {@link SnippetPlanEntry} (named, mapped back to `<doc>:<line>`), untagged
|
|
144
141
|
* blocks bump `skipped`. The block index for naming counts all fences in a doc,
|
|
145
|
-
* so a checked block keeps its position even after skipped ones
|
|
146
|
-
*
|
|
142
|
+
* so a checked block keeps its position even after skipped ones. Pure — the
|
|
143
|
+
* caller reads the docs and writes the files.
|
|
147
144
|
*/
|
|
148
145
|
export declare function planSnippets(docs: readonly DocInput[]): SnippetsPlan;
|
|
149
146
|
/**
|
|
150
|
-
* The vacuous-opt-in guard
|
|
147
|
+
* The vacuous-opt-in guard: a plan with no checked snippets is a hard
|
|
151
148
|
* error, not a vacuous green — opting the slot in obligates at least one tagged
|
|
152
|
-
* fence. Returns the error message for
|
|
149
|
+
* fence. Returns the error message for {@link checkSnippets} to surface, or
|
|
153
150
|
* null when the plan has something to check.
|
|
154
151
|
*/
|
|
155
152
|
export declare function vacuousOptInError(plan: SnippetsPlan): string | null;
|
|
156
153
|
/**
|
|
157
|
-
* Build the generated tsconfig
|
|
154
|
+
* Build the generated tsconfig: extend the repo's own config so the
|
|
158
155
|
* snippets inherit its strictness, then relax exactly the three flags that
|
|
159
156
|
* false-positive on illustrative snippets (`verbatimModuleSyntax`,
|
|
160
157
|
* `isolatedModules`, `noPropertyAccessFromIndexSignature`) while keeping the
|
|
161
158
|
* type-correctness flags that catch real API drift. `include` clears the parent's
|
|
162
159
|
* `.check` exclusion so the emitted `./*.ts` are seen; `paths` is the caller's
|
|
163
|
-
* mode-specific module resolution (src vs dist
|
|
160
|
+
* mode-specific module resolution (src vs dist).
|
|
164
161
|
*
|
|
165
162
|
* A `tsc --build` project (composite, `rootDir`/`outDir` pinned to `src`/`dist`
|
|
166
163
|
* for project-reference emit) fails TS6059 on any *source* file outside its
|
|
@@ -181,7 +178,7 @@ export declare function generateSnippetTsconfig(opts: {
|
|
|
181
178
|
export type SnippetSpawn = (command: string, args: string[], cwd: string, timeoutSec?: number) => Promise<CheckOutcome>;
|
|
182
179
|
/**
|
|
183
180
|
* Derive the `paths` mapping **src mode** needs so `import { x } from
|
|
184
|
-
* '<pkg-name>'` resolves against source
|
|
181
|
+
* '<pkg-name>'` resolves against source: the repo's own tsconfig `paths`
|
|
185
182
|
* when present (remapped two directories deeper, to where the generated
|
|
186
183
|
* tsconfig lives), else the `src/index.ts` convention (`<pkg-name>` maps to its
|
|
187
184
|
* root `src/index.ts`) when the manifest names the package and that file
|
|
@@ -195,15 +192,15 @@ export declare function deriveSrcPaths(opts: {
|
|
|
195
192
|
hasSrcIndex: boolean;
|
|
196
193
|
}): Record<string, string[]> | null;
|
|
197
194
|
/**
|
|
198
|
-
* Run the `snippets` check against `cwd` in `mode` (
|
|
199
|
-
*
|
|
195
|
+
* Run the `snippets` check against `cwd` in `mode` (the `snippets` adapter
|
|
196
|
+
* passes `'src'`, `snippets-dist` passes `'dist'`). Discovers the doc
|
|
200
197
|
* set, plans the checked snippets ({@link vacuousOptInError} applies first —
|
|
201
198
|
* zero tagged snippets is a hard error before anything is written), derives
|
|
202
199
|
* the mode's `paths` mapping, emits the scratch files plus a generated
|
|
203
200
|
* tsconfig under `.check/doc-snippets/`, and typechecks them through the
|
|
204
201
|
* injected `spawn`. A compile failure's `stderr` carries tsc's raw output plus
|
|
205
202
|
* the `snippet -> source map:` legend mapping each generated file back to
|
|
206
|
-
* `<doc>:<line
|
|
203
|
+
* `<doc>:<line>`.
|
|
207
204
|
*/
|
|
208
205
|
export declare function checkSnippets(opts: {
|
|
209
206
|
cwd: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippets.d.ts","sourceRoot":"","sources":["../src/snippets.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"snippets.d.ts","sourceRoot":"","sources":["../src/snippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAkC,CAAC;AAE/D,8EAA8E;AAC9E,eAAO,MAAM,aAAa,QAA4B,CAAC;AAEvD,0DAA0D;AAC1D,eAAO,MAAM,cAAc,QAAa,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,gEAAgE;AAChE,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,iFAAiF;AACjF,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,4FAA4F;AAC5F,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;AAEzC,yFAAyF;AACzF,MAAM,MAAM,eAAe,GAAG;IAC5B,O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8FAA8F;AAC9F,MAAM,MAAM,YAAY,GAAG,CACzB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,EACX,UAAU,CAAC,EAAE,MAAM,KAChB,OAAO,CAAC,YAAY,CAAC,CAAC;AAwE3B;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE;IACnC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC;IACxD,WAAW,EAAE,OAAO,CAAC;CACtB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAYlC;AAuBD;;;;;;;;;;GAUG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,WAAW,CAAC;IAClB,EAAE,EAAE,cAAc,CAAC;IACnB,KAAK,EAAE,YAAY,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,YAAY,CAAC,CAqDxB"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Built-in `snippets` check.
|
|
3
3
|
*
|
|
4
|
-
* A doc snippet typecheck
|
|
5
|
-
* byte-for-byte so the origin repo can adopt the slot verbatim (D11). It pulls
|
|
4
|
+
* A doc snippet typecheck. It pulls
|
|
6
5
|
* fenced ```ts / ```typescript blocks out of `README.md` and the non-recursive
|
|
7
6
|
* `docs/*.md`, and typechecks only the ones explicitly opted in with an HTML
|
|
8
7
|
* comment on the line immediately above the fence:
|
|
@@ -14,7 +13,7 @@
|
|
|
14
13
|
* A tagged snippet that fails to compile is documentation that lies — this
|
|
15
14
|
* turns that into a build failure. Opting the slot in but tagging *nothing* is
|
|
16
15
|
* a misconfiguration, not a vacuous pass, so zero tagged snippets is a hard
|
|
17
|
-
* error ({@link vacuousOptInError}
|
|
16
|
+
* error ({@link vacuousOptInError}).
|
|
18
17
|
*
|
|
19
18
|
* The pure machinery — no filesystem, no spawning:
|
|
20
19
|
*
|
|
@@ -30,7 +29,7 @@
|
|
|
30
29
|
* fields a `tsc --build` project carries, embeds the caller's mode-specific
|
|
31
30
|
* `paths`).
|
|
32
31
|
*
|
|
33
|
-
* Execution
|
|
32
|
+
* Execution, consuming the primitives above:
|
|
34
33
|
*
|
|
35
34
|
* - {@link deriveSrcPaths} resolves **src mode**'s `paths` mapping: the repo's
|
|
36
35
|
* own tsconfig `paths` when present, else the `src/index.ts` convention,
|
|
@@ -48,21 +47,20 @@ import { join } from 'node:path';
|
|
|
48
47
|
import { translateExec } from './pm/index.js';
|
|
49
48
|
/**
|
|
50
49
|
* The opt-in marker: an HTML comment `<!-- snippet: check -->` that must sit on
|
|
51
|
-
* the line immediately above a fence for its snippet to be typechecked.
|
|
52
|
-
* fascicle regex (D11).
|
|
50
|
+
* the line immediately above a fence for its snippet to be typechecked.
|
|
53
51
|
*/
|
|
54
52
|
export const CHECK_MARKER_RE = /<!--\s*snippet:\s*check\s*-->/;
|
|
55
|
-
/** An opening fence — `ts` or `typescript` only, nothing else on the line
|
|
53
|
+
/** An opening fence — `ts` or `typescript` only, nothing else on the line. */
|
|
56
54
|
export const FENCE_OPEN_RE = /^```(ts|typescript)\s*$/;
|
|
57
55
|
/** A closing fence: three backticks alone on the line. */
|
|
58
56
|
export const FENCE_CLOSE_RE = /^```\s*$/;
|
|
59
57
|
/**
|
|
60
|
-
* Select the doc files to check from a `docs/` directory listing
|
|
58
|
+
* Select the doc files to check from a `docs/` directory listing: always
|
|
61
59
|
* `README.md`, then every non-recursive `docs/*.md` entry, README first and the
|
|
62
60
|
* `docs/` entries in the order given. Pure — the caller does the (non-recursive)
|
|
63
61
|
* `readdir` and passes its entries; a plain entry list means a nested
|
|
64
|
-
* `docs/sub/x.md` never appears (its listing entry `sub` fails `.md`)
|
|
65
|
-
*
|
|
62
|
+
* `docs/sub/x.md` never appears (its listing entry `sub` fails `.md`) —
|
|
63
|
+
* discovery is deliberately non-recursive.
|
|
66
64
|
*/
|
|
67
65
|
export function selectDocFiles(docsEntries) {
|
|
68
66
|
const files = ['README.md'];
|
|
@@ -73,11 +71,10 @@ export function selectDocFiles(docsEntries) {
|
|
|
73
71
|
return files;
|
|
74
72
|
}
|
|
75
73
|
/**
|
|
76
|
-
* Parse a doc's markdown into its `ts`/`typescript` fenced blocks
|
|
74
|
+
* Parse a doc's markdown into its `ts`/`typescript` fenced blocks. A block
|
|
77
75
|
* is `checked` when a {@link CHECK_MARKER_RE} marker sits on the line immediately
|
|
78
76
|
* above its opening fence — a marker anywhere else does not count. Untagged
|
|
79
|
-
* blocks are still returned (the caller counts them as skipped).
|
|
80
|
-
* fascicle's `extract_blocks` exactly.
|
|
77
|
+
* blocks are still returned (the caller counts them as skipped).
|
|
81
78
|
*/
|
|
82
79
|
export function extractSnippets(text) {
|
|
83
80
|
const lines = text.split('\n');
|
|
@@ -102,8 +99,8 @@ export function extractSnippets(text) {
|
|
|
102
99
|
/**
|
|
103
100
|
* The scratch-file slug for a doc's repo-relative path: every non-alphanumeric
|
|
104
101
|
* run collapses to a single `_`, with leading/trailing `_` trimmed
|
|
105
|
-
* (`README.md` → `README_md`, `docs/guide.md` → `docs_guide_md`).
|
|
106
|
-
*
|
|
102
|
+
* (`README.md` → `README_md`, `docs/guide.md` → `docs_guide_md`).
|
|
103
|
+
* Distinct docs in the discovered namespace (`README.md` plus the
|
|
107
104
|
* flat `docs/*.md`) map to distinct slugs, so their emitted files never collide.
|
|
108
105
|
*/
|
|
109
106
|
export function slugForDoc(relPath) {
|
|
@@ -112,7 +109,7 @@ export function slugForDoc(relPath) {
|
|
|
112
109
|
/**
|
|
113
110
|
* The scratch-file name for a block: `<slug>__<n>.ts`, where `n` is the block's
|
|
114
111
|
* 1-based position among *all* ts/typescript fences in its doc (checked or not) —
|
|
115
|
-
* so a skipped fence still advances the number
|
|
112
|
+
* so a skipped fence still advances the number.
|
|
116
113
|
*/
|
|
117
114
|
export function snippetFileName(relPath, blockIndex) {
|
|
118
115
|
return `${slugForDoc(relPath)}__${blockIndex}.ts`;
|
|
@@ -121,8 +118,8 @@ export function snippetFileName(relPath, blockIndex) {
|
|
|
121
118
|
* Fold a set of docs into the emission plan: every checked block becomes a
|
|
122
119
|
* {@link SnippetPlanEntry} (named, mapped back to `<doc>:<line>`), untagged
|
|
123
120
|
* blocks bump `skipped`. The block index for naming counts all fences in a doc,
|
|
124
|
-
* so a checked block keeps its position even after skipped ones
|
|
125
|
-
*
|
|
121
|
+
* so a checked block keeps its position even after skipped ones. Pure — the
|
|
122
|
+
* caller reads the docs and writes the files.
|
|
126
123
|
*/
|
|
127
124
|
export function planSnippets(docs) {
|
|
128
125
|
const entries = [];
|
|
@@ -146,9 +143,9 @@ export function planSnippets(docs) {
|
|
|
146
143
|
return { entries, checked, skipped };
|
|
147
144
|
}
|
|
148
145
|
/**
|
|
149
|
-
* The vacuous-opt-in guard
|
|
146
|
+
* The vacuous-opt-in guard: a plan with no checked snippets is a hard
|
|
150
147
|
* error, not a vacuous green — opting the slot in obligates at least one tagged
|
|
151
|
-
* fence. Returns the error message for
|
|
148
|
+
* fence. Returns the error message for {@link checkSnippets} to surface, or
|
|
152
149
|
* null when the plan has something to check.
|
|
153
150
|
*/
|
|
154
151
|
export function vacuousOptInError(plan) {
|
|
@@ -157,13 +154,13 @@ export function vacuousOptInError(plan) {
|
|
|
157
154
|
return 'no tagged snippets found — refusing to pass vacuously (add a `<!-- snippet: check -->` marker above a ts/typescript fence)';
|
|
158
155
|
}
|
|
159
156
|
/**
|
|
160
|
-
* Build the generated tsconfig
|
|
157
|
+
* Build the generated tsconfig: extend the repo's own config so the
|
|
161
158
|
* snippets inherit its strictness, then relax exactly the three flags that
|
|
162
159
|
* false-positive on illustrative snippets (`verbatimModuleSyntax`,
|
|
163
160
|
* `isolatedModules`, `noPropertyAccessFromIndexSignature`) while keeping the
|
|
164
161
|
* type-correctness flags that catch real API drift. `include` clears the parent's
|
|
165
162
|
* `.check` exclusion so the emitted `./*.ts` are seen; `paths` is the caller's
|
|
166
|
-
* mode-specific module resolution (src vs dist
|
|
163
|
+
* mode-specific module resolution (src vs dist).
|
|
167
164
|
*
|
|
168
165
|
* A `tsc --build` project (composite, `rootDir`/`outDir` pinned to `src`/`dist`
|
|
169
166
|
* for project-reference emit) fails TS6059 on any *source* file outside its
|
|
@@ -201,7 +198,7 @@ function isRecord(value) {
|
|
|
201
198
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
202
199
|
}
|
|
203
200
|
/**
|
|
204
|
-
* Read the doc set
|
|
201
|
+
* Read the doc set: `README.md` plus non-recursive `docs/*.md`, skipping
|
|
205
202
|
* any that don't exist — a repo with no `docs/` directory (or no `README.md`)
|
|
206
203
|
* still runs on what it has; an empty result is caught by
|
|
207
204
|
* {@link vacuousOptInError}.
|
|
@@ -237,9 +234,8 @@ async function readManifestName(cwd) {
|
|
|
237
234
|
}
|
|
238
235
|
/**
|
|
239
236
|
* The repo's own `tsconfig.json`'s **own** `compilerOptions.paths` (not resolved
|
|
240
|
-
* through its `extends` chain —
|
|
241
|
-
*
|
|
242
|
-
* absent, unreadable, or empty.
|
|
237
|
+
* through its `extends` chain — self-referencing paths are expected directly on
|
|
238
|
+
* the root file), or null when absent, unreadable, or empty.
|
|
243
239
|
*/
|
|
244
240
|
async function readOwnTsconfigPaths(cwd) {
|
|
245
241
|
try {
|
|
@@ -266,7 +262,7 @@ function remapRootRelative(target) {
|
|
|
266
262
|
}
|
|
267
263
|
/**
|
|
268
264
|
* Derive the `paths` mapping **src mode** needs so `import { x } from
|
|
269
|
-
* '<pkg-name>'` resolves against source
|
|
265
|
+
* '<pkg-name>'` resolves against source: the repo's own tsconfig `paths`
|
|
270
266
|
* when present (remapped two directories deeper, to where the generated
|
|
271
267
|
* tsconfig lives), else the `src/index.ts` convention (`<pkg-name>` maps to its
|
|
272
268
|
* root `src/index.ts`) when the manifest names the package and that file
|
|
@@ -301,15 +297,15 @@ function runTsc(cwd, tsconfigRelPath, pm, spawn, timeoutSec) {
|
|
|
301
297
|
return spawn(command, args, cwd, timeoutSec);
|
|
302
298
|
}
|
|
303
299
|
/**
|
|
304
|
-
* Run the `snippets` check against `cwd` in `mode` (
|
|
305
|
-
*
|
|
300
|
+
* Run the `snippets` check against `cwd` in `mode` (the `snippets` adapter
|
|
301
|
+
* passes `'src'`, `snippets-dist` passes `'dist'`). Discovers the doc
|
|
306
302
|
* set, plans the checked snippets ({@link vacuousOptInError} applies first —
|
|
307
303
|
* zero tagged snippets is a hard error before anything is written), derives
|
|
308
304
|
* the mode's `paths` mapping, emits the scratch files plus a generated
|
|
309
305
|
* tsconfig under `.check/doc-snippets/`, and typechecks them through the
|
|
310
306
|
* injected `spawn`. A compile failure's `stderr` carries tsc's raw output plus
|
|
311
307
|
* the `snippet -> source map:` legend mapping each generated file back to
|
|
312
|
-
* `<doc>:<line
|
|
308
|
+
* `<doc>:<line>`.
|
|
313
309
|
*/
|
|
314
310
|
export async function checkSnippets(opts) {
|
|
315
311
|
const { cwd, mode, pm, spawn, timeoutSec } = opts;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippets.js","sourceRoot":"","sources":["../src/snippets.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"snippets.js","sourceRoot":"","sources":["../src/snippets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAIjC,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9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