fix(cli): force todo example when convex is selected

This commit is contained in:
Aman Varshney
2025-09-01 23:38:20 +05:30
parent 45119d2d68
commit ab88b7fa68
2 changed files with 11 additions and 7 deletions

View File

@@ -14,10 +14,14 @@ export async function getExamplesChoice(
backend?: Backend, backend?: Backend,
api?: API, api?: API,
): Promise<Examples[]> { ): Promise<Examples[]> {
if (examples !== undefined) return examples;
if (api === "none") { if (api === "none") {
if (backend === "convex") {
return ["todo"];
}
return []; return [];
} }
if (examples !== undefined) return examples;
if (backend === "convex") { if (backend === "convex") {
return ["todo"]; return ["todo"];

View File

@@ -1004,7 +1004,7 @@ describe("create-better-t-stack smoke", () => {
"--backend", "--backend",
"none", "none",
"--runtime", "--runtime",
"bun", "none",
"--database", "--database",
"none", "none",
"--orm", "--orm",
@@ -1053,7 +1053,7 @@ describe("create-better-t-stack smoke", () => {
"--backend", "--backend",
"none", "none",
"--runtime", "--runtime",
"bun", "none",
"--database", "--database",
"none", "none",
"--orm", "--orm",
@@ -1102,7 +1102,7 @@ describe("create-better-t-stack smoke", () => {
"--backend", "--backend",
"none", "none",
"--runtime", "--runtime",
"bun", "none",
"--database", "--database",
"none", "none",
"--orm", "--orm",
@@ -1151,7 +1151,7 @@ describe("create-better-t-stack smoke", () => {
"--backend", "--backend",
"none", "none",
"--runtime", "--runtime",
"bun", "none",
"--database", "--database",
"none", "none",
"--orm", "--orm",
@@ -1200,7 +1200,7 @@ describe("create-better-t-stack smoke", () => {
"--backend", "--backend",
"none", "none",
"--runtime", "--runtime",
"bun", "none",
"--database", "--database",
"none", "none",
"--orm", "--orm",
@@ -3697,7 +3697,7 @@ describe("create-better-t-stack smoke", () => {
"--backend", "--backend",
"none", "none",
"--runtime", "--runtime",
"bun", "none",
"--web-deploy", "--web-deploy",
"wrangler", "wrangler",
"--server-deploy", "--server-deploy",