| 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 | // Product Search is closed to new projects: creates fail with BadRequest |
| 11 | // "Product Search doesn't onboard new projects. For image search, please use |
| 12 | // Vision Warehouse". Set GCP_TEST_VISION_PRODUCT_SEARCH=1 on a project that was |
| 13 | // onboarded before the cutoff to run the lifecycles. |
| 14 | export const runLifecycle = !!process.env.GCP_TEST_VISION_PRODUCT_SEARCH; |
| 15 | |
| 16 | export const currentProject = GcpEnvironment.current.pipe( |
| 17 | Effect.map((env) => env.project), |
| 18 | ); |
| 19 | |
| 20 | export const location = "us-west1"; |