@contrast/common 1.39.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 +1 -1
- package/lib/constants.js +1 -1
- package/lib/index.js +1 -1
- package/lib/primordials.d.ts +2 -0
- package/lib/primordials.js +13 -9
- package/lib/types.d.ts +1 -0
- package/lib/types.js +1 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
package/lib/constants.js
CHANGED
package/lib/index.js
CHANGED
package/lib/primordials.d.ts
CHANGED
|
@@ -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;
|
package/lib/primordials.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright:
|
|
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
|
-
//
|
|
26
|
+
// Array
|
|
27
27
|
ArrayPrototypeJoin: Array.prototype.join,
|
|
28
28
|
ArrayPrototypeSlice: Array.prototype.slice,
|
|
29
|
-
//
|
|
29
|
+
// Buffer
|
|
30
30
|
BufferFrom: Buffer.from,
|
|
31
31
|
BufferPrototypeToString: Buffer.prototype.toString,
|
|
32
|
-
//
|
|
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
|
-
//
|
|
47
|
+
// RegExp
|
|
48
48
|
RegExpPrototypeTest: RegExp.prototype.test,
|
|
49
49
|
RegExpPrototypeExec: RegExp.prototype.exec,
|
|
50
|
-
//
|
|
50
|
+
// Function
|
|
51
51
|
FunctionPrototypeToString: Function.prototype.toString,
|
|
52
|
-
//
|
|
52
|
+
// JSON
|
|
53
53
|
JSONParse: JSON.parse,
|
|
54
54
|
JSONStringify: JSON.stringify,
|
|
55
|
+
// util
|
|
55
56
|
UtilInspect: util_1.inspect,
|
|
56
|
-
|
|
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
package/lib/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/common",
|
|
3
|
-
"version": "1.39.
|
|
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)",
|