( principalSource: PrincipalSource, )
| 19 | import type { PrincipalSource } from '../../auth/runtime/types.js'; |
| 20 | |
| 21 | export function shouldWarnSetupTokenForPrincipalSource( |
| 22 | principalSource: PrincipalSource, |
| 23 | ): boolean { |
| 24 | return ( |
| 25 | principalSource === 'direct_api_key_env' || |
| 26 | principalSource === 'api_key_helper' || |
| 27 | principalSource === 'service_oauth_env' || |
| 28 | principalSource === 'service_oauth_fd' || |
| 29 | principalSource === 'service_api_key_fd' || |
| 30 | principalSource === 'external_bearer_compat' |
| 31 | ); |
| 32 | } |
| 33 | |
| 34 | export function shouldShowSetupTokenAuthWarning(): boolean { |
| 35 | return shouldWarnSetupTokenForPrincipalSource( |
no outgoing calls
no test coverage detected