Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function * run (context, heroku) {
let auth = yield cli.action('Rotating OAuth Authorization', heroku.request({
method: 'POST',
path: `/oauth/authorizations/${encodeURIComponent(context.args.id)}/actions/regenerate-tokens`
}))
authorizations.display(auth)
}
function * run (context, heroku) {
let endpoint = yield flags(context, heroku)
let cert = yield cli.action(`Fetching SSL certificate ${endpoint.name} info for ${cli.color.app(context.app)}`, {}, heroku.request({
path: endpoint._meta.path,
headers: { 'Accept': `application/vnd.heroku+json; version=3.${endpoint._meta.variant}` }
}))
certificateDetails(cert)
}
function * run (context, heroku) {
let auth = yield cli.action('Revoking OAuth Authorization', {success: false}, heroku.request({
method: 'DELETE',
path: `/oauth/authorizations/${encodeURIComponent(context.args.id)}`
}))
cli.log(`done, revoked authorization from ${cli.color.cyan(auth.description)}`)
}
function * run (context, heroku) {
let app = context.app
let dyno = context.args.dyno
let msg = 'Restarting'
if (dyno) msg += ` ${cli.color.cyan(dyno)}`
msg += (dyno && dyno.indexOf('.') !== -1) ? ' dyno' : ' dynos'
msg += ` on ${cli.color.app(app)}`
yield cli.action(msg, co(function * () {
yield heroku.delete(dyno ? `/apps/${app}/dynos/${encodeURIComponent(dyno)}` : `/apps/${app}/dynos`)
}))
}
function * run (context, heroku) {
let app = context.app
let dyno = context.args.dyno
let msg = 'Restarting'
if (dyno) msg += ` ${cli.color.cyan(dyno)}`
msg += (dyno && dyno.indexOf('.') !== -1) ? ' dyno' : ' dynos'
msg += ` on ${cli.color.app(app)}`
yield cli.action(msg, co(function * () {
yield heroku.delete(dyno ? `/apps/${app}/dynos/${encodeURIComponent(dyno)}` : `/apps/${app}/dynos`)
}))
}