(token: string)
| 25 | } |
| 26 | |
| 27 | function resolveProjectContext(token: string): { |
| 28 | projectId?: string; |
| 29 | teamId?: string; |
| 30 | } { |
| 31 | const claims = parseOidcToken(token); |
| 32 | |
| 33 | return { |
| 34 | projectId: readString(process.env.VERCEL_PROJECT_ID) ?? claims.project_id, |
| 35 | teamId: |
| 36 | readString(process.env.VERCEL_TEAM_ID) ?? |
| 37 | readString(process.env.VERCEL_ORG_ID) ?? |
| 38 | claims.owner_id, |
| 39 | }; |
| 40 | } |
| 41 | |
| 42 | async function mintProjectOidcToken(params: { |
| 43 | projectId: string; |
no test coverage detected