@vercel/functions 3.9.9 → 3.9.11

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @vercel/functions
2
2
 
3
+ ## 3.9.11
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [ec76b68]
8
+ - @vercel/oidc@4.0.0
9
+
10
+ ## 3.9.10
11
+
12
+ ### Patch Changes
13
+
14
+ - @vercel/oidc@3.8.10
15
+
3
16
  ## 3.9.9
4
17
 
5
18
  ### Patch Changes
@@ -6,14 +6,16 @@
6
6
 
7
7
  > **getVercelOidcToken**(`options?`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`string`\>
8
8
 
9
- Defined in: packages/oidc/dist/get-vercel-oidc-token-with-refresh.d.ts:88
9
+ Defined in: packages/oidc/dist/get-vercel-oidc-token-with-refresh.d.ts:90
10
10
 
11
- Gets the current OIDC token from the request context or the environment variable.
11
+ Gets the current OIDC token from the request context, the Vercel OIDC token
12
+ file, or the environment variable.
12
13
 
13
14
  Do not cache this value, as it is subject to change in production!
14
15
 
15
- This function is used to retrieve the OIDC token from the request context or the environment variable.
16
- It checks for the `x-vercel-oidc-token` header in the request context and falls back to the `VERCEL_OIDC_TOKEN` environment variable if the header is not present.
16
+ It checks for the `x-vercel-oidc-token` header in the request context, then
17
+ reads the file named by `VERCEL_OIDC_TOKEN_FILE` when set, then falls back to
18
+ the `VERCEL_OIDC_TOKEN` environment variable.
17
19
 
18
20
  Unlike the `getVercelOidcTokenSync` function, this function will refresh the token if it is expired in a development environment.
19
21
 
@@ -33,7 +35,7 @@ A promise that resolves to the OIDC token.
33
35
 
34
36
  ## Throws
35
37
 
36
- If the `x-vercel-oidc-token` header is missing from the request context and the environment variable `VERCEL_OIDC_TOKEN` is not set. If the token
38
+ If no token source is available or the configured file cannot be read. If the token
37
39
  is expired in a development environment, will also throw an error if the token cannot be refreshed: no CLI credentials are available, CLI credentials are expired, no project configuration is available
38
40
  or the token refresh request fails.
39
41
 
package/package.json CHANGED
@@ -30,7 +30,7 @@
30
30
  "require": "./middleware.js"
31
31
  }
32
32
  },
33
- "version": "3.9.9",
33
+ "version": "3.9.11",
34
34
  "repository": {
35
35
  "directory": "packages/functions",
36
36
  "type": "git",
@@ -77,7 +77,7 @@
77
77
  "access": "public"
78
78
  },
79
79
  "dependencies": {
80
- "@vercel/oidc": "3.8.9"
80
+ "@vercel/oidc": "4.0.0"
81
81
  },
82
82
  "scripts": {
83
83
  "pretest": "pnpm run build:code",