@contrast/common 1.40.0 → 1.41.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.
@@ -2,7 +2,6 @@ export declare enum Event {
2
2
  RESPONSE_FINISH = "response-finish",
3
3
  SERVER_LISTENING = "server-listening",
4
4
  ROUTE_COVERAGE_DISCOVERY_FINISHED = "route-coverage-discovery-finished",
5
- ARCHITECTURE_COMPONENT = "architecture-component",
6
5
  ASSESS_DATAFLOW_FINDING = "assess-dataflow-findings",
7
6
  ASSESS_DATAFLOW_SAFE_POSITIVE = "assess-dataflow-safe-positive",
8
7
  ASSESS_RESPONSE_SCANNING_FINDING = "assess-response-scanning-findings",
package/lib/constants.js CHANGED
@@ -22,7 +22,6 @@ var Event;
22
22
  Event["SERVER_LISTENING"] = "server-listening";
23
23
  Event["ROUTE_COVERAGE_DISCOVERY_FINISHED"] = "route-coverage-discovery-finished";
24
24
  // reports
25
- Event["ARCHITECTURE_COMPONENT"] = "architecture-component";
26
25
  Event["ASSESS_DATAFLOW_FINDING"] = "assess-dataflow-findings";
27
26
  Event["ASSESS_DATAFLOW_SAFE_POSITIVE"] = "assess-dataflow-safe-positive";
28
27
  Event["ASSESS_RESPONSE_SCANNING_FINDING"] = "assess-response-scanning-findings";
package/lib/index.d.ts CHANGED
@@ -44,5 +44,6 @@ export interface FrameInfo {
44
44
  method: string;
45
45
  type: string | null;
46
46
  }
47
- export declare function parseStackTraceLines(lines: string[]): null | FrameInfo[];
47
+ export declare function parseStackTraceLines(lines: string[]): FrameInfo[];
48
+ export declare function identity(v: any): any;
48
49
  //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -44,6 +44,7 @@ exports.safeConsoleError = safeConsoleError;
44
44
  exports.safeConsoleWarn = safeConsoleWarn;
45
45
  exports.normalizeURI = normalizeURI;
46
46
  exports.parseStackTraceLines = parseStackTraceLines;
47
+ exports.identity = identity;
47
48
  const constants_1 = require("./constants");
48
49
  const primordials_1 = require("./primordials");
49
50
  __exportStar(require("./constants"), exports);
@@ -261,4 +262,7 @@ function parseStackTraceLines(lines) {
261
262
  }
262
263
  return ret;
263
264
  }
265
+ function identity(v) {
266
+ return v;
267
+ }
264
268
  //# sourceMappingURL=index.js.map
package/lib/types.d.ts CHANGED
@@ -248,23 +248,6 @@ export interface RequestStore {
248
248
  assess?: any;
249
249
  route?: any;
250
250
  }
251
- /**
252
- * Architecture Component registration event payload.
253
- */
254
- export interface ArchitectureComponent {
255
- /** The type of this component: database, ldap, or web server connection. */
256
- type: 'db' | 'ldap' | 'ws';
257
- /**
258
- * The URL to which this component responds.
259
- * @example "mysql://host:3306"
260
- */
261
- url: string;
262
- /**
263
- * Some indication of the subtype of the connection.
264
- * @example "MySQL"
265
- */
266
- vendor?: string;
267
- }
268
251
  /**
269
252
  * Library discovery event payload.
270
253
  */
@@ -378,7 +361,6 @@ export interface ProtectFindingEventArg {
378
361
  * one of the more specific definitions.
379
362
  */
380
363
  export interface Messages extends EventEmitter {
381
- emit(event: Event.ARCHITECTURE_COMPONENT, msg: ArchitectureComponent): boolean;
382
364
  emit(event: Event.ASSESS_DATAFLOW_FINDING, msg: any): boolean;
383
365
  emit(event: Event.LIBRARY, msg: Library): boolean;
384
366
  emit(event: Event.LIBRARY_USAGE, msg: LibraryUsage): boolean;
@@ -389,7 +371,6 @@ export interface Messages extends EventEmitter {
389
371
  emit(event: Event.UNINSTALL, msg: any): boolean;
390
372
  emit(event: Event.UNSUPPORTED_LIBRARY, msg: LibraryMetadata): boolean;
391
373
  emit(event: Event, ...args: any[]): boolean;
392
- on(event: Event.ARCHITECTURE_COMPONENT, listener: (msg: ArchitectureComponent) => void): this;
393
374
  on(event: Event.ASSESS_DATAFLOW_FINDING, listenter: (msg: any) => void): this;
394
375
  on(event: Event.LIBRARY, listener: (msg: Library) => void): this;
395
376
  on(event: Event.LIBRARY_USAGE, listener: (msg: LibraryUsage) => void): this;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/common",
3
- "version": "1.40.0",
3
+ "version": "1.41.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)",