Zum Inhalt springen
Docs

Befehlspalette

Zu einer Seite oder Ansicht springen oder ein Todo per Name finden.

Änderungen

env

Validated environment contracts: responsibilities, supported exports and extension points.

Markdown

Purpose

Separate server, web, native, email and MCP resource entries validate their own configuration. Server secrets are parsed with Zod through the env helpers. Public web and native variables are intentionally limited. runtime-flags reads the deployment switches (DB_TENANT_PIPELINE, TENANCY_PROBE, TRUSTED_PROXY_HEADER, TRUSTED_PROXIES) on every call, without loading the whole server contract.

Public exports

SubpathTarget
./server./src/server.ts
./mcp-resource./src/mcp-resource.ts
./web./src/web.ts
./native./src/native.ts
./email./src/email.ts
./runtime-flags./src/runtime-flags.ts

These paths come from packages/env/package.json. A . entry is the package root. Conditional targets distinguish platform or type resolution; consumers should import the subpath, not its source file.

How to extend

Add a variable to its correct contract and setup/deploy path. Never add a secret to a VITE_ or EXPO_PUBLIC_ contract. Test missing, blank and malformed values; preserve existing credentials when rerunning setup.

Read the validated environment contracts guide for the full flow.

Key files

Auf GitHub bearbeitenDie Dokumentation ist auf Englisch.