@contrast/config 1.10.0 → 1.11.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/lib/index.d.ts CHANGED
@@ -14,7 +14,14 @@
14
14
  */
15
15
 
16
16
  import { ProtectRuleMode, Rule } from '@contrast/common';
17
- import { Level } from 'pino';
17
+ import { LevelWithSilent } from 'pino';
18
+
19
+ export type Level =
20
+ | 'error'
21
+ | 'warn'
22
+ | 'info'
23
+ | 'debug'
24
+ | 'trace';
18
25
 
19
26
  export type SyslogLevel =
20
27
  | 'alert'
@@ -70,7 +77,7 @@ export interface Config {
70
77
  * Minimum log level. 'silent' disables logging entirely.
71
78
  * Default: `'error'`
72
79
  */
73
- level: Level | 'silent';
80
+ level: LevelWithSilent;
74
81
 
75
82
  /** Default: `'node-contrast'` */
76
83
  path: string;
@@ -80,8 +87,8 @@ export interface Config {
80
87
  };
81
88
 
82
89
  security_logger: {
83
- /** Default: `'debug'` */
84
- level: SyslogLevel;
90
+ /** Default: `'error'` */
91
+ level: Level;
85
92
 
86
93
  /** Default: `'security'` */
87
94
  path: string;
package/lib/options.js CHANGED
@@ -231,13 +231,11 @@ const agent = [
231
231
  },
232
232
  {
233
233
  name: 'agent.security_logger.level',
234
- default: 'debug',
234
+ default: 'error',
235
235
  arg: '<level>',
236
236
  fn: lowercase,
237
- // NOTE: syslog actually specifies 8 levels, starting with 0-emergency, but
238
- // we do not let the user set emergency for whatever reason
239
- enum: ['alert', 'critical', 'error', 'warning', 'notice', 'info', 'debug'],
240
- desc: 'security logging level (alert, crit, err, warning, notice, info, debug)',
237
+ enum: ['error', 'warn', 'info', 'debug', 'trace'],
238
+ desc: 'security logging level (error, warn, info, debug, trace)',
241
239
  },
242
240
  {
243
241
  name: 'agent.security_logger.path',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/config",
3
- "version": "1.10.0",
3
+ "version": "1.11.0",
4
4
  "description": "An API for discovering Contrast agent configuration data",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -17,7 +17,7 @@
17
17
  "test": "../scripts/test.sh"
18
18
  },
19
19
  "dependencies": {
20
- "@contrast/common": "1.8.0",
20
+ "@contrast/common": "1.9.0",
21
21
  "yaml": "^2.2.2"
22
22
  }
23
23
  }