@theholocron/cli 5.0.0-alpha.9 → 5.0.0-alpha.90
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 +93 -2
- package/dist/cli.mjs +611 -136
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +187 -2
- package/dist/index.mjs +235 -3
- package/dist/plugin/capabilities.d.mts +89 -23
- package/package.json +15 -10
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Run `holocron` with no command, a parent command with no subcommand
|
|
|
21
21
|
missing a required positional (`holocron deploy`, `holocron secret set`), and
|
|
22
22
|
you get a prompt instead of a `--help` dead end:
|
|
23
23
|
|
|
24
|
-
```
|
|
24
|
+
```console
|
|
25
25
|
$ holocron
|
|
26
26
|
? What would you like to do? › dep
|
|
27
27
|
────────────────────────────────────────────────
|
|
@@ -112,6 +112,52 @@ Additional `repo` fields recognised by `holocron setup`:
|
|
|
112
112
|
| `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. |
|
|
113
113
|
| `repo.properties` | `RepoProperties` | Org-level custom property values synced to the GitHub dashboard. |
|
|
114
114
|
|
|
115
|
+
### Custom properties synced to GitHub
|
|
116
|
+
|
|
117
|
+
`holocron setup` and `holocron sync` both call `syncProperties()` with two
|
|
118
|
+
kinds of fields — always one-way (`holocron.config.ts` → resolved →
|
|
119
|
+
properties; properties are never a second editable source of truth):
|
|
120
|
+
|
|
121
|
+
**Manual** — `repo.properties` states these explicitly:
|
|
122
|
+
|
|
123
|
+
| Property | Value |
|
|
124
|
+
| ------------------------ | ---------------------------------------------- |
|
|
125
|
+
| `lifecycle` | `"active" \| "experimental" \| "deprecated"` |
|
|
126
|
+
| `open_source` | `boolean` |
|
|
127
|
+
| `runtime_environment` | `"node" \| "browser" \| "universal" \| "none"` |
|
|
128
|
+
| `uses_external_packages` | `boolean` |
|
|
129
|
+
|
|
130
|
+
**Derived** — computed from resolved config + `package.json`, not a config field:
|
|
131
|
+
|
|
132
|
+
| Property | Value |
|
|
133
|
+
| ---------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
134
|
+
| `monorepo` | `boolean` — whether `pnpm-workspace.yaml` exists |
|
|
135
|
+
| `holocron_branch_protection_level` | the active `repo.protection` preset |
|
|
136
|
+
| `holocron_profile` | repo archetype: `library` / `cli` / `plugin` / `template` / `app` / `docs` / `platform` |
|
|
137
|
+
| `holocron_capabilities` | provider capability keys actually wired in `providers: {}` (`multi_select`) |
|
|
138
|
+
| `holocron_stack` | detected build/framework tooling — `next`, `vite`, `astro`, `tsdown`, … (`multi_select`) |
|
|
139
|
+
| `holocron_compliance` | `"compliant" \| "non-compliant"` against a minimal `source` + `ci` baseline |
|
|
140
|
+
|
|
141
|
+
Field definitions and derivation heuristics:
|
|
142
|
+
`.notes/tech-holocron-platform.spec.md` → "Custom-properties sync — field
|
|
143
|
+
definitions (#677)".
|
|
144
|
+
|
|
145
|
+
The four derived fields' pure computation —
|
|
146
|
+
`deriveProfile()`/`deriveStack()`/`deriveCapabilities()`/`deriveCompliance()`
|
|
147
|
+
(plus their `HolocronProfile`/`DeriveProfileInput`/`PackageJsonLike` types)
|
|
148
|
+
— is exported from this package's public entry point, separate from the
|
|
149
|
+
local-filesystem reads (`readWorkspacePackageJsons()`) that gather their
|
|
150
|
+
inputs here. `@theholocron/sentinel`'s `syncPropertiesFromConfig()` reuses
|
|
151
|
+
these functions unchanged, gathering the same inputs over the GitHub API
|
|
152
|
+
instead (D8 — one derivation, two input sources, not two
|
|
153
|
+
implementations).
|
|
154
|
+
|
|
155
|
+
`missingCapabilities(capabilities)` is `deriveCompliance()`'s sibling —
|
|
156
|
+
same `REQUIRED_BASELINE` table, but returns _which_ required capabilities
|
|
157
|
+
are absent rather than whether any are. `@theholocron/sentinel`'s
|
|
158
|
+
`postCheckRun()` uses it to name what's missing on the check run it
|
|
159
|
+
posts, instead of reporting pass/fail.
|
|
160
|
+
|
|
115
161
|
### Required status checks (`protection: "strict"`)
|
|
116
162
|
|
|
117
163
|
`holocron setup` builds the branch-protection required-check list from the
|
|
@@ -146,6 +192,26 @@ lockfile — no coverable change) passes instead of hanging on a `codecov/*`
|
|
|
146
192
|
required check that never posts. A re-run of `holocron setup` backfills both into
|
|
147
193
|
an existing repo.
|
|
148
194
|
|
|
195
|
+
### Default branch (`repo.defaultBranch`)
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
export default defineConfig({
|
|
199
|
+
repo: { protection: "strict", defaultBranch: "alpha" },
|
|
200
|
+
providers: { source: "github" },
|
|
201
|
+
});
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
`holocron setup` syncs GitHub's repo-level default branch (`HEAD`) — what a
|
|
205
|
+
fresh clone checks out, what `gh pr create`/the compare UI target by default,
|
|
206
|
+
and what Sentinel's `validateConfig()` reads (it only ever reads config from
|
|
207
|
+
the repo's default branch, never a PR ref — a deliberate security boundary).
|
|
208
|
+
Omit this field to leave GitHub's current setting untouched; most repos never
|
|
209
|
+
need it. It exists for a repo using a `main`/`alpha` prerelease-channel split
|
|
210
|
+
where active development happens on a non-`main` branch: set this to that
|
|
211
|
+
branch so Sentinel validates against what's actually being developed, then
|
|
212
|
+
change it back once that branch merges to `main` for a stable cut and stops
|
|
213
|
+
being the active branch.
|
|
214
|
+
|
|
149
215
|
### Git hooks
|
|
150
216
|
|
|
151
217
|
```ts
|
|
@@ -355,7 +421,7 @@ holocron auth set github.admin ghp_xxx # setup, secrets, environments
|
|
|
355
421
|
|
|
356
422
|
The resolution chain per capability is:
|
|
357
423
|
|
|
358
|
-
```
|
|
424
|
+
```text
|
|
359
425
|
--token flag → HOLOCRON_<FEATURE>_TOKEN env var → keyring("github.<feature>")
|
|
360
426
|
```
|
|
361
427
|
|
|
@@ -427,6 +493,31 @@ holds the orchestration + the Holocron-specific credential resolution
|
|
|
427
493
|
(`telemetry/resolve.ts`). See the
|
|
428
494
|
[telemetry guide](https://docs.theholocron.dev/holocron/telemetry/).
|
|
429
495
|
|
|
496
|
+
### ESLint bundle options
|
|
497
|
+
|
|
498
|
+
Most repos need nothing here — `@theholocron/eslint-config`'s `library()`
|
|
499
|
+
bundle resolves with zero committed file (Bucket A: `eslint --config
|
|
500
|
+
<shared path>`, no per-repo `eslint.config.ts` needed). A package with a
|
|
501
|
+
genuine, deliberate exception — e.g. Web Crypto globals a Node-targeted
|
|
502
|
+
package still needs, exempted via `library()`'s own `browserPackages`
|
|
503
|
+
option in that package's own `eslint.config.ts` — should also declare the
|
|
504
|
+
same paths in `holocron.config`'s `eslint.browserPackages`:
|
|
505
|
+
|
|
506
|
+
```ts
|
|
507
|
+
export default defineConfig({
|
|
508
|
+
eslint: {
|
|
509
|
+
browserPackages: ["packages/github-client/src/app-auth"],
|
|
510
|
+
},
|
|
511
|
+
});
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
This doesn't replace the package's own `eslint.config.ts` (local/CI linting
|
|
515
|
+
still resolves that file directly) — it's the signal Sentinel's centralized
|
|
516
|
+
static-analysis check (holocron#849/#858) reads instead, since that check
|
|
517
|
+
never reads a PR's own committed config files. Without it, Sentinel flags a
|
|
518
|
+
false-positive `eslint-plugin-n` node-builtins finding on exactly the files
|
|
519
|
+
the local override exists to exempt.
|
|
520
|
+
|
|
430
521
|
## What's in here
|
|
431
522
|
|
|
432
523
|
- `src/capabilities/` — the 14 capability interfaces that providers
|