@contrast/config 1.28.0 → 1.28.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.
- package/lib/config.js +7 -0
- package/lib/options.js +2 -2
- package/package.json +3 -3
package/lib/config.js
CHANGED
|
@@ -70,6 +70,13 @@ module.exports = class Config {
|
|
|
70
70
|
// initialize
|
|
71
71
|
this._build();
|
|
72
72
|
this._validate();
|
|
73
|
+
|
|
74
|
+
// report all the errors found during initialization.
|
|
75
|
+
if (this._errors.length) {
|
|
76
|
+
const errors = this._errors.map((e, ix) => `${ix + 1}) ${e.message}`).join('; ');
|
|
77
|
+
throw new Error(`Errors found in configuration ${errors}`);
|
|
78
|
+
}
|
|
79
|
+
|
|
73
80
|
core.messages?.on?.(Event.SERVER_SETTINGS_UPDATE, (msg) => {
|
|
74
81
|
if (!this._status) this._status = 'Success';
|
|
75
82
|
|
package/lib/options.js
CHANGED
|
@@ -650,8 +650,8 @@ Example - \`label1, label2, label3\``,
|
|
|
650
650
|
desc: "override the reported server version (if different from 'version' field in the application's package.json)",
|
|
651
651
|
},
|
|
652
652
|
].map((opt) => Object.assign(opt, {
|
|
653
|
-
env: `CONTRAST__${opt.name.toUpperCase().
|
|
654
|
-
.
|
|
653
|
+
env: `CONTRAST__${opt.name.toUpperCase().replaceAll('.', '__')
|
|
654
|
+
.replaceAll('-', '_')}`
|
|
655
655
|
}));
|
|
656
656
|
|
|
657
657
|
module.exports = options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/config",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.2",
|
|
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)",
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"types": "lib/index.d.ts",
|
|
12
12
|
"engines": {
|
|
13
13
|
"npm": ">=6.13.7 <7 || >= 8.3.1",
|
|
14
|
-
"node": ">=
|
|
14
|
+
"node": ">= 16.9.1"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"test": "../scripts/test.sh"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@contrast/common": "1.21.
|
|
20
|
+
"@contrast/common": "1.21.2",
|
|
21
21
|
"yaml": "^2.2.2"
|
|
22
22
|
}
|
|
23
23
|
}
|