MCPcopy Create free account
hub / github.com/npm/cli / exec

Method exec

lib/commands/install-scripts.js:33–50  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

31 }
32
33 async exec (args) {
34 const [sub, ...rest] = args
35 switch (sub) {
36 case 'approve':
37 return this.runMode('approve', rest)
38 case 'deny':
39 return this.runMode('deny', rest)
40 case 'ls':
41 case 'list':
42 return this.runMode('list', rest)
43 case 'prune':
44 return this.runMode('prune', rest)
45 default:
46 throw this.usageError(
47 sub ? `\`${sub}\` is not a recognized subcommand.` : undefined
48 )
49 }
50 }
51}
52
53module.exports = InstallScripts

Callers

nothing calls this directly

Calls 2

runModeMethod · 0.80
usageErrorMethod · 0.80

Tested by

no test coverage detected