@heroku-cli/plugin-certs-v5
Advanced tools
Comparing version 7.46.2 to 7.47.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [7.47.0](https://github.com/heroku/cli/compare/v7.46.2...v7.47.0) (2020-10-29) | ||
### Features | ||
* **certs-v5:** add domain info in certs list and info ([#1660](https://github.com/heroku/cli/issues/1660)) ([1920ff5](https://github.com/heroku/cli/commit/1920ff559f7ceeab3c1e60d34ce863166fe62854)) | ||
## [7.46.2](https://github.com/heroku/cli/compare/v7.46.1...v7.46.2) (2020-10-22) | ||
@@ -8,0 +19,0 @@ |
@@ -17,2 +17,14 @@ 'use strict' | ||
if (context.flags['show-domains']) { | ||
let domains = yield Promise.all(endpoint.domains.map(domain => { | ||
return heroku.request({ | ||
path: `/apps/${context.flags.app}/domains/${domain}`, | ||
headers: { 'Accept': `application/vnd.heroku+json; version=3.allow_multiple_sni_endpoints` } | ||
}).then(response => response.hostname) | ||
})) | ||
cert.domains = domains | ||
} else { | ||
delete cert.domains | ||
} | ||
certificateDetails(cert) | ||
@@ -26,3 +38,4 @@ } | ||
{ name: 'name', hasValue: true, description: 'name to check info on' }, | ||
{ name: 'endpoint', hasValue: true, description: 'endpoint to check info on' } | ||
{ name: 'endpoint', hasValue: true, description: 'endpoint to check info on' }, | ||
{ name: 'show-domains', hasValue: false, description: 'show associated domains' } | ||
], | ||
@@ -29,0 +42,0 @@ description: 'show certificate information for an SSL certificate', |
@@ -17,3 +17,3 @@ 'use strict' | ||
cli.log(logMessage) | ||
cli.styledObject({ | ||
let tableObject = { | ||
'Common Name(s)': cert.ssl_cert.cert_domains, | ||
@@ -23,5 +23,11 @@ 'Expires At': formatDate(cert.ssl_cert.expires_at), | ||
'Starts At': formatDate(cert.ssl_cert.starts_at), | ||
'Subject': cert.ssl_cert.subject | ||
}) | ||
'Subject': cert.ssl_cert.subject, | ||
} | ||
if (cert.domains && cert.domains.length) { | ||
tableObject['Domain(s)'] = cert.domains | ||
} | ||
cli.styledObject(tableObject) | ||
if (cert.ssl_cert['ca_signed?']) { | ||
@@ -28,0 +34,0 @@ cli.log('SSL certificate is verified by a root authority.') |
@@ -28,3 +28,3 @@ 'use strict' | ||
let mapped = certs.filter(function (f) { return f.ssl_cert }).map(function (f) { | ||
return { | ||
let tableContents = { | ||
name: f.name, | ||
@@ -35,4 +35,12 @@ cname: f.cname, | ||
type: type(f), | ||
common_names: f.ssl_cert.cert_domains.join(', ') | ||
common_names: f.ssl_cert.cert_domains.join(', '), | ||
} | ||
// If they're using ACM it's not really worth showing the number of associated domains since | ||
// it'll always be 1 and is entirely outside the user's control | ||
if (!f.ssl_cert.acm) { | ||
tableContents.associated_domains = (f.domains && f.domains.length) ? f.domains.length : '0' | ||
} | ||
return tableContents | ||
}) | ||
@@ -52,6 +60,10 @@ | ||
{label: 'Trusted', key: 'ca_signed', format: function (f) { return f === undefined ? '' : (f ? 'True' : 'False') }}, | ||
{label: 'Type', key: 'type'} | ||
{label: 'Type', key: 'type'}, | ||
]) | ||
if (certs.some(cert => !cert.ssl_cert || !cert.ssl_cert.acm)) { | ||
columns.push({label: 'Domains', key: 'associated_domains'}) | ||
} | ||
cli.table(mapped, { columns }) | ||
} |
@@ -1,1 +0,1 @@ | ||
{"version":"7.46.2","commands":{"certs:add":{"id":"certs:add","description":"add an SSL certificate to an app\nNote: certificates with PEM encoding are also valid","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:add example.com.crt example.com.key\n\nCertificate Intermediary:\n$ heroku certs:add intermediary.crt example.com.crt example.com.key","flags":{"bypass":{"name":"bypass","type":"boolean","description":"bypass the trust chain completion step","required":false,"allowNo":false},"type":{"name":"type","type":"option","description":"type to create, either 'sni' or 'endpoint'","required":false},"domains":{"name":"domains","type":"option","description":"domains to create after certificate upload","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[{"name":"CRT","required":true},{"name":"KEY","required":true}]},"certs:chain":{"id":"certs:chain","description":"print an ordered & complete chain for a certificate\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:generate":{"id":"certs:generate","description":"generate a key and a CSR or self-signed certificate\nGenerate a key and certificate signing request (or self-signed certificate)\nfor an app. Prompts for information to put in the certificate unless --now\nis used, or at least one of the --subject, --owner, --country, --area, or\n--city options is specified.","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:generate example.com","flags":{"selfsigned":{"name":"selfsigned","type":"boolean","description":"generate a self-signed certificate instead of a CSR","required":false,"allowNo":false},"keysize":{"name":"keysize","type":"option","description":"RSA key size in bits (default: 2048)","required":false},"owner":{"name":"owner","type":"option","description":"name of organization certificate belongs to","required":false},"country":{"name":"country","type":"option","description":"country of owner, as a two-letter ISO country code","required":false},"area":{"name":"area","type":"option","description":"sub-country area (state, province, etc.) of owner","required":false},"city":{"name":"city","type":"option","description":"city of owner","required":false},"subject":{"name":"subject","type":"option","description":"specify entire certificate subject","required":false},"now":{"name":"now","type":"boolean","description":"do not prompt for any owner information","required":false,"allowNo":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[{"name":"domain","required":true}]},"certs":{"id":"certs","description":"list SSL certificates for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:info":{"id":"certs:info","description":"show certificate information for an SSL certificate\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"name":{"name":"name","type":"option","description":"name to check info on","required":false},"endpoint":{"name":"endpoint","type":"option","description":"endpoint to check info on","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:key":{"id":"certs:key","description":"print the correct key for the given certificate\nYou must pass one single certificate, and one or more keys.\nThe first key that signs the certificate will be printed back.","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:key example.com.crt example.com.key","flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:remove":{"id":"certs:remove","description":"remove an SSL certificate from an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"confirm":{"name":"confirm","type":"option","hidden":true,"required":false},"name":{"name":"name","type":"option","description":"name to remove","required":false},"endpoint":{"name":"endpoint","type":"option","description":"endpoint to remove","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:update":{"id":"certs:update","description":"update an SSL certificate on an app\nNote: certificates with PEM encoding are also valid","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:update example.com.crt example.com.key\n\nCertificate Intermediary:\n$ heroku certs:update intermediary.crt example.com.crt example.com.key","flags":{"bypass":{"name":"bypass","type":"boolean","description":"bypass the trust chain completion step","required":false,"allowNo":false},"confirm":{"name":"confirm","type":"option","hidden":true,"required":false},"name":{"name":"name","type":"option","description":"name to update","required":false},"endpoint":{"name":"endpoint","type":"option","description":"endpoint to update","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[{"name":"CRT","required":true},{"name":"KEY","required":true}]},"certs:auto:disable":{"id":"certs:auto:disable","description":"disable ACM for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"confirm":{"name":"confirm","type":"option","hidden":true,"required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:auto:enable":{"id":"certs:auto:enable","description":"enable ACM status for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:auto":{"id":"certs:auto","description":"show ACM status for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:auto:refresh":{"id":"certs:auto:refresh","description":"refresh ACM for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]}}} | ||
{"version":"7.47.0","commands":{"certs:add":{"id":"certs:add","description":"add an SSL certificate to an app\nNote: certificates with PEM encoding are also valid","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:add example.com.crt example.com.key\n\nCertificate Intermediary:\n$ heroku certs:add intermediary.crt example.com.crt example.com.key","flags":{"bypass":{"name":"bypass","type":"boolean","description":"bypass the trust chain completion step","required":false,"allowNo":false},"type":{"name":"type","type":"option","description":"type to create, either 'sni' or 'endpoint'","required":false},"domains":{"name":"domains","type":"option","description":"domains to create after certificate upload","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[{"name":"CRT","required":true},{"name":"KEY","required":true}]},"certs:chain":{"id":"certs:chain","description":"print an ordered & complete chain for a certificate\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:generate":{"id":"certs:generate","description":"generate a key and a CSR or self-signed certificate\nGenerate a key and certificate signing request (or self-signed certificate)\nfor an app. Prompts for information to put in the certificate unless --now\nis used, or at least one of the --subject, --owner, --country, --area, or\n--city options is specified.","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:generate example.com","flags":{"selfsigned":{"name":"selfsigned","type":"boolean","description":"generate a self-signed certificate instead of a CSR","required":false,"allowNo":false},"keysize":{"name":"keysize","type":"option","description":"RSA key size in bits (default: 2048)","required":false},"owner":{"name":"owner","type":"option","description":"name of organization certificate belongs to","required":false},"country":{"name":"country","type":"option","description":"country of owner, as a two-letter ISO country code","required":false},"area":{"name":"area","type":"option","description":"sub-country area (state, province, etc.) of owner","required":false},"city":{"name":"city","type":"option","description":"city of owner","required":false},"subject":{"name":"subject","type":"option","description":"specify entire certificate subject","required":false},"now":{"name":"now","type":"boolean","description":"do not prompt for any owner information","required":false,"allowNo":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[{"name":"domain","required":true}]},"certs":{"id":"certs","description":"list SSL certificates for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:info":{"id":"certs:info","description":"show certificate information for an SSL certificate\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"name":{"name":"name","type":"option","description":"name to check info on","required":false},"endpoint":{"name":"endpoint","type":"option","description":"endpoint to check info on","required":false},"show-domains":{"name":"show-domains","type":"boolean","description":"show associated domains","required":false,"allowNo":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:key":{"id":"certs:key","description":"print the correct key for the given certificate\nYou must pass one single certificate, and one or more keys.\nThe first key that signs the certificate will be printed back.","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:key example.com.crt example.com.key","flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:remove":{"id":"certs:remove","description":"remove an SSL certificate from an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"confirm":{"name":"confirm","type":"option","hidden":true,"required":false},"name":{"name":"name","type":"option","description":"name to remove","required":false},"endpoint":{"name":"endpoint","type":"option","description":"endpoint to remove","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:update":{"id":"certs:update","description":"update an SSL certificate on an app\nNote: certificates with PEM encoding are also valid","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"examples":"$ heroku certs:update example.com.crt example.com.key\n\nCertificate Intermediary:\n$ heroku certs:update intermediary.crt example.com.crt example.com.key","flags":{"bypass":{"name":"bypass","type":"boolean","description":"bypass the trust chain completion step","required":false,"allowNo":false},"confirm":{"name":"confirm","type":"option","hidden":true,"required":false},"name":{"name":"name","type":"option","description":"name to update","required":false},"endpoint":{"name":"endpoint","type":"option","description":"endpoint to update","required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[{"name":"CRT","required":true},{"name":"KEY","required":true}]},"certs:auto:disable":{"id":"certs:auto:disable","description":"disable ACM for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"confirm":{"name":"confirm","type":"option","hidden":true,"required":false},"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:auto:enable":{"id":"certs:auto:enable","description":"enable ACM status for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:auto":{"id":"certs:auto","description":"show ACM status for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]},"certs:auto:refresh":{"id":"certs:auto:refresh","description":"refresh ACM for an app\n","pluginName":"@heroku-cli/plugin-certs-v5","pluginType":"core","hidden":false,"aliases":[],"flags":{"app":{"name":"app","type":"option","char":"a","description":"app to run command against","required":true},"remote":{"name":"remote","type":"option","char":"r","description":"git remote of app to use"}},"args":[]}}} |
{ | ||
"name": "@heroku-cli/plugin-certs-v5", | ||
"description": "heroku ssl plugin", | ||
"version": "7.46.2", | ||
"version": "7.47.0", | ||
"author": "Ransom Briggs rbriggs@heroku.com", | ||
@@ -57,3 +57,3 @@ "bugs": "https://github.com/heroku/cli/issues", | ||
}, | ||
"gitHead": "ab49920e589ea541aa34f97160d20b28d42a48d0" | ||
"gitHead": "d0c42edccf003bf0f82653ea0eaba5fde495551c" | ||
} |
@@ -36,3 +36,3 @@ heroku-certs | ||
_See code: [commands/certs/index.js](https://github.com/heroku/cli/blob/v7.46.2/packages/certs-v5/commands/certs/index.js)_ | ||
_See code: [commands/certs/index.js](https://github.com/heroku/cli/blob/v7.47.0/packages/certs-v5/commands/certs/index.js)_ | ||
@@ -64,3 +64,3 @@ ## `heroku certs:add CRT KEY` | ||
_See code: [commands/certs/add.js](https://github.com/heroku/cli/blob/v7.46.2/packages/certs-v5/commands/certs/add.js)_ | ||
_See code: [commands/certs/add.js](https://github.com/heroku/cli/blob/v7.47.0/packages/certs-v5/commands/certs/add.js)_ | ||
@@ -80,3 +80,3 @@ ## `heroku certs:auto` | ||
_See code: [commands/certs/auto/index.js](https://github.com/heroku/cli/blob/v7.46.2/packages/certs-v5/commands/certs/auto/index.js)_ | ||
_See code: [commands/certs/auto/index.js](https://github.com/heroku/cli/blob/v7.47.0/packages/certs-v5/commands/certs/auto/index.js)_ | ||
@@ -96,3 +96,3 @@ ## `heroku certs:auto:disable` | ||
_See code: [commands/certs/auto/disable.js](https://github.com/heroku/cli/blob/v7.46.2/packages/certs-v5/commands/certs/auto/disable.js)_ | ||
_See code: [commands/certs/auto/disable.js](https://github.com/heroku/cli/blob/v7.47.0/packages/certs-v5/commands/certs/auto/disable.js)_ | ||
@@ -112,3 +112,3 @@ ## `heroku certs:auto:enable` | ||
_See code: [commands/certs/auto/enable.js](https://github.com/heroku/cli/blob/v7.46.2/packages/certs-v5/commands/certs/auto/enable.js)_ | ||
_See code: [commands/certs/auto/enable.js](https://github.com/heroku/cli/blob/v7.47.0/packages/certs-v5/commands/certs/auto/enable.js)_ | ||
@@ -128,3 +128,3 @@ ## `heroku certs:auto:refresh` | ||
_See code: [commands/certs/auto/refresh.js](https://github.com/heroku/cli/blob/v7.46.2/packages/certs-v5/commands/certs/auto/refresh.js)_ | ||
_See code: [commands/certs/auto/refresh.js](https://github.com/heroku/cli/blob/v7.47.0/packages/certs-v5/commands/certs/auto/refresh.js)_ | ||
@@ -144,3 +144,3 @@ ## `heroku certs:chain` | ||
_See code: [commands/certs/chain.js](https://github.com/heroku/cli/blob/v7.46.2/packages/certs-v5/commands/certs/chain.js)_ | ||
_See code: [commands/certs/chain.js](https://github.com/heroku/cli/blob/v7.47.0/packages/certs-v5/commands/certs/chain.js)_ | ||
@@ -177,3 +177,3 @@ ## `heroku certs:generate DOMAIN` | ||
_See code: [commands/certs/generate.js](https://github.com/heroku/cli/blob/v7.46.2/packages/certs-v5/commands/certs/generate.js)_ | ||
_See code: [commands/certs/generate.js](https://github.com/heroku/cli/blob/v7.47.0/packages/certs-v5/commands/certs/generate.js)_ | ||
@@ -193,5 +193,6 @@ ## `heroku certs:info` | ||
--name=name name to check info on | ||
--show-domains show associated domains | ||
``` | ||
_See code: [commands/certs/info.js](https://github.com/heroku/cli/blob/v7.46.2/packages/certs-v5/commands/certs/info.js)_ | ||
_See code: [commands/certs/info.js](https://github.com/heroku/cli/blob/v7.47.0/packages/certs-v5/commands/certs/info.js)_ | ||
@@ -218,3 +219,3 @@ ## `heroku certs:key` | ||
_See code: [commands/certs/key.js](https://github.com/heroku/cli/blob/v7.46.2/packages/certs-v5/commands/certs/key.js)_ | ||
_See code: [commands/certs/key.js](https://github.com/heroku/cli/blob/v7.47.0/packages/certs-v5/commands/certs/key.js)_ | ||
@@ -236,3 +237,3 @@ ## `heroku certs:remove` | ||
_See code: [commands/certs/remove.js](https://github.com/heroku/cli/blob/v7.46.2/packages/certs-v5/commands/certs/remove.js)_ | ||
_See code: [commands/certs/remove.js](https://github.com/heroku/cli/blob/v7.47.0/packages/certs-v5/commands/certs/remove.js)_ | ||
@@ -264,3 +265,3 @@ ## `heroku certs:update CRT KEY` | ||
_See code: [commands/certs/update.js](https://github.com/heroku/cli/blob/v7.46.2/packages/certs-v5/commands/certs/update.js)_ | ||
_See code: [commands/certs/update.js](https://github.com/heroku/cli/blob/v7.47.0/packages/certs-v5/commands/certs/update.js)_ | ||
<!-- commandsstop --> |
68623
1257
256