Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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))
};
};
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))
};
};
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))
}
'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())
}
'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())
}