@middy/util 4.0.10 → 4.2.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.
- package/index.cjs +3 -3
- package/index.js +3 -3
- package/package.json +3 -3
package/index.cjs
CHANGED
|
@@ -124,7 +124,7 @@ const processCache = (options, fetch = ()=>undefined, request)=>{
|
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
|
-
const
|
|
127
|
+
const value = fetch(request);
|
|
128
128
|
const expiry = Date.now() + cacheExpiry;
|
|
129
129
|
if (cacheExpiry) {
|
|
130
130
|
const refresh = cacheExpiry > 0 ? setInterval(()=>{
|
|
@@ -136,13 +136,13 @@ const processCache = (options, fetch = ()=>undefined, request)=>{
|
|
|
136
136
|
});
|
|
137
137
|
}, cacheExpiry) : undefined;
|
|
138
138
|
cache[cacheKey] = {
|
|
139
|
-
value
|
|
139
|
+
value,
|
|
140
140
|
expiry,
|
|
141
141
|
refresh
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
144
|
return {
|
|
145
|
-
value
|
|
145
|
+
value,
|
|
146
146
|
expiry
|
|
147
147
|
};
|
|
148
148
|
};
|
package/index.js
CHANGED
|
@@ -98,7 +98,7 @@ export const processCache = (options, fetch = ()=>undefined, request)=>{
|
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const value = fetch(request);
|
|
102
102
|
const expiry = Date.now() + cacheExpiry;
|
|
103
103
|
if (cacheExpiry) {
|
|
104
104
|
const refresh = cacheExpiry > 0 ? setInterval(()=>{
|
|
@@ -110,13 +110,13 @@ export const processCache = (options, fetch = ()=>undefined, request)=>{
|
|
|
110
110
|
});
|
|
111
111
|
}, cacheExpiry) : undefined;
|
|
112
112
|
cache[cacheKey] = {
|
|
113
|
-
value
|
|
113
|
+
value,
|
|
114
114
|
expiry,
|
|
115
115
|
refresh
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
return {
|
|
119
|
-
value
|
|
119
|
+
value,
|
|
120
120
|
expiry
|
|
121
121
|
};
|
|
122
122
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/util",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda (util package)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@aws-sdk/client-ssm": "^3.0.0",
|
|
64
|
-
"@middy/core": "4.0
|
|
64
|
+
"@middy/core": "4.2.0",
|
|
65
65
|
"@types/aws-lambda": "^8.10.76",
|
|
66
66
|
"@types/node": "^18.0.0",
|
|
67
67
|
"aws-xray-sdk": "^3.3.3"
|
|
68
68
|
},
|
|
69
69
|
"homepage": "https://middy.js.org",
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "438103b15c184995a0a38413f6ed0b8696d13670"
|
|
71
71
|
}
|