snyk-to-html
Advanced tools
Comparing version 1.13.0 to 1.13.1
@@ -20,3 +20,4 @@ #!/usr/bin/env node | ||
let output; | ||
if (program.template) { // template | ||
if (program.template) { | ||
// template | ||
template = program.template; // grab the next item | ||
@@ -40,3 +41,4 @@ if (typeof template === 'boolean') { | ||
} | ||
if (program.input) { // input source | ||
if (program.input) { | ||
// input source | ||
source = program.input; // grab the next item | ||
@@ -47,3 +49,4 @@ if (typeof source === 'boolean') { | ||
} | ||
if (program.output) { // output destination | ||
if (program.output) { | ||
// output destination | ||
output = program.output; // grab the next item | ||
@@ -62,3 +65,3 @@ if (typeof output === 'boolean') { | ||
if (output) { | ||
fs.writeFile(output, report, err => { | ||
fs.writeFile(output, report, (err) => { | ||
if (err) { | ||
@@ -65,0 +68,0 @@ return console.log(err); |
#!/usr/bin/env node | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SnykToHtml = void 0; | ||
const _ = require("@snyk/lodash"); | ||
@@ -107,3 +108,2 @@ const chalk_1 = require("chalk"); | ||
async function generateTemplate(data, template, showRemediation, summary) { | ||
var _a; | ||
if (showRemediation && data.remediation) { | ||
@@ -114,3 +114,3 @@ data.showRemediations = showRemediation; | ||
!_.isEmpty(patch) || !_.isEmpty(pin); | ||
data.anyUnresolved = !!((_a = unresolved) === null || _a === void 0 ? void 0 : _a.vulnerabilities); | ||
data.anyUnresolved = !!(unresolved === null || unresolved === void 0 ? void 0 : unresolved.vulnerabilities); | ||
data.unresolved = groupVulns(unresolved); | ||
@@ -117,0 +117,0 @@ data.upgrades = vuln_1.getUpgrades(upgrade, data.vulnerabilities); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addIssueDataToPatch = exports.getUpgrades = exports.getSeverityScore = exports.severityMap = void 0; | ||
const _ = require("@snyk/lodash"); | ||
@@ -4,0 +5,0 @@ exports.severityMap = { low: 0, medium: 1, high: 2 }; |
@@ -8,5 +8,7 @@ { | ||
"build-watch": "tsc -w", | ||
"tap": "tap test/*.test.* -Rspec --timeout=180 --node-path ts-node --test-file-pattern '/\\.[tj]s$/'", | ||
"format": "prettier --write 'src/*.{js,ts}' 'test/*.{js,ts}'", | ||
"tap": "tap -Rspec", | ||
"test": "npm run build && npm run lint && npm run tap", | ||
"lint": "tslint --project tsconfig.json --format stylish --exclude **/src/**/*.js", | ||
"lint": "eslint --color --cache 'src/*.?s' 'test/*.?s' && npm run format:check", | ||
"format:check": "prettier --check 'src/*.{js,ts}' 'test/*.{js,ts}'", | ||
"report": "mkdir -p output && cat sample-data/test-report.json | node dist/. > output/test-report.html && open output/test-report.html", | ||
@@ -24,2 +26,3 @@ "multi-report": "mkdir -p output && cat sample-data/multi-test-report.json | node dist/. > output/multi-test-report.html && open output/multi-test-report.html", | ||
"dependencies": { | ||
"@snyk/lodash": "^4.17.15-patch", | ||
"chalk": "^2.4.2", | ||
@@ -29,4 +32,3 @@ "commander": "^4.1.1", | ||
"handlebars": "^4.7.3", | ||
"@snyk/lodash": "^4.17.15-patch", | ||
"marked": "^0.8.1", | ||
"marked": "^1.1.1", | ||
"moment": "^2.24.0", | ||
@@ -43,3 +45,8 @@ "source-map-support": "^0.5.16" | ||
"@types/node": "^6.14.7", | ||
"tap": "github:snyk/node-tap#alternative-runtimes", | ||
"@typescript-eslint/eslint-plugin": "2.31.0", | ||
"@typescript-eslint/parser": "2.31.0", | ||
"eslint": "6.8.0", | ||
"eslint-config-prettier": "6.11.0", | ||
"prettier": "1.19.1", | ||
"tap": "^14.10.7", | ||
"ts-node": "^8.4.1", | ||
@@ -61,3 +68,3 @@ "tslint": "^5.20.0", | ||
}, | ||
"version": "1.13.0" | ||
"version": "1.13.1" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
71537
388
12
+ Addedmarked@1.2.9(transitive)
- Removedmarked@0.8.2(transitive)
Updatedmarked@^1.1.1