env_declarations.ts

The shapes of a project's env var declarations and of loading the env, apart from env_files.ts, which reads the env files, so the loader's hooks, which need only these, never load the fs host module.

view source

Declarations
#

4 declarations

env_var_has_visibility
#

env_declarations.ts view source

(config: EnvVarConfig<any>, visibility: EnvVisibility): boolean import {env_var_has_visibility} from '@fuzdev/gro/env_declarations.js';

Whether a declared env var belongs to visibility - SvelteKit's vars are private unless declared public: true.

config

type EnvVarConfig<any>

visibility

returns

boolean

EnvVarDeclarations
#

EnvVisibility
#

LoadEnvOptions
#

env_declarations.ts view source

LoadEnvOptions import type {LoadEnvOptions} from '@fuzdev/gro/env_declarations.js';

dev

Picks the development or production mode files for the default env_files.

type boolean

env_dir?

The directory the env files are resolved against, absolute or relative to the project of the FsPaths that reads them, defaults to the project.

type string

env_files?

The env files to load, in order, defaults to the same files as Vite.

type string[]

ambient_env

The env merged in last, a plain record a root builds, like env.get_all().

type Readonly<Record<string, string | undefined>>

Imported by
#