@homeflare/config 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,15 +9,16 @@ bun add -D @homeflare/config
9
9
 
10
10
  ## What it gives you
11
11
 
12
- | file | how to use it |
13
- | -------------------- | ------------------------------------------------ |
14
- | `tsconfig.base.json` | `extends` — owned code, full strictness |
15
- | `tsconfig.app.json` | `extends` — Worker apps (source-publishing deps) |
16
- | `tsconfig.lib.json` | `extends` — packages that publish types |
17
- | `oxlintrc.json` | `extends` — libraries |
18
- | `oxlintrc.app.json` | `extends` — Worker / TanStack / Alchemy apps |
19
- | `oxfmtrc.json` | copy to `.oxfmtrc.json` |
20
- | `bunfig.toml` | copy to `bunfig.toml` |
12
+ | file | how to use it |
13
+ | -------------------- | --------------------------------------------------------- |
14
+ | `tsconfig.base.json` | `extends` — owned code, full strictness |
15
+ | `tsconfig.app.json` | `extends` — Worker apps (source-publishing deps) |
16
+ | `tsconfig.lib.json` | `extends` — packages that publish types |
17
+ | `oxlintrc.json` | `extends` — libraries |
18
+ | `oxlintrc.app.json` | `extends` — Worker / TanStack / Alchemy apps |
19
+ | `oxfmtrc.json` | copy to `.oxfmtrc.json` |
20
+ | `bunfig.toml` | copy to `bunfig.toml` |
21
+ | `./versions` | `import` — [the estate's version set](./docs/versions.md) |
21
22
 
22
23
  ## tsconfig
23
24
 
@@ -1 +1 @@
1
- {"version":3,"file":"gates.d.ts","sourceRoot":"","sources":["../../src/hooks/gates.ts"],"names":[],"mappings":"AAeA;;;;;;GAMG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8C3D;AAED;;;;;;;;GAQG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBzD"}
1
+ {"version":3,"file":"gates.d.ts","sourceRoot":"","sources":["../../src/hooks/gates.ts"],"names":[],"mappings":"AAeA;;;;;;GAMG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA8C3D;AAED;;;;;;;;GAQG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBzD"}
@@ -10,8 +10,11 @@
10
10
  */
11
11
  /** The two hooks this package implements. Named exactly as the git hook files are. */
12
12
  export type Hook = 'pre-commit' | 'pre-push';
13
- /** Run a command, streaming its output. Returns its exit code. */
14
- export declare function run(cmd: readonly string[]): Promise<number>;
13
+ /**
14
+ * Run a command, streaming its output. Returns its exit code.
15
+ * `isolated` drops the inherited `GIT_*` variables — see `withoutGitEnv`.
16
+ */
17
+ export declare function run(cmd: readonly string[], isolated?: boolean): Promise<number>;
15
18
  /** Capture a command's stdout. Used for git plumbing only. */
16
19
  export declare function capture(cmd: readonly string[]): Promise<string>;
17
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/hooks/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,sFAAsF;AACtF,MAAM,MAAM,IAAI,GAAG,YAAY,GAAG,UAAU,CAAC;AAO7C,kEAAkE;AAClE,wBAAsB,GAAG,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAGjE;AAED,8DAA8D;AAC9D,wBAAsB,OAAO,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAKrE;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAGlE;AAaD,wBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAErC;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED,8FAA8F;AAC9F,wBAAgB,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,CAKjE"}
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/hooks/report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,sFAAsF;AACtF,MAAM,MAAM,IAAI,GAAG,YAAY,GAAG,UAAU,CAAC;AAwB7C;;;GAGG;AACH,wBAAsB,GAAG,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,UAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAOnF;AAED,8DAA8D;AAC9D,wBAAsB,OAAO,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAKrE;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAGlE;AAaD,wBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAErC;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED,8FAA8F;AAC9F,wBAAgB,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,KAAK,CAKjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"staged.d.ts","sourceRoot":"","sources":["../../src/hooks/staged.ts"],"names":[],"mappings":"AAkBA,MAAM,MAAM,MAAM,GAAG;IACnB,kEAAkE;IAClE,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,wEAAwE;IACxE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,CAAC;AAOF,uFAAuF;AACvF,wBAAsB,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAU9C;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAQjG"}
1
+ {"version":3,"file":"staged.d.ts","sourceRoot":"","sources":["../../src/hooks/staged.ts"],"names":[],"mappings":"AAkBA,MAAM,MAAM,MAAM,GAAG;IACnB,kEAAkE;IAClE,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,wEAAwE;IACxE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC,CAAC;AAcF,uFAAuF;AACvF,wBAAsB,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAU9C;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAQjG"}
package/dist/hooks.js CHANGED
@@ -4,8 +4,15 @@ var BYPASS = {
4
4
  "pre-commit": "git commit --no-verify",
5
5
  "pre-push": "git push --no-verify"
6
6
  };
