/** * Configuration loader supporting config files (.usernamerc) and environment variables */ import type { ConfigOptions } from './types.js'; /** * Loads configuration from multiple sources following precedence: * 1. CLI flags (passed directly, not handled here) * 2. Environment variables (USERNAME_CHECKER_*) * 3. Config file (.usernamerc) * 4. Defaults */ export declare class ConfigLoader { private static readonly ENV_PREFIX; /** * Load configuration from all available sources */ static loadConfig(): ConfigOptions; /** * Find config file in priority order: * 1. Current working directory * 2. Home directory * 3. XDG_CONFIG_HOME (Linux/macOS standard) */ private static findConfigFile; /** * Parse config file (JSON format) */ private static parseConfigFile; /** * Load configuration from environment variables * Supported variables: * - USERNAME_CHECKER_TIMEOUT * - USERNAME_CHECKER_CONCURRENCY (maxConcurrency) * - USERNAME_CHECKER_MAX_CONCURRENCY * - USERNAME_CHECKER_RETRIES * - USERNAME_CHECKER_NSFW (true/false) * - USERNAME_CHECKER_EXCLUDED (includeExcluded, true/false) * - USERNAME_CHECKER_TOR (true/false) * - USERNAME_CHECKER_PROXY * - USERNAME_CHECKER_FORMAT * - USERNAME_CHECKER_CACHE_TYPE * - USERNAME_CHECKER_CACHE_TTL * - USERNAME_CHECKER_DEFAULT_SITES (comma-separated) */ private static loadEnvironmentVariables; /** * Validate and normalize config object */ private static validateConfig; /** * Create sample config file content */ static getSampleConfigContent(): string; }