@theholocron/cli 3.65.0 → 4.0.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 +4 -2
- package/dist/cli.mjs +37 -13
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +11 -9
- package/dist/index.mjs +5 -5
- package/package.json +7 -6
package/dist/index.d.mts
CHANGED
|
@@ -295,9 +295,11 @@ interface HolocronConfig {
|
|
|
295
295
|
*/
|
|
296
296
|
repo?: RepoConfig;
|
|
297
297
|
/**
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
-
*
|
|
298
|
+
* The task manifest — what this repo runs. Each entry is a task name
|
|
299
|
+
* (backed by a reusable workflow in `theholocron/.github`), or the object
|
|
300
|
+
* form to pass `with:` inputs. `@theholocron/astromech` reads this as the
|
|
301
|
+
* single source for `holocron run` / `holocron ci` / the generated CI
|
|
302
|
+
* workflows / `package.json` scripts.
|
|
301
303
|
*
|
|
302
304
|
* Supported values: "lint" | "test" | "typecheck" | "codeql" | "review" |
|
|
303
305
|
* "release" | "tag" | "stale" | "greetings" | "dependencies" | "bookkeeping" | "audit" |
|
|
@@ -353,7 +355,7 @@ interface HolocronConfig {
|
|
|
353
355
|
* ["lint", { "name": "release", "with": { "run-build": false } }]
|
|
354
356
|
* { "name": "deploy", "with": { "docs": true } }
|
|
355
357
|
*/
|
|
356
|
-
|
|
358
|
+
tasks?: Array<string | {
|
|
357
359
|
name: string;
|
|
358
360
|
with?: WorkflowWithConfig;
|
|
359
361
|
paths?: string[];
|
|
@@ -426,7 +428,7 @@ interface ResolvedHolocronConfig {
|
|
|
426
428
|
org?: string;
|
|
427
429
|
domain?: string;
|
|
428
430
|
repo?: RepoConfig;
|
|
429
|
-
|
|
431
|
+
tasks?: Array<string | {
|
|
430
432
|
name: string;
|
|
431
433
|
with?: WorkflowWithConfig;
|
|
432
434
|
paths?: string[];
|
|
@@ -454,15 +456,15 @@ declare function resolveEntry(key: CapabilityKey, raw: RawProviderEntry): Resolv
|
|
|
454
456
|
declare function resolveConfig(raw: HolocronConfig): ResolvedHolocronConfig;
|
|
455
457
|
//#endregion
|
|
456
458
|
//#region src/config/compose.d.ts
|
|
457
|
-
type
|
|
459
|
+
type TaskEntry = NonNullable<HolocronConfig["tasks"]>[number];
|
|
458
460
|
/** A single composable capability fragment. */
|
|
459
461
|
interface Capability {
|
|
460
462
|
/** Unique identifier — used for deduplication and dependency resolution. */
|
|
461
463
|
id: string;
|
|
462
464
|
/** Other capability IDs that must be present in the same compose() call. */
|
|
463
465
|
requires?: string[];
|
|
464
|
-
/**
|
|
465
|
-
|
|
466
|
+
/** Task entries contributed by this capability. Merged by name; last writer wins. */
|
|
467
|
+
tasks?: TaskEntry[];
|
|
466
468
|
/** Provider config. Shallow-merged at the top level; later capabilities override per-key. */
|
|
467
469
|
providers?: RawProvidersConfig;
|
|
468
470
|
/** CI check names that must pass. Unioned across all capabilities. */
|
|
@@ -478,7 +480,7 @@ interface Capability {
|
|
|
478
480
|
}
|
|
479
481
|
/** The merged result of a compose() call. Spreads into defineConfig(). */
|
|
480
482
|
interface ComposedPreset {
|
|
481
|
-
|
|
483
|
+
tasks: TaskEntry[];
|
|
482
484
|
providers: RawProvidersConfig;
|
|
483
485
|
repo: Partial<Omit<RepoConfig, "name">> & {
|
|
484
486
|
requiredChecks: string[];
|
package/dist/index.mjs
CHANGED
|
@@ -203,7 +203,7 @@ function resolveConfig(raw) {
|
|
|
203
203
|
org: raw.org,
|
|
204
204
|
domain: raw.domain,
|
|
205
205
|
repo: raw.repo,
|
|
206
|
-
|
|
206
|
+
tasks: raw.tasks,
|
|
207
207
|
providers,
|
|
208
208
|
apps: raw.apps ?? [],
|
|
209
209
|
doctor: raw.doctor ?? {},
|
|
@@ -216,7 +216,7 @@ function resolveConfig(raw) {
|
|
|
216
216
|
}
|
|
217
217
|
//#endregion
|
|
218
218
|
//#region src/config/compose.ts
|
|
219
|
-
function
|
|
219
|
+
function taskName(e) {
|
|
220
220
|
return typeof e === "string" ? e : e.name;
|
|
221
221
|
}
|
|
222
222
|
/**
|
|
@@ -249,8 +249,8 @@ function compose(...args) {
|
|
|
249
249
|
const errors = [];
|
|
250
250
|
for (const cap of caps) for (const req of cap.requires ?? []) if (!available.has(req)) errors.push(`"${cap.id}" requires "${req}"`);
|
|
251
251
|
if (errors.length > 0) throw new ConfigError(`compose(): unmet dependencies — ${errors.join(", ")}`);
|
|
252
|
-
const
|
|
253
|
-
for (const cap of caps) for (const entry of cap.
|
|
252
|
+
const taskMap = /* @__PURE__ */ new Map();
|
|
253
|
+
for (const cap of caps) for (const entry of cap.tasks ?? []) taskMap.set(taskName(entry), entry);
|
|
254
254
|
let providers = {};
|
|
255
255
|
for (const cap of caps) if (cap.providers) providers = {
|
|
256
256
|
...providers,
|
|
@@ -293,7 +293,7 @@ function compose(...args) {
|
|
|
293
293
|
if (cap.docs !== void 0) docs = cap.docs;
|
|
294
294
|
}
|
|
295
295
|
return {
|
|
296
|
-
|
|
296
|
+
tasks: [...taskMap.values()],
|
|
297
297
|
providers,
|
|
298
298
|
repo: {
|
|
299
299
|
...repo,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/cli",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "The Holocron CLI
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli",
|
|
7
7
|
"devops",
|
|
@@ -47,13 +47,14 @@
|
|
|
47
47
|
"@theholocron/env-utils": "^1.6.0",
|
|
48
48
|
"@theholocron/github-client": "^1.14.2",
|
|
49
49
|
"@theholocron/http-client": "^1.14.2",
|
|
50
|
-
"@theholocron/registry-doc": "^1.
|
|
50
|
+
"@theholocron/registry-doc": "^1.12.0",
|
|
51
51
|
"chalk": "^6.0.0",
|
|
52
52
|
"ora": "^9.4.1",
|
|
53
53
|
"posthog-node": "^5.51.6",
|
|
54
54
|
"yargs": "^18.1.0",
|
|
55
|
-
"@theholocron/
|
|
56
|
-
"@theholocron/
|
|
55
|
+
"@theholocron/astromech": "4.0.0",
|
|
56
|
+
"@theholocron/logger": "4.0.0",
|
|
57
|
+
"@theholocron/datapad": "4.0.0"
|
|
57
58
|
},
|
|
58
59
|
"devDependencies": {
|
|
59
60
|
"@theholocron/eslint-config": "^7.32.1",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"tsx": "4.23.12",
|
|
71
72
|
"typescript": "^5.9.3",
|
|
72
73
|
"vitest": "^4.1.11",
|
|
73
|
-
"@theholocron/rollup-plugin-transform-template": "
|
|
74
|
+
"@theholocron/rollup-plugin-transform-template": "4.0.0"
|
|
74
75
|
},
|
|
75
76
|
"engines": {
|
|
76
77
|
"node": ">=22.0.0"
|