@contrast/common 1.3.0 → 1.3.1
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/constants.d.ts +3 -1
- package/lib/constants.js +2 -0
- package/lib/constants.js.map +1 -1
- package/lib/types.d.ts +1 -0
- package/package.json +2 -2
- package/src/constants.ts +2 -0
- package/src/types.ts +1 -0
package/lib/constants.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export declare enum Event {
|
|
2
2
|
ASSESS = "assess",
|
|
3
3
|
PROTECT = "protect",
|
|
4
|
+
LIBRARY_USAGE = "library-usage",
|
|
4
5
|
ARCHITECTURE_COMPONENT = "architecture-component",
|
|
5
|
-
SERVER_SETTINGS_UPDATE = "server-settings-update"
|
|
6
|
+
SERVER_SETTINGS_UPDATE = "server-settings-update",
|
|
7
|
+
ASSESS_DATAFLOW_FINDING = "assess-dataflow-findings"
|
|
6
8
|
}
|
|
7
9
|
export declare enum ProtectRuleMode {
|
|
8
10
|
OFF = "off",
|
package/lib/constants.js
CHANGED
|
@@ -19,8 +19,10 @@ var Event;
|
|
|
19
19
|
(function (Event) {
|
|
20
20
|
Event["ASSESS"] = "assess";
|
|
21
21
|
Event["PROTECT"] = "protect";
|
|
22
|
+
Event["LIBRARY_USAGE"] = "library-usage";
|
|
22
23
|
Event["ARCHITECTURE_COMPONENT"] = "architecture-component";
|
|
23
24
|
Event["SERVER_SETTINGS_UPDATE"] = "server-settings-update";
|
|
25
|
+
Event["ASSESS_DATAFLOW_FINDING"] = "assess-dataflow-findings";
|
|
24
26
|
})(Event = exports.Event || (exports.Event = {}));
|
|
25
27
|
var ProtectRuleMode;
|
|
26
28
|
(function (ProtectRuleMode) {
|
package/lib/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAEH,IAAY,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AA;IACzC,8DAAiD,CAAA;IACjD,gDAAmC,CAAA;IACnC,0DAA6C,CAAA;IAC7C,8CAAiC,CAAA;IACjC,oCAAuB,CAAA;IACvB,oCAAuB,CAAA;IACvB,8BAAiB,CAAA;IACjB,gCAAmB,CAAA;IACnB,4CAA+B,CAAA;IAC/B,gCAAmB,CAAA;AACrB,CAAC,EAvBW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAuBpB;AAEY,QAAA,cAAc,GAAG,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC"}
|
package/lib/types.d.ts
CHANGED
|
@@ -120,6 +120,7 @@ export interface Messages extends EventEmitter {
|
|
|
120
120
|
emit(event: Event.SERVER_SETTINGS_UPDATE, msg: Record<string, any>): boolean;
|
|
121
121
|
on(event: Event.ARCHITECTURE_COMPONENT, listener: (msg: Record<string, any>) => void): this;
|
|
122
122
|
on(event: Event.PROTECT, listener: (msg: RequestStore) => void): this;
|
|
123
|
+
on(event: Event.LIBRARY_USAGE, listener: (msg: Record<string, any>) => void): this;
|
|
123
124
|
on(event: Event.SERVER_SETTINGS_UPDATE, listener: (msg: Record<string, any>) => void): this;
|
|
124
125
|
prependListener(event: Event.PROTECT, listener: (msg: RequestStore) => void): this;
|
|
125
126
|
prependOnceListener(event: Event.PROTECT, listener: (msg: RequestStore) => void): this;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/common",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Shared constants and utilities for all Contrast Agent modules",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
"build": "tsc --build src/",
|
|
15
15
|
"test": "../scripts/test.sh"
|
|
16
16
|
}
|
|
17
|
-
}
|
|
17
|
+
}
|
package/src/constants.ts
CHANGED
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
export enum Event {
|
|
17
17
|
ASSESS = 'assess',
|
|
18
18
|
PROTECT = 'protect',
|
|
19
|
+
LIBRARY_USAGE = 'library-usage',
|
|
19
20
|
ARCHITECTURE_COMPONENT = 'architecture-component',
|
|
20
21
|
SERVER_SETTINGS_UPDATE = 'server-settings-update',
|
|
22
|
+
ASSESS_DATAFLOW_FINDING = 'assess-dataflow-findings',
|
|
21
23
|
}
|
|
22
24
|
export enum ProtectRuleMode {
|
|
23
25
|
OFF = 'off',
|
package/src/types.ts
CHANGED
|
@@ -169,6 +169,7 @@ export interface Messages extends EventEmitter {
|
|
|
169
169
|
|
|
170
170
|
on(event: Event.ARCHITECTURE_COMPONENT, listener: (msg: Record<string, any>) => void): this;
|
|
171
171
|
on(event: Event.PROTECT, listener: (msg: RequestStore) => void): this;
|
|
172
|
+
on(event: Event.LIBRARY_USAGE, listener: (msg: Record<string, any>) => void): this
|
|
172
173
|
on(event: Event.SERVER_SETTINGS_UPDATE, listener: (msg: Record<string, any>) => void): this;
|
|
173
174
|
|
|
174
175
|
prependListener(event: Event.PROTECT, listener: (msg: RequestStore) => void,): this;
|