Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function ValidateHostManager ({path, type, validatorValues, validatorOptions}) {
debug('validate-host-manager')(
`invoked with validator options: ${JSON.stringify(validatorValues)}`
)
const options = {
lockfilePath: path,
lockfileType: type
}
const parser = new ParseLockfile(options)
const lockfile = parser.parseSync()
const validator = new ValidateHost({packages: lockfile.object})
return validator.validate(validatorValues, validatorOptions)
}