@contrast/config 1.28.1 → 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.
Files changed (2) hide show
  1. package/lib/config.js +7 -0
  2. package/package.json +2 -2
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/config",
3
- "version": "1.28.1",
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)",
@@ -17,7 +17,7 @@
17
17
  "test": "../scripts/test.sh"
18
18
  },
19
19
  "dependencies": {
20
- "@contrast/common": "1.21.1",
20
+ "@contrast/common": "1.21.2",
21
21
  "yaml": "^2.2.2"
22
22
  }
23
23
  }