MCPcopy Create free account
hub / github.com/nodejs/node / exec

Method exec

deps/npm/lib/commands/org.js:34–50  ·  view source on GitHub ↗
([cmd, orgname, username, role])

Source from the content-addressed store, hash-verified

32 }
33
34 async exec ([cmd, orgname, username, role]) {
35 return otplease(this.npm, {
36 ...this.npm.flatOptions,
37 }, opts => {
38 switch (cmd) {
39 case 'add':
40 case 'set':
41 return this.set(orgname, username, role, opts)
42 case 'rm':
43 return this.rm(orgname, username, opts)
44 case 'ls':
45 return this.ls(orgname, username, opts)
46 default:
47 throw this.usageError()
48 }
49 })
50 }
51
52 async set (org, user, role, opts) {
53 role = role || 'developer'

Callers

nothing calls this directly

Calls 5

setMethod · 0.95
rmMethod · 0.95
lsMethod · 0.95
otpleaseFunction · 0.85
usageErrorMethod · 0.80

Tested by

no test coverage detected