t3-code-android-nightly/.repos/alchemy-effect/packages/alchemy/test/SQL/fixtures/d1-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

23 lines
640 B
TypeScript

import * as Cloudflare from "@/Cloudflare/index.ts";
import * as Alchemy from "@/index.ts";
import * as Effect from "effect/Effect";
import SqlD1Worker from "./d1-worker.ts";
/**
* D1 database + Worker for the `SQL.D1` client suite. Kept in its own file
* so it can also be driven directly, e.g.
* `alchemy logs --tail --stage test --config ./test/SQL/fixtures/d1-stack.ts`.
*/
export default Alchemy.Stack(
"SqlD1Stack",
{
providers: Cloudflare.providers(),
state: Cloudflare.state(),
},
Effect.gen(function* () {
const worker = yield* SqlD1Worker;
return {
url: worker.url.as<string>(),
};
}),
);