snyk 1.1034.0 → 1.1035.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/784.index.js +20 -0
- package/dist/cli/784.index.js.map +1 -1
- package/dist/cli/917.index.js +17 -112
- package/dist/cli/917.index.js.map +1 -1
- package/dist/cli/commands/test/iac/local-execution/types.d.ts +0 -2
- package/dist/cli/index.js +0 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/lib/iac/test/v2/local-cache/rules-bundle/index.d.ts +1 -2
- package/package.json +1 -1
- package/dist/lib/iac/test/v2/local-cache/rules-bundle/download.d.ts +0 -10
- package/dist/lib/iac/test/v2/local-cache/rules-bundle/lookup-local.d.ts +0 -6
package/dist/cli/784.index.js
CHANGED
|
@@ -5833,6 +5833,7 @@ const theme_1 = __webpack_require__(86988);
|
|
|
5833
5833
|
const snyk_module_1 = __webpack_require__(60390);
|
|
5834
5834
|
const depGraphLib = __webpack_require__(71479);
|
|
5835
5835
|
const theme = __webpack_require__(86988);
|
|
5836
|
+
const json_1 = __webpack_require__(27019);
|
|
5836
5837
|
const legacy_1 = __webpack_require__(34013);
|
|
5837
5838
|
const errors_1 = __webpack_require__(55191);
|
|
5838
5839
|
const snyk = __webpack_require__(9146);
|
|
@@ -5986,6 +5987,10 @@ async function runTest(projectType, root, options) {
|
|
|
5986
5987
|
const spinnerLbl = 'Querying vulnerabilities database...';
|
|
5987
5988
|
try {
|
|
5988
5989
|
const payloads = await assemblePayloads(root, options);
|
|
5990
|
+
if (options['print-graph'] && !options['print-deps']) {
|
|
5991
|
+
const results = [];
|
|
5992
|
+
return results;
|
|
5993
|
+
}
|
|
5989
5994
|
return await sendAndParseResults(payloads, spinnerLbl, root, options);
|
|
5990
5995
|
}
|
|
5991
5996
|
catch (error) {
|
|
@@ -6265,6 +6270,21 @@ async function assembleLocalPayloads(root, options) {
|
|
|
6265
6270
|
const originalProjectName = scannedProject.depGraph
|
|
6266
6271
|
? pkg.rootPkg.name
|
|
6267
6272
|
: pkg.name;
|
|
6273
|
+
// print dep graph if `--print-graph` is set
|
|
6274
|
+
if (options['print-graph'] && !options['print-deps']) {
|
|
6275
|
+
await spinner_1.spinner.clear(spinnerLbl)();
|
|
6276
|
+
let root;
|
|
6277
|
+
if (scannedProject.depGraph) {
|
|
6278
|
+
root = pkg;
|
|
6279
|
+
}
|
|
6280
|
+
else {
|
|
6281
|
+
const tempDepTree = pkg;
|
|
6282
|
+
root = await depGraphLib.legacy.depTreeToGraph(tempDepTree, packageManager ? packageManager : '');
|
|
6283
|
+
}
|
|
6284
|
+
console.log('DepGraph data:');
|
|
6285
|
+
console.log(json_1.jsonStringifyLargeObject(root.toJSON()));
|
|
6286
|
+
console.log('DepGraph target:\n' + targetFile + '\nDepGraph end');
|
|
6287
|
+
}
|
|
6268
6288
|
const body = {
|
|
6269
6289
|
// WARNING: be careful changing this as it affects project uniqueness
|
|
6270
6290
|
targetFile: project.plugin.targetFile,
|