import { ProductConfig } from './types.js'; /** * Load the developer-authored `bulletin-deploy.config.ts`. * * Configs are TypeScript so authors get IntelliSense on the discriminated * `kind` union. We evaluate them at runtime via [jiti](https://github.com/unjs/jiti) * and route the default export through [`validateProductConfig`](./schema.ts). * TS types are erased at runtime, so a literal like `"jpg"` where the type * says `"jpeg" | "png"` still needs a runtime check. */ interface LoadProductConfigOptions { /** Explicit path to a config file. Takes precedence over auto-discovery. */ path?: string; /** Directory to search when no explicit path is supplied. Defaults to process.cwd(). */ cwd?: string; /** When true, walks up parent directories from `cwd` until a config is found or the fs root is reached. */ walkUp?: boolean; } interface LoadedProductConfig { config: ProductConfig; sourcePath: string; } /** Load + validate a product config, throwing on missing-file or schema errors. */ declare function loadProductConfig(options?: LoadProductConfigOptions): Promise; /** * Like [`loadProductConfig`](./config-load.ts) but returns `null` when no config is discoverable. * * Schema errors and explicit-path-not-found still throw. This is the opt-in * shape the deploy CLI uses to enter manifest mode only when a config is * present, without making the user pass a flag. */ declare function tryLoadProductConfig(options?: LoadProductConfigOptions): Promise; /** * Build the user-facing message for a config module that threw while being * evaluated. Preserves the original thrown message and, when it matches a * " is required" / "missing env var VAR" shape, appends a hint naming * the specific environment variable — that shape covers the overwhelming * majority of consumer config throws (a required `process.env.X` guard). */ declare function formatConfigLoadError(sourcePath: string, err: unknown): string; export { type LoadProductConfigOptions, type LoadedProductConfig, formatConfigLoadError, loadProductConfig, tryLoadProductConfig };