turso migration

This commit is contained in:
Devin Zuczek
2026-09-27 15:38:52 -04:00
parent b32b16c1f0
commit 3f2cf2e700
34 changed files with 946 additions and 49 deletions
+4
View File
@@ -37,6 +37,10 @@
- Syncpack ensures dependency version consistency
- Turborepo enables parallel task execution and caching
- Workers configured via `wrangler.jsonc` with environment variables
- The shared `recflare` database is D1 by default, or a libSQL server (Turso) when
`LIBSQL_DB_URL` is set: `withDatabase` (`packages/domain/src/libsql-db.ts`) wraps each
worker's default export and swaps `env.DB` for an adapter with the D1 API, so query code
only ever sees `D1Database`. Migrations and `runx` tooling follow the same switch.
- Each worker has `context.ts` for typed environment bindings
- Integration tests in `src/test/integration/`
- Workers use `nodejs_compat` compatibility flag