snyk 1.1110.0 → 1.1111.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/cli/917.index.js
CHANGED
|
@@ -3392,8 +3392,6 @@ function formatInfo(issue) {
|
|
|
3392
3392
|
return `${issueDesc}${!issueDesc.endsWith('.') ? '.' : ''} ${issueImpact}`;
|
|
3393
3393
|
}
|
|
3394
3394
|
function formatProperties(result, options) {
|
|
3395
|
-
var _a;
|
|
3396
|
-
const remediationKey = constants_1.iacRemediationTypes === null || constants_1.iacRemediationTypes === void 0 ? void 0 : constants_1.iacRemediationTypes[result.projectType];
|
|
3397
3395
|
const properties = [
|
|
3398
3396
|
['Info', formatInfo(result.issue)],
|
|
3399
3397
|
[
|
|
@@ -3410,12 +3408,7 @@ function formatProperties(result, options) {
|
|
|
3410
3408
|
? `:${result.issue.lineNumber}`
|
|
3411
3409
|
: ''}`,
|
|
3412
3410
|
],
|
|
3413
|
-
[
|
|
3414
|
-
'Resolve',
|
|
3415
|
-
remediationKey && ((_a = result.issue.remediation) === null || _a === void 0 ? void 0 : _a[remediationKey])
|
|
3416
|
-
? result.issue.remediation[remediationKey]
|
|
3417
|
-
: result.issue.resolve,
|
|
3418
|
-
],
|
|
3411
|
+
['Resolve', getRemediationText(result)],
|
|
3419
3412
|
];
|
|
3420
3413
|
const propKeyColWidth = Math.max(...properties.map(([key]) => key.length));
|
|
3421
3414
|
const propValColWidth = utils_1.maxLineWidth - utils_1.contentPadding.length - propKeyColWidth - 2;
|
|
@@ -3433,6 +3426,14 @@ function formatProperties(result, options) {
|
|
|
3433
3426
|
function isValidLineNumber(lineNumber) {
|
|
3434
3427
|
return (typeof lineNumber === 'number' && lineNumber > 0 && lineNumber % 1 === 0);
|
|
3435
3428
|
}
|
|
3429
|
+
function getRemediationText(result) {
|
|
3430
|
+
var _a;
|
|
3431
|
+
const remediationKey = constants_1.iacRemediationTypes === null || constants_1.iacRemediationTypes === void 0 ? void 0 : constants_1.iacRemediationTypes[result.projectType];
|
|
3432
|
+
if (result.issue.remediation) {
|
|
3433
|
+
return (_a = result.issue.remediation[remediationKey]) !== null && _a !== void 0 ? _a : result.issue.remediation;
|
|
3434
|
+
}
|
|
3435
|
+
return result.issue.resolve;
|
|
3436
|
+
}
|
|
3436
3437
|
|
|
3437
3438
|
|
|
3438
3439
|
/***/ }),
|