heroku 11.3.0 → 11.3.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/bin/bats-test-runner.js +3 -3
- package/bin/run.js +1 -1
- package/dist/commands/addons/plans.js +1 -1
- package/dist/commands/apps/destroy.js +8 -6
- package/dist/commands/authorizations/info.d.ts +3 -3
- package/dist/commands/authorizations/info.js +4 -4
- package/dist/commands/authorizations/rotate.d.ts +1 -1
- package/dist/commands/authorizations/rotate.js +2 -2
- package/dist/commands/authorizations/update.d.ts +4 -4
- package/dist/commands/authorizations/update.js +6 -6
- package/dist/commands/autocomplete/create.d.ts +17 -17
- package/dist/commands/autocomplete/create.js +108 -107
- package/dist/commands/autocomplete/doctor.d.ts +2 -2
- package/dist/commands/autocomplete/doctor.js +10 -9
- package/dist/commands/autocomplete/index.js +1 -1
- package/dist/commands/autocomplete/options.d.ts +7 -7
- package/dist/commands/autocomplete/options.js +99 -99
- package/dist/commands/autocomplete/script.d.ts +3 -3
- package/dist/commands/autocomplete/script.js +6 -6
- package/dist/commands/buildpacks/add.d.ts +4 -4
- package/dist/commands/buildpacks/add.js +8 -8
- package/dist/commands/buildpacks/index.js +4 -7
- package/dist/commands/buildpacks/info.d.ts +1 -1
- package/dist/commands/buildpacks/info.js +8 -8
- package/dist/commands/buildpacks/search.d.ts +5 -5
- package/dist/commands/buildpacks/search.js +8 -8
- package/dist/commands/buildpacks/set.d.ts +4 -4
- package/dist/commands/buildpacks/set.js +8 -8
- package/dist/commands/buildpacks/versions.d.ts +1 -1
- package/dist/commands/buildpacks/versions.js +14 -12
- package/dist/commands/certs/add.js +5 -5
- package/dist/commands/certs/auto/index.js +8 -6
- package/dist/commands/certs/generate.d.ts +13 -13
- package/dist/commands/certs/generate.js +57 -55
- package/dist/commands/ci/config/index.js +4 -4
- package/dist/commands/ci/debug.d.ts +1 -1
- package/dist/commands/ci/debug.js +15 -15
- package/dist/commands/ci/open.js +1 -1
- package/dist/commands/clients/info.js +2 -2
- package/dist/commands/clients/rotate.js +1 -1
- package/dist/commands/config/get.js +2 -2
- package/dist/commands/config/index.js +2 -2
- package/dist/commands/console.d.ts +2 -2
- package/dist/commands/console.js +6 -7
- package/dist/commands/container/login.d.ts +3 -3
- package/dist/commands/container/login.js +26 -27
- package/dist/commands/container/logout.d.ts +2 -2
- package/dist/commands/container/logout.js +11 -12
- package/dist/commands/container/pull.js +2 -3
- package/dist/commands/container/push.js +7 -11
- package/dist/commands/container/release.js +2 -3
- package/dist/commands/container/run.js +2 -3
- package/dist/commands/dashboard.js +8 -10
- package/dist/commands/data/maintenances/history.js +3 -1
- package/dist/commands/data/maintenances/info.js +3 -3
- package/dist/commands/data/maintenances/schedule.js +1 -1
- package/dist/commands/data/maintenances/wait.js +1 -1
- package/dist/commands/data/maintenances/window/index.js +1 -1
- package/dist/commands/data/maintenances/window/update.js +1 -1
- package/dist/commands/data/pg/attachments/create.d.ts +8 -0
- package/dist/commands/data/pg/attachments/create.js +134 -40
- package/dist/commands/data/pg/attachments/destroy.js +1 -1
- package/dist/commands/data/pg/attachments/index.js +7 -6
- package/dist/commands/data/pg/create.d.ts +0 -3
- package/dist/commands/data/pg/create.js +10 -109
- package/dist/commands/data/pg/credentials/destroy.js +3 -7
- package/dist/commands/data/pg/credentials/index.js +11 -7
- package/dist/commands/data/pg/credentials/rotate.js +16 -11
- package/dist/commands/data/pg/credentials/url.js +2 -2
- package/dist/commands/data/pg/destroy.js +1 -1
- package/dist/commands/data/pg/docs.js +1 -1
- package/dist/commands/data/pg/fork.js +2 -2
- package/dist/commands/data/pg/info.js +12 -16
- package/dist/commands/data/pg/migrate.d.ts +26 -0
- package/dist/commands/data/pg/migrate.js +440 -0
- package/dist/commands/data/pg/psql.d.ts +0 -1
- package/dist/commands/data/pg/psql.js +4 -19
- package/dist/commands/data/pg/quotas/index.js +3 -3
- package/dist/commands/data/pg/quotas/update.js +1 -1
- package/dist/commands/data/pg/update.d.ts +0 -22
- package/dist/commands/data/pg/update.js +52 -106
- package/dist/commands/domains/add.js +2 -2
- package/dist/commands/domains/index.js +2 -2
- package/dist/commands/domains/wait.d.ts +3 -3
- package/dist/commands/domains/wait.js +3 -3
- package/dist/commands/drains/index.js +2 -2
- package/dist/commands/features/index.d.ts +1 -1
- package/dist/commands/features/index.js +2 -2
- package/dist/commands/features/info.js +1 -1
- package/dist/commands/git/clone.js +4 -2
- package/dist/commands/git/credentials.d.ts +2 -2
- package/dist/commands/git/credentials.js +9 -8
- package/dist/commands/git/remote.js +4 -7
- package/dist/commands/keys/add.js +1 -1
- package/dist/commands/keys/index.js +2 -1
- package/dist/commands/labs/disable.js +6 -8
- package/dist/commands/labs/index.js +1 -1
- package/dist/commands/labs/info.js +1 -1
- package/dist/commands/local/index.js +1 -1
- package/dist/commands/mcp/start.d.ts +0 -1
- package/dist/commands/mcp/start.js +1 -1
- package/dist/commands/members/add.d.ts +4 -4
- package/dist/commands/members/add.js +13 -11
- package/dist/commands/members/remove.js +1 -6
- package/dist/commands/members/set.d.ts +2 -2
- package/dist/commands/members/set.js +6 -6
- package/dist/commands/orgs/index.d.ts +2 -2
- package/dist/commands/orgs/index.js +2 -2
- package/dist/commands/pg/backups/cancel.d.ts +4 -4
- package/dist/commands/pg/backups/cancel.js +6 -6
- package/dist/commands/pg/backups/capture.js +1 -1
- package/dist/commands/pg/backups/delete.js +1 -1
- package/dist/commands/pg/backups/info.js +1 -1
- package/dist/commands/pg/backups/restore.js +3 -3
- package/dist/commands/pg/backups/unschedule.js +1 -1
- package/dist/commands/pg/bloat.d.ts +2 -2
- package/dist/commands/pg/bloat.js +4 -4
- package/dist/commands/pg/blocking.d.ts +2 -2
- package/dist/commands/pg/blocking.js +4 -4
- package/dist/commands/pg/connection-pooling/attach.js +1 -1
- package/dist/commands/pg/copy.js +2 -2
- package/dist/commands/pg/credentials/destroy.js +1 -1
- package/dist/commands/pg/credentials/repair-default.js +1 -1
- package/dist/commands/pg/credentials/url.js +2 -2
- package/dist/commands/pg/credentials.js +2 -7
- package/dist/commands/pg/diagnose.d.ts +6 -6
- package/dist/commands/pg/diagnose.js +21 -21
- package/dist/commands/pg/info.d.ts +5 -5
- package/dist/commands/pg/info.js +37 -40
- package/dist/commands/pg/kill.d.ts +6 -6
- package/dist/commands/pg/kill.js +11 -9
- package/dist/commands/pg/killall.d.ts +4 -4
- package/dist/commands/pg/killall.js +6 -6
- package/dist/commands/pg/links/create.js +2 -2
- package/dist/commands/pg/links/destroy.js +1 -1
- package/dist/commands/pg/links/index.js +8 -6
- package/dist/commands/pg/locks.d.ts +6 -6
- package/dist/commands/pg/locks.js +7 -7
- package/dist/commands/pg/outliers.d.ts +8 -8
- package/dist/commands/pg/outliers.js +39 -42
- package/dist/commands/pg/promote.d.ts +5 -5
- package/dist/commands/pg/promote.js +24 -31
- package/dist/commands/pg/ps.d.ts +4 -4
- package/dist/commands/pg/ps.js +7 -7
- package/dist/commands/pg/psql.d.ts +6 -6
- package/dist/commands/pg/psql.js +8 -8
- package/dist/commands/pg/pull.js +5 -5
- package/dist/commands/pg/push.js +2 -2
- package/dist/commands/pg/reset.js +1 -1
- package/dist/commands/pg/settings/auto-explain/log-analyze.d.ts +4 -4
- package/dist/commands/pg/settings/auto-explain/log-analyze.js +6 -6
- package/dist/commands/pg/settings/auto-explain/log-buffers.d.ts +2 -2
- package/dist/commands/pg/settings/auto-explain/log-buffers.js +6 -6
- package/dist/commands/pg/settings/auto-explain/log-format.d.ts +2 -2
- package/dist/commands/pg/settings/auto-explain/log-format.js +8 -8
- package/dist/commands/pg/settings/auto-explain/log-min-duration.d.ts +2 -2
- package/dist/commands/pg/settings/auto-explain/log-min-duration.js +6 -6
- package/dist/commands/pg/settings/auto-explain/log-nested-statements.d.ts +2 -2
- package/dist/commands/pg/settings/auto-explain/log-nested-statements.js +1 -1
- package/dist/commands/pg/settings/auto-explain/log-triggers.d.ts +4 -4
- package/dist/commands/pg/settings/auto-explain/log-triggers.js +6 -6
- package/dist/commands/pg/settings/auto-explain/log-verbose.d.ts +7 -7
- package/dist/commands/pg/settings/auto-explain/log-verbose.js +8 -8
- package/dist/commands/pg/settings/auto-explain.d.ts +6 -6
- package/dist/commands/pg/settings/auto-explain.js +5 -5
- package/dist/commands/pg/settings/data-connector-details-logs.d.ts +5 -5
- package/dist/commands/pg/settings/data-connector-details-logs.js +4 -4
- package/dist/commands/pg/settings/index.d.ts +4 -4
- package/dist/commands/pg/settings/index.js +9 -9
- package/dist/commands/pg/settings/log-connections.d.ts +6 -6
- package/dist/commands/pg/settings/log-connections.js +5 -5
- package/dist/commands/pg/settings/log-lock-waits.d.ts +3 -3
- package/dist/commands/pg/settings/log-lock-waits.js +5 -5
- package/dist/commands/pg/settings/log-min-duration-statement.d.ts +2 -2
- package/dist/commands/pg/settings/log-min-duration-statement.js +4 -4
- package/dist/commands/pg/settings/log-min-error-statement.d.ts +2 -2
- package/dist/commands/pg/settings/log-min-error-statement.js +4 -4
- package/dist/commands/pg/settings/log-statement.d.ts +2 -2
- package/dist/commands/pg/settings/log-statement.js +4 -4
- package/dist/commands/pg/settings/track-functions.d.ts +2 -2
- package/dist/commands/pg/settings/track-functions.js +4 -4
- package/dist/commands/pg/unfollow.d.ts +5 -5
- package/dist/commands/pg/unfollow.js +9 -9
- package/dist/commands/pg/upgrade/cancel.js +1 -1
- package/dist/commands/pg/upgrade/dryrun.js +1 -1
- package/dist/commands/pg/upgrade/prepare.js +2 -2
- package/dist/commands/pg/upgrade/run.js +2 -2
- package/dist/commands/pg/upgrade/wait.js +1 -1
- package/dist/commands/pg/vacuum-stats.d.ts +4 -4
- package/dist/commands/pg/vacuum-stats.js +6 -6
- package/dist/commands/pg/wait.d.ts +6 -6
- package/dist/commands/pg/wait.js +9 -9
- package/dist/commands/pipelines/diff.js +2 -2
- package/dist/commands/pipelines/info.js +1 -1
- package/dist/commands/pipelines/promote.js +4 -4
- package/dist/commands/pipelines/setup.js +2 -2
- package/dist/commands/pipelines/transfer.js +1 -1
- package/dist/commands/ps/copy.js +1 -1
- package/dist/commands/ps/exec.js +4 -6
- package/dist/commands/ps/forward.js +1 -1
- package/dist/commands/ps/index.js +9 -8
- package/dist/commands/ps/scale.js +4 -4
- package/dist/commands/ps/type.js +6 -6
- package/dist/commands/redis/cli.d.ts +3 -6
- package/dist/commands/redis/cli.js +21 -21
- package/dist/commands/redis/maxmemory.js +1 -1
- package/dist/commands/regions.js +1 -1
- package/dist/commands/releases/index.js +5 -11
- package/dist/commands/releases/info.js +7 -7
- package/dist/commands/releases/output.d.ts +5 -5
- package/dist/commands/releases/output.js +6 -6
- package/dist/commands/reviewapps/disable.js +1 -0
- package/dist/commands/reviewapps/enable.js +1 -0
- package/dist/commands/run/inside.d.ts +1 -1
- package/dist/commands/run/inside.js +5 -5
- package/dist/commands/spaces/create.js +12 -3
- package/dist/commands/spaces/hosts.d.ts +6 -6
- package/dist/commands/spaces/hosts.js +8 -8
- package/dist/commands/spaces/peerings/destroy.js +1 -1
- package/dist/commands/spaces/peerings/index.d.ts +5 -5
- package/dist/commands/spaces/peerings/index.js +7 -7
- package/dist/commands/spaces/ps.js +8 -7
- package/dist/commands/spaces/topology.js +7 -7
- package/dist/commands/spaces/trusted-ips/index.d.ts +6 -6
- package/dist/commands/spaces/trusted-ips/index.js +8 -8
- package/dist/commands/spaces/vpn/config.js +1 -1
- package/dist/commands/spaces/vpn/connections.js +1 -1
- package/dist/commands/spaces/vpn/info.js +3 -3
- package/dist/commands/spaces/vpn/update.js +1 -1
- package/dist/commands/status.js +8 -8
- package/dist/commands/teams/index.js +1 -1
- package/dist/commands/telemetry/add.js +1 -3
- package/dist/commands/telemetry/remove.d.ts +3 -3
- package/dist/commands/telemetry/remove.js +11 -11
- package/dist/commands/usage/addons.js +3 -3
- package/dist/commands/webhooks/deliveries/index.d.ts +1 -1
- package/dist/commands/webhooks/deliveries/index.js +3 -1
- package/dist/commands/webhooks/deliveries/info.d.ts +4 -4
- package/dist/commands/webhooks/deliveries/info.js +8 -6
- package/dist/commands/webhooks/events/info.js +1 -1
- package/dist/commands/webhooks/info.d.ts +4 -4
- package/dist/commands/webhooks/info.js +8 -8
- package/dist/hooks/command_not_found/setup-otel-telemetry.js +2 -2
- package/dist/hooks/finally/send-otel-and-sentry-errors.js +1 -1
- package/dist/hooks/init/setup-otel-telemetry.js +2 -2
- package/dist/hooks/postrun/send-otel-telemetry.js +2 -2
- package/dist/hooks/prerun/collect-and-send-herokulytics.js +8 -6
- package/dist/hooks/preupdate/check-npm-auth.js +0 -1
- package/dist/hooks/update/brew.js +2 -2
- package/dist/hooks/update/tidy.js +1 -1
- package/dist/lib/accounts/accounts.d.ts +7 -7
- package/dist/lib/accounts/accounts.js +43 -41
- package/dist/lib/addons/addons-wait.d.ts +48 -48
- package/dist/lib/addons/create-addon.d.ts +1 -1
- package/dist/lib/addons/create-addon.js +1 -1
- package/dist/lib/addons/destroy-addon.d.ts +1 -1
- package/dist/lib/addons/destroy-addon.js +9 -13
- package/dist/lib/addons/resolve.d.ts +1 -1
- package/dist/lib/addons/resolve.js +2 -1
- package/dist/lib/addons/util.d.ts +3 -3
- package/dist/lib/addons/util.js +8 -8
- package/dist/lib/analytics-telemetry/backboard-herokulytics-client.js +1 -1
- package/dist/lib/analytics-telemetry/backboard-otel-client.js +1 -1
- package/dist/lib/analytics-telemetry/sentry-client.js +1 -1
- package/dist/lib/analytics-telemetry/telemetry-worker.js +2 -2
- package/dist/lib/analytics-telemetry/worker-client.js +8 -9
- package/dist/lib/api.d.ts +2 -2
- package/dist/lib/apps/app-transfer.js +7 -6
- package/dist/lib/apps/error-info.d.ts +1 -1
- package/dist/lib/apps/error-info.js +36 -36
- package/dist/lib/apps/generation.d.ts +5 -5
- package/dist/lib/authorizations/authorizations.js +3 -2
- package/dist/lib/autocomplete/base.js +1 -1
- package/dist/lib/autocomplete/cache.js +1 -1
- package/dist/lib/autocomplete/completions.d.ts +1 -1
- package/dist/lib/autocomplete/completions.js +6 -6
- package/dist/lib/buildpacks/buildpacks.js +2 -2
- package/dist/lib/certs/display-table.d.ts +1 -1
- package/dist/lib/certs/display-table.js +5 -3
- package/dist/lib/certs/flags.d.ts +1 -1
- package/dist/lib/certs/flags.js +5 -4
- package/dist/lib/certs/format-date.d.ts +1 -1
- package/dist/lib/certs/format-date.js +1 -1
- package/dist/lib/certs/get-cert-and-key.d.ts +0 -1
- package/dist/lib/changelog-parser.d.ts +1 -1
- package/dist/lib/changelog-parser.js +4 -4
- package/dist/lib/ci/git.d.ts +9 -1
- package/dist/lib/ci/git.js +18 -4
- package/dist/lib/ci/interfaces/kolkrabbi.d.ts +75 -75
- package/dist/lib/ci/source.d.ts +0 -1
- package/dist/lib/ci/source.js +1 -1
- package/dist/lib/ci/test-run.js +16 -15
- package/dist/lib/ci/validate.d.ts +1 -1
- package/dist/lib/clients/clients.js +2 -3
- package/dist/lib/config/quote.js +5 -5
- package/dist/lib/config/util.js +1 -1
- package/dist/lib/container/docker-helper.js +7 -12
- package/dist/lib/data/base-command.d.ts +1 -1
- package/dist/lib/data/base-command.js +2 -2
- package/dist/lib/data/credential-utils.d.ts +4 -2
- package/dist/lib/data/credential-utils.js +13 -16
- package/dist/lib/data/display-quota.js +3 -3
- package/dist/lib/data/parse-attachment-factors.d.ts +28 -0
- package/dist/lib/data/parse-attachment-factors.js +40 -0
- package/dist/lib/data/pool-config.d.ts +9 -0
- package/dist/lib/data/pool-config.js +127 -22
- package/dist/lib/data/types.d.ts +80 -27
- package/dist/lib/data/types.js +35 -1
- package/dist/lib/data/utils.js +2 -3
- package/dist/lib/data-scrubber/presets.js +2 -2
- package/dist/lib/data-scrubber/scrubber.d.ts +4 -4
- package/dist/lib/data-scrubber/scrubber.js +47 -47
- package/dist/lib/data-scrubber/types.d.ts +14 -14
- package/dist/lib/git/git.d.ts +9 -9
- package/dist/lib/git/git.js +51 -51
- package/dist/lib/local/env-file-validator.js +1 -1
- package/dist/lib/local/fork-foreman.js +4 -4
- package/dist/lib/local/load-foreman-procfile.js +6 -8
- package/dist/lib/local/run-foreman.cjs +58 -53
- package/dist/lib/notify.d.ts +1 -1
- package/dist/lib/notify.js +6 -8
- package/dist/lib/npm-auth.d.ts +0 -3
- package/dist/lib/npm-auth.js +1 -2
- package/dist/lib/pg/backups.js +17 -24
- package/dist/lib/pg/download.js +2 -2
- package/dist/lib/pg/psql.d.ts +1 -3
- package/dist/lib/pg/psql.js +5 -5
- package/dist/lib/pg/push-pull.d.ts +1 -3
- package/dist/lib/pg/setter.d.ts +6 -6
- package/dist/lib/pg/setter.js +16 -15
- package/dist/lib/pg/types.d.ts +81 -81
- package/dist/lib/pg/util.d.ts +19 -0
- package/dist/lib/pg/util.js +56 -5
- package/dist/lib/pipelines/github-api.d.ts +2 -2
- package/dist/lib/pipelines/github-api.js +4 -4
- package/dist/lib/pipelines/kolkrabbi-api.d.ts +8 -8
- package/dist/lib/pipelines/kolkrabbi-api.js +33 -33
- package/dist/lib/pipelines/setup/get-name-and-repo.js +2 -2
- package/dist/lib/pipelines/setup/get-settings.d.ts +2 -2
- package/dist/lib/pipelines/setup/get-settings.js +4 -4
- package/dist/lib/pipelines/setup/validate.js +1 -1
- package/dist/lib/ps-exec/exec.js +4 -7
- package/dist/lib/ps-exec/ssh.d.ts +0 -2
- package/dist/lib/ps-exec/ssh.js +9 -9
- package/dist/lib/redis/api.d.ts +2 -2
- package/dist/lib/redis/api.js +2 -1
- package/dist/lib/releases/releases.js +2 -2
- package/dist/lib/releases/status-helper.d.ts +2 -2
- package/dist/lib/releases/status-helper.js +8 -8
- package/dist/lib/repl.d.ts +8 -10
- package/dist/lib/repl.js +16 -15
- package/dist/lib/run/colorize.js +30 -29
- package/dist/lib/run/dyno.d.ts +4 -8
- package/dist/lib/run/dyno.js +16 -19
- package/dist/lib/run/helpers.js +3 -3
- package/dist/lib/run/log-displayer.js +3 -1
- package/dist/lib/spaces/format.js +19 -17
- package/dist/lib/spaces/hosts.d.ts +3 -3
- package/dist/lib/spaces/hosts.js +3 -1
- package/dist/lib/spaces/peering.js +5 -1
- package/dist/lib/spaces/vpn-connections.js +4 -2
- package/dist/lib/telemetry/util.js +2 -2
- package/dist/lib/types/app-errors.d.ts +2 -2
- package/dist/lib/types/completion.d.ts +3 -4
- package/dist/lib/types/domain.d.ts +1 -1
- package/dist/lib/types/notifications.d.ts +7 -7
- package/dist/lib/utils/table-utils.js +4 -4
- package/dist/lib/webhooks/base.d.ts +1 -1
- package/dist/lib/webhooks/base.js +2 -2
- package/dist/nls-data.d.ts +2 -2
- package/dist/nls-data.js +2 -2
- package/dist/nls.d.ts +1 -1
- package/dist/nls.js +1 -1
- package/npm-shrinkwrap.json +5763 -5923
- package/oclif.manifest.json +573 -540
- package/package.json +20 -25
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,40 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
## [11.3.1-beta.1](https://github.com/heroku/cli/compare/v11.3.0...v11.3.1-beta.1) (2026-05-13)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* 'data:pg:migrate' command implementation (W-21303011) ([#3546](https://github.com/heroku/cli/issues/3546)) ([127e682](https://github.com/heroku/cli/commit/127e682e23c2798346372528f55397563ad3e505))
|
|
13
|
+
* multi-factor attachment support for Advanced dbs (W-21632630) ([#3655](https://github.com/heroku/cli/issues/3655)) ([87785e8](https://github.com/heroku/cli/commit/87785e809fae29cc23a9c29b44b3a6f285961861))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* align ps:type with customer-facing private/shield dyno names ([#3705](https://github.com/heroku/cli/issues/3705)) ([0b36a1f](https://github.com/heroku/cli/commit/0b36a1f3c0c5ab21b3a3887787f290f62135957f))
|
|
19
|
+
* migrate release scripts from qqjs to script-exec helpers ([#3707](https://github.com/heroku/cli/issues/3707)) ([dcbaa1b](https://github.com/heroku/cli/commit/dcbaa1b153cab52b009811df30cac80aa93c98d9))
|
|
20
|
+
* prevent unhandled promise rejection in apps:destroy ([#3679](https://github.com/heroku/cli/issues/3679)) ([3e4c838](https://github.com/heroku/cli/commit/3e4c838ec28276ed3b3e01dd76d5f6cb78c58f19)), closes [#3677](https://github.com/heroku/cli/issues/3677) [#3677](https://github.com/heroku/cli/issues/3677) [#3677](https://github.com/heroku/cli/issues/3677)
|
|
21
|
+
* updates @heroku-cli/command to address 2FA token prompting bug ([#3690](https://github.com/heroku/cli/issues/3690)) ([eda4459](https://github.com/heroku/cli/commit/eda4459fb8b98442d0650c1612d215c74eb2250b))
|
|
22
|
+
* validate HEROKU_HOST for container registry commands ([#3704](https://github.com/heroku/cli/issues/3704)) ([04df827](https://github.com/heroku/cli/commit/04df8275f933c2f055a384d7deaccd524bfa5220))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Documentation
|
|
26
|
+
|
|
27
|
+
* add AGENTS.md with CLI design patterns for AI agents ([#3676](https://github.com/heroku/cli/issues/3676)) ([d547ed5](https://github.com/heroku/cli/commit/d547ed5fe25e49180c41fba51b761815af6d5b3f))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Code Refactoring
|
|
31
|
+
|
|
32
|
+
* apply lint fixes to lib files ([#3668](https://github.com/heroku/cli/issues/3668)) ([eb9b040](https://github.com/heroku/cli/commit/eb9b04021ac902c196a0c216f442c7ce756179bc))
|
|
33
|
+
* apply lint formatting to auth through features commands ([#3665](https://github.com/heroku/cli/issues/3665)) ([7e84cbf](https://github.com/heroku/cli/commit/7e84cbf2706f8edcbc0566255b71b22be64b5c32))
|
|
34
|
+
* apply lint formatting to git through pg commands ([#3666](https://github.com/heroku/cli/issues/3666)) ([fd4c8c0](https://github.com/heroku/cli/commit/fd4c8c0eb178b76479e6ded1e8e99bc14b633af5))
|
|
35
|
+
* apply lint formatting to remaining commands ([#3667](https://github.com/heroku/cli/issues/3667)) ([b3f11bd](https://github.com/heroku/cli/commit/b3f11bd34e8256da3b6a1198ec4845d5e03253c9))
|
|
36
|
+
* apply lint formatting to scripts and hooks folders ([#3669](https://github.com/heroku/cli/issues/3669)) ([8a56a67](https://github.com/heroku/cli/commit/8a56a67f96e6e81603d76955ea78dbc2e1ed4433))
|
|
37
|
+
* apply linting fixes to test helpers, fixtures, and integration tests ([#3671](https://github.com/heroku/cli/issues/3671)) ([6b96cb9](https://github.com/heroku/cli/commit/6b96cb9ed43604db8b21ff4d191dee9fed4dddb8))
|
|
38
|
+
* migrate from qqjs to execa with custom wrapper ([#3678](https://github.com/heroku/cli/issues/3678)) ([ad81615](https://github.com/heroku/cli/commit/ad81615b2d4e6bd470be5ef10b3d35f94d8bed40))
|
|
39
|
+
* migrate to shared eslint config and testing functions ([#3661](https://github.com/heroku/cli/issues/3661)) ([d5ad9ac](https://github.com/heroku/cli/commit/d5ad9acf0f22028475c47fb1e189022cf0374989))
|
|
40
|
+
|
|
7
41
|
## [11.3.0](https://github.com/heroku/cli/compare/v11.2.0...v11.3.0) (2026-04-15)
|
|
8
42
|
|
|
9
43
|
|
package/bin/bats-test-runner.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import {spawn} from 'node:child_process'
|
|
4
|
+
import os from 'node:os'
|
|
5
5
|
|
|
6
6
|
if (os.platform() === 'win32' || os.platform() === 'windows') console.log('skipping on windows')
|
|
7
|
-
else spawn('npx bats test/acceptance/*.bats', {stdio: 'inherit'
|
|
7
|
+
else spawn('npx bats test/acceptance/*.bats', {shell: true, stdio: 'inherit'})
|
package/bin/run.js
CHANGED
|
@@ -12,7 +12,7 @@ process.env.HEROKU_UPDATE_INSTRUCTIONS = process.env.HEROKU_UPDATE_INSTRUCTIONS
|
|
|
12
12
|
const now = new Date()
|
|
13
13
|
const cliStartTime = now.getTime()
|
|
14
14
|
|
|
15
|
-
const {
|
|
15
|
+
const {getTelemetryDisabledReason, isTelemetryEnabled, telemetryDebug} = await import('../dist/lib/analytics-telemetry/telemetry-utils.js')
|
|
16
16
|
const enableTelemetry = isTelemetryEnabled()
|
|
17
17
|
|
|
18
18
|
if (enableTelemetry) {
|
|
@@ -29,7 +29,7 @@ export default class Plans extends Command {
|
|
|
29
29
|
/* eslint-disable perfectionist/sort-objects */
|
|
30
30
|
hux.table(plans, {
|
|
31
31
|
default: {
|
|
32
|
-
header: ' ',
|
|
32
|
+
header: ' ', // <- This space is necessary to prevent the table header from rendering as "default"
|
|
33
33
|
get: (plan) => plan.default ? 'default' : '',
|
|
34
34
|
},
|
|
35
35
|
name: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command, flags } from '@heroku-cli/command';
|
|
2
2
|
import * as color from '@heroku/heroku-cli-util/color';
|
|
3
3
|
import { Args, ux } from '@oclif/core';
|
|
4
|
-
import
|
|
4
|
+
import { gitService } from '../../lib/ci/git.js';
|
|
5
5
|
import ConfirmCommand from '../../lib/confirm-command.js';
|
|
6
6
|
export default class Destroy extends Command {
|
|
7
7
|
static args = {
|
|
@@ -30,13 +30,15 @@ export default class Destroy extends Command {
|
|
|
30
30
|
* you want, and they can all point to the same url.
|
|
31
31
|
* The only requirement is that the "name" is unique.
|
|
32
32
|
*/
|
|
33
|
-
if (
|
|
33
|
+
if (gitService.inGitRepo()) {
|
|
34
34
|
// delete git remotes pointing to this app
|
|
35
|
-
const remotes = await
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
remotes.get(
|
|
35
|
+
const remotes = await gitService.listRemotes();
|
|
36
|
+
// Deduplicate remote names (same name appears for fetch and push)
|
|
37
|
+
const names = new Set([
|
|
38
|
+
...(remotes.get(gitService.gitUrl(app))?.map(({ name }) => name) ?? []),
|
|
39
|
+
...(remotes.get(gitService.sshGitUrl(app))?.map(({ name }) => name) ?? []),
|
|
39
40
|
]);
|
|
41
|
+
await Promise.all([...names].map(name => gitService.rmRemote(name)));
|
|
40
42
|
}
|
|
41
43
|
ux.action.stop();
|
|
42
44
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Command } from '@heroku-cli/command';
|
|
2
2
|
export default class AuthorizationsInfo extends Command {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
3
6
|
static description: string;
|
|
4
7
|
static flags: {
|
|
5
8
|
json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
6
9
|
};
|
|
7
|
-
static args: {
|
|
8
|
-
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
9
|
-
};
|
|
10
10
|
run(): Promise<void>;
|
|
11
11
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Command, flags } from '@heroku-cli/command';
|
|
2
|
-
import { Args } from '@oclif/core';
|
|
3
2
|
import { hux } from '@heroku/heroku-cli-util';
|
|
3
|
+
import { Args } from '@oclif/core';
|
|
4
4
|
import { display } from '../../lib/authorizations/authorizations.js';
|
|
5
5
|
export default class AuthorizationsInfo extends Command {
|
|
6
|
+
static args = {
|
|
7
|
+
id: Args.string({ description: 'ID of the authorization', required: true }),
|
|
8
|
+
};
|
|
6
9
|
static description = 'show an existing OAuth authorization';
|
|
7
10
|
static flags = {
|
|
8
11
|
json: flags.boolean({ char: 'j', description: 'output in json format' }),
|
|
9
12
|
};
|
|
10
|
-
static args = {
|
|
11
|
-
id: Args.string({ required: true, description: 'ID of the authorization' }),
|
|
12
|
-
};
|
|
13
13
|
async run() {
|
|
14
14
|
const { args, flags } = await this.parse(AuthorizationsInfo);
|
|
15
15
|
const { body: authentication } = await this.heroku.get(`/oauth/authorizations/${args.id}`);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Command } from '@heroku-cli/command';
|
|
2
2
|
export default class AuthorizationsRotate extends Command {
|
|
3
|
-
static description: string;
|
|
4
3
|
static args: {
|
|
5
4
|
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
5
|
};
|
|
6
|
+
static description: string;
|
|
7
7
|
run(): Promise<void>;
|
|
8
8
|
}
|
|
@@ -2,10 +2,10 @@ import { Command } from '@heroku-cli/command';
|
|
|
2
2
|
import { Args, ux } from '@oclif/core';
|
|
3
3
|
import { display } from '../../lib/authorizations/authorizations.js';
|
|
4
4
|
export default class AuthorizationsRotate extends Command {
|
|
5
|
-
static description = 'updates an OAuth authorization token';
|
|
6
5
|
static args = {
|
|
7
|
-
id: Args.string({
|
|
6
|
+
id: Args.string({ description: 'ID of the authorization', required: true }),
|
|
8
7
|
};
|
|
8
|
+
static description = 'updates an OAuth authorization token';
|
|
9
9
|
async run() {
|
|
10
10
|
const { args } = await this.parse(AuthorizationsRotate);
|
|
11
11
|
ux.action.start('Rotating OAuth Authorization');
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Command } from '@heroku-cli/command';
|
|
2
2
|
export default class AuthorizationsUpdate extends Command {
|
|
3
|
+
static args: {
|
|
4
|
+
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
3
6
|
static description: string;
|
|
4
7
|
static flags: {
|
|
5
|
-
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
8
|
'client-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
9
|
'client-secret': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
-
|
|
9
|
-
static args: {
|
|
10
|
-
id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
10
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
11
|
};
|
|
12
12
|
run(): Promise<void>;
|
|
13
13
|
}
|
|
@@ -2,14 +2,14 @@ import { Command, flags } from '@heroku-cli/command';
|
|
|
2
2
|
import { Args, ux } from '@oclif/core';
|
|
3
3
|
import { display } from '../../lib/authorizations/authorizations.js';
|
|
4
4
|
export default class AuthorizationsUpdate extends Command {
|
|
5
|
+
static args = {
|
|
6
|
+
id: Args.string({ description: 'ID of the authorization', required: true }),
|
|
7
|
+
};
|
|
5
8
|
static description = 'updates an OAuth authorization';
|
|
6
9
|
static flags = {
|
|
10
|
+
'client-id': flags.string({ dependsOn: ['client-secret'], description: 'identifier of OAuth client to set' }),
|
|
11
|
+
'client-secret': flags.string({ dependsOn: ['client-id'], description: 'secret of OAuth client to set' }),
|
|
7
12
|
description: flags.string({ char: 'd', description: 'set a custom authorization description' }),
|
|
8
|
-
'client-id': flags.string({ description: 'identifier of OAuth client to set', dependsOn: ['client-secret'] }),
|
|
9
|
-
'client-secret': flags.string({ description: 'secret of OAuth client to set', dependsOn: ['client-id'] }),
|
|
10
|
-
};
|
|
11
|
-
static args = {
|
|
12
|
-
id: Args.string({ required: true, description: 'ID of the authorization' }),
|
|
13
13
|
};
|
|
14
14
|
async run() {
|
|
15
15
|
const { args, flags } = await this.parse(AuthorizationsUpdate);
|
|
@@ -23,8 +23,8 @@ export default class AuthorizationsUpdate extends Command {
|
|
|
23
23
|
}
|
|
24
24
|
const { body: authentication } = await this.heroku.patch(`/oauth/authorizations/${args.id}`, {
|
|
25
25
|
body: {
|
|
26
|
-
description: flags.description,
|
|
27
26
|
client,
|
|
27
|
+
description: flags.description,
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
ux.action.stop();
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { AutocompleteBase } from '../../lib/autocomplete/base.js';
|
|
2
2
|
export default class Create extends AutocompleteBase {
|
|
3
|
-
static hidden: boolean;
|
|
4
3
|
static description: string;
|
|
4
|
+
static hidden: boolean;
|
|
5
5
|
private _commands?;
|
|
6
|
-
|
|
7
|
-
private ensureDirs;
|
|
8
|
-
private createFiles;
|
|
9
|
-
private get bashSetupScriptPath();
|
|
6
|
+
private get bashCommandsList();
|
|
10
7
|
private get bashCommandsListPath();
|
|
11
|
-
private get
|
|
12
|
-
private get
|
|
13
|
-
private get skipEllipsis();
|
|
8
|
+
private get bashSetupScript();
|
|
9
|
+
private get bashSetupScriptPath();
|
|
14
10
|
private get commands();
|
|
15
|
-
private get
|
|
16
|
-
private get
|
|
17
|
-
private get
|
|
11
|
+
private get completionDotsFunc();
|
|
12
|
+
private get envAnalyticsDir();
|
|
13
|
+
private get envCommandsPath();
|
|
14
|
+
private get skipEllipsis();
|
|
18
15
|
private get zshCommandsFlagsSetters();
|
|
16
|
+
private get zshCommandsSetter();
|
|
17
|
+
private get zshCompletionSetters();
|
|
18
|
+
private get zshCompletionSettersPath();
|
|
19
|
+
private get zshSetupScript();
|
|
20
|
+
private get zshSetupScriptPath();
|
|
21
|
+
run(): Promise<void>;
|
|
22
|
+
private createFiles;
|
|
23
|
+
private ensureDirs;
|
|
19
24
|
private genCmdPublicFlags;
|
|
20
25
|
private genCmdWithDescription;
|
|
21
|
-
private genZshCmdFlagsSetter;
|
|
22
26
|
private genZshAllCmdsListSetter;
|
|
23
|
-
private
|
|
24
|
-
private get envCommandsPath();
|
|
25
|
-
private get bashSetupScript();
|
|
26
|
-
private get zshSetupScript();
|
|
27
|
-
private get completionDotsFunc();
|
|
27
|
+
private genZshCmdFlagsSetter;
|
|
28
28
|
private wantsLocalFiles;
|
|
29
29
|
}
|
|
@@ -1,63 +1,56 @@
|
|
|
1
1
|
import debug from 'debug';
|
|
2
2
|
import fs from 'fs-extra';
|
|
3
|
+
import path from 'node:path';
|
|
3
4
|
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import * as path from 'path';
|
|
5
5
|
import { AutocompleteBase } from '../../lib/autocomplete/base.js';
|
|
6
6
|
const __filename = fileURLToPath(import.meta.url);
|
|
7
7
|
const __dirname = path.dirname(__filename);
|
|
8
8
|
const debugLog = debug('autocomplete:create');
|
|
9
9
|
const AC_LIB_PATH = path.resolve(__dirname, '..', '..', '..', 'autocomplete-scripts');
|
|
10
10
|
export default class Create extends AutocompleteBase {
|
|
11
|
-
static hidden = true;
|
|
12
11
|
static description = 'create autocomplete setup scripts and completion functions';
|
|
12
|
+
static hidden = true;
|
|
13
13
|
_commands;
|
|
14
|
-
|
|
15
|
-
this.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
await fs.writeFile(this.zshSetupScriptPath, this.zshSetupScript);
|
|
30
|
-
await fs.writeFile(this.bashCommandsListPath, this.bashCommandsList);
|
|
31
|
-
await fs.writeFile(this.zshCompletionSettersPath, this.zshCompletionSetters);
|
|
32
|
-
}
|
|
33
|
-
get bashSetupScriptPath() {
|
|
34
|
-
// <cacheDir>/autocomplete/bash_setup
|
|
35
|
-
return path.join(this.autocompleteCacheDir, 'bash_setup');
|
|
14
|
+
get bashCommandsList() {
|
|
15
|
+
return this.commands.map(c => {
|
|
16
|
+
try {
|
|
17
|
+
const publicFlags = this.genCmdPublicFlags(c).trim();
|
|
18
|
+
return `${c.id} ${publicFlags}`;
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
debugLog(`Error creating bash completion for command ${c.id}, moving on...`);
|
|
22
|
+
debugLog(error.message);
|
|
23
|
+
this.writeLogFile(error.message).catch(error => {
|
|
24
|
+
debugLog(`Failed to write log file: ${error.message}`);
|
|
25
|
+
});
|
|
26
|
+
return '';
|
|
27
|
+
}
|
|
28
|
+
}).join('\n');
|
|
36
29
|
}
|
|
37
30
|
get bashCommandsListPath() {
|
|
38
31
|
// <cacheDir>/autocomplete/commands
|
|
39
32
|
return path.join(this.autocompleteCacheDir, 'commands');
|
|
40
33
|
}
|
|
41
|
-
get
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// <cacheDir>/autocomplete/commands_setters
|
|
47
|
-
return path.join(this.autocompleteCacheDir, 'commands_setters');
|
|
34
|
+
get bashSetupScript() {
|
|
35
|
+
return `${this.envAnalyticsDir}
|
|
36
|
+
${this.envCommandsPath}
|
|
37
|
+
HEROKU_AC_BASH_COMPFUNC_PATH=${AC_LIB_PATH}/bash/heroku.bash && test -f $HEROKU_AC_BASH_COMPFUNC_PATH && source $HEROKU_AC_BASH_COMPFUNC_PATH;
|
|
38
|
+
`;
|
|
48
39
|
}
|
|
49
|
-
get
|
|
50
|
-
|
|
40
|
+
get bashSetupScriptPath() {
|
|
41
|
+
// <cacheDir>/autocomplete/bash_setup
|
|
42
|
+
return path.join(this.autocompleteCacheDir, 'bash_setup');
|
|
51
43
|
}
|
|
52
44
|
get commands() {
|
|
53
45
|
if (this._commands)
|
|
54
46
|
return this._commands;
|
|
55
47
|
const { plugins } = this.config;
|
|
56
48
|
const commands = [];
|
|
57
|
-
|
|
58
|
-
|
|
49
|
+
const pluginList = Array.isArray(plugins) ? plugins : [...plugins.values()];
|
|
50
|
+
for (const p of pluginList) {
|
|
51
|
+
for (const c of p.commands) {
|
|
59
52
|
if (c.hidden)
|
|
60
|
-
|
|
53
|
+
continue;
|
|
61
54
|
try {
|
|
62
55
|
commands.push(c);
|
|
63
56
|
}
|
|
@@ -68,19 +61,36 @@ export default class Create extends AutocompleteBase {
|
|
|
68
61
|
debugLog(`Failed to write log file: ${error.message}`);
|
|
69
62
|
});
|
|
70
63
|
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
73
66
|
this._commands = commands;
|
|
74
67
|
return this._commands;
|
|
75
68
|
}
|
|
76
|
-
get
|
|
69
|
+
get completionDotsFunc() {
|
|
70
|
+
return `expand-or-complete-with-dots() {
|
|
71
|
+
echo -n "..."
|
|
72
|
+
zle expand-or-complete
|
|
73
|
+
zle redisplay
|
|
74
|
+
}
|
|
75
|
+
zle -N expand-or-complete-with-dots
|
|
76
|
+
bindkey "^I" expand-or-complete-with-dots`;
|
|
77
|
+
}
|
|
78
|
+
get envAnalyticsDir() {
|
|
79
|
+
return `HEROKU_AC_ANALYTICS_DIR=${path.join(this.autocompleteCacheDir, 'completion_analytics')};`;
|
|
80
|
+
}
|
|
81
|
+
get envCommandsPath() {
|
|
82
|
+
return `HEROKU_AC_COMMANDS_PATH=${path.join(this.autocompleteCacheDir, 'commands')};`;
|
|
83
|
+
}
|
|
84
|
+
get skipEllipsis() {
|
|
85
|
+
return process.env.HEROKU_AC_ZSH_SKIP_ELLIPSIS === '1';
|
|
86
|
+
}
|
|
87
|
+
get zshCommandsFlagsSetters() {
|
|
77
88
|
return this.commands.map(c => {
|
|
78
89
|
try {
|
|
79
|
-
|
|
80
|
-
return `${c.id} ${publicFlags}`;
|
|
90
|
+
return this.genZshCmdFlagsSetter(c);
|
|
81
91
|
}
|
|
82
92
|
catch (error) {
|
|
83
|
-
debugLog(`Error creating
|
|
93
|
+
debugLog(`Error creating zsh autocomplete for command ${c.id}, moving on...`);
|
|
84
94
|
debugLog(error.message);
|
|
85
95
|
this.writeLogFile(error.message).catch(error => {
|
|
86
96
|
debugLog(`Failed to write log file: ${error.message}`);
|
|
@@ -89,11 +99,6 @@ export default class Create extends AutocompleteBase {
|
|
|
89
99
|
}
|
|
90
100
|
}).join('\n');
|
|
91
101
|
}
|
|
92
|
-
get zshCompletionSetters() {
|
|
93
|
-
const cmdsSetter = this.zshCommandsSetter;
|
|
94
|
-
const flagSetters = this.zshCommandsFlagsSetters;
|
|
95
|
-
return `${cmdsSetter}\n${flagSetters}`;
|
|
96
|
-
}
|
|
97
102
|
get zshCommandsSetter() {
|
|
98
103
|
const cmdsWithDescriptions = this.commands.map(c => {
|
|
99
104
|
try {
|
|
@@ -110,20 +115,50 @@ export default class Create extends AutocompleteBase {
|
|
|
110
115
|
});
|
|
111
116
|
return this.genZshAllCmdsListSetter(cmdsWithDescriptions);
|
|
112
117
|
}
|
|
113
|
-
get
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
118
|
+
get zshCompletionSetters() {
|
|
119
|
+
const cmdsSetter = this.zshCommandsSetter;
|
|
120
|
+
const flagSetters = this.zshCommandsFlagsSetters;
|
|
121
|
+
return `${cmdsSetter}\n${flagSetters}`;
|
|
122
|
+
}
|
|
123
|
+
get zshCompletionSettersPath() {
|
|
124
|
+
// <cacheDir>/autocomplete/commands_setters
|
|
125
|
+
return path.join(this.autocompleteCacheDir, 'commands_setters');
|
|
126
|
+
}
|
|
127
|
+
get zshSetupScript() {
|
|
128
|
+
return `${this.skipEllipsis ? '' : this.completionDotsFunc}
|
|
129
|
+
${this.envAnalyticsDir}
|
|
130
|
+
${this.envCommandsPath}
|
|
131
|
+
HEROKU_AC_ZSH_SETTERS_PATH=\${HEROKU_AC_COMMANDS_PATH}_setters && test -f $HEROKU_AC_ZSH_SETTERS_PATH && source $HEROKU_AC_ZSH_SETTERS_PATH;
|
|
132
|
+
fpath=(
|
|
133
|
+
${AC_LIB_PATH}/zsh
|
|
134
|
+
$fpath
|
|
135
|
+
);
|
|
136
|
+
autoload -Uz compinit;
|
|
137
|
+
compinit;
|
|
138
|
+
`;
|
|
139
|
+
}
|
|
140
|
+
get zshSetupScriptPath() {
|
|
141
|
+
// <cacheDir>/autocomplete/zsh_setup
|
|
142
|
+
return path.join(this.autocompleteCacheDir, 'zsh_setup');
|
|
143
|
+
}
|
|
144
|
+
async run() {
|
|
145
|
+
this.errorIfWindows();
|
|
146
|
+
// 1. ensure needed dirs
|
|
147
|
+
await this.ensureDirs();
|
|
148
|
+
// 2. save (generated) autocomplete files
|
|
149
|
+
await this.createFiles();
|
|
150
|
+
}
|
|
151
|
+
async createFiles() {
|
|
152
|
+
await fs.writeFile(this.bashSetupScriptPath, this.bashSetupScript);
|
|
153
|
+
await fs.writeFile(this.zshSetupScriptPath, this.zshSetupScript);
|
|
154
|
+
await fs.writeFile(this.bashCommandsListPath, this.bashCommandsList);
|
|
155
|
+
await fs.writeFile(this.zshCompletionSettersPath, this.zshCompletionSetters);
|
|
156
|
+
}
|
|
157
|
+
async ensureDirs() {
|
|
158
|
+
// ensure autocomplete cache dir
|
|
159
|
+
await fs.ensureDir(this.autocompleteCacheDir);
|
|
160
|
+
// ensure autocomplete completions dir
|
|
161
|
+
await fs.ensureDir(this.completionsCacheDir);
|
|
127
162
|
}
|
|
128
163
|
genCmdPublicFlags(command) {
|
|
129
164
|
const Flags = command.flags || {};
|
|
@@ -138,10 +173,19 @@ export default class Create extends AutocompleteBase {
|
|
|
138
173
|
const text = command.description.split('\n')[0];
|
|
139
174
|
description = `:"${text}"`;
|
|
140
175
|
}
|
|
141
|
-
return `"${command.id.
|
|
176
|
+
return `"${command.id.replaceAll(':', String.raw `\:`)}"${description}`;
|
|
177
|
+
}
|
|
178
|
+
genZshAllCmdsListSetter(cmdsWithDesc) {
|
|
179
|
+
return `
|
|
180
|
+
_set_all_commands_list () {
|
|
181
|
+
_all_commands_list=(
|
|
182
|
+
${cmdsWithDesc.join('\n')}
|
|
183
|
+
)
|
|
184
|
+
}
|
|
185
|
+
`;
|
|
142
186
|
}
|
|
143
187
|
genZshCmdFlagsSetter(command) {
|
|
144
|
-
const {
|
|
188
|
+
const { flags: commandFlags = {}, id } = command;
|
|
145
189
|
const flagscompletions = Object.keys(commandFlags)
|
|
146
190
|
.filter(flag => !commandFlags[flag].hidden)
|
|
147
191
|
.map(flag => {
|
|
@@ -162,7 +206,7 @@ export default class Create extends AutocompleteBase {
|
|
|
162
206
|
})
|
|
163
207
|
.join('\n');
|
|
164
208
|
if (flagscompletions) {
|
|
165
|
-
return `_set_${id.
|
|
209
|
+
return `_set_${id.replaceAll(':', '_')}_flags () {
|
|
166
210
|
_flags=(
|
|
167
211
|
${flagscompletions}
|
|
168
212
|
)
|
|
@@ -171,49 +215,6 @@ ${flagscompletions}
|
|
|
171
215
|
}
|
|
172
216
|
return `# no flags for ${id}`;
|
|
173
217
|
}
|
|
174
|
-
genZshAllCmdsListSetter(cmdsWithDesc) {
|
|
175
|
-
return `
|
|
176
|
-
_set_all_commands_list () {
|
|
177
|
-
_all_commands_list=(
|
|
178
|
-
${cmdsWithDesc.join('\n')}
|
|
179
|
-
)
|
|
180
|
-
}
|
|
181
|
-
`;
|
|
182
|
-
}
|
|
183
|
-
get envAnalyticsDir() {
|
|
184
|
-
return `HEROKU_AC_ANALYTICS_DIR=${path.join(this.autocompleteCacheDir, 'completion_analytics')};`;
|
|
185
|
-
}
|
|
186
|
-
get envCommandsPath() {
|
|
187
|
-
return `HEROKU_AC_COMMANDS_PATH=${path.join(this.autocompleteCacheDir, 'commands')};`;
|
|
188
|
-
}
|
|
189
|
-
get bashSetupScript() {
|
|
190
|
-
return `${this.envAnalyticsDir}
|
|
191
|
-
${this.envCommandsPath}
|
|
192
|
-
HEROKU_AC_BASH_COMPFUNC_PATH=${AC_LIB_PATH}/bash/heroku.bash && test -f $HEROKU_AC_BASH_COMPFUNC_PATH && source $HEROKU_AC_BASH_COMPFUNC_PATH;
|
|
193
|
-
`;
|
|
194
|
-
}
|
|
195
|
-
get zshSetupScript() {
|
|
196
|
-
return `${this.skipEllipsis ? '' : this.completionDotsFunc}
|
|
197
|
-
${this.envAnalyticsDir}
|
|
198
|
-
${this.envCommandsPath}
|
|
199
|
-
HEROKU_AC_ZSH_SETTERS_PATH=\${HEROKU_AC_COMMANDS_PATH}_setters && test -f $HEROKU_AC_ZSH_SETTERS_PATH && source $HEROKU_AC_ZSH_SETTERS_PATH;
|
|
200
|
-
fpath=(
|
|
201
|
-
${AC_LIB_PATH}/zsh
|
|
202
|
-
$fpath
|
|
203
|
-
);
|
|
204
|
-
autoload -Uz compinit;
|
|
205
|
-
compinit;
|
|
206
|
-
`;
|
|
207
|
-
}
|
|
208
|
-
get completionDotsFunc() {
|
|
209
|
-
return `expand-or-complete-with-dots() {
|
|
210
|
-
echo -n "..."
|
|
211
|
-
zle expand-or-complete
|
|
212
|
-
zle redisplay
|
|
213
|
-
}
|
|
214
|
-
zle -N expand-or-complete-with-dots
|
|
215
|
-
bindkey "^I" expand-or-complete-with-dots`;
|
|
216
|
-
}
|
|
217
218
|
wantsLocalFiles(flag) {
|
|
218
219
|
return [
|
|
219
220
|
'file',
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Interfaces } from '@oclif/core';
|
|
2
2
|
import { AutocompleteBase } from '../../lib/autocomplete/base.js';
|
|
3
3
|
export default class Doctor extends AutocompleteBase {
|
|
4
|
-
static hidden: boolean;
|
|
5
|
-
static description: string;
|
|
6
4
|
static args: {
|
|
7
5
|
shell: Interfaces.Arg<string | undefined, Record<string, unknown>>;
|
|
8
6
|
};
|
|
7
|
+
static description: string;
|
|
9
8
|
static flags: Interfaces.FlagInput;
|
|
9
|
+
static hidden: boolean;
|
|
10
10
|
run(): Promise<void>;
|
|
11
11
|
private printList;
|
|
12
12
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { flags } from '@heroku-cli/command';
|
|
2
|
-
import { Args } from '@oclif/core';
|
|
3
2
|
import { hux } from '@heroku/heroku-cli-util';
|
|
3
|
+
import { Args } from '@oclif/core';
|
|
4
4
|
import fs from 'fs-extra';
|
|
5
|
-
import
|
|
5
|
+
import path from 'node:path';
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
7
|
import { AutocompleteBase } from '../../lib/autocomplete/base.js';
|
|
8
8
|
const __filename = fileURLToPath(import.meta.url);
|
|
9
9
|
const __dirname = path.dirname(__filename);
|
|
10
10
|
export default class Doctor extends AutocompleteBase {
|
|
11
|
-
static hidden = true;
|
|
12
|
-
static description = 'autocomplete diagnostic';
|
|
13
11
|
static args = {
|
|
14
12
|
shell: Args.string({ description: 'shell type', required: false }),
|
|
15
13
|
};
|
|
14
|
+
static description = 'autocomplete diagnostic';
|
|
16
15
|
static flags = {
|
|
17
16
|
verbose: flags.boolean({ description: 'list completable commands' }),
|
|
18
17
|
};
|
|
18
|
+
static hidden = true;
|
|
19
19
|
async run() {
|
|
20
20
|
const { args, flags } = await this.parse(Doctor);
|
|
21
21
|
const shell = args.shell || this.config.shell;
|
|
@@ -35,7 +35,7 @@ export default class Doctor extends AutocompleteBase {
|
|
|
35
35
|
try {
|
|
36
36
|
const shellProfile = await fs.readFile(shellProfilePath);
|
|
37
37
|
const regex = /AC_\w+_SETUP_PATH/;
|
|
38
|
-
shimValue = regex.
|
|
38
|
+
shimValue = regex.test(shellProfile.toString()) ? 'present' : 'missing';
|
|
39
39
|
}
|
|
40
40
|
catch {
|
|
41
41
|
// File doesn't exist or can't be read
|
|
@@ -78,8 +78,9 @@ export default class Doctor extends AutocompleteBase {
|
|
|
78
78
|
const header = 'Completable Commands';
|
|
79
79
|
this.log(header);
|
|
80
80
|
this.log('='.repeat(header.length));
|
|
81
|
-
this.config.plugins.
|
|
82
|
-
|
|
81
|
+
const pluginList = Array.isArray(this.config.plugins) ? this.config.plugins : [...this.config.plugins.values()];
|
|
82
|
+
for (const p of pluginList) {
|
|
83
|
+
for (const c of p.commands) {
|
|
83
84
|
try {
|
|
84
85
|
if (c.hidden) {
|
|
85
86
|
this.log(`${c.id} (hidden)`);
|
|
@@ -105,7 +106,7 @@ export default class Doctor extends AutocompleteBase {
|
|
|
105
106
|
catch {
|
|
106
107
|
this.log(`Error creating autocomplete for command ${c.id}`);
|
|
107
108
|
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
110
111
|
}
|
|
111
112
|
}
|
|
@@ -2,7 +2,7 @@ import { flags } from '@heroku-cli/command';
|
|
|
2
2
|
import { AppCompletion, PipelineCompletion, SpaceCompletion, TeamCompletion, } from '@heroku-cli/command/lib/completions.js';
|
|
3
3
|
import * as color from '@heroku/heroku-cli-util/color';
|
|
4
4
|
import { Args, ux } from '@oclif/core';
|
|
5
|
-
import
|
|
5
|
+
import path from 'node:path';
|
|
6
6
|
import { AutocompleteBase } from '../../lib/autocomplete/base.js';
|
|
7
7
|
import { updateCache } from '../../lib/autocomplete/cache.js';
|
|
8
8
|
import Create from './create.js';
|