/** * JSON-schema validation for manifest.config.yaml (build config). * * The runtime-level TypeScript config (manifest.config.ts) is validated * structurally by the loader because it contains JavaScript functions and * class references that cannot be expressed in JSON Schema. * * The schema itself lives at docs/spec/config/manifest.config.schema.json * and ships with the package via package.json#files. Validation always loads * this bundled copy (see locateConfigSchema) — it never fetches a URL, so the * `$schema` line in a user's config is decorative as far as the CLI is * concerned. Manifest publishes no resolvable schema URL; for editor * IntelliSense, downstream repos should map the bundled file in * .vscode/settings.json rather than point `$schema` at a public URL. */ import type { ManifestConfig } from './config.js'; export interface ConfigValidationDiagnostic { /** Dotted JSON pointer to the offending value, e.g. "projections.nextjs.options.appDir". Empty string at the root. */ path: string; /** Human-readable message. */ message: string; /** Allowed values, when the violation is an enum/const check. */ allowed?: readonly unknown[]; /** The offending value, when available. */ value?: unknown; } export interface ConfigValidationResult { ok: boolean; diagnostics: ConfigValidationDiagnostic[]; } /** * Load and cache the build-config schema. The schema is small and the file * walk is the slow part — cache once per process. */ export declare function loadConfigSchema(): Promise; /** * Validate a Manifest build config against the JSON schema. * * Always returns a result — never throws — so the caller (CLI or test) * decides how to surface failures. */ export declare function validateConfig(config: ManifestConfig | null | undefined): Promise; /** * Format a validation diagnostic for terminal output. Pure (no chalk) so * callers can decorate as they wish. */ export declare function formatDiagnostic(d: ConfigValidationDiagnostic): string; //# sourceMappingURL=config-validate.d.ts.map