snyk 1.1095.0 → 1.1097.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.
@@ -158025,7 +158025,7 @@ function inspect(root, targetFile, options, snykHttpClient) {
158025
158025
  });
158026
158026
  let parseResult = {};
158027
158027
  if (options.mavenAggregateProject) {
158028
- parseResult = (0, parse_1.parse)(result);
158028
+ parseResult = (0, parse_1.parse)(result, options.dev);
158029
158029
  }
158030
158030
  else {
158031
158031
  parseResult = (0, parse_mvn_1.parseTree)(result, options.dev);
@@ -158216,9 +158216,9 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
158216
158216
  exports.buildDepGraph = void 0;
158217
158217
  const dep_graph_1 = __webpack_require__(71479);
158218
158218
  const dependency_1 = __webpack_require__(20448);
158219
- function buildDepGraph(mavenGraph) {
158219
+ function buildDepGraph(mavenGraph, includeTestScope = false) {
158220
158220
  const { rootId, nodes } = mavenGraph;
158221
- const root = getPkgInfo(rootId);
158221
+ const { pkgInfo: root } = getPkgInfo(rootId);
158222
158222
  const builder = new dep_graph_1.DepGraphBuilder({ name: 'maven' }, root);
158223
158223
  const visited = [];
158224
158224
  const queue = [];
@@ -158229,7 +158229,9 @@ function buildDepGraph(mavenGraph) {
158229
158229
  if (!item)
158230
158230
  continue;
158231
158231
  const { id, parentId } = item;
158232
- const pkgInfo = getPkgInfo(id);
158232
+ const { pkgInfo, scope } = getPkgInfo(id);
158233
+ if (!includeTestScope && scope === 'test')
158234
+ continue;
158233
158235
  if (visited.includes(id)) {
158234
158236
  const prunedId = id + ':pruned';
158235
158237
  builder.addPkgNode(pkgInfo, prunedId, { labels: { pruned: 'true' } });
@@ -158253,10 +158255,13 @@ function getItems(parentId, node) {
158253
158255
  return items;
158254
158256
  }
158255
158257
  function getPkgInfo(value) {
158256
- const { groupId, artifactId, version } = (0, dependency_1.parseDependency)(value);
158258
+ const { groupId, artifactId, version, scope } = (0, dependency_1.parseDependency)(value);
158257
158259
  return {
158258
- name: `${groupId}:${artifactId}`,
158259
- version,
158260
+ pkgInfo: {
158261
+ name: `${groupId}:${artifactId}`,
158262
+ version,
158263
+ },
158264
+ scope,
158260
158265
  };
158261
158266
  }
158262
158267
  //# sourceMappingURL=dep-graph.js.map
@@ -158391,12 +158396,12 @@ exports.parse = void 0;
158391
158396
  const stdout_1 = __webpack_require__(16866);
158392
158397
  const digraph_1 = __webpack_require__(2175);
158393
158398
  const dep_graph_1 = __webpack_require__(8074);
158394
- function parse(stdout) {
158399
+ function parse(stdout, includeTestScope = false) {
158395
158400
  const digraphs = (0, stdout_1.parseStdout)(stdout);
158396
158401
  const mavenGraphs = (0, digraph_1.parseDigraphs)(digraphs);
158397
158402
  const scannedProjects = [];
158398
158403
  for (const mavenGraph of mavenGraphs) {
158399
- const depGraph = (0, dep_graph_1.buildDepGraph)(mavenGraph);
158404
+ const depGraph = (0, dep_graph_1.buildDepGraph)(mavenGraph, includeTestScope);
158400
158405
  scannedProjects.push({ depGraph });
158401
158406
  }
158402
158407
  return {