Rework ComponentDetectionClass

This commit is contained in:
Justin Hutchings
2023-01-22 07:55:00 +00:00
parent e674ec5ee3
commit 33f25b3df3
4 changed files with 8 additions and 27 deletions
Generated Vendored
-7
View File
@@ -1,7 +0,0 @@
import { Manifest } from '@github/dependency-submission-toolkit';
export default class CondaParser {
static searchFiles(filePath?: string, filePattern?: string): string[];
static getManifestsFromEnvironmentFiles(files: string[]): any[];
static getManifestFromYaml(yaml: any, filePath: string): Manifest;
static getPurlFromDependency(dependency: string, ecosystem: string): string;
}
Generated Vendored
+3 -3
View File
@@ -23799,7 +23799,7 @@ class ComponentDetection {
}));
// Set the transitive dependencies
packages.forEach((pkg) => __awaiter(this, void 0, void 0, function* () {
pkg.toplevelReferrers.forEach((referrer) => __awaiter(this, void 0, void 0, function* () {
pkg.topLevelReferrers.forEach((referrer) => __awaiter(this, void 0, void 0, function* () {
const referrerPackage = packageCache.lookupPackage(ComponentDetection.makePackageUrl(referrer.packageUrl));
if (referrerPackage) {
referrerPackage.dependsOn(pkg);
@@ -23817,7 +23817,7 @@ class ComponentDetection {
const manifest = new dependency_submission_toolkit_1.Manifest(location.filePath, location.filePath);
manifests.push(manifest);
}
if (pkg.toplevelReferrers.length == 0) {
if (pkg.topLevelReferrers.length == 0) {
(_a = manifests.find((manifest) => manifest.file == location.filePath)) === null || _a === void 0 ? void 0 : _a.addDirectDependency(pkg, ComponentDetection.getDependencyScope(pkg));
}
else {
@@ -23878,7 +23878,7 @@ class ComponentDetectionPackage extends dependency_submission_toolkit_1.Package
super(packageUrl);
this.id = id;
this.isDevelopmentDependency = isDevelopmentDependency;
this.toplevelReferrers = topLevelReferrers;
this.topLevelReferrers = topLevelReferrers;
this.locationsFoundAt = locationsFoundAt;
this.containerDetailIds = containerDetailIds;
this.containerLayerIds = containerLayerIds;
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long