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,12 +1,12 @@
import { cancel, isCancel, select } from "@clack/prompts";
import pc from "picocolors";
import type { ProjectApi, ProjectBackend, ProjectFrontend } from "../types";
import type { API, Backend, Frontend } from "../types";
export async function getApiChoice(
Api?: ProjectApi | undefined,
frontend?: ProjectFrontend[],
backend?: ProjectBackend,
): Promise<ProjectApi> {
Api?: API | undefined,
frontend?: Frontend[],
backend?: Backend,
): Promise<API> {
if (backend === "convex" || backend === "none") {
return "none";
}
@@ -52,7 +52,7 @@ export async function getApiChoice(
];
}
const apiType = await select<ProjectApi>({
const apiType = await select<API>({
message: "Select API type",
options: apiOptions,
initialValue: apiOptions[0].value,