Socket
Socket
Sign inDemoInstall

heroku-certs

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heroku-certs - npm Package Compare versions

Comparing version 1.1.20 to 1.1.21

lib/format_endpoint.js

8

commands/certs/add.js

@@ -308,3 +308,4 @@ 'use strict'

let cmd = {
module.exports = {
topic: 'certs',
command: 'add',

@@ -329,6 +330,1 @@ args: [

}
module.exports = [
Object.assign({topic: 'certs'}, cmd),
Object.assign({topic: '_certs', hidden: true}, cmd)
]

@@ -21,3 +21,4 @@ 'use strict'

let cmd = {
module.exports = {
topic: 'certs',
command: 'chain',

@@ -30,7 +31,1 @@ description: 'print an ordered & complete chain for a certificate',

}
module.exports = [
Object.assign({topic: 'certs'}, cmd),
Object.assign({topic: '_certs', hidden: true}, cmd)
]

@@ -111,3 +111,4 @@ 'use strict'

let cmd = {
module.exports = {
topic: 'certs',
command: 'generate',

@@ -171,6 +172,1 @@ args: [

}
module.exports = [
Object.assign({topic: 'certs'}, cmd),
Object.assign({topic: '_certs', hidden: true}, cmd)
]

@@ -19,3 +19,4 @@ 'use strict'

let cmd = {
module.exports = {
topic: 'certs',
description: 'List SSL certificates for an app.',

@@ -26,6 +27,1 @@ needsApp: true,

}
module.exports = [
Object.assign({topic: 'certs'}, cmd),
Object.assign({topic: '_certs', hidden: true}, cmd)
]

@@ -20,3 +20,4 @@ 'use strict'

let cmd = {
module.exports = {
topic: 'certs',
command: 'info',

@@ -32,6 +33,1 @@ flags: [

}
module.exports = [
Object.assign({topic: 'certs'}, cmd),
Object.assign({topic: '_certs', hidden: true}, cmd)
]

@@ -21,3 +21,4 @@ 'use strict'

let cmd = {
module.exports = {
topic: 'certs',
command: 'key',

@@ -36,6 +37,1 @@ description: 'print the correct key for the given certificate',

}
module.exports = [
Object.assign({topic: 'certs'}, cmd),
Object.assign({topic: '_certs', hidden: true}, cmd)
]

@@ -8,2 +8,3 @@ 'use strict'

let endpoints = require('../../lib/endpoints.js')
let formatEndpoint = require('../../lib/format_endpoint.js')

@@ -13,8 +14,8 @@ function * run (context, heroku) {

let cname = endpoint.cname ? `(${endpoint.cname}) ` : ''
let formattedEndpoint = formatEndpoint(endpoint)
yield cli.confirmApp(context.app, context.flags.confirm, `Potentially Destructive Action\nThis command will remove the endpoint ${endpoint.name} ${cname}from ${cli.color.app(context.app)}.`)
yield cli.confirmApp(context.app, context.flags.confirm, `Potentially Destructive Action\nThis command will remove the endpoint ${formattedEndpoint} from ${cli.color.app(context.app)}.`)
let actions = yield {
action: cli.action(`Removing SSL certificate ${endpoint.name} ${cname}from ${cli.color.app(context.app)}`, {}, heroku.request({
action: cli.action(`Removing SSL certificate ${formattedEndpoint} from ${cli.color.app(context.app)}`, {}, heroku.request({
path: endpoint._meta.path,

@@ -32,3 +33,4 @@ method: 'DELETE',

let cmd = {
module.exports = {
topic: 'certs',
command: 'remove',

@@ -45,6 +47,1 @@ flags: [

}
module.exports = [
Object.assign({topic: 'certs'}, cmd),
Object.assign({topic: '_certs', hidden: true}, cmd)
]

@@ -9,2 +9,3 @@ 'use strict'

let displayWarnings = require('../../lib/display_warnings.js')
let formatEndpoint = require('../../lib/format_endpoint.js')
let certificateDetails = require('../../lib/certificate_details.js')

@@ -18,5 +19,7 @@

yield cli.confirmApp(context.app, context.flags.confirm, `Potentially Destructive Action\nThis command will change the certificate of endpoint ${endpoint.name} (${endpoint.cname}) from ${cli.color.app(context.app)}.`)
let formattedEndpoint = formatEndpoint(endpoint)
let cert = yield cli.action(`Rolling back SSL certificate ${endpoint.name} (${endpoint.cname}) for ${cli.color.app(context.app)}`, {}, heroku.request({
yield cli.confirmApp(context.app, context.flags.confirm, `Potentially Destructive Action\nThis command will change the certificate of endpoint ${formattedEndpoint} from ${cli.color.app(context.app)}.`)
let cert = yield cli.action(`Rolling back SSL certificate ${formattedEndpoint} for ${cli.color.app(context.app)}`, {}, heroku.request({
path: `/apps/${context.app}/ssl-endpoints/${encodeURIComponent(endpoint.cname)}/rollback`,

@@ -31,3 +34,4 @@ method: 'POST',

let cmd = {
module.exports = {
topic: 'certs',
command: 'rollback',

@@ -44,7 +48,1 @@ flags: [

}
module.exports = [
Object.assign({topic: 'certs'}, cmd),
Object.assign({topic: '_certs', hidden: true}, cmd)
]

@@ -10,2 +10,3 @@ 'use strict'

let displayWarnings = require('../../lib/display_warnings.js')
let formatEndpoint = require('../../lib/format_endpoint.js')
let certificateDetails = require('../../lib/certificate_details.js')

@@ -31,7 +32,7 @@

yield cli.confirmApp(context.app, context.flags.confirm, `Potentially Destructive Action\nThis command will change the certificate of endpoint ${endpoint.name} (${endpoint.cname}) from ${cli.color.app(context.app)}.`)
let formattedEndpoint = formatEndpoint(endpoint)
let cname = endpoint.cname ? `(${endpoint.cname}) ` : ''
yield cli.confirmApp(context.app, context.flags.confirm, `Potentially Destructive Action\nThis command will change the certificate of endpoint ${formattedEndpoint} from ${cli.color.app(context.app)}.`)
let cert = yield cli.action(`Updating SSL certificate ${endpoint.name} ${cname}for ${cli.color.app(context.app)}`, {}, heroku.request({
let cert = yield cli.action(`Updating SSL certificate ${formattedEndpoint} for ${cli.color.app(context.app)}`, {}, heroku.request({
path: endpoint._meta.path,

@@ -47,3 +48,4 @@ method: 'PATCH',

let cmd = {
module.exports = {
topic: 'certs',
command: 'update',

@@ -69,6 +71,1 @@ args: [

}
module.exports = [
Object.assign({topic: 'certs'}, cmd),
Object.assign({topic: '_certs', hidden: true}, cmd)
]

@@ -11,3 +11,3 @@ 'use strict'

exports.commands = _.flatten([
let commands = [
require('./commands/certs/index.js'),

@@ -22,2 +22,15 @@ require('./commands/certs/add.js'),

require('./commands/certs/update.js')
])
]
function deprecate (cmd) {
let deprecatedRun = function (context) {
let cli = require('heroku-cli-util')
let topicAndCommand = _.select([cmd.topic, cmd.command]).join(':')
cli.warn(`${cli.color.cmd(`heroku _${topicAndCommand}`)} has been deprecated. Please use ${cli.color.cmd(`heroku ${topicAndCommand}`)} instead.`)
return cmd.run(context)
}
return Object.assign({}, cmd, {topic: '_certs', hidden: true, run: deprecatedRun})
}
exports.commands = commands.concat(commands.map((cmd) => deprecate(cmd)))
{
"name": "heroku-certs",
"version": "1.1.20",
"version": "1.1.21",
"description": "heroku ssl plugin",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -56,3 +56,3 @@ 'use strict'

inquirer = {}
certs = proxyquire('../../../commands/certs/add', {inquirer})[0]
certs = proxyquire('../../../commands/certs/add', {inquirer})
})

@@ -59,0 +59,0 @@

@@ -9,3 +9,3 @@ 'use strict'

let certs = require('../../../commands/certs/chain.js')[0]
let certs = require('../../../commands/certs/chain.js')
let assertExit = require('../../assert_exit.js')

@@ -12,0 +12,0 @@ let error = require('../../../lib/error.js')

@@ -15,3 +15,3 @@ 'use strict'

let certs = require('../../../commands/certs/generate.js')[0]
let certs = require('../../../commands/certs/generate.js')
let endpoint = require('../../stubs/sni-endpoints.js').endpoint

@@ -18,0 +18,0 @@

@@ -6,3 +6,3 @@ 'use strict'

let nock = require('nock')
let certs = require('../../../commands/certs/index.js')[0]
let certs = require('../../../commands/certs/index.js')

@@ -9,0 +9,0 @@ let endpoint = require('../../stubs/sni-endpoints.js').endpoint

'use strict'
/* globals describe it beforeEach cli */
let certs = require('../../../commands/certs/info.js')[0]
let certs = require('../../../commands/certs/info.js')
let nock = require('nock')

@@ -6,0 +6,0 @@ let expect = require('chai').expect

@@ -9,3 +9,3 @@ 'use strict'

let certs = require('../../../commands/certs/key.js')[0]
let certs = require('../../../commands/certs/key.js')
let assertExit = require('../../assert_exit.js')

@@ -12,0 +12,0 @@ let error = require('../../../lib/error.js')

@@ -6,3 +6,3 @@ 'use strict'

let nock = require('nock')
let certs = require('../../../commands/certs/remove.js')[0]
let certs = require('../../../commands/certs/remove.js')
let error = require('../../../lib/error.js')

@@ -9,0 +9,0 @@

@@ -6,3 +6,3 @@ 'use strict'

let nock = require('nock')
let certs = require('../../../commands/certs/rollback.js')[0]
let certs = require('../../../commands/certs/rollback.js')
let error = require('../../../lib/error.js')

@@ -9,0 +9,0 @@ let assertExit = require('../../assert_exit.js')

@@ -9,3 +9,3 @@ 'use strict'

let certs = require('../../../commands/certs/update.js')[0]
let certs = require('../../../commands/certs/update.js')
let error = require('../../../lib/error.js')

@@ -12,0 +12,0 @@ let shared = require('./shared.js')

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc