heroku-cli-addons
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -21,3 +21,3 @@ 'use strict' | ||
<title>Heroku Add-ons SSO</title> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> | ||
</head> | ||
@@ -24,0 +24,0 @@ |
@@ -9,13 +9,26 @@ 'use strict' | ||
const resolve = require('../../lib/resolve') | ||
let addon = yield resolve.addon(api, ctx.app, ctx.args.addon) | ||
let addons | ||
if (ctx.args.addon) { | ||
addons = [yield resolve.addon(api, ctx.app, ctx.args.addon)] | ||
} else { | ||
if (ctx.app) { | ||
addons = yield api.get(`/apps/${ctx.app}/addons`) | ||
} else { | ||
addons = yield api.get('/addons') | ||
} | ||
addons = addons.filter(addon => addon.state === 'provisioning') | ||
} | ||
let interval = parseInt(ctx.flags['wait-interval']) | ||
if (!interval || interval < 0) { interval = 5 } | ||
addon = yield waitForAddonProvisioning(ctx, api, addon, interval) | ||
for (let addon of addons) { | ||
addon = yield waitForAddonProvisioning(ctx, api, addon, interval) | ||
let configVars = (addon.config_vars || []) | ||
if (configVars.length > 0) { | ||
configVars = configVars.map(c => cli.color.configVar(c)).join(', ') | ||
cli.log(`Created ${cli.color.addon(addon.name)} as ${configVars}`) | ||
let configVars = (addon.config_vars || []) | ||
if (configVars.length > 0) { | ||
configVars = configVars.map(c => cli.color.configVar(c)).join(', ') | ||
cli.log(`Created ${cli.color.addon(addon.name)} as ${configVars}`) | ||
} | ||
} | ||
@@ -31,3 +44,3 @@ } | ||
needsAuth: true, | ||
args: [{name: 'addon'}], | ||
args: [{name: 'addon', optional: true}], | ||
flags: [{name: 'wait-interval', description: 'how frequently to poll in seconds', hasValue: true}], | ||
@@ -34,0 +47,0 @@ run: cli.command({preauth: true}, co.wrap(run)), |
{ | ||
"name": "heroku-cli-addons", | ||
"description": "`heroku addons:*` commands", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"author": "Bo Jeanes @bjeanes", | ||
@@ -6,0 +6,0 @@ "bugs": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45583
1157