| 1 | import * as ACME from "@/ACME"; |
| 2 | import * as Cloudflare from "@/Cloudflare"; |
| 3 | import * as Alchemy from "@/index"; |
| 4 | import * as Effect from "effect/Effect"; |
| 5 | import * as Layer from "effect/Layer"; |
| 6 | import AcmeIssueWorker from "./issue-worker.ts"; |
| 7 | |
| 8 | export default Alchemy.Stack( |
| 9 | "AcmeIssueStack", |
| 10 | { |
| 11 | providers: Layer.mergeAll(Cloudflare.providers(), ACME.providers()), |
| 12 | state: Cloudflare.state(), |
| 13 | }, |
| 14 | Effect.gen(function* () { |
| 15 | const worker = yield* AcmeIssueWorker; |
| 16 | return { url: worker.url.as<string>() }; |
| 17 | }), |
| 18 | ); |