| 1 |
const BaseCommand = require('../../base-cmd.js') |
| 2 |
|
| 3 |
class Trust extends BaseCommand { |
| 4 |
static description = 'Create a trusted relationship between a package and a OIDC provider' |
| 5 |
static name = 'trust' |
| 6 |
static usage = null |
| 7 |
|
| 8 |
static subcommands = { |
| 9 |
github: require('./github.js'), |
| 10 |
gitlab: require('./gitlab.js'), |
| 11 |
circleci: require('./circleci.js'), |
| 12 |
list: require('./list.js'), |
| 13 |
revoke: require('./revoke.js'), |
| 14 |
} |
| 15 |
|
| 16 |
static async completion (opts) { |
| 17 |
const argv = opts.conf.argv.remain |
| 18 |
if (argv.length === 2) { |
| 19 |
return Object.keys(Trust.subcommands) |
| 20 |
} |
| 21 |
return [] |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
module.exports = Trust |