@theholocron/cli 4.10.0 → 4.10.1
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 +56 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -72,9 +72,49 @@ Additional `repo` fields recognised by `holocron setup`:
|
|
|
72
72
|
| ----------------- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
73
73
|
| `repo.teams` | `Array<string \| { slug, permission }>` | GitHub teams granted repo access. String shorthand defaults to `push` (Write). `holocron setup` also writes `.github/CODEOWNERS` for teams with `push`/`maintain`/`admin`. |
|
|
74
74
|
| `repo.topics` | `string[]` | GitHub topics set on the repository. |
|
|
75
|
-
| `repo.protection` | `"balanced" \| "strict" \| "none"` | Branch-protection preset applied by `holocron setup`.
|
|
75
|
+
| `repo.protection` | `"balanced" \| "strict" \| "none"` | Branch-protection preset applied by `holocron setup`. For `"strict"`, the required status checks are derived from the task manifest — see below. |
|
|
76
76
|
| `repo.properties` | `RepoProperties` | Org-level custom property values synced to the GitHub dashboard. |
|
|
77
77
|
|
|
78
|
+
### Required status checks (`protection: "strict"`)
|
|
79
|
+
|
|
80
|
+
`holocron setup` builds the branch-protection required-check list from the
|
|
81
|
+
manifest, not a hand-maintained array:
|
|
82
|
+
|
|
83
|
+
- `"DCO"` (hard-prepended), then
|
|
84
|
+
- every `{ required: true }` task's workflow check context (`Lint / Conclusion`,
|
|
85
|
+
`Test / Conclusion`, `Typecheck / Conclusion`, `audit / Conclusion`), walked
|
|
86
|
+
in CI order, then
|
|
87
|
+
- the top-level `extraRequiredChecks` (codecov gates, a bundle-build check, …).
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
export default defineConfig({
|
|
91
|
+
tasks: [
|
|
92
|
+
{ name: "lint", required: true },
|
|
93
|
+
{ name: "test", required: true },
|
|
94
|
+
{ name: "typecheck", required: true },
|
|
95
|
+
],
|
|
96
|
+
extraRequiredChecks: ["codecov/patch", "codecov/project"],
|
|
97
|
+
repo: { name: "acme/app", protection: "strict" },
|
|
98
|
+
providers: { source: "github" },
|
|
99
|
+
});
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Git hooks
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
export default defineConfig({
|
|
106
|
+
hooks: true, // or { prePush: true }
|
|
107
|
+
repo: { protection: "strict" },
|
|
108
|
+
providers: { source: "github" },
|
|
109
|
+
});
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
`holocron setup` writes `.husky/pre-push` (runs `holocron ci` before every
|
|
113
|
+
push) and sets `package.json#scripts.prepare` to `husky`. On by default for
|
|
114
|
+
`protection: "strict"`; `false` / `{ prePush: false }` opts out. `holocron
|
|
115
|
+
setup --hooks` / `--no-hooks` override per run. Bypass one push with `git push
|
|
116
|
+
--no-verify`.
|
|
117
|
+
|
|
78
118
|
### Task scripts
|
|
79
119
|
|
|
80
120
|
`holocron sync` reconciles `package.json#scripts` from the `tasks` manifest
|
|
@@ -93,6 +133,21 @@ Writes `"holocron": "<holocronScript ?? 'holocron'>"` plus one
|
|
|
93
133
|
`"<task>": "holocron run <task>"` per runnable task. `syncScripts: false`
|
|
94
134
|
opts out entirely.
|
|
95
135
|
|
|
136
|
+
### `holocron ci`
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
holocron ci [--all] [--filter <pkg>] [--dry-run]
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Runs the merge-gating checks locally, in CI order, exiting non-zero on the
|
|
143
|
+
first failure — the "will my PR be green?" pre-flight, and what the
|
|
144
|
+
`pre-push` hook runs. Default scope is every `{ required: true }` task
|
|
145
|
+
(falling back to every `ci: true` task when nothing is marked required).
|
|
146
|
+
`--all` forces the full set; `--filter` is a `turbo --filter=` passthrough.
|
|
147
|
+
Order comes from the `CI_ORDER` constant in `@theholocron/astromech`
|
|
148
|
+
(`typecheck → lint → test → build → …`). Tasks with no local equivalent
|
|
149
|
+
(`audit`, `codeql`, `deploy`) are reported as enforced-in-CI, never failures.
|
|
150
|
+
|
|
96
151
|
### Lint parity
|
|
97
152
|
|
|
98
153
|
The `lint` task takes an optional `linters` array — one list that drives
|