MCPcopy Create free account
hub / github.com/vercel/vercel / resolveProjectContext

Function resolveProjectContext

packages/container/src/oidc.ts:27–40  ·  view source on GitHub ↗
(token: string)

Source from the content-addressed store, hash-verified

25}
26
27function 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
42async function mintProjectOidcToken(params: {
43 projectId: string;

Callers 1

resolveOidcTokenForBuildFunction · 0.85

Calls 2

readStringFunction · 0.90
parseOidcTokenFunction · 0.85

Tested by

no test coverage detected