| 1 | import { GcpEnvironment } from "@/GCP/Environment"; |
| 2 | import { MinimumLogLevel } from "effect/References"; |
| 3 | import * as Effect from "effect/Effect"; |
| 4 | |
| 5 | export const logLevel = Effect.provideService( |
| 6 | MinimumLogLevel, |
| 7 | process.env.DEBUG ? "Debug" : "Info", |
| 8 | ); |
| 9 | |
| 10 | export const runLifecycle = !process.env.FAST; |
| 11 | |
| 12 | export const currentProject = GcpEnvironment.current.pipe( |
| 13 | Effect.map((env) => env.project), |
| 14 | ); |
| 15 | |
| 16 | export const location = "us-central1"; |
| 17 | |
| 18 | export const currentParent = currentProject.pipe( |
| 19 | Effect.map((project) => `projects/${project}/locations/${location}`), |
| 20 | ); |