@vercel/functions 2.2.11 → 2.2.12

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,14 @@
1
1
  # @vercel/functions
2
2
 
3
+ ## 2.2.12
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix package versions for oidc-aws-credentials-provider, vercel/functions, and publish the next version of vercel/oidc ([#13765](https://github.com/vercel/vercel/pull/13765))
8
+
9
+ - Updated dependencies [[`2f5244647dc7d2c81bb688035952d4d45b6d707e`](https://github.com/vercel/vercel/commit/2f5244647dc7d2c81bb688035952d4d45b6d707e)]:
10
+ - @vercel/oidc@2.0.1
11
+
3
12
  ## 2.2.11
4
13
 
5
14
  ### Patch Changes
@@ -45,9 +45,13 @@ Do not cache this value, as it is subject to change in production!
45
45
  This function is used to retrieve the OIDC token from the request context or the environment variable.
46
46
  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.
47
47
 
48
+ Unlike the `getVercelOidcTokenSync` function, this function will refresh the token if it is expired in a development environment.
49
+
48
50
  **`Throws`**
49
51
 
50
- If the `x-vercel-oidc-token` header is missing from the request context and the environment variable `VERCEL_OIDC_TOKEN` is not set.
52
+ 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
53
+ 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
54
+ or the token refresh request fails.
51
55
 
52
56
  **`Example`**
53
57
 
@@ -70,7 +74,7 @@ A promise that resolves to the OIDC token.
70
74
 
71
75
  #### Defined in
72
76
 
73
- node_modules/.pnpm/@vercel+oidc@2.0.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.d.ts:23
77
+ packages/oidc/dist/get-vercel-oidc-token.d.ts:27
74
78
 
75
79
  ---
76
80
 
@@ -85,6 +89,8 @@ Do not cache this value, as it is subject to change in production!
85
89
  This function is used to retrieve the OIDC token from the request context or the environment variable.
86
90
  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.
87
91
 
92
+ This function will not refresh the token if it is expired. For refreshing the token, use the @{link getVercelOidcToken} function.
93
+
88
94
  **`Throws`**
89
95
 
90
96
  If the `x-vercel-oidc-token` header is missing from the request context and the environment variable `VERCEL_OIDC_TOKEN` is not set.
@@ -105,4 +111,4 @@ The OIDC token.
105
111
 
106
112
  #### Defined in
107
113
 
108
- node_modules/.pnpm/@vercel+oidc@2.0.0/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.d.ts:43
114
+ packages/oidc/dist/get-vercel-oidc-token.d.ts:49
package/package.json CHANGED
@@ -30,7 +30,7 @@
30
30
  "require": "./middleware.js"
31
31
  }
32
32
  },
33
- "version": "2.2.11",
33
+ "version": "2.2.12",
34
34
  "repository": {
35
35
  "directory": "packages/functions",
36
36
  "type": "git",
@@ -72,7 +72,7 @@
72
72
  "access": "public"
73
73
  },
74
74
  "dependencies": {
75
- "@vercel/oidc": "2.0.0"
75
+ "@vercel/oidc": "2.0.1"
76
76
  },
77
77
  "scripts": {
78
78
  "pretest": "pnpm run build:code",