use of com.blackducksoftware.integration.hub.detect.workflow.search.result.PassedDetectorResult in project hub-detect by blackducksoftware.
the class NpmPackageLockDetector method applicable.
@Override
public DetectorResult applicable() {
lockfile = fileFinder.findFile(environment.getDirectory(), PACKAGE_LOCK_JSON);
if (lockfile == null) {
return new FileNotFoundDetectorResult(PACKAGE_LOCK_JSON);
}
File foundPackageJson = fileFinder.findFile(environment.getDirectory(), PACKAGE_JSON);
if (foundPackageJson == null) {
logger.warn("Npm applied but it could not find a package.json so dependencies may not be entirely accurate.");
} else {
packageJson = Optional.of(foundPackageJson);
}
return new PassedDetectorResult();
}
use of com.blackducksoftware.integration.hub.detect.workflow.search.result.PassedDetectorResult in project hub-detect by blackducksoftware.
the class NpmShrinkwrapDetector method applicable.
@Override
public DetectorResult applicable() {
lockfile = fileFinder.findFile(environment.getDirectory(), SHRINKWRAP_JSON);
if (lockfile == null) {
return new FileNotFoundDetectorResult(SHRINKWRAP_JSON);
}
File foundPackageJson = fileFinder.findFile(environment.getDirectory(), PACKAGE_JSON);
if (foundPackageJson == null) {
logger.warn("Npm applied but it could not find a package.json so dependencies may not be entirely accurate.");
} else {
packageJson = Optional.of(foundPackageJson);
}
return new PassedDetectorResult();
}
Aggregations