@theholocron/cli 3.18.7 → 3.19.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 +17 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +82 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -118,6 +118,67 @@ interface EnvConfig {
|
|
|
118
118
|
*/
|
|
119
119
|
namespaces?: string[];
|
|
120
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* A single Chromatic project entry in a monorepo `run-chromatic` config.
|
|
123
|
+
* Each entry produces one matrix job in CI, publishing to a separate Chromatic project.
|
|
124
|
+
*
|
|
125
|
+
* The `tokenName` maps to a repository secret named `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`.
|
|
126
|
+
* Additional fields correspond to chromaui/action inputs and are passed through directly.
|
|
127
|
+
*
|
|
128
|
+
* @see https://www.chromatic.com/docs/monorepos/
|
|
129
|
+
*/
|
|
130
|
+
interface ChromaticProjectConfig {
|
|
131
|
+
/**
|
|
132
|
+
* Secret suffix. The CI job reads `CHROMATIC_PROJECT_TOKEN_<tokenName>`.
|
|
133
|
+
* Must be uppercase (e.g. `"WEB"`, `"UI"`).
|
|
134
|
+
*/
|
|
135
|
+
tokenName: string;
|
|
136
|
+
/**
|
|
137
|
+
* Path to run the Chromatic build from, relative to the repo root.
|
|
138
|
+
* Typically the package directory (e.g. `"apps/web"`, `"packages/ui"`).
|
|
139
|
+
*/
|
|
140
|
+
workingDir: string;
|
|
141
|
+
/**
|
|
142
|
+
* Script name to build Storybook. Defaults to `"build:storybook"`.
|
|
143
|
+
* Must accept `--output-dir` pass-through (use `turbo run … --` at root).
|
|
144
|
+
*/
|
|
145
|
+
buildScript?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Path to the Storybook folder relative to `workingDir`, for TurboSnap.
|
|
148
|
+
* Tells Chromatic where to find `.storybook/` when the Storybook config
|
|
149
|
+
* is in a subdirectory. Corresponds to `--storybook-base-dir`.
|
|
150
|
+
*/
|
|
151
|
+
storybookBaseDir?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Glob patterns of files/dirs that should NOT trigger a TurboSnap bailout
|
|
154
|
+
* when changed. Useful for ignoring non-UI changes in a monorepo
|
|
155
|
+
* (e.g. `"./packages/!(ui)/**"` to focus TurboSnap on the UI package).
|
|
156
|
+
* Corresponds to `--untraced`. Accepts a single glob string or array.
|
|
157
|
+
*/
|
|
158
|
+
untraced?: string | string[];
|
|
159
|
+
/**
|
|
160
|
+
* Glob patterns matching story files to snapshot. When set, only matching
|
|
161
|
+
* stories are captured. Corresponds to `--only-story-files`.
|
|
162
|
+
* Cannot be combined with `onlyStoryNames`.
|
|
163
|
+
*/
|
|
164
|
+
onlyStoryFiles?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Exit with code 0 even when visual changes are detected.
|
|
167
|
+
* Useful during initial setup before baselines are approved.
|
|
168
|
+
* Corresponds to `--exit-zero-on-changes`.
|
|
169
|
+
*/
|
|
170
|
+
exitZeroOnChanges?: boolean;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Typed `with:` inputs for the `test` reusable workflow.
|
|
174
|
+
* `run-chromatic` accepts either a plain boolean (single-project) or a
|
|
175
|
+
* `ChromaticProjectConfig[]` object (multi-project monorepo).
|
|
176
|
+
*/
|
|
177
|
+
type WorkflowWithConfig = Record<string, unknown> & {
|
|
178
|
+
"run-chromatic"?: boolean | {
|
|
179
|
+
projects: ChromaticProjectConfig[];
|
|
180
|
+
};
|
|
181
|
+
};
|
|
121
182
|
interface HolocronConfig {
|
|
122
183
|
/** Project name. Derived from package.json when absent. */
|
|
123
184
|
name?: string;
|
|
@@ -147,13 +208,31 @@ interface HolocronConfig {
|
|
|
147
208
|
* Use `paths` to append additional `on.push.paths` entries beyond the
|
|
148
209
|
* template default (e.g. the repo-specific docs content package path).
|
|
149
210
|
*
|
|
211
|
+
* ### run-chromatic
|
|
212
|
+
* For a single-project repo, use `"run-chromatic": true` with a
|
|
213
|
+
* `CHROMATIC_PROJECT_TOKEN` repository secret.
|
|
214
|
+
*
|
|
215
|
+
* For monorepos with multiple Storybooks, use the object form:
|
|
216
|
+
* ```ts
|
|
217
|
+
* "run-chromatic": {
|
|
218
|
+
* projects: [
|
|
219
|
+
* { tokenName: "WEB", workingDir: "apps/web" },
|
|
220
|
+
* { tokenName: "UI", workingDir: "packages/ui" },
|
|
221
|
+
* ]
|
|
222
|
+
* }
|
|
223
|
+
* ```
|
|
224
|
+
* Each `tokenName` maps to a repository secret named
|
|
225
|
+
* `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`. `holocron setup` expands this
|
|
226
|
+
* to the flat `run-chromatic: true` + `chromatic-projects: <json>` inputs
|
|
227
|
+
* that the reusable workflow accepts.
|
|
228
|
+
*
|
|
150
229
|
* @example
|
|
151
230
|
* ["lint", { "name": "release", "with": { "run-build": false } }]
|
|
152
231
|
* { "name": "deploy-docs", "with": { "name": "configs" }, "paths": ["packages/configs-docs/**"] }
|
|
153
232
|
*/
|
|
154
233
|
workflows?: Array<string | {
|
|
155
234
|
name: string;
|
|
156
|
-
with?:
|
|
235
|
+
with?: WorkflowWithConfig;
|
|
157
236
|
paths?: string[];
|
|
158
237
|
}>;
|
|
159
238
|
providers: RawProvidersConfig;
|
|
@@ -216,7 +295,7 @@ interface ResolvedHolocronConfig {
|
|
|
216
295
|
repo?: RepoConfig;
|
|
217
296
|
workflows?: Array<string | {
|
|
218
297
|
name: string;
|
|
219
|
-
with?:
|
|
298
|
+
with?: WorkflowWithConfig;
|
|
220
299
|
paths?: string[];
|
|
221
300
|
}>;
|
|
222
301
|
providers: ResolvedProvidersConfig;
|
|
@@ -310,4 +389,4 @@ interface LoadedConfig {
|
|
|
310
389
|
*/
|
|
311
390
|
declare function loadConfig(cwd: string): Promise<LoadedConfig>;
|
|
312
391
|
//#endregion
|
|
313
|
-
export { Analytics, AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordType, DocsConfig, DoctorConfig, EnsureResult, EnvConfig, EnvLookup, Environment, EnvironmentReviewer, Environments, FeatureResolverConfig, HolocronConfig, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, LoadedConfig, MultiEntry, NormalizedAuthUser, Notifications, Observability, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, ProviderOptions, REQUIRED_CAPABILITIES, RawProviderEntry, RawProvidersConfig, RepoConfig, RepoProperties, RepoProtection, RepoRef, RepoSettings, type RequestOptions, ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, ResolvedHolocronConfig, ResolvedProviderEntry, ResolvedProvidersConfig, ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, SingleEntry, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, createEnvLookup, createFeatureResolver, createResolveToken, createRestClient, defineConfig, deleteToken, getToken, isMulti, listStoredProviders, loadConfig, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
|
|
392
|
+
export { Analytics, AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordType, DocsConfig, DoctorConfig, EnsureResult, EnvConfig, EnvLookup, Environment, EnvironmentReviewer, Environments, FeatureResolverConfig, HolocronConfig, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, LoadedConfig, MultiEntry, NormalizedAuthUser, Notifications, Observability, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, ProviderOptions, REQUIRED_CAPABILITIES, RawProviderEntry, RawProvidersConfig, RepoConfig, RepoProperties, RepoProtection, RepoRef, RepoSettings, type RequestOptions, ResolveTokenConfig, type ResolveTokenInput, ResolvedCapability, ResolvedHolocronConfig, ResolvedProviderEntry, ResolvedProvidersConfig, ResolvedTuple, type RestClient, type RestClientConfig, Ruleset, SecretScope, Secrets, SingleEntry, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, WorkflowWithConfig, createEnvLookup, createFeatureResolver, createResolveToken, createRestClient, defineConfig, deleteToken, getToken, isMulti, listStoredProviders, loadConfig, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.19.0",
|
|
4
4
|
"description": "The Holocron CLI — a pluggable, capability-based orchestrator for spinning up and operating software projects.",
|
|
5
5
|
"homepage": "https://github.com/theholocron/holocron/tree/main/packages/cli#readme",
|
|
6
6
|
"bugs": "https://github.com/theholocron/holocron/issues",
|