use of com.synopsys.integration.detectable.detectables.pnpm.lockfile.model.PnpmProjectPackage in project synopsys-detect by blackducksoftware.
the class PnpmYamlTransformer method convertPnpmLockYamlToPnpmProjectPackage.
private PnpmProjectPackage convertPnpmLockYamlToPnpmProjectPackage(PnpmLockYaml pnpmLockYaml) {
PnpmProjectPackage pnpmProjectPackage = new PnpmProjectPackage();
pnpmProjectPackage.dependencies = pnpmLockYaml.dependencies;
pnpmProjectPackage.devDependencies = pnpmLockYaml.devDependencies;
pnpmProjectPackage.optionalDependencies = pnpmLockYaml.optionalDependencies;
return pnpmProjectPackage;
}
use of com.synopsys.integration.detectable.detectables.pnpm.lockfile.model.PnpmProjectPackage in project synopsys-detect by blackducksoftware.
the class PnpmLockYamlParser method createCodeLocationsFromImports.
private List<CodeLocation> createCodeLocationsFromImports(File sourcePath, PnpmLockYaml pnpmLockYaml, PnpmLinkedPackageResolver linkedPackageResolver, @Nullable NameVersion projectNameVersion) throws IntegrationException {
if (MapUtils.isEmpty(pnpmLockYaml.importers)) {
return Collections.emptyList();
}
List<CodeLocation> codeLocations = new LinkedList<>();
for (Map.Entry<String, PnpmProjectPackage> projectPackageInfo : pnpmLockYaml.importers.entrySet()) {
String projectKey = projectPackageInfo.getKey();
PnpmProjectPackage projectPackage = projectPackageInfo.getValue();
NameVersion extractedNameVersion = extractProjectInfo(projectPackageInfo, linkedPackageResolver, projectNameVersion);
String reportingProjectPackagePath = null;
if (!isNodeRoot.evaluate(projectKey)) {
reportingProjectPackagePath = projectKey;
}
File generatedSourcePath = generateCodeLocationSourcePath(sourcePath, reportingProjectPackagePath);
codeLocations.add(pnpmTransformer.generateCodeLocation(generatedSourcePath, projectPackage, reportingProjectPackagePath, extractedNameVersion, pnpmLockYaml.packages, linkedPackageResolver));
}
return codeLocations;
}
Aggregations