mobbdev 0.0.8 → 0.0.9

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.
Files changed (2) hide show
  1. package/package.json +46 -45
  2. package/src/index.mjs +8 -9
package/package.json CHANGED
@@ -1,46 +1,47 @@
1
1
  {
2
- "name": "mobbdev",
3
- "version": "0.0.8",
4
- "description": "Automated secure code remediation tool",
5
- "main": "index.js",
6
- "bin": {
7
- "mobbdev": "bin/cli.mjs"
8
- },
9
- "author": "",
10
- "license": "MIT",
11
- "dependencies": {
12
- "colors": "1.4.0",
13
- "configstore": "6.0.0",
14
- "dotenv": "16.0.3",
15
- "extract-zip": "2.0.1",
16
- "form-data": "4.0.0",
17
- "got": "12.6.0",
18
- "open": "8.4.2",
19
- "snyk": "1.1118.0",
20
- "tmp": "0.2.1",
21
- "zod": "3.21.4"
22
- },
23
- "devDependencies": {
24
- "@jest/globals": "29.5.0",
25
- "eslint": "8.36.0",
26
- "jest": "29.5.0",
27
- "prettier": "2.8.4"
28
- },
29
- "engines": {
30
- "node": ">=8.5.0"
31
- },
32
- "files": [
33
- "bin",
34
- "src",
35
- "index.mjs",
36
- ".env",
37
- "README.md",
38
- "LICENSE",
39
- "package.json"
40
- ],
41
- "scripts": {
42
- "lint": "prettier --check . && eslint **/*.mjs",
43
- "lint:fix": "prettier --write . && eslint --fix **/*.mjs",
44
- "test": "DOTENV_ME=${ENV_VAULT_CLI} dotenv-vault pull development .env && TOKEN=$(../../scripts/login_auth0.sh) NODE_OPTIONS=--experimental-vm-modules jest"
45
- }
46
- }
2
+ "name": "mobbdev",
3
+ "version": "0.0.9",
4
+ "description": "Automated secure code remediation tool",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "lint": "prettier --check . && eslint **/*.mjs",
8
+ "lint:fix": "prettier --write . && eslint --fix **/*.mjs",
9
+ "test": "DOTENV_ME=${ENV_VAULT_CLI} dotenv-vault pull development .env && TOKEN=$(../../scripts/login_auth0.sh) NODE_OPTIONS=--experimental-vm-modules jest",
10
+ "prepack": "dotenv-vault pull production .env"
11
+ },
12
+ "bin": {
13
+ "mobbdev": "bin/cli.mjs"
14
+ },
15
+ "author": "",
16
+ "license": "MIT",
17
+ "dependencies": {
18
+ "colors": "1.4.0",
19
+ "configstore": "6.0.0",
20
+ "dotenv": "16.0.3",
21
+ "extract-zip": "2.0.1",
22
+ "form-data": "4.0.0",
23
+ "got": "12.6.0",
24
+ "open": "8.4.2",
25
+ "snyk": "1.1118.0",
26
+ "tmp": "0.2.1",
27
+ "zod": "3.21.4"
28
+ },
29
+ "devDependencies": {
30
+ "@jest/globals": "29.5.0",
31
+ "eslint": "8.36.0",
32
+ "jest": "29.5.0",
33
+ "prettier": "2.8.4"
34
+ },
35
+ "engines": {
36
+ "node": ">=8.5.0"
37
+ },
38
+ "files": [
39
+ "bin",
40
+ "src",
41
+ "index.mjs",
42
+ ".env",
43
+ "README.md",
44
+ "LICENSE",
45
+ "package.json"
46
+ ]
47
+ }
package/src/index.mjs CHANGED
@@ -54,11 +54,6 @@ export async function main(dirname, repoUrl) {
54
54
 
55
55
  const report = JSON.parse(fs.readFileSync(reportPath, 'utf8'));
56
56
 
57
- if ((report.runs?.at(0)?.results?.length ?? 0) === 0) {
58
- console.log('Snyk has not found any vulnerabilities — nothing to fix.');
59
- return;
60
- }
61
-
62
57
  await uploadFile(
63
58
  reportPath,
64
59
  uploadData.url,
@@ -71,8 +66,12 @@ export async function main(dirname, repoUrl) {
71
66
  reference
72
67
  );
73
68
 
74
- console.log(
75
- 'You will be redirected to our report page, please wait until the analysis is finished and enjoy your fixes.'
76
- );
77
- await open(`${WEB_REPORT_URL}${uploadData.fixReportId}`);
69
+ if ((report.runs?.at(0)?.results?.length ?? 0) === 0) {
70
+ console.log('Snyk has not found any vulnerabilities nothing to fix.');
71
+ } else {
72
+ console.log(
73
+ 'You will be redirected to our report page, please wait until the analysis is finished and enjoy your fixes.'
74
+ );
75
+ await open(`${WEB_REPORT_URL}${uploadData.fixReportId}`);
76
+ }
78
77
  }