t3-code-android-nightly/.repos/alchemy-effect/packages/alchemy/test/Prisma/fixtures/stack.ts
Julius Marminge e3c85ead63
chore(refs): sync Effect and Alchemy references to rc.115 and beta.78 (#12327)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-09-17 23:21:25 -07:00

35 lines
1.3 KiB
TypeScript

import * as Prisma from "@/Prisma";
import * as Alchemy from "@/index.ts";
import * as Effect from "effect/Effect";
import ReadCompute from "./read-compute.ts";
import ReadWriteCompute from "./readwrite-compute.ts";
import WriteCompute from "./write-compute.ts";
/**
* Deploys three Prisma Compute apps that all bind one shared Prisma Object
* Store bucket — read / write / read-write. Extracted into its own stack file
* so it can be deployed by the test suite AND inspected directly, e.g.
*
* ```sh
* alchemy logs --tail --stage test --config ./test/Prisma/fixtures/stack.ts
* ```
*
* State is file-local (`.alchemy/` on the runner) — a Prisma-only suite must
* not require another cloud's credentials just to store state, and the Prisma
* Compute live smoke likewise keeps its state out of the cloud. An
* interrupted run's resources stay reclaimable from the same checkout.
*/
export default Alchemy.Stack(
"PrismaBucketBindingStack",
{ providers: Prisma.providers(), state: Alchemy.localState() },
Effect.gen(function* () {
const read = yield* ReadCompute;
const write = yield* WriteCompute;
const readWrite = yield* ReadWriteCompute;
return {
read: read.url.as<string>(),
write: write.url.as<string>(),
readWrite: readWrite.url.as<string>(),
};
}),
);