snyk 1.687.0 → 1.688.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/index.js +45 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/thirdPartyNotice.json +2 -2
- package/package.json +2 -2
- package/pysrc/pip_resolve.py +13 -6
package/dist/cli/index.js
CHANGED
|
@@ -251153,6 +251153,46 @@ try {
|
|
|
251153
251153
|
} catch (er) {}
|
|
251154
251154
|
|
|
251155
251155
|
|
|
251156
|
+
/***/ }),
|
|
251157
|
+
|
|
251158
|
+
/***/ 41669:
|
|
251159
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
251160
|
+
|
|
251161
|
+
"use strict";
|
|
251162
|
+
|
|
251163
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
251164
|
+
exports.buildDepGraph = void 0;
|
|
251165
|
+
const legacy_1 = __webpack_require__(67790);
|
|
251166
|
+
function buildDepGraph(partialDepTree) {
|
|
251167
|
+
const packageToDepTreeMap = new Map();
|
|
251168
|
+
const queue = [partialDepTree.dependencies];
|
|
251169
|
+
const referencesToUpdate = [];
|
|
251170
|
+
while (queue.length > 0) {
|
|
251171
|
+
const dependencies = queue.pop();
|
|
251172
|
+
if (!dependencies)
|
|
251173
|
+
continue;
|
|
251174
|
+
for (const [key, dependencyDepTree] of Object.entries(dependencies)) {
|
|
251175
|
+
if (dependencyDepTree === 'true') {
|
|
251176
|
+
referencesToUpdate.push({ key, dependencies });
|
|
251177
|
+
}
|
|
251178
|
+
else {
|
|
251179
|
+
packageToDepTreeMap.set(key, dependencyDepTree);
|
|
251180
|
+
queue.push(dependencyDepTree.dependencies);
|
|
251181
|
+
}
|
|
251182
|
+
}
|
|
251183
|
+
}
|
|
251184
|
+
referencesToUpdate.forEach(({ key, dependencies }) => {
|
|
251185
|
+
if (!packageToDepTreeMap.get(key)) {
|
|
251186
|
+
// this should never happen
|
|
251187
|
+
throw new Error(`key ${key} not found in packageToDepTreeMap`);
|
|
251188
|
+
}
|
|
251189
|
+
dependencies[key] = packageToDepTreeMap.get(key);
|
|
251190
|
+
});
|
|
251191
|
+
return legacy_1.depTreeToGraph(partialDepTree, 'pip');
|
|
251192
|
+
}
|
|
251193
|
+
exports.buildDepGraph = buildDepGraph;
|
|
251194
|
+
//# sourceMappingURL=build-dep-graph.js.map
|
|
251195
|
+
|
|
251156
251196
|
/***/ }),
|
|
251157
251197
|
|
|
251158
251198
|
/***/ 69797:
|
|
@@ -251191,11 +251231,11 @@ function getDependencies(root, targetFile, options) {
|
|
|
251191
251231
|
command = 'pipenv';
|
|
251192
251232
|
baseargs = ['run', 'python'];
|
|
251193
251233
|
}
|
|
251194
|
-
const [plugin,
|
|
251234
|
+
const [plugin, dependencyGraph] = yield Promise.all([
|
|
251195
251235
|
inspect_implementation_1.getMetaData(command, baseargs, root, targetFile),
|
|
251196
251236
|
inspect_implementation_1.inspectInstalledDeps(command, baseargs, root, targetFile, options.allowMissing || false, includeDevDeps, options.args),
|
|
251197
251237
|
]);
|
|
251198
|
-
return { plugin,
|
|
251238
|
+
return { plugin, dependencyGraph };
|
|
251199
251239
|
});
|
|
251200
251240
|
}
|
|
251201
251241
|
exports.getDependencies = getDependencies;
|
|
@@ -251215,6 +251255,7 @@ const fs = __webpack_require__(35747);
|
|
|
251215
251255
|
const path = __webpack_require__(85622);
|
|
251216
251256
|
const tmp = __webpack_require__(77997);
|
|
251217
251257
|
const subProcess = __webpack_require__(9783);
|
|
251258
|
+
const build_dep_graph_1 = __webpack_require__(41669);
|
|
251218
251259
|
const types_1 = __webpack_require__(62914);
|
|
251219
251260
|
const errors_1 = __webpack_require__(99893);
|
|
251220
251261
|
const returnedTargetFile = (originalTargetFile) => {
|
|
@@ -251311,7 +251352,8 @@ function inspectInstalledDeps(command, baseargs, root, targetFile, allowMissing,
|
|
|
251311
251352
|
cwd: root,
|
|
251312
251353
|
env: pythonEnv,
|
|
251313
251354
|
});
|
|
251314
|
-
|
|
251355
|
+
const result = JSON.parse(output);
|
|
251356
|
+
return build_dep_graph_1.buildDepGraph(result);
|
|
251315
251357
|
}
|
|
251316
251358
|
catch (error) {
|
|
251317
251359
|
if (typeof error === 'string') {
|