import { readEnvVariable } from './read-env-variable.js'; type EnvReplacement = { unsetEnvVars: string[]; interpolatedEnvVars: string[]; replacedValues: Record; }; /** * Recursively traverses an object or array and interpolates environment variables in all string values. * Keeps track of the path to each modified value and maintains a record of original and replaced values. * * @param obj - The object or array to process * * @returns An object containing: * - resolvedObj: A copy of the plain objects and arrays, with all environment variables replaced * - unsetEnvVars: Array of environment variable names that were not found * - interpolatedEnvVars: Array of environment variable names that were successfully resolved * - replacedValues: Record of paths where values were replaced, with original and new values * * For usage examples and test cases, see: * [unit tests](./__tests__/env.test.ts) */ export declare function replaceEnvVariablesDeep | Array>(obj: T): EnvReplacement & { resolvedObj: T; }; /** * `replaceEnvVariablesDeep` without the copy: changes the strings of `container` in place. * `readEnv` returns the value of an environment variable; it reads `process.env` by default. */ export declare function replaceEnvVariablesInPlace(container: object, readEnv?: typeof readEnvVariable): EnvReplacement; export {}; //# sourceMappingURL=replace-env-variables-deep.d.ts.map