snyk 1.1248.0 → 1.1249.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/245.index.js +8 -12
- package/dist/cli/245.index.js.map +1 -1
- package/dist/cli/thirdPartyNotice.json +2 -2
- package/package.json +1 -1
- package/src/generated/sha256sums.txt +8 -8
- package/src/generated/version +1 -1
- package/wrapper_dist/generated/sha256sums.txt +8 -8
- package/wrapper_dist/generated/version +1 -1
package/dist/cli/245.index.js
CHANGED
|
@@ -205596,11 +205596,11 @@ function leftPad(s, n) {
|
|
|
205596
205596
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
205597
205597
|
exports.findChildren = exports.buildGraph = void 0;
|
|
205598
205598
|
const dep_graph_1 = __webpack_require__(23423);
|
|
205599
|
-
async function buildGraph(snykGraph,
|
|
205599
|
+
async function buildGraph(snykGraph, rootPkgName, projectVersion, coordinateMap) {
|
|
205600
205600
|
const pkgManager = { name: 'gradle' };
|
|
205601
205601
|
const isEmptyGraph = !snykGraph || Object.keys(snykGraph).length === 0;
|
|
205602
205602
|
const depGraphBuilder = new dep_graph_1.DepGraphBuilder(pkgManager, {
|
|
205603
|
-
name:
|
|
205603
|
+
name: rootPkgName,
|
|
205604
205604
|
version: projectVersion || '0.0.0',
|
|
205605
205605
|
});
|
|
205606
205606
|
if (isEmptyGraph) {
|
|
@@ -205678,12 +205678,12 @@ const subProcess = __webpack_require__(84335);
|
|
|
205678
205678
|
const tmp = __webpack_require__(84688);
|
|
205679
205679
|
const pMap = __webpack_require__(86301);
|
|
205680
205680
|
const chalk = __webpack_require__(35337);
|
|
205681
|
-
const debugModule = __webpack_require__(15158);
|
|
205682
205681
|
const cli_interface_1 = __webpack_require__(43548);
|
|
205683
205682
|
const errors_1 = __webpack_require__(45339);
|
|
205684
205683
|
const gradle_attributes_pretty_1 = __webpack_require__(89173);
|
|
205685
205684
|
const graph_1 = __webpack_require__(23012);
|
|
205686
205685
|
const search_1 = __webpack_require__(45479);
|
|
205686
|
+
const debugModule = __webpack_require__(15158);
|
|
205687
205687
|
// To enable debugging output, use `snyk -d`
|
|
205688
205688
|
let logger = null;
|
|
205689
205689
|
function debugLog(s) {
|
|
@@ -205988,7 +205988,7 @@ async function getAllDeps(root, targetFile, options, snykHttpClient) {
|
|
|
205988
205988
|
concurrency: 100,
|
|
205989
205989
|
});
|
|
205990
205990
|
}
|
|
205991
|
-
return await processProjectsInExtractedJSON(
|
|
205991
|
+
return await processProjectsInExtractedJSON(extractedJSON, coordinateMap);
|
|
205992
205992
|
}
|
|
205993
205993
|
catch (err) {
|
|
205994
205994
|
const error = err;
|
|
@@ -206058,23 +206058,19 @@ ${chalk.red.bold(mainErrorMessage)}`;
|
|
|
206058
206058
|
throw error;
|
|
206059
206059
|
}
|
|
206060
206060
|
}
|
|
206061
|
-
async function processProjectsInExtractedJSON(
|
|
206061
|
+
async function processProjectsInExtractedJSON(extractedJSON, coordinateMap) {
|
|
206062
206062
|
for (const projectId in extractedJSON.projects) {
|
|
206063
206063
|
const { defaultProject, defaultProjectKey } = extractedJSON;
|
|
206064
206064
|
const { snykGraph, projectVersion } = extractedJSON.projects[projectId];
|
|
206065
206065
|
if (!snykGraph) {
|
|
206066
206066
|
continue;
|
|
206067
206067
|
}
|
|
206068
|
-
const invalidValues = [null, undefined, ''];
|
|
206069
|
-
const isValidRootDir = invalidValues.indexOf(root) === -1;
|
|
206070
206068
|
const isSubProject = projectId !== defaultProjectKey;
|
|
206071
|
-
let
|
|
206069
|
+
let rootPkgName = defaultProject;
|
|
206072
206070
|
if (isSubProject) {
|
|
206073
|
-
|
|
206074
|
-
? `${path.basename(root)}/${projectId}`
|
|
206075
|
-
: `${defaultProject}/${projectId}`;
|
|
206071
|
+
rootPkgName = `${defaultProject}/${projectId}`;
|
|
206076
206072
|
}
|
|
206077
|
-
extractedJSON.projects[projectId].depGraph = await (0, graph_1.buildGraph)(snykGraph,
|
|
206073
|
+
extractedJSON.projects[projectId].depGraph = await (0, graph_1.buildGraph)(snykGraph, rootPkgName, projectVersion, coordinateMap);
|
|
206078
206074
|
// this property usage ends here
|
|
206079
206075
|
delete extractedJSON.projects[projectId].snykGraph;
|
|
206080
206076
|
}
|