MCPcopy Index your code
hub / github.com/nodejs/node / exec

Method exec

deps/npm/lib/commands/profile.js:75–100  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

73 }
74
75 async exec (args) {
76 if (args.length === 0) {
77 throw this.usageError()
78 }
79
80 const [subcmd, ...opts] = args
81
82 switch (subcmd) {
83 case 'enable-2fa':
84 case 'enable-tfa':
85 case 'enable2fa':
86 case 'enabletfa':
87 return this.enable2fa(opts)
88 case 'disable-2fa':
89 case 'disable-tfa':
90 case 'disable2fa':
91 case 'disabletfa':
92 return this.disable2fa()
93 case 'get':
94 return this.get(opts)
95 case 'set':
96 return this.set(opts)
97 default:
98 throw new Error('Unknown profile command: ' + subcmd)
99 }
100 }
101
102 async get (args) {
103 const tfa = 'two-factor auth'

Callers

nothing calls this directly

Calls 5

enable2faMethod · 0.95
disable2faMethod · 0.95
getMethod · 0.95
setMethod · 0.95
usageErrorMethod · 0.80

Tested by

no test coverage detected