add workers support for tanstack start (#369)

This commit is contained in:
Aman Varshney
2025-07-06 16:32:13 +05:30
committed by GitHub
parent 79479e01f5
commit 0ae1347e9d
11 changed files with 252 additions and 254 deletions

View File

@@ -1,174 +1,143 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://better-t-stack.dev/schema.json",
"title": "Better-T-Stack Configuration",
"description": "Configuration file for Better-T-Stack projects",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "JSON Schema reference for validation"
},
"version": {
"type": "string",
"description": "CLI version used to create this project",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the project was created"
},
"database": {
"type": "string",
"enum": [
"none",
"sqlite",
"postgres",
"mysql",
"mongodb"
],
"description": "Database type"
},
"orm": {
"type": "string",
"enum": [
"drizzle",
"prisma",
"mongoose",
"none"
],
"description": "ORM type"
},
"backend": {
"type": "string",
"enum": [
"hono",
"express",
"fastify",
"next",
"elysia",
"convex",
"none"
],
"description": "Backend framework"
},
"runtime": {
"type": "string",
"enum": [
"bun",
"node",
"workers",
"none"
],
"description": "Runtime environment (workers only available with hono backend and drizzle orm)"
},
"frontend": {
"type": "array",
"items": {
"type": "string",
"enum": [
"tanstack-router",
"react-router",
"tanstack-start",
"next",
"nuxt",
"native-nativewind",
"native-unistyles",
"svelte",
"solid",
"none"
]
},
"description": "Frontend framework"
},
"addons": {
"type": "array",
"items": {
"type": "string",
"enum": [
"pwa",
"tauri",
"starlight",
"biome",
"husky",
"turborepo",
"none"
]
},
"description": "Additional addons"
},
"examples": {
"type": "array",
"items": {
"type": "string",
"enum": [
"todo",
"ai",
"none"
]
},
"description": "Example templates to include"
},
"auth": {
"type": "boolean",
"description": "Whether authentication is enabled"
},
"packageManager": {
"type": "string",
"enum": [
"npm",
"pnpm",
"bun"
],
"description": "Package manager"
},
"dbSetup": {
"type": "string",
"enum": [
"turso",
"neon",
"prisma-postgres",
"mongodb-atlas",
"supabase",
"d1",
"none"
],
"description": "Database hosting setup"
},
"api": {
"type": "string",
"enum": [
"trpc",
"orpc",
"none"
],
"description": "API type"
},
"webDeploy": {
"type": "string",
"enum": [
"workers",
"none"
],
"description": "Web deployment"
}
},
"required": [
"version",
"createdAt",
"database",
"orm",
"backend",
"runtime",
"frontend",
"addons",
"examples",
"auth",
"packageManager",
"dbSetup",
"api",
"webDeploy"
],
"additionalProperties": false
}
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://better-t-stack.dev/schema.json",
"title": "Better-T-Stack Configuration",
"description": "Configuration file for Better-T-Stack projects",
"type": "object",
"properties": {
"$schema": {
"type": "string",
"description": "JSON Schema reference for validation"
},
"version": {
"type": "string",
"description": "CLI version used to create this project",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"createdAt": {
"type": "string",
"format": "date-time",
"description": "Timestamp when the project was created"
},
"database": {
"type": "string",
"enum": ["none", "sqlite", "postgres", "mysql", "mongodb"],
"description": "Database type"
},
"orm": {
"type": "string",
"enum": ["drizzle", "prisma", "mongoose", "none"],
"description": "ORM type"
},
"backend": {
"type": "string",
"enum": [
"hono",
"express",
"fastify",
"next",
"elysia",
"convex",
"none"
],
"description": "Backend framework"
},
"runtime": {
"type": "string",
"enum": ["bun", "node", "workers", "none"],
"description": "Runtime environment (workers only available with hono backend and drizzle orm)"
},
"frontend": {
"type": "array",
"items": {
"type": "string",
"enum": [
"tanstack-router",
"react-router",
"tanstack-start",
"next",
"nuxt",
"native-nativewind",
"native-unistyles",
"svelte",
"solid",
"none"
]
},
"description": "Frontend framework"
},
"addons": {
"type": "array",
"items": {
"type": "string",
"enum": [
"pwa",
"tauri",
"starlight",
"biome",
"husky",
"turborepo",
"none"
]
},
"description": "Additional addons"
},
"examples": {
"type": "array",
"items": {
"type": "string",
"enum": ["todo", "ai", "none"]
},
"description": "Example templates to include"
},
"auth": {
"type": "boolean",
"description": "Whether authentication is enabled"
},
"packageManager": {
"type": "string",
"enum": ["npm", "pnpm", "bun"],
"description": "Package manager"
},
"dbSetup": {
"type": "string",
"enum": [
"turso",
"neon",
"prisma-postgres",
"mongodb-atlas",
"supabase",
"d1",
"none"
],
"description": "Database hosting setup"
},
"api": {
"type": "string",
"enum": ["trpc", "orpc", "none"],
"description": "API type"
},
"webDeploy": {
"type": "string",
"enum": ["workers", "none"],
"description": "Web deployment"
}
},
"required": [
"version",
"createdAt",
"database",
"orm",
"backend",
"runtime",
"frontend",
"addons",
"examples",
"auth",
"packageManager",
"dbSetup",
"api",
"webDeploy"
],
"additionalProperties": false
}

View File

@@ -802,28 +802,6 @@ const analyzeStackCompatibility = (stack: StackState): CompatibilityResult => {
if (nextStack.examples.length !== originalExamplesLength)
changed = true;
}
// Web deploy compatibility: Workers not supported with TanStack Start
if (
nextStack.webDeploy === "workers" &&
nextStack.webFrontend.includes("tanstack-start")
) {
notes.webDeploy.notes.push(
"Cloudflare Workers deployment is not supported with TanStack Start. It will be set to 'None'.",
);
notes.webFrontend.notes.push(
"TanStack Start is not compatible with Cloudflare Workers deployment.",
);
notes.webDeploy.hasIssue = true;
notes.webFrontend.hasIssue = true;
nextStack.webDeploy = "none";
changed = true;
changes.push({
category: "webDeploy",
message:
"Web deployment set to 'None' (Workers not compatible with TanStack Start)",
});
}
}
}