@contrast/config 1.9.0 → 1.10.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 +6 -1
- package/lib/options.js +10 -3
- package/lib/util.js +4 -4
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface Config {
|
|
|
30
30
|
|
|
31
31
|
_default: Record<string, any>;
|
|
32
32
|
_flat: Record<string, any>;
|
|
33
|
-
_sources: Record<string, '
|
|
33
|
+
_sources: Record<string, 'DEFAULT_VALUE' | 'ENVIRONMENT_VARIABLE' | 'USER_CONFIGURATION_FILE' | 'CONTRAST_UI'>;
|
|
34
34
|
api: {
|
|
35
35
|
enable: boolean;
|
|
36
36
|
api_key: string;
|
|
@@ -50,6 +50,7 @@ export interface Config {
|
|
|
50
50
|
polling: {
|
|
51
51
|
app_activity_ms: number;
|
|
52
52
|
app_settings_ms: number;
|
|
53
|
+
app_update_ms: number;
|
|
53
54
|
server_settings_ms: number;
|
|
54
55
|
};
|
|
55
56
|
|
|
@@ -167,6 +168,10 @@ export interface Config {
|
|
|
167
168
|
session_metadtata: string | null;
|
|
168
169
|
};
|
|
169
170
|
|
|
171
|
+
assess: {
|
|
172
|
+
tags: string;
|
|
173
|
+
};
|
|
174
|
+
|
|
170
175
|
protect: {
|
|
171
176
|
enable: boolean;
|
|
172
177
|
|
package/lib/options.js
CHANGED
|
@@ -369,21 +369,28 @@ const agent = [
|
|
|
369
369
|
arg: '<ms>',
|
|
370
370
|
default: 30000,
|
|
371
371
|
fn: parseNum,
|
|
372
|
-
desc: 'how often (in ms)
|
|
372
|
+
desc: 'how often (in ms) application activity messages are sent to the UI',
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
name: 'agent.polling.app_update_ms',
|
|
376
|
+
arg: '<ms>',
|
|
377
|
+
default: 30000,
|
|
378
|
+
fn: parseNum,
|
|
379
|
+
desc: 'how often (in ms) application updates are sent to the UI'
|
|
373
380
|
},
|
|
374
381
|
{
|
|
375
382
|
name: 'agent.polling.app_settings_ms',
|
|
376
383
|
arg: '<ms>',
|
|
377
384
|
default: 30000,
|
|
378
385
|
fn: parseNum,
|
|
379
|
-
desc: 'how often (in ms)
|
|
386
|
+
desc: 'how often (in ms) application settings polls are sent to the UI',
|
|
380
387
|
},
|
|
381
388
|
{
|
|
382
389
|
name: 'agent.polling.server_settings_ms',
|
|
383
390
|
arg: '<ms>',
|
|
384
391
|
default: 30000,
|
|
385
392
|
fn: parseNum,
|
|
386
|
-
desc: 'how often (in ms)
|
|
393
|
+
desc: 'how often (in ms) server settings polls are sent to the UI',
|
|
387
394
|
}
|
|
388
395
|
];
|
|
389
396
|
|
package/lib/util.js
CHANGED
|
@@ -242,9 +242,9 @@ function mergeOptions() {
|
|
|
242
242
|
let isFromDefault, origin;
|
|
243
243
|
|
|
244
244
|
if (env != null || autoEnv != null) {
|
|
245
|
-
origin = '
|
|
245
|
+
origin = 'ENVIRONMENT_VARIABLE';
|
|
246
246
|
} else if (fileFlag != null) {
|
|
247
|
-
origin = '
|
|
247
|
+
origin = 'USER_CONFIGURATION_FILE';
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
// env > file > default
|
|
@@ -257,7 +257,7 @@ function mergeOptions() {
|
|
|
257
257
|
if (optEnum && optEnum.indexOf(value) === -1) {
|
|
258
258
|
value = fn(optDefault);
|
|
259
259
|
isFromDefault = true;
|
|
260
|
-
origin = '
|
|
260
|
+
origin = 'DEFAULT_VALUE';
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
// set default last and separately, so that we can mark that the option was
|
|
@@ -265,7 +265,7 @@ function mergeOptions() {
|
|
|
265
265
|
if (value === undefined) {
|
|
266
266
|
value = fn(optDefault);
|
|
267
267
|
isFromDefault = true;
|
|
268
|
-
origin = '
|
|
268
|
+
origin = 'DEFAULT_VALUE';
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
setConfig(options, name, value, isFromDefault, origin);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.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.
|
|
20
|
+
"@contrast/common": "1.8.0",
|
|
21
21
|
"yaml": "^2.2.2"
|
|
22
22
|
}
|
|
23
23
|
}
|