Skip to content

Commit

Permalink
chore: fix descriptions and other docs issues
Browse files Browse the repository at this point in the history
  • Loading branch information
k80bowman committed May 24, 2024
1 parent 098f4b5 commit 1786400
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 24 deletions.
24 changes: 24 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@
"description": "two-factor authentication",
"hidden": true
},
"access": {
"description": "manage user access to apps"
},
"addons": {
"description": "tools and services for developing, extending, and operating your app"
},
"apps": {
"description": "manage apps on Heroku"
},
Expand All @@ -224,6 +230,9 @@
"commands": {
"hidden": true
},
"container": {
"description": "Use containers to build and deploy Heroku apps"
},
"config": {
"description": "environment variables of apps"
},
Expand Down Expand Up @@ -260,16 +269,28 @@
"maintenance": {
"description": "enable/disable access to app"
},
"members": {
"description": "manage organization members"
},
"orgs": {
"description": "manage organizations"
},
"outbound-rules": {
"description": "space outbound IP rules",
"hidden": true
},
"pg": {
"description": "manage postgresql databases"
},
"pipelines": {
"description": "manage pipelines"
},
"ps": {
"description": "manage app dynos"
},
"redis": {
"description": "manage heroku redis instances"
},
"reviewapps": {
"description": "manage reviewapps in pipelines"
},
Expand All @@ -283,6 +304,9 @@
"description": "list available stacks",
"hidden": true
},
"teams": {
"description": "manage teams"
},
"twofactor": {
"description": "two-factor authentication",
"hidden": true
Expand Down
15 changes: 9 additions & 6 deletions packages/cli/src/commands/addons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,15 @@ function displayJSON(addons: Heroku.AddOn[]) {

export default class Addons extends Command {
static topic = topic
static description = 'lists your add-ons and attachments'
static usage = 'addons [--all|--app APP]'
static description = `
Lists your add-ons and attachments.
The default filter applied depends on whether you are in a Heroku app
directory. If so, the --app flag is implied. If not, the default of --all
is implied. Explicitly providing either flag overrides the default
behavior.
`
static flags = {
all: flags.boolean({char: 'A', description: 'show add-ons and attachments for all accessible apps'}),
json: flags.boolean({description: 'return add-ons in json format'}),
Expand All @@ -235,11 +243,6 @@ export default class Addons extends Command {
`$ heroku ${topic} --app acme-inc-www`,
]

static help = `The default filter applied depends on whether you are in a Heroku app
directory. If so, the --app flag is implied. If not, the default of --all
is implied. Explicitly providing either flag overrides the default
behavior.`

public async run(): Promise<void> {
const {flags} = await this.parse(Addons)
const {app, all, json} = flags
Expand Down
11 changes: 9 additions & 2 deletions packages/cli/src/commands/addons/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ import type {AddOnAttachmentWithConfigVarsAndPlan} from '../../lib/pg/types'
export default class Upgrade extends Command {
static aliases = ['addons:downgrade']
static topic = 'addons'
static description = 'change add-on plan'
static help = 'See available plans with `heroku addons:plans SERVICE`.\n\nNote that `heroku addons:upgrade` and `heroku addons:downgrade` are the same.\nEither one can be used to change an add-on plan up or down.\n\nhttps://devcenter.heroku.com/articles/managing-add-ons'
static description = `
change add-on plan.
See available plans with \`heroku addons:plans SERVICE\`.
Note that \`heroku addons:upgrade\` and \`heroku addons:downgrade\` are the same.\
Either one can be used to change an add-on plan up or down.
https://devcenter.heroku.com/articles/managing-add-ons
`
static examples = ['Upgrade an add-on by service name:\n$ heroku addons:upgrade heroku-redis:premium-2\n\nUpgrade a specific add-on:\n$ heroku addons:upgrade swimming-briskly-123 heroku-redis:premium-2']
static flags = {
app: flags.app(),
Expand Down
7 changes: 5 additions & 2 deletions packages/cli/src/commands/certs/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ async function configureDomains(app: string, heroku: APIClient, cert: SniEndpoin
export default class Add extends Command {
static topic = 'certs'
static strict = true
static description = 'add an SSL certificate to an app'
static help = 'Note: certificates with PEM encoding are also valid'
static description = `
Add an SSL certificate to an app.
Note: certificates with PEM encoding are also valid.
`
static examples = [
heredoc(`$ heroku certs:add example.com.crt example.com.key
If you require intermediate certificates, refer to this article on merging certificates to get a complete chain:
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/container/pull.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import color from '@heroku-cli/color'
export default class Pull extends Command {
static topic = 'container'
static description = 'pulls an image from an app\'s process type'
static usage = '$ heroku container:pull -a APP [-v] PROCESS_TYPE...'
static usage = 'container:pull -a APP [-v] PROCESS_TYPE...'
static example = `
${color.cmd('$ heroku container:pull web')} # Pulls the web image from the app
${color.cmd('$ heroku container:pull web worker')} # Pulls both the web and worker images from the app
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/container/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type ImageResponse = {
export default class ContainerRelease extends Command {
static topic = 'container'
static description = 'Releases previously pushed Docker images to your Heroku app'
static usage = 'heroku container:release'
static usage = 'container:release'
static example = `
${color.cmd('heroku container:release web')} # Releases the previously pushed web process type
${color.cmd('heroku container:release web worker')} # Releases the previously pushed web and worker process types`
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/container/rm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import color from '@heroku-cli/color'
export default class Rm extends Command {
static topic = 'container'
static description = 'remove the process type from your app'
static usage = '$ heroku container:rm -a APP [-v] PROCESS_TYPE...'
static usage = 'container:rm -a APP [-v] PROCESS_TYPE...'
static example = `
${color.cmd('heroku container:rm web')} # Destroys the web container
${color.cmd('heroku container:rm web worker')} # Destroys the web and worker containers`
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/container/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import color from '@heroku-cli/color'
export default class Run extends Command {
static topic = 'container'
static description = 'builds, then runs the docker image locally'
static usage = '$ heroku container:pull -a APP [-v] PROCESS_TYPE...'
static usage = 'container:run -a APP [-v] PROCESS_TYPE...'
static example = `
${color.cmd('$ heroku container:pull web')} # Pulls the web image from the app
${color.cmd('$ heroku container:pull web worker')} # Pulls both the web and worker images from the app
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/commands/pg/backups/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default class Index extends Command {
at: flags.string({hidden: true}),
quiet: flags.boolean({char: 'q', hidden: true}),
app: flags.app({required: true}),
remote: flags.remote(),
}

public async run(): Promise<void> {
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/commands/pg/maintenance/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import heredoc from 'tsheredoc'
export default class Window extends Command {
static topic = 'pg';
static description = heredoc(`
set weekly maintenance window
All times are in UTC
Set weekly maintenance window.
All times are in UTC.
`);

static example = '$ heroku pg:maintenance:window "Sunday 06:00" postgres-slippery-100';
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/pg/settings/auto-explain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default class AutoExplain extends PGSettingsCommand {
static description = heredoc(`
Automatically log execution plans of queries without running EXPLAIN by hand.
The auto_explain module is loaded at session-time so existing connections will not be logged.
Restart your Heroku app and/or restart existing connections for logging to start taking place.'
Restart your Heroku app and/or restart existing connections for logging to start taking place.
`)

static flags = {
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/src/commands/releases/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ const getDescriptionTruncation = function (releases: Heroku.Formation[], columns
export default class Index extends Command {
static topic = 'releases'
static description = 'display the releases for an app'
static usage = `$ heroku releases
=== example Releases
v1 Config add FOO_BAR email@example.com 2015/11/17 17:37:41 (~ 1h ago)
v2 Config add BAR_BAZ email@example.com 2015/11/17 17:37:41 (~ 1h ago)
v3 Config add BAZ_QUX email@example.com 2015/11/17 17:37:41 (~ 1h ago)`
static examples = [
'v1 Config add FOO_BAR email@example.com 2015/11/17 17:37:41 (~ 1h ago)',
'v2 Config add BAR_BAZ email@example.com 2015/11/17 17:37:41 (~ 1h ago)',
'v3 Config add BAZ_QUX email@example.com 2015/11/17 17:37:41 (~ 1h ago)'

Check failure on line 72 in packages/cli/src/commands/releases/index.ts

View workflow job for this annotation

GitHub Actions / test (16.x, macos-latest)

Missing trailing comma
]

static flags = {
num: flags.string({char: 'n', description: 'number of releases to show'}),
Expand Down
7 changes: 5 additions & 2 deletions packages/cli/src/commands/releases/rollback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ import {stream} from '../../lib/releases/output'
export default class Rollback extends Command {
static topic = 'releases'
static hiddenAliases = ['rollback']
static description = 'rollback to a previous release'
static help = 'If RELEASE is not specified, it will rollback one release'
static description = `
Roll back to a previous release.
If RELEASE is not specified, it will roll back one release.
`
static flags = {
remote: flags.remote(),
app: flags.app({required: true}),
Expand Down

0 comments on commit 1786400

Please sign in to comment.