1import * as Cloudflare from "@/Cloudflare";
2import * as Alchemy from "@/index.ts";
3import * as Effect from "effect/Effect";
4import MyContainerLive from "./container.ts";
5import { Storage } from "./storage.ts";
6import Worker from "./worker.ts";
7
8export default Alchemy.Stack(
9 "EffectfulContainerStack",
10 {
11 providers: Cloudflare.providers(),
12 state: Cloudflare.state(),
13 },
14 Effect.gen(function* () {
15 const worker = yield* Worker;
16 const storage = yield* Storage;
17 // yield* MyContainer.Application
18
19 return {
20 url: worker.url.as<string>(),
21 bucketName: storage.bucketName,
22 };
23 }).pipe(Effect.provide(MyContainerLive)),
24);