Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function getScriptsFromScope(scope: Scope): Promise {
if (scope.kind === ScopeType.PROJECT) {
return Object.keys((await getProject()).config.scripts);
} else if (scope.kind === ScopeType.SELECT || scope.kind === ScopeType.ALL) {
return Promise.resolve(getScriptsIntersection(scope.workspaces));
}
}