t3-code-android-nightly/.repos/alchemy-effect/packages/alchemy/test/GCP/CloudIdentity/common.ts
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

27 lines
1 KiB
TypeScript

import * as Effect from "effect/Effect";
import { MinimumLogLevel } from "effect/References";
export const logLevel = Effect.provideService(
MinimumLogLevel,
process.env.DEBUG ? "Debug" : "Info",
);
export const customer =
process.env.GCP_CLOUDIDENTITY_CUSTOMER?.trim() || "customers/my_customer";
export const domain = process.env.GCP_CLOUDIDENTITY_DOMAIN?.trim() || undefined;
export const memberEmail =
process.env.GCP_CLOUDIDENTITY_MEMBER?.trim() || undefined;
// Cloud Identity needs a Workspace/Cloud Identity customer: the testing
// project's creates fail with ServiceDisabled "Cloud Identity API has not been used
// in project ... before or it is disabled" (Device: "Request had insufficient
// authentication scopes."). Set GCP_TEST_CLOUDIDENTITY=1 plus the
// GCP_CLOUDIDENTITY_* fixtures on an entitled customer.
export const runLifecycle =
!process.env.FAST && !!process.env.GCP_TEST_CLOUDIDENTITY;
export const runGroupLifecycle = runLifecycle && !!domain;
export const runMembershipLifecycle = runGroupLifecycle && !!memberEmail;