snyk 1.1296.1 → 1.1296.2
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/573.index.js +23 -7
- package/dist/cli/573.index.js.map +1 -1
- package/help/cli-commands/iac-test.md +2 -2
- package/help/cli-commands/monitor.md +2 -2
- package/help/cli-commands/test.md +2 -2
- package/package.json +1 -1
- package/src/generated/sha256sums.txt +9 -9
- package/src/generated/version +1 -1
- package/wrapper_dist/generated/sha256sums.txt +9 -9
- package/wrapper_dist/generated/version +1 -1
package/dist/cli/573.index.js
CHANGED
|
@@ -7006,18 +7006,18 @@ async function assembleLocalPayloads(root, options, featureFlags = new Set()) {
|
|
|
7006
7006
|
const failedResults = deps.failedResults;
|
|
7007
7007
|
if (failedResults === null || failedResults === void 0 ? void 0 : failedResults.length) {
|
|
7008
7008
|
await spinner_1.spinner.clear(spinnerLbl)();
|
|
7009
|
+
const isNotJsonOrQueiet = !options.json && !options.quiet;
|
|
7010
|
+
const errorMessages = extractErrorMessages(failedResults, isNotJsonOrQueiet);
|
|
7009
7011
|
if (!options.json && !options.quiet) {
|
|
7010
7012
|
console.warn(chalk_1.default.bold.red(`${theme_1.icon.ISSUE} ${failedResults.length}/${failedResults.length + deps.scannedProjects.length} potential projects failed to get dependencies.`));
|
|
7011
|
-
failedResults.forEach((f) => {
|
|
7012
|
-
if (f.targetFile) {
|
|
7013
|
-
console.warn(theme.color.status.error(`${f.targetFile}:`));
|
|
7014
|
-
}
|
|
7015
|
-
console.warn(theme.color.status.error(` ${f.errMessage}`));
|
|
7016
|
-
});
|
|
7017
7013
|
}
|
|
7018
7014
|
debug('getDepsFromPlugin returned failed results, cannot run test/monitor', failedResults);
|
|
7019
7015
|
if (options['fail-fast']) {
|
|
7020
|
-
|
|
7016
|
+
// should include failure message if applicable
|
|
7017
|
+
const message = errorMessages.length
|
|
7018
|
+
? errorMessages
|
|
7019
|
+
: (0, errors_1.errorMessageWithRetry)('Your test request could not be completed.');
|
|
7020
|
+
throw new errors_1.FailedToRunTestError(message);
|
|
7021
7021
|
}
|
|
7022
7022
|
}
|
|
7023
7023
|
analytics.add('pluginName', deps.plugin.name);
|
|
@@ -7217,6 +7217,22 @@ function countUniqueVulns(vulns) {
|
|
|
7217
7217
|
}
|
|
7218
7218
|
return Object.keys(seen).length;
|
|
7219
7219
|
}
|
|
7220
|
+
function extractErrorMessages(results, shouldWarn) {
|
|
7221
|
+
if (!results.length) {
|
|
7222
|
+
return '';
|
|
7223
|
+
}
|
|
7224
|
+
const errorMessages = [];
|
|
7225
|
+
results.forEach((f) => {
|
|
7226
|
+
if (shouldWarn) {
|
|
7227
|
+
if (f.targetFile) {
|
|
7228
|
+
console.warn(theme.color.status.error(`${f.targetFile}:`));
|
|
7229
|
+
}
|
|
7230
|
+
console.warn(theme.color.status.error(` ${f.errMessage}`));
|
|
7231
|
+
}
|
|
7232
|
+
errorMessages.push(`${f.targetFile ? f.targetFile + ': ' : ''}${f.errMessage}`);
|
|
7233
|
+
});
|
|
7234
|
+
return errorMessages.join('\n');
|
|
7235
|
+
}
|
|
7220
7236
|
|
|
7221
7237
|
|
|
7222
7238
|
/***/ }),
|