mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 11:32:13 +01:00
refactor: comprehensive code quality improvements and dev environment fixes
- Convert ProcessingStatusManager from static class to individual functions - Refactor processSingleImport function to reduce cognitive complexity - Fix unused parameters in database-pool.ts event handlers - Add missing DATABASE_URL configuration to env.ts - Add pg package and @types/pg dependencies for PostgreSQL support - Fix tsx command execution by updating package.json scripts to use pnpm exec - Apply biome formatting fixes for import organization
This commit is contained in:
@ -103,6 +103,10 @@ export const env = {
|
||||
5
|
||||
),
|
||||
|
||||
// Database Configuration
|
||||
DATABASE_URL: parseEnvValue(process.env.DATABASE_URL) || "",
|
||||
DATABASE_URL_DIRECT: parseEnvValue(process.env.DATABASE_URL_DIRECT) || "",
|
||||
|
||||
// Database Connection Pooling
|
||||
DATABASE_CONNECTION_LIMIT: parseIntWithDefault(
|
||||
process.env.DATABASE_CONNECTION_LIMIT,
|
||||
@ -123,6 +127,10 @@ export const env = {
|
||||
export function validateEnv(): { valid: boolean; errors: string[] } {
|
||||
const errors: string[] = [];
|
||||
|
||||
if (!env.DATABASE_URL) {
|
||||
errors.push("DATABASE_URL is required");
|
||||
}
|
||||
|
||||
if (!env.NEXTAUTH_SECRET) {
|
||||
errors.push("NEXTAUTH_SECRET is required");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user