@theholocron/holocron-config 8.4.5 → 8.4.7
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/assets/keyring.linux-x64-gnu-DGLgDGdk.node +0 -0
- package/dist/configs/monorepo.d.ts +1 -1
- package/dist/configs/nextjs.d.ts +1 -1
- package/dist/configs/nextjs.js +1 -1
- package/dist/configs/node-docs.d.ts +1 -1
- package/dist/configs/node-docs.js +1 -1
- package/dist/configs/node.d.ts +1 -1
- package/dist/configs/node.js +1 -2
- package/dist/configs/react.d.ts +1 -1
- package/dist/configs/react.js +1 -2
- package/dist/index-BZQJvxGu.d.ts +497 -0
- package/dist/index.d.ts +10 -11
- package/dist/index.js +3 -4
- package/dist/{nextjs-DF6ifcAm.d.ts → nextjs-CorAF9jM.d.ts} +1 -1
- package/dist/{nextjs-Q-9hbfm1.js → nextjs-DAzq_mG7.js} +1 -2
- package/dist/node-C6uBnA36.js +919 -0
- package/dist/{node-docs-CcZ9-AX_.js → node-docs-DI6yiUlZ.js} +1 -2
- package/dist/{react-Da48S4-Q.d.ts → react-C7k74R65.d.ts} +1 -1
- package/package.json +16 -19
- package/dist/node-BLjkrd5k.js +0 -63
|
Binary file
|
package/dist/configs/nextjs.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as NextjsOptions, t as nextjs } from "../nextjs-
|
|
1
|
+
import { n as NextjsOptions, t as nextjs } from "../nextjs-CorAF9jM.js";
|
|
2
2
|
export { type NextjsOptions, nextjs };
|
package/dist/configs/nextjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as nextjs } from "../nextjs-
|
|
1
|
+
import { t as nextjs } from "../nextjs-DAzq_mG7.js";
|
|
2
2
|
export { nextjs };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as nodeDocsSite, t as nodeDocs } from "../node-docs-
|
|
1
|
+
import { n as nodeDocsSite, t as nodeDocs } from "../node-docs-DI6yiUlZ.js";
|
|
2
2
|
export { nodeDocs, nodeDocsSite };
|
package/dist/configs/node.d.ts
CHANGED
package/dist/configs/node.js
CHANGED
package/dist/configs/react.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ReactOptions, t as react } from "../react-
|
|
1
|
+
import { n as ReactOptions, t as react } from "../react-C7k74R65.js";
|
|
2
2
|
export { type ReactOptions, react };
|
package/dist/configs/react.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { t as node } from "../node-
|
|
1
|
+
import { n as compose, t as node } from "../node-C6uBnA36.js";
|
|
2
2
|
import { t as typecheck } from "../typecheck-CG1ePvP6.js";
|
|
3
3
|
import { t as react$1 } from "../react-4Ap2ev6C.js";
|
|
4
|
-
import { compose } from "@theholocron/cli";
|
|
5
4
|
//#region configs/react.ts
|
|
6
5
|
/**
|
|
7
6
|
* Preset for single-package React/Vite application repos. Includes Storybook,
|
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@theholocron+cli@5.0.0-alpha.3_@astrojs+react@6.0.4_@types+node@26.5.0_@types+react-dom_06b2c823ae2f3941c2eddca67aad934c/node_modules/@theholocron/cli/dist/plugin/capabilities.d.mts
|
|
2
|
+
//#region src/plugin/capabilities.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Capability interfaces — the contracts that providers implement.
|
|
5
|
+
*
|
|
6
|
+
* Each capability has a stable key (`'source'`, `'ci'`, …) and a
|
|
7
|
+
* cardinality (`'single'` = one provider; `'many'` = several active
|
|
8
|
+
* at once). The cardinality is part of the type contract via
|
|
9
|
+
* `CardinalityFor<K>` so config resolution + command code can branch
|
|
10
|
+
* statically.
|
|
11
|
+
*
|
|
12
|
+
* See `docs/wiki/specifications/tech-architecture.spec.md` for the design narrative
|
|
13
|
+
* (issue: #74).
|
|
14
|
+
*/
|
|
15
|
+
type CapabilityKey = "source" | "ci" | "secrets" | "environments" | "issues" | "deployment" | "storage" | "auth" | "vault" | "dns" | "tooling" | "notifications" | "analytics" | "errors" | "logs" | "wiki" | "workers";
|
|
16
|
+
type TeamPermission = "pull" | "triage" | "push" | "maintain" | "admin";
|
|
17
|
+
/** Shorthand `"slug"` defaults to `push` permission. */
|
|
18
|
+
type TeamEntry = string | {
|
|
19
|
+
slug: string;
|
|
20
|
+
permission: TeamPermission;
|
|
21
|
+
};
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region ../../node_modules/.pnpm/@theholocron+observability@0.3.2_@axiomhq+pino@2.0.0_@sentry+node@10.70.0_@opentelemetr_54d8c9cd9043e393a104e3e16de7b704/node_modules/@theholocron/observability/dist/logger-CIRNGqYs.d.mts
|
|
24
|
+
/** Log levels, ordered least to most severe. */
|
|
25
|
+
type LogLevel = "debug" | "info" | "warn" | "error";
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region ../../node_modules/.pnpm/@theholocron+cli@5.0.0-alpha.3_@astrojs+react@6.0.4_@types+node@26.5.0_@types+react-dom_06b2c823ae2f3941c2eddca67aad934c/node_modules/@theholocron/cli/dist/index.d.mts
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/config/config.d.ts
|
|
30
|
+
/** Structured-logging config. The Axiom **token** never lives here — only in
|
|
31
|
+
* env vars or the OS keyring — but the non-secret dataset name may. */
|
|
32
|
+
interface LogConfig {
|
|
33
|
+
/**
|
|
34
|
+
* Default log level. The lowest-priority level source: `--verbose` /
|
|
35
|
+
* `--quiet` and `HOLOCRON_LOG_LEVEL` both outrank it.
|
|
36
|
+
*/
|
|
37
|
+
level?: LogLevel;
|
|
38
|
+
/**
|
|
39
|
+
* Axiom log-shipping. Set `axiom.dataset` to opt local runs into Axiom
|
|
40
|
+
* without exporting `HOLOCRON_AXIOM_DATASET` — the CLI then pairs it with
|
|
41
|
+
* the token from `HOLOCRON_AXIOM_TOKEN` / `AXIOM_TOKEN` or the OS keyring
|
|
42
|
+
* (`holocron auth set axiom[.<org>] <TOKEN>`). Env vars still win. In CI,
|
|
43
|
+
* prefer the `HOLOCRON_AXIOM_DATASET` variable.
|
|
44
|
+
*/
|
|
45
|
+
axiom?: {
|
|
46
|
+
/** Target Axiom dataset, e.g. `"holocron-local"`. */
|
|
47
|
+
dataset?: string;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* CLI self-telemetry config — the committed, reviewable override layer over the
|
|
52
|
+
* env-var + shipped-fallback activation (ADR-0007 / ADR-0008). No secret lives
|
|
53
|
+
* here; the Sentry DSN and PostHog key come from env vars or ship as fallbacks.
|
|
54
|
+
*
|
|
55
|
+
* Precedence: `HOLOCRON_TELEMETRY=false` (env) → `telemetry.enabled` (this) →
|
|
56
|
+
* default on. `enabled` never *re-enables* what the env var turned off.
|
|
57
|
+
*/
|
|
58
|
+
interface TelemetryConfig {
|
|
59
|
+
/**
|
|
60
|
+
* Repo-level opt-out — the committed peer of `HOLOCRON_TELEMETRY=false`.
|
|
61
|
+
* `false` installs the no-op sinks for the whole run. Default on.
|
|
62
|
+
*/
|
|
63
|
+
enabled?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Usage-analytics provider. `"none"` disables PostHog usage analytics while
|
|
66
|
+
* leaving error reporting (Sentry) untouched. Default `"posthog"`.
|
|
67
|
+
*/
|
|
68
|
+
analytics?: "posthog" | "none";
|
|
69
|
+
}
|
|
70
|
+
type ProviderOptions = Record<string, unknown>;
|
|
71
|
+
type SingleEntry = string | [provider: string, options: ProviderOptions];
|
|
72
|
+
type MultiEntry = Array<string | [provider: string, options: ProviderOptions]>;
|
|
73
|
+
type RawProviderEntry = SingleEntry | MultiEntry;
|
|
74
|
+
type RawProvidersConfig = Partial<Record<CapabilityKey, RawProviderEntry>>;
|
|
75
|
+
type RepoProtection = "balanced" | "strict" | "none";
|
|
76
|
+
/**
|
|
77
|
+
* Raw `docs` config as written by the user. `build` is optional so the
|
|
78
|
+
* field can be declared without committing to a build type yet; setup
|
|
79
|
+
* will error if `docs` is present but `build` is absent.
|
|
80
|
+
*/
|
|
81
|
+
interface DocsConfig {
|
|
82
|
+
/**
|
|
83
|
+
* GitHub Pages build source.
|
|
84
|
+
* "workflow" → GitHub Actions (PUT { build_type: "workflow" })
|
|
85
|
+
* "branch" → classic gh-pages branch (PUT { build_type: "legacy", source: { branch: "gh-pages", path: "/" } })
|
|
86
|
+
* When absent, Pages is not managed by `holocron setup`.
|
|
87
|
+
*/
|
|
88
|
+
build?: "workflow" | "branch";
|
|
89
|
+
/**
|
|
90
|
+
* Custom domain / CNAME (e.g. "docs.theholocron.dev").
|
|
91
|
+
* When set and `homepage` is not explicitly provided, setup derives
|
|
92
|
+
* `homepage` as `https://{domain}/` for package.json and the repo website field.
|
|
93
|
+
*/
|
|
94
|
+
domain?: string;
|
|
95
|
+
/** Enforce HTTPS. Only effective once the custom domain is DNS-verified. */
|
|
96
|
+
https?: boolean;
|
|
97
|
+
}
|
|
98
|
+
interface RepoProperties {
|
|
99
|
+
lifecycle?: "active" | "experimental" | "deprecated";
|
|
100
|
+
open_source?: boolean;
|
|
101
|
+
runtime_environment?: "node" | "browser" | "universal" | "none";
|
|
102
|
+
uses_external_packages?: boolean;
|
|
103
|
+
}
|
|
104
|
+
interface RepoConfig {
|
|
105
|
+
/** "owner/name" — the GitHub repository coordinate. Derived from the git remote when absent. */
|
|
106
|
+
name?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Branch protection preset applied by `holocron setup`. When omitted,
|
|
109
|
+
* no protection is applied and no `branch_protection_level` property is set.
|
|
110
|
+
* Required-status-check contexts for `"strict"` are derived from the task
|
|
111
|
+
* manifest — `{ required: true }` tasks + top-level `extraRequiredChecks`
|
|
112
|
+
* (see `astromech.requiredChecks()`).
|
|
113
|
+
*/
|
|
114
|
+
protection?: RepoProtection;
|
|
115
|
+
/**
|
|
116
|
+
* GitHub teams granted repository access. Synced by `holocron setup`, which
|
|
117
|
+
* also writes `.github/CODEOWNERS` for teams with write-or-higher permission.
|
|
118
|
+
* String shorthand defaults to `push` (Write).
|
|
119
|
+
*/
|
|
120
|
+
teams?: TeamEntry[];
|
|
121
|
+
/** GitHub topics set on the repository. */
|
|
122
|
+
topics?: string[];
|
|
123
|
+
/** GitHub custom properties synced to the org dashboard. */
|
|
124
|
+
properties?: RepoProperties;
|
|
125
|
+
}
|
|
126
|
+
interface AppConfig {
|
|
127
|
+
name: string;
|
|
128
|
+
path: string;
|
|
129
|
+
kind?: string;
|
|
130
|
+
}
|
|
131
|
+
interface DoctorConfig {
|
|
132
|
+
checks?: string[];
|
|
133
|
+
}
|
|
134
|
+
interface EnvConfig {
|
|
135
|
+
/**
|
|
136
|
+
* Namespace prefixes used by this project's env vars.
|
|
137
|
+
* Listed from least- to most-specific (cascade model — last wins).
|
|
138
|
+
* Tooling reads this to generate `.env.example`, validate required
|
|
139
|
+
* vars, and produce documentation.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* // Project-only prefix
|
|
143
|
+
* namespaces: ["CLI_TEMPLATE"]
|
|
144
|
+
*
|
|
145
|
+
* // Org-wide defaults + project-specific overrides
|
|
146
|
+
* namespaces: ["HOLOCRON", "MY_CLI"]
|
|
147
|
+
*/
|
|
148
|
+
namespaces?: string[];
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* A single Chromatic project entry in a monorepo `run-chromatic` config.
|
|
152
|
+
* Each entry produces one matrix job in CI, publishing to a separate Chromatic project.
|
|
153
|
+
*
|
|
154
|
+
* The `tokenName` maps to a repository secret named `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`.
|
|
155
|
+
* Additional fields correspond to chromaui/action inputs and are passed through directly.
|
|
156
|
+
*
|
|
157
|
+
* @see https://www.chromatic.com/docs/monorepos/
|
|
158
|
+
*/
|
|
159
|
+
interface ChromaticProjectConfig {
|
|
160
|
+
/**
|
|
161
|
+
* Secret suffix. The CI job reads `CHROMATIC_PROJECT_TOKEN_<tokenName>`.
|
|
162
|
+
* Must be uppercase (e.g. `"WEB"`, `"UI"`).
|
|
163
|
+
*/
|
|
164
|
+
tokenName: string;
|
|
165
|
+
/**
|
|
166
|
+
* Path to run the Chromatic build from, relative to the repo root.
|
|
167
|
+
* Typically the package directory (e.g. `"apps/web"`, `"packages/ui"`).
|
|
168
|
+
*/
|
|
169
|
+
workingDir: string;
|
|
170
|
+
/**
|
|
171
|
+
* Script name to build Storybook. Defaults to `"build:storybook"`.
|
|
172
|
+
* Must accept `--output-dir` pass-through (use `turbo run … --` at root).
|
|
173
|
+
*/
|
|
174
|
+
buildScript?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Path to the Storybook folder relative to `workingDir`, for TurboSnap.
|
|
177
|
+
* Tells Chromatic where to find `.storybook/` when the Storybook config
|
|
178
|
+
* is in a subdirectory. Corresponds to `--storybook-base-dir`.
|
|
179
|
+
*/
|
|
180
|
+
storybookBaseDir?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Glob patterns of files/dirs that should NOT trigger a TurboSnap bailout
|
|
183
|
+
* when changed. Useful for ignoring non-UI changes in a monorepo
|
|
184
|
+
* (e.g. `"./packages/!(ui)/**"` to focus TurboSnap on the UI package).
|
|
185
|
+
* Corresponds to `--untraced`. Accepts a single glob string or array.
|
|
186
|
+
*/
|
|
187
|
+
untraced?: string | string[];
|
|
188
|
+
/**
|
|
189
|
+
* Glob patterns matching story files to snapshot. When set, only matching
|
|
190
|
+
* stories are captured. Corresponds to `--only-story-files`.
|
|
191
|
+
* Cannot be combined with `onlyStoryNames`.
|
|
192
|
+
*/
|
|
193
|
+
onlyStoryFiles?: string;
|
|
194
|
+
/**
|
|
195
|
+
* Exit with code 0 even when visual changes are detected.
|
|
196
|
+
* Useful during initial setup before baselines are approved.
|
|
197
|
+
* Corresponds to `--exit-zero-on-changes`.
|
|
198
|
+
*/
|
|
199
|
+
exitZeroOnChanges?: boolean;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* A single Storybook app in a deploy workflow config.
|
|
203
|
+
* `name` becomes the sandbox sub-path (`_site/sandbox/<name>/`).
|
|
204
|
+
* `path` is the working directory relative to the repo root; defaults to `"."` (repo root) when omitted.
|
|
205
|
+
*/
|
|
206
|
+
interface StorybookDeployProject {
|
|
207
|
+
name?: string;
|
|
208
|
+
path?: string;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Typed `with:` inputs for reusable workflows.
|
|
212
|
+
*
|
|
213
|
+
* `run-chromatic` accepts either a plain boolean (single-project) or a
|
|
214
|
+
* `ChromaticProjectConfig[]` object (multi-project monorepo).
|
|
215
|
+
*
|
|
216
|
+
* `docs` / `storybook` are high-level deploy shorthand that `holocron setup`
|
|
217
|
+
* translates to `type` / `storybook-projects` before writing the thin caller.
|
|
218
|
+
* They also drive automatic `paths:` derivation so you never need to write
|
|
219
|
+
* `paths:` manually for deploy entries.
|
|
220
|
+
*/
|
|
221
|
+
type WorkflowWithConfig = Record<string, unknown> & {
|
|
222
|
+
"run-chromatic"?: boolean | {
|
|
223
|
+
projects: ChromaticProjectConfig[];
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* Docs deployment shorthand. `true` uses the org-standard `docs/` directory;
|
|
227
|
+
* `{ path: "custom" }` uses a custom directory. Both derive a `paths:` entry automatically.
|
|
228
|
+
*/
|
|
229
|
+
docs?: true | {
|
|
230
|
+
path: string;
|
|
231
|
+
};
|
|
232
|
+
/** Storybook apps to deploy alongside docs. Each entry's `path` is appended to `paths:`. */
|
|
233
|
+
storybook?: StorybookDeployProject[];
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* A `tasks` manifest entry in object form. A bare string entry is shorthand
|
|
237
|
+
* for `{ name, ci: true, local: true }`.
|
|
238
|
+
*/
|
|
239
|
+
interface TaskEntryConfig {
|
|
240
|
+
name: string;
|
|
241
|
+
with?: WorkflowWithConfig;
|
|
242
|
+
paths?: string[];
|
|
243
|
+
linters?: string[];
|
|
244
|
+
/** Emit a `.github/workflows/<name>.yml` thin caller + include in `holocron ci`. Default `true`. */
|
|
245
|
+
ci?: boolean;
|
|
246
|
+
/** Write a `package.json` script + let `holocron run <name>` resolve the task. Default `true`. */
|
|
247
|
+
local?: boolean;
|
|
248
|
+
/** The task's CI check context is a required status check + part of `holocron ci`'s default run. */
|
|
249
|
+
required?: boolean;
|
|
250
|
+
}
|
|
251
|
+
interface HolocronConfig {
|
|
252
|
+
/** Project name. Derived from package.json when absent. */
|
|
253
|
+
name?: string;
|
|
254
|
+
description?: string;
|
|
255
|
+
/** Project homepage URL. Synced to package.json#homepage and the GitHub repo's website field by `holocron sync`. */
|
|
256
|
+
homepage?: string;
|
|
257
|
+
/**
|
|
258
|
+
* Active org name for namespaced keyring lookup. When set, token resolution
|
|
259
|
+
* tries `<service>.<org>` before the unnamespaced `<service>` fallback, so
|
|
260
|
+
* a single machine can hold credentials for multiple GitHub orgs without
|
|
261
|
+
* collision. Overridden by `--org` CLI flag or `HOLOCRON_ORG` env var.
|
|
262
|
+
*/
|
|
263
|
+
org?: string;
|
|
264
|
+
/**
|
|
265
|
+
* Org canonical domain (e.g. `"theholocron.dev"`). Subdomains are derived
|
|
266
|
+
* from this — `preview: true` on a deploy workflow resolves the preview base
|
|
267
|
+
* domain as `preview.<domain>`, giving URLs like `<repo>-pr-<n>.<domain>`.
|
|
268
|
+
*/
|
|
269
|
+
domain?: string;
|
|
270
|
+
/**
|
|
271
|
+
* Repository identity and metadata. When set, `PluginLoader` injects
|
|
272
|
+
* `repo.name` into every plugin's `RuntimeContext.repo` so plugins that
|
|
273
|
+
* need a repo (github, etc.) don't require `--repo` on every invocation.
|
|
274
|
+
* `--repo` on the command line still overrides.
|
|
275
|
+
*/
|
|
276
|
+
repo?: RepoConfig;
|
|
277
|
+
/**
|
|
278
|
+
* The task manifest — what this repo runs. Each entry is a task name
|
|
279
|
+
* (backed by a reusable workflow in `theholocron/.github`), or the object
|
|
280
|
+
* form to pass `with:` inputs. `@theholocron/astromech` reads this as the
|
|
281
|
+
* single source for `holocron run` / `holocron ci` / the generated CI
|
|
282
|
+
* workflows / `package.json` scripts.
|
|
283
|
+
*
|
|
284
|
+
* Supported values (intent-facing vocabulary — epic #672, D3):
|
|
285
|
+
* "verification.unitTests" | "verification.typeSafety" | "verification.performance" |
|
|
286
|
+
* "sourceQuality.staticAnalysis" | "sourceQuality.formatting" |
|
|
287
|
+
* "sourceQuality.structuredDataValidation" | "sourceQuality.deadCodeAnalysis" |
|
|
288
|
+
* "security.secretDetection" | "security.codeScanning" |
|
|
289
|
+
* "delivery.build" | "delivery.publish" | "delivery.deploy" | "delivery.bundleSize" |
|
|
290
|
+
* "platform.repoSync" | "platform.commitStandards" | "platform.repoValidation" |
|
|
291
|
+
* "knowledge.wiki" | "knowledge.docs" | "knowledge.components" |
|
|
292
|
+
* "review" | "tag" | "stale" | "greetings" | "dependencies" | "bookkeeping"
|
|
293
|
+
*
|
|
294
|
+
* `holocron setup` writes `.github/workflows/<name>.yml` for each entry,
|
|
295
|
+
* calling the corresponding reusable workflow in `theholocron/.github`.
|
|
296
|
+
* Files are overwritten on each run — they are generated artifacts.
|
|
297
|
+
*
|
|
298
|
+
* ### delivery.deploy / knowledge.docs / knowledge.components
|
|
299
|
+
* `delivery.deploy` uses `docs` and/or `storybook` in `with:` — setup
|
|
300
|
+
* derives `paths:` automatically. `docs: true` uses the org-standard
|
|
301
|
+
* `docs/` directory; `docs: { path: "custom" }` overrides it.
|
|
302
|
+
* `knowledge.docs` / `knowledge.components` are the same underlying
|
|
303
|
+
* mechanism, each dedicated to exactly one type — they imply the
|
|
304
|
+
* corresponding shorthand, so a repo using them never has to spell out
|
|
305
|
+
* `docs: true` / `storybook: […]` itself.
|
|
306
|
+
*
|
|
307
|
+
* ```ts
|
|
308
|
+
* // Docs only (standard layout)
|
|
309
|
+
* { name: "delivery.deploy", with: { docs: true } }
|
|
310
|
+
* // …or equivalently, the dedicated task:
|
|
311
|
+
* "knowledge.docs"
|
|
312
|
+
*
|
|
313
|
+
* // Docs + monorepo storybooks
|
|
314
|
+
* {
|
|
315
|
+
* name: "delivery.deploy",
|
|
316
|
+
* with: {
|
|
317
|
+
* docs: true,
|
|
318
|
+
* storybook: [
|
|
319
|
+
* { name: "web", path: "apps/web" },
|
|
320
|
+
* { name: "ui", path: "packages/ui" },
|
|
321
|
+
* ],
|
|
322
|
+
* },
|
|
323
|
+
* }
|
|
324
|
+
*
|
|
325
|
+
* // Non-standard docs location
|
|
326
|
+
* { name: "delivery.deploy", with: { docs: { path: "packages/site" } } }
|
|
327
|
+
* ```
|
|
328
|
+
*
|
|
329
|
+
* ### run-chromatic
|
|
330
|
+
* For a single-project repo, use `"run-chromatic": true` with a
|
|
331
|
+
* `CHROMATIC_PROJECT_TOKEN` repository secret.
|
|
332
|
+
*
|
|
333
|
+
* For monorepos with multiple Storybooks, use the object form:
|
|
334
|
+
* ```ts
|
|
335
|
+
* "run-chromatic": {
|
|
336
|
+
* projects: [
|
|
337
|
+
* { tokenName: "WEB", workingDir: "apps/web" },
|
|
338
|
+
* { tokenName: "UI", workingDir: "packages/ui" },
|
|
339
|
+
* ]
|
|
340
|
+
* }
|
|
341
|
+
* ```
|
|
342
|
+
* Each `tokenName` maps to a repository secret named
|
|
343
|
+
* `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`. `holocron setup` expands this
|
|
344
|
+
* to the flat `run-chromatic: true` + `chromatic-projects: <json>` inputs
|
|
345
|
+
* that the reusable workflow accepts.
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* ["sourceQuality.staticAnalysis", { "name": "delivery.publish", "with": { "run-build": false } }]
|
|
349
|
+
* { "name": "delivery.deploy", "with": { "docs": true } }
|
|
350
|
+
*/
|
|
351
|
+
tasks?: Array<string | TaskEntryConfig>;
|
|
352
|
+
/**
|
|
353
|
+
* Opt out of `holocron sync`'s `package.json` script writes. Default `true`.
|
|
354
|
+
*/
|
|
355
|
+
syncScripts?: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* The command the synced `"holocron"` `package.json` script runs. Default
|
|
358
|
+
* `"holocron"` (the installed bin). This repo overrides it to run its own
|
|
359
|
+
* build (`"node packages/cli/dist/cli.mjs"`).
|
|
360
|
+
*/
|
|
361
|
+
holocronScript?: string;
|
|
362
|
+
/**
|
|
363
|
+
* Required status-check contexts not backed by a `required` task (codecov
|
|
364
|
+
* gates, the bundle-build check, …). `holocron setup` appends these to the
|
|
365
|
+
* task-derived list from `astromech.requiredChecks()`.
|
|
366
|
+
*/
|
|
367
|
+
extraRequiredChecks?: string[];
|
|
368
|
+
/**
|
|
369
|
+
* Git hooks `holocron setup` installs. `true` / `{ prePush: true }` writes
|
|
370
|
+
* `.husky/pre-push` (runs `holocron ci` before every push); `false` /
|
|
371
|
+
* `{ prePush: false }` opts out. Omitted → on for `protection: "strict"`,
|
|
372
|
+
* off otherwise. `--hooks` / `--no-hooks` on `holocron setup` override.
|
|
373
|
+
*/
|
|
374
|
+
hooks?: boolean | {
|
|
375
|
+
prePush?: boolean;
|
|
376
|
+
};
|
|
377
|
+
providers: RawProvidersConfig;
|
|
378
|
+
apps?: AppConfig[];
|
|
379
|
+
doctor?: DoctorConfig;
|
|
380
|
+
/**
|
|
381
|
+
* Agent runtime that determines where skills are installed by `holocron setup`.
|
|
382
|
+
* Skills are installed to `.agents/skills/<name>/` (canonical) with a
|
|
383
|
+
* relative symlink at the agent-specific path:
|
|
384
|
+
* - `"claude"` → `.claude/skills/<name>` → `../../.agents/skills/<name>`
|
|
385
|
+
* - `"codex"` | `"gemini"` → logged as unsupported; skipped gracefully.
|
|
386
|
+
*/
|
|
387
|
+
agent?: "claude" | "codex" | "gemini";
|
|
388
|
+
/**
|
|
389
|
+
* Skill names from `@theholocron/skills` to install during `holocron setup`.
|
|
390
|
+
* Installed paths are gitignored and managed by setup — do not commit them.
|
|
391
|
+
*
|
|
392
|
+
* @example
|
|
393
|
+
* ["git-safety", "pr-workflow", "commit-standards"]
|
|
394
|
+
*/
|
|
395
|
+
skills?: string[];
|
|
396
|
+
/**
|
|
397
|
+
* GitHub Pages configuration. When present, `holocron setup` calls the
|
|
398
|
+
* Pages API using `HOLOCRON_DEPLOY_TOKEN` (requires `pages:write` + `repo` scope).
|
|
399
|
+
* When absent, Pages is left as-is.
|
|
400
|
+
*
|
|
401
|
+
* @example
|
|
402
|
+
* { build: "workflow", domain: "docs.theholocron.dev", https: true }
|
|
403
|
+
*/
|
|
404
|
+
docs?: DocsConfig;
|
|
405
|
+
/**
|
|
406
|
+
* Environment variable namespace configuration.
|
|
407
|
+
* Declares the prefix(es) this project uses for its env vars so that
|
|
408
|
+
* tooling can generate `.env.example`, validate required vars, and
|
|
409
|
+
* produce accurate documentation without hard-coding prefix strings.
|
|
410
|
+
*
|
|
411
|
+
* @example
|
|
412
|
+
* { namespaces: ["HOLOCRON", "MY_CLI"] }
|
|
413
|
+
*/
|
|
414
|
+
env?: EnvConfig;
|
|
415
|
+
/**
|
|
416
|
+
* Structured-logging config. Only the level belongs here — Axiom
|
|
417
|
+
* credentials come from env vars, never a committed file.
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* { level: "debug" }
|
|
421
|
+
*/
|
|
422
|
+
log?: LogConfig;
|
|
423
|
+
/**
|
|
424
|
+
* CLI self-telemetry override layer. Env var (`HOLOCRON_TELEMETRY=false`)
|
|
425
|
+
* still wins; this is the committed way to opt a repo out or drop usage
|
|
426
|
+
* analytics while keeping error reporting.
|
|
427
|
+
*
|
|
428
|
+
* @example
|
|
429
|
+
* { enabled: false }
|
|
430
|
+
* { analytics: "none" }
|
|
431
|
+
*/
|
|
432
|
+
telemetry?: TelemetryConfig;
|
|
433
|
+
}
|
|
434
|
+
//#endregion
|
|
435
|
+
//#region src/config/compose.d.ts
|
|
436
|
+
type TaskEntry = NonNullable<HolocronConfig["tasks"]>[number];
|
|
437
|
+
/** A single composable capability fragment. */
|
|
438
|
+
interface Capability {
|
|
439
|
+
/** Unique identifier — used for deduplication and dependency resolution. */
|
|
440
|
+
id: string;
|
|
441
|
+
/** Other capability IDs that must be present in the same compose() call. */
|
|
442
|
+
requires?: string[];
|
|
443
|
+
/** Task entries contributed by this capability. Merged by name; last writer wins. */
|
|
444
|
+
tasks?: TaskEntry[];
|
|
445
|
+
/** Provider config. Shallow-merged at the top level; later capabilities override per-key. */
|
|
446
|
+
providers?: RawProvidersConfig;
|
|
447
|
+
/**
|
|
448
|
+
* Required status-check contexts **not** backed by a `required` task
|
|
449
|
+
* (codecov gates, `Storybook Publish`, …). Unioned across all capabilities
|
|
450
|
+
* onto the top-level `extraRequiredChecks`. Task-backed checks come from
|
|
451
|
+
* `{ required: true }` task entries via `astromech.requiredChecks()`.
|
|
452
|
+
*/
|
|
453
|
+
extraRequiredChecks?: string[];
|
|
454
|
+
/** Repo config fragment. Scalar fields: last writer wins. properties/topics/teams: merged. */
|
|
455
|
+
repo?: Partial<Omit<RepoConfig, "name">>;
|
|
456
|
+
/** Org name. Last writer wins. */
|
|
457
|
+
org?: string;
|
|
458
|
+
/** Org canonical domain. Last writer wins. */
|
|
459
|
+
domain?: string;
|
|
460
|
+
/** Docs site config. Last writer wins. */
|
|
461
|
+
docs?: DocsConfig;
|
|
462
|
+
}
|
|
463
|
+
/** The merged result of a compose() call. Spreads into defineConfig(). */
|
|
464
|
+
interface ComposedPreset {
|
|
465
|
+
tasks: TaskEntry[];
|
|
466
|
+
providers: RawProvidersConfig;
|
|
467
|
+
repo: Partial<Omit<RepoConfig, "name">>;
|
|
468
|
+
/** Non-task required-check contexts, unioned across capabilities. */
|
|
469
|
+
extraRequiredChecks: string[];
|
|
470
|
+
org?: string;
|
|
471
|
+
domain?: string;
|
|
472
|
+
docs?: DocsConfig;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Merge any number of capability fragments into a single preset object that
|
|
476
|
+
* spreads directly into `defineConfig()`.
|
|
477
|
+
*
|
|
478
|
+
* - Accepts individual capabilities or nested arrays (for bundle presets).
|
|
479
|
+
* - Deduplicates by `id` — when the same ID appears more than once, the last
|
|
480
|
+
* occurrence wins. This lets callers override bundle defaults by listing an
|
|
481
|
+
* explicit capability after the bundle.
|
|
482
|
+
* - Validates all `requires` at call time and throws `ConfigError` if any are
|
|
483
|
+
* unmet, listing every missing dependency in a single message.
|
|
484
|
+
*
|
|
485
|
+
* @example
|
|
486
|
+
* // docs-only site — no typecheck
|
|
487
|
+
* const preset = compose(node(), docs());
|
|
488
|
+
*
|
|
489
|
+
* // library with docs
|
|
490
|
+
* const preset = compose(node(), typecheck(), docs());
|
|
491
|
+
*
|
|
492
|
+
* // nextjs() is a bundle that returns Capability[]
|
|
493
|
+
* const preset = compose(node(), nextjs());
|
|
494
|
+
*/
|
|
495
|
+
declare function compose(...args: (Capability | Capability[])[]): ComposedPreset;
|
|
496
|
+
//#endregion
|
|
497
|
+
export { ComposedPreset as n, compose as r, Capability as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import { n as ComposedPreset, r as compose, t as Capability } from "./index-BZQJvxGu.js";
|
|
1
2
|
import { monorepo } from "./configs/monorepo.js";
|
|
2
|
-
import { n as NextjsOptions, r as nextjs$1, t as nextjs } from "./nextjs-
|
|
3
|
+
import { n as NextjsOptions, r as nextjs$1, t as nextjs } from "./nextjs-CorAF9jM.js";
|
|
3
4
|
import { NodeDocsPreset, NodeDocsSitePreset, nodeDocs, nodeDocsSite } from "./configs/node-docs.js";
|
|
4
|
-
import {
|
|
5
|
-
import { n as ReactOptions, r as react$1, t as react } from "./react-Da48S4-Q.js";
|
|
6
|
-
import { Capability, Capability as Capability$1, ComposedPreset, compose } from "@theholocron/cli";
|
|
5
|
+
import { n as ReactOptions, r as react$1, t as react } from "./react-C7k74R65.js";
|
|
7
6
|
//#region constants.d.ts
|
|
8
7
|
/** Cloudflare account ID for the theholocron org. */
|
|
9
8
|
declare const CLOUDFLARE_ACCOUNT_ID = "9c558af98664d13fc89b7e0a0d93d5a8";
|
|
@@ -19,7 +18,7 @@ declare const CLOUDFLARE_ACCOUNT_ID = "9c558af98664d13fc89b7e0a0d93d5a8";
|
|
|
19
18
|
* `lint` and `test` are marked `required` — `holocron setup` derives their
|
|
20
19
|
* `… / Conclusion` branch-protection check contexts from the manifest.
|
|
21
20
|
*/
|
|
22
|
-
declare function node(): Capability
|
|
21
|
+
declare function node(): Capability;
|
|
23
22
|
//#endregion
|
|
24
23
|
//#region capabilities/typecheck.d.ts
|
|
25
24
|
/**
|
|
@@ -27,7 +26,7 @@ declare function node(): Capability$1;
|
|
|
27
26
|
* derives the `Typecheck / Conclusion` branch-protection check from the manifest.
|
|
28
27
|
* Requires: node
|
|
29
28
|
*/
|
|
30
|
-
declare function typecheck(): Capability
|
|
29
|
+
declare function typecheck(): Capability;
|
|
31
30
|
//#endregion
|
|
32
31
|
//#region capabilities/docs.d.ts
|
|
33
32
|
/**
|
|
@@ -36,7 +35,7 @@ declare function typecheck(): Capability$1;
|
|
|
36
35
|
* `extraRequiredChecks` (enabled for all docs repos).
|
|
37
36
|
* Requires: node
|
|
38
37
|
*/
|
|
39
|
-
declare function docs(): Capability
|
|
38
|
+
declare function docs(): Capability;
|
|
40
39
|
//#endregion
|
|
41
40
|
//#region capabilities/audit.d.ts
|
|
42
41
|
interface AuditOptions {
|
|
@@ -53,7 +52,7 @@ interface AuditOptions {
|
|
|
53
52
|
* from the manifest.
|
|
54
53
|
* Requires: node
|
|
55
54
|
*/
|
|
56
|
-
declare function audit({ knip, performance, lighthouseConfig }?: AuditOptions): Capability
|
|
55
|
+
declare function audit({ knip, performance, lighthouseConfig }?: AuditOptions): Capability;
|
|
57
56
|
//#endregion
|
|
58
57
|
//#region capabilities/monorepo.d.ts
|
|
59
58
|
/**
|
|
@@ -64,7 +63,7 @@ declare function audit({ knip, performance, lighthouseConfig }?: AuditOptions):
|
|
|
64
63
|
* @example
|
|
65
64
|
* const preset = compose(node(), typecheck(), nextjs(), monorepo());
|
|
66
65
|
*/
|
|
67
|
-
declare function monorepo$1(): Capability
|
|
66
|
+
declare function monorepo$1(): Capability;
|
|
68
67
|
//#endregion
|
|
69
68
|
//#region capabilities/wiki.d.ts
|
|
70
69
|
/**
|
|
@@ -78,6 +77,6 @@ declare function monorepo$1(): Capability$1;
|
|
|
78
77
|
* const preset = compose(nodeDocs(), wiki());
|
|
79
78
|
* ```
|
|
80
79
|
*/
|
|
81
|
-
declare function wiki(): Capability
|
|
80
|
+
declare function wiki(): Capability;
|
|
82
81
|
//#endregion
|
|
83
|
-
export { type AuditOptions, CLOUDFLARE_ACCOUNT_ID, type Capability, type ComposedPreset, type ComposedPreset
|
|
82
|
+
export { type AuditOptions, CLOUDFLARE_ACCOUNT_ID, type Capability, type ComposedPreset, type ComposedPreset as HolocronPreset, type NextjsOptions, type NodeDocsPreset, type NodeDocsSitePreset, type ReactOptions, audit, compose, docs, monorepo, monorepo$1 as monorepoCapability, nextjs, nextjs$1 as nextjsBundle, node, nodeDocs, nodeDocsSite, react, react$1 as reactCapability, typecheck, wiki as wikiCapability };
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
1
|
+
import { n as compose, t as node } from "./node-C6uBnA36.js";
|
|
2
|
+
import { i as CLOUDFLARE_ACCOUNT_ID, n as nodeDocsSite, r as docs, t as nodeDocs } from "./node-docs-DI6yiUlZ.js";
|
|
3
3
|
import { t as typecheck } from "./typecheck-CG1ePvP6.js";
|
|
4
4
|
import { t as react$1 } from "./react-4Ap2ev6C.js";
|
|
5
|
-
import { n as nextjs$1, t as nextjs } from "./nextjs-
|
|
5
|
+
import { n as nextjs$1, t as nextjs } from "./nextjs-DAzq_mG7.js";
|
|
6
6
|
import { react } from "./configs/react.js";
|
|
7
7
|
import { monorepo } from "./configs/monorepo.js";
|
|
8
|
-
import { compose } from "@theholocron/cli";
|
|
9
8
|
//#region capabilities/audit.ts
|
|
10
9
|
/**
|
|
11
10
|
* Adds BundleWatch + optional Knip and Lighthouse auditing. Marked `required` —
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as ComposedPreset, t as Capability } from "./index-BZQJvxGu.js";
|
|
2
2
|
//#region capabilities/nextjs.d.ts
|
|
3
3
|
interface NextjsOptions {
|
|
4
4
|
/** Extra `with:` inputs merged into the `test` workflow entry. */
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { t as node } from "./node-
|
|
1
|
+
import { n as compose, t as node } from "./node-C6uBnA36.js";
|
|
2
2
|
import { t as typecheck } from "./typecheck-CG1ePvP6.js";
|
|
3
3
|
import { t as react } from "./react-4Ap2ev6C.js";
|
|
4
|
-
import { compose } from "@theholocron/cli";
|
|
5
4
|
//#region capabilities/nextjs.ts
|
|
6
5
|
/**
|
|
7
6
|
* Bundle preset for Next.js application repos. Returns a Capability[] that
|