()
| 33 | * - CircleCI: `CIRCLECI` + `NPM_ID_TOKEN` |
| 34 | */ |
| 35 | export function detectOidcProvider(): 'github-actions' | 'gitlab' | 'circleci' | null { |
| 36 | if (process.env.ACTIONS_ID_TOKEN_REQUEST_URL) return 'github-actions'; |
| 37 | if (process.env.GITLAB_CI && process.env.NPM_ID_TOKEN) return 'gitlab'; |
| 38 | if (process.env.CIRCLECI && process.env.NPM_ID_TOKEN) return 'circleci'; |
| 39 | return null; |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Returns true when OIDC trusted publishing is the only available npm auth path: |
no outgoing calls
no test coverage detected
searching dependent graphs…