How to use the heroku-cli-util.styledObject function in heroku-cli-util

To help you get started, we’ve selected a few heroku-cli-util examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github heroku / cli / packages / oauth-v5 / lib / commands / clients / info.js View on Github external
function * run (context, heroku) {
  let client = yield heroku.get(`/oauth/clients/${context.args.id}`)
  if (context.flags.json) {
    cli.styledJSON(client)
  } else if (context.flags.shell) {
    cli.log(`HEROKU_OAUTH_ID=${client.id}`)
    cli.log(`HEROKU_OAUTH_SECRET=${client.secret}`)
  } else {
    cli.styledHeader(client.name)
    cli.styledObject(client)
  }
}