/** * Resolve ${VAR} and ${VAR:-default} in strings using process.env. * SECURITY: Do not log the result of resolveEnvInObject when it may contain * resolved secrets (e.g. API keys). Callers must never log full resolved config. */ /** * The substitution grammar this module implements, as a source string. * * Exported so a GATE on unresolved placeholders can be built from the same grammar the expander * uses instead of an approximation of it. `senpi deploy`'s render gate held a narrower pattern * (`\$\{[A-Z0-9_]+\}`, no `:` or `-`), so `${SENPI_API_KEY:-x}` in a package passed the gate and * was then expanded here against `process.env` — a gate strictly narrower than its expander is a * hole shaped exactly like the difference. * * A source string rather than the compiled regex on purpose: `VAR_PATTERN` carries `g`, whose * `lastIndex` makes `.exec()` stateful across calls. A gate wants its own unflagged instance. */ export declare const ENV_VAR_PATTERN_SOURCE: string; /** * Replaces ${VAR} and ${VAR:-default} in a string using process.env. * - ${VAR} → value of process.env.VAR or empty string if unset * - ${VAR:-default} → value of process.env.VAR or "default" if unset */ export declare function resolveEnvInString(s: string): string; /** * Recursively walks plain objects and arrays and resolves string values * with resolveEnvInString. Non-strings are left unchanged. */ export declare function resolveEnvInObject(obj: T): T; //# sourceMappingURL=env-resolve.d.ts.map