Transpiled JS
This commit is contained in:
+8
-6
@@ -36128,23 +36128,25 @@ class ComponentDetection {
|
|||||||
packages.forEach((pkg) => {
|
packages.forEach((pkg) => {
|
||||||
pkg.locationsFoundAt.forEach((location) => {
|
pkg.locationsFoundAt.forEach((location) => {
|
||||||
var _a, _b;
|
var _a, _b;
|
||||||
if (!manifests.find((manifest) => manifest.name == location)) {
|
// Use the normalized path (remove leading slash if present)
|
||||||
const manifest = new dependency_submission_toolkit_1.Manifest(location, location);
|
const normalizedLocation = location.startsWith('/') ? location.substring(1) : location;
|
||||||
|
if (!manifests.find((manifest) => manifest.name == normalizedLocation)) {
|
||||||
|
const manifest = new dependency_submission_toolkit_1.Manifest(normalizedLocation, normalizedLocation);
|
||||||
manifests.push(manifest);
|
manifests.push(manifest);
|
||||||
}
|
}
|
||||||
const depGraphEntry = dependencyGraphs[location];
|
const depGraphEntry = dependencyGraphs[normalizedLocation];
|
||||||
if (!depGraphEntry) {
|
if (!depGraphEntry) {
|
||||||
core.warning(`No dependency graph entry found for manifest location: ${location}`);
|
core.warning(`No dependency graph entry found for manifest location: ${normalizedLocation}`);
|
||||||
return; // Skip this location if not found in dependencyGraphs
|
return; // Skip this location if not found in dependencyGraphs
|
||||||
}
|
}
|
||||||
const directDependencies = depGraphEntry.explicitlyReferencedComponentIds;
|
const directDependencies = depGraphEntry.explicitlyReferencedComponentIds;
|
||||||
if (directDependencies.includes(pkg.id)) {
|
if (directDependencies.includes(pkg.id)) {
|
||||||
(_a = manifests
|
(_a = manifests
|
||||||
.find((manifest) => manifest.name == location)) === null || _a === void 0 ? void 0 : _a.addDirectDependency(pkg, ComponentDetection.getDependencyScope(pkg));
|
.find((manifest) => manifest.name == normalizedLocation)) === null || _a === void 0 ? void 0 : _a.addDirectDependency(pkg, ComponentDetection.getDependencyScope(pkg));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
(_b = manifests
|
(_b = manifests
|
||||||
.find((manifest) => manifest.name == location)) === null || _b === void 0 ? void 0 : _b.addIndirectDependency(pkg, ComponentDetection.getDependencyScope(pkg));
|
.find((manifest) => manifest.name == normalizedLocation)) === null || _b === void 0 ? void 0 : _b.addIndirectDependency(pkg, ComponentDetection.getDependencyScope(pkg));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user