@middy/ssm 2.5.4 → 2.5.5

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.js +9 -2
  2. package/package.json +4 -4
package/index.js CHANGED
@@ -88,6 +88,13 @@ const ssmMiddleware = (opts = {}) => {
88
88
  [param.Name]: parseValue(param)
89
89
  };
90
90
  }));
91
+ }).catch(e => {
92
+ var _getCache$value2;
93
+
94
+ const value = (_getCache$value2 = getCache(options.cacheKey).value) !== null && _getCache$value2 !== void 0 ? _getCache$value2 : {};
95
+ value[internalKey] = undefined;
96
+ modifyCache(options.cacheKey, value);
97
+ throw e;
91
98
  });
92
99
 
93
100
  for (const internalKey of batchInternalKeys) {
@@ -113,9 +120,9 @@ const ssmMiddleware = (opts = {}) => {
113
120
  if (fetchKey.substr(-1) !== '/') continue; // Skip not path passed in
114
121
 
115
122
  values[internalKey] = fetchPath(fetchKey).catch(e => {
116
- var _getCache$value2, _getCache2;
123
+ var _getCache$value3, _getCache2;
117
124
 
118
- const value = (_getCache$value2 = (_getCache2 = getCache(options.cacheKey)) === null || _getCache2 === void 0 ? void 0 : _getCache2.value) !== null && _getCache$value2 !== void 0 ? _getCache$value2 : {};
125
+ const value = (_getCache$value3 = (_getCache2 = getCache(options.cacheKey)) === null || _getCache2 === void 0 ? void 0 : _getCache2.value) !== null && _getCache$value3 !== void 0 ? _getCache$value3 : {};
119
126
  value[internalKey] = undefined;
120
127
  modifyCache(options.cacheKey, value);
121
128
  throw e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/ssm",
3
- "version": "2.5.4",
3
+ "version": "2.5.5",
4
4
  "description": "SSM (EC2 Systems Manager) parameters middleware for the middy framework",
5
5
  "type": "commonjs",
6
6
  "engines": {
@@ -46,12 +46,12 @@
46
46
  },
47
47
  "homepage": "https://github.com/middyjs/middy#readme",
48
48
  "dependencies": {
49
- "@middy/util": "^2.5.4"
49
+ "@middy/util": "^2.5.5"
50
50
  },
51
51
  "devDependencies": {
52
- "@middy/core": "^2.5.4",
52
+ "@middy/core": "^2.5.5",
53
53
  "aws-sdk": "^2.939.0",
54
54
  "aws-xray-sdk": "^3.3.3"
55
55
  },
56
- "gitHead": "a4134a579c757a9fdfed3006877ba2c0ec8a2cfa"
56
+ "gitHead": "b84840ec8afd289f6decfd0d645be4899051792d"
57
57
  }