Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
******************************************************************/
// TODO: Same as above, we should really be making sure we get all the transitive bins as well
for (let dependency of internalDeps) {
let depWorkspace = dependencyGraph.get(dependency) || {};
let depBinFiles =
depWorkspace.pkg &&
depWorkspace.pkg.config &&
depWorkspace.pkg.config.getBin();
if (!depBinFiles) {
continue;
}
if (!includes(dependencies, dependency)) {
// dependency is not one we are supposed to symlink right now
continue;
}
if (typeof depBinFiles === 'string') {
// package may be scoped, name will only be the second part
let binName = dependency.split('/').pop();
let src = path.join(depWorkspace.pkg.dir, depBinFiles);
let dest = path.join(pkg.nodeModulesBin, binName);
symlinksToCreate.push({ src, dest, type: 'exec' });
continue;
}
for (let [binName, binPath] of Object.entries(depBinFiles)) {
let src = path.join(depWorkspace.pkg.dir, String(binPath));
isExcluded(string) {
if (string === '__proto__') {
// Since this.values['__proto__'] always exists, we mustn't accept this as a renaming
return true;
}
if (includes(this.excludes, string)) {
return true;
}
return (
this.excludesRegex.some((excludeRegex) => (
string.match(excludeRegex)
))
);
}
}
function hasAdditionalPackages(pkg) {
return answers.additionalPackages && includes(answers.additionalPackages, pkg);
}
this.appname = answers.name;
isReserved(string) {
return includes(this.reserved, string);
}