cli: organize file structure

This commit is contained in:
Aman Varshney
2025-05-26 00:13:08 +05:30
parent b9c9690e61
commit 1e9c6b2210
40 changed files with 900 additions and 928 deletions

View File

@@ -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: [
{