@theholocron/cli 5.0.0-alpha.13 → 5.0.0-alpha.133
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 +197 -50
- package/dist/cli.mjs +2181 -877
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.mts +245 -22
- package/dist/index.mjs +271 -6
- package/dist/plugin/capabilities.d.mts +153 -22
- package/dist/plugin/capabilities.mjs +1 -0
- package/package.json +17 -11
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordType, EnsureResult, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, NormalizedAuthUser, Notifications, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki,
|
|
1
|
+
import { Analytics, Auth, AuthDescription, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, Ci, CiRun, CiRunFilter, CiRunStatus, ConnectionStringOptions, CreateAuthUserInput, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, EnsureResult, Environment, EnvironmentReviewer, Environments, Errors, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, Logs, Monitoring, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, NormalizedAuthUser, Notifications, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, PullRequest, REQUIRED_CAPABILITIES, RepoRef, RepoSettings, ResolvedCapability, Ruleset, SecretScope, Secrets, Source, StatusCategory, Storage, StorageBranch, TeamEntry, TeamPermission, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, Workers, isMulti } from "./plugin/capabilities.mjs";
|
|
2
2
|
import { AuthError, RequestOptions, ResolveTokenConfig as ResolveTokenConfig$1, ResolveTokenInput, RestClient, RestClientConfig, createRestClient } from "@theholocron/http-client";
|
|
3
3
|
import { ConfigFileError } from "@theholocron/datapad";
|
|
4
4
|
import { LogLevel } from "@theholocron/observability/core";
|
|
5
|
+
import { WorkspacePackage } from "@theholocron/astromech";
|
|
6
|
+
import { QualifiedConfig } from "@commitlint/types";
|
|
5
7
|
//#region src/auth/auth-resolver.d.ts
|
|
6
8
|
type ResolveTokenConfig = Omit<ResolveTokenConfig$1, "getKeyringToken">;
|
|
7
9
|
/** Wraps `createResolveToken` from `@theholocron/http` and injects the
|
|
@@ -66,6 +68,19 @@ declare function deleteToken(provider: string): boolean;
|
|
|
66
68
|
*/
|
|
67
69
|
declare function listStoredProviders(): string[];
|
|
68
70
|
//#endregion
|
|
71
|
+
//#region src/commands/auth.d.ts
|
|
72
|
+
interface VerifyTokenSuccess {
|
|
73
|
+
ok: true;
|
|
74
|
+
/** "workplace: acme" / "user: cnewton@x" — surfaced in success output. */
|
|
75
|
+
subject: string;
|
|
76
|
+
}
|
|
77
|
+
interface VerifyTokenFailure {
|
|
78
|
+
ok: false;
|
|
79
|
+
/** Reason the token was rejected. Surfaces to the operator. */
|
|
80
|
+
message: string;
|
|
81
|
+
}
|
|
82
|
+
type VerifyTokenResult = VerifyTokenSuccess | VerifyTokenFailure;
|
|
83
|
+
//#endregion
|
|
69
84
|
//#region src/config/config.d.ts
|
|
70
85
|
/** Structured-logging config. The Axiom **token** never lives here — only in
|
|
71
86
|
* env vars or the OS keyring — but the non-secret dataset name may. */
|
|
@@ -140,7 +155,7 @@ interface DocsConfig {
|
|
|
140
155
|
* GitHub Pages build source.
|
|
141
156
|
* "workflow" → GitHub Actions (PUT { build_type: "workflow" })
|
|
142
157
|
* "branch" → classic gh-pages branch (PUT { build_type: "legacy", source: { branch: "gh-pages", path: "/" } })
|
|
143
|
-
* When absent, Pages is not managed by `holocron setup`.
|
|
158
|
+
* When absent, Pages is not managed by `holocron repo setup`.
|
|
144
159
|
*/
|
|
145
160
|
build?: "workflow" | "branch";
|
|
146
161
|
/**
|
|
@@ -162,7 +177,22 @@ interface RepoConfig {
|
|
|
162
177
|
/** "owner/name" — the GitHub repository coordinate. Derived from the git remote when absent. */
|
|
163
178
|
name?: string;
|
|
164
179
|
/**
|
|
165
|
-
*
|
|
180
|
+
* GitHub's repo-level default branch (`HEAD`) — what a fresh clone checks
|
|
181
|
+
* out, what `gh pr create`/the compare UI target by default, and what
|
|
182
|
+
* Sentinel's `validateConfig()` reads (D6: the App only ever reads config
|
|
183
|
+
* from the repo's default branch, never a PR ref, as a security boundary
|
|
184
|
+
* — never widen that to read PR branches instead of fixing this field).
|
|
185
|
+
* Synced by `holocron repo setup`. Omit to leave GitHub's current setting
|
|
186
|
+
* untouched — most repos never need this. Exists for a repo using a
|
|
187
|
+
* `main`/`alpha` prerelease-channel split (CLAUDE.md's Releases section)
|
|
188
|
+
* where active development happens on a non-`main` branch: set this to
|
|
189
|
+
* that branch so Sentinel validates against what's actually being
|
|
190
|
+
* developed, then change it back once that branch merges to `main` for a
|
|
191
|
+
* stable cut and stops being the active branch.
|
|
192
|
+
*/
|
|
193
|
+
defaultBranch?: string;
|
|
194
|
+
/**
|
|
195
|
+
* Branch protection preset applied by `holocron repo setup`. When omitted,
|
|
166
196
|
* no protection is applied and no `branch_protection_level` property is set.
|
|
167
197
|
* Required-status-check contexts for `"strict"` are derived from the task
|
|
168
198
|
* manifest — `{ required: true }` tasks + top-level `extraRequiredChecks`
|
|
@@ -170,7 +200,7 @@ interface RepoConfig {
|
|
|
170
200
|
*/
|
|
171
201
|
protection?: RepoProtection;
|
|
172
202
|
/**
|
|
173
|
-
* GitHub teams granted repository access. Synced by `holocron setup`, which
|
|
203
|
+
* GitHub teams granted repository access. Synced by `holocron repo setup`, which
|
|
174
204
|
* also writes `.github/CODEOWNERS` for teams with write-or-higher permission.
|
|
175
205
|
* String shorthand defaults to `push` (Write).
|
|
176
206
|
*/
|
|
@@ -270,7 +300,7 @@ interface StorybookDeployProject {
|
|
|
270
300
|
* `run-chromatic` accepts either a plain boolean (single-project) or a
|
|
271
301
|
* `ChromaticProjectConfig[]` object (multi-project monorepo).
|
|
272
302
|
*
|
|
273
|
-
* `docs` / `storybook` are high-level deploy shorthand that `holocron setup`
|
|
303
|
+
* `docs` / `storybook` are high-level deploy shorthand that `holocron repo setup`
|
|
274
304
|
* translates to `type` / `storybook-projects` before writing the thin caller.
|
|
275
305
|
* They also drive automatic `paths:` derivation so you never need to write
|
|
276
306
|
* `paths:` manually for deploy entries.
|
|
@@ -298,18 +328,18 @@ interface TaskEntryConfig {
|
|
|
298
328
|
with?: WorkflowWithConfig;
|
|
299
329
|
paths?: string[];
|
|
300
330
|
linters?: string[];
|
|
301
|
-
/** Emit a `.github/workflows/<name>.yml` thin caller + include in `holocron ci`. Default `true`. */
|
|
331
|
+
/** Emit a `.github/workflows/<name>.yml` thin caller + include in `holocron run ci`. Default `true`. */
|
|
302
332
|
ci?: boolean;
|
|
303
333
|
/** Write a `package.json` script + let `holocron run <name>` resolve the task. Default `true`. */
|
|
304
334
|
local?: boolean;
|
|
305
|
-
/** The task's CI check context is a required status check + part of `holocron ci`'s default run. */
|
|
335
|
+
/** The task's CI check context is a required status check + part of `holocron run ci`'s default run. */
|
|
306
336
|
required?: boolean;
|
|
307
337
|
}
|
|
308
338
|
interface HolocronConfig {
|
|
309
339
|
/** Project name. Derived from package.json when absent. */
|
|
310
340
|
name?: string;
|
|
311
341
|
description?: string;
|
|
312
|
-
/** Project homepage URL. Synced to package.json#homepage and the GitHub repo's website field by `holocron sync`. */
|
|
342
|
+
/** Project homepage URL. Synced to package.json#homepage and the GitHub repo's website field by `holocron repo sync`. */
|
|
313
343
|
homepage?: string;
|
|
314
344
|
/**
|
|
315
345
|
* Active org name for namespaced keyring lookup. When set, token resolution
|
|
@@ -335,7 +365,7 @@ interface HolocronConfig {
|
|
|
335
365
|
* The task manifest — what this repo runs. Each entry is a task name
|
|
336
366
|
* (backed by a reusable workflow in `theholocron/.github`), or the object
|
|
337
367
|
* form to pass `with:` inputs. `@theholocron/astromech` reads this as the
|
|
338
|
-
* single source for `holocron run` / `holocron ci` / the generated CI
|
|
368
|
+
* single source for `holocron run` / `holocron run ci` / the generated CI
|
|
339
369
|
* workflows / `package.json` scripts.
|
|
340
370
|
*
|
|
341
371
|
* Supported values (intent-facing vocabulary — epic #672, D3):
|
|
@@ -348,7 +378,7 @@ interface HolocronConfig {
|
|
|
348
378
|
* "knowledge.wiki" | "knowledge.docs" | "knowledge.components" |
|
|
349
379
|
* "review" | "tag" | "stale" | "greetings" | "dependencies" | "bookkeeping"
|
|
350
380
|
*
|
|
351
|
-
* `holocron setup` writes `.github/workflows/<name>.yml` for each entry,
|
|
381
|
+
* `holocron repo setup` writes `.github/workflows/<name>.yml` for each entry,
|
|
352
382
|
* calling the corresponding reusable workflow in `theholocron/.github`.
|
|
353
383
|
* Files are overwritten on each run — they are generated artifacts.
|
|
354
384
|
*
|
|
@@ -397,7 +427,7 @@ interface HolocronConfig {
|
|
|
397
427
|
* }
|
|
398
428
|
* ```
|
|
399
429
|
* Each `tokenName` maps to a repository secret named
|
|
400
|
-
* `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`. `holocron setup` expands this
|
|
430
|
+
* `CHROMATIC_PROJECT_TOKEN_<TOKENNAME>`. `holocron repo setup` expands this
|
|
401
431
|
* to the flat `run-chromatic: true` + `chromatic-projects: <json>` inputs
|
|
402
432
|
* that the reusable workflow accepts.
|
|
403
433
|
*
|
|
@@ -407,7 +437,7 @@ interface HolocronConfig {
|
|
|
407
437
|
*/
|
|
408
438
|
tasks?: Array<string | TaskEntryConfig>;
|
|
409
439
|
/**
|
|
410
|
-
* Opt out of `holocron sync`'s `package.json` script writes. Default `true`.
|
|
440
|
+
* Opt out of `holocron repo sync`'s `package.json` script writes. Default `true`.
|
|
411
441
|
*/
|
|
412
442
|
syncScripts?: boolean;
|
|
413
443
|
/**
|
|
@@ -418,15 +448,15 @@ interface HolocronConfig {
|
|
|
418
448
|
holocronScript?: string;
|
|
419
449
|
/**
|
|
420
450
|
* Required status-check contexts not backed by a `required` task (codecov
|
|
421
|
-
* gates, the bundle-build check, …). `holocron setup` appends these to the
|
|
451
|
+
* gates, the bundle-build check, …). `holocron repo setup` appends these to the
|
|
422
452
|
* task-derived list from `astromech.requiredChecks()`.
|
|
423
453
|
*/
|
|
424
454
|
extraRequiredChecks?: string[];
|
|
425
455
|
/**
|
|
426
|
-
* Git hooks `holocron setup` installs. `true` / `{ prePush: true }` writes
|
|
427
|
-
* `.husky/pre-push` (runs `holocron ci` before every push); `false` /
|
|
456
|
+
* Git hooks `holocron repo setup` installs. `true` / `{ prePush: true }` writes
|
|
457
|
+
* `.husky/pre-push` (runs `holocron run ci` before every push); `false` /
|
|
428
458
|
* `{ prePush: false }` opts out. Omitted → on for `protection: "strict"`,
|
|
429
|
-
* off otherwise. `--hooks` / `--no-hooks` on `holocron setup` override.
|
|
459
|
+
* off otherwise. `--hooks` / `--no-hooks` on `holocron repo setup` override.
|
|
430
460
|
*/
|
|
431
461
|
hooks?: boolean | {
|
|
432
462
|
prePush?: boolean;
|
|
@@ -435,7 +465,7 @@ interface HolocronConfig {
|
|
|
435
465
|
apps?: AppConfig[];
|
|
436
466
|
doctor?: DoctorConfig;
|
|
437
467
|
/**
|
|
438
|
-
* Agent runtime that determines where skills are installed by `holocron setup`.
|
|
468
|
+
* Agent runtime that determines where skills are installed by `holocron repo setup`.
|
|
439
469
|
* Skills are installed to `.agents/skills/<name>/` (canonical) with a
|
|
440
470
|
* relative symlink at the agent-specific path:
|
|
441
471
|
* - `"claude"` → `.claude/skills/<name>` → `../../.agents/skills/<name>`
|
|
@@ -443,7 +473,7 @@ interface HolocronConfig {
|
|
|
443
473
|
*/
|
|
444
474
|
agent?: "claude" | "codex" | "gemini";
|
|
445
475
|
/**
|
|
446
|
-
* Skill names from `@theholocron/skills` to install during `holocron setup`.
|
|
476
|
+
* Skill names from `@theholocron/skills` to install during `holocron repo setup`.
|
|
447
477
|
* Installed paths are gitignored and managed by setup — do not commit them.
|
|
448
478
|
*
|
|
449
479
|
* @example
|
|
@@ -451,7 +481,7 @@ interface HolocronConfig {
|
|
|
451
481
|
*/
|
|
452
482
|
skills?: string[];
|
|
453
483
|
/**
|
|
454
|
-
* GitHub Pages configuration. When present, `holocron setup` calls the
|
|
484
|
+
* GitHub Pages configuration. When present, `holocron repo setup` calls the
|
|
455
485
|
* Pages API using `HOLOCRON_DEPLOY_TOKEN` (requires `pages:write` + `repo` scope).
|
|
456
486
|
* When absent, Pages is left as-is.
|
|
457
487
|
*
|
|
@@ -487,6 +517,29 @@ interface HolocronConfig {
|
|
|
487
517
|
* { analytics: "none" }
|
|
488
518
|
*/
|
|
489
519
|
telemetry?: TelemetryConfig;
|
|
520
|
+
/**
|
|
521
|
+
* ESLint bundle option overrides that Sentinel's centralized static-
|
|
522
|
+
* analysis check (holocron#849) can't otherwise see. Bucket 1 checks
|
|
523
|
+
* never read a PR's own committed files for config — this is the
|
|
524
|
+
* declared source of truth Sentinel reads instead, so its check stays
|
|
525
|
+
* in sync with what each package's own `eslint.config.ts` already
|
|
526
|
+
* enforces locally and in CI.
|
|
527
|
+
*/
|
|
528
|
+
eslint?: EslintConfig;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Repo-root-relative directories treated as browser-targeted for eslint's
|
|
532
|
+
* node-builtins compatibility checks — mirrors
|
|
533
|
+
* `@theholocron/eslint-config`'s `library({ browserPackages })` option.
|
|
534
|
+
* Only needed for a package whose own `eslint.config.ts` already declares
|
|
535
|
+
* `browserPackages` (a deliberate outlier, not the norm — see that
|
|
536
|
+
* package's own config file for why).
|
|
537
|
+
*
|
|
538
|
+
* @example
|
|
539
|
+
* { browserPackages: ["packages/github-client/src/app-auth"] }
|
|
540
|
+
*/
|
|
541
|
+
interface EslintConfig {
|
|
542
|
+
browserPackages?: string[];
|
|
490
543
|
}
|
|
491
544
|
interface ResolvedTuple {
|
|
492
545
|
provider: string;
|
|
@@ -526,6 +579,7 @@ interface ResolvedHolocronConfig {
|
|
|
526
579
|
env?: EnvConfig;
|
|
527
580
|
log?: LogConfig;
|
|
528
581
|
telemetry?: TelemetryConfig;
|
|
582
|
+
eslint?: EslintConfig;
|
|
529
583
|
}
|
|
530
584
|
declare class ConfigError extends Error {
|
|
531
585
|
name: string;
|
|
@@ -539,6 +593,98 @@ declare function resolvePluginPackage(provider: string): string;
|
|
|
539
593
|
declare function resolveEntry(key: CapabilityKey, raw: RawProviderEntry): ResolvedProviderEntry;
|
|
540
594
|
declare function resolveConfig(raw: HolocronConfig): ResolvedHolocronConfig;
|
|
541
595
|
//#endregion
|
|
596
|
+
//#region src/commands/setup/derived-properties.d.ts
|
|
597
|
+
/**
|
|
598
|
+
* Derived custom-properties (#677). Unlike the existing 6 GitHub
|
|
599
|
+
* custom-properties fields (`lifecycle`, `open_source`, `runtime_environment`,
|
|
600
|
+
* `uses_external_packages`, `monorepo`, `branch_protection_level`) — which
|
|
601
|
+
* mirror what `holocron.config.ts` already states explicitly — these four are
|
|
602
|
+
* *derived*: signal that isn't an explicit config field today (framework
|
|
603
|
+
* choice, repo archetype, capability drift). See
|
|
604
|
+
* `.notes/tech-holocron-platform.spec.md` → "Custom-properties sync — field
|
|
605
|
+
* definitions (#677)" for the full design.
|
|
606
|
+
*/
|
|
607
|
+
type HolocronProfile = "library" | "cli" | "plugin" | "template" | "app" | "docs" | "platform";
|
|
608
|
+
interface PackageJsonLike {
|
|
609
|
+
name?: string;
|
|
610
|
+
private?: boolean;
|
|
611
|
+
bin?: unknown;
|
|
612
|
+
dependencies?: Record<string, string>;
|
|
613
|
+
devDependencies?: Record<string, string>;
|
|
614
|
+
}
|
|
615
|
+
interface DeriveProfileInput {
|
|
616
|
+
rootPackageJson: PackageJsonLike | null;
|
|
617
|
+
repoName: string;
|
|
618
|
+
isMonorepo: boolean;
|
|
619
|
+
/** `packages/*` package.json contents, monorepo repos only — used to find the primary published artifact. */
|
|
620
|
+
workspacePackageJsons: PackageJsonLike[];
|
|
621
|
+
}
|
|
622
|
+
/**
|
|
623
|
+
* Repo archetype, in priority order:
|
|
624
|
+
* 1. `*-template` repo name → `template` (independent of package shape).
|
|
625
|
+
* 2. Monorepo whose primary published artifact is a CLI (some workspace
|
|
626
|
+
* package has `bin`) → `platform` — matches `holocron` itself: the CLI is
|
|
627
|
+
* the deliverable, the plugin packages are supporting infrastructure for
|
|
628
|
+
* it, not separate products.
|
|
629
|
+
* 3. Monorepo with no CLI but at least one non-private workspace package →
|
|
630
|
+
* `library` — matches `clients`/`configs`/`utils`/`themes`/
|
|
631
|
+
* `observability`: a family of published packages, none of them a CLI.
|
|
632
|
+
* Checked *before* falling into the root-package branch below, because
|
|
633
|
+
* these repos' own root `package.json` is private and often carries
|
|
634
|
+
* `@theholocron/astro-config` for a docs site built from the monorepo
|
|
635
|
+
* root — without this check they'd wrongly resolve to `docs` off that
|
|
636
|
+
* root-level signal alone, when the docs site is a secondary concern of
|
|
637
|
+
* a library collection, not what the repo fundamentally is.
|
|
638
|
+
* 4. Single-package repo with `package.json#bin` → `cli`.
|
|
639
|
+
* 5. Docs-only site (astro/starlight present, root package private, no
|
|
640
|
+
* publishable exports) → `docs`.
|
|
641
|
+
* 6. Private, non-publishable, non-docs → `app`.
|
|
642
|
+
* 7. Otherwise, a single publishable package → `library`.
|
|
643
|
+
*/
|
|
644
|
+
declare function deriveProfile(input: DeriveProfileInput): HolocronProfile;
|
|
645
|
+
/**
|
|
646
|
+
* Detected build/framework tooling — the literal "does this repo need
|
|
647
|
+
* next/vite/tsdown" signal `holocron.config.ts` has no field for today
|
|
648
|
+
* (framework choice isn't a config concept, unlike `providers`/`tasks`).
|
|
649
|
+
* Curated table, not exhaustive by design — add to `KNOWN_STACK_DEPS` as new
|
|
650
|
+
* frameworks show up rather than trying to detect anything on npm.
|
|
651
|
+
*/
|
|
652
|
+
declare function deriveStack(pkg: PackageJsonLike | null): string[];
|
|
653
|
+
/** The provider capability keys actually wired in `providers: {}` — zero heuristics. */
|
|
654
|
+
declare function deriveCapabilities(providers: ResolvedProvidersConfig | undefined): string[];
|
|
655
|
+
declare function deriveCompliance(capabilities: readonly string[]): "compliant" | "non-compliant";
|
|
656
|
+
/**
|
|
657
|
+
* The Phase B refinement `deriveCompliance()`'s own doc comment names —
|
|
658
|
+
* *why* a repo is non-compliant, not just that it is. `[]` when compliant.
|
|
659
|
+
* Same `REQUIRED_BASELINE` `deriveCompliance()` checks against — one
|
|
660
|
+
* table, not two independently-maintained baselines.
|
|
661
|
+
*/
|
|
662
|
+
declare function missingCapabilities(capabilities: readonly string[]): string[];
|
|
663
|
+
/**
|
|
664
|
+
* Reads each workspace package's actual `package.json` content (not just
|
|
665
|
+
* `readWorkspacePackages()`'s `{ slug, name, dir }` — `deriveProfile()`'s
|
|
666
|
+
* `platform` detection needs `bin`, which that helper doesn't carry).
|
|
667
|
+
* Missing/invalid files are skipped, matching `readWorkspacePackages()`'s
|
|
668
|
+
* own soft-fail behavior.
|
|
669
|
+
*/
|
|
670
|
+
declare function readWorkspacePackageJsons(repoRoot: string, workspacePackages: readonly WorkspacePackage[]): Promise<PackageJsonLike[]>;
|
|
671
|
+
//#endregion
|
|
672
|
+
//#region src/commit-lint/lint-message.d.ts
|
|
673
|
+
interface CommitMessageViolation {
|
|
674
|
+
/** Rule name, e.g. `"subject-empty"`. */
|
|
675
|
+
rule: string;
|
|
676
|
+
/** commitlint's own message for the failure, e.g. `"subject may not be empty"`. */
|
|
677
|
+
message: string;
|
|
678
|
+
}
|
|
679
|
+
declare function lintCommitMessage(message: string, loaded: QualifiedConfig): Promise<CommitMessageViolation[]>;
|
|
680
|
+
//#endregion
|
|
681
|
+
//#region src/commit-lint/lint-commit-msg-file.d.ts
|
|
682
|
+
interface LintCommitMsgFileResult {
|
|
683
|
+
valid: boolean;
|
|
684
|
+
violations: CommitMessageViolation[];
|
|
685
|
+
}
|
|
686
|
+
declare function lintCommitMsgFile(filePath: string, cwd?: string): Promise<LintCommitMsgFileResult>;
|
|
687
|
+
//#endregion
|
|
542
688
|
//#region src/config/compose.d.ts
|
|
543
689
|
type TaskEntry = NonNullable<HolocronConfig["tasks"]>[number];
|
|
544
690
|
/** A single composable capability fragment. */
|
|
@@ -611,10 +757,87 @@ interface LoadedConfig {
|
|
|
611
757
|
filepath: string;
|
|
612
758
|
}
|
|
613
759
|
/**
|
|
614
|
-
* Read + parse + resolve `holocron.config.*` from the given
|
|
760
|
+
* Read + parse + resolve `holocron.config.*` starting from the given
|
|
761
|
+
* directory, walking up through ancestors to the nearest `.git` boundary
|
|
762
|
+
* when `cwd` itself has no match — every command is usable from any
|
|
763
|
+
* subdirectory of a repo, not only its exact root (see
|
|
764
|
+
* `@theholocron/datapad`'s own doc comment for the stop conditions).
|
|
615
765
|
* Throws {@link ConfigFileError} when nothing is found or a file cannot
|
|
616
|
-
* be loaded, or `ConfigError` when the config
|
|
766
|
+
* be loaded, or `ConfigError` when the config fails schema checks.
|
|
617
767
|
*/
|
|
618
768
|
declare function loadConfig(cwd: string): Promise<LoadedConfig>;
|
|
619
769
|
//#endregion
|
|
620
|
-
|
|
770
|
+
//#region src/editorconfig/config.d.ts
|
|
771
|
+
/**
|
|
772
|
+
* The paths editorconfig-checker skips, read from the same
|
|
773
|
+
* `editorconfig-checker.json` template `holocron repo setup` writes as a repo's
|
|
774
|
+
* `.editorconfig-checker.json` — so Sentinel's central editorconfig check
|
|
775
|
+
* (holocron#927) excludes exactly what CI's editorconfig-checker does, from
|
|
776
|
+
* one source.
|
|
777
|
+
*
|
|
778
|
+
* The exclusion that matters most is `\.md$` / `\.mdx$`: the generated
|
|
779
|
+
* `.editorconfig` gives every file tab indentation, but
|
|
780
|
+
* `@theholocron/prettier-config` formats markdown with spaces, so a README's
|
|
781
|
+
* indented code example would fail one tool or the other. Markdown is left
|
|
782
|
+
* to prettier and markdownlint.
|
|
783
|
+
*
|
|
784
|
+
* Each entry is a regular-expression source, matched against a
|
|
785
|
+
* repo-relative path, as editorconfig-checker itself treats them.
|
|
786
|
+
*/
|
|
787
|
+
declare const EDITORCONFIG_CHECKER_EXCLUDE: readonly string[];
|
|
788
|
+
/** `true` when `path` matches any {@link EDITORCONFIG_CHECKER_EXCLUDE} pattern. */
|
|
789
|
+
declare function isEditorConfigExcluded(path: string): boolean;
|
|
790
|
+
//#endregion
|
|
791
|
+
//#region src/formatting/config.d.ts
|
|
792
|
+
/**
|
|
793
|
+
* The org's canonical prettier ignore-pattern list for a central Sentinel
|
|
794
|
+
* check (holocron#769/#819) — the `PRETTIER_CONFIG` object itself doesn't
|
|
795
|
+
* need a home here, since `@theholocron/prettier-config`'s default export
|
|
796
|
+
* already *is* one canonical, importable config (the same "one config,
|
|
797
|
+
* not N copies" reasoning `@theholocron/commitlint-config` established for
|
|
798
|
+
* commit-message linting, and `ALEX_CONFIG` established for inclusive
|
|
799
|
+
* language) — only the ignore list is a Sentinel-specific decision that
|
|
800
|
+
* belongs alongside `ALEX_IGNORE_PATTERNS`, not inside the config package.
|
|
801
|
+
*
|
|
802
|
+
* Reuses `ALEX_IGNORE_PATTERNS`' own entries (`.github/*`, `CHANGELOG.md`,
|
|
803
|
+
* `LICENSE` all independently confirmed to fail a real `prettier.check()`
|
|
804
|
+
* today — machine-generated or unparseable content, same reasoning that
|
|
805
|
+
* excluded them from alex), plus `pnpm-lock.yaml` — prettier-specific
|
|
806
|
+
* (alex never reads a lockfile, but prettier would try to reformat it):
|
|
807
|
+
* machine-written by pnpm's own writer, and not gitignored (lockfiles are
|
|
808
|
+
* tracked), so prettier picks it up by default. Reformatting it just
|
|
809
|
+
* fights every subsequent `pnpm install` (this repo's own `.prettierignore`
|
|
810
|
+
* already excludes it for that exact reason).
|
|
811
|
+
*/
|
|
812
|
+
declare const PRETTIER_IGNORE_PATTERNS: string[];
|
|
813
|
+
//#endregion
|
|
814
|
+
//#region src/inclusive-language/config.d.ts
|
|
815
|
+
/**
|
|
816
|
+
* The org's canonical `alex` (inclusive-language) config, as raw parsed
|
|
817
|
+
* data rather than the pre-rendered file strings `createRcConfig()`/
|
|
818
|
+
* `createIgnoreConfig()` produce for `holocron repo setup` to write into a
|
|
819
|
+
* repo's own `.alexrc.json`/`.alexignore`.
|
|
820
|
+
*
|
|
821
|
+
* `.alexrc.json` is explicitly "generated by `holocron repo setup` — do not
|
|
822
|
+
* edit manually" (this repo's own `AGENTS.md`) — the real source of truth
|
|
823
|
+
* is this JSON file, one canonical copy, not each repo's synced one. A
|
|
824
|
+
* central Sentinel check (holocron#769/#793) reads it directly rather
|
|
825
|
+
* than fetching each repo's own copy via the Contents API — the same "one
|
|
826
|
+
* config, not N copies" reasoning `@theholocron/commitlint-config` already
|
|
827
|
+
* established for commit-message linting.
|
|
828
|
+
*/
|
|
829
|
+
declare const ALEX_CONFIG: {
|
|
830
|
+
allow: string[];
|
|
831
|
+
};
|
|
832
|
+
/**
|
|
833
|
+
* Glob-ish path patterns `alex` skips. Kept as a literal here rather than
|
|
834
|
+
* importing `../templates/configs/alexjs/alexignore` directly — that file
|
|
835
|
+
* (like `commit-msg`/`pre-push`) is deliberately extensionless, matching
|
|
836
|
+
* the real filename `holocron repo setup` writes, which ECMAScript's own
|
|
837
|
+
* module resolution (`moduleResolution: "nodenext"`) can't import across
|
|
838
|
+
* a package boundary without an extension. Keep in sync with that file by
|
|
839
|
+
* hand; it changes rarely.
|
|
840
|
+
*/
|
|
841
|
+
declare const ALEX_IGNORE_PATTERNS: string[];
|
|
842
|
+
//#endregion
|
|
843
|
+
export { ALEX_CONFIG, ALEX_IGNORE_PATTERNS, Analytics, AppConfig, Auth, AuthDescription, AuthError, AuthEvent, AuthEventType, AuthIdentity, AuthUser, CARDINALITY, Capability, CapabilityConfigPackage, CapabilityImpls, CapabilityKey, Cardinality, CardinalityFor, ChromaticProjectConfig, Ci, CiRun, CiRunFilter, CiRunStatus, CommitMessageViolation, ComposedPreset, ConfigError, ConfigFileError, ConnectionStringOptions, CreateAuthUserInput, DeployFunctionConfig, DeployFunctionResult, DeployScriptConfig, DeployScriptResult, Deployment, DeploymentProject, DeploymentProjectSettings, DeploymentRecord, DeploymentTarget, DeploymentTrigger, DeriveProfileInput, Dns, DnsRecord, DnsRecordRequest, DnsRecordType, DocsConfig, DoctorConfig, EDITORCONFIG_CHECKER_EXCLUDE, EnsureResult, EnvConfig, Environment, EnvironmentReviewer, Environments, Errors, EslintConfig, FeatureResolverConfig, HolocronConfig, HolocronProfile, Issue, IssueSearchFilter, Issues, LabelDef, LifecycleResult, LifecycleSlot, LintCommitMsgFileResult, LoadedConfig, LogConfig, Logs, Monitoring, MonitoringAssertion, MonitoringAssertionComparison, MonitoringAssertionSource, MonitoringCheck, MonitoringCheckInput, MonitoringHttpMethod, MultiEntry, NormalizedAuthUser, Notifications, PRETTIER_IGNORE_PATTERNS, PackageJsonLike, PagesConfig, ParseWebhookInput, ProviderApiError, ProviderIdentity, ProviderOptions, PullRequest, 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, StorybookDeployProject, TaskEntryConfig, TeamEntry, TeamPermission, TelemetryConfig, Tooling, ToolingDoctorReport, TrackerDoctorReport, TrackerUser, Vault, type VerifyTokenFailure, type VerifyTokenResult, type VerifyTokenSuccess, WebhookDashboardInfo, WebhookVerificationError, Wiki, WikiProvisionOpts, WikiProxyConfig, Workers, WorkflowWithConfig, compose, createFeatureResolver, createResolveToken, createRestClient, defineConfig, deleteToken, deriveCapabilities, deriveCompliance, deriveProfile, deriveStack, getToken, isEditorConfigExcluded, isMulti, lintCommitMessage, lintCommitMsgFile, listStoredProviders, loadConfig, missingCapabilities, readWorkspacePackageJsons, resolveConfig, resolveEntry, resolvePluginPackage, setToken };
|