()
| 392 | * while still making fast mode availability checks work. |
| 393 | */ |
| 394 | export function resolveFastModeStatusFromCache(): void { |
| 395 | if (!isFastModeEnabled()) { |
| 396 | return |
| 397 | } |
| 398 | if (orgStatus.status !== 'pending') { |
| 399 | return |
| 400 | } |
| 401 | const isAnt = process.env.USER_TYPE === 'ant' |
| 402 | const cachedEnabled = getGlobalConfig().penguinModeOrgEnabled === true |
| 403 | orgStatus = |
| 404 | isAnt || cachedEnabled |
| 405 | ? { status: 'enabled' } |
| 406 | : { status: 'disabled', reason: 'unknown' } |
| 407 | } |
| 408 | |
| 409 | export async function prefetchFastModeStatus(): Promise<void> { |
| 410 | // Skip network requests if nonessential traffic is disabled |
no test coverage detected