mirror of
https://github.com/VibedByKaKi/t3-code-android-nightly.git
synced 2026-10-13 22:07:44 +02:00
25 lines
781 B
TypeScript
25 lines
781 B
TypeScript
import * as Cloudflare from "@/Cloudflare";
|
|
import * as Drizzle from "@/Drizzle";
|
|
import * as Alchemy from "@/index";
|
|
import * as Effect from "effect/Effect";
|
|
import * as Layer from "effect/Layer";
|
|
import D1DrizzleWorker from "./drizzle-worker.ts";
|
|
|
|
/**
|
|
* Schema → migrations → D1 → Worker, all in one stack. Kept in its own file
|
|
* so it can also be driven directly, e.g.
|
|
* `alchemy logs --tail --stage test --config ./test/Cloudflare/D1/fixtures/drizzle-stack.ts`.
|
|
*/
|
|
export default Alchemy.Stack(
|
|
"D1DrizzleStack",
|
|
{
|
|
providers: Layer.mergeAll(Cloudflare.providers(), Drizzle.providers()),
|
|
state: Cloudflare.state(),
|
|
},
|
|
Effect.gen(function* () {
|
|
const worker = yield* D1DrizzleWorker;
|
|
return {
|
|
url: worker.url.as<string>(),
|
|
};
|
|
}),
|
|
);
|