vtlab-generic-functions 1.0.11 → 1.0.13

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/axios/logs.js CHANGED
@@ -64,7 +64,7 @@ const processPayload = async (payload) => {
64
64
  // get bucket name from secrets manager
65
65
  let bucket = await secretsManager.get('s3LogsBucket');
66
66
  console.log("bucket", bucket);
67
- let signedURL = s3bucket.generatePresignedUrl(bucket, path);
67
+ let signedURL = await s3bucket.generatePresignedUrl(bucket, path);
68
68
  console.log("signedURL", signedURL)
69
69
 
70
70
  // Update the response to be the presigned URL
package/lambda/index.js CHANGED
@@ -50,12 +50,13 @@ const invokeLambda = async (payload, functionName, options = {}) => {
50
50
 
51
51
  const command = new InvokeCommand({
52
52
  FunctionName: functionName,
53
- Payload: Buffer.from(payload)
53
+ Payload: Uint8Array.from(Buffer.from(payload))
54
54
  });
55
55
 
56
56
  try {
57
57
  const { Payload } = await client.send(command);
58
- return JSON.parse(Payload.toString());
58
+ const result = Buffer.from(Payload);
59
+ return JSON.parse(result.toString());
59
60
  } catch (error) {
60
61
  throw error;
61
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vtlab-generic-functions",
3
- "version": "1.0.11",
3
+ "version": "1.0.13",
4
4
  "scripts": {
5
5
  "test": "jest"
6
6
  },