@theholocron/cli 5.0.0-alpha.245 → 5.0.0-alpha.246

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.
@@ -0,0 +1,241 @@
1
+ import { n as Capability, r as ComposedPreset, t as compose } from "./index-Cd_9v4b8.mjs";
2
+ //#region src/presets/capabilities/audit.d.ts
3
+ interface AuditOptions {
4
+ /** Enable Knip unused-export analysis (default: false). */
5
+ knip?: boolean;
6
+ /** Enable Lighthouse performance audits (default: false). */
7
+ performance?: boolean;
8
+ /** Path to the Lighthouse config file. */
9
+ lighthouseConfig?: string;
10
+ }
11
+ /**
12
+ * Adds BundleWatch + optional Knip and Lighthouse auditing. Marked `required` —
13
+ * `holocron setup` derives the `audit / Conclusion` branch-protection check
14
+ * from the manifest.
15
+ * Requires: node
16
+ */
17
+ declare function audit({ knip, performance, lighthouseConfig }?: AuditOptions): Capability;
18
+ //#endregion
19
+ //#region src/presets/capabilities/docs.d.ts
20
+ /**
21
+ * Adds a documentation site deployed to Cloudflare Pages with PR previews.
22
+ * Sets org/domain, wires Cloudflare + DNS providers, and adds the codecov
23
+ * `extraRequiredChecks` (enabled for all docs repos).
24
+ * Requires: node
25
+ */
26
+ declare function docs(): Capability;
27
+ //#endregion
28
+ //#region src/presets/capabilities/monorepo.d.ts
29
+ /**
30
+ * Adjusts a repo to be a monorepo — sets uses_external_packages: true
31
+ * (workspaces pull in many deps). Compose after the base capabilities.
32
+ * Requires: node
33
+ *
34
+ * @example
35
+ * const preset = compose(node(), typecheck(), nextjs(), monorepo());
36
+ */
37
+ declare function monorepo(): Capability;
38
+ //#endregion
39
+ //#region src/presets/capabilities/nextjs.d.ts
40
+ interface NextjsOptions {
41
+ /** Extra `with:` inputs merged into the `test` workflow entry. */
42
+ test?: Record<string, unknown>;
43
+ }
44
+ /**
45
+ * Bundle preset for Next.js application repos. Returns a Capability[] that
46
+ * includes react() so callers only need compose(node(), typecheck(), nextjs()).
47
+ * compose() deduplicates, so adding react() explicitly is harmless.
48
+ *
49
+ * Adds: Vercel deployment and Cypress user-flow tests on top of react().
50
+ * Requires (via react()): node, typecheck
51
+ *
52
+ * @example
53
+ * const preset = compose(node(), typecheck(), nextjs({ test: { "wait-on-url": "http://localhost:3000" } }));
54
+ */
55
+ declare function nextjs({ test: testOverrides }?: NextjsOptions): Capability[];
56
+ //#endregion
57
+ //#region src/presets/capabilities/node.d.ts
58
+ /**
59
+ * Base capability for all theholocron Node.js repositories.
60
+ * Contributes: GitHub source/CI/issues providers, strict branch protection,
61
+ * and the standard workflow set (lint, test, security, review, stale, greetings,
62
+ * dependencies, bookkeeping). Does NOT include typecheck — add that separately.
63
+ * The `lint` task carries the org linter list explicitly so every repo runs the
64
+ * same set (a repo can override with its own `{ name: "lint", linters: [...] }`).
65
+ * `lint` and `test` are marked `required` — `holocron setup` derives their
66
+ * `… / Conclusion` branch-protection check contexts from the manifest.
67
+ */
68
+ declare function node(): Capability;
69
+ //#endregion
70
+ //#region src/presets/capabilities/react.d.ts
71
+ interface ReactOptions {
72
+ /** Extra `with:` inputs merged into the `test` workflow entry (e.g. run-chromatic). */
73
+ test?: Record<string, unknown>;
74
+ }
75
+ /**
76
+ * Adds React/Storybook UI testing and browser runtime config.
77
+ * Contributes: secrets provider, browser runtime property, Storybook + interaction
78
+ * test jobs, audit with Knip + Lighthouse, and the UI `extraRequiredChecks`.
79
+ * Requires: node, typecheck
80
+ *
81
+ * Pass `test` overrides to merge repo-specific options into the single test
82
+ * workflow entry so the sync tool sees one complete entry rather than two
83
+ * conflicting ones:
84
+ *
85
+ * @example
86
+ * compose(node(), typecheck(), react({ test: { "run-chromatic": { projects: [...] } } }))
87
+ */
88
+ declare function react({ test: testOverrides }?: ReactOptions): Capability;
89
+ //#endregion
90
+ //#region src/presets/capabilities/typecheck.d.ts
91
+ /**
92
+ * Adds TypeScript type-checking to a repo. Marked `required` — `holocron setup`
93
+ * derives the `Typecheck / Conclusion` branch-protection check from the manifest.
94
+ * Requires: node
95
+ */
96
+ declare function typecheck(): Capability;
97
+ //#endregion
98
+ //#region src/presets/capabilities/wiki.d.ts
99
+ /**
100
+ * Adds the Fern engineering wiki (wiki.theholocron.dev/<repo>) to a repo.
101
+ * Provisions docs/wiki/{decisions,standards,specifications}/ and wires the
102
+ * wiki CI workflow to publish on push to main.
103
+ *
104
+ * Compose with docsPreset() for repos that have engineering content to publish:
105
+ *
106
+ * ```ts
107
+ * const preset = compose(docsPreset(), wiki());
108
+ * ```
109
+ */
110
+ declare function wiki(): Capability;
111
+ //#endregion
112
+ //#region src/presets/constants.d.ts
113
+ /** Cloudflare account ID for the theholocron org. */
114
+ declare const CLOUDFLARE_ACCOUNT_ID = "9c558af98664d13fc89b7e0a0d93d5a8";
115
+ //#endregion
116
+ //#region src/presets/configs/docs.d.ts
117
+ type DocsPreset = ComposedPreset;
118
+ type DocsSitePreset = ComposedPreset;
119
+ /**
120
+ * Preset for theholocron repos that are TypeScript libraries AND publish a
121
+ * documentation site (e.g. configs, utils, holocron, clients).
122
+ *
123
+ * Includes the "audit / Conclusion" check in `extraRequiredChecks` so branch
124
+ * protection works for repos that add the audit workflow explicitly. The
125
+ * workflow itself is intentionally left repo-specific — add it with your own
126
+ * options:
127
+ * tasks: [...preset.tasks, { name: "audit", required: true }, ...]
128
+ * // or with overrides:
129
+ * tasks: [...preset.tasks, { name: "audit", required: true, with: { "run-knip": true } }, ...]
130
+ *
131
+ * For docs-only sites without TypeScript source, use docsSitePreset() instead.
132
+ *
133
+ * @example
134
+ * const preset = docsPreset();
135
+ * export default defineConfig({
136
+ * ...preset,
137
+ * description: "...",
138
+ * homepage: "https://docs.theholocron.dev/my-lib/",
139
+ * repo: { ...preset.repo, name: "theholocron/my-lib", topics: ["typescript"] },
140
+ * tasks: [...preset.tasks, { name: "audit", required: true }, { name: "release", with: { "run-build": true } }, "sync"],
141
+ * providers: { ...preset.providers, secrets: "github" },
142
+ * });
143
+ */
144
+ declare function docsPreset(): DocsPreset;
145
+ /**
146
+ * Preset for theholocron repos that are documentation-only sites with no
147
+ * TypeScript source to check (e.g. skills, themes). No typecheck, no audit.
148
+ *
149
+ * @example
150
+ * const preset = docsSitePreset();
151
+ * export default defineConfig({
152
+ * ...preset,
153
+ * description: "...",
154
+ * repo: { ...preset.repo, name: "theholocron/my-site" },
155
+ * tasks: [...preset.tasks, { name: "release", with: { "run-build": false } }, "sync"],
156
+ * providers: { ...preset.providers, secrets: "github" },
157
+ * });
158
+ */
159
+ declare function docsSitePreset(): DocsSitePreset;
160
+ //#endregion
161
+ //#region src/presets/configs/monorepo.d.ts
162
+ /**
163
+ * Wraps any composed preset with monorepo-specific overrides
164
+ * (sets uses_external_packages: true).
165
+ *
166
+ * For new configs, prefer: compose(node(), typecheck(), ..., monorepo())
167
+ *
168
+ * @example
169
+ * const preset = monorepo(nextjs());
170
+ */
171
+ declare function monorepoPreset(base: ComposedPreset): ComposedPreset;
172
+ //#endregion
173
+ //#region src/presets/configs/nextjs.d.ts
174
+ /**
175
+ * Preset for single-package Next.js application repos. Includes Vercel
176
+ * deployment, Lighthouse audit, Storybook + interaction + user-flow tests,
177
+ * and the derived Conclusion checks.
178
+ *
179
+ * @example
180
+ * const preset = nextjs({ test: { "wait-on-url": "http://localhost:3000", "run-chromatic": true } });
181
+ * export default defineConfig({
182
+ * ...preset,
183
+ * repo: { ...preset.repo, name: "theholocron/my-app", topics: ["nextjs"] },
184
+ * tasks: [
185
+ * ...preset.tasks,
186
+ * "sync",
187
+ * { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } },
188
+ * ],
189
+ * });
190
+ */
191
+ declare function nextjsPreset(options?: NextjsOptions): ComposedPreset;
192
+ //#endregion
193
+ //#region src/presets/configs/node.d.ts
194
+ /**
195
+ * Base preset for theholocron Node.js repositories.
196
+ * Spread the returned fragments into `defineConfig()`.
197
+ *
198
+ * @example
199
+ * const preset = node();
200
+ * export default defineConfig({
201
+ * ...preset,
202
+ * repo: { ...preset.repo, name: "theholocron/my-lib" },
203
+ * tasks: [...preset.tasks, { name: "release", with: { "run-build": true } }],
204
+ * });
205
+ */
206
+ declare function nodePreset(): ComposedPreset;
207
+ //#endregion
208
+ //#region src/presets/configs/react.d.ts
209
+ /**
210
+ * Preset for single-package React/Vite application repos. Includes Storybook,
211
+ * interaction tests, Knip + Lighthouse audit, and the UI extraRequiredChecks.
212
+ *
213
+ * Pass `test` overrides to merge repo-specific options (e.g. run-chromatic)
214
+ * into the single test workflow entry so the sync tool sees one complete entry:
215
+ *
216
+ * @example
217
+ * const preset = react({
218
+ * test: { "run-chromatic": { projects: [{ tokenName: "default", workingDir: "." }] } },
219
+ * });
220
+ * export default defineConfig({
221
+ * ...preset,
222
+ * repo: { ...preset.repo, name: "theholocron/my-app" },
223
+ * tasks: [...preset.tasks, "sync", { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } }],
224
+ * });
225
+ */
226
+ declare function reactPreset(options?: ReactOptions): ComposedPreset;
227
+ //#endregion
228
+ //#region src/presets/index.d.ts
229
+ /** The capability factories, for composing your own preset with compose(). */
230
+ declare const withCapabilities: {
231
+ withAudit: typeof audit;
232
+ withDocs: typeof docs;
233
+ withMonorepo: typeof monorepo;
234
+ withNextjs: typeof nextjs;
235
+ withNode: typeof node;
236
+ withReact: typeof react;
237
+ withTypecheck: typeof typecheck;
238
+ withWiki: typeof wiki;
239
+ };
240
+ //#endregion
241
+ export { type AuditOptions, CLOUDFLARE_ACCOUNT_ID, type Capability, type ComposedPreset, type DocsPreset, type DocsSitePreset, type NextjsOptions, type ReactOptions, compose, docsPreset, docsSitePreset, monorepoPreset, nextjsPreset, nodePreset, reactPreset, withCapabilities };
@@ -0,0 +1,416 @@
1
+ import { t as compose } from "./compose-Cao-W6Mu.mjs";
2
+ //#region src/presets/capabilities/audit.ts
3
+ /**
4
+ * Adds BundleWatch + optional Knip and Lighthouse auditing. Marked `required` —
5
+ * `holocron setup` derives the `audit / Conclusion` branch-protection check
6
+ * from the manifest.
7
+ * Requires: node
8
+ */
9
+ function audit({ knip = false, performance = false, lighthouseConfig } = {}) {
10
+ const withBlock = {};
11
+ if (knip) withBlock["run-knip"] = true;
12
+ if (performance) withBlock["run-performance"] = true;
13
+ if (lighthouseConfig) withBlock["lighthouse-config"] = lighthouseConfig;
14
+ return {
15
+ id: "audit",
16
+ requires: ["node"],
17
+ tasks: [Object.keys(withBlock).length > 0 ? {
18
+ name: "audit",
19
+ required: true,
20
+ with: withBlock
21
+ } : {
22
+ name: "audit",
23
+ required: true
24
+ }]
25
+ };
26
+ }
27
+ //#endregion
28
+ //#region src/presets/constants.ts
29
+ /** Cloudflare account ID for the theholocron org. */
30
+ const CLOUDFLARE_ACCOUNT_ID = "9c558af98664d13fc89b7e0a0d93d5a8";
31
+ //#endregion
32
+ //#region src/presets/capabilities/docs.ts
33
+ /**
34
+ * Adds a documentation site deployed to Cloudflare Pages with PR previews.
35
+ * Sets org/domain, wires Cloudflare + DNS providers, and adds the codecov
36
+ * `extraRequiredChecks` (enabled for all docs repos).
37
+ * Requires: node
38
+ */
39
+ function docs() {
40
+ return {
41
+ id: "docs",
42
+ requires: ["node"],
43
+ org: "theholocron",
44
+ domain: "theholocron.dev",
45
+ docs: {
46
+ build: "workflow",
47
+ https: true
48
+ },
49
+ providers: {
50
+ deployment: ["cloudflare", { accountId: CLOUDFLARE_ACCOUNT_ID }],
51
+ dns: "cloudflare",
52
+ workers: ["cloudflare", { accountId: CLOUDFLARE_ACCOUNT_ID }]
53
+ },
54
+ tasks: [{
55
+ name: "deploy",
56
+ with: {
57
+ docs: true,
58
+ preview: true
59
+ }
60
+ }],
61
+ extraRequiredChecks: ["codecov/patch", "codecov/project"]
62
+ };
63
+ }
64
+ //#endregion
65
+ //#region src/presets/capabilities/monorepo.ts
66
+ /**
67
+ * Adjusts a repo to be a monorepo — sets uses_external_packages: true
68
+ * (workspaces pull in many deps). Compose after the base capabilities.
69
+ * Requires: node
70
+ *
71
+ * @example
72
+ * const preset = compose(node(), typecheck(), nextjs(), monorepo());
73
+ */
74
+ function monorepo() {
75
+ return {
76
+ id: "monorepo",
77
+ requires: ["node"],
78
+ repo: { properties: { uses_external_packages: true } }
79
+ };
80
+ }
81
+ //#endregion
82
+ //#region src/presets/capabilities/react.ts
83
+ /**
84
+ * Adds React/Storybook UI testing and browser runtime config.
85
+ * Contributes: secrets provider, browser runtime property, Storybook + interaction
86
+ * test jobs, audit with Knip + Lighthouse, and the UI `extraRequiredChecks`.
87
+ * Requires: node, typecheck
88
+ *
89
+ * Pass `test` overrides to merge repo-specific options into the single test
90
+ * workflow entry so the sync tool sees one complete entry rather than two
91
+ * conflicting ones:
92
+ *
93
+ * @example
94
+ * compose(node(), typecheck(), react({ test: { "run-chromatic": { projects: [...] } } }))
95
+ */
96
+ function react({ test: testOverrides = {} } = {}) {
97
+ return {
98
+ id: "react",
99
+ requires: ["node", "typecheck"],
100
+ providers: { secrets: "github" },
101
+ repo: { properties: {
102
+ runtime_environment: "browser",
103
+ uses_external_packages: false
104
+ } },
105
+ tasks: [{
106
+ name: "audit",
107
+ with: {
108
+ "run-knip": true,
109
+ "run-performance": true,
110
+ "lighthouse-config": "lighthouse.config.cjs"
111
+ }
112
+ }, {
113
+ name: "test",
114
+ with: {
115
+ "run-unit": false,
116
+ "run-storybook": true,
117
+ "run-interaction": true,
118
+ ...testOverrides
119
+ }
120
+ }],
121
+ extraRequiredChecks: [
122
+ "Storybook Publish",
123
+ "UI Review",
124
+ "UI Tests",
125
+ "lhci/url/"
126
+ ]
127
+ };
128
+ }
129
+ //#endregion
130
+ //#region src/presets/capabilities/nextjs.ts
131
+ /**
132
+ * Bundle preset for Next.js application repos. Returns a Capability[] that
133
+ * includes react() so callers only need compose(node(), typecheck(), nextjs()).
134
+ * compose() deduplicates, so adding react() explicitly is harmless.
135
+ *
136
+ * Adds: Vercel deployment and Cypress user-flow tests on top of react().
137
+ * Requires (via react()): node, typecheck
138
+ *
139
+ * @example
140
+ * const preset = compose(node(), typecheck(), nextjs({ test: { "wait-on-url": "http://localhost:3000" } }));
141
+ */
142
+ function nextjs({ test: testOverrides = {} } = {}) {
143
+ const nextjsCapability = {
144
+ id: "nextjs",
145
+ requires: ["react"],
146
+ org: "theholocron",
147
+ domain: "theholocron.dev",
148
+ providers: { deployment: "vercel" },
149
+ tasks: [{
150
+ name: "test",
151
+ with: {
152
+ "run-unit": false,
153
+ "run-storybook": true,
154
+ "run-interaction": true,
155
+ "run-user-flow": true,
156
+ ...testOverrides
157
+ }
158
+ }]
159
+ };
160
+ return [react(), nextjsCapability];
161
+ }
162
+ //#endregion
163
+ //#region src/presets/capabilities/node.ts
164
+ /** The org-standard linter set — drives both CI super-linter and `holocron run lint`. */
165
+ const ORG_LINTERS = [
166
+ "eslint",
167
+ "prettier",
168
+ "yamllint",
169
+ "actionlint",
170
+ "gitleaks",
171
+ "editorconfig",
172
+ "commitlint",
173
+ "git-merge-conflict-markers"
174
+ ];
175
+ /**
176
+ * Base capability for all theholocron Node.js repositories.
177
+ * Contributes: GitHub source/CI/issues providers, strict branch protection,
178
+ * and the standard workflow set (lint, test, security, review, stale, greetings,
179
+ * dependencies, bookkeeping). Does NOT include typecheck — add that separately.
180
+ * The `lint` task carries the org linter list explicitly so every repo runs the
181
+ * same set (a repo can override with its own `{ name: "lint", linters: [...] }`).
182
+ * `lint` and `test` are marked `required` — `holocron setup` derives their
183
+ * `… / Conclusion` branch-protection check contexts from the manifest.
184
+ */
185
+ function node() {
186
+ return {
187
+ id: "node",
188
+ providers: {
189
+ source: "github",
190
+ ci: "github",
191
+ issues: ["github", { labels: {
192
+ inProgress: "status:in-progress",
193
+ inReview: "status:in-review"
194
+ } }]
195
+ },
196
+ repo: {
197
+ protection: "strict",
198
+ properties: {
199
+ lifecycle: "active",
200
+ open_source: true,
201
+ runtime_environment: "node",
202
+ uses_external_packages: true
203
+ }
204
+ },
205
+ tasks: [
206
+ {
207
+ name: "lint",
208
+ required: true,
209
+ linters: ORG_LINTERS
210
+ },
211
+ {
212
+ name: "test",
213
+ required: true
214
+ },
215
+ "security",
216
+ "review",
217
+ "stale",
218
+ "greetings",
219
+ "dependencies",
220
+ "bookkeeping"
221
+ ]
222
+ };
223
+ }
224
+ //#endregion
225
+ //#region src/presets/capabilities/typecheck.ts
226
+ /**
227
+ * Adds TypeScript type-checking to a repo. Marked `required` — `holocron setup`
228
+ * derives the `Typecheck / Conclusion` branch-protection check from the manifest.
229
+ * Requires: node
230
+ */
231
+ function typecheck() {
232
+ return {
233
+ id: "typecheck",
234
+ requires: ["node"],
235
+ tasks: [{
236
+ name: "typecheck",
237
+ required: true
238
+ }]
239
+ };
240
+ }
241
+ //#endregion
242
+ //#region src/presets/capabilities/wiki.ts
243
+ /**
244
+ * Adds the Fern engineering wiki (wiki.theholocron.dev/<repo>) to a repo.
245
+ * Provisions docs/wiki/{decisions,standards,specifications}/ and wires the
246
+ * wiki CI workflow to publish on push to main.
247
+ *
248
+ * Compose with docsPreset() for repos that have engineering content to publish:
249
+ *
250
+ * ```ts
251
+ * const preset = compose(docsPreset(), wiki());
252
+ * ```
253
+ */
254
+ function wiki() {
255
+ return {
256
+ id: "wiki",
257
+ providers: {
258
+ wiki: ["fern", {
259
+ domain: "wiki.theholocron.dev",
260
+ fernOrg: "holocron"
261
+ }],
262
+ workers: ["cloudflare", { accountId: "9c558af98664d13fc89b7e0a0d93d5a8" }]
263
+ },
264
+ tasks: ["wiki"]
265
+ };
266
+ }
267
+ //#endregion
268
+ //#region src/presets/configs/docs.ts
269
+ /**
270
+ * Preset for theholocron repos that are TypeScript libraries AND publish a
271
+ * documentation site (e.g. configs, utils, holocron, clients).
272
+ *
273
+ * Includes the "audit / Conclusion" check in `extraRequiredChecks` so branch
274
+ * protection works for repos that add the audit workflow explicitly. The
275
+ * workflow itself is intentionally left repo-specific — add it with your own
276
+ * options:
277
+ * tasks: [...preset.tasks, { name: "audit", required: true }, ...]
278
+ * // or with overrides:
279
+ * tasks: [...preset.tasks, { name: "audit", required: true, with: { "run-knip": true } }, ...]
280
+ *
281
+ * For docs-only sites without TypeScript source, use docsSitePreset() instead.
282
+ *
283
+ * @example
284
+ * const preset = docsPreset();
285
+ * export default defineConfig({
286
+ * ...preset,
287
+ * description: "...",
288
+ * homepage: "https://docs.theholocron.dev/my-lib/",
289
+ * repo: { ...preset.repo, name: "theholocron/my-lib", topics: ["typescript"] },
290
+ * tasks: [...preset.tasks, { name: "audit", required: true }, { name: "release", with: { "run-build": true } }, "sync"],
291
+ * providers: { ...preset.providers, secrets: "github" },
292
+ * });
293
+ */
294
+ function docsPreset() {
295
+ return compose(node(), typecheck(), docs(), {
296
+ id: "audit-check",
297
+ requires: ["node"],
298
+ extraRequiredChecks: ["audit / Conclusion"]
299
+ });
300
+ }
301
+ /**
302
+ * Preset for theholocron repos that are documentation-only sites with no
303
+ * TypeScript source to check (e.g. skills, themes). No typecheck, no audit.
304
+ *
305
+ * @example
306
+ * const preset = docsSitePreset();
307
+ * export default defineConfig({
308
+ * ...preset,
309
+ * description: "...",
310
+ * repo: { ...preset.repo, name: "theholocron/my-site" },
311
+ * tasks: [...preset.tasks, { name: "release", with: { "run-build": false } }, "sync"],
312
+ * providers: { ...preset.providers, secrets: "github" },
313
+ * });
314
+ */
315
+ function docsSitePreset() {
316
+ return compose(node(), docs());
317
+ }
318
+ //#endregion
319
+ //#region src/presets/configs/monorepo.ts
320
+ /**
321
+ * Wraps any composed preset with monorepo-specific overrides
322
+ * (sets uses_external_packages: true).
323
+ *
324
+ * For new configs, prefer: compose(node(), typecheck(), ..., monorepo())
325
+ *
326
+ * @example
327
+ * const preset = monorepo(nextjs());
328
+ */
329
+ function monorepoPreset(base) {
330
+ return {
331
+ ...base,
332
+ repo: {
333
+ ...base.repo,
334
+ properties: {
335
+ ...base.repo.properties,
336
+ uses_external_packages: true
337
+ }
338
+ }
339
+ };
340
+ }
341
+ //#endregion
342
+ //#region src/presets/configs/nextjs.ts
343
+ /**
344
+ * Preset for single-package Next.js application repos. Includes Vercel
345
+ * deployment, Lighthouse audit, Storybook + interaction + user-flow tests,
346
+ * and the derived Conclusion checks.
347
+ *
348
+ * @example
349
+ * const preset = nextjs({ test: { "wait-on-url": "http://localhost:3000", "run-chromatic": true } });
350
+ * export default defineConfig({
351
+ * ...preset,
352
+ * repo: { ...preset.repo, name: "theholocron/my-app", topics: ["nextjs"] },
353
+ * tasks: [
354
+ * ...preset.tasks,
355
+ * "sync",
356
+ * { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } },
357
+ * ],
358
+ * });
359
+ */
360
+ function nextjsPreset(options) {
361
+ return compose(node(), typecheck(), ...nextjs(options));
362
+ }
363
+ //#endregion
364
+ //#region src/presets/configs/node.ts
365
+ /**
366
+ * Base preset for theholocron Node.js repositories.
367
+ * Spread the returned fragments into `defineConfig()`.
368
+ *
369
+ * @example
370
+ * const preset = node();
371
+ * export default defineConfig({
372
+ * ...preset,
373
+ * repo: { ...preset.repo, name: "theholocron/my-lib" },
374
+ * tasks: [...preset.tasks, { name: "release", with: { "run-build": true } }],
375
+ * });
376
+ */
377
+ function nodePreset() {
378
+ return compose(node());
379
+ }
380
+ //#endregion
381
+ //#region src/presets/configs/react.ts
382
+ /**
383
+ * Preset for single-package React/Vite application repos. Includes Storybook,
384
+ * interaction tests, Knip + Lighthouse audit, and the UI extraRequiredChecks.
385
+ *
386
+ * Pass `test` overrides to merge repo-specific options (e.g. run-chromatic)
387
+ * into the single test workflow entry so the sync tool sees one complete entry:
388
+ *
389
+ * @example
390
+ * const preset = react({
391
+ * test: { "run-chromatic": { projects: [{ tokenName: "default", workingDir: "." }] } },
392
+ * });
393
+ * export default defineConfig({
394
+ * ...preset,
395
+ * repo: { ...preset.repo, name: "theholocron/my-app" },
396
+ * tasks: [...preset.tasks, "sync", { name: "deploy", with: { docs: true, storybook: [{ name: "" }] } }],
397
+ * });
398
+ */
399
+ function reactPreset(options) {
400
+ return compose(node(), typecheck(), react(options));
401
+ }
402
+ //#endregion
403
+ //#region src/presets/index.ts
404
+ /** The capability factories, for composing your own preset with compose(). */
405
+ const withCapabilities = {
406
+ withAudit: audit,
407
+ withDocs: docs,
408
+ withMonorepo: monorepo,
409
+ withNextjs: nextjs,
410
+ withNode: node,
411
+ withReact: react,
412
+ withTypecheck: typecheck,
413
+ withWiki: wiki
414
+ };
415
+ //#endregion
416
+ export { CLOUDFLARE_ACCOUNT_ID, compose, docsPreset, docsSitePreset, monorepoPreset, nextjsPreset, nodePreset, reactPreset, withCapabilities };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theholocron/cli",
3
- "version": "5.0.0-alpha.245",
3
+ "version": "5.0.0-alpha.246",
4
4
  "description": "The Holocron CLI - a pluggable, capability-based orchestrator for spinning up and operating software projects.",
5
5
  "keywords": [
6
6
  "cli",
@@ -63,8 +63,8 @@
63
63
  "pino-pretty": "^13.1.3",
64
64
  "posthog-node": "^5.51.6",
65
65
  "yargs": "^18.1.0",
66
- "@theholocron/astromech": "5.0.0-alpha.245",
67
- "@theholocron/datapad": "5.0.0-alpha.245"
66
+ "@theholocron/astromech": "5.0.0-alpha.246",
67
+ "@theholocron/datapad": "5.0.0-alpha.246"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@theholocron/eslint-config": "^8.8.2",