(args)
| 12 | static positionals = 1 |
| 13 | |
| 14 | async exec (args) { |
| 15 | if (!args[0]) { |
| 16 | throw this.usageError('Missing required <stage-id>') |
| 17 | } |
| 18 | const stageId = args[0] |
| 19 | validateUUID(stageId, 'stage-id') |
| 20 | const opts = { ...this.npm.flatOptions } |
| 21 | const json = this.npm.config.get('json') |
| 22 | |
| 23 | const item = await npmFetch.json(`/-/stage/${stageId}`, opts) |
| 24 | |
| 25 | if (json) { |
| 26 | output.standard(JSON.stringify(item, null, 2), { [META]: true, redact: false }) |
| 27 | return |
| 28 | } |
| 29 | |
| 30 | logStageItem(item, { chalk: this.npm.chalk }) |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | module.exports = StageView |
nothing calls this directly
no test coverage detected