mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
cli: organize file structure
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
import { cancel, isCancel, select } from "@clack/prompts";
|
||||
import pc from "picocolors";
|
||||
import { DEFAULT_CONFIG } from "../constants";
|
||||
import type { ProjectBackend, ProjectDatabase } from "../types";
|
||||
import type { Backend, Database } from "../types";
|
||||
|
||||
export async function getDatabaseChoice(
|
||||
database?: ProjectDatabase,
|
||||
backend?: ProjectBackend,
|
||||
): Promise<ProjectDatabase> {
|
||||
database?: Database,
|
||||
backend?: Backend,
|
||||
): Promise<Database> {
|
||||
if (backend === "convex" || backend === "none") {
|
||||
return "none";
|
||||
}
|
||||
|
||||
if (database !== undefined) return database;
|
||||
|
||||
const response = await select<ProjectDatabase>({
|
||||
const response = await select<Database>({
|
||||
message: "Select database",
|
||||
options: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user