| 1 | import * as Alchemy from "alchemy"; |
| 2 | import * as GCP from "alchemy/GCP"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | import Gateway from "./src/Gateway.ts"; |
| 5 | import Quotes from "./src/Quotes.ts"; |
| 6 | |
| 7 | export default Alchemy.Stack( |
| 8 | "GcpServiceToServiceExample", |
| 9 | { providers: GCP.providers(), state: Alchemy.localState() }, |
| 10 | Effect.gen(function* () { |
| 11 | const quotes = yield* Quotes; |
| 12 | const gateway = yield* Gateway; |
| 13 | |
| 14 | return { |
| 15 | url: gateway.uri, |
| 16 | gatewayName: gateway.name, |
| 17 | gatewayServiceAccount: gateway.serviceAccount, |
| 18 | quotesUrl: quotes.uri, |
| 19 | quotesName: quotes.name, |
| 20 | }; |
| 21 | }), |
| 22 | ); |