@contrast/common 1.38.0 → 1.39.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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright: 2025 Contrast Security, Inc
1
+ Copyright: 2026 Contrast Security, Inc
2
2
  Contact: support@contrastsecurity.com
3
3
  License: Commercial
4
4
 
package/lib/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright: 2025 Contrast Security, Inc
3
+ * Copyright: 2026 Contrast Security, Inc
4
4
  * Contact: support@contrastsecurity.com
5
5
  * License: Commercial
6
6
 
package/lib/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright: 2025 Contrast Security, Inc
3
+ * Copyright: 2026 Contrast Security, Inc
4
4
  * Contact: support@contrastsecurity.com
5
5
  * License: Commercial
6
6
 
@@ -57,6 +57,8 @@ export declare const primordials: {
57
57
  };
58
58
  UtilInspect: typeof inspect;
59
59
  PathBasename: (path: string, ext?: string) => string;
60
+ PathResolve: (...paths: string[]) => string;
61
+ PathJoin: (...paths: string[]) => string;
60
62
  FsOpen: typeof fs.open;
61
63
  FsOpenSync: typeof fs.openSync;
62
64
  FsReadFile: typeof fs.readFile;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright: 2025 Contrast Security, Inc
3
+ * Copyright: 2026 Contrast Security, Inc
4
4
  * Contact: support@contrastsecurity.com
5
5
  * License: Commercial
6
6
 
@@ -19,17 +19,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
20
  exports.primordials = void 0;
21
21
  const util_1 = require("util");
22
- const path_1 = require("path");
22
+ const path_1 = __importDefault(require("path"));
23
23
  const fs_1 = __importDefault(require("fs"));
24
24
  const promises_1 = __importDefault(require("fs/promises"));
25
25
  exports.primordials = {
26
- // arrays
26
+ // Array
27
27
  ArrayPrototypeJoin: Array.prototype.join,
28
28
  ArrayPrototypeSlice: Array.prototype.slice,
29
- //buffers,
29
+ // Buffer
30
30
  BufferFrom: Buffer.from,
31
31
  BufferPrototypeToString: Buffer.prototype.toString,
32
- //strings
32
+ // String
33
33
  StringPrototypeConcat: String.prototype.concat,
34
34
  StringPrototypeMatch: String.prototype.match,
35
35
  StringPrototypeMatchAll: String.prototype.matchAll,
@@ -44,16 +44,20 @@ exports.primordials = {
44
44
  StringPrototypeToLocaleLowerCase: String.prototype.toLocaleLowerCase,
45
45
  StringPrototypeToLocaleUpperCase: String.prototype.toLocaleUpperCase,
46
46
  StringPrototypeTrim: String.prototype.trim,
47
- //regex,
47
+ // RegExp
48
48
  RegExpPrototypeTest: RegExp.prototype.test,
49
49
  RegExpPrototypeExec: RegExp.prototype.exec,
50
- //function
50
+ // Function
51
51
  FunctionPrototypeToString: Function.prototype.toString,
52
- // misc
52
+ // JSON
53
53
  JSONParse: JSON.parse,
54
54
  JSONStringify: JSON.stringify,
55
+ // util
55
56
  UtilInspect: util_1.inspect,
56
- PathBasename: path_1.basename,
57
+ // path
58
+ PathBasename: path_1.default.basename,
59
+ PathResolve: path_1.default.resolve,
60
+ PathJoin: path_1.default.join,
57
61
  // fs
58
62
  FsOpen: fs_1.default.open,
59
63
  FsOpenSync: fs_1.default.openSync,
package/lib/types.d.ts CHANGED
@@ -143,6 +143,7 @@ export type HardeningRules = Rule.UNTRUSTED_DESERIALIZATION;
143
143
  export interface Result {
144
144
  blocked: boolean;
145
145
  exploitMetadata?: any[] | any;
146
+ exploited?: boolean;
146
147
  idsList?: string[];
147
148
  inputType: string;
148
149
  key?: string;
@@ -335,6 +336,11 @@ export interface RouteInfo {
335
336
  * @example "get"
336
337
  */
337
338
  method?: string;
339
+ /**
340
+ * The HTTP framework being used.
341
+ * @example "express"
342
+ */
343
+ framework: string;
338
344
  /**
339
345
  * The type of route that is being reported. Default should be RouteType.HTTP.
340
346
  */
package/lib/types.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /*
3
- * Copyright: 2025 Contrast Security, Inc
3
+ * Copyright: 2026 Contrast Security, Inc
4
4
  * Contact: support@contrastsecurity.com
5
5
  * License: Commercial
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/common",
3
- "version": "1.38.0",
3
+ "version": "1.39.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)",