[]previous and next page

EnvFiles

The env files of one mode, read for the build and for server code.

The env files of one mode, read for the build and for server code. See readEnvFiles.

Import#

ts
import type { EnvFiles } from "@shadow-js/dusk/vite";

Signature#

ts
interface EnvFiles {
  /** The value of every name, from the files alone (the real environment is added by {@link resolvedValues}). */
  readonly values: Readonly<Record<string, string>>;
  /** For each name, the file that holds the value that wins. */
  readonly sources: Readonly<Record<string, string>>;
  /** For each name, every file that declares it, in precedence order (lowest first). */
  readonly declaredIn: Readonly<Record<string, readonly string[]>>;
  /** The names declared in a public file (`.env.public`, `.env.[mode].public`, `.env.public.local`), sorted. */
  readonly publicNames: readonly string[];
  /** The names declared only in server files (`.env`, `.env.[mode]`, `.env.local`, `.env.[mode].local`), sorted. */
  readonly serverNames: readonly string[];
}

Members#

Name Type Description
values readonly values: Readonly<Record<string, string>> The value of every name, from the files alone (the real environment is added by resolvedValues).
sources readonly sources: Readonly<Record<string, string>> For each name, the file that holds the value that wins.
declaredIn readonly declaredIn: Readonly<Record<string, readonly string[]>> For each name, every file that declares it, in precedence order (lowest first).
publicNames readonly publicNames: readonly string[] The names declared in a public file (.env.public, .env.[mode].public, .env.public.local), sorted.
serverNames readonly serverNames: readonly string[] The names declared only in server files (.env, .env.[mode], .env.local, .env.[mode].local), sorted.