/** * Config-defaults pass (#629, epic #551 follow-up to #606/#622/#626) — the * missing link between `chant.config.ts`'s `sbom`/`signing`/`vulnPolicy` * sections and the steps that actually consume them. * * Before this module, `resolveSigningDefaults`/`resolveVulnPolicy` * (../config.ts) were never called anywhere in the `chant run --components` * path, and `resolveSbomFormat` was only ever called in post-hoc display * code. A component author had to hand-code `format`/`keyless`/`oidcIssuer`/ * `policy` into every `generate-sbom`/`sign`/`attest-provenance`/`verify`/ * `vuln-gate` step, even when the project already declared a project-wide * default in `chant.config.ts` — the config sections were decorative. * * `applyConfigDefaults` walks a `DriverComponent`'s `deploy` composition * (including nested fan-out phases and `onFailure` compensation phases) and * returns a new component with each recognized step's config-driven fields * filled in *only where the step didn't already set them* — per-step value * wins over config wins over the capability's own built-in default, the * precedence every one of the `resolve*` docstrings in ../config.ts already * claims. This module is the caller that finally makes that claim true. * * Kept entirely outside `./driver.ts`: the driver stays capability-agnostic * (it dispatches by `kind` and knows nothing about `sbom`/`signing`/ * `vulnPolicy`) — this pass transforms the component's plain-data composition * *before* it ever reaches the driver, the same "resolve config, then hand a * capability-agnostic caller a fully-formed input" convention `resolveSbomFormat`'s * own docstring already describes for its callers. */ import type { ChantConfig } from "../config.js"; import type { DriverComponent } from "./driver.js"; /** * Return `component` with `chant.config.ts`'s `sbom`/`signing`/`vulnPolicy` * defaults filled into its `deploy` (and `rollback`, which shares the same * `DriverPhase[]` shape and can equally carry a `verify`/`vuln-gate` step) * composition, wherever a step didn't already specify the value itself. * Non-destructive: returns a new component/phase/step tree, never mutates * `component` in place, so a caller holding the original discovered * `DriverComponent` (e.g. for `chant describe`) is unaffected. */ export declare function applyConfigDefaults(component: DriverComponent, config: ChantConfig): DriverComponent; //# sourceMappingURL=config-defaults.d.ts.map