mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
fix (#555)
This commit is contained in:
@@ -1004,6 +1004,24 @@ const analyzeStackCompatibility = (stack: StackState): CompatibilityResult => {
|
||||
}
|
||||
}
|
||||
|
||||
if (nextStack.runtime === "workers" && nextStack.serverDeploy === "none") {
|
||||
notes.runtime.notes.push(
|
||||
"Cloudflare Workers runtime requires a server deployment. Wrangler will be selected.",
|
||||
);
|
||||
notes.serverDeploy.notes.push(
|
||||
"Cloudflare Workers runtime requires a server deployment. Wrangler will be selected.",
|
||||
);
|
||||
notes.runtime.hasIssue = true;
|
||||
notes.serverDeploy.hasIssue = true;
|
||||
nextStack.serverDeploy = "wrangler";
|
||||
changed = true;
|
||||
changes.push({
|
||||
category: "serverDeploy",
|
||||
message:
|
||||
"Server deployment set to 'Wrangler' (Cloudflare Workers runtime requires a server deployment)",
|
||||
});
|
||||
}
|
||||
|
||||
const webFrontendsSelected = nextStack.webFrontend.some((f) => f !== "none");
|
||||
if (!webFrontendsSelected && nextStack.webDeploy !== "none") {
|
||||
notes.webDeploy.notes.push(
|
||||
@@ -1492,6 +1510,10 @@ const StackBuilder = () => {
|
||||
category: keyof typeof TECH_OPTIONS,
|
||||
techId: string,
|
||||
) => {
|
||||
if (!isOptionCompatible(stack, category, techId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
setStack((currentStack) => {
|
||||
const catKey = category as keyof StackState;
|
||||
const update: Partial<StackState> = {};
|
||||
@@ -1689,6 +1711,46 @@ const StackBuilder = () => {
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
category === "backend" &&
|
||||
finalStack.runtime === "workers" &&
|
||||
optionId !== "hono"
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
category === "runtime" &&
|
||||
optionId === "workers" &&
|
||||
finalStack.backend !== "hono"
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
category === "orm" &&
|
||||
finalStack.database === "none" &&
|
||||
optionId !== "none"
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
category === "database" &&
|
||||
optionId !== "none" &&
|
||||
finalStack.orm === "none"
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
category === "serverDeploy" &&
|
||||
finalStack.runtime === "workers" &&
|
||||
optionId === "none"
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
category === "webFrontend" ||
|
||||
category === "nativeFrontend" ||
|
||||
|
||||
Reference in New Issue
Block a user