/** * @fileoverview Configuration file loader and manager * @module utils/ConfigLoader */ import type { ConfigFile, PdfOptions } from '../types/index.js'; /** * Configuration loader for loading and merging config files * * @example * ```typescript * const loader = new ConfigLoader(); * const config = await loader.loadConfig('/path/to/project'); * ``` */ export declare class ConfigLoader { /** Cached configuration */ private cachedConfig; /** Path to the loaded config file */ private configPath; /** * Find a configuration file in the given directory or parent directories * @param startDir - Directory to start searching from * @returns Path to config file or null if not found */ findConfigFile(startDir: string): Promise; /** * Load configuration from a specific file * @param configPath - Path to the config file * @returns Loaded configuration */ loadFromFile(configPath: string): Promise; /** * Load configuration from directory (auto-discover config file) * @param directory - Directory to search for config * @returns Loaded configuration or default config if not found */ loadConfig(directory: string): Promise; /** * Get default configuration * @returns Default configuration object */ getDefaultConfig(): ConfigFile; /** * Validate configuration object * @param config - Configuration to validate * @throws Error if configuration is invalid */ private validateConfig; /** * Merge CLI options with config file options * CLI options take precedence over config file options * @param cliOptions - Options from command line * @param configOptions - Options from config file * @returns Merged options */ mergeOptions(cliOptions: Partial, configOptions: Partial): PdfOptions; /** * Get the path to the loaded config file * @returns Config file path or null */ getConfigPath(): string | null; /** * Get the cached configuration * @returns Cached config or null */ getCachedConfig(): ConfigFile | null; /** * Create a sample configuration file * @param outputPath - Path where to create the config file */ createSampleConfig(outputPath: string): Promise; } //# sourceMappingURL=ConfigLoader.d.ts.map