1import * as Alchemy from "alchemy";
2import * as GCP from "alchemy/GCP";
3import * as Effect from "effect/Effect";
4import Api from "./src/Api.ts";
5import Indexer from "./src/Indexer.ts";
6import { Files, Uploads } from "./src/resources.ts";
7
8export default Alchemy.Stack(
9 "GcpStorageUploadsExample",
10 { providers: GCP.providers(), state: Alchemy.localState() },
11 Effect.gen(function* () {
12 const bucket = yield* Uploads;
13 const database = yield* Files;
14 const api = yield* Api;
15 const indexer = yield* Indexer;
16
17 return {
18 url: api.uri,
19 indexerUrl: indexer.uri,
20 location: api.location,
21 bucketName: bucket.bucketName,
22 databaseName: database.name,
23 };
24 }),
25);