@theholocron/cli 4.8.0 → 4.10.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/dist/cli.mjs +87 -25
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +25 -7
- package/dist/index.mjs +6 -7
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -144,10 +144,11 @@ interface RepoConfig {
|
|
|
144
144
|
/**
|
|
145
145
|
* Branch protection preset applied by `holocron setup`. When omitted,
|
|
146
146
|
* no protection is applied and no `branch_protection_level` property is set.
|
|
147
|
+
* Required-status-check contexts for `"strict"` are derived from the task
|
|
148
|
+
* manifest — `{ required: true }` tasks + top-level `extraRequiredChecks`
|
|
149
|
+
* (see `astro.requiredChecks()`).
|
|
147
150
|
*/
|
|
148
151
|
protection?: RepoProtection;
|
|
149
|
-
/** CI check context names required on the default branch (only used when `protection` is "strict"). */
|
|
150
|
-
requiredChecks?: string[];
|
|
151
152
|
/**
|
|
152
153
|
* GitHub teams granted repository access. Synced by `holocron setup`, which
|
|
153
154
|
* also writes `.github/CODEOWNERS` for teams with write-or-higher permission.
|
|
@@ -388,6 +389,15 @@ interface HolocronConfig {
|
|
|
388
389
|
* task-derived list from `astro.requiredChecks()`.
|
|
389
390
|
*/
|
|
390
391
|
extraRequiredChecks?: string[];
|
|
392
|
+
/**
|
|
393
|
+
* Git hooks `holocron setup` installs. `true` / `{ prePush: true }` writes
|
|
394
|
+
* `.husky/pre-push` (runs `holocron ci` before every push); `false` /
|
|
395
|
+
* `{ prePush: false }` opts out. Omitted → on for `protection: "strict"`,
|
|
396
|
+
* off otherwise. `--hooks` / `--no-hooks` on `holocron setup` override.
|
|
397
|
+
*/
|
|
398
|
+
hooks?: boolean | {
|
|
399
|
+
prePush?: boolean;
|
|
400
|
+
};
|
|
391
401
|
providers: RawProvidersConfig;
|
|
392
402
|
apps?: AppConfig[];
|
|
393
403
|
doctor?: DoctorConfig;
|
|
@@ -460,6 +470,9 @@ interface ResolvedHolocronConfig {
|
|
|
460
470
|
syncScripts?: boolean;
|
|
461
471
|
holocronScript?: string;
|
|
462
472
|
extraRequiredChecks?: string[];
|
|
473
|
+
hooks?: boolean | {
|
|
474
|
+
prePush?: boolean;
|
|
475
|
+
};
|
|
463
476
|
providers: ResolvedProvidersConfig;
|
|
464
477
|
apps: AppConfig[];
|
|
465
478
|
doctor: DoctorConfig;
|
|
@@ -494,8 +507,13 @@ interface Capability {
|
|
|
494
507
|
tasks?: TaskEntry[];
|
|
495
508
|
/** Provider config. Shallow-merged at the top level; later capabilities override per-key. */
|
|
496
509
|
providers?: RawProvidersConfig;
|
|
497
|
-
/**
|
|
498
|
-
|
|
510
|
+
/**
|
|
511
|
+
* Required status-check contexts **not** backed by a `required` task
|
|
512
|
+
* (codecov gates, `Storybook Publish`, …). Unioned across all capabilities
|
|
513
|
+
* onto the top-level `extraRequiredChecks`. Task-backed checks come from
|
|
514
|
+
* `{ required: true }` task entries via `astro.requiredChecks()`.
|
|
515
|
+
*/
|
|
516
|
+
extraRequiredChecks?: string[];
|
|
499
517
|
/** Repo config fragment. Scalar fields: last writer wins. properties/topics/teams: merged. */
|
|
500
518
|
repo?: Partial<Omit<RepoConfig, "name">>;
|
|
501
519
|
/** Org name. Last writer wins. */
|
|
@@ -509,9 +527,9 @@ interface Capability {
|
|
|
509
527
|
interface ComposedPreset {
|
|
510
528
|
tasks: TaskEntry[];
|
|
511
529
|
providers: RawProvidersConfig;
|
|
512
|
-
repo: Partial<Omit<RepoConfig, "name"
|
|
513
|
-
|
|
514
|
-
|
|
530
|
+
repo: Partial<Omit<RepoConfig, "name">>;
|
|
531
|
+
/** Non-task required-check contexts, unioned across capabilities. */
|
|
532
|
+
extraRequiredChecks: string[];
|
|
515
533
|
org?: string;
|
|
516
534
|
domain?: string;
|
|
517
535
|
docs?: DocsConfig;
|
package/dist/index.mjs
CHANGED
|
@@ -207,6 +207,7 @@ function resolveConfig(raw) {
|
|
|
207
207
|
syncScripts: raw.syncScripts,
|
|
208
208
|
holocronScript: raw.holocronScript,
|
|
209
209
|
extraRequiredChecks: raw.extraRequiredChecks,
|
|
210
|
+
hooks: raw.hooks,
|
|
210
211
|
providers,
|
|
211
212
|
apps: raw.apps ?? [],
|
|
212
213
|
doctor: raw.doctor ?? {},
|
|
@@ -260,10 +261,10 @@ function compose(...args) {
|
|
|
260
261
|
...cap.providers
|
|
261
262
|
};
|
|
262
263
|
const checksSeen = /* @__PURE__ */ new Set();
|
|
263
|
-
const
|
|
264
|
-
for (const cap of caps) for (const check of cap.
|
|
264
|
+
const extraRequiredChecks = [];
|
|
265
|
+
for (const cap of caps) for (const check of cap.extraRequiredChecks ?? []) if (!checksSeen.has(check)) {
|
|
265
266
|
checksSeen.add(check);
|
|
266
|
-
|
|
267
|
+
extraRequiredChecks.push(check);
|
|
267
268
|
}
|
|
268
269
|
let repo = {};
|
|
269
270
|
for (const cap of caps) {
|
|
@@ -298,10 +299,8 @@ function compose(...args) {
|
|
|
298
299
|
return {
|
|
299
300
|
tasks: [...taskMap.values()],
|
|
300
301
|
providers,
|
|
301
|
-
repo
|
|
302
|
-
|
|
303
|
-
requiredChecks
|
|
304
|
-
},
|
|
302
|
+
repo,
|
|
303
|
+
extraRequiredChecks,
|
|
305
304
|
...org !== void 0 ? { org } : {},
|
|
306
305
|
...domain !== void 0 ? { domain } : {},
|
|
307
306
|
...docs !== void 0 ? { docs } : {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/cli",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.10.0",
|
|
4
4
|
"description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"ora": "^9.4.1",
|
|
53
53
|
"posthog-node": "^5.51.6",
|
|
54
54
|
"yargs": "^18.1.0",
|
|
55
|
-
"@theholocron/astromech": "4.
|
|
56
|
-
"@theholocron/datapad": "4.
|
|
57
|
-
"@theholocron/logger": "4.
|
|
55
|
+
"@theholocron/astromech": "4.10.0",
|
|
56
|
+
"@theholocron/datapad": "4.10.0",
|
|
57
|
+
"@theholocron/logger": "4.10.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@theholocron/eslint-config": "^8.0.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"tsx": "4.23.12",
|
|
72
72
|
"typescript": "^5.9.3",
|
|
73
73
|
"vitest": "^4.1.11",
|
|
74
|
-
"@theholocron/rollup-plugin-transform-template": "4.
|
|
74
|
+
"@theholocron/rollup-plugin-transform-template": "4.10.0"
|
|
75
75
|
},
|
|
76
76
|
"engines": {
|
|
77
77
|
"node": ">=22.0.0"
|