import { BundlerConfigFile, ResolvedBuildConfig, ExportOptions } from "./types"; /** * Loads and validates bundler configuration files * @example * const loader = new ConfigFileLoader('config/shakapacker-builds.yml') * const config = loader.load() */ export declare class ConfigFileLoader { private configFilePath; /** * @param configFilePath - Path to config file (defaults to DEFAULT_CONFIG_FILE in cwd) * @throws Error if path is outside project directory */ constructor(configFilePath?: string); /** * Validates that the config file path is within the project directory * to prevent path traversal attacks (including symlink traversal) * @throws Error if path traversal is detected */ private validateConfigPath; /** * Checks if the config file exists * @returns true if file exists, false otherwise */ exists(): boolean; /** * Loads and validates the config file * @returns Parsed and validated config file * @throws Error if file doesn't exist, is invalid YAML, or fails validation */ load(): BundlerConfigFile; private static validate; /** * Resolves a build configuration by name * @param buildName - Name of the build from config file * @param options - CLI options that may override build settings * @param defaultBundler - Fallback bundler if not specified * @returns Resolved build configuration with all settings applied * @throws Error if build name not found */ resolveBuild(buildName: string, options: ExportOptions, defaultBundler: "webpack" | "rspack"): ResolvedBuildConfig; private static resolveBundler; private expandEnvironmentVariables; private expandString; /** * Validates that an environment variable name matches the standard format * Must start with letter or underscore, followed by letters, numbers, or underscores * @param name - The variable name to validate * @returns true if valid, false otherwise */ private static isValidEnvVarName; private static convertBundlerEnvToArgs; /** * Lists all available builds from the config file * Prints formatted output to console * @throws Error if config file doesn't exist or is invalid */ listBuilds(): void; } /** * Generates a sample configuration file with examples and documentation * @returns YAML content as string ready to be written to file */ export declare function generateSampleConfigFile(ssr?: boolean): string; //# sourceMappingURL=configFile.d.ts.map