@vercel/functions 3.9.10 → 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
|
@@ -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:
|
|
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
|
|
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
|
-
|
|
16
|
-
|
|
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
|
|
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.
|
|
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": "
|
|
80
|
+
"@vercel/oidc": "4.0.0"
|
|
81
81
|
},
|
|
82
82
|
"scripts": {
|
|
83
83
|
"pretest": "pnpm run build:code",
|