export const DEEPLINE_V2_INFRA_MODE_ENV = 'DEEPLINE_V2_INFRA_MODE'; function currentRuntimeInfraMode(): string { return process.env[DEEPLINE_V2_INFRA_MODE_ENV]?.trim().toLowerCase() ?? ''; } export function isPreviewPlaysDeployment(): boolean { const mode = currentRuntimeInfraMode(); return ( mode === 'external' || mode === 'preview' || mode === 'absurd-preview' || mode === 'absurd:preview' ); } export function isCloudflarePlaysDeployment(): boolean { return currentRuntimeInfraMode() === 'cloudflare'; } export function requiresPublicCallbackBaseUrl(): boolean { return isPreviewPlaysDeployment() || isCloudflarePlaysDeployment(); }