/** * Configuration File Loader * * Discovers and loads wonder-logger.yaml config files from the project root. */ import { type WonderLoggerConfig } from './schema.js'; import { type ConfigResult } from './result.js'; /** * Default config file name */ export declare const DEFAULT_CONFIG_FILE = "wonder-logger.yaml"; /** * Finds the config file in the current working directory * * @param fileName - Config file name (defaults to 'wonder-logger.yaml') * @returns Result containing absolute path to config file, or error if not found */ export declare function findConfigFile(fileName?: string): ConfigResult; /** * Loads and validates config from a file * * @param filePath - Absolute path to config file * @returns Result containing validated configuration object with _configDir metadata, or error */ export declare function loadConfigFromFile(filePath: string): ConfigResult; /** * Loads config from default location or provided path * * @param options - Optional configuration * @param options.configPath - Custom config file path * @param options.required - Whether config file is required (defaults to true) * @returns Result containing validated configuration object, or error * * @example * // Load from default location (wonder-logger.yaml in cwd) * const result = loadConfig() * if (result.ok) { * const config = result.value * } * * // Load from custom path * const result = loadConfig({ configPath: './config/custom.yaml' }) * * // Optional config (returns FileNotFound error if not found) * const result = loadConfig({ required: false }) */ export declare function loadConfig(options?: { configPath?: string; required?: boolean; }): ConfigResult; //# sourceMappingURL=loader.d.ts.map