Shumiland/src/lib/validateEnv.ts
Vadym Samoilenko 96dc23b74b
Some checks are pending
CI / Type Check (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Unit Tests (push) Waiting to run
Deploy / Build & Push Image (push) Waiting to run
Deploy / Deploy to VPS (push) Blocked by required conditions
perf: compress images to WebP (-97%) and fix slider/performance issues
- Convert all 40+ public/images/figma assets from raw PNG/JPG to WebP at
  max 1920px, 82% quality: 397 MB → 13 MB total (96.7% reduction)
- Update all component image references to .webp
- Add 1-year Cache-Control headers for /images/* and /_next/static/*
- Fix GallerySlider initial scroll offset (first card no longer clipped by mask)
- Fix arrow2.svg missing explicit width/height (Lighthouse unsized-images)
- Hero, LocationsSlider: aspect-ratio height + seamless infinite loop (prior session)
- Add drizzle-kit to dependencies for production schema push (prior session)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-10 22:49:46 +01:00

10 lines
352 B
TypeScript

const REQUIRED_VARS = ['DATABASE_URL', 'PAYLOAD_SECRET'] as const
export function validateEnv(): void {
const missing = REQUIRED_VARS.filter((key) => !process.env[key])
if (missing.length > 0) {
throw new Error(
`Missing required environment variables:\n${missing.map((k) => ` - ${k}`).join('\n')}\n\nCheck your .env file.`
)
}
}