@vercel/connect 2.9.7 → 2.9.8-snapshot-12a52bb14e02

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,9 +11,14 @@ export function normalizeTokenSubject(subject) {
11
11
  return subject;
12
12
  }
13
13
  export function normalizeTokenParams(params) {
14
+ const { installationId, audience, scopes, resources, authorizationDetails, validityBufferMs, } = params;
14
15
  return {
15
- ...params,
16
16
  subject: normalizeTokenSubject(params.subject),
17
- scopes: params.scopes === undefined ? ['*'] : params.scopes,
17
+ ...(installationId !== undefined && { installationId }),
18
+ ...(audience !== undefined && { audience }),
19
+ scopes: scopes === undefined ? ['*'] : scopes,
20
+ ...(resources !== undefined && { resources }),
21
+ ...(authorizationDetails !== undefined && { authorizationDetails }),
22
+ ...(validityBufferMs !== undefined && { validityBufferMs }),
18
23
  };
19
24
  }
package/dist/token.js CHANGED
@@ -160,7 +160,7 @@ function tokenCacheKey(connector, params, options) {
160
160
  function tokenRequestKey(connector, params, options) {
161
161
  return `${JSON.stringify({
162
162
  connector,
163
- ...params,
163
+ params,
164
164
  teamId: options?.teamId,
165
165
  orgId: options?.orgId,
166
166
  })}\n`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/connect",
3
- "version": "2.9.7",
3
+ "version": "2.9.8-snapshot-12a52bb14e02",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "repository": {
@@ -54,8 +54,8 @@
54
54
  "dist"
55
55
  ],
56
56
  "dependencies": {
57
- "@vercel/oidc": "5.0.1",
58
- "@vercel/oidc-verify": "0.1.0"
57
+ "@vercel/oidc-verify": "0.1.0",
58
+ "@vercel/oidc": "5.0.1"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@ai-sdk/mcp": "^1 || ^2",