mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
update deps
fix types error
This commit is contained in:
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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" },
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user