fix(cli): add cloudflare workers types in apps/server when server deploy is alchemy

This commit is contained in:
Aman Varshney
2025-08-23 06:37:15 +05:30
parent a37827047c
commit 921560aa6f
3 changed files with 10 additions and 3 deletions

View File

@@ -136,7 +136,7 @@ export const dependencyVersionMap = {
"@opennextjs/cloudflare": "^1.3.0",
"nitro-cloudflare-dev": "^0.2.2",
"@sveltejs/adapter-cloudflare": "^7.2.1",
"@cloudflare/workers-types": "^4.20250813.0",
"@cloudflare/workers-types": "^4.20250822.0",
alchemy: "^0.62.1",
// temporary workaround for alchemy + tanstack start

View File

@@ -83,7 +83,13 @@ export async function setupAlchemyServerDeploy(
if (!(await fs.pathExists(serverDir))) return;
await addPackageDependency({
devDependencies: ["alchemy", "wrangler", "@types/node", "dotenv"],
devDependencies: [
"alchemy",
"wrangler",
"@types/node",
"dotenv",
"@cloudflare/workers-types",
],
projectDir: serverDir,
});

View File

@@ -22,7 +22,8 @@
{{else}}
"node",
"bun"
{{/if}}
{{/if}}{{#if (eq serverDeploy "alchemy")}},
"@cloudflare/workers-types"{{/if}}
]{{#unless (or (eq backend "convex") (eq backend "none"))}},
"composite": true{{/unless}},
"jsx": "react-jsx"{{#if (eq backend "hono")}},