@middy/dynamodb 4.3.0 → 4.4.0

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/index.cjs +8 -6
  2. package/package.json +4 -4
package/index.cjs CHANGED
@@ -4,13 +4,15 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(module, "exports", {
6
6
  enumerable: true,
7
- get: ()=>_default
7
+ get: function() {
8
+ return _default;
9
+ }
8
10
  });
9
11
  const _util = require("@middy/util");
10
- const _clientDynamodb = require("@aws-sdk/client-dynamodb");
11
- const _utilDynamodb = require("@aws-sdk/util-dynamodb");
12
+ const _clientdynamodb = require("@aws-sdk/client-dynamodb");
13
+ const _utildynamodb = require("@aws-sdk/util-dynamodb");
12
14
  const defaults = {
13
- AwsClient: _clientDynamodb.DynamoDBClient,
15
+ AwsClient: _clientdynamodb.DynamoDBClient,
14
16
  awsClientOptions: {},
15
17
  awsClientAssumeRole: undefined,
16
18
  awsClientCapture: undefined,
@@ -26,14 +28,14 @@ const dynamodbMiddleware = (opts = {})=>{
26
28
  ...opts
27
29
  };
28
30
  for(const internalKey in options.fetchData){
29
- options.fetchData[internalKey].Key = (0, _utilDynamodb.marshall)(options.fetchData[internalKey].Key);
31
+ options.fetchData[internalKey].Key = (0, _utildynamodb.marshall)(options.fetchData[internalKey].Key);
30
32
  }
31
33
  const fetch = (request, cachedValues = {})=>{
32
34
  const values = {};
33
35
  for(const internalKey in options.fetchData){
34
36
  if (cachedValues[internalKey]) continue;
35
37
  const inputParameters = options.fetchData[internalKey];
36
- values[internalKey] = client.send(new _clientDynamodb.GetItemCommand(inputParameters)).then((resp)=>(0, _utilDynamodb.unmarshall)(resp.Item)).catch((e)=>{
38
+ values[internalKey] = client.send(new _clientdynamodb.GetItemCommand(inputParameters)).then((resp)=>(0, _utildynamodb.unmarshall)(resp.Item)).catch((e)=>{
37
39
  const value = (0, _util.getCache)(options.cacheKey).value ?? {};
38
40
  value[internalKey] = undefined;
39
41
  (0, _util.modifyCache)(options.cacheKey, value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/dynamodb",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "description": "DynamoDB middleware for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -64,14 +64,14 @@
64
64
  "url": "https://github.com/sponsors/willfarrell"
65
65
  },
66
66
  "dependencies": {
67
- "@middy/util": "4.3.0"
67
+ "@middy/util": "4.4.0"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@aws-sdk/client-dynamodb": "^3.245.0",
71
71
  "@aws-sdk/util-dynamodb": "^3.245.0",
72
- "@middy/core": "4.3.0",
72
+ "@middy/core": "4.4.0",
73
73
  "@types/aws-lambda": "^8.10.101",
74
74
  "aws-xray-sdk": "^3.3.3"
75
75
  },
76
- "gitHead": "6ed88ad93746e077e8870d34d970414537abbef7"
76
+ "gitHead": "5b574488798c48bc74269af7deb3ff95139bcdcc"
77
77
  }