@@ -1004,6 +1004,24 @@ const analyzeStackCompatibility = (stack: StackState): CompatibilityResult => {
1004
1004
}
1005
1005
}
1006
1006
1007
+ if ( nextStack . runtime === "workers" && nextStack . serverDeploy === "none" ) {
1008
+ notes . runtime . notes . push (
1009
+ "Cloudflare Workers runtime requires a server deployment. Wrangler will be selected." ,
1010
+ ) ;
1011
+ notes . serverDeploy . notes . push (
1012
+ "Cloudflare Workers runtime requires a server deployment. Wrangler will be selected." ,
1013
+ ) ;
1014
+ notes . runtime . hasIssue = true ;
1015
+ notes . serverDeploy . hasIssue = true ;
1016
+ nextStack . serverDeploy = "wrangler" ;
1017
+ changed = true ;
1018
+ changes . push ( {
1019
+ category : "serverDeploy" ,
1020
+ message :
1021
+ "Server deployment set to 'Wrangler' (Cloudflare Workers runtime requires a server deployment)" ,
1022
+ } ) ;
1023
+ }
1024
+
1007
1025
const webFrontendsSelected = nextStack . webFrontend . some ( ( f ) => f !== "none" ) ;
1008
1026
if ( ! webFrontendsSelected && nextStack . webDeploy !== "none" ) {
1009
1027
notes . webDeploy . notes . push (
@@ -1492,6 +1510,10 @@ const StackBuilder = () => {
1492
1510
category : keyof typeof TECH_OPTIONS ,
1493
1511
techId : string ,
1494
1512
) => {
1513
+ if ( ! isOptionCompatible ( stack , category , techId ) ) {
1514
+ return ;
1515
+ }
1516
+
1495
1517
setStack ( ( currentStack ) => {
1496
1518
const catKey = category as keyof StackState ;
1497
1519
const update : Partial < StackState > = { } ;
@@ -1689,6 +1711,46 @@ const StackBuilder = () => {
1689
1711
}
1690
1712
}
1691
1713
1714
+ if (
1715
+ category === "backend" &&
1716
+ finalStack . runtime === "workers" &&
1717
+ optionId !== "hono"
1718
+ ) {
1719
+ return false ;
1720
+ }
1721
+
1722
+ if (
1723
+ category === "runtime" &&
1724
+ optionId === "workers" &&
1725
+ finalStack . backend !== "hono"
1726
+ ) {
1727
+ return false ;
1728
+ }
1729
+
1730
+ if (
1731
+ category === "orm" &&
1732
+ finalStack . database === "none" &&
1733
+ optionId !== "none"
1734
+ ) {
1735
+ return false ;
1736
+ }
1737
+
1738
+ if (
1739
+ category === "database" &&
1740
+ optionId !== "none" &&
1741
+ finalStack . orm === "none"
1742
+ ) {
1743
+ return false ;
1744
+ }
1745
+
1746
+ if (
1747
+ category === "serverDeploy" &&
1748
+ finalStack . runtime === "workers" &&
1749
+ optionId === "none"
1750
+ ) {
1751
+ return false ;
1752
+ }
1753
+
1692
1754
if (
1693
1755
category === "webFrontend" ||
1694
1756
category === "nativeFrontend" ||
0 commit comments