Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.handler = (argv) => {
npv.hasPackageJson(argv.cwd, true);
npv.hasDependencies(argv.cwd, true);
if (npv.hasNodeModules(argv.cwd, false)) {
let canonicalNameMapper;
if (fs.existsSync(argv.nm)) {
const mappings = canonicalName.loadNameMapperFile(argv.nm);
canonicalNameMapper = canonicalName.init(mappings);
} else {
console.error(`File not found: ${argv.nm}`);
process.exit(1);
}
if (fs.existsSync(argv.ul)) {
validator.validate(argv.ul);
unifiedList.load(argv.ul);
} else {
console.error(`File not found: ${argv.ul}`);
exports.handler = (argv) => {
npv.hasPackageJson(argv.cwd, true);
npv.hasDependencies(argv.cwd, true);
if (npv.hasNodeModules(argv.cwd, false)) {
let canonicalNameMapper;
if (fs.existsSync(argv.nm)) {
const mappings = canonicalName.loadNameMapperFile(argv.nm);
canonicalNameMapper = canonicalName.init(mappings);
} else {
console.error(`File not found: ${argv.nm}`);
process.exit(1);
}
if (fs.existsSync(argv.ul)) {
validator.validate(argv.ul);
unifiedList.load(argv.ul);
} else {
console.error(`File not found: ${argv.ul}`);
exports.handler = (argv) => {
npv.hasPackageJson(argv.cwd, true);
npv.hasDependencies(argv.cwd, true);
if (npv.hasNodeModules(argv.cwd, false)) {
let canonicalNameMapper;
if (fs.existsSync(argv.nm)) {
const mappings = canonicalName.loadNameMapperFile(argv.nm);
canonicalNameMapper = canonicalName.init(mappings);
} else {
console.error(`File not found: ${argv.nm}`);
process.exit(1);
}
if (fs.existsSync(argv.ul)) {
validator.validate(argv.ul);
unifiedList.load(argv.ul);
} else {
console.error(`File not found: ${argv.ul}`);