/** * Environment File Utilities * * Parse, update, and validate .env files * * @module utils/env-file */ export interface EnvVariable { key: string; value: string; } /** * Parse .env file content into key-value pairs * * @param content - Content of .env file * @returns Record of key-value pairs */ export declare function parseEnvFile(content: string): Record; /** * Update or add environment variable in .env content * * @param envContent - Current .env file content * @param key - Environment variable key * @param value - Environment variable value * @returns Updated .env content */ export declare function updateEnvVar(envContent: string, key: string, value: string): string; /** * Update multiple environment variables * * @param envContent - Current .env file content * @param vars - Array of environment variables to update * @returns Updated .env content */ export declare function updateEnvVars(envContent: string, vars: EnvVariable[]): string; /** * Read .env file from project directory * * @param projectPath - Path to project root * @returns Content of .env file, or empty string if not found */ export declare function readEnvFile(projectPath: string): string; /** * Write .env file to project directory * * @param projectPath - Path to project root * @param content - Content to write */ export declare function writeEnvFile(projectPath: string, content: string): void; /** * Create .env file from .env.example template * * @param projectPath - Path to project root * @returns Content of .env file (from template or empty) */ export declare function createEnvFromTemplate(projectPath: string): string; /** * Verify .env is in .gitignore * * @param projectPath - Path to project root * @returns True if .env is gitignored, false otherwise */ export declare function isEnvGitignored(projectPath: string): boolean; /** * Add .env to .gitignore if not already present * * @param projectPath - Path to project root */ export declare function ensureEnvGitignored(projectPath: string): void; /** * Validate required environment variables are present * * @param envContent - Content of .env file * @param requiredKeys - Array of required keys * @returns Object with validation result and missing keys */ export declare function validateEnvVars(envContent: string, requiredKeys: string[]): { valid: boolean; missing: string[]; }; /** * Check if .env file exists in project * * @param projectPath - Path to project root * @returns True if .env exists, false otherwise */ export declare function envFileExists(projectPath: string): boolean; //# sourceMappingURL=env-file.d.ts.map