Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const getAffectedLibs = () => {
const p = parseFiles(process.argv.slice(3));
const touchedFiles = p.files;
const config = JSON.parse(fs.readFileSync('.angular-cli.json', 'utf-8'));
const projects = (config.apps ? config.apps : []).map(function (p) {
return {
name: p.name,
isApp: p.root.startsWith('libs/'),
files: allFilesInDir(path.dirname(p.root))
};
});
if (!config.project.npmScope) {
throw new Error(".angular-cli.json must define the npmScope property.");
}
return affectedApps(config.project.npmScope, projects, function (f) { return fs.readFileSync(f, 'utf-8'); }, touchedFiles);
}