@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.
- package/README.md +46 -0
- package/bin/hooks.ts +19 -0
- package/dist/hooks/gates.d.ts +19 -0
- package/dist/hooks/gates.d.ts.map +1 -0
- package/dist/hooks/install.d.ts +20 -0
- package/dist/hooks/install.d.ts.map +1 -0
- package/dist/hooks/report.d.ts +30 -0
- package/dist/hooks/report.d.ts.map +1 -0
- package/dist/hooks/staged.d.ts +19 -0
- package/dist/hooks/staged.d.ts.map +1 -0
- package/dist/hooks.d.ts +15 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +196 -0
- package/dist/hooks.js.map +14 -0
- package/dist/repo-shape/ci.d.ts +20 -0
- package/dist/repo-shape/ci.d.ts.map +1 -0
- package/dist/repo-shape/companions.d.ts +39 -0
- package/dist/repo-shape/companions.d.ts.map +1 -0
- package/dist/repo-shape/drift.d.ts +29 -0
- package/dist/repo-shape/drift.d.ts.map +1 -0
- package/dist/repo-shape/refresh.d.ts +18 -0
- package/dist/repo-shape/refresh.d.ts.map +1 -0
- package/dist/repo-shape/render.d.ts +39 -0
- package/dist/repo-shape/render.d.ts.map +1 -0
- package/dist/repo-shape/security.d.ts +19 -0
- package/dist/repo-shape/security.d.ts.map +1 -0
- package/dist/repo-shape/shape.d.ts +138 -0
- package/dist/repo-shape/shape.d.ts.map +1 -0
- package/dist/repo-shape/yaml.d.ts +18 -0
- package/dist/repo-shape/yaml.d.ts.map +1 -0
- package/dist/repo-shape.d.ts +43 -0
- package/dist/repo-shape.d.ts.map +1 -0
- package/dist/repo-shape.js +611 -0
- package/dist/repo-shape.js.map +17 -0
- package/docs/repo-shape.md +199 -0
- package/package.json +11 -1
- package/src/hooks/gates.ts +102 -0
- package/src/hooks/install.ts +95 -0
- package/src/hooks/report.ts +72 -0
- package/src/hooks/staged.ts +61 -0
- package/src/hooks.ts +48 -0
- package/src/repo-shape/ci.ts +215 -0
- package/src/repo-shape/companions.ts +151 -0
- package/src/repo-shape/drift.ts +130 -0
- package/src/repo-shape/refresh.ts +113 -0
- package/src/repo-shape/render.ts +88 -0
- package/src/repo-shape/security.ts +109 -0
- package/src/repo-shape/shape.ts +214 -0
- package/src/repo-shape/yaml.ts +96 -0
- 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';
|