The best way to control Claude Code, Codex and more from any computer or phone

main
ts 15 lines 622 Bytes
Raw
1 import * as Effect from "effect/Effect";
2 import * as FileSystem from "effect/FileSystem";
3 import * as Floci from "./Floci.ts";
4
5 /**
6 * `alchemy dev` trusts the local AWS emulator's CA bundle, once it has been
7 * downloaded, so SDK clients in the dev process and its sidecars accept the
8 * emulator's TLS certificate.
9 */
10 export const devEnv = Effect.gen(function* () {
11 const fs = yield* FileSystem.FileSystem;
12 const hasCa = yield* fs.exists(Floci.FLOCI_CA_PATH).pipe(Effect.orElseSucceed(() => false));
13 const env: Record<string, string> = hasCa ? { NODE_EXTRA_CA_CERTS: Floci.FLOCI_CA_PATH } : {};
14 return env;
15 });