/home/techb158/.nvm/versions/node/v16.20.2/lib/node_modules/npm/lib/commands
NameSizeModeActions
access.js55850644editdlrm
adduser.js22530644editdlrm
audit.js122340644editdlrm
bin.js7290644editdlrm
birthday.js5080644editdlrm
bugs.js8150644editdlrm
cache.js72470644editdlrm
ci.js37150644editdlrm
completion.js91240644editdlrm
config.js83080644editdlrm
dedupe.js14050644editdlrm
deprecate.js21090644editdlrm
diff.js82910644editdlrm
dist-tag.js56040644editdlrm
docs.js4470644editdlrm
doctor.js94460644editdlrm
edit.js20470644editdlrm
exec.js24990644editdlrm
explain.js36390644editdlrm
explore.js23870644editdlrm
find-dupes.js6020644editdlrm
fund.js65240644editdlrm
get.js5240644editdlrm
help-search.js57550644editdlrm
help.js46370644editdlrm
hook.js40270644editdlrm
init.js69720644editdlrm
install-ci-test.js3770644editdlrm
install-test.js3740644editdlrm
install.js52360644editdlrm
link.js51410644editdlrm
ll.js2340644editdlrm
logout.js13770644editdlrm
ls.js173510644editdlrm
org.js43050644editdlrm
outdated.js90500644editdlrm
owner.js60180644editdlrm
pack.js24190644editdlrm
ping.js8740644editdlrm
pkg.js35540644editdlrm
prefix.js3430644editdlrm
profile.js115250644editdlrm
prune.js7790644editdlrm
publish.js64810644editdlrm
query.js28730644editdlrm
rebuild.js22140644editdlrm
repo.js12720644editdlrm
restart.js3510644editdlrm
root.js2980644editdlrm
run-script.js70670644editdlrm
search.js27810644editdlrm
set-script.js26980644editdlrm
set.js5720644editdlrm
shrinkwrap.js27050644editdlrm
star.js19110644editdlrm
stars.js10520644editdlrm
start.js3410644editdlrm
stop.js3360644editdlrm
team.js45450644editdlrm
test.js3360644editdlrm
token.js69540644editdlrm
uninstall.js15520644editdlrm
unpublish.js46170644editdlrm
unstar.js1820644editdlrm
update.js17380644editdlrm
version.js36900644editdlrm
view.js147230644editdlrm
whoami.js5140644editdlrm
Edit: /home/techb158/.nvm/versions/node/v16.20.2/lib/node_modules/npm/lib/commands/exec.js (2499B)
const path = require('path') const libexec = require('libnpmexec') const BaseCommand = require('../base-command.js') class Exec extends BaseCommand { static description = 'Run a command from a local or remote npm package' static params = [ 'package', 'call', 'workspace', 'workspaces', 'include-workspace-root', ] static name = 'exec' static usage = [ '-- [@] [args...]', '--package=[@] -- [args...]', '-c \' [args...]\'', '--package=foo -c \' [args...]\'', ] static ignoreImplicitWorkspace = false static isShellout = true async exec (_args, { locationMsg, runPath } = {}) { // This is where libnpmexec will look for locally installed packages const localPrefix = this.npm.localPrefix // This is where libnpmexec will actually run the scripts from if (!runPath) { runPath = process.cwd() } const args = [..._args] const call = this.npm.config.get('call') let globalPath const { flatOptions, localBin, globalBin, globalDir, } = this.npm const output = this.npm.output.bind(this.npm) const scriptShell = this.npm.config.get('script-shell') || undefined const packages = this.npm.config.get('package') const yes = this.npm.config.get('yes') // --prefix sets both of these to the same thing, meaning the global prefix // is invalid (i.e. no lib/node_modules). This is not a trivial thing to // untangle and fix so we work around it here. if (this.npm.localPrefix !== this.npm.globalPrefix) { globalPath = path.resolve(globalDir, '..') } if (call && _args.length) { throw this.usageError() } return libexec({ ...flatOptions, // we explicitly set packageLockOnly to false because if it's true // when we try to install a missing package, we won't actually install it packageLockOnly: false, args, call, localBin, locationMsg, globalBin, globalPath, output, packages, path: localPrefix, runPath, scriptShell, yes, }) } async execWorkspaces (args, filters) { await this.setWorkspaces(filters) for (const [name, path] of this.workspaces) { const locationMsg = `in workspace ${this.npm.chalk.green(name)} at location:\n${this.npm.chalk.dim(path)}` await this.exec(args, { locationMsg, runPath: path }) } } } module.exports = Exec