@theholocron/cli 5.0.0-alpha.277 → 5.0.0-alpha.279

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.
@@ -68,6 +68,12 @@ function resolveEntry(key, raw) {
68
68
  })
69
69
  };
70
70
  }
71
+ /** The values `repoValidation.docsCoverage` accepts. */
72
+ const DOCS_COVERAGE_MODES = [
73
+ "off",
74
+ "warn",
75
+ "required"
76
+ ];
71
77
  function resolveConfig(raw) {
72
78
  if (!raw.name) throw new ConfigError("`name` is required");
73
79
  if (!raw.providers || typeof raw.providers !== "object") throw new ConfigError("`providers` block is required");
@@ -82,6 +88,8 @@ function resolveConfig(raw) {
82
88
  if (!raw.docs.build) throw new ConfigError("`docs.build` is required when `docs` is set");
83
89
  docs = raw.docs;
84
90
  }
91
+ const docsCoverage = raw.repoValidation?.docsCoverage;
92
+ if (docsCoverage !== void 0 && !DOCS_COVERAGE_MODES.includes(docsCoverage)) throw new ConfigError(`\`repoValidation.docsCoverage\` must be one of ${DOCS_COVERAGE_MODES.map((m) => `"${m}"`).join(", ")}, got ${JSON.stringify(docsCoverage)}`);
85
93
  const homepage = raw.homepage ?? (docs?.domain ? `https://${docs.domain}/` : void 0);
86
94
  return {
87
95
  name: raw.name,
@@ -90,6 +98,7 @@ function resolveConfig(raw) {
90
98
  org: raw.org,
91
99
  domain: raw.domain,
92
100
  repo: raw.repo,
101
+ repoValidation: raw.repoValidation,
93
102
  tasks: raw.tasks,
94
103
  syncScripts: raw.syncScripts,
95
104
  holocronScript: raw.holocronScript,
@@ -1,5 +1,6 @@
1
- import { Ot as PagesConfig, Xt as TeamEntry, g as CapabilityKey } from "./index-D_HJGtOY.mjs";
1
+ import { Ot as PagesConfig, Xt as TeamEntry, g as CapabilityKey } from "./index-aQ7iGTl7.mjs";
2
2
  import { LogLevel } from "@theholocron/observability/core";
3
+ import { DocsCoverageMode } from "@theholocron/astromech";
3
4
  /** Structured-logging config. The Axiom **token** never lives here — only in
4
5
  * env vars or the OS keyring — but the non-secret dataset name may. */
5
6
  interface LogConfig {
@@ -140,6 +141,17 @@ interface RepoSecretsSync {
140
141
  /** Where the secrets land, as `--github-secret-scope` words it: `"repo"` (the default), `"env=<name>"` or `"org=<name>"`. */
141
142
  scope?: string;
142
143
  }
144
+ /** Per-repo switches for the repo-validation checks (spec `tech-api-docs`, #1368). */
145
+ interface RepoValidationConfig {
146
+ /**
147
+ * How strictly this repo enforces doc-comment coverage of its public API (`holocron probe docs patch`, the
148
+ * `Docs coverage` workflow and the `documentation` Codecov flag). `"off"` (the default) does nothing; `"warn"`
149
+ * reports without failing and posts informational Codecov statuses; `"required"` fails the check and posts statuses
150
+ * that are not informational. It never adds a status to the branch-protection required checks: that stays in
151
+ * `extraRequiredChecks`.
152
+ */
153
+ docsCoverage?: DocsCoverageMode;
154
+ }
143
155
  interface RepoConfig {
144
156
  /** "owner/name" — the GitHub repository coordinate. Derived from the git remote when absent. */
145
157
  name?: string;
@@ -353,6 +365,8 @@ interface HolocronConfig {
353
365
  * `--repo` on the command line still overrides.
354
366
  */
355
367
  repo?: RepoConfig;
368
+ /** Per-repo switches for the repo-validation checks. */
369
+ repoValidation?: RepoValidationConfig;
356
370
  /**
357
371
  * The task manifest — what this repo runs. Each entry is a task name
358
372
  * (backed by a reusable workflow in `theholocron/.github`), or the object
@@ -568,6 +582,8 @@ interface ResolvedHolocronConfig {
568
582
  org?: string;
569
583
  domain?: string;
570
584
  repo?: RepoConfig;
585
+ /** Which repo-wide checks this repo turns on (`docsCoverage`), validated by `resolveConfig`. */
586
+ repoValidation?: RepoValidationConfig;
571
587
  tasks?: Array<string | TaskEntryConfig>;
572
588
  syncScripts?: boolean;
573
589
  holocronScript?: string;
@@ -658,4 +674,4 @@ interface ComposedPreset {
658
674
  * const preset = compose(node(), nextjs());
659
675
  */
660
676
  declare function compose(...args: (Capability | Capability[])[]): ComposedPreset;
661
- export { ResolvedProvidersConfig as A, RepoProperties as C, RepoVariables as D, RepoSecretsSync as E, TelemetryConfig as F, WorkflowWithConfig as I, SingleEntry as M, StorybookDeployProject as N, ResolvedHolocronConfig as O, TaskEntryConfig as P, RepoConfig as S, RepoSecrets as T, LogConfig as _, ConfigError as a, RawProviderEntry as b, resolvePluginPackage as c, ChromaticProjectConfig as d, DocsConfig as f, HolocronConfig as g, EslintConfig as h, TaskEntry as i, ResolvedTuple as j, ResolvedProviderEntry as k, AppConfig as l, EnvConfig as m, Capability as n, resolveConfig as o, DoctorConfig as p, ComposedPreset as r, resolveEntry as s, compose as t, CapabilityConfigPackage as u, MultiEntry as v, RepoProtection as w, RawProvidersConfig as x, ProviderOptions as y };
677
+ export { ResolvedProviderEntry as A, RepoProperties as C, RepoValidationConfig as D, RepoSecretsSync as E, TaskEntryConfig as F, TelemetryConfig as I, WorkflowWithConfig as L, ResolvedTuple as M, SingleEntry as N, RepoVariables as O, StorybookDeployProject as P, RepoConfig as S, RepoSecrets as T, LogConfig as _, ConfigError as a, RawProviderEntry as b, resolvePluginPackage as c, ChromaticProjectConfig as d, DocsConfig as f, HolocronConfig as g, EslintConfig as h, TaskEntry as i, ResolvedProvidersConfig as j, ResolvedHolocronConfig as k, AppConfig as l, EnvConfig as m, Capability as n, resolveConfig as o, DoctorConfig as p, ComposedPreset as r, resolveEntry as s, compose as t, CapabilityConfigPackage as u, MultiEntry as v, RepoProtection as w, RawProvidersConfig as x, ProviderOptions as y };