Let the D1 projection tell D1's client from the SqlClient itself, and rerun the project's tests when a migration changes
Before adoption: this commit came in with the history the project adopted, so no landing records it.
- `ProjectionD1` read an optional `D1Client` service to pick the D1 batch, so its layer type (`SqlClient` only) hid a second need: a D1 `SqlClient` composed without `D1Client` in context would have used `withTransaction`, which dies on D1. It now asks the `SqlClient` for the driver's `TypeId`, which `D1Client.make` puts on the very client `D1Client.layer` provides as `SqlClient`, and writes through that client's `batch`. The layer needs nothing but the `SqlClient`, as issue 309's interface says. - `tsconfig.base.json`: the projection-d1 override also allows `@effect/sql-d1/D1Client#TypeId` (per-path allow-lists are pre-approved, spec §7.3); it still lists `effect/sql` and `#D1Client`. - `turbo.json`: a `@repo/project#test` task (a copy of `test`, since a `package#task` entry replaces it whole) adds `$TURBO_ROOT$/apps/platform/migrations/**` to its inputs. The projection's test checks the migration file against `tables.ts`; before this a migration edit left the test's hash unchanged and `verify` could pass on a cached result. Checked: appending a line to `0001_front_page.sql` changes the task's hash. A tightening. - Small: cursors decode their project as `ProjectName`, and the claim-count helper takes an `AskId`. - Tests: none added. The D1 batch path still does not run in Node (no D1 without a new dependency or a fake that leans on the client's object shape); 310/311 check it live. The 11 tests on sqlite-node pass unchanged.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+27 added−13 removed
- other:+27 added−13 removed