/** * `.env` / `.env.local` collection for `telo run`. * * **The workspace marker is the bound, and its absence is the old behaviour.** * A walk-up needs a stop: walking to `/` would read a user's home `.env.local` * into an app run, and stopping at `.git` would tie env resolution to a VCS a * deployed checkout may not have. `telo-workspace.yaml` is already the anchor * every workspace-relative path is measured from, so it is the honest boundary * for "this repo". Only its LOCATION is read — never its `modules:` list, which * is release scope and says nothing about env, which is why a manifest under * `examples/` (in no release subtree) still gets the full walk. * * With no marker anywhere above the manifest the walk collapses to the * manifest's own directory, which is what this did before the bound existed, so * the file stays harmless by its absence: it enables the parent lookup rather * than gating one, and deleting it cannot silently drop a variable an app had. * * Precedence (highest first): the real environment > nearest `.env.local` > * nearest `.env` > the same pair one directory up, and so on. A repo-root file * reaches every manifest beneath it, so a nearer declaration has to win. * * **Resolving is separate from applying**, so the walk is answerable without * touching `process.env` or writing a line of output — the caller owns both. */ /** One file the walk could not read for a reason other than its absence. */ export interface UnreadableEnvFile { readonly path: string; /** The errno code (`EACCES`, `EISDIR`, …), or the message when there is none. */ readonly reason: string; } export interface EnvFileResolution { /** The merged values, precedence already applied. Never written anywhere by * this module. */ readonly values: Readonly>; /** The files that contributed, in the order they were merged (farthest * ancestor first, so the last entry is the one that won a conflict). */ readonly loaded: readonly string[]; /** Files that exist but could not be read. Reporting these is the caller's, * and it is not optional: an unreadable `.env` is indistinguishable from an * absent one to everything downstream. */ readonly unreadable: readonly UnreadableEnvFile[]; } /** Collect the env files visible to a manifest. Pure: reads the filesystem and * returns what it found. */ export declare function resolveEnvFiles(manifestPath: string): EnvFileResolution; //# sourceMappingURL=env-files.d.ts.map