7
- async function run(cmd) {
8
- const proc = Bun.spawn([...cmd], { stdout: "inherit", stderr: "inherit" });
7
+ function withoutGitEnv() {
8
+ return Object.fromEntries(Object.entries(process.env).filter(([name]) => !name.startsWith("GIT_")));
9
+ }
10
+ async function run(cmd, isolated = false) {
11
+ const proc = Bun.spawn([...cmd], {
12
+ stdout: "inherit",
13
+ stderr: "inherit",
14
+ ...isolated ? { env: withoutGitEnv() } : {}
15
+ });
9
16
  return await proc.exited;
10
17
  }
11
18
  async function capture(cmd) {
@@ -41,9 +48,8 @@ function fail(hook, what, fix) {
41
48
  var FORMATTABLE = /\.(ts|tsx|js|jsx|mjs|cjs|json|jsonc|md)$/;
42
49
  var CODE = /\.(ts|tsx|js|jsx|mjs|cjs)$/;
43
50
  async function names(args) {
44
- const out = await capture(["git", ...args]);
45
- return out.split(`
46
- `).filter((line2) => line2.length > 0);
51
+ const out = await capture(["git", ...args, "-z"]);
52
+ return out.split("\x00").filter((line2) => line2.length > 0);
47
53
  }
48
54
  async function staged() {
49
55
  const indexed = await names(["diff", "--cached", "--name-only", "--diff-filter=ACMR"]);
@@ -106,7 +112,7 @@ async function prePush(root) {
106
112
  }
107
113
  note("pre-push: running `bun run check` \u2014 the same gate CI runs");
108
114
  const started = Bun.nanoseconds();
109
- if (await run(["bun", "run", "check"]) !== 0) {
115
+ if (await run(["bun", "run", "check"], true) !== 0) {
110
116
  fail("pre-push", "bun run check failed \u2014 CI would fail the same way, on a shared runner", "bun run lint:fix, then bun run check until it is green");
111
117
  }
112
118
  ok(`pre-push: bun run check passed in ${((Bun.nanoseconds() - started) / 1e9).toFixed(1)}s`);
@@ -192,5 +198,5 @@ export {
192
198
  runCommand
193
199
  };
194
200
 
195
- //# debugId=C234A537C7D6F0D364756E2164756E21
201
+ //# debugId=3480C5F48A0E1AD864756E2164756E21
196
202
  //# sourceMappingURL=hooks.js.map
package/dist/hooks.js.map CHANGED
@@ -2,13 +2,13 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/hooks/report.ts", "../src/hooks/staged.ts", "../src/hooks/gates.ts", "../src/hooks/install.ts", "../src/hooks.ts"],
4
4
  "sourcesContent": [
5
- "/**\n * How a hook talks to whoever triggered it.\n *\n * ★ EVERY FAILURE PRINTS BOTH COMMANDS — the one that fixes it and the one that skips\n * it. A hook that exits non-zero and says nothing teaches `--no-verify` as a reflex,\n * and that switch turns off every check rather than the one that was wrong.\n *\n * ⚠️ Output goes to STDERR. Git hooks share stdout with porcelain in some flows, and a\n * hook that writes there can corrupt what a caller is parsing.\n */\n\n/** The two hooks this package implements. Named exactly as the git hook files are. */\nexport type Hook = 'pre-commit' | 'pre-push';\n\nconst BYPASS: Record<Hook, string> = {\n 'pre-commit': 'git commit --no-verify',\n 'pre-push': 'git push --no-verify',\n};\n\n/** Run a command, streaming its output. Returns its exit code. */\nexport async function run(cmd: readonly string[]): Promise<number> {\n const proc = Bun.spawn([...cmd], { stdout: 'inherit', stderr: 'inherit' });\n return await proc.exited;\n}\n\n/** Capture a command's stdout. Used for git plumbing only. */\nexport async function capture(cmd: readonly string[]): Promise<string> {\n const proc = Bun.spawn([...cmd], { stdout: 'pipe', stderr: 'ignore' });\n const text = await new Response(proc.stdout).text();\n await proc.exited;\n return text;\n}\n\n/**\n * Resolve a dev tool to the project's own copy.\n *\n * ⚠️ NOT `bunx` BY DEFAULT. On a cache miss `bunx` downloads from the registry, and a\n * git hook that reaches the network mid-commit is a hang waiting for a flaky link.\n * husky puts `node_modules/.bin` on PATH, but this runs outside husky in tests, so\n * the local binary is named outright when it exists and `bunx` is only the fallback.\n */\nexport function tool(root: string, name: string): readonly string[] {\n const local = `${root}/node_modules/.bin/${name}`;\n return Bun.file(local).size > 0 ? [local] : ['bunx', name];\n}\n\n/**\n * ⚠️ `process.stderr.write`, NOT `console`. Two reasons, and the lint rule is the lesser\n * one: a hook shares stdout with git porcelain in some flows, and a synchronous write\n * is the only kind guaranteed to land before `process.exit` below throws the buffer\n * away. Using `console.error` here would also make every consumer of this package\n * need a `no-console` exemption for code they never call directly.\n */\nfunction line(text: string): void {\n process.stderr.write(`${text}\\n`);\n}\n\nexport function ok(what: string): void {\n line(`✓ ${what}`);\n}\n\nexport function note(what: string): void {\n line(` ${what}`);\n}\n\n/** ⛔ ALWAYS GIVE THE FIX. \"lint failed\" is a dead end; the command that repairs it is not. */\nexport function fail(hook: Hook, what: string, fix: string): never {\n line(`\\n✗ ${hook}: ${what}`);\n line(` fix: ${fix}`);\n line(` bypass: ${BYPASS[hook]} — CI still runs the real gate\\n`);\n process.exit(1);\n}\n",
6
- "/**\n * What git has staged, split by what the hook may safely touch.\n *\n * ⛔ A STAGED FILE THAT ALSO HAS UNSTAGED EDITS IS OFF LIMITS. Formatting it in place\n * and running `git add` would sweep the contributor's work-in-progress into a commit\n * they did not ask for — the single worst thing a hook can do. Those files are\n * reported and checked, never rewritten.\n */\nimport { capture } from './report.ts';\n\n/**\n * ⚠️ `.md` IS IN THIS LIST ON PURPOSE. House `oxfmt` formats markdown, so a hook that\n * skipped it would let an unformatted changeset through and CI would fail a commit\n * that looked clean locally. A hook must check what CI checks or it trains distrust.\n */\nconst FORMATTABLE = /\\.(ts|tsx|js|jsx|mjs|cjs|json|jsonc|md)$/;\nconst CODE = /\\.(ts|tsx|js|jsx|mjs|cjs)$/;\n\nexport type Staged = {\n /** Fully staged and formattable — safe to rewrite and restage. */\n readonly formattable: readonly string[];\n /** The subset of `formattable` that oxlint understands. */\n readonly code: readonly string[];\n /** Staged but also dirty in the worktree — checked, never rewritten. */\n readonly partial: readonly string[];\n};\n\nasync function names(args: readonly string[]): Promise<readonly string[]> {\n const out = await capture(['git', ...args]);\n return out.split('\\n').filter((line) => line.length > 0);\n}\n\n/** Classify the index. Deletions are excluded — there is nothing to format in them. */\nexport async function staged(): Promise<Staged> {\n const indexed = await names(['diff', '--cached', '--name-only', '--diff-filter=ACMR']);\n const dirty = new Set(await names(['diff', '--name-only', '--diff-filter=ACMR']));\n const candidates = indexed.filter((file) => FORMATTABLE.test(file));\n\n return {\n formattable: candidates.filter((file) => !dirty.has(file)),\n code: candidates.filter((file) => !dirty.has(file) && CODE.test(file)),\n partial: candidates.filter((file) => dirty.has(file)),\n };\n}\n\n/**\n * Content fingerprints, so only the files a formatter actually changed get restaged.\n *\n * ★ WHY NOT RESTAGE EVERYTHING. `git add` on an untouched file is harmless but noisy:\n * the hook would claim it rewrote files it left alone, and a hook that overstates\n * what it did is one nobody reads.\n */\nexport async function fingerprints(files: readonly string[]): Promise<ReadonlyMap<string, string>> {\n const out = new Map<string, string>();\n for (const file of files) {\n const handle = Bun.file(file);\n if (!(await handle.exists())) continue;\n out.set(file, String(Bun.hash(await handle.arrayBuffer())));\n }\n return out;\n}\n",
7
- "/**\n * The two gates every HomeFlare repo gets, from one place.\n *\n * ★ THE SPLIT IS BY COST. `pre-commit` touches only the staged files and is measured in\n * hundreds of milliseconds, so it can run on every commit without anyone resenting\n * it. `pre-push` runs the repo's own `bun run check` — seconds, once, before the\n * change costs a slot on the shared self-hosted runner.\n *\n * ⚠️ NEITHER IS A GATE. Both are skippable with `--no-verify` and neither exists in a\n * fresh clone until `bun install` runs `prepare`. The required checks on `main` stay\n * the gate; these only make the cheap mistakes cheap to find.\n */\nimport { fail, note, ok, run, tool } from './report.ts';\nimport { fingerprints, staged } from './staged.ts';\n\n/**\n * Format and lint what is staged, restaging only what the formatter rewrote.\n *\n * ⚠️ THIS HOOK REWRITES FILES DURING A COMMIT, and it says so on the line where it\n * happens. Without the restage, oxfmt would fix the worktree while the commit kept\n * the unformatted bytes — CI then fails on a file that reads as correct locally.\n */\nexport async function preCommit(root: string): Promise<void> {\n const oxfmt = tool(root, 'oxfmt');\n const { formattable, code, partial } = await staged();\n\n // ⛔ Checked, never rewritten — see staged.ts for why `git add` here would be theft.\n if (partial.length > 0) {\n note(`${partial.length} staged file(s) also have unstaged edits; checking without rewriting`);\n if ((await run([...oxfmt, '--check', ...partial])) !== 0) {\n fail(\n 'pre-commit',\n 'those partially staged files are unformatted, and rewriting them would stage your unstaged work',\n 'bun run format, then stage the files you meant to commit',\n );\n }\n }\n\n if (formattable.length === 0) {\n ok('pre-commit: nothing staged to format');\n return;\n }\n\n const before = await fingerprints(formattable);\n if ((await run([...oxfmt, ...formattable])) !== 0) {\n fail('pre-commit', 'oxfmt could not format the staged files', 'bun run format');\n }\n const after = await fingerprints(formattable);\n const rewritten = formattable.filter((file) => before.get(file) !== after.get(file));\n\n if (rewritten.length > 0) {\n note(`oxfmt rewrote and restaged ${rewritten.length} file(s): ${rewritten.join(', ')}`);\n if ((await run(['git', 'add', '--', ...rewritten])) !== 0) {\n fail('pre-commit', 'could not restage the formatted files', 'git add the listed files');\n }\n }\n\n // ⚠️ `--deny-warnings` matches what CI runs. A hook that is laxer than CI is worse\n // than no hook: it certifies a change CI will reject.\n if (code.length > 0 && (await run([...tool(root, 'oxlint'), '--deny-warnings', ...code])) !== 0) {\n fail(\n 'pre-commit',\n `oxlint found problems in ${code.length} staged file(s)`,\n 'bun run lint:fix, then fix by hand what remains',\n );\n }\n\n ok(`pre-commit: ${formattable.length} staged file(s) formatted and linted`);\n}\n\n/**\n * Run the repo's own declared gate before the push reaches the runner.\n *\n * ★ IT CALLS `bun run check` RATHER THAN NAMING TOOLS. Every repo's `check` is the\n * command CI runs; hard-coding `tsc` and `bun test` here would drift from whichever\n * repo added a step, and the hook would certify a push CI rejects.\n * ⛔ It does not widen a narrow `check`. If a repo's gate only looks at part of the\n * tree, this hook inherits exactly that blind spot — fix the script, not the hook.\n */\nexport async function prePush(root: string): Promise<void> {\n const manifest = Bun.file(`${root}/package.json`);\n const pkg = (await manifest.exists())\n ? ((await manifest.json()) as { scripts?: Record<string, string> })\n : {};\n\n if (pkg.scripts?.['check'] === undefined) {\n note('pre-push: no `check` script declared in package.json; nothing to run');\n return;\n }\n\n note('pre-push: running `bun run check` — the same gate CI runs');\n const started = Bun.nanoseconds();\n if ((await run(['bun', 'run', 'check'])) !== 0) {\n fail(\n 'pre-push',\n 'bun run check failed — CI would fail the same way, on a shared runner',\n 'bun run lint:fix, then bun run check until it is green',\n );\n }\n\n ok(`pre-push: bun run check passed in ${((Bun.nanoseconds() - started) / 1e9).toFixed(1)}s`);\n}\n",
5
+ "/**\n * How a hook talks to whoever triggered it.\n *\n * ★ EVERY FAILURE PRINTS BOTH COMMANDS — the one that fixes it and the one that skips\n * it. A hook that exits non-zero and says nothing teaches `--no-verify` as a reflex,\n * and that switch turns off every check rather than the one that was wrong.\n *\n * ⚠️ Output goes to STDERR. Git hooks share stdout with porcelain in some flows, and a\n * hook that writes there can corrupt what a caller is parsing.\n */\n\n/** The two hooks this package implements. Named exactly as the git hook files are. */\nexport type Hook = 'pre-commit' | 'pre-push';\n\nconst BYPASS: Record<Hook, string> = {\n 'pre-commit': 'git commit --no-verify',\n 'pre-push': 'git push --no-verify',\n};\n\n/**\n * 🔴 A GIT HOOK EXPORTS `GIT_DIR` AND `GIT_INDEX_FILE`, AND EVERYTHING IT SPAWNS\n * INHERITS THEM. Measured 2026-09-22 at the cost of two junk files and a stray commit\n * on this repository's `main`: `pre-push` runs `bun run check`, `check` runs the test\n * suite, and a test that builds a throwaway git repository and commits in it commits\n * into THIS repository instead — `cwd` is ignored once `GIT_DIR` is set. The estate's\n * own `packages/site/tests/checkout.test.ts` already carried a comment warning about\n * exactly this, which is how much a convention is worth.\n * ⛔ So the hook strips them rather than trusting fourteen test suites to remember. The\n * gate must see the repository through `cwd`, the way CI does.\n */\nfunction withoutGitEnv(): Record<string, string | undefined> {\n return Object.fromEntries(\n Object.entries(process.env).filter(([name]) => !name.startsWith('GIT_')),\n );\n}\n\n/**\n * Run a command, streaming its output. Returns its exit code.\n * `isolated` drops the inherited `GIT_*` variables — see `withoutGitEnv`.\n */\nexport async function run(cmd: readonly string[], isolated = false): Promise<number> {\n const proc = Bun.spawn([...cmd], {\n stdout: 'inherit',\n stderr: 'inherit',\n ...(isolated ? { env: withoutGitEnv() } : {}),\n });\n return await proc.exited;\n}\n\n/** Capture a command's stdout. Used for git plumbing only. */\nexport async function capture(cmd: readonly string[]): Promise<string> {\n const proc = Bun.spawn([...cmd], { stdout: 'pipe', stderr: 'ignore' });\n const text = await new Response(proc.stdout).text();\n await proc.exited;\n return text;\n}\n\n/**\n * Resolve a dev tool to the project's own copy.\n *\n * ⚠️ NOT `bunx` BY DEFAULT. On a cache miss `bunx` downloads from the registry, and a\n * git hook that reaches the network mid-commit is a hang waiting for a flaky link.\n * husky puts `node_modules/.bin` on PATH, but this runs outside husky in tests, so\n * the local binary is named outright when it exists and `bunx` is only the fallback.\n */\nexport function tool(root: string, name: string): readonly string[] {\n const local = `${root}/node_modules/.bin/${name}`;\n return Bun.file(local).size > 0 ? [local] : ['bunx', name];\n}\n\n/**\n * ⚠️ `process.stderr.write`, NOT `console`. Two reasons, and the lint rule is the lesser\n * one: a hook shares stdout with git porcelain in some flows, and a synchronous write\n * is the only kind guaranteed to land before `process.exit` below throws the buffer\n * away. Using `console.error` here would also make every consumer of this package\n * need a `no-console` exemption for code they never call directly.\n */\nfunction line(text: string): void {\n process.stderr.write(`${text}\\n`);\n}\n\nexport function ok(what: string): void {\n line(`✓ ${what}`);\n}\n\nexport function note(what: string): void {\n line(` ${what}`);\n}\n\n/** ⛔ ALWAYS GIVE THE FIX. \"lint failed\" is a dead end; the command that repairs it is not. */\nexport function fail(hook: Hook, what: string, fix: string): never {\n line(`\\n✗ ${hook}: ${what}`);\n line(` fix: ${fix}`);\n line(` bypass: ${BYPASS[hook]} — CI still runs the real gate\\n`);\n process.exit(1);\n}\n",
6
+ "/**\n * What git has staged, split by what the hook may safely touch.\n *\n * ⛔ A STAGED FILE THAT ALSO HAS UNSTAGED EDITS IS OFF LIMITS. Formatting it in place\n * and running `git add` would sweep the contributor's work-in-progress into a commit\n * they did not ask for — the single worst thing a hook can do. Those files are\n * reported and checked, never rewritten.\n */\nimport { capture } from './report.ts';\n\n/**\n * ⚠️ `.md` IS IN THIS LIST ON PURPOSE. House `oxfmt` formats markdown, so a hook that\n * skipped it would let an unformatted changeset through and CI would fail a commit\n * that looked clean locally. A hook must check what CI checks or it trains distrust.\n */\nconst FORMATTABLE = /\\.(ts|tsx|js|jsx|mjs|cjs|json|jsonc|md)$/;\nconst CODE = /\\.(ts|tsx|js|jsx|mjs|cjs)$/;\n\nexport type Staged = {\n /** Fully staged and formattable — safe to rewrite and restage. */\n readonly formattable: readonly string[];\n /** The subset of `formattable` that oxlint understands. */\n readonly code: readonly string[];\n /** Staged but also dirty in the worktree — checked, never rewritten. */\n readonly partial: readonly string[];\n};\n\n/**\n * 🔴 `-z`, AND SPLIT ON NUL. Measured 2026-09-22: without it git applies `core.quotePath`\n * and a file named `café .ts` comes back as the literal 12 characters\n * `\"caf\\303\\251 .ts\"` — quotes, backslashes and octal escapes. Passing that to oxfmt\n * names a file that does not exist, so every commit touching it fails with a message\n * about the wrong path, and the fix anyone would reach for is `--no-verify`.\n */\nasync function names(args: readonly string[]): Promise<readonly string[]> {\n const out = await capture(['git', ...args, '-z']);\n return out.split('\\0').filter((line) => line.length > 0);\n}\n\n/** Classify the index. Deletions are excluded — there is nothing to format in them. */\nexport async function staged(): Promise<Staged> {\n const indexed = await names(['diff', '--cached', '--name-only', '--diff-filter=ACMR']);\n const dirty = new Set(await names(['diff', '--name-only', '--diff-filter=ACMR']));\n const candidates = indexed.filter((file) => FORMATTABLE.test(file));\n\n return {\n formattable: candidates.filter((file) => !dirty.has(file)),\n code: candidates.filter((file) => !dirty.has(file) && CODE.test(file)),\n partial: candidates.filter((file) => dirty.has(file)),\n };\n}\n\n/**\n * Content fingerprints, so only the files a formatter actually changed get restaged.\n *\n * ★ WHY NOT RESTAGE EVERYTHING. `git add` on an untouched file is harmless but noisy:\n * the hook would claim it rewrote files it left alone, and a hook that overstates\n * what it did is one nobody reads.\n */\nexport async function fingerprints(files: readonly string[]): Promise<ReadonlyMap<string, string>> {\n const out = new Map<string, string>();\n for (const file of files) {\n const handle = Bun.file(file);\n if (!(await handle.exists())) continue;\n out.set(file, String(Bun.hash(await handle.arrayBuffer())));\n }\n return out;\n}\n",
7
+ "/**\n * The two gates every HomeFlare repo gets, from one place.\n *\n * ★ THE SPLIT IS BY COST. `pre-commit` touches only the staged files and is measured in\n * hundreds of milliseconds, so it can run on every commit without anyone resenting\n * it. `pre-push` runs the repo's own `bun run check` — seconds, once, before the\n * change costs a slot on the shared self-hosted runner.\n *\n * ⚠️ NEITHER IS A GATE. Both are skippable with `--no-verify` and neither exists in a\n * fresh clone until `bun install` runs `prepare`. The required checks on `main` stay\n * the gate; these only make the cheap mistakes cheap to find.\n */\nimport { fail, note, ok, run, tool } from './report.ts';\nimport { fingerprints, staged } from './staged.ts';\n\n/**\n * Format and lint what is staged, restaging only what the formatter rewrote.\n *\n * ⚠️ THIS HOOK REWRITES FILES DURING A COMMIT, and it says so on the line where it\n * happens. Without the restage, oxfmt would fix the worktree while the commit kept\n * the unformatted bytes — CI then fails on a file that reads as correct locally.\n */\nexport async function preCommit(root: string): Promise<void> {\n const oxfmt = tool(root, 'oxfmt');\n const { formattable, code, partial } = await staged();\n\n // ⛔ Checked, never rewritten — see staged.ts for why `git add` here would be theft.\n if (partial.length > 0) {\n note(`${partial.length} staged file(s) also have unstaged edits; checking without rewriting`);\n if ((await run([...oxfmt, '--check', ...partial])) !== 0) {\n fail(\n 'pre-commit',\n 'those partially staged files are unformatted, and rewriting them would stage your unstaged work',\n 'bun run format, then stage the files you meant to commit',\n );\n }\n }\n\n if (formattable.length === 0) {\n ok('pre-commit: nothing staged to format');\n return;\n }\n\n const before = await fingerprints(formattable);\n if ((await run([...oxfmt, ...formattable])) !== 0) {\n fail('pre-commit', 'oxfmt could not format the staged files', 'bun run format');\n }\n const after = await fingerprints(formattable);\n const rewritten = formattable.filter((file) => before.get(file) !== after.get(file));\n\n if (rewritten.length > 0) {\n note(`oxfmt rewrote and restaged ${rewritten.length} file(s): ${rewritten.join(', ')}`);\n if ((await run(['git', 'add', '--', ...rewritten])) !== 0) {\n fail('pre-commit', 'could not restage the formatted files', 'git add the listed files');\n }\n }\n\n // ⚠️ `--deny-warnings` matches what CI runs. A hook that is laxer than CI is worse\n // than no hook: it certifies a change CI will reject.\n if (code.length > 0 && (await run([...tool(root, 'oxlint'), '--deny-warnings', ...code])) !== 0) {\n fail(\n 'pre-commit',\n `oxlint found problems in ${code.length} staged file(s)`,\n 'bun run lint:fix, then fix by hand what remains',\n );\n }\n\n ok(`pre-commit: ${formattable.length} staged file(s) formatted and linted`);\n}\n\n/**\n * Run the repo's own declared gate before the push reaches the runner.\n *\n * ★ IT CALLS `bun run check` RATHER THAN NAMING TOOLS. Every repo's `check` is the\n * command CI runs; hard-coding `tsc` and `bun test` here would drift from whichever\n * repo added a step, and the hook would certify a push CI rejects.\n * ⛔ It does not widen a narrow `check`. If a repo's gate only looks at part of the\n * tree, this hook inherits exactly that blind spot — fix the script, not the hook.\n */\nexport async function prePush(root: string): Promise<void> {\n const manifest = Bun.file(`${root}/package.json`);\n const pkg = (await manifest.exists())\n ? ((await manifest.json()) as { scripts?: Record<string, string> })\n : {};\n\n if (pkg.scripts?.['check'] === undefined) {\n note('pre-push: no `check` script declared in package.json; nothing to run');\n return;\n }\n\n note('pre-push: running `bun run check` — the same gate CI runs');\n const started = Bun.nanoseconds();\n // 🔴 `isolated`: strip the GIT_* this hook inherited before running the test suite.\n // See report.ts — without it a test's throwaway git repository commits into this one.\n if ((await run(['bun', 'run', 'check'], true)) !== 0) {\n fail(\n 'pre-push',\n 'bun run check failed — CI would fail the same way, on a shared runner',\n 'bun run lint:fix, then bun run check until it is green',\n );\n }\n\n ok(`pre-push: bun run check passed in ${((Bun.nanoseconds() - started) / 1e9).toFixed(1)}s`);\n}\n",
8
8
  "/**\n * Adoption: the one wrapper every repo commits, and the check that it has not drifted.\n *\n * ★ WHY A WRAPPER AT ALL. husky can only run a file that is tracked in the repo, so\n * something must be committed per repo. This keeps that something to a delegation\n * whose text is owned HERE — the behaviour lives in one package, and a repo that\n * edits its copy is reported as drift rather than quietly diverging.\n * ★ ONE FILE, TWO NAMES. The wrapper reads the hook name from `$0`, so `pre-commit`\n * and `pre-push` are byte-identical and there is a single text to keep in step.\n */\nimport { chmod, mkdir } from 'node:fs/promises';\n\n/** The hook files this package installs, in the order a contributor meets them. */\nexport const HOOK_NAMES = ['pre-commit', 'pre-push'] as const;\n\n/** Where the runner lives once `bun install` has run. Relative: git runs hooks at the root. */\nconst RUNNER = 'node_modules/@homeflare/config/bin/hooks.ts';\n\n/**\n * ⚠️ IT EXITS 0 WHEN THE RUNNER IS ABSENT. A checkout with no `node_modules` would\n * otherwise fail every commit with a module-resolution error, and the first thing\n * anyone would do is delete the hook. Failing open is the right trade for a\n * convenience; the required checks on `main` are what must fail closed.\n */\nexport const HUSKY_HOOK: string = `# HomeFlare shared git hook. The behaviour lives in @homeflare/config, not in this file,\n# and the same bytes are installed as .husky/pre-commit and .husky/pre-push — the hook\n# name comes from $0.\n#\n# ⚠️ A hook is a local convenience, not a gate: it is skippable with --no-verify and does\n# not exist in a fresh clone until \\`bun install\\` runs the \\`prepare\\` script. The\n# required checks on main stay the gate.\n#\n# Regenerate this file with: bun ${RUNNER} install\nhook=\"${RUNNER}\"\nif [ ! -f \"$hook\" ]; then\n echo \"husky: $hook is missing — run 'bun install' to enable the HomeFlare hooks; skipping\"\n exit 0\nfi\nexec bun \"$hook\" \"$(basename \"$0\")\"\n`;\n\n/** Write the wrapper into `.husky/`. Returns the paths written, relative to the project. */\nexport async function installHooks(projectDir: string): Promise<readonly string[]> {\n await mkdir(`${projectDir}/.husky`, { recursive: true });\n const written: string[] = [];\n for (const name of HOOK_NAMES) {\n const path = `${projectDir}/.husky/${name}`;\n await Bun.write(path, HUSKY_HOOK);\n // ⚠️ husky's own runner does `sh -e \"$s\"`, which does not need the execute bit, but\n // `core.hooksPath=.husky` without husky does. Set it so both mechanisms work.\n await chmod(path, 0o755);\n written.push(`.husky/${name}`);\n }\n return written;\n}\n\n/**\n * Report what stops this project's hooks from working. Empty means adopted.\n *\n * ⛔ DELIBERATELY NOT PART OF `checkProject`. Every repo in the estate runs that checker\n * from a test; folding hook conformance into it would turn every repo that has not\n * adopted yet red on `main` in the same commit. A repo opts in by calling this.\n */\nexport async function problemsInHooks(projectDir: string): Promise<readonly string[]> {\n const problems: string[] = [];\n const manifest = Bun.file(`${projectDir}/package.json`);\n\n if (!(await manifest.exists())) return ['package.json: missing'];\n const pkg = (await manifest.json()) as {\n scripts?: Record<string, string>;\n devDependencies?: Record<string, string>;\n };\n\n if (!(pkg.scripts?.['prepare'] ?? '').includes('husky')) {\n problems.push('package.json: no \"prepare\": \"husky\" script — a fresh clone installs no hooks');\n }\n if (pkg.devDependencies?.['husky'] === undefined) {\n problems.push('package.json: husky is not a devDependency');\n }\n\n for (const name of HOOK_NAMES) {\n const file = Bun.file(`${projectDir}/.husky/${name}`);\n if (!(await file.exists())) {\n problems.push(`.husky/${name}: missing — run \\`bun ${RUNNER} install\\``);\n continue;\n }\n if ((await file.text()) !== HUSKY_HOOK) {\n problems.push(\n `.husky/${name}: differs from the @homeflare/config wrapper — run \\`bun ${RUNNER} install\\`, or change it in the package`,\n );\n }\n }\n\n return problems;\n}\n",
9
9
  "/**\n * The HomeFlare git hooks, as a package.\n *\n * ★ WHY THIS IS NOT A SCRIPT IN EVERY REPO. Fourteen copies of a hook script is the\n * exact drift `@homeflare/config` exists to prevent: the copies diverge, nobody\n * notices, and two repos disagree about what a commit must satisfy. Here the repo\n * commits a delegating wrapper and the behaviour ships with the package, so changing\n * the rule is one release and a version bump rather than fourteen edits.\n *\n * ⚠️ HUSKY, NOT lefthook OR A BARE `core.hooksPath`. It is already the estate's\n * mechanism in the repos that have working hooks, it installs from `prepare` on a\n * plain `bun install`, and it keeps the hook files tracked and reviewable. A second\n * mechanism alongside it would mean two ways to answer \"are hooks on in this repo\".\n *\n * Usage from a hook file — see `HUSKY_HOOK`:\n *\n * bun node_modules/@homeflare/config/bin/hooks.ts pre-commit\n */\nimport { preCommit, prePush } from './hooks/gates.ts';\nimport { HOOK_NAMES, HUSKY_HOOK, installHooks, problemsInHooks } from './hooks/install.ts';\nimport { type Hook, note, ok } from './hooks/report.ts';\n\nexport { HOOK_NAMES, HUSKY_HOOK, installHooks, problemsInHooks };\nexport type { Hook };\n\n/** The commands `bin/hooks.ts` accepts. */\nexport type Command = Hook | 'install';\n\nexport function isCommand(value: string): value is Command {\n return value === 'pre-commit' || value === 'pre-push' || value === 'install';\n}\n\n/**\n * Run one hook, or install the wrappers.\n *\n * ⛔ Never exits non-zero for a reason the caller cannot act on: an unknown command is a\n * programming error in the wrapper and is reported as such, not as a failed commit.\n */\nexport async function runCommand(command: Command, root: string): Promise<void> {\n if (command === 'install') {\n const written = await installHooks(root);\n ok(`wrote ${written.join(', ')} — commit them`);\n note('they do nothing until `bun install` runs `prepare` (husky)');\n return;\n }\n if (command === 'pre-commit') return await preCommit(root);\n return await prePush(root);\n}\n"
10
10
  ],
11
- "mappings": ";;AAcA,IAAM,SAA+B;AAAA,EACnC,cAAc;AAAA,EACd,YAAY;AACd;AAGA,eAAsB,GAAG,CAAC,KAAyC;AAAA,EACjE,MAAM,OAAO,IAAI,MAAM,CAAC,GAAG,GAAG,GAAG,EAAE,QAAQ,WAAW,QAAQ,UAAU,CAAC;AAAA,EACzE,OAAO,MAAM,KAAK;AAAA;AAIpB,eAAsB,OAAO,CAAC,KAAyC;AAAA,EACrE,MAAM,OAAO,IAAI,MAAM,CAAC,GAAG,GAAG,GAAG,EAAE,QAAQ,QAAQ,QAAQ,SAAS,CAAC;AAAA,EACrE,MAAM,OAAO,MAAM,IAAI,SAAS,KAAK,MAAM,EAAE,KAAK;AAAA,EAClD,MAAM,KAAK;AAAA,EACX,OAAO;AAAA;AAWF,SAAS,IAAI,CAAC,MAAc,MAAiC;AAAA,EAClE,MAAM,QAAQ,GAAG,0BAA0B;AAAA,EAC3C,OAAO,IAAI,KAAK,KAAK,EAAE,OAAO,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,IAAI;AAAA;AAU3D,SAAS,IAAI,CAAC,MAAoB;AAAA,EAChC,QAAQ,OAAO,MAAM,GAAG;AAAA,CAAQ;AAAA;AAG3B,SAAS,EAAE,CAAC,MAAoB;AAAA,EACrC,KAAK,UAAK,MAAM;AAAA;AAGX,SAAS,IAAI,CAAC,MAAoB;AAAA,EACvC,KAAK,KAAK,MAAM;AAAA;AAIX,SAAS,IAAI,CAAC,MAAY,MAAc,KAAoB;AAAA,EACjE,KAAK;AAAA,SAAO,SAAS,MAAM;AAAA,EAC3B,KAAK,aAAa,KAAK;AAAA,EACvB,KAAK,aAAa,OAA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G,qBAAqB,MAAM;AAAA,IACpD,IAAI,CAAE,MAAM,KAAK,OAAO,GAAI;AAAA,MAC1B,SAAS,KAAK,UAAU,kCAA6B,kBAAkB;AAAA,MACvE;AAAA,IACF;AAAA,IACA,IAAK,MAAM,KAAK,KAAK,MAAO,YAAY;AAAA,MACtC,SAAS,KACP,UAAU,qEAAgE,+CAC5E;AAAA,IACF;AAAA,EACF;AAAA,EAEA,OAAO;AAAA;;;ACjEF,SAAS,SAAS,CAAC,OAAiC;AAAA,EACzD,OAAO,UAAU,gBAAgB,UAAU,cAAc,UAAU;AAAA;AASrE,eAAsB,UAAU,CAAC,SAAkB,MAA6B;AAAA,EAC9E,IAAI,YAAY,WAAW;AAAA,IACzB,MAAM,UAAU,MAAM,aAAa,IAAI;AAAA,IACvC,GAAG,SAAS,QAAQ,KAAK,IAAI,sBAAiB;AAAA,IAC9C,KAAK,4DAA4D;AAAA,IACjE;AAAA,EACF;AAAA,EACA,IAAI,YAAY;AAAA,IAAc,OAAO,MAAM,UAAU,IAAI;AAAA,EACzD,OAAO,MAAM,QAAQ,IAAI;AAAA;",
12
+ "debugId": "3480C5F48A0E1AD864756E2164756E21",
13
13
  "names": []
14
14
  }
@@ -8,8 +8,11 @@
8
8
  * completion holding one of the mini's 3 slots for a result nobody would read;
9
9
  * · `pull-requests: read` missing in 2, which makes every pull-request scan fail 403
10
10
  * before it inspects a single line;
11
- * · `gitleaks/gitleaks-action` pinned at `@v2` in 5 and `@v3` in 8, after GitHub
12
- * removed the Node 20 runtime v2 needs (2026-09-16);
11
+ * · `gitleaks/gitleaks-action` pinned at `@v2` in 5 and `@v3` in 8. v2 declares
12
+ * `runs: node20`; GitHub removed that runtime from its HOSTED runner images on
13
+ * 2026-09-16, so v2 fails on ubuntu-latest and still runs on the mini. Moving to
14
+ * v3 drops that dependency before any job moves back to a hosted runner — it is
15
+ * not repairing a scan that is currently broken;
13
16
  * · the weekly cron at three different minutes.
14
17
  * One renderer makes all thirteen the same file, and the next such fix is one commit.
15
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/repo-shape/security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAmE5C,4CAA4C;AAC5C,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAyBvD"}
1
+ {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/repo-shape/security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAsE5C,4CAA4C;AAC5C,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAyBvD"}
@@ -33,6 +33,21 @@ export type RepoRunner =
33
33
  /** One step in a rendered job. Either a `uses:` or a `run:`, never both. */
34
34
  export type JobStep = {
35
35
  readonly name?: string;
36
+ /**
37
+ * The step's `if:` condition, verbatim.
38
+ *
39
+ * ★ WIDENED RATHER THAN EXCEPTED, 2026-09-22. homeflare-kit's `consumer smoke test`
40
+ * ends with a step that renders the packed tarball sizes onto the run summary, and
41
+ * it carries `if: always()` on purpose — a FAILED smoke test is exactly when the
42
+ * sizes are worth reading. Without this field kit had two options and both were
43
+ * worse: drop the condition, losing the summary on the only runs that need it, or
44
+ * `except('.github/workflows/ci.yml')`, which buys one repository its file back and
45
+ * costs the estate the guarantee on it. One optional key gives every repository the
46
+ * same freedom, which is the order of preference this module documents.
47
+ * ⚠️ NOT VALIDATED. GitHub's expression grammar is the vendor's; a bad condition is
48
+ * caught by `actionlint` in the `workflow lint` job, which is where it belongs.
49
+ */
50
+ readonly if?: string;
36
51
  readonly env?: Readonly<Record<string, string>>;
37
52
  } & ({
38
53
  readonly uses: string;
@@ -1 +1 @@
1
- {"version":3,"file":"shape.d.ts","sourceRoot":"","sources":["../../src/repo-shape/shape.ts"],"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mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAsD1C,iEAAiE;AACjE,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAuBjE;AAED,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5E"}
1
+ {"version":3,"file":"yaml.d.ts","sourceRoot":"","sources":["../../src/repo-shape/yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAsD1C,iEAAiE;AACjE,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA2BjE;AAED,oEAAoE;AACpE,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5E"}
@@ -81,12 +81,13 @@ function renderRun(command, depth) {
81
81
  function renderStep(step, depth) {
82
82
  const lines = [];
83
83
  const body = step.uses === undefined ? renderRun(step.run ?? "", depth + 1) : [`${indent(depth + 1)}uses: ${step.uses}`];
84
- if (step.name === undefined) {
85
- const [first = "", ...rest] = body;
86
- lines.push(`${indent(depth)}- ${first.trimStart()}`, ...rest);
87
- } else {
88
- lines.push(`${indent(depth)}- name: ${scalar(step.name)}`, ...body);
89
- }
84
+ const head = [];
85
+ if (step.name !== undefined)
86
+ head.push(`${indent(depth + 1)}name: ${scalar(step.name)}`);
87
+ if (step.if !== undefined)
88
+ head.push(`${indent(depth + 1)}if: ${scalar(step.if)}`);
89
+ const [first = "", ...rest] = [...head, ...body];
90
+ lines.push(`${indent(depth)}- ${first.trimStart()}`, ...rest);
90
91
  if (step.with !== undefined && Object.keys(step.with).length > 0) {
91
92
  lines.push(`${indent(depth + 1)}with:`, ...renderMapping(step.with, depth + 2));
92
93
  }
@@ -423,10 +424,13 @@ var FETCH_NOTE = ` with:
423
424
  # matters most: a secret added and then removed in a later commit. It is still
424
425
  # in the history, still fetchable, and still compromised.
425
426
  fetch-depth: 0`;
426
- var GITLEAKS_NOTE = ` # \u26D4 v3, NOT v2. GitHub removed the Node 20 runtime from hosted runners on 2026-09-16
427
- # (gitleaks/gitleaks-action's own v3.0.0 migration notes, verified 2026-09-17), so
428
- # v2 (\`runs: node20\`) fails outright now, with no opt-out flag. v3 changes only the
429
- # runtime to node24 \u2014 inputs, outputs and behaviour are unchanged.
427
+ var GITLEAKS_NOTE = ` # \u26D4 v3, NOT v2. v2 declares \`runs: node20\`. GitHub removed that runtime from
428
+ # its HOSTED runner images on 2026-09-16 (gitleaks/gitleaks-action's own v3.0.0
429
+ # migration notes, verified 2026-09-17), so v2 fails on ubuntu-latest and still
430
+ # runs on the mini's self-hosted runner. Moving to v3 drops a dependency on a
431
+ # runtime the platform has already withdrawn, before any job moves back to a
432
+ # hosted runner \u2014 it is not repairing a scan that is currently broken. v3
433
+ # changes only the runtime to node24 \u2014 inputs, outputs and behaviour are unchanged.
430
434
  # \u2605 arm64-SAFE ON THE MINI, verified rather than assumed: v3's src/gitleaks.js builds
431
435
  # its download URL from \`process.arch\`, so the runner asks for
432
436
  # gitleaks_<version>_linux_arm64.tar.gz, an asset its default release publishes
@@ -607,5 +611,5 @@ export {
607
611
  runsOn
608
612
  };
609
613
 
610
- //# debugId=4FA0365136CBD38764756E2164756E21
614
+ //# debugId=90AE28FCE975727B64756E2164756E21
611
615
  //# sourceMappingURL=repo-shape.js.map
@@ -2,16 +2,16 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/repo-shape/shape.ts", "../src/repo-shape/yaml.ts", "../src/repo-shape/ci.ts", "../src/repo-shape/companions.ts", "../src/repo-shape/security.ts", "../src/repo-shape/render.ts", "../src/repo-shape/drift.ts", "../src/repo-shape/refresh.ts"],
4
4
  "sourcesContent": [
5
- "/**\n * `RepoShape` — one HomeFlare repository's tooling, as a value.\n *\n * ★ WHY THIS TYPE EXISTS. Measured across the estate on 2026-09-22: 13 repositories each\n * carry a hand-written `.github/workflows/ci.yml`, `security.yml`, `.github/actionlint.yaml`\n * and `.changeset/config.json`. The changeset configs were byte-identical apart from the\n * repository name in 11 of 13. The security workflows were not: five still carried\n * `push: branches: [main]` that the other eight had removed, five were missing the\n * `concurrency:` block entirely, two were missing `pull-requests: read` (whose absence\n * makes every pull-request scan fail 403), the gitleaks action was pinned at `@v2` in\n * five and `@v3` in eight, and the weekly cron minute took three different values. Not\n * one of those differences was a decision. They are what happens when the same edit is\n * applied by hand thirteen times.\n *\n * ⛔ SO: A DIFFERENCE IS EITHER AN INPUT OR AN EXCEPTION. Nothing else. A repository that\n * needs something the standard does not give it either widens this type — and every\n * repository gets the widening — or declares an exception with a stated reason. There\n * is no third option where a file is quietly edited, because `drift.ts` fails on it.\n *\n * ⚠️ THE REASON IS ENFORCED BY THE COMPILER, NOT BY REVIEW. `except()` and `extraJob()`\n * below refuse an empty reason and refuse a reason read out of a variable, so the text\n * has to be written at the exception. See `Stated`.\n */\n\n/** Where a repository's jobs run. */\nexport type RepoRunner =\n /**\n * `[self-hosted, homeflare-mini]` — the interim Linux arm64 runner on the Mac mini.\n * ⚠️ GitHub-hosted runners are refused for this account (billing lock, 2026-09-22).\n */\n | 'mini'\n /** `ubuntu-latest`. Public repositories, where GitHub-hosted minutes are free. */\n | 'github';\n\n/** One step in a rendered job. Either a `uses:` or a `run:`, never both. */\nexport type JobStep = {\n readonly name?: string;\n readonly env?: Readonly<Record<string, string>>;\n} & (\n | {\n readonly uses: string;\n readonly with?: Readonly<Record<string, string | number>>;\n readonly run?: never;\n }\n | { readonly run: string; readonly uses?: never; readonly with?: never }\n);\n\n/**\n * ⛔ A REASON MUST BE WRITTEN, NOT COMPUTED. `'' extends R` is true for the empty literal\n * AND for the wide `string` type, so both collapse to `never` and fail to typecheck:\n * `reason: ''` is refused, and so is `reason: someVariable`. Only a string literal\n * written at the call site survives — which is the whole point, because a reason\n * assembled at runtime is a reason nobody reads in the diff.\n * Verified against TypeScript 7.0.2 on 2026-09-22; `tests/repo-shape-reason.test.ts`\n * compiles the refusals and asserts they still fail.\n */\nexport type Stated<R extends string> = '' extends R ? never : R;\n\n/** Paths this package renders. A deviation names one of these, not an arbitrary file. */\nexport type RenderedPath =\n | '.changeset/config.json'\n | '.github/actionlint.yaml'\n | '.github/dependabot.yml'\n | '.github/workflows/ci.yml'\n | '.github/workflows/security.yml';\n\nexport interface RepoShapeException {\n /** The rendered file this repository does not take from the renderer. */\n readonly file: RenderedPath;\n /** Why — written at the exception, in a sentence a stranger can act on. */\n readonly reason: string;\n /** `YYYY-MM-DD` the exception was taken, so a stale one is visible. */\n readonly since: string;\n}\n\ninterface ExceptionInput {\n readonly file: RenderedPath;\n readonly reason: string;\n readonly since: string;\n}\n\n/**\n * Declare that this repository keeps its own copy of a rendered file.\n *\n * except({\n * file: '.github/workflows/ci.yml',\n * reason: 'Payload needs Node >=24.15, which the rendered job does not install',\n * since: '2026-09-22',\n * })\n *\n * ⛔ THE DRIFT CHECK STOPS CHECKING THAT FILE. That is the trade: an exception buys the\n * freedom to hand-edit one file and pays for it by losing the guarantee on that file.\n * Prefer widening `RepoShape` — then every repository benefits and nothing is lost.\n */\nexport function except<const E extends ExceptionInput>(\n exception: E & { readonly reason: Stated<E['reason']> },\n): RepoShapeException {\n return {\n file: exception.file,\n reason: requireSentence('reason', exception.reason),\n since: requireIsoDate(exception.since),\n };\n}\n\nexport interface ExtraJob {\n /** The job key in `jobs:`, e.g. `package`. Lower-case, dashes allowed. */\n readonly id: string;\n /**\n * The job's `name:`, which is also the status-check context. It joins the `ci`\n * aggregate's `needs`, so the branch ruleset still requires exactly one check.\n */\n readonly name: string;\n /** Why this repository has a job the other twelve do not. */\n readonly reason: string;\n /** Steps after checkout. The prologue (checkout, bun, install) is rendered for you. */\n readonly steps: readonly JobStep[];\n /** Job ids this one waits for. Default: none, so it runs beside `check`. */\n readonly needs?: readonly string[];\n /** `false` skips the rendered bun prologue — for a job that needs another toolchain. */\n readonly bun?: boolean;\n}\n\ninterface ExtraJobInput extends Omit<ExtraJob, 'needs' | 'bun'> {\n readonly needs?: readonly string[];\n readonly bun?: boolean;\n}\n\n/**\n * Declare a job this repository needs and the standard does not have.\n * ⛔ Same rule as `except`: the reason is a written literal or it does not compile.\n */\nexport function extraJob<const J extends ExtraJobInput>(\n job: J & { readonly reason: Stated<J['reason']> },\n): ExtraJob {\n if (job.steps.length === 0) {\n throw new Error(`repo-shape: extra job \"${job.id}\" has no steps`);\n }\n return {\n bun: job.bun ?? true,\n id: requireJobId(job.id),\n // ⚠️ A DISPLAY NAME IS NOT A SENTENCE. `build` and `consumer smoke test` are both\n // correct job names; only the REASON has to be prose, because only the reason is\n // there for a reader rather than for the checks list.\n name: requireNonEmpty('name', job.name),\n needs: [...(job.needs ?? [])],\n reason: requireSentence('reason', job.reason),\n steps: [...job.steps],\n };\n}\n\nexport interface RepoShape {\n /** Repository owner — a user or organization login. */\n readonly owner: string;\n /** Repository name, which is also the checkout directory name. */\n readonly repository: string;\n /** Where its jobs run. */\n readonly runner: RepoRunner;\n /**\n * `true` when the repository publishes an npm tarball. It decides `access` in the\n * changeset config and whether `privatePackages` is written at all — the two keys\n * that differ between `homeflare-kit` and every other repository.\n */\n readonly publishes: boolean;\n /** Jobs beyond `check` and `workflows`. Each carries its own stated reason. */\n readonly extraJobs?: readonly ExtraJob[];\n /** Rendered files this repository keeps its own copy of, each with a reason. */\n readonly exceptions?: readonly RepoShapeException[];\n}\n\nconst SENTENCE = 12;\n\nfunction requireNonEmpty(field: string, value: string): string {\n const trimmed = value.trim();\n if (trimmed.length === 0) throw new Error(`repo-shape: ${field} must not be blank`);\n return trimmed;\n}\n\nfunction requireSentence(field: string, value: string): string {\n const trimmed = value.trim();\n // ⚠️ THE TYPE CANNOT CATCH `reason: ' '`. `' '` is a non-empty literal, so `Stated`\n // lets it through and only this does not. Type and guard cover different halves.\n if (trimmed.length < SENTENCE) {\n throw new Error(`repo-shape: ${field} must be a sentence, got ${JSON.stringify(value)}`);\n }\n return trimmed;\n}\n\nfunction requireIsoDate(value: string): string {\n if (!/^\\d{4}-\\d{2}-\\d{2}$/.test(value)) {\n throw new Error(`repo-shape: since must be YYYY-MM-DD, got ${JSON.stringify(value)}`);\n }\n return value;\n}\n\nfunction requireJobId(value: string): string {\n // ⛔ The id becomes a YAML key and a `needs:` entry. Anything else renders a workflow\n // GitHub rejects at parse time, which reports as \"workflow file issue\" with no line.\n if (!/^[a-z][a-z0-9_-]*$/.test(value)) {\n throw new Error(\n `repo-shape: job id must match /^[a-z][a-z0-9_-]*$/, got ${JSON.stringify(value)}`,\n );\n }\n return value;\n}\n\n/** `runs-on:` for a runner. */\nexport function runsOn(runner: RepoRunner): string {\n return runner === 'mini' ? '[self-hosted, homeflare-mini]' : 'ubuntu-latest';\n}\n\n/** Whether a rendered path is excepted by this shape. */\nexport function isExcepted(shape: RepoShape, file: RenderedPath): boolean {\n return (shape.exceptions ?? []).some((exception) => exception.file === file);\n}\n",
6
- "/**\n * The smallest YAML writer that renders a job's steps, and nothing else.\n *\n * ★ NOT A YAML LIBRARY, DELIBERATELY. A general serializer would take a dependency every\n * consumer of `@homeflare/config` inherits, and it would strip the comments — which in\n * this house are the product. The rendered workflows are written as text with holes;\n * only the step lists, whose shape varies per repository, go through here.\n *\n * ⚠️ Bun can PARSE YAML natively (`Bun.YAML.parse`) but does not stringify it, measured\n * against Bun 1.4.0 on 2026-09-22. The tests parse what this writes with `Bun.YAML.parse`\n * and compare structures, so a malformed emission fails rather than shipping.\n */\nimport type { JobStep } from './shape.ts';\n\n/** Two spaces per level, the house indent and GitHub's own. */\nconst INDENT = ' ';\n\nfunction indent(depth: number): string {\n return INDENT.repeat(depth);\n}\n\n/**\n * ⛔ QUOTE ANYTHING YAML WOULD RE-READ AS SOMETHING ELSE. `09:00` is a sexagesimal number\n * in YAML 1.1 and `on`/`no` are booleans; an unquoted value that looks like either\n * reaches GitHub as the wrong type, and the symptom is a schedule that never fires\n * rather than an error.\n */\nconst PLAIN = /^[A-Za-z0-9_./][A-Za-z0-9_ ./@:+-]*$/;\nconst YAML_KEYWORD =\n /^(y|Y|n|N|on|On|ON|no|No|NO|yes|Yes|YES|true|True|TRUE|false|False|FALSE|null|Null|NULL|~)$/;\n\nfunction scalar(value: string | number): string {\n if (typeof value === 'number') return String(value);\n if (value === '') return \"''\";\n const plain =\n PLAIN.test(value) &&\n !YAML_KEYWORD.test(value) &&\n !value.includes(': ') &&\n !value.includes(' #') &&\n // ⚠️ A LEADING DIGIT PLUS A COLON IS A YAML 1.1 SEXAGESIMAL NUMBER, not a string:\n // `09:00` would reach GitHub as an integer, and a schedule set to an integer\n // simply never fires. `bun run build:web` is safe because it does not start with\n // a digit, which is why this is narrower than \"contains a colon\".\n !/^\\d.*:/.test(value) &&\n value.trimEnd() === value;\n return plain ? value : `'${value.replaceAll(\"'\", \"''\")}'`;\n}\n\nfunction renderMapping(\n entries: Readonly<Record<string, string | number>>,\n depth: number,\n): string[] {\n return Object.entries(entries).map(([key, value]) => `${indent(depth)}${key}: ${scalar(value)}`);\n}\n\n/**\n * ★ BLOCK SCALAR FOR EVERY MULTI-LINE `run:`. A folded or quoted form would join the\n * lines, and a shell script whose `if` and `then` end up on one line is a syntax error\n * at job time rather than at lint time. `|` keeps them exactly as written.\n */\nfunction renderRun(command: string, depth: number): string[] {\n const lines = command.replace(/\\n+$/, '').split('\\n');\n if (lines.length === 1) return [`${indent(depth)}run: ${scalar(lines[0] ?? '')}`];\n return [`${indent(depth)}run: |`, ...lines.map((line) => `${indent(depth + 1)}${line}`)];\n}\n\n/** One step, as the lines of a `steps:` list item at `depth`. */\nexport function renderStep(step: JobStep, depth: number): string[] {\n const lines: string[] = [];\n const body =\n step.uses === undefined\n ? renderRun(step.run ?? '', depth + 1)\n : [`${indent(depth + 1)}uses: ${step.uses}`];\n\n if (step.name === undefined) {\n // ⚠️ The first line of the item carries the dash, so an unnamed step's `run:` or\n // `uses:` is inlined after it and any block body follows at its own indent.\n const [first = '', ...rest] = body;\n lines.push(`${indent(depth)}- ${first.trimStart()}`, ...rest);\n } else {\n lines.push(`${indent(depth)}- name: ${scalar(step.name)}`, ...body);\n }\n\n if (step.with !== undefined && Object.keys(step.with).length > 0) {\n lines.push(`${indent(depth + 1)}with:`, ...renderMapping(step.with, depth + 2));\n }\n if (step.env !== undefined && Object.keys(step.env).length > 0) {\n lines.push(`${indent(depth + 1)}env:`, ...renderMapping(step.env, depth + 2));\n }\n return lines;\n}\n\n/** A whole `steps:` list, already indented for a job at `depth`. */\nexport function renderSteps(steps: readonly JobStep[], depth: number): string {\n return steps.flatMap((step) => renderStep(step, depth)).join('\\n');\n}\n",
5
+ "/**\n * `RepoShape` — one HomeFlare repository's tooling, as a value.\n *\n * ★ WHY THIS TYPE EXISTS. Measured across the estate on 2026-09-22: 13 repositories each\n * carry a hand-written `.github/workflows/ci.yml`, `security.yml`, `.github/actionlint.yaml`\n * and `.changeset/config.json`. The changeset configs were byte-identical apart from the\n * repository name in 11 of 13. The security workflows were not: five still carried\n * `push: branches: [main]` that the other eight had removed, five were missing the\n * `concurrency:` block entirely, two were missing `pull-requests: read` (whose absence\n * makes every pull-request scan fail 403), the gitleaks action was pinned at `@v2` in\n * five and `@v3` in eight, and the weekly cron minute took three different values. Not\n * one of those differences was a decision. They are what happens when the same edit is\n * applied by hand thirteen times.\n *\n * ⛔ SO: A DIFFERENCE IS EITHER AN INPUT OR AN EXCEPTION. Nothing else. A repository that\n * needs something the standard does not give it either widens this type — and every\n * repository gets the widening — or declares an exception with a stated reason. There\n * is no third option where a file is quietly edited, because `drift.ts` fails on it.\n *\n * ⚠️ THE REASON IS ENFORCED BY THE COMPILER, NOT BY REVIEW. `except()` and `extraJob()`\n * below refuse an empty reason and refuse a reason read out of a variable, so the text\n * has to be written at the exception. See `Stated`.\n */\n\n/** Where a repository's jobs run. */\nexport type RepoRunner =\n /**\n * `[self-hosted, homeflare-mini]` — the interim Linux arm64 runner on the Mac mini.\n * ⚠️ GitHub-hosted runners are refused for this account (billing lock, 2026-09-22).\n */\n | 'mini'\n /** `ubuntu-latest`. Public repositories, where GitHub-hosted minutes are free. */\n | 'github';\n\n/** One step in a rendered job. Either a `uses:` or a `run:`, never both. */\nexport type JobStep = {\n readonly name?: string;\n /**\n * The step's `if:` condition, verbatim.\n *\n * ★ WIDENED RATHER THAN EXCEPTED, 2026-09-22. homeflare-kit's `consumer smoke test`\n * ends with a step that renders the packed tarball sizes onto the run summary, and\n * it carries `if: always()` on purpose — a FAILED smoke test is exactly when the\n * sizes are worth reading. Without this field kit had two options and both were\n * worse: drop the condition, losing the summary on the only runs that need it, or\n * `except('.github/workflows/ci.yml')`, which buys one repository its file back and\n * costs the estate the guarantee on it. One optional key gives every repository the\n * same freedom, which is the order of preference this module documents.\n * ⚠️ NOT VALIDATED. GitHub's expression grammar is the vendor's; a bad condition is\n * caught by `actionlint` in the `workflow lint` job, which is where it belongs.\n */\n readonly if?: string;\n readonly env?: Readonly<Record<string, string>>;\n} & (\n | {\n readonly uses: string;\n readonly with?: Readonly<Record<string, string | number>>;\n readonly run?: never;\n }\n | { readonly run: string; readonly uses?: never; readonly with?: never }\n);\n\n/**\n * ⛔ A REASON MUST BE WRITTEN, NOT COMPUTED. `'' extends R` is true for the empty literal\n * AND for the wide `string` type, so both collapse to `never` and fail to typecheck:\n * `reason: ''` is refused, and so is `reason: someVariable`. Only a string literal\n * written at the call site survives — which is the whole point, because a reason\n * assembled at runtime is a reason nobody reads in the diff.\n * Verified against TypeScript 7.0.2 on 2026-09-22; `tests/repo-shape-reason.test.ts`\n * compiles the refusals and asserts they still fail.\n */\nexport type Stated<R extends string> = '' extends R ? never : R;\n\n/** Paths this package renders. A deviation names one of these, not an arbitrary file. */\nexport type RenderedPath =\n | '.changeset/config.json'\n | '.github/actionlint.yaml'\n | '.github/dependabot.yml'\n | '.github/workflows/ci.yml'\n | '.github/workflows/security.yml';\n\nexport interface RepoShapeException {\n /** The rendered file this repository does not take from the renderer. */\n readonly file: RenderedPath;\n /** Why — written at the exception, in a sentence a stranger can act on. */\n readonly reason: string;\n /** `YYYY-MM-DD` the exception was taken, so a stale one is visible. */\n readonly since: string;\n}\n\ninterface ExceptionInput {\n readonly file: RenderedPath;\n readonly reason: string;\n readonly since: string;\n}\n\n/**\n * Declare that this repository keeps its own copy of a rendered file.\n *\n * except({\n * file: '.github/workflows/ci.yml',\n * reason: 'Payload needs Node >=24.15, which the rendered job does not install',\n * since: '2026-09-22',\n * })\n *\n * ⛔ THE DRIFT CHECK STOPS CHECKING THAT FILE. That is the trade: an exception buys the\n * freedom to hand-edit one file and pays for it by losing the guarantee on that file.\n * Prefer widening `RepoShape` — then every repository benefits and nothing is lost.\n */\nexport function except<const E extends ExceptionInput>(\n exception: E & { readonly reason: Stated<E['reason']> },\n): RepoShapeException {\n return {\n file: exception.file,\n reason: requireSentence('reason', exception.reason),\n since: requireIsoDate(exception.since),\n };\n}\n\nexport interface ExtraJob {\n /** The job key in `jobs:`, e.g. `package`. Lower-case, dashes allowed. */\n readonly id: string;\n /**\n * The job's `name:`, which is also the status-check context. It joins the `ci`\n * aggregate's `needs`, so the branch ruleset still requires exactly one check.\n */\n readonly name: string;\n /** Why this repository has a job the other twelve do not. */\n readonly reason: string;\n /** Steps after checkout. The prologue (checkout, bun, install) is rendered for you. */\n readonly steps: readonly JobStep[];\n /** Job ids this one waits for. Default: none, so it runs beside `check`. */\n readonly needs?: readonly string[];\n /** `false` skips the rendered bun prologue — for a job that needs another toolchain. */\n readonly bun?: boolean;\n}\n\ninterface ExtraJobInput extends Omit<ExtraJob, 'needs' | 'bun'> {\n readonly needs?: readonly string[];\n readonly bun?: boolean;\n}\n\n/**\n * Declare a job this repository needs and the standard does not have.\n * ⛔ Same rule as `except`: the reason is a written literal or it does not compile.\n */\nexport function extraJob<const J extends ExtraJobInput>(\n job: J & { readonly reason: Stated<J['reason']> },\n): ExtraJob {\n if (job.steps.length === 0) {\n throw new Error(`repo-shape: extra job \"${job.id}\" has no steps`);\n }\n return {\n bun: job.bun ?? true,\n id: requireJobId(job.id),\n // ⚠️ A DISPLAY NAME IS NOT A SENTENCE. `build` and `consumer smoke test` are both\n // correct job names; only the REASON has to be prose, because only the reason is\n // there for a reader rather than for the checks list.\n name: requireNonEmpty('name', job.name),\n needs: [...(job.needs ?? [])],\n reason: requireSentence('reason', job.reason),\n steps: [...job.steps],\n };\n}\n\nexport interface RepoShape {\n /** Repository owner — a user or organization login. */\n readonly owner: string;\n /** Repository name, which is also the checkout directory name. */\n readonly repository: string;\n /** Where its jobs run. */\n readonly runner: RepoRunner;\n /**\n * `true` when the repository publishes an npm tarball. It decides `access` in the\n * changeset config and whether `privatePackages` is written at all — the two keys\n * that differ between `homeflare-kit` and every other repository.\n */\n readonly publishes: boolean;\n /** Jobs beyond `check` and `workflows`. Each carries its own stated reason. */\n readonly extraJobs?: readonly ExtraJob[];\n /** Rendered files this repository keeps its own copy of, each with a reason. */\n readonly exceptions?: readonly RepoShapeException[];\n}\n\nconst SENTENCE = 12;\n\nfunction requireNonEmpty(field: string, value: string): string {\n const trimmed = value.trim();\n if (trimmed.length === 0) throw new Error(`repo-shape: ${field} must not be blank`);\n return trimmed;\n}\n\nfunction requireSentence(field: string, value: string): string {\n const trimmed = value.trim();\n // ⚠️ THE TYPE CANNOT CATCH `reason: ' '`. `' '` is a non-empty literal, so `Stated`\n // lets it through and only this does not. Type and guard cover different halves.\n if (trimmed.length < SENTENCE) {\n throw new Error(`repo-shape: ${field} must be a sentence, got ${JSON.stringify(value)}`);\n }\n return trimmed;\n}\n\nfunction requireIsoDate(value: string): string {\n if (!/^\\d{4}-\\d{2}-\\d{2}$/.test(value)) {\n throw new Error(`repo-shape: since must be YYYY-MM-DD, got ${JSON.stringify(value)}`);\n }\n return value;\n}\n\nfunction requireJobId(value: string): string {\n // ⛔ The id becomes a YAML key and a `needs:` entry. Anything else renders a workflow\n // GitHub rejects at parse time, which reports as \"workflow file issue\" with no line.\n if (!/^[a-z][a-z0-9_-]*$/.test(value)) {\n throw new Error(\n `repo-shape: job id must match /^[a-z][a-z0-9_-]*$/, got ${JSON.stringify(value)}`,\n );\n }\n return value;\n}\n\n/** `runs-on:` for a runner. */\nexport function runsOn(runner: RepoRunner): string {\n return runner === 'mini' ? '[self-hosted, homeflare-mini]' : 'ubuntu-latest';\n}\n\n/** Whether a rendered path is excepted by this shape. */\nexport function isExcepted(shape: RepoShape, file: RenderedPath): boolean {\n return (shape.exceptions ?? []).some((exception) => exception.file === file);\n}\n",
6
+ "/**\n * The smallest YAML writer that renders a job's steps, and nothing else.\n *\n * ★ NOT A YAML LIBRARY, DELIBERATELY. A general serializer would take a dependency every\n * consumer of `@homeflare/config` inherits, and it would strip the comments — which in\n * this house are the product. The rendered workflows are written as text with holes;\n * only the step lists, whose shape varies per repository, go through here.\n *\n * ⚠️ Bun can PARSE YAML natively (`Bun.YAML.parse`) but does not stringify it, measured\n * against Bun 1.4.0 on 2026-09-22. The tests parse what this writes with `Bun.YAML.parse`\n * and compare structures, so a malformed emission fails rather than shipping.\n */\nimport type { JobStep } from './shape.ts';\n\n/** Two spaces per level, the house indent and GitHub's own. */\nconst INDENT = ' ';\n\nfunction indent(depth: number): string {\n return INDENT.repeat(depth);\n}\n\n/**\n * ⛔ QUOTE ANYTHING YAML WOULD RE-READ AS SOMETHING ELSE. `09:00` is a sexagesimal number\n * in YAML 1.1 and `on`/`no` are booleans; an unquoted value that looks like either\n * reaches GitHub as the wrong type, and the symptom is a schedule that never fires\n * rather than an error.\n */\nconst PLAIN = /^[A-Za-z0-9_./][A-Za-z0-9_ ./@:+-]*$/;\nconst YAML_KEYWORD =\n /^(y|Y|n|N|on|On|ON|no|No|NO|yes|Yes|YES|true|True|TRUE|false|False|FALSE|null|Null|NULL|~)$/;\n\nfunction scalar(value: string | number): string {\n if (typeof value === 'number') return String(value);\n if (value === '') return \"''\";\n const plain =\n PLAIN.test(value) &&\n !YAML_KEYWORD.test(value) &&\n !value.includes(': ') &&\n !value.includes(' #') &&\n // ⚠️ A LEADING DIGIT PLUS A COLON IS A YAML 1.1 SEXAGESIMAL NUMBER, not a string:\n // `09:00` would reach GitHub as an integer, and a schedule set to an integer\n // simply never fires. `bun run build:web` is safe because it does not start with\n // a digit, which is why this is narrower than \"contains a colon\".\n !/^\\d.*:/.test(value) &&\n value.trimEnd() === value;\n return plain ? value : `'${value.replaceAll(\"'\", \"''\")}'`;\n}\n\nfunction renderMapping(\n entries: Readonly<Record<string, string | number>>,\n depth: number,\n): string[] {\n return Object.entries(entries).map(([key, value]) => `${indent(depth)}${key}: ${scalar(value)}`);\n}\n\n/**\n * ★ BLOCK SCALAR FOR EVERY MULTI-LINE `run:`. A folded or quoted form would join the\n * lines, and a shell script whose `if` and `then` end up on one line is a syntax error\n * at job time rather than at lint time. `|` keeps them exactly as written.\n */\nfunction renderRun(command: string, depth: number): string[] {\n const lines = command.replace(/\\n+$/, '').split('\\n');\n if (lines.length === 1) return [`${indent(depth)}run: ${scalar(lines[0] ?? '')}`];\n return [`${indent(depth)}run: |`, ...lines.map((line) => `${indent(depth + 1)}${line}`)];\n}\n\n/** One step, as the lines of a `steps:` list item at `depth`. */\nexport function renderStep(step: JobStep, depth: number): string[] {\n const lines: string[] = [];\n const body =\n step.uses === undefined\n ? renderRun(step.run ?? '', depth + 1)\n : [`${indent(depth + 1)}uses: ${step.uses}`];\n\n // ★ `name:` then `if:` then the body, because that is the order a reader scans: what\n // this step is, whether it runs, what it does. All three are ordinary mapping keys\n // to GitHub, so the order is for the person reading the diff, not the parser.\n const head: string[] = [];\n if (step.name !== undefined) head.push(`${indent(depth + 1)}name: ${scalar(step.name)}`);\n if (step.if !== undefined) head.push(`${indent(depth + 1)}if: ${scalar(step.if)}`);\n\n // ⚠️ The first line of the item carries the dash, whichever key it turns out to be —\n // an unnamed, unconditional step still inlines its `run:` or `uses:` after the dash\n // and lets any block body follow at its own indent.\n const [first = '', ...rest] = [...head, ...body];\n lines.push(`${indent(depth)}- ${first.trimStart()}`, ...rest);\n\n if (step.with !== undefined && Object.keys(step.with).length > 0) {\n lines.push(`${indent(depth + 1)}with:`, ...renderMapping(step.with, depth + 2));\n }\n if (step.env !== undefined && Object.keys(step.env).length > 0) {\n lines.push(`${indent(depth + 1)}env:`, ...renderMapping(step.env, depth + 2));\n }\n return lines;\n}\n\n/** A whole `steps:` list, already indented for a job at `depth`. */\nexport function renderSteps(steps: readonly JobStep[], depth: number): string {\n return steps.flatMap((step) => renderStep(step, depth)).join('\\n');\n}\n",
7
7
  "/**\n * `.github/workflows/ci.yml`, rendered.\n *\n * ★ THE COMMENTS ARE PART OF THE RENDER, NOT DECORATION. Thirteen repositories carried\n * thirteen hand-edited copies of the same reasoning; measured 2026-09-22, the header\n * comment alone had four different wordings and the actionlint block had three. Written\n * here once, every repository gets the same explanation, and correcting it is one edit.\n *\n * ⛔ THE AGGREGATE `ci` JOB IS THE ONLY REQUIRED CHECK. Every other job feeds it through\n * `needs`, so adding a job never means editing a branch ruleset. `repoShapeChecks()`\n * returns exactly `['ci', 'secret scan']`, which is what `declareRepoPolicy` requires.\n */\nimport type { ExtraJob, RepoShape } from './shape.ts';\nimport { runsOn } from './shape.ts';\nimport { renderSteps } from './yaml.ts';\n\n/** Bun the whole estate is pinned to. One line, one place. */\nexport const BUN_VERSION = '1.4.0';\n/** actionlint the `workflow lint` job runs, and the mini's job image preloads. */\nexport const ACTIONLINT_VERSION = '1.7.12';\n\nconst CHECKOUT = 'actions/checkout@v7';\nconst SETUP_BUN = 'oven-sh/setup-bun@v2';\n\nfunction runnerNote(shape: RepoShape): string {\n if (shape.runner !== 'mini') {\n return \"# ⚠️ RUNS ON GitHub-HOSTED `ubuntu-latest`. Only a public repository should: hosted minutes\\n# are refused for this account's private repos (billing lock, 2026-09-22).\\n\";\n }\n return [\n '# ⚠️ RUNS ON THE MINI (`[self-hosted, homeflare-mini]`): GitHub-hosted runners are refused for',\n '# this account (billing lock, 2026-09-22), so every job here runs in a one-job Linux arm64',\n \"# container started by homeflare-mini's src/ci-runner (docs/ci-runner.md there). Each action\",\n `# below was checked for linux/arm64. The job image preloads bun ${\n BUN_VERSION\n } where setup-bun`,\n '# looks, gh, actionlint, gitleaks, typos and shfmt; no node on PATH.',\n '',\n ].join('\\n');\n}\n\nconst HEADER = `# Pull requests: is this code correct?\n#\n# 🤖 RENDERED BY @homeflare/config — DO NOT EDIT THIS FILE BY HAND.\n# Its input is this repository's \\`repo-shape.ts\\`. Change that, then:\n# bun run repo-shape:refresh\n# A hand edit is reverted by the next refresh and fails \\`bun run check\\` before that.\n# A file this repository must own outright is declared as an \\`except({...})\\` with a\n# reason, which stops the check from comparing it — see @homeflare/config/repo-shape.\n#\n# ★ SPLIT BY CONCERN, NOT ONE BIG JOB — AND NOT ONE JOB PER COMMAND EITHER: lanes that\n# share a prologue are steps inside \\`check\\`, so the install is paid once.\n# ⛔ EVERY ACTION IS FIRST-PARTY OR THE VENDOR'S OWN, PINNED TO A MAJOR TAG.\n`;\n\nconst TRIGGER = `name: ci\n\non:\n # ⛔ NO \\`push: branches: [main]\\`. Every commit reaches main through a pull request whose\n # \\`ci\\` had to be green — the branch ruleset requires it and carries no bypass actors —\n # so a second run on the squash commit recomputed an answer it already had. Measured\n # 2026-09-15..22 across the estate: 613 of 619 main-push runs had a head_sha identical\n # to the merge_commit_sha of an already-green PR. That duplication was ~41% of the Mac\n # mini's entire CI load.\n # ⚠️ WHAT THIS GIVES UP, SAID OUT LOUD: the ~4% of merges whose base DID move between the\n # PR run and the squash no longer get a post-merge re-test. That run gated nothing — it\n # reported after main already had the commit — and the next PR, which branches from the\n # merged main, is what actually catches a semantic conflict.\n pull_request:\n\npermissions:\n contents: read\n\nconcurrency:\n group: ci-\\${{ github.ref }}\n cancel-in-progress: true\n`;\n\nconst CHECK_NOTE = ` # ── One job, one install ────────────────────────────────────────────────────\n # ★ WAS 3 SEPARATE JOBS: lint and format, types, tests. They shared an identical\n # prologue — checkout, setup-bun, \\`bun install --frozen-lockfile\\` — and the install,\n # not the check, was the cost: measured on the mini 2026-09-22, install p50 51s /\n # p90 81s against 1-3s for the command the install existed to enable. 3 jobs meant 3\n # installs and 3 containers to compute one answer, and on a 3-slot pool that was one\n # pull request asking for every slot to answer a single question.\n # ⛔ ONE STEP: \\`bun run check\\`, THE REPOSITORY'S OWN GATE, NOT A COPY OF ITS LANES.\n # The house rule is that CI runs the same command a person runs, and a workflow that\n # re-lists \\`lint\\`, \\`types\\`, \\`test\\` is a second copy of that command which can quietly\n # check LESS than the local gate. Measured 2026-09-22: \\`bun run check\\` in homeflare-kit\n # is \\`lint && types && build && test\\`, and its tests/dist.test.ts SKIPS ITSELF when\n # dist/ is absent — so a workflow running lint/types/test without the build would drop\n # that test silently and still report green. homeflare-alerts' check runs\n # \\`check:types\\` and \\`build:web\\`; homeflare-subnet-calc's delegates to \\`verify\\`. All\n # fourteen repositories have a \\`check\\` script and every one is local-only — no network,\n # no deploy. Checked, not assumed.\n # ★ THE SPLIT OF RESPONSIBILITY: this renderer owns the PLUMBING — triggers, permissions,\n # concurrency, runner, action versions, the aggregate gate — and the repository owns\n # WHAT ITS GATE RUNS, in package.json, where a change to it shows up in that\n # repository's own diff rather than in a workflow nobody reads.\n # ⚠️ THE TRADE, STATED: a red X says \\`check\\` rather than naming the lane. \\`bun run check\\`\n # short-circuits on the first failure and its output names the lane, which is the same\n # signal a person gets locally.`;\n\nconst WORKFLOWS_NOTE = ` # ★ \\`workflow lint\\` STAYS ITS OWN JOB on purpose: it needs no \\`bun install\\` at all\n # (actionlint is preloaded on the mini's job image — measured 5s end to end), so\n # folding it into \\`check\\` would make a YAML-only change pay the install for nothing.`;\n\nconst ACTIONLINT_NOTE = ` # ⛔ THERE IS NO FIRST-PARTY actionlint ACTION, and the npm package by that name is\n # an unrelated wasm port with no \\`bin\\`. The vendor's own documented CI path is\n # \\`download-actionlint.bash\\` — but that script does NOT verify a checksum (read at\n # the v${ACTIONLINT_VERSION} tag, 2026-09-16: \\`curl -L \"$url\" | tar xvz\\`, no sha256sum anywhere).\n # rhysd's releases DO publish a \\`_checksums.txt\\` per version; this verifies against\n # that instead of trusting the tarball on receipt.\n # ⚠️ ARCH FROM THE RUNNER, NOT HARD-CODED: the mini's runners are arm64, and an amd64\n # binary fails with \"exec format error\" (the checksum file lists both).`;\n\nconst INSTALL_ACTIONLINT = `set -euo pipefail\nversion=${ACTIONLINT_VERSION}\nif command -v actionlint >/dev/null 2>&1 &&\n [ \"$(actionlint -version 2>/dev/null | sed -n 1p)\" = \"\\${version}\" ]; then\n cp \"$(command -v actionlint)\" ./actionlint\n exit 0\nfi\ncase \"$(uname -m)\" in\n x86_64) arch=amd64 ;;\n aarch64 | arm64) arch=arm64 ;;\n *) echo \"unsupported architecture $(uname -m)\" >&2; exit 1 ;;\nesac\nfile=\"actionlint_\\${version}_linux_\\${arch}.tar.gz\"\nbase=\"https://github.com/rhysd/actionlint/releases/download/v\\${version}\"\ncurl -sSfLO \"\\${base}/\\${file}\"\ncurl -sSfLO \"\\${base}/actionlint_\\${version}_checksums.txt\"\ngrep \" \\${file}\\\\$\" \"actionlint_\\${version}_checksums.txt\" | sha256sum -c -\ntar xzf \"\\${file}\" actionlint`;\n\nconst AGGREGATE_NOTE = ` # ── The one check a branch rule can require ─────────────────────────────────\n # ★ A single required check that depends on all of them. Without this, adding a job\n # means editing the branch ruleset too, and forgetting to means the new job is\n # advisory without anyone noticing.\n # ⛔ FAILS ON ANYTHING OTHER THAN success, INCLUDING skipped. A job result has exactly\n # four values: success, failure, cancelled, skipped. Checking only the first two lets\n # a skipped job — a bad \\`if:\\` condition, a misconfigured dependency, a runner picking\n # up nothing — report this aggregate green with a required job never having run.`;\n\nconst VERIFY = `if [ \"\\${{ contains(needs.*.result, 'failure') }}\" = \"true\" ] || \\\\\n [ \"\\${{ contains(needs.*.result, 'cancelled') }}\" = \"true\" ] || \\\\\n [ \"\\${{ contains(needs.*.result, 'skipped') }}\" = \"true\" ]; then\n echo \"one or more required jobs did not succeed: \\${{ toJSON(needs.*.result) }}\" >&2\n exit 1\nfi`;\n\nfunction prologue(): string {\n return renderSteps(\n [\n { uses: CHECKOUT },\n { uses: SETUP_BUN, with: { 'bun-version': BUN_VERSION } },\n { run: 'bun install --frozen-lockfile' },\n ],\n 3,\n );\n}\n\nfunction renderExtraJob(job: ExtraJob, on: string): string {\n const needs =\n (job.needs ?? []).length === 0 ? '' : ` needs: [${(job.needs ?? []).join(', ')}]\\n`;\n const steps =\n job.bun === false\n ? renderSteps([{ uses: CHECKOUT }, ...job.steps], 3)\n : [prologue(), renderSteps(job.steps, 3)].join('\\n');\n // ★ The stated reason is rendered into the file. A job nobody can explain is a job\n // nobody dares delete, so the explanation travels with it.\n return ` # ★ NOT PART OF THE STANDARD SHAPE — ${job.reason}\n ${job.id}:\n name: ${job.name}\n${needs} runs-on: ${on}\n steps:\n${steps}\n`;\n}\n\n/** The whole `ci.yml` for a shape. */\nexport function renderCi(shape: RepoShape): string {\n const on = runsOn(shape.runner);\n const extras = shape.extraJobs ?? [];\n const needs = ['check', 'workflows', ...extras.map((job) => job.id)];\n\n return `${HEADER}${runnerNote(shape)}${TRIGGER}\njobs:\n${CHECK_NOTE}\n check:\n name: check\n runs-on: ${on}\n steps:\n${prologue()}\n${renderSteps([{ run: 'bun run check' }], 3)}\n\n${WORKFLOWS_NOTE}\n workflows:\n name: workflow lint\n runs-on: ${on}\n steps:\n${renderSteps([{ uses: CHECKOUT }], 3)}\n${ACTIONLINT_NOTE}\n${renderSteps([{ name: 'Install actionlint (checksum-verified)', run: INSTALL_ACTIONLINT }], 3)}\n${renderSteps([{ name: 'Lint workflows', run: './actionlint -color' }], 3)}\n\n${extras.map((job) => `${renderExtraJob(job, on)}\\n`).join('')}${AGGREGATE_NOTE}\n ci:\n name: ci\n if: always()\n needs: [${needs.join(', ')}]\n runs-on: ${on}\n steps:\n${renderSteps([{ name: 'Verify every job succeeded', run: VERIFY }], 3)}\n`;\n}\n",
8
8
  "/**\n * The three smaller rendered files: actionlint's config, the changeset config, and\n * Dependabot.\n *\n * ★ EACH ONE WAS MEASURED BEFORE IT WAS RENDERED (2026-09-22, across 13 repositories):\n * · `.changeset/config.json` — byte-identical apart from the repository name in 11 of\n * 13. The three that differed did so by accident: two pinned an older `$schema`\n * (3.1.4 against 4.0.1) and one used `@changesets/cli/changelog` instead of the\n * GitHub changelog everyone else had, which silently drops PR links from releases.\n * · `.github/actionlint.yaml` — 12 of 13 had it, with three wordings of one comment.\n * The one without it is the one repository still on `ubuntu-latest`, which is the\n * only case where it is genuinely not needed. That is an input, not an exception.\n * · `.github/dependabot.yml` — 1 of 14. Twelve repositories take no dependency or\n * Action updates at all, and nothing said so. Rendering it is the fix.\n */\nimport type { RepoShape } from './shape.ts';\n\n/**\n * ⚠️ PINNED, NOT `latest`. `unpkg.com/@changesets/config@latest/schema.json` would change\n * what editors validate against without a commit, and the two repositories that drifted\n * here drifted by being pinned to different versions — not by being pinned.\n */\nconst CHANGESET_SCHEMA = '4.0.1';\n\n/**\n * `.changeset/config.json`.\n *\n * ⛔ `privatePackages` IS WRITTEN ONLY FOR A REPOSITORY THAT DOES NOT PUBLISH, AND BOTH\n * OF ITS FIELDS ARE REQUIRED. `@changesets/cli` silently versions nothing when\n * `version` is absent, so a private repository without this key opens a Version\n * Packages PR that changes no version and tags no release — a release pipeline that\n * reports success and ships nothing.\n */\nexport function renderChangesetConfig(shape: RepoShape): string {\n const config = {\n $schema: `https://unpkg.com/@changesets/config@${CHANGESET_SCHEMA}/schema.json`,\n // ★ `@changesets/changelog-github` over the built-in: it writes the pull request and\n // author into CHANGELOG.md, which is the difference between a changelog you can\n // audit and a list of sentences.\n changelog: ['@changesets/changelog-github', { repo: `${shape.owner}/${shape.repository}` }],\n commit: false,\n fixed: [] as string[],\n linked: [] as string[],\n access: shape.publishes ? 'public' : 'restricted',\n baseBranch: 'main',\n updateInternalDependencies: 'patch',\n ignore: [] as string[],\n ...(shape.publishes ? {} : { privatePackages: { version: true, tag: false } }),\n };\n return `${JSON.stringify(config, undefined, 2)}\\n`;\n}\n\n/**\n * `.github/actionlint.yaml` — rendered only for a self-hosted runner.\n *\n * ★ DECLARED, NOT SUPPRESSED. actionlint's `runner-label` rule stays on, so a typo'd\n * label (`homeflare-mnii`) still fails the `workflow lint` job rather than silently\n * queueing a job no runner ever claims. Measured 2026-09-22 with actionlint 1.7.12: an\n * undeclared `homeflare-mini` is an error, not a warning, so this file is the reason\n * twelve repositories are green rather than a nicety.\n */\nexport function renderActionlintConfig(shape: RepoShape): string | undefined {\n if (shape.runner !== 'mini') return undefined;\n return `# actionlint's list of self-hosted runner labels (its \\`runner-label\\` check).\n#\n# 🤖 RENDERED BY @homeflare/config — DO NOT EDIT THIS FILE BY HAND.\n# Refresh with \\`bun run repo-shape:refresh\\`.\n#\n# ★ DECLARED, NOT SUPPRESSED: the rule stays on, so a typo'd label (\\`homeflare-mnii\\`)\n# still fails the \\`workflow lint\\` job rather than queueing a job no runner claims.\n# \\`homeflare-mini\\` is the interim runner on the Mac mini (homeflare-mini's\n# docs/ci-runner.md); setting this repository's shape to \\`runner: 'github'\\` removes\n# this file with the \\`runs-on\\` that needed it.\nself-hosted-runner:\n labels:\n - homeflare-mini\n`;\n}\n\n/** `.github/dependabot.yml`. */\nexport function renderDependabot(shape: RepoShape): string {\n // ⚠️ `directories`, not `directory`, for bun: a workspace keeps a dependency in the\n // package that declares it, so pointing only at `/` leaves every `packages/*`\n // manifest unwatched — and the symptom is silence, not an error.\n const bunDirs = shape.publishes ? ['/', '/packages/*'] : ['/'];\n return `# Dependabot for ${shape.repository}.\n#\n# 🤖 RENDERED BY @homeflare/config — DO NOT EDIT THIS FILE BY HAND.\n# Refresh with \\`bun run repo-shape:refresh\\`.\n#\n# ⛔ THIS FILE LIVES AT .github/dependabot.yml, NOT IN .github/workflows/. Dependabot is a\n# platform feature, not an Action — a config placed among the workflows is silently\n# ignored, and the symptom is simply that no pull requests ever arrive. Measured\n# 2026-09-22: 13 of 14 HomeFlare repositories had no dependabot config at all, so their\n# Actions and their toolchain went stale invisibly, which is exactly how nothing fails.\n#\n# ★ WHY GROUPED RATHER THAN ONE PR PER DEPENDENCY. The default opens a pull request per\n# outdated package; that is a trickle nobody reviews properly. Each group below is a set\n# that is either safe to take together or needs deciding together.\nversion: 2\n\nupdates:\n # ── The toolchain (bun.lock) ────────────────────────────────────────────────\n - package-ecosystem: bun\n directories:\n${bunDirs.map((dir) => ` - ${dir}`).join('\\n')}\n schedule:\n interval: weekly\n day: monday\n time: '09:00'\n timezone: America/New_York\n open-pull-requests-limit: 5\n commit-message:\n prefix: 'chore'\n include: scope\n labels: [dependencies]\n groups:\n # oxfmt and oxlint move together and only affect style. Minor and patch bumps are\n # noise unless they fail CI, which is what CI is for.\n lint-and-format:\n patterns: ['oxfmt', 'oxlint']\n update-types: [minor, patch]\n\n # ⚠️ MAJORS EXCLUDED DELIBERATELY. TypeScript majors change what typechecks;\n # changesets majors have renamed inputs and dropped compatibility (the action's v2\n # did both). These want reading, not merging on green.\n build-tooling:\n patterns: ['typescript', '@changesets/*', '@types/bun']\n update-types: [minor, patch]\n\n # ── The workflows themselves ────────────────────────────────────────────────\n # ★ Actions go stale invisibly: nothing fails, they just keep running old code. The\n # estate's first workflows pinned checkout@v5 (current: v7) and changesets/action@v1\n # (current: v2, with every input renamed) — measured 2026-09-15.\n - package-ecosystem: github-actions\n directory: /\n schedule:\n interval: weekly\n day: monday\n time: '09:00'\n timezone: America/New_York\n open-pull-requests-limit: 5\n commit-message:\n prefix: 'ci'\n labels: [dependencies, github-actions]\n groups:\n actions:\n patterns: ['*']\n update-types: [minor, patch]\n`;\n}\n",
9
- "/**\n * `.github/workflows/security.yml`, rendered.\n *\n * ⛔ THIS FILE IS WHY THE RENDERER EXISTS. Measured across 13 repositories on 2026-09-22,\n * every one of these was a per-repo accident rather than a decision:\n * · `push: branches: [main]` still present in 5, removed in 8;\n * · the `concurrency:` block missing entirely in 5 — so a superseded scan ran to\n * completion holding one of the mini's 3 slots for a result nobody would read;\n * · `pull-requests: read` missing in 2, which makes every pull-request scan fail 403\n * before it inspects a single line;\n * · `gitleaks/gitleaks-action` pinned at `@v2` in 5 and `@v3` in 8, after GitHub\n * removed the Node 20 runtime v2 needs (2026-09-16);\n * · the weekly cron at three different minutes.\n * One renderer makes all thirteen the same file, and the next such fix is one commit.\n */\nimport type { RepoShape } from './shape.ts';\nimport { runsOn } from './shape.ts';\nimport { renderSteps } from './yaml.ts';\n\n/**\n * ⚠️ Off the hour deliberately — `:00` is when every scheduled workflow on GitHub fires\n * at once, and queue time is the result. One minute for the whole estate: a repository\n * does NOT get its own, because \"which minute is this repo on\" is a question with no\n * useful answer and 13 repos produced 3 different ones by accident.\n */\nconst CRON = '41 6 * * 1';\n\nconst HEADER = `# Secret scanning, on its own schedule and its own check.\n#\n# 🤖 RENDERED BY @homeflare/config — DO NOT EDIT THIS FILE BY HAND.\n# Its input is this repository's \\`repo-shape.ts\\`; refresh with \\`bun run repo-shape:refresh\\`.\n#\n# ★ SEPARATE FROM ci.yml BY CONCERN. A secret scan answers a different question from \"is\n# this code correct\", it runs on a schedule as well as on pull requests (a rule added\n# tomorrow can find a secret committed today), and it needs full history, which the CI\n# jobs deliberately do not fetch.\n`;\n\nconst TRIGGER = `name: security\n\non:\n # ⛔ NO \\`push: branches: [main]\\`, for the reason ci.yml gives: main only moves by\n # squashing a pull request this same workflow already scanned, so the post-merge scan\n # re-read commits it had just cleared. The weekly cron is what covers \"a rule added\n # tomorrow finds a secret committed today\" — and it is the one that fetches full history.\n pull_request:\n schedule:\n - cron: '${CRON}'\n\npermissions:\n contents: read\n # 🔴 gitleaks-action lists pull-request commits through GitHub's API before scanning,\n # and posts inline annotations. Without this, \\`pull_request\\` runs fail 403 before\n # inspecting any code. Two of thirteen repositories were missing it (2026-09-22).\n pull-requests: read\n\n# ⛔ cancel-in-progress IS CONDITIONAL, NOT \\`true\\`. The scheduled run's ref is\n# refs/heads/main; a plain \\`true\\` would let anything sharing that group kill the weekly\n# full-history scan. Only pull-request runs are ever cancelled.\nconcurrency:\n group: security-\\${{ github.ref }}\n cancel-in-progress: \\${{ github.event_name == 'pull_request' }}\n`;\n\nconst FETCH_NOTE = ` with:\n # ⛔ FULL HISTORY. A shallow clone scans only the tip, which misses the case that\n # matters most: a secret added and then removed in a later commit. It is still\n # in the history, still fetchable, and still compromised.\n fetch-depth: 0`;\n\nconst GITLEAKS_NOTE = ` # ⛔ v3, NOT v2. GitHub removed the Node 20 runtime from hosted runners on 2026-09-16\n # (gitleaks/gitleaks-action's own v3.0.0 migration notes, verified 2026-09-17), so\n # v2 (\\`runs: node20\\`) fails outright now, with no opt-out flag. v3 changes only the\n # runtime to node24 — inputs, outputs and behaviour are unchanged.\n # ★ arm64-SAFE ON THE MINI, verified rather than assumed: v3's src/gitleaks.js builds\n # its download URL from \\`process.arch\\`, so the runner asks for\n # gitleaks_<version>_linux_arm64.tar.gz, an asset its default release publishes\n # (both read 2026-09-22). Nothing here is hard-coded to x64.\n # ★ No \\`GITLEAKS_LICENSE\\`: that env var is required only for GitHub Organization\n # accounts, and \\`taslabs-net\\` is a personal User account (2026-09-17,\n # \\`gh api users/taslabs-net --jq .type\\` -> \\`User\\`).`;\n\n/** The whole `security.yml` for a shape. */\nexport function renderSecurity(shape: RepoShape): string {\n const on = runsOn(shape.runner);\n // ⚠️ A GitHub ACTIONS EXPRESSION, NOT A TEMPLATE LITERAL. `${{ … }}` is interpolated by\n // the Actions runner at job time and must reach the file verbatim, so it is a regular\n // string on purpose — `no-template-curly-in-string` is warning about exactly the\n // confusion this comment resolves, and it is right to ask.\n // oxlint-disable-next-line no-template-curly-in-string\n const token = '${{ secrets.GITHUB_TOKEN }}';\n const scheduled =\n shape.runner === 'mini'\n ? `\\n # ⛔ THE SCHEDULED RUN GOES TO THE MINI TOO: if the runner daemon is down this queues\\n # rather than failing, so a missed weekly scan is silent. homeflare-mini's\\n # \\`ci-runner\\` vmalert group is what notices that, not this workflow.`\n : '';\n\n return `${HEADER}${TRIGGER}\njobs:\n secrets:\n name: secret scan${scheduled}\n runs-on: ${on}\n steps:\n${renderSteps([{ uses: 'actions/checkout@v7' }], 3)}\n${FETCH_NOTE}\n\n${GITLEAKS_NOTE}\n${renderSteps([{ uses: 'gitleaks/gitleaks-action@v3', env: { GITHUB_TOKEN: token } }], 3)}\n`;\n}\n",
9
+ "/**\n * `.github/workflows/security.yml`, rendered.\n *\n * ⛔ THIS FILE IS WHY THE RENDERER EXISTS. Measured across 13 repositories on 2026-09-22,\n * every one of these was a per-repo accident rather than a decision:\n * · `push: branches: [main]` still present in 5, removed in 8;\n * · the `concurrency:` block missing entirely in 5 — so a superseded scan ran to\n * completion holding one of the mini's 3 slots for a result nobody would read;\n * · `pull-requests: read` missing in 2, which makes every pull-request scan fail 403\n * before it inspects a single line;\n * · `gitleaks/gitleaks-action` pinned at `@v2` in 5 and `@v3` in 8. v2 declares\n * `runs: node20`; GitHub removed that runtime from its HOSTED runner images on\n * 2026-09-16, so v2 fails on ubuntu-latest and still runs on the mini. Moving to\n * v3 drops that dependency before any job moves back to a hosted runner — it is\n * not repairing a scan that is currently broken;\n * · the weekly cron at three different minutes.\n * One renderer makes all thirteen the same file, and the next such fix is one commit.\n */\nimport type { RepoShape } from './shape.ts';\nimport { runsOn } from './shape.ts';\nimport { renderSteps } from './yaml.ts';\n\n/**\n * ⚠️ Off the hour deliberately — `:00` is when every scheduled workflow on GitHub fires\n * at once, and queue time is the result. One minute for the whole estate: a repository\n * does NOT get its own, because \"which minute is this repo on\" is a question with no\n * useful answer and 13 repos produced 3 different ones by accident.\n */\nconst CRON = '41 6 * * 1';\n\nconst HEADER = `# Secret scanning, on its own schedule and its own check.\n#\n# 🤖 RENDERED BY @homeflare/config — DO NOT EDIT THIS FILE BY HAND.\n# Its input is this repository's \\`repo-shape.ts\\`; refresh with \\`bun run repo-shape:refresh\\`.\n#\n# ★ SEPARATE FROM ci.yml BY CONCERN. A secret scan answers a different question from \"is\n# this code correct\", it runs on a schedule as well as on pull requests (a rule added\n# tomorrow can find a secret committed today), and it needs full history, which the CI\n# jobs deliberately do not fetch.\n`;\n\nconst TRIGGER = `name: security\n\non:\n # ⛔ NO \\`push: branches: [main]\\`, for the reason ci.yml gives: main only moves by\n # squashing a pull request this same workflow already scanned, so the post-merge scan\n # re-read commits it had just cleared. The weekly cron is what covers \"a rule added\n # tomorrow finds a secret committed today\" — and it is the one that fetches full history.\n pull_request:\n schedule:\n - cron: '${CRON}'\n\npermissions:\n contents: read\n # 🔴 gitleaks-action lists pull-request commits through GitHub's API before scanning,\n # and posts inline annotations. Without this, \\`pull_request\\` runs fail 403 before\n # inspecting any code. Two of thirteen repositories were missing it (2026-09-22).\n pull-requests: read\n\n# ⛔ cancel-in-progress IS CONDITIONAL, NOT \\`true\\`. The scheduled run's ref is\n# refs/heads/main; a plain \\`true\\` would let anything sharing that group kill the weekly\n# full-history scan. Only pull-request runs are ever cancelled.\nconcurrency:\n group: security-\\${{ github.ref }}\n cancel-in-progress: \\${{ github.event_name == 'pull_request' }}\n`;\n\nconst FETCH_NOTE = ` with:\n # ⛔ FULL HISTORY. A shallow clone scans only the tip, which misses the case that\n # matters most: a secret added and then removed in a later commit. It is still\n # in the history, still fetchable, and still compromised.\n fetch-depth: 0`;\n\nconst GITLEAKS_NOTE = ` # ⛔ v3, NOT v2. v2 declares \\`runs: node20\\`. GitHub removed that runtime from\n # its HOSTED runner images on 2026-09-16 (gitleaks/gitleaks-action's own v3.0.0\n # migration notes, verified 2026-09-17), so v2 fails on ubuntu-latest and still\n # runs on the mini's self-hosted runner. Moving to v3 drops a dependency on a\n # runtime the platform has already withdrawn, before any job moves back to a\n # hosted runner — it is not repairing a scan that is currently broken. v3\n # changes only the runtime to node24 — inputs, outputs and behaviour are unchanged.\n # ★ arm64-SAFE ON THE MINI, verified rather than assumed: v3's src/gitleaks.js builds\n # its download URL from \\`process.arch\\`, so the runner asks for\n # gitleaks_<version>_linux_arm64.tar.gz, an asset its default release publishes\n # (both read 2026-09-22). Nothing here is hard-coded to x64.\n # ★ No \\`GITLEAKS_LICENSE\\`: that env var is required only for GitHub Organization\n # accounts, and \\`taslabs-net\\` is a personal User account (2026-09-17,\n # \\`gh api users/taslabs-net --jq .type\\` -> \\`User\\`).`;\n\n/** The whole `security.yml` for a shape. */\nexport function renderSecurity(shape: RepoShape): string {\n const on = runsOn(shape.runner);\n // ⚠️ A GitHub ACTIONS EXPRESSION, NOT A TEMPLATE LITERAL. `${{ … }}` is interpolated by\n // the Actions runner at job time and must reach the file verbatim, so it is a regular\n // string on purpose — `no-template-curly-in-string` is warning about exactly the\n // confusion this comment resolves, and it is right to ask.\n // oxlint-disable-next-line no-template-curly-in-string\n const token = '${{ secrets.GITHUB_TOKEN }}';\n const scheduled =\n shape.runner === 'mini'\n ? `\\n # ⛔ THE SCHEDULED RUN GOES TO THE MINI TOO: if the runner daemon is down this queues\\n # rather than failing, so a missed weekly scan is silent. homeflare-mini's\\n # \\`ci-runner\\` vmalert group is what notices that, not this workflow.`\n : '';\n\n return `${HEADER}${TRIGGER}\njobs:\n secrets:\n name: secret scan${scheduled}\n runs-on: ${on}\n steps:\n${renderSteps([{ uses: 'actions/checkout@v7' }], 3)}\n${FETCH_NOTE}\n\n${GITLEAKS_NOTE}\n${renderSteps([{ uses: 'gitleaks/gitleaks-action@v3', env: { GITHUB_TOKEN: token } }], 3)}\n`;\n}\n",
10
10
  "/**\n * `renderRepoShape` — one declaration, both halves of a standard repository.\n *\n * ★ THIS IS THE POINT OF THE WHOLE MODULE. A repository declares its shape once and gets\n * its FILES (here) and its GitHub SETTINGS (through `policy`, which is the options\n * object `@homeflare/alchemy`'s `declareRepoPolicy` takes). Before this, the workflow\n * that produces a status check and the ruleset that requires that status check were\n * written in two files by hand, and nothing connected them: renaming the aggregate job\n * would leave a required check that never reports, and a pull request would wait on it\n * forever with auto-merge armed. `checks` below is derived from the rendered workflows,\n * so the two cannot disagree.\n *\n * ⛔ NO IMPORT CROSSES BETWEEN THE PACKAGES, IN EITHER DIRECTION. `policy` is a plain\n * object that is structurally assignable to `RepoPolicyOptions`; `@homeflare/alchemy`\n * does not depend on `@homeflare/config` and this does not depend on Alchemy or Effect.\n * That matters because `@homeflare/config` is installed in 13 of 14 repositories and\n * `@homeflare/alchemy` in 4 — the drift check has to run everywhere, and it must not\n * drag a provider library into a repository that has no stack.\n * ⚠️ A structural seam is checked only where both sides are present: the assignability\n * test lives in `packages/alchemy/tests/repo-shape-policy.test.ts`, which is the one\n * place that imports both.\n */\nimport { renderCi } from './ci.ts';\nimport { renderActionlintConfig, renderChangesetConfig, renderDependabot } from './companions.ts';\nimport { renderSecurity } from './security.ts';\nimport type { RenderedPath, RepoShape } from './shape.ts';\n\n/** The status-check contexts a rendered repository reports. */\nexport interface RepoShapePolicy {\n readonly owner: string;\n readonly repository: string;\n /**\n * ⛔ EXACTLY THE AGGREGATES, NEVER THE LEAF JOBS. `ci` is `if: always()` and fails when\n * any job it needs did not succeed, so requiring it requires all of them. Requiring a\n * leaf job instead would mean a ruleset edit every time a job is added, and a context\n * that stops reporting leaves every pull request pending rather than failing.\n */\n readonly checks: readonly string[];\n}\n\nexport interface RenderedRepo {\n /** Every rendered file, by its path relative to the repository root. */\n readonly files: Readonly<Record<string, string>>;\n /**\n * The options `declareRepoPolicy(id, { ...rendered.policy, settings })` takes.\n * Squash-only, auto-merge, delete-branch-on-merge and the `main` ruleset come from\n * there; the check names come from here.\n */\n readonly policy: RepoShapePolicy;\n}\n\n/**\n * Render a repository's tooling files and the policy that matches them.\n *\n * const rendered = renderRepoShape(shape);\n * rendered.files['.github/workflows/ci.yml'] // the file\n * rendered.policy.checks // ['ci', 'secret scan']\n *\n * ⚠️ EXCEPTED FILES ARE STILL RENDERED. `files` is what the standard says this repository\n * should have; `drift.ts` is what decides which of them are compared. Keeping them here\n * means `--show` can print the standard version of an excepted file, which is how\n * anyone judges whether the exception is still worth its reason.\n */\nexport function renderRepoShape(shape: RepoShape): RenderedRepo {\n const files: Record<string, string> = {\n '.changeset/config.json': renderChangesetConfig(shape),\n '.github/dependabot.yml': renderDependabot(shape),\n '.github/workflows/ci.yml': renderCi(shape),\n '.github/workflows/security.yml': renderSecurity(shape),\n };\n\n const actionlint = renderActionlintConfig(shape);\n if (actionlint !== undefined) files['.github/actionlint.yaml'] = actionlint;\n\n return {\n files,\n policy: { checks: ['ci', 'secret scan'], owner: shape.owner, repository: shape.repository },\n };\n}\n\n/** Every path this renderer can emit, whatever a given shape asks for. */\nexport const RENDERED_PATHS: readonly RenderedPath[] = [\n '.changeset/config.json',\n '.github/actionlint.yaml',\n '.github/dependabot.yml',\n '.github/workflows/ci.yml',\n '.github/workflows/security.yml',\n];\n",
11
11
  "/**\n * The drift check: re-render, compare, and say what to run.\n *\n * ★ WHAT MAKES THIS DIFFERENT FROM A LINT RULE. It does not describe good workflows; it\n * asserts that this repository's committed files ARE the rendered ones. A hand edit\n * fails here before it can spread, which is the mechanism — not the convention — that\n * keeps fourteen repositories the same.\n *\n * ⛔ IT REPORTS, IT DOES NOT REPAIR, exactly like `checkProject` in this package. A check\n * that silently rewrote the working tree would erase the evidence of what someone\n * changed, and the one case worth catching — a deliberate edit that should have been an\n * exception — is the case it would erase. `refresh.ts` is the separate, explicit writer.\n *\n * ⚠️ EVERY COMPARISON IS EXACT TEXT, NOT STRUCTURE. `checkProject` compares parsed values\n * because a project may reformat its copy of a preset. Here the file IS generated, so\n * any difference at all — including a reflowed comment — means the file did not come\n * out of the renderer, and reformatting it would defeat the point of generating it.\n * The one exception is line endings, normalised so a CRLF checkout is not \"drift\".\n */\nimport { type RenderedRepo, renderRepoShape } from './render.ts';\nimport type { RenderedPath, RepoShape, RepoShapeException } from './shape.ts';\n\n/** One thing to fix, in the imperative — the same `Problem` shape `./check` reports. */\nexport type Problem = string;\n\n/** The command that makes a difference go away. Printed with every drift problem. */\nexport const REFRESH_COMMAND = 'bun run repo-shape:refresh';\n\nfunction normalize(text: string): string {\n return text.replaceAll('\\r\\n', '\\n');\n}\n\nasync function readIfPresent(path: string): Promise<string | undefined> {\n const file = Bun.file(path);\n return (await file.exists()) ? normalize(await file.text()) : undefined;\n}\n\n/**\n * ⛔ AN EXCEPTION FOR A FILE THE SHAPE DOES NOT RENDER IS ITSELF A PROBLEM. Otherwise a\n * repository that moved from the mini to GitHub-hosted runners would keep a stale\n * `.github/actionlint.yaml` exception forever, and the exception list — the one place\n * that is supposed to hold every deviation — would be lying about one of them.\n */\nfunction staleExceptions(\n rendered: RenderedRepo,\n exceptions: readonly RepoShapeException[],\n): Problem[] {\n return exceptions\n .filter((exception) => rendered.files[exception.file] === undefined)\n .map(\n (exception) =>\n `${exception.file}: excepted (since ${exception.since}) but this shape renders no such file — drop the exception`,\n );\n}\n\n/**\n * ⚠️ A DUPLICATE EXCEPTION HIDES A REASON. Two `except()` entries for one file means one\n * of the two reasons is never read, and the one that loses is arbitrary. Refuse both.\n */\nfunction duplicateExceptions(exceptions: readonly RepoShapeException[]): Problem[] {\n const seen = new Set<RenderedPath>();\n const duplicated = new Set<RenderedPath>();\n for (const exception of exceptions) {\n if (seen.has(exception.file)) duplicated.add(exception.file);\n seen.add(exception.file);\n }\n return [...duplicated].map(\n (file) => `${file}: declared as an exception more than once — keep one, with one reason`,\n );\n}\n\nexport interface DriftReport {\n /** Empty when the committed files are the rendered ones. */\n readonly problems: readonly Problem[];\n /** Paths whose committed text differs from the render, excluding excepted files. */\n readonly drifted: readonly string[];\n /** Paths the repository declared it owns, with the reason it gave. */\n readonly excepted: readonly RepoShapeException[];\n}\n\n/**\n * Compare a repository's committed tooling files against its declared shape.\n *\n * const report = await driftInRepoShape(process.cwd(), shape);\n * expect(report.problems).toEqual([]);\n *\n * A declared exception passes. An undeclared difference fails, and so does a missing file.\n */\nexport async function driftInRepoShape(projectDir: string, shape: RepoShape): Promise<DriftReport> {\n const rendered = renderRepoShape(shape);\n const exceptions = shape.exceptions ?? [];\n const excepted = new Map(exceptions.map((exception) => [exception.file as string, exception]));\n const problems: Problem[] = [\n ...duplicateExceptions(exceptions),\n ...staleExceptions(rendered, exceptions),\n ];\n const drifted: string[] = [];\n\n for (const [path, expected] of Object.entries(rendered.files)) {\n if (excepted.has(path)) continue;\n const actual = await readIfPresent(`${projectDir}/${path}`);\n if (actual === undefined) {\n problems.push(`${path}: missing — run \\`${REFRESH_COMMAND}\\``);\n drifted.push(path);\n continue;\n }\n if (actual !== normalize(expected)) {\n drifted.push(path);\n problems.push(\n `${path}: differs from what @homeflare/config renders for this shape. ` +\n `Run \\`${REFRESH_COMMAND}\\` to take the standard, ` +\n `or declare it with except({ file: '${path}', reason: '…', since: '…' }) in repo-shape.ts.`,\n );\n }\n }\n\n return { drifted, excepted: exceptions, problems };\n}\n\n/**\n * Every rendered path that is NOT compared, with why. For a report, not for a gate.\n * ★ Printed by `refresh --check` so a passing run still names what it did not check.\n * An exception that stops being visible is an exception that stops being reconsidered.\n */\nexport function exceptionSummary(shape: RepoShape): readonly string[] {\n return (shape.exceptions ?? []).map(\n (exception) =>\n `${exception.file}: not checked — ${exception.reason} (since ${exception.since})`,\n );\n}\n",
12
12
  "/**\n * The writer, and the CLI a repository wires to `repo-shape:refresh`.\n *\n * ⛔ SEPARATE FROM THE CHECK, ON PURPOSE. `drift.ts` never writes and this never gates;\n * a tool that did both would repair the working tree during CI and report green on a\n * repository whose committed files are still wrong.\n *\n * ★ IT ONLY WRITES WHAT CHANGED. An unchanged file keeps its mtime, so a refresh in a\n * watch-mode session does not restart anything, and `git status` after a no-op refresh\n * is empty rather than \"14 files touched\".\n *\n * ⚠️ IT NEVER WRITES AN EXCEPTED FILE. Refreshing a file the repository declared it owns\n * would overwrite the deviation the reason was written for — the one destructive thing\n * this could do, and the one it must not.\n */\nimport { REFRESH_COMMAND, driftInRepoShape, exceptionSummary } from './drift.ts';\nimport { renderRepoShape } from './render.ts';\nimport { type RepoShape, isExcepted } from './shape.ts';\nimport type { RenderedPath } from './shape.ts';\n\nexport interface RefreshResult {\n /** Paths written because their content changed or they were absent. */\n readonly written: readonly string[];\n /** Paths already correct. */\n readonly unchanged: readonly string[];\n /** Paths skipped because the shape declares an exception for them. */\n readonly skipped: readonly string[];\n}\n\n/** Write a repository's rendered files into `projectDir`. */\nexport async function refreshRepoShape(\n projectDir: string,\n shape: RepoShape,\n): Promise<RefreshResult> {\n const rendered = renderRepoShape(shape);\n const written: string[] = [];\n const unchanged: string[] = [];\n const skipped: string[] = [];\n\n for (const [path, contents] of Object.entries(rendered.files)) {\n if (isExcepted(shape, path as RenderedPath)) {\n skipped.push(path);\n continue;\n }\n const target = `${projectDir}/${path}`;\n const file = Bun.file(target);\n if ((await file.exists()) && (await file.text()) === contents) {\n unchanged.push(path);\n continue;\n }\n await Bun.write(target, contents);\n written.push(path);\n }\n\n return { skipped, unchanged, written };\n}\n\n/**\n * ★ `Bun.write(Bun.stdout, …)` RATHER THAN `console.log`. Two reasons, and the lint rule\n * is the lesser: a CLI's output is a stream it owns, and writing to it explicitly is\n * what lets `repoShapeCli` be called in a test and in a `repo-shape.ts` without either\n * one inheriting a global. `console` in `src/` is also off-limits in the house preset —\n * allowed under `tests/**` and `scripts/**`, and this is neither.\n */\nasync function say(\n stream: typeof Bun.stdout | typeof Bun.stderr,\n lines: readonly string[],\n): Promise<void> {\n if (lines.length === 0) return;\n await Bun.write(stream, `${lines.join('\\n')}\\n`);\n}\n\n/**\n * The `repo-shape:refresh` entry point. `--check` reports drift and exits non-zero\n * instead of writing, which is what a repository puts in CI when it does not want the\n * check inside `bun test`.\n */\nexport async function repoShapeCli(\n projectDir: string,\n shape: RepoShape,\n argv: readonly string[],\n): Promise<number> {\n if (argv.includes('--check')) {\n const report = await driftInRepoShape(projectDir, shape);\n // ★ The exceptions are printed on a PASSING run too. An exception that stops being\n // visible is an exception that stops being reconsidered.\n await say(\n Bun.stdout,\n exceptionSummary(shape).map((note) => `· ${note}`),\n );\n if (report.problems.length === 0) {\n const count = report.excepted.length;\n await say(Bun.stdout, [\n `repo shape: in step with @homeflare/config (${count} declared exception(s))`,\n ]);\n return 0;\n }\n await say(Bun.stderr, [\n ...report.problems.map((problem) => `✗ ${problem}`),\n '',\n `Run \\`${REFRESH_COMMAND}\\`, or declare the deviation with a reason.`,\n ]);\n return 1;\n }\n\n const result = await refreshRepoShape(projectDir, shape);\n await say(Bun.stdout, [\n ...result.written.map((path) => `wrote ${path}`),\n ...result.unchanged.map((path) => `ok ${path}`),\n ...result.skipped.map((path) => `excepted ${path}`),\n ]);\n return 0;\n}\n"
13
13
  ],
14
- "mappings": ";;AA8FO,SAAS,MAAsC,CACpD,WACoB;AAAA,EACpB,OAAO;AAAA,IACL,MAAM,UAAU;AAAA,IAChB,QAAQ,gBAAgB,UAAU,UAAU,MAAM;AAAA,IAClD,OAAO,eAAe,UAAU,KAAK;AAAA,EACvC;AAAA;AA8BK,SAAS,QAAuC,CACrD,KACU;AAAA,EACV,IAAI,IAAI,MAAM,WAAW,GAAG;AAAA,IAC1B,MAAM,IAAI,MAAM,0BAA0B,IAAI,kBAAkB;AAAA,EAClE;AAAA,EACA,OAAO;AAAA,IACL,KAAK,IAAI,OAAO;AAAA,IAChB,IAAI,aAAa,IAAI,EAAE;AAAA,IAIvB,MAAM,gBAAgB,QAAQ,IAAI,IAAI;AAAA,IACtC,OAAO,CAAC,GAAI,IAAI,SAAS,CAAC,CAAE;AAAA,IAC5B,QAAQ,gBAAgB,UAAU,IAAI,MAAM;AAAA,IAC5C,OAAO,CAAC,GAAG,IAAI,KAAK;AAAA,EACtB;AAAA;AAsBF,IAAM,WAAW;AAEjB,SAAS,eAAe,CAAC,OAAe,OAAuB;AAAA,EAC7D,MAAM,UAAU,MAAM,KAAK;AAAA,EAC3B,IAAI,QAAQ,WAAW;AAAA,IAAG,MAAM,IAAI,MAAM,eAAe,yBAAyB;AAAA,EAClF,OAAO;AAAA;AAGT,SAAS,eAAe,CAAC,OAAe,OAAuB;AAAA,EAC7D,MAAM,UAAU,MAA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AC5B,MAAM,SAAS,MAAM,iBAAiB,YAAY,KAAK;AAAA,IAGvD,MAAM,IACJ,IAAI,QACJ,iBAAiB,KAAK,EAAE,IAAI,CAAC,SAAS,QAAK,MAAM,CACnD;AAAA,IACA,IAAI,OAAO,SAAS,WAAW,GAAG;AAAA,MAChC,MAAM,QAAQ,OAAO,SAAS;AAAA,MAC9B,MAAM,IAAI,IAAI,QAAQ;AAAA,QACpB,+CAA+C;AAAA,MACjD,CAAC;AAAA,MACD,OAAO;AAAA,IACT;AAAA,IACA,MAAM,IAAI,IAAI,QAAQ;AAAA,MACpB,GAAG,OAAO,SAAS,IAAI,CAAC,YAAY,UAAK,SAAS;AAAA,MAClD;AAAA,MACA,SAAS;AAAA,IACX,CAAC;AAAA,IACD,OAAO;AAAA,EACT;AAAA,EAEA,MAAM,SAAS,MAAM,iBAAiB,YAAY,KAAK;AAAA,EACvD,MAAM,IAAI,IAAI,QAAQ;AAAA,IACpB,GAAG,OAAO,QAAQ,IAAI,CAAC,SAAS,YAAY,MAAM;AAAA,IAClD,GAAG,OAAO,UAAU,IAAI,CAAC,SAAS,YAAY,MAAM;AAAA,IACpD,GAAG,OAAO,QAAQ,IAAI,CAAC,SAAS,YAAY,MAAM;AAAA,EACpD,CAAC;AAAA,EACD,OAAO;AAAA;",
15
+ "debugId": "90AE28FCE975727B64756E2164756E21",
16
16
  "names": []
17
17
  }
@@ -0,0 +1,8 @@
1
+ /** The package names the set pins. One entry per tool or runtime the whole estate shares. */
2
+ export type EstatePackage = 'bun' | 'alchemy' | 'effect' | '@distilled.cloud/cloudflare' | 'typescript' | 'oxfmt' | 'oxlint' | '@types/bun';
3
+ /**
4
+ * Exact versions, never ranges. A range is what lets two repositories resolve two different
5
+ * versions from one line, which is exactly the drift this set exists to name.
6
+ */
7
+ export declare const ESTATE_VERSIONS: Readonly<Record<EstatePackage, string>>;
8
+ //# sourceMappingURL=versions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../src/versions.ts"],"names":[],"mappings":"AAoCA,6FAA6F;AAC7F,MAAM,MAAM,aAAa,GACrB,KAAK,GACL,SAAS,GACT,QAAQ,GACR,6BAA6B,GAC7B,YAAY,GACZ,OAAO,GACP,QAAQ,GACR,YAAY,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CASnE,CAAC"}