winston-middleware 4.0.3 → 4.0.4

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.

Potentially problematic release.


This version of winston-middleware might be problematic. Click here for more details.

package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 4.0.4
2
+ * Update lodash to 4.17.19 ([#245](https://github.com/bithavoc/winston-middleware/pull/245))
3
+ * Update statusLevels to accept Boolean or StatusLevel object in TypeScript definition ([#244](https://github.com/bithavoc/winston-middleware/pull/244))
4
+
1
5
  ## 4.0.3
2
6
  * Update lodash to 4.17.15 ([#232](https://github.com/bithavoc/winston-middleware/pull/232))
3
7
  * Add missing exceptionToMeta and skip to TypeScript definition ([#234](https://github.com/bithavoc/winston-middleware/pull/234))
package/index.d.ts CHANGED
@@ -26,6 +26,12 @@ export type RouteFilter = (req: Request, res: Response) => boolean;
26
26
  export type ErrorRouteFilter = (req: Request, res: Response, err: Error) => boolean;
27
27
  export type MessageTemplate = string | ((req: Request, res: Response) => string);
28
28
 
29
+ export interface StatusLevels {
30
+ error?: string;
31
+ success?: string;
32
+ warn?: string;
33
+ };
34
+
29
35
  export interface BaseLoggerOptions {
30
36
  baseMeta?: object;
31
37
  bodyBlacklist?: string[];
@@ -48,12 +54,8 @@ export interface BaseLoggerOptions {
48
54
  responseWhitelist?: string[];
49
55
  headerBlacklist?: string[];
50
56
  skip?: RouteFilter;
51
- statusLevels?: {
52
- error?: string;
53
- success?: string;
54
- warn?: string;
55
- };
56
- }
57
+ statusLevels?: Boolean | StatusLevels;
58
+ }
57
59
 
58
60
  export interface LoggerOptionsWithTransports extends BaseLoggerOptions {
59
61
  transports: Transport[];
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "middleware",
18
18
  "colors"
19
19
  ],
20
- "version": "4.0.3",
20
+ "version": "4.0.4",
21
21
  "repository": {
22
22
  "type": "git",
23
23
  "url": "https://github.com/bithavoc/winston-middleware.git"
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "chalk": "^2.4.1",
36
- "lodash": "^4.17.15"
36
+ "lodash": "^4.17.19"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/express": "^4.17.1",
@@ -91,4 +91,4 @@
91
91
  }
92
92
  ],
93
93
  "types": "index.d.ts"
94
- }
94
+ }