Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default async function runRemovePrompt() {
const scope = await runScopeSelectPrompt();
const packagesInput = await runPackagesInputPrompt({
message: 'What package(s) to remove?'
});
const packages: string[] = packagesInput.split(" ");
if (scope.type === ScopeType.PROJECT) {
await projectRemove({
deps: packages
});
} else if (scope.type === ScopeType.ALL) {
await workspacesRemove({
deps: packages,
filterOpts: {}
});
} else if (scope.type === ScopeType.SELECT) {
for (const w of scope.workspaces) {
await workspaceRemove({
pkgName: w.name,
deps: packages
});
}
}
}