@middy/input-output-logger 3.0.1 → 3.0.2

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 (3) hide show
  1. package/README.md +1 -1
  2. package/index.d.ts +2 -0
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -54,7 +54,7 @@ npm install --save @middy/input-output-logger
54
54
  - `logger` (function) (default `console.log`): logging function that accepts an object
55
55
  - `awsContext` (boolean) (default `false`): Include [AWS Lambda context object](https://docs.aws.amazon.com/lambda/latest/dg/nodejs-context.html) to the logger
56
56
  - `omitPaths` (string[]) (default `[]`): property accepts an array of paths that will be used to remove particular fields import the logged objects. This could serve as a simple way to redact sensitive data from logs (default []).
57
- - `mask` (string) (default `undefined`): When set to a truthy value (i.e. `*** redacted ***`) a path is replaced instead of ommitted.
57
+ - `mask` (string) (default `undefined`): When set to a truthy value (i.e. `*** redacted ***`) a path is replaced instead of omitted.
58
58
  - `replacer` (function) (default `undefined`): A [replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#Parameters) parameter may be passed which will be used `JSON.stringify`ing the request during cloning.
59
59
 
60
60
  ## Sample usage
package/index.d.ts CHANGED
@@ -4,6 +4,8 @@ interface Options {
4
4
  logger?: (message: any) => void
5
5
  awsContext?: boolean
6
6
  omitPaths?: string[]
7
+ mask?: string
8
+ replacer?: (this: any, key: string, value: any) => any | Array<number | string>
7
9
  }
8
10
 
9
11
  declare function inputOutputLogger (options?: Options): middy.MiddlewareObj
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@middy/input-output-logger",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "Input and output logger middleware for the middy framework",
5
5
  "type": "module",
6
6
  "engines": {
@@ -55,11 +55,11 @@
55
55
  },
56
56
  "homepage": "https://middy.js.org",
57
57
  "dependencies": {
58
- "@middy/util": "^3.0.1"
58
+ "@middy/util": "^3.0.2"
59
59
  },
60
60
  "devDependencies": {
61
- "@middy/core": "^3.0.1",
61
+ "@middy/core": "^3.0.2",
62
62
  "@types/node": "^17.0.0"
63
63
  },
64
- "gitHead": "797455e2c2be445867bc03597e0a2d5b0560c9de"
64
+ "gitHead": "983649b8359ea32a786e75dfc2953aeee8ec6052"
65
65
  }