(positionalArgs)
| 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 | |
| 50 | module.exports = TrustList |
nothing calls this directly
no test coverage detected