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";
}
}

View File

@@ -16,7 +16,7 @@ export async function getDBSetupChoice(
{
value: "turso" as const,
label: "Turso",
hint: "Cloud SQLite with libSQL",
hint: "SQLite for Production. Powered by libSQL.",
},
{ value: "none" as const, label: "None", hint: "Manual setup" },
];
@@ -25,7 +25,7 @@ export async function getDBSetupChoice(
{
value: "prisma-postgres" as const,
label: "Prisma Postgres",
hint: "Managed by Prisma",
hint: "Instant Postgres for Global Applications",
},
{ value: "none" as const, label: "None", hint: "Manual setup" },
];
@@ -34,7 +34,7 @@ export async function getDBSetupChoice(
{
value: "mongodb-atlas" as const,
label: "MongoDB Atlas",
hint: "Cloud MongoDB service",
hint: "The most effective way to deploy MongoDB",
},
{ value: "none" as const, label: "None", hint: "Manual setup" },
];