The best way to control Claude Code, Codex and more from any computer or phone

main
ts 26 lines 1.03 KB
Raw
1 // Deep imports keep the Compute bundle lean: the `@/Prisma` barrel pulls in
2 // the local dev-database machinery (@prisma/dev -> pglite), which balloons
3 // the bundle and has no business inside a deployed app.
4 import { Bucket } from "@alchemy.run/prisma/Bucket";
5 import { Project } from "@alchemy.run/prisma/Project";
6 import * as Effect from "effect/Effect";
7
8 /**
9 * Project owning the shared bucket. No default database is created — the
10 * binding suite only needs Object Store.
11 */
12 export const TestProject = Project("PrismaBucketBindingProject", {
13 name: "alchemy-bucket-binding",
14 createDatabase: false,
15 });
16
17 /**
18 * Shared Prisma Object Store bucket bound by all three binding-test Compute
19 * apps (read / write / read-write). Because every app binds this same bucket,
20 * a value written through the Write app is observable by the Read app — which
21 * is what the test asserts.
22 */
23 export const TestBucket = Effect.gen(function* () {
24 const project = yield* TestProject;
25 return yield* Bucket("PrismaBucketBindingTestBucket", { project });
26 });