Function: env()
env(
name,options?):EnvRef
Defined in: sdk/ts/sdk/src/config/define.ts:43
Refers to an environment variable by name so a secret never sits in vlo.config.ts.
The value is read when the profile is loaded, not when env is called. An unset or empty variable fails the load with a message naming the variable, unless optional is true, in which case the field is simply absent.
Parameters
name
string
options?
optional?
boolean
Returns
Example
ts
import { defineConfig, env } from "@oona/vlo";
export default defineConfig({
workflows: ["*.workflow.ts"],
profiles: {
prod: {
journal: env("DATABASE_URL"),
auth: { token: env("VLO_TOKEN"), pushSecret: env("VLO_PUSH_SECRET", { optional: true }) },
},
},
});