Files
worldwideview/prisma.config.ts
Antigravity AI 3ddd6ec150 feat(core): plugin toggle functionality and CLI publishing enhancements
This release groups multiple feature additions and structural stability fixes:
- feat(marketplace): API routes to enable/disable local plugins via UI (Minor)
- feat(cli): interactive publishing and global org configuration persistence (Minor)
- fix(css): resolve parsing errors in PluginsTab stylesheet (Patch)
- fix(engine): fix wwv-data-engine dependency resolution and host mounts (Patch)
- fix(db): resolve P1001 database connection issues in docker loopback (Patch)
- chore(ci): revert dynamic edition runtime injection to static build args
2026-05-13 16:18:53 +12:00

35 lines
964 B
TypeScript

import fs from "fs";
import path from "path";
let dbUrl = process.env.DATABASE_URL;
if (!dbUrl) {
try {
const envLocalPath = path.resolve(process.cwd(), ".env");
if (fs.existsSync(envLocalPath)) {
const envContent = fs.readFileSync(envLocalPath, "utf8");
const match = envContent.match(/^DATABASE_URL=["']?(.*?)["']?$/m);
if (match) {
dbUrl = match[1].trim();
}
}
if (!dbUrl) {
const envPath = path.resolve(process.cwd(), ".env");
if (fs.existsSync(envPath)) {
const envContent = fs.readFileSync(envPath, "utf8");
const match = envContent.match(/^DATABASE_URL=["']?(.*?)["']?$/m);
if (match) {
dbUrl = match[1].trim();
}
}
}
} catch (e) {
// Ignore
}
}
export default {
datasource: {
url: dbUrl,
},
};