How to use the heroku-cli-util.command 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 / heroku-container-tools / commands / login.js View on Github external
module.exports = function(topic) {
  return {
    topic: topic,
    command: 'login',
    flags: [{ name: 'verbose', char: 'v', hasValue: false }],
    description: 'Logs in to the Heroku Docker registry',
    needsApp: false,
    needsAuth: true,
    run: cli.command(co.wrap(login))
  };
};
github heroku / heroku-container-tools / commands / push.js View on Github external
module.exports = function(topic) {
  return {
    topic: topic,
    command: 'push',
    description: 'Builds, then pushes a Docker image to deploy your Heroku app',
    needsApp: true,
    needsAuth: true,
    args: [{ name: 'process', optional: true }],
    run: cli.command(co.wrap(push))
  };
};
github heroku / heroku-apps / src / commands / auth / token.js View on Github external
const cli = require('heroku-cli-util')
const co = require('co')

function * run (context, heroku) {
  if (process.env.HEROKU_API_KEY) cli.warn('HEROKU_API_KEY is set')
  if (!context.auth.password) throw new Error('not logged in')
  cli.log(context.auth.password)
}

module.exports = {
  topic: 'auth',
  command: 'token',
  description: 'display the current auth token',
  run: cli.command(co.wrap(run))
}
github heroku / cli / packages / redis-v5 / commands / index.js View on Github external
'use strict'

const api = require('../lib/shared')
const cli = require('heroku-cli-util')

module.exports = {
  topic: 'redis',
  needsApp: true,
  needsAuth: true,
  args: [{ name: 'database', optional: true }],
  description: 'gets information about redis',
  run: cli.command((ctx, heroku) => api(ctx, heroku).info())
}
github heroku / cli / packages / redis-v5 / commands / info.js View on Github external
'use strict'

const api = require('../lib/shared')
const cli = require('heroku-cli-util')

module.exports = {
  topic: 'redis',
  command: 'info',
  needsApp: true,
  needsAuth: true,
  args: [{ name: 'database', optional: true }],
  description: 'gets information about redis',
  run: cli.command((ctx, heroku) => api(ctx, heroku).info())
}

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