@contrast/contrast 2.5.1 → 3.0.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/dist/auth/auth.js
CHANGED
|
@@ -101,7 +101,7 @@ const processCustomCredentials = (authParams, config) => {
|
|
|
101
101
|
const valuesToSet = {
|
|
102
102
|
apiKey: authParams.apiKey,
|
|
103
103
|
orgId: authParams.organizationId,
|
|
104
|
-
authHeader:
|
|
104
|
+
authHeader: authParams.authorization,
|
|
105
105
|
host: authParams.host
|
|
106
106
|
};
|
|
107
107
|
setConfigValues(config, valuesToSet);
|
|
@@ -17,7 +17,7 @@ export const HIGH = 'HIGH';
|
|
|
17
17
|
export const CRITICAL = 'CRITICAL';
|
|
18
18
|
// App
|
|
19
19
|
export const APP_NAME = 'contrast';
|
|
20
|
-
const APP_VERSION = '
|
|
20
|
+
const APP_VERSION = '3.0.0';
|
|
21
21
|
export const TIMEOUT = 120000;
|
|
22
22
|
export const CRITICAL_PRIORITY = 1;
|
|
23
23
|
export const HIGH_PRIORITY = 2;
|
package/dist/index.js
CHANGED
|
@@ -55,7 +55,6 @@ const start = async () => {
|
|
|
55
55
|
config.set('numOfRuns', 0);
|
|
56
56
|
}
|
|
57
57
|
if (command === 'config') {
|
|
58
|
-
console.log('config command');
|
|
59
58
|
return processConfig(argvMain, config);
|
|
60
59
|
}
|
|
61
60
|
if (command === 'auth') {
|
|
@@ -109,7 +108,7 @@ const start = async () => {
|
|
|
109
108
|
process.exit(9);
|
|
110
109
|
}
|
|
111
110
|
else {
|
|
112
|
-
logInfo('Contrast supports Node versions >=
|
|
111
|
+
logInfo('Contrast supports Node versions >=20.18.3 Node LTS. Please use one of those versions.');
|
|
113
112
|
process.exit(9);
|
|
114
113
|
}
|
|
115
114
|
}
|
package/dist/utils/getConfig.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import Conf from 'conf';
|
|
2
|
-
import { CE_URL } from '../constants/constants.js';
|
|
3
2
|
const localConfig = (name, version) => {
|
|
4
3
|
const config = new Conf({
|
|
5
4
|
projectName: '@contrast/contrast',
|
|
6
5
|
configName: name
|
|
7
6
|
});
|
|
8
7
|
config.set('version', version);
|
|
9
|
-
if (!config.has('host')) {
|
|
10
|
-
config.set('host', CE_URL);
|
|
11
|
-
}
|
|
12
8
|
return config;
|
|
13
9
|
};
|
|
14
10
|
const setConfigValues = (config, values) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/contrast",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Contrast Security's command line tool",
|
|
5
5
|
"exports": "./dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "tsc",
|
|
28
28
|
"build-binary": "esbuild src/index.ts --bundle --outdir=dist-binary --platform=node",
|
|
29
|
-
"package-binary": "pkg dist-binary/index.js --out-path binaries --targets
|
|
29
|
+
"package-binary": "pkg dist-binary/index.js --out-path binaries --targets node20-macos,node20-linux,node20-win",
|
|
30
30
|
"build-package": "yarn build && yarn build-binary && yarn package-binary",
|
|
31
31
|
"test": "export VITEST_MAX_THREADS=4 && export VITEST_MIN_THREADS=1 && vitest --dir ./tests/unit-tests/",
|
|
32
32
|
"test-debug": "export VITEST_MAX_THREADS=4 && export VITEST_MIN_THREADS=1 && vitest --dir ./tests/unit-tests/ --inspect-brk",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"proxy-tests": "vitest ./tests/integration-tests/proxy/proxy-coverage.spec.js --pool=forks"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
53
|
-
"node": ">=
|
|
53
|
+
"node": ">=20.18.3"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@aws-sdk/client-iam": "3.370.0",
|
|
@@ -84,7 +84,6 @@
|
|
|
84
84
|
"semver": "7.5.4",
|
|
85
85
|
"string-builder": "0.1.8",
|
|
86
86
|
"string-multiple-replace": "1.0.5",
|
|
87
|
-
"tsx": "^4.19.2",
|
|
88
87
|
"xml2js": "0.6.1",
|
|
89
88
|
"yarn-lockfile": "1.1.1"
|
|
90
89
|
},
|
|
@@ -101,10 +100,9 @@
|
|
|
101
100
|
"@typescript-eslint/eslint-plugin": "5.62.0",
|
|
102
101
|
"@typescript-eslint/parser": "5.62.0",
|
|
103
102
|
"@vitest/coverage-v8": "0.34.3",
|
|
104
|
-
"@yao-pkg/pkg": "^6.1.0",
|
|
105
103
|
"csv-writer": "1.6.0",
|
|
106
104
|
"dotenv": "16.3.1",
|
|
107
|
-
"esbuild": "0.
|
|
105
|
+
"esbuild": "0.18.16",
|
|
108
106
|
"eslint": "8.45.0",
|
|
109
107
|
"eslint-config-prettier": "8.8.0",
|
|
110
108
|
"eslint-plugin-prettier": "4.2.1",
|
|
@@ -113,7 +111,9 @@
|
|
|
113
111
|
"nock": "13.3.2",
|
|
114
112
|
"npm-license-crawler": "0.2.1",
|
|
115
113
|
"prettier": "2.8.8",
|
|
114
|
+
"@yao-pkg/pkg": "^6.1.0",
|
|
116
115
|
"tmp": "0.2.1",
|
|
116
|
+
"ts-node": "^10.9.2",
|
|
117
117
|
"typescript": "5.1.6",
|
|
118
118
|
"uuid": "9.0.0",
|
|
119
119
|
"vitest": "1.4.0"
|