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

Method exec

deps/npm/lib/commands/trust/list.js:35–47  ·  view source on GitHub ↗
(positionalArgs)

Source from the content-addressed store, hash-verified

33 }
34
35 async exec (positionalArgs) {
36 const packageName = positionalArgs[0] || (await this.optionalPkgJson()).name
37 if (!packageName) {
38 throw new Error('Package name must be specified either as an argument or in the package.json file')
39 }
40 const spec = npa(packageName)
41 const uri = `/-/package/${spec.escapedName}/trust`
42 const body = await otplease(this.npm, this.npm.flatOptions, opts => npmFetch.json(uri, {
43 ...opts,
44 method: 'GET',
45 }))
46 this.displayResponseBody({ body, packageName })
47 }
48}
49
50module.exports = TrustList

Callers

nothing calls this directly

Calls 4

otpleaseFunction · 0.85
optionalPkgJsonMethod · 0.80
displayResponseBodyMethod · 0.80
jsonMethod · 0.65

Tested by

no test coverage detected