@contrast/agent 5.30.0 → 5.32.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.
Files changed (2) hide show
  1. package/lib/start-agent.js +5 -3
  2. package/package.json +11 -10
@@ -17,8 +17,9 @@
17
17
 
18
18
  const process = require('process');
19
19
  const { isMainThread, threadId } = require('worker_threads');
20
- const _agentify = require('@contrast/agentify');
21
20
  const { safeConsoleError, safeConsoleWarn } = require('@contrast/common');
21
+ const { Core } = require('@contrast/core/lib/ioc/core');
22
+ const _agentify = require('@contrast/agentify');
22
23
 
23
24
  const {
24
25
  name: agentName,
@@ -30,7 +31,7 @@ const {
30
31
  } = require('../package.json');
31
32
 
32
33
  function initCore() {
33
- const core = {
34
+ const core = new Core({
34
35
  agentName,
35
36
  agentVersion,
36
37
  nodeEngines,
@@ -41,6 +42,7 @@ function initCore() {
41
42
  */
42
43
  install() {
43
44
  if (
45
+ !core.config.preinstrument &&
44
46
  !core.config.getEffectiveValue('assess.enable') &&
45
47
  !core.config.getEffectiveValue('protect.enable') &&
46
48
  !core.config.getEffectiveValue('observe.enable')
@@ -49,7 +51,7 @@ function initCore() {
49
51
  }
50
52
  }
51
53
  }
52
- };
54
+ });
53
55
 
54
56
  if (process.env.CSI_EXPOSE_CORE) {
55
57
  global[Symbol.for('contrast:core')] = core;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/agent",
3
- "version": "5.30.0",
3
+ "version": "5.32.0",
4
4
  "description": "Assess and Protect agents for Node.js",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -24,14 +24,15 @@
24
24
  "test": "../scripts/test.sh"
25
25
  },
26
26
  "dependencies": {
27
- "@contrast/agentify": "1.44.0",
28
- "@contrast/architecture-components": "1.35.0",
29
- "@contrast/assess": "1.49.0",
30
- "@contrast/common": "1.31.0",
31
- "@contrast/library-analysis": "1.37.0",
32
- "@contrast/protect": "1.56.0",
33
- "@contrast/route-coverage": "1.37.0",
34
- "@contrast/sec-obs": "1.0.0-alpha.2",
35
- "@contrast/telemetry": "1.22.0"
27
+ "@contrast/agentify": "1.46.0",
28
+ "@contrast/architecture-components": "1.37.0",
29
+ "@contrast/assess": "1.51.0",
30
+ "@contrast/common": "1.32.0",
31
+ "@contrast/core": "1.49.0",
32
+ "@contrast/library-analysis": "1.39.0",
33
+ "@contrast/protect": "1.58.0",
34
+ "@contrast/route-coverage": "1.39.0",
35
+ "@contrast/sec-obs": "1.0.0-alpha.3",
36
+ "@contrast/telemetry": "1.24.0"
36
37
  }
37
38
  }