| 1 | import * as Cloudflare from "@/Cloudflare"; |
| 2 | import * as Alchemy from "@/index.ts"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | import HostReachContainerWorker from "./worker.ts"; |
| 5 | |
| 6 | /** |
| 7 | * Dev-only stack proving a container can reach services listening on the |
| 8 | * developer's machine (the topology of every local dev database). Owns its |
| 9 | * own fixture identity so it never shares state with the other container |
| 10 | * suites when files run concurrently. |
| 11 | */ |
| 12 | export const state = Alchemy.inMemoryState(); |
| 13 | |
| 14 | export default Alchemy.Stack( |
| 15 | "HostReachContainerStack", |
| 16 | { providers: Cloudflare.providers(), state }, |
| 17 | Effect.gen(function* () { |
| 18 | const worker = yield* HostReachContainerWorker; |
| 19 | return { url: worker.url.as<string>() }; |
| 20 | }), |
| 21 | ); |