mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
dont allow examples when api is none (#243)
This commit is contained in:
@@ -299,17 +299,8 @@ const analyzeStackCompatibility = (stack: StackState): CompatibilityResult => {
|
||||
message: "Runtime set to 'Bun' (None is only for Convex)",
|
||||
});
|
||||
}
|
||||
if (nextStack.api === "none") {
|
||||
notes.api.notes.push(
|
||||
"API 'None' is only for Convex. Defaulting to 'tRPC'.",
|
||||
);
|
||||
notes.api.hasIssue = true;
|
||||
nextStack.api = DEFAULT_STACK.api;
|
||||
changed = true;
|
||||
changes.push({
|
||||
category: "api",
|
||||
message: "API set to 'tRPC' (None is only for Convex)",
|
||||
});
|
||||
if (nextStack.api === "none" && (isConvex || isBackendNone)) {
|
||||
} else if (nextStack.api === "none" && !(isConvex || isBackendNone)) {
|
||||
}
|
||||
|
||||
if (nextStack.database === "none") {
|
||||
@@ -1047,11 +1038,13 @@ const StackArchitect = () => {
|
||||
}
|
||||
|
||||
if (catKey === "api") {
|
||||
if (techId === "none" && !rules.isConvex) {
|
||||
if (techId !== "none" && (rules.isConvex || rules.isBackendNone)) {
|
||||
addRule(
|
||||
category,
|
||||
techId,
|
||||
"Disabled: API 'None' is only available with Convex backend.",
|
||||
rules.isConvex
|
||||
? "Disabled: Convex backend requires API to be 'None'."
|
||||
: "Disabled: No backend requires API to be 'None'.",
|
||||
);
|
||||
}
|
||||
if (techId === "trpc" && rules.hasNuxtOrSvelteOrSolid) {
|
||||
|
||||
@@ -15,6 +15,13 @@ export const TECH_OPTIONS = {
|
||||
icon: "/icon/orpc.svg",
|
||||
color: "from-indigo-400 to-indigo-600",
|
||||
},
|
||||
{
|
||||
id: "none",
|
||||
name: "No API",
|
||||
description: "No API layer (API routes disabled)",
|
||||
icon: "🚫",
|
||||
color: "from-gray-400 to-gray-600",
|
||||
},
|
||||
],
|
||||
frontend: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user