index.js 631 B

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