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
| 1 | import * as GCP from "@alchemy.run/gcp"; |
| 2 | import * as Effect from "effect/Effect"; |
| 3 | import { serveProbes } from "../../bindingHost.ts"; |
| 4 | import { lifecycleAppId } from "../common.ts"; |
| 5 | |
| 6 | /** Debug token registered on the `GCP_TEST_FIREBASE_APP_ID` app. */ |
| 7 | export const Local = GCP.FirebaseAppCheck.AppsDebugToken("Local", { |
| 8 | app: lifecycleAppId ?? "", |
| 9 | displayName: "alchemy-exchange", |
| 10 | }); |
| 11 | |
| 12 | /** |
| 13 | * Effect-native Cloud Run service exercising every App Check binding as its |
| 14 | * own runtime service account. Deployed from {@link ../Bindings.test.ts}. |
| 15 | */ |
| 16 | export default class AppCheckBindingsHost extends GCP.Function<AppCheckBindingsHost>()( |
| 17 | "AppCheckBindingsHost", |
| 18 | { main: import.meta.url, invokerIamDisabled: true }, |
| 19 | Effect.gen(function* () { |
| 20 | const exchange = yield* GCP.FirebaseAppCheck.ExchangeDebugToken(yield* Local); |
| 21 | |
| 22 | return { |
| 23 | fetch: serveProbes({ |
| 24 | exchangeDebugToken: exchange(), |
| 25 | }), |
| 26 | }; |
| 27 | }).pipe(Effect.provide(GCP.FirebaseAppCheck.ExchangeDebugTokenHttp)), |
| 28 | ) {} |