Skip to content

Commit

Permalink
Merge branch 'prerelease/9.0.0-alpha' into sbosio/remove-oauth-v5
Browse files Browse the repository at this point in the history
  • Loading branch information
sbosio committed May 14, 2024
2 parents 741caa5 + 67fb46e commit f849b23
Show file tree
Hide file tree
Showing 55 changed files with 88 additions and 2,584 deletions.
9 changes: 3 additions & 6 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,15 @@
"bugs": "https://github.com/heroku/cli/issues",
"dependencies": {
"@heroku-cli/color": "2.0.1",
"@heroku-cli/command": "^10.0.0",
"@heroku-cli/command-v9": "npm:@heroku-cli/command@^9.0.2",
"@heroku-cli/command": "^11.0.0",
"@heroku-cli/notifications": "^1.2.4",
"@heroku-cli/plugin-ps": "^8.1.7",
"@heroku-cli/plugin-ps-exec": "^2.4.0",
"@heroku-cli/plugin-run": "8.1.4",
"@heroku-cli/schema": "^1.0.25",
"@heroku/buildpack-registry": "^1.0.1",
"@heroku/eventsource": "^1.0.7",
"@heroku/heroku-cli-util": "^8.0.13",
"@oclif/core": "^2.8.11",
"@oclif/core-v1": "npm:@oclif/core@^1.26.2",
"@oclif/core": "^2.16.0",
"@oclif/plugin-commands": "2.2.2",
"@oclif/plugin-help": "^5",
"@oclif/plugin-legacy": "^1.3.0",
Expand Down Expand Up @@ -370,7 +367,7 @@
"test:unit:justTest:ci": "nyc mocha --forbid-only \"test/**/*.unit.test.ts\"",
"test": "yarn pretest && yarn test:unit:justTest:ci",
"test:local": "yarn pretest && yarn test:unit:justTest:local",
"version": "oclif readme --multi && git add README.md ../../docs"
"version": "oclif readme --multi --no-aliases && git add README.md ../../docs"
},
"types": "lib/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/cli/src/commands/addons/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default class Create extends Command {
static topic = 'addons'
static description = 'create a new add-on resource'
static strict = false
static aliases = ['addons:add']
static hiddenAliases = ['addons:add']
static flags = {
name: flags.string({description: 'name for the add-on resource'}),
as: flags.string({description: 'name for the initial add-on attachment'}),
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/addons/destroy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class Destroy extends Command {
static description = 'permanently destroy an add-on resource'
static strict = false
static examples = ['addons:destroy [ADDON]... [flags]']
static aliases = ['addons:remove']
static hiddenAliases = ['addons:remove']
static flags = {
force: flags.boolean({char: 'f', description: 'allow destruction even if connected to other apps'}),
confirm: flags.string({char: 'c'}),
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/apps/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ async function runFromManifest(context: ParserOutput<Create>, heroku: APIClient)
export default class Create extends Command {
static description = 'creates a new app'

static aliases = ['create']
static hiddenAliases = ['create']

static examples = [
`$ heroku apps:create
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/apps/destroy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import * as git from '../../lib/ci/git'
export default class Destroy extends Command {
static description = 'permanently destroy an app'
static help = 'This will also destroy all add-ons on the app.'
static aliases = ['destroy', 'apps:delete']
static hiddenAliases = ['destroy', 'apps:delete']
static flags = {
app: flags.app(),
remote: flags.remote(),
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/apps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function print(apps: Heroku.App, user: Heroku.Account, space?: string, team?: st
export default class AppsIndex extends Command {
static description = 'list your apps'
static topic = 'apps'
static aliases = ['list', 'apps:list']
static hiddenAliases = ['list', 'apps:list']

static examples = [
'$ heroku apps',
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/apps/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function print(info: Heroku.App, addons: Heroku.AddOn[], collaborators: Heroku.C
export default class AppsInfo extends Command {
static description = 'show detailed app information'
static topic = 'apps'
static aliases = ['info']
static hiddenAliases = ['info']

static examples = [
'$ heroku apps:info',
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/apps/open.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as open from 'open'
export default class AppsOpen extends Command {
static description = 'open the app in a web browser'
static topic = 'apps'
static aliases = ['open']
static hiddenAliases = ['open']

static examples = [
'$ heroku open -a myapp',
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/apps/rename.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default class AppsRename extends Command {
static description = 'rename an app'
static help = 'This will locally update the git remote if it is set to the old app.'
static topic = 'apps'
static aliases = ['rename']
static hiddenAliases = ['rename']

static examples = [
'$ heroku apps:rename --app oldname newname',
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/apps/stacks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function updateCedarName(stack: string) {
export default class StacksIndex extends Command {
static description = 'show the list of available stacks'
static topic = 'apps'
static aliases = ['stack']
static hiddenAliases = ['stack']

static flags = {
app: flags.app({required: true}),
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/apps/stacks/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Setting stack to heroku-22... done
You will need to redeploy myapp for the change to take effect.
Run git push heroku main to trigger a new build on myapp.`

static aliases = ['stack:set']
static hiddenAliases = ['stack:set']

static flags = {
app: flags.app({required: true}),
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/config/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const lastRelease = async (client: APIClient, app: string) => {
export default class Set extends Command {
static description = 'set one or more config vars'
static strict = false
static aliases = ['config:add']
static hiddenAliases = ['config:add']
static examples = [
`$ heroku config:set RAILS_ENV=staging
Setting config vars and restarting example... done, v10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import type {Setting, SettingKey} from '../../../lib/pg/types'
export default class LogMinDurationStatement extends PGSettingsCommand {
static description = heredoc(`
The duration of each completed statement will be logged if the statement completes after the time specified by VALUE.
VALUE needs to specified as a whole number, in milliseconds.
Setting log_min_duration_statement to zero prints all statement durations and -1 will disable logging statement durations.
VALUE needs to specified as a whole number, in milliseconds.
Setting log_min_duration_statement to zero prints all statement durations and -1 will disable logging statement durations.
`)

static args = {
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/commands/ps/restart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {Args, ux} from '@oclif/core'
export default class Restart extends Command {
static description = 'restart app dynos'
static topic = 'ps'
static aliases = ['restart', 'dyno:restart']
static aliases = ['dyno:restart']
static hiddenAliases = ['restart']

static examples = [
'$ heroku ps:restart web.1',
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/commands/ps/scale.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export default class Scale extends Command {
web=3:Standard-2X worker=1:Standard-1X
`]

static aliases = ['dyno:scale', 'scale']
static aliases = ['dyno:scale']
static hiddenAliases = ['scale']
static flags = {
app: flags.app({required: true}),
remote: flags.remote(),
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/commands/ps/stop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {Args, ux} from '@oclif/core'
export default class Stop extends Command {
static description = 'stop app dyno'
static topic = 'ps'
static aliases = ['dyno:stop', 'ps:kill', 'dyno:kill', 'stop', 'kill']
static aliases = ['dyno:stop', 'ps:kill', 'dyno:kill']
static hiddenAliases = ['stop', 'kill']

static examples = [
'$ heroku ps:stop run.1828',
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/commands/ps/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ export default class Type extends Command {
Called with 1..n TYPE=SIZE arguments sets the quantity per type.
`
static aliases = ['ps:resize', 'resize', 'dyno:type', 'dyno:resize']
static aliases = ['ps:resize', 'dyno:resize']
static hiddenAliases = ['resize', 'dyno:type']
static flags = {
app: flags.app({required: true}),
remote: flags.remote(),
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/releases/rollback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {stream} from '../../lib/releases/output'

export default class Rollback extends Command {
static topic = 'releases'
static aliases = ['rollback']
static hiddenAliases = ['rollback']
static description = 'rollback to a previous release'
static help = 'If RELEASE is not specified, it will rollback one release'
static flags = {
Expand Down
23 changes: 9 additions & 14 deletions packages/cli/src/commands/run/detached.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
// tslint:disable:file-name-casing
import color from '@heroku-cli/color'
import {Command, flags} from '@heroku-cli/command-v9'
import {DynoSizeCompletion, ProcessTypeCompletion} from '@heroku-cli/command-v9/lib/completions'
import {CliUx} from '@oclif/core-v1'
import '@oclif/core-v1/lib/parser'
import Dyno from '@heroku-cli/plugin-run/lib/lib/dyno'
import {buildCommand} from '@heroku-cli/plugin-run/lib/lib/helpers'
import logDisplayer from '@heroku-cli/plugin-run/lib/lib/log-displayer'
import {Command, flags} from '@heroku-cli/command'
import {DynoSizeCompletion, ProcessTypeCompletion} from '@heroku-cli/command/lib/completions'
import {ux} from '@oclif/core'
import Dyno from '../../lib/run/dyno'
import {buildCommand} from '../../lib/run/helpers'
import logDisplayer from '../../lib/run/log-displayer'

export default class RunDetached extends Command {
static description = 'run a detached dyno, where output is sent to your logs'
Expand All @@ -33,7 +30,7 @@ export default class RunDetached extends Command {
const opts = {
heroku: this.heroku,
app: flags.app,
command: buildCommand(argv),
command: buildCommand(argv as string[]),
size: flags.size,
type: flags.type,
env: flags.env,
Expand All @@ -51,13 +48,11 @@ export default class RunDetached extends Command {
if (flags.tail) {
await logDisplayer(this.heroku, {
app: flags.app,
// @ts-ignore
dyno: dyno.dyno.name,
dyno: dyno.dyno?.name,
tail: true,
})
} else {
// @ts-ignore
CliUx.ux.log(`Run ${color.cmd('heroku logs --app ' + dyno.opts.app + ' --dyno ' + dyno.dyno.name)} to view the output.`)
ux.log(`Run ${color.cmd(`heroku logs --app ${dyno.opts.app} --dyno ${dyno.dyno?.name || ''}`)} to view the output.`)
}
}
}
15 changes: 7 additions & 8 deletions packages/cli/src/commands/run/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import {Command, flags} from '@heroku-cli/command-v9'
import {DynoSizeCompletion, ProcessTypeCompletion} from '@heroku-cli/command-v9/lib/completions'
import {CliUx} from '@oclif/core-v1'
import '@oclif/core-v1/lib/parser'
import {Command, flags} from '@heroku-cli/command'
import {DynoSizeCompletion, ProcessTypeCompletion} from '@heroku-cli/command/lib/completions'
import {ux} from '@oclif/core'
import debugFactory from 'debug'
import * as Heroku from '@heroku-cli/schema'
import Dyno from '@heroku-cli/plugin-run/lib/lib/dyno'
import {buildCommand} from '@heroku-cli/plugin-run/lib/lib/helpers'
import Dyno from '../../lib/run/dyno'
import {buildCommand} from '../../lib/run/helpers'

const debug = debugFactory('heroku:run')

Expand Down Expand Up @@ -40,7 +39,7 @@ export default class Run extends Command {
'no-tty': flags['no-tty'],
app: flags.app,
attach: true,
command: buildCommand(argv),
command: buildCommand(argv as string[]),
env: flags.env,
heroku: this.heroku,
listen: flags.listen,
Expand All @@ -61,7 +60,7 @@ export default class Run extends Command {
} catch (error: any) {
debug(error)
if (error.exitCode) {
CliUx.ux.error(error.message, {code: error.exitCode, exit: error.exitCode})
ux.error(error.message, {code: error.exitCode, exit: error.exitCode})
} else {
throw error
}
Expand Down
16 changes: 7 additions & 9 deletions packages/cli/src/commands/run/inside.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// tslint:disable:file-name-casing
import {Command, flags} from '@heroku-cli/command-v9'
import {CliUx} from '@oclif/core-v1'
import '@oclif/core-v1/lib/parser'
import {Command, flags} from '@heroku-cli/command'
import {ux} from '@oclif/core'
import debugFactory from 'debug'
import Dyno from '@heroku-cli/plugin-run/lib/lib/dyno'
import {buildCommand} from '@heroku-cli/plugin-run/lib/lib/helpers'
import Dyno from '../../lib/run/dyno'
import {buildCommand} from '../../lib/run/helpers'

const debug = debugFactory('heroku:run:inside')

Expand Down Expand Up @@ -37,8 +35,8 @@ export default class RunInside extends Command {
const opts = {
'exit-code': flags['exit-code'],
app: flags.app,
command: buildCommand(argv.slice(1)),
dyno: argv[0],
command: buildCommand(argv.slice(1) as string[]),
dyno: argv[0] as string,
env: flags.env,
heroku: this.heroku,
listen: flags.listen,
Expand All @@ -51,7 +49,7 @@ export default class RunInside extends Command {
} catch (error: any) {
debug(error)
if (error.exitCode) {
CliUx.ux.exit(error.exitCode)
ux.exit(error.exitCode)
} else {
throw error
}
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/commands/spaces/peerings/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {displayPeeringInfo} from '../../../lib/spaces/peering'

export default class Info extends Command {
static topic = 'spaces'
static hiddenAliases = ['spaces:peering:info']
static description = heredoc(`
display the information necessary to initiate a peering connection
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/spaces/trusted-ips/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import heredoc from 'tsheredoc'

export default class Add extends Command {
static topic = 'spaces'
static aliases = ['trusted-ips:add']
static hiddenAliases = ['trusted-ips:add']
static description = heredoc(`
Add one range to the list of trusted IP ranges
Uses CIDR notation.`)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/spaces/trusted-ips/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import heredoc from 'tsheredoc'

export default class Index extends Command {
static topic = 'spaces'
static aliases = ['trusted-ips']
static hiddenAliases = ['trusted-ips']
static description = heredoc(`
list trusted IP ranges for a space
Trusted IP ranges are only available on Private Spaces.
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/spaces/trusted-ips/remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import heredoc from 'tsheredoc'

export default class Remove extends Command {
static topic = 'spaces'
static aliases = ['trusted-ips:remove']
static hiddenAliases = ['trusted-ips:remove']
static description = heredoc(`
Remove a range from the list of trusted IP ranges
Uses CIDR notation.`)
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/lib/run/log-displayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const EventSource = require('@heroku/eventsource')

interface LogDisplayerOptions {
app: string;
dyno: string;
dyno?: string;
lines?: number;
tail: boolean;
source?: string;
Expand Down

0 comments on commit f849b23

Please sign in to comment.