@contrast/core 1.26.0 → 1.27.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 CHANGED
@@ -13,7 +13,6 @@
13
13
  * way not consistent with the End User License Agreement.
14
14
  */
15
15
 
16
- import { EventEmitter } from 'events';
17
16
  import { Agentify } from '@contrast/agentify';
18
17
  import { Config } from '@contrast/config';
19
18
  import { Logger } from '@contrast/logger';
@@ -35,7 +34,6 @@ export interface Core {
35
34
  appInfo: AppInfo;
36
35
  logger: Logger;
37
36
  messages: Messages;
38
- events: { lifecycle: EventEmitter };
39
37
  patcher: Patcher;
40
38
  reporter: ReporterBus;
41
39
  protect: Protect;
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright: 2023 Contrast Security, Inc
3
+ * Contact: support@contrastsecurity.com
4
+ * License: Commercial
5
+
6
+ * NOTICE: This Software and the patented inventions embodied within may only be
7
+ * used as part of Contrast Security’s commercial offerings. Even though it is
8
+ * made available through public repositories, use of this Software is subject to
9
+ * the applicable End User Licensing Agreement found at
10
+ * https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
11
+ * between Contrast Security and the End User. The Software may not be reverse
12
+ * engineered, modified, repackaged, sold, redistributed or otherwise used in a
13
+ * way not consistent with the End User License Agreement.
14
+ */
15
+
16
+ 'use strict';
17
+
18
+ const EventEmitter = require('events');
19
+
20
+ module.exports = function init(core) {
21
+ core.messages = new EventEmitter(); // merge?
22
+ };
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@contrast/core",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "description": "Preconfigured Contrast agent core services and models",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
7
7
  "files": [
8
8
  "lib/"
9
9
  ],
10
- "main": "lib/index.js",
11
10
  "types": "lib/index.d.ts",
12
11
  "engines": {
13
12
  "npm": ">=6.13.7 <7 || >= 8.3.1",
@@ -17,17 +16,7 @@
17
16
  "test": "../scripts/test.sh"
18
17
  },
19
18
  "dependencies": {
20
- "@contrast/agentify": "1.15.0",
21
- "@contrast/common": "1.15.1",
22
- "@contrast/config": "1.20.0",
23
- "@contrast/deadzones": "1.1.0",
24
- "@contrast/dep-hooks": "1.3.0",
25
- "@contrast/fn-inspect": "^3.4.0",
26
- "@contrast/instrumentation": "1.2.1",
27
- "@contrast/logger": "1.6.0",
28
- "@contrast/patcher": "1.7.0",
29
- "@contrast/reporter": "1.21.0",
30
- "@contrast/rewriter": "1.4.2",
31
- "@contrast/scopes": "1.4.0"
19
+ "@contrast/common": "1.16.0",
20
+ "@contrast/fn-inspect": "^3.4.0"
32
21
  }
33
22
  }
package/lib/index.js DELETED
@@ -1,49 +0,0 @@
1
- /*
2
- * Copyright: 2023 Contrast Security, Inc
3
- * Contact: support@contrastsecurity.com
4
- * License: Commercial
5
-
6
- * NOTICE: This Software and the patented inventions embodied within may only be
7
- * used as part of Contrast Security’s commercial offerings. Even though it is
8
- * made available through public repositories, use of this Software is subject to
9
- * the applicable End User Licensing Agreement found at
10
- * https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
11
- * between Contrast Security and the End User. The Software may not be reverse
12
- * engineered, modified, repackaged, sold, redistributed or otherwise used in a
13
- * way not consistent with the End User License Agreement.
14
- */
15
-
16
- 'use strict';
17
-
18
- const EventEmitter = require('events');
19
-
20
- module.exports = function init(core = {}) {
21
- core.events = {
22
- lifecycle: new EventEmitter(),
23
- };
24
- core.messages = new EventEmitter(); // merge
25
-
26
- require('@contrast/config')(core);
27
- require('@contrast/logger').default(core);
28
-
29
- require('./agent-info')(core);
30
- require('./system-info')(core);
31
- require('./app-info')(core);
32
- require('./sensitive-data-masking')(core);
33
- require('./is-agent-path')(core);
34
- require('./capture-stacktrace')(core); // @contrast/info
35
-
36
- require('@contrast/patcher')(core);
37
-
38
- require('@contrast/rewriter')(core); // merge contrast-methods?
39
- require('./contrast-methods')(core); // can we remove dependency on patcher?
40
-
41
- require('@contrast/dep-hooks')(core);
42
- require('@contrast/scopes')(core);
43
- require('@contrast/deadzones')(core);
44
- require('@contrast/reporter').default(core);
45
- require('@contrast/instrumentation')(core);
46
- require('@contrast/agentify')(core);
47
-
48
- return core;
49
- };