@middy/input-output-logger 7.2.1 → 7.2.3
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.js +12 -3
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -145,7 +145,12 @@ const buildPathTree = (paths) => {
|
|
|
145
145
|
for (let path of paths.sort().reverse()) {
|
|
146
146
|
// reverse to ensure conflicting paths don't cause issues
|
|
147
147
|
if (!Array.isArray(path)) path = path.split(".");
|
|
148
|
-
if (
|
|
148
|
+
if (
|
|
149
|
+
path.includes("__proto__") ||
|
|
150
|
+
path.includes("constructor") ||
|
|
151
|
+
path.includes("prototype")
|
|
152
|
+
)
|
|
153
|
+
continue;
|
|
149
154
|
path.reduce((a, b, idx) => {
|
|
150
155
|
if (idx < path.length - 1) {
|
|
151
156
|
a[b] ??= {};
|
|
@@ -179,9 +184,13 @@ const passThrough = (request, omitAndLog) => {
|
|
|
179
184
|
},
|
|
180
185
|
});
|
|
181
186
|
if (hasBody) {
|
|
182
|
-
request.response.body = request.response.body
|
|
187
|
+
request.response.body = request.response.body
|
|
188
|
+
.on("error", (e) => listen.destroy(e))
|
|
189
|
+
.pipe(listen);
|
|
183
190
|
} else {
|
|
184
|
-
request.response = request.response
|
|
191
|
+
request.response = request.response
|
|
192
|
+
.on("error", (e) => listen.destroy(e))
|
|
193
|
+
.pipe(listen);
|
|
185
194
|
}
|
|
186
195
|
};
|
|
187
196
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/input-output-logger",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.3",
|
|
4
4
|
"description": "Input and output logger middleware for the middy framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"url": "https://github.com/sponsors/willfarrell"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@middy/util": "7.2.
|
|
68
|
+
"@middy/util": "7.2.3"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@datastream/core": "0.1.6",
|
|
72
|
-
"@middy/core": "7.2.
|
|
72
|
+
"@middy/core": "7.2.3",
|
|
73
73
|
"@types/aws-lambda": "^8.0.0",
|
|
74
74
|
"@types/node": "^22.0.0"
|
|
75
75
|
}
|