// "safe" env, e.g. checks if the variable is set. // Does not protect against writes to process.env! export const env = new Proxy>( process.env as unknown as Record, { get(target, prop: string): string { const value = target[prop]; if (value === undefined) throw new Error(`process.env.${prop} is not set!`); return value; }, }, );