How to use the heroku-cli-util.log 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 / heroku-apps / commands / config / get.js View on Github external
function* run (context, heroku) {
  let configVars = yield heroku.request({path: `/apps/${context.app}/config-vars`});
  let v = configVars[context.args.key];
  if (v === undefined) {
    cli.log(''); // match v3 output for missing
  } else {
    if (context.flags.shell) {
      v = process.stdout.isTTY ? shellescape([v]) : v;
      cli.log(`${context.args.key}=${v}`);
    } else {
      cli.log(v);
    }
  }
}
github heroku / cli / packages / apps-v5 / src / commands / labs / index.js View on Github external
function printFeatures (features) {
  const { sortBy } = require('lodash')

  features = sortBy(features, 'name')
  let longest = Math.max.apply(null, features.map((f) => f.name.length))
  for (let f of features) {
    let line = `${f.enabled ? '[+]' : '[ ]'} ${f.name.padEnd(longest)}`
    if (f.enabled) line = cli.color.green(line)
    line = `${line}  ${f.description}`
    cli.log(line)
  }
}
github heroku / heroku-apps / src / commands / labs / index.js View on Github external
function printFeatures (features) {
  const {sortBy} = require('lodash')

  features = sortBy(features, 'name')
  let longest = Math.max.apply(null, features.map((f) => f.name.length))
  for (let f of features) {
    let line = `${f.enabled ? '[+]' : '[ ]'} ${f.name.padEnd(longest)}`
    if (f.enabled) line = cli.color.green(line)
    line = `${line}  ${f.description}`
    cli.log(line)
  }
}
github heroku / heroku-apps / src / commands / maintenance / index.js View on Github external
function * run (context, heroku) {
  let app = yield heroku.get(`/apps/${context.app}`)
  cli.log(app.maintenance ? 'on' : 'off')
}
github heroku / cli / packages / ci-v5 / commands / ci / config-get.js View on Github external
function * run (context, heroku) {
  const pipeline = yield Utils.getPipeline(context, heroku)
  const config = yield api.configVars(heroku, pipeline.id)
  const value = config[context.args.key]

  if (context.flags.shell) {
    cli.log(`${context.args.key}=${shellescape([value])}`)
  } else {
    cli.log(value)
  }
}

heroku-cli-util

Set of helpful CLI utilities

ISC
Latest version published 5 years ago

Package Health Score

47 / 100
Full package analysis

Similar packages