mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 22:34:03 +00:00
Merge remote-tracking branch 'origin/main' into codex/whe-31-adapters
# Conflicts: # tsconfig.json
This commit is contained in:
21
packages/config/src/env-e2e.ts
Normal file
21
packages/config/src/env-e2e.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { createEnv } from '@t3-oss/env-core'
|
||||
import { z } from 'zod'
|
||||
|
||||
const server = {
|
||||
DATABASE_URL: z.string().url(),
|
||||
E2E_SMOKE_ALLOW_WRITE: z
|
||||
.enum(['true', 'false'])
|
||||
.default('false')
|
||||
.transform((v) => v === 'true')
|
||||
}
|
||||
|
||||
export const e2eEnv = createEnv({
|
||||
server,
|
||||
runtimeEnv: process.env,
|
||||
emptyStringAsUndefined: true,
|
||||
onValidationError: (issues) => {
|
||||
console.error('Invalid e2e environment variables:')
|
||||
console.error(JSON.stringify(issues, null, 2))
|
||||
throw new Error('E2E environment validation failed')
|
||||
}
|
||||
})
|
||||
@@ -1 +1,2 @@
|
||||
export { env } from './env'
|
||||
export { e2eEnv } from './env-e2e'
|
||||
|
||||
Reference in New Issue
Block a user