/** * Parses a .env file string into a key-value object. * Supports quotes, comments, and variable expansion. * * @param input - The .env file content as a string. * @param expandVariables - Whether to expand variable references like $VAR or ${VAR} (default: false). * @returns An object containing the parsed environment variables. * * @throws {Error} If input is empty. * @throws {Error} If a line has invalid format. * * @example * // Basic usage * parseEnvFile("NODE_ENV=production\nPORT=3000"); * // Returns { NODE_ENV: "production", PORT: "3000" } * * @example * // With quotes * parseEnvFile('DB_HOST="localhost"\nDB_NAME=\'mydb\''); * // Returns { DB_HOST: "localhost", DB_NAME: "mydb" } * * @example * // With variable expansion * parseEnvFile("HOST=localhost\nURL=http://$HOST:3000", true); * // Returns { HOST: "localhost", URL: "http://localhost:3000" } * * @example * // With comments * parseEnvFile("# Database config\nDB_HOST=localhost"); * // Returns { DB_HOST: "localhost" } * * @note Comments start with `#`. * Quotes (single or double) around values are removed. * Empty lines and lines with only whitespace are ignored. * Variable expansion only works if expandVariables is true. * * @complexity Time: O(n), Space: O(n) - Where n is the length of input string */ export declare function parseEnvFile(input: string, expandVariables?: boolean): Record; //# sourceMappingURL=parseEnvFile.d.ts.map