| 1 | import * as Alchemy from "alchemy"; |
| 2 | import * as GCP from "alchemy/GCP"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | import Api from "./src/Api.ts"; |
| 5 | import Auditor from "./src/Auditor.ts"; |
| 6 | import { Shop } from "./src/resources.ts"; |
| 7 | |
| 8 | export default Alchemy.Stack( |
| 9 | "GcpEventarcFirestoreExample", |
| 10 | { providers: GCP.providers(), state: Alchemy.localState() }, |
| 11 | Effect.gen(function* () { |
| 12 | const shop = yield* Shop; |
| 13 | const api = yield* Api; |
| 14 | const auditor = yield* Auditor; |
| 15 | |
| 16 | return { |
| 17 | url: api.uri, |
| 18 | auditorService: auditor.serviceId, |
| 19 | project: shop.project, |
| 20 | databaseId: shop.databaseId, |
| 21 | databaseName: shop.name, |
| 22 | }; |
| 23 | }), |
| 24 | ); |