update deps

fix types error
This commit is contained in:
Aman Varshney
2025-04-08 10:28:25 +05:30
parent 9147dbb535
commit fe7153f496
10 changed files with 83 additions and 91 deletions

View File

@@ -45,13 +45,10 @@ type PromptGroupResults = {
export async function gatherConfig(
flags: Partial<ProjectConfig>,
): Promise<ProjectConfig> {
// Handle specific dbSetup scenarios to adjust database and ORM before prompts
if (flags.dbSetup) {
if (flags.dbSetup === "turso") {
// Force database to be sqlite when turso is selected
flags.database = "sqlite";
// If orm is explicitly set to prisma, warn and switch to drizzle
if (flags.orm === "prisma") {
log.warn(
pc.yellow(
@@ -61,13 +58,11 @@ export async function gatherConfig(
flags.orm = "drizzle";
}
} else if (flags.dbSetup === "prisma-postgres") {
// Force database and orm for prisma-postgres
flags.database = "postgres";
flags.orm = "prisma";
} else if (flags.dbSetup === "mongodb-atlas") {
// Force database for mongodb-atlas
flags.database = "mongodb";
flags.orm = "prisma"; // MongoDB only works with Prisma
flags.orm = "prisma";
}
}