The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import * as Drizzle from "@alchemy.run/drizzle"; |
| 2 | import * as GCP from "@alchemy.run/gcp"; |
| 3 | import * as Alchemy from "alchemy"; |
| 4 | import * as Effect from "effect/Effect"; |
| 5 | import * as Layer from "effect/Layer"; |
| 6 | import Api from "./src/Api.ts"; |
| 7 | import { database } from "./src/database.ts"; |
| 8 | import { storePassword } from "./src/password.ts"; |
| 9 | |
| 10 | export const providers = () => |
| 11 | Layer.mergeAll(GCP.providers(), Drizzle.providers(), Alchemy.RandomProvider()); |
| 12 | |
| 13 | export default Alchemy.Stack( |
| 14 | "GcpCloudSqlDrizzleExample", |
| 15 | { providers: providers(), state: Alchemy.localState() }, |
| 16 | Effect.gen(function* () { |
| 17 | const { instance, db, user, passwordSecret } = yield* database; |
| 18 | yield* storePassword; |
| 19 | const api = yield* Api; |
| 20 | return { |
| 21 | url: api.uri, |
| 22 | serviceName: api.name, |
| 23 | instanceName: instance.instanceName, |
| 24 | connectionName: instance.connectionName, |
| 25 | databaseName: db.databaseName, |
| 26 | userName: user.userName, |
| 27 | passwordSecretName: passwordSecret.name, |
| 28 | }; |
| 29 | }), |
| 30 | ); |