()
| 26 | } |
| 27 | |
| 28 | export function init() { |
| 29 | const parsed = schema.safeParse(process.env) |
| 30 | |
| 31 | if (parsed.success === false) { |
| 32 | console.error( |
| 33 | '❌ Invalid environment variables:', |
| 34 | parsed.error.flatten().fieldErrors, |
| 35 | ) |
| 36 | |
| 37 | throw new Error('Invalid environment variables') |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * This is used in both `entry.server.ts` and `root.tsx` to ensure that |
no outgoing calls
no test coverage detected