(args)
| 94 | } |
| 95 | |
| 96 | async exec (args) { |
| 97 | const cmd = args.shift() |
| 98 | switch (cmd) { |
| 99 | case 'rm': case 'clear': case 'clean': |
| 100 | return await this.clean(args) |
| 101 | case 'add': |
| 102 | return await this.add(args) |
| 103 | case 'verify': case 'check': |
| 104 | return await this.verify() |
| 105 | case 'ls': |
| 106 | return await this.ls(args) |
| 107 | case 'npx': |
| 108 | return await this.npx(args) |
| 109 | default: |
| 110 | throw this.usageError() |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | // npm cache npx |
| 115 | async npx ([cmd, ...keys]) { |