@contrast/agentify 1.22.1 → 1.22.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/index.js +6 -0
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -129,6 +129,12 @@ module.exports = function init(core = {}) {
129
129
  if (core.config._errors?.length) {
130
130
  throw core.config._errors[0];
131
131
  }
132
+ if (!core.config.enable) {
133
+ const errorMessage = 'Contrast agent disabled by configuration (enable: false)';
134
+ console.log(errorMessage);
135
+ throw new IntentionalError(errorMessage);
136
+ }
137
+
132
138
  require('@contrast/logger').default(core);
133
139
  require('@contrast/core/lib/agent-info')(core);
134
140
  require('@contrast/core/lib/system-info')(core);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/agentify",
3
- "version": "1.22.1",
3
+ "version": "1.22.2",
4
4
  "description": "Configures Contrast agent services and instrumentation within an application",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@contrast/common": "1.19.0",
21
- "@contrast/config": "1.26.1",
21
+ "@contrast/config": "1.26.2",
22
22
  "@contrast/core": "1.30.0",
23
23
  "@contrast/deadzones": "1.1.2",
24
24
  "@contrast/dep-hooks": "1.3.1",