@vercel/functions 1.5.0 β†’ 1.5.1

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,11 @@
1
1
  # @vercel/functions
2
2
 
3
+ ## 1.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [@vercel/functions] update headers doc ([#12649](https://github.com/vercel/vercel/pull/12649))
8
+
3
9
  ## 1.5.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -1,60 +1,5 @@
1
- <p align="center">
2
- <a href="https://vercel.com">
3
- <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96">
4
- <h3 align="center">Vercel</h3>
5
- </a>
6
- <p align="center">Develop. Preview. Ship.</p>
7
- </p>
1
+ # `@vercel/functions`
8
2
 
9
- [Join the Vercel Community](https://vercel.community/)
3
+ Runtime functions to be used with your Vercel Functions.
10
4
 
11
- ## OIDC Support Functions
12
-
13
- ### AWS S3 Example
14
-
15
- ```ts
16
- import * as s3 from '@aws-sdk/client-s3';
17
- import { awsCredentialsProvider } from '@vercel/functions/oidc';
18
-
19
- const s3Client = new s3.S3Client({
20
- credentials: awsCredentialsProvider({
21
- roleArn: process.env.AWS_ROLE_ARN,
22
- }),
23
- });
24
-
25
- export const GET = () => {
26
- const result = await s3Client.send(
27
- new s3.ListObjectsV2Command({
28
- Bucket: process.env.BUCKET_NAME,
29
- })
30
- );
31
- return Response.json({ objects: result.Contents });
32
- };
33
- ```
34
-
35
- ### Azure CosmosDB Example
36
-
37
- ```ts
38
- import { ClientAssertionCredential } from '@azure/identity';
39
- import { CosmosClient } from '@azure/cosmos';
40
- import { getVercelOidcToken } from '@vercel/functions/oidc';
41
-
42
- const credentialsProvider = new ClientAssertionCredential(
43
- process.env.AZURE_TENANT_ID,
44
- process.env.AZURE_CLIENT_ID,
45
- getVercelOidcToken
46
- );
47
-
48
- const cosmosClient = new CosmosClient({
49
- endpoint: process.env.COSMOS_DB_ENDPOINT,
50
- aadCredentials: credentialsProvider,
51
- });
52
-
53
- export const GET = () => {
54
- const container = cosmosClient
55
- .database(process.env.COSMOS_DB_NAME)
56
- .container(process.env.COSMOS_DB_CONTAINER);
57
- const items = await container.items.query('SELECT * FROM f').fetchAll();
58
- return Response.json({ items: items.resources });
59
- };
60
- ```
5
+ Please [follow the documentation](https://vercel.com/docs/functions/vercel-functions-package) for examples and usage.
@@ -51,7 +51,7 @@ The location information of the request, in this way:
51
51
  "country": "US",
52
52
  "flag": "πŸ‡ΊπŸ‡Έ",
53
53
  "countryRegion": "NY",
54
- "region": "dev1",
54
+ "region": "iad1",
55
55
  "latitude": "40.7128",
56
56
  "longitude": "-74.0060"
57
57
  }
package/headers.d.ts CHANGED
@@ -98,7 +98,7 @@ export declare function ipAddress(input: Request | Headers): string | undefined;
98
98
  * "country": "US",
99
99
  * "flag": "πŸ‡ΊπŸ‡Έ",
100
100
  * "countryRegion": "NY",
101
- * "region": "dev1",
101
+ * "region": "iad1",
102
102
  * "latitude": "40.7128",
103
103
  * "longitude": "-74.0060"
104
104
  * }
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  ],
10
10
  "main": "./index.js",
11
11
  "types": "./index.d.ts",
12
- "version": "1.5.0",
12
+ "version": "1.5.1",
13
13
  "repository": {
14
14
  "directory": "packages/functions",
15
15
  "type": "git",