This commit is contained in:
Aman Varshney
2025-08-31 17:53:17 +05:30
committed by GitHub
parent bae99c3069
commit 0fbb7ef7bf

View File

@@ -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"); const webFrontendsSelected = nextStack.webFrontend.some((f) => f !== "none");
if (!webFrontendsSelected && nextStack.webDeploy !== "none") { if (!webFrontendsSelected && nextStack.webDeploy !== "none") {
notes.webDeploy.notes.push( notes.webDeploy.notes.push(
@@ -1492,6 +1510,10 @@ const StackBuilder = () => {
category: keyof typeof TECH_OPTIONS, category: keyof typeof TECH_OPTIONS,
techId: string, techId: string,
) => { ) => {
if (!isOptionCompatible(stack, category, techId)) {
return;
}
setStack((currentStack) => { setStack((currentStack) => {
const catKey = category as keyof StackState; const catKey = category as keyof StackState;
const update: Partial<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 ( if (
category === "webFrontend" || category === "webFrontend" ||
category === "nativeFrontend" || category === "nativeFrontend" ||