Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

heroku-cli-addons

Package Overview
Dependencies
Maintainers
7
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

heroku-cli-addons - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

13

commands/addons/index.js

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

const formatState = util.formatState
const grandfatheredPrice = util.grandfatheredPrice
const printf = require('printf')

@@ -26,3 +27,6 @@

if (app) { // don't disploy attachments globally
addons = api.get(`/apps/${app}/addons`, {headers: {'Accept-Expansion': 'addon_service,plan'}})
addons = api.get(`/apps/${app}/addons`, {headers: {
'Accept-Expansion': 'addon_service,plan',
'Accept': 'application/vnd.heroku+json; version=3.with-addon-billing-info'
}})

@@ -47,3 +51,6 @@ let sudoHeaders = JSON.parse(process.env.HEROKU_HEADERS || '{}')

path: '/addons',
headers: {'Accept-Expansion': 'addon_service,plan'}
headers: {
'Accept-Expansion': 'addon_service,plan',
'Accept': 'application/vnd.heroku+json; version=3.with-addon-billing-info'
}
})

@@ -72,2 +79,4 @@ }

}
addon.plan.price = grandfatheredPrice(addon)
})

@@ -74,0 +83,0 @@

23

commands/addons/info.js

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

let grandfatheredPrice = require('../../lib/util').grandfatheredPrice
let formatPrice = require('../../lib/util').formatPrice

@@ -14,9 +15,21 @@ let formatState = require('../../lib/util').formatState

return co(function * () {
let addon = yield resolve.addon(api, ctx.app, ctx.args.addon)
let resolvedAddon = yield resolve.addon(api, ctx.app, ctx.args.addon)
addon.attachments = yield api.request({
method: 'GET',
path: `/addons/${addon.id}/addon-attachments`
})
// the resolve call uses a variant so we cannot also use the
// with-addon-billing-info in the resolve call so we have to run out
// and grab the addon again, but can bundle with the attachments request
let [addon, attachments] = yield [
api.get(`/addons/${resolvedAddon.id}`, {headers: {
'Accept-Expansion': 'addon_service,plan',
'Accept': 'application/vnd.heroku+json; version=3.with-addon-billing-info'
}}),
api.request({
method: 'GET',
path: `/addons/${resolvedAddon.id}/addon-attachments`
})
]
addon.plan.price = grandfatheredPrice(addon)
addon.attachments = attachments
cli.styledHeader(style('addon', addon.name))

@@ -23,0 +36,0 @@ cli.styledHash({

@@ -26,2 +26,7 @@ 'use strict'

grandfatheredPrice: function (addon) {
const price = addon.plan.price
return Object.assign({}, price, {cents: addon.billed_price_cents})
},
formatPrice: function (price) {

@@ -28,0 +33,0 @@ const printf = require('printf')

{
"name": "heroku-cli-addons",
"description": "`heroku addons:*` commands",
"version": "1.2.1",
"version": "1.2.2",
"author": "Bo Jeanes @bjeanes",

@@ -6,0 +6,0 @@ "bugs": {

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