| 1 | import * as Effect from "effect/Effect"; |
| 2 | import { MinimumLogLevel } from "effect/References"; |
| 3 | |
| 4 | export const logLevel = Effect.provideService( |
| 5 | MinimumLogLevel, |
| 6 | process.env.DEBUG ? "Debug" : "Info", |
| 7 | ); |
| 8 | |
| 9 | export const applicationId = |
| 10 | process.env.GCP_GAMESCONFIGURATION_APPLICATION_ID?.trim() || |
| 11 | process.env.GCP_GAMES_APPLICATION_ID?.trim() || |
| 12 | process.env.GCP_PLAY_GAMES_APPLICATION_ID?.trim(); |
| 13 | |
| 14 | export const probeApplicationId = applicationId ?? "1"; |
| 15 | |
| 16 | // The cloud-platform token of the testing profile lacks the Play Games |
| 17 | // scope, so without an application every call is rejected with Forbidden |
| 18 | // ("Request had insufficient authentication scopes."). |
| 19 | export const missingTag = applicationId ? "NotFound" : "Forbidden"; |