Skip to content

armgit / crm

Public Imported from GitHub
0

Comp AI CRM is an open source, CRM designed for AI agents. Agentic-first CRM.

TypeScript

Move the codegen rationale out of turbo.json

Lewis Carhart9a8386630901
diff --git a/apps/api/turbo.json b/apps/api/turbo.json
index e68e9122..22bedcc0 100644
--- a/apps/api/turbo.json
+++ b/apps/api/turbo.json
@@ -2,7 +2,6 @@
"$schema": "https://turborepo.dev/schema.json",
"extends": ["//"],
"tasks": {
- "//": "`build` deliberately does not depend on `trpc:generate`. The generator ships a native binary that needs GLIBC 2.39, which Vercel's build image does not have, so running it there fails the deploy. `src/generated/server.ts` is committed for exactly this reason (see .gitignore) and is what a build consumes. Drift is caught by `check-types`, which still regenerates first, and by `bun run dev`, which keeps the generator in watch mode.",
"build": {
"dependsOn": ["$TURBO_EXTENDS$"],
"outputs": ["dist/**"]
diff --git a/docs/api.md b/docs/api.md
index 3193c1ef..30ee741c 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -75,6 +75,13 @@ Everything the app reads or writes goes through `nestjs-trpc` routers under
the app imports as `type { AppRouter } from "api/app-router"`. `bun run dev`
keeps it in watch mode. If the app cannot see a new procedure, the generator
has not run.
+- **`src/generated/server.ts` is committed, and `build` must never regenerate
+ it.** The generator ships a native binary that needs GLIBC 2.39 — newer than
+ Vercel's build image — so a `build` task that depends on `trpc:generate` fails
+ every deploy. That is why `apps/api/.gitignore` ignores `src/generated/*` with
+ a `!src/generated/server.ts` exception, and why only `check-types` and `dev`
+ run the generator. Regenerate locally and commit the result with the router
+ change that caused it.
## Freshness: invalidate the query, don't disable the cache