@middy/input-output-logger 2.5.6 → 3.0.0-alpha.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/LICENSE +1 -1
- package/README.md +1 -1
- package/index.js +3 -5
- package/package.json +10 -8
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2017-
|
|
3
|
+
Copyright (c) 2017-2022 Luciano Mammino, will Farrell and the [Middy team](https://github.com/middyjs/middy/graphs/contributors)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ Everyone is very welcome to contribute to this repository. Feel free to [raise i
|
|
|
98
98
|
|
|
99
99
|
## License
|
|
100
100
|
|
|
101
|
-
Licensed under [MIT License](LICENSE). Copyright (c) 2017-
|
|
101
|
+
Licensed under [MIT License](LICENSE). Copyright (c) 2017-2022 Luciano Mammino, will Farrell, and the [Middy team](https://github.com/middyjs/middy/graphs/contributors).
|
|
102
102
|
|
|
103
103
|
<a href="https://app.fossa.io/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy?ref=badge_large">
|
|
104
104
|
<img src="https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmiddyjs%2Fmiddy.svg?type=large" alt="FOSSA Status" style="max-width:100%;">
|
package/index.js
CHANGED
|
@@ -20,10 +20,8 @@ const inputOutputLoggerMiddleware = (opts = {}) => {
|
|
|
20
20
|
logger(redactedMessage)
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const inputOutputLoggerMiddlewareBefore = async (request) =>
|
|
24
|
-
|
|
25
|
-
const inputOutputLoggerMiddlewareAfter = async (request) =>
|
|
26
|
-
omitAndLog('response', request)
|
|
23
|
+
const inputOutputLoggerMiddlewareBefore = async (request) => omitAndLog('event', request)
|
|
24
|
+
const inputOutputLoggerMiddlewareAfter = async (request) => omitAndLog('response', request)
|
|
27
25
|
const inputOutputLoggerMiddlewareOnError = inputOutputLoggerMiddlewareAfter
|
|
28
26
|
return {
|
|
29
27
|
before: logger ? inputOutputLoggerMiddlewareBefore : undefined,
|
|
@@ -76,4 +74,4 @@ const deleteKey = (obj, key) => {
|
|
|
76
74
|
return obj
|
|
77
75
|
}
|
|
78
76
|
|
|
79
|
-
|
|
77
|
+
export default inputOutputLoggerMiddleware
|
package/package.json
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/input-output-logger",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.3",
|
|
4
4
|
"description": "Input and output logger middleware for the middy framework",
|
|
5
|
-
"type": "
|
|
5
|
+
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": ">=
|
|
7
|
+
"node": ">=14"
|
|
8
8
|
},
|
|
9
9
|
"engineStrict": true,
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
|
-
"
|
|
13
|
+
"exports": "./index.js",
|
|
14
14
|
"types": "index.d.ts",
|
|
15
15
|
"files": [
|
|
16
|
+
"index.js",
|
|
16
17
|
"index.d.ts"
|
|
17
18
|
],
|
|
18
19
|
"scripts": {
|
|
19
20
|
"test": "npm run test:unit",
|
|
20
|
-
"test:unit": "ava"
|
|
21
|
+
"test:unit": "ava",
|
|
22
|
+
"test:benchmark": "node __benchmarks__/index.js"
|
|
21
23
|
},
|
|
22
24
|
"license": "MIT",
|
|
23
25
|
"keywords": [
|
|
@@ -46,8 +48,8 @@
|
|
|
46
48
|
},
|
|
47
49
|
"homepage": "https://github.com/middyjs/middy#readme",
|
|
48
50
|
"devDependencies": {
|
|
49
|
-
"@middy/core": "^
|
|
50
|
-
"@types/node": "^
|
|
51
|
+
"@middy/core": "^3.0.0-alpha.3",
|
|
52
|
+
"@types/node": "^17.0.0"
|
|
51
53
|
},
|
|
52
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "1441158711580313765e6d156046ef0fade0d156"
|
|
53
55
|
}
|