sst 3.1.16 → 3.1.18

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.
@@ -1,12 +1,5 @@
1
- import { AwsClient } from "aws4fetch";
2
1
  import { Resource } from "../resource.js";
3
- const client = new AwsClient({
4
- accessKeyId: process.env.AWS_ACCESS_KEY_ID,
5
- secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
6
- sessionToken: process.env.AWS_SESSION_TOKEN,
7
- region: process.env.AWS_REGION,
8
- });
9
- const endpoint = `https://lambda.${process.env.AWS_REGION}.amazonaws.com/2015-03-31`;
2
+ import { client } from "../aws/client.js";
10
3
  /**
11
4
  * Create a client to interact with the Vector database.
12
5
  * @example
@@ -55,7 +48,9 @@ export function VectorClient(name) {
55
48
  }
56
49
  async function invokeFunction(functionName, body, errorMessage, attempts = 0) {
57
50
  try {
58
- const response = await client.fetch(`${endpoint}/functions/${functionName}/invocations`, {
51
+ const c = await client();
52
+ const endpoint = `https://lambda.${process.env.AWS_REGION}.amazonaws.com/2015-03-31`;
53
+ const response = await c.fetch(`${endpoint}/functions/${functionName}/invocations`, {
59
54
  method: "POST",
60
55
  headers: { Accept: "application/json" },
61
56
  body,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "sst",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
- "version": "3.1.16",
6
+ "version": "3.1.18",
7
7
  "main": "./dist/index.js",
8
8
  "exports": {
9
9
  ".": "./dist/index.js",
@@ -47,11 +47,11 @@
47
47
  }
48
48
  },
49
49
  "optionalDependencies": {
50
- "sst-linux-x64": "3.1.16",
51
- "sst-linux-x86": "3.1.16",
52
- "sst-linux-arm64": "3.1.16",
53
- "sst-darwin-x64": "3.1.16",
54
- "sst-darwin-arm64": "3.1.16"
50
+ "sst-linux-x64": "3.1.18",
51
+ "sst-linux-x86": "3.1.18",
52
+ "sst-linux-arm64": "3.1.18",
53
+ "sst-darwin-x64": "3.1.18",
54
+ "sst-darwin-arm64": "3.1.18"
55
55
  },
56
56
  "dependencies": {
57
57
  "aws4fetch": "^1.0.18",