vtlab-generic-functions 1.0.12 → 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.
Files changed (2) hide show
  1. package/lambda/index.js +3 -2
  2. package/package.json +1 -1
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.12",
3
+ "version": "1.0.13",
4
4
  "scripts": {
5
5
  "test": "jest"
6
6
  },