OptionalnameA short, stable label for this contract (e.g. "payments", "database"). Used in error messages. Defaults to an auto-generated anonymous label if omitted -- providing one is strongly recommended for readable validation errors.
OptionalsourcePass import.meta.url here so validation errors point at the file that
declared the failing variable (e.g. "features/payments/env.schema.ts")
instead of just the short name label. There is no portable way for
createEnv to discover its caller's module URL on its own -- this is
always correct and never goes stale, since it's supplied by the JS
engine rather than hand-typed.
env-cap runtime entry point.
Zero dependencies, isomorphic (no
fs, noprocessother than the values the developer passes in). Handles processing, validation, caching, and typed access only -- discovery and manifest generation live in@maverickcer/env-cap/buildand are never imported from here.documentEnvis exported from here, not@maverickcer/env-cap/build, even though it exists purely for documentation: it's meant to be called inline in the same schema file ascreateEnv, which is ordinary runtime code that may end up in any bundle (including a browser one). It must be exactly as cheap and safe to import ascreateEnv-- seedocument.ts.