@devries-cameron20 / t3code Mirror · read-only
Fork 0

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, 06:00 UTC

main
ts 27 lines 786 Bytes
Raw
1 import * as AWS from "@alchemy.run/aws";
2 import * as Alchemy from "alchemy";
3 import * as Effect from "effect/Effect";
4 import Api from "./src/Api.ts";
5 import { BootstrapDatabase } from "./src/bootstrap.ts";
6 import { Database } from "./src/database.ts";
7
8 export default Alchemy.Stack(
9 "aws-dsql-drizzle",
10 { providers: AWS.providers(), state: Alchemy.localState() },
11 Effect.gen(function* () {
12 const cluster = yield* Database;
13 const api = yield* Api;
14 const schemaVersion = yield* BootstrapDatabase({
15 endpoint: cluster.endpoint,
16 roleArn: api.roleArn,
17 version: "1",
18 });
19 return {
20 url: api.functionUrl,
21 functionName: api.functionName,
22 roleName: api.roleName,
23 clusterId: cluster.clusterId,
24 schemaVersion,
25 };
26 }),
27 );