@homeflare/config 0.5.1 → 0.7.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.
Files changed (50) hide show
  1. package/README.md +46 -0
  2. package/bin/hooks.ts +19 -0
  3. package/dist/hooks/gates.d.ts +19 -0
  4. package/dist/hooks/gates.d.ts.map +1 -0
  5. package/dist/hooks/install.d.ts +20 -0
  6. package/dist/hooks/install.d.ts.map +1 -0
  7. package/dist/hooks/report.d.ts +30 -0
  8. package/dist/hooks/report.d.ts.map +1 -0
  9. package/dist/hooks/staged.d.ts +19 -0
  10. package/dist/hooks/staged.d.ts.map +1 -0
  11. package/dist/hooks.d.ts +15 -0
  12. package/dist/hooks.d.ts.map +1 -0
  13. package/dist/hooks.js +196 -0
  14. package/dist/hooks.js.map +14 -0
  15. package/dist/repo-shape/ci.d.ts +20 -0
  16. package/dist/repo-shape/ci.d.ts.map +1 -0
  17. package/dist/repo-shape/companions.d.ts +39 -0
  18. package/dist/repo-shape/companions.d.ts.map +1 -0
  19. package/dist/repo-shape/drift.d.ts +29 -0
  20. package/dist/repo-shape/drift.d.ts.map +1 -0
  21. package/dist/repo-shape/refresh.d.ts +18 -0
  22. package/dist/repo-shape/refresh.d.ts.map +1 -0
  23. package/dist/repo-shape/render.d.ts +39 -0
  24. package/dist/repo-shape/render.d.ts.map +1 -0
  25. package/dist/repo-shape/security.d.ts +19 -0
  26. package/dist/repo-shape/security.d.ts.map +1 -0
  27. package/dist/repo-shape/shape.d.ts +138 -0
  28. package/dist/repo-shape/shape.d.ts.map +1 -0
  29. package/dist/repo-shape/yaml.d.ts +18 -0
  30. package/dist/repo-shape/yaml.d.ts.map +1 -0
  31. package/dist/repo-shape.d.ts +43 -0
  32. package/dist/repo-shape.d.ts.map +1 -0
  33. package/dist/repo-shape.js +611 -0
  34. package/dist/repo-shape.js.map +17 -0
  35. package/docs/repo-shape.md +199 -0
  36. package/package.json +11 -1
  37. package/src/hooks/gates.ts +102 -0
  38. package/src/hooks/install.ts +95 -0
  39. package/src/hooks/report.ts +72 -0
  40. package/src/hooks/staged.ts +61 -0
  41. package/src/hooks.ts +48 -0
  42. package/src/repo-shape/ci.ts +215 -0
  43. package/src/repo-shape/companions.ts +151 -0
  44. package/src/repo-shape/drift.ts +130 -0
  45. package/src/repo-shape/refresh.ts +113 -0
  46. package/src/repo-shape/render.ts +88 -0
  47. package/src/repo-shape/security.ts +109 -0
  48. package/src/repo-shape/shape.ts +214 -0
  49. package/src/repo-shape/yaml.ts +96 -0
  50. package/src/repo-shape.ts +69 -0
@@ -0,0 +1,69 @@
1
+ /**
2
+ * `@homeflare/config/repo-shape` — the standard HomeFlare repository, as one declaration.
3
+ *
4
+ * A repository keeps a `repo-shape.ts` at its root:
5
+ *
6
+ * import { except, repoShapeCli, type RepoShape } from '@homeflare/config/repo-shape';
7
+ *
8
+ * export const shape: RepoShape = {
9
+ * owner: 'taslabs-net',
10
+ * repository: 'homeflare-proxmox',
11
+ * runner: 'mini',
12
+ * publishes: false,
13
+ * };
14
+ *
15
+ * if (import.meta.main) process.exit(await repoShapeCli(import.meta.dir, shape, Bun.argv.slice(2)));
16
+ *
17
+ * That one file gives the repository:
18
+ *
19
+ * · its FILES — `bun run repo-shape:refresh` writes ci.yml, security.yml,
20
+ * actionlint.yaml, dependabot.yml and the changeset config;
21
+ * · its DRIFT GATE — a `bun:test` calling `driftInRepoShape` fails on a hand edit;
22
+ * · its SETTINGS — `renderRepoShape(shape).policy` is the options object
23
+ * `@homeflare/alchemy`'s `declareRepoPolicy` takes, so the ruleset
24
+ * requires exactly the checks these workflows report.
25
+ *
26
+ * ⛔ A DEVIATION IS DECLARED OR IT FAILS. `except({ file, reason, since })` refuses an
27
+ * empty reason and refuses a reason read from a variable — the text has to be written
28
+ * at the exception, in the diff, where someone will read it. Same for `extraJob()`.
29
+ *
30
+ * ★ WHY IT LIVES IN `@homeflare/config` RATHER THAN `@homeflare/alchemy`. Measured
31
+ * 2026-09-22: `@homeflare/config` is a dependency of 13 of 14 estate repositories and
32
+ * `@homeflare/alchemy` of 4. The drift check has to run in every repository's own CI,
33
+ * including the ones with no Alchemy stack, so it belongs to the package they all
34
+ * already have — and it takes no dependency on Alchemy or Effect to get there.
35
+ */
36
+ export { renderCi, ACTIONLINT_VERSION, BUN_VERSION } from './repo-shape/ci.ts';
37
+ export {
38
+ renderActionlintConfig,
39
+ renderChangesetConfig,
40
+ renderDependabot,
41
+ } from './repo-shape/companions.ts';
42
+ export {
43
+ type DriftReport,
44
+ type Problem,
45
+ driftInRepoShape,
46
+ exceptionSummary,
47
+ REFRESH_COMMAND,
48
+ } from './repo-shape/drift.ts';
49
+ export { type RefreshResult, refreshRepoShape, repoShapeCli } from './repo-shape/refresh.ts';
50
+ export {
51
+ type RenderedRepo,
52
+ type RepoShapePolicy,
53
+ RENDERED_PATHS,
54
+ renderRepoShape,
55
+ } from './repo-shape/render.ts';
56
+ export { renderSecurity } from './repo-shape/security.ts';
57
+ export {
58
+ type ExtraJob,
59
+ type JobStep,
60
+ type RenderedPath,
61
+ type RepoRunner,
62
+ type RepoShape,
63
+ type RepoShapeException,
64
+ type Stated,
65
+ except,
66
+ extraJob,
67
+ isExcepted,
68
+ runsOn,
69
+ } from './repo-shape/shape.ts';