heroku 11.2.0 → 11.3.0

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.
Files changed (184) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/bin/run.js +8 -3
  3. package/dist/commands/access/add.js +1 -1
  4. package/dist/commands/access/index.js +1 -1
  5. package/dist/commands/access/update.js +2 -2
  6. package/dist/commands/addons/create.js +1 -1
  7. package/dist/commands/addons/destroy.js +3 -3
  8. package/dist/commands/addons/docs.js +1 -1
  9. package/dist/commands/addons/index.js +4 -4
  10. package/dist/commands/addons/info.js +1 -1
  11. package/dist/commands/addons/plans.d.ts +5 -5
  12. package/dist/commands/addons/plans.js +12 -10
  13. package/dist/commands/addons/wait.js +1 -1
  14. package/dist/commands/apps/create.js +1 -1
  15. package/dist/commands/apps/destroy.js +1 -1
  16. package/dist/commands/apps/diff.js +14 -14
  17. package/dist/commands/apps/errors.js +8 -8
  18. package/dist/commands/apps/info.js +3 -3
  19. package/dist/commands/apps/transfer.js +2 -2
  20. package/dist/commands/certs/add.d.ts +1 -1
  21. package/dist/commands/certs/add.js +2 -2
  22. package/dist/commands/certs/auto/disable.js +1 -1
  23. package/dist/commands/certs/auto/index.js +1 -1
  24. package/dist/commands/certs/index.js +1 -1
  25. package/dist/commands/certs/info.js +1 -1
  26. package/dist/commands/certs/remove.js +1 -1
  27. package/dist/commands/certs/update.js +3 -3
  28. package/dist/commands/container/login.d.ts +1 -1
  29. package/dist/commands/container/login.js +1 -1
  30. package/dist/commands/container/logout.d.ts +1 -1
  31. package/dist/commands/container/logout.js +1 -1
  32. package/dist/commands/container/pull.d.ts +1 -1
  33. package/dist/commands/container/pull.js +1 -1
  34. package/dist/commands/container/push.d.ts +1 -1
  35. package/dist/commands/container/push.js +1 -1
  36. package/dist/commands/container/run.d.ts +1 -1
  37. package/dist/commands/container/run.js +1 -1
  38. package/dist/commands/data/maintenances/history.d.ts +1 -1
  39. package/dist/commands/data/maintenances/history.js +2 -2
  40. package/dist/commands/data/maintenances/index.d.ts +1 -1
  41. package/dist/commands/data/maintenances/index.js +2 -2
  42. package/dist/commands/data/maintenances/info.d.ts +1 -1
  43. package/dist/commands/data/maintenances/info.js +1 -1
  44. package/dist/commands/data/maintenances/run.d.ts +1 -1
  45. package/dist/commands/data/maintenances/run.js +1 -1
  46. package/dist/commands/data/maintenances/schedule.d.ts +1 -1
  47. package/dist/commands/data/maintenances/schedule.js +1 -1
  48. package/dist/commands/data/maintenances/wait.d.ts +1 -1
  49. package/dist/commands/data/maintenances/wait.js +1 -1
  50. package/dist/commands/data/maintenances/window/index.d.ts +1 -1
  51. package/dist/commands/data/maintenances/window/index.js +1 -1
  52. package/dist/commands/data/maintenances/window/update.d.ts +1 -1
  53. package/dist/commands/data/maintenances/window/update.js +1 -1
  54. package/dist/commands/data/pg/attachments/create.d.ts +1 -1
  55. package/dist/commands/data/pg/attachments/create.js +1 -1
  56. package/dist/commands/data/pg/attachments/destroy.d.ts +1 -1
  57. package/dist/commands/data/pg/attachments/destroy.js +1 -1
  58. package/dist/commands/data/pg/attachments/index.d.ts +1 -1
  59. package/dist/commands/data/pg/attachments/index.js +1 -1
  60. package/dist/commands/data/pg/create.d.ts +1 -1
  61. package/dist/commands/data/pg/create.js +5 -5
  62. package/dist/commands/data/pg/credentials/create.d.ts +1 -1
  63. package/dist/commands/data/pg/credentials/create.js +1 -1
  64. package/dist/commands/data/pg/credentials/destroy.d.ts +1 -1
  65. package/dist/commands/data/pg/credentials/destroy.js +1 -1
  66. package/dist/commands/data/pg/credentials/index.d.ts +1 -1
  67. package/dist/commands/data/pg/credentials/index.js +3 -3
  68. package/dist/commands/data/pg/credentials/rotate.d.ts +1 -1
  69. package/dist/commands/data/pg/credentials/rotate.js +1 -1
  70. package/dist/commands/data/pg/credentials/url.d.ts +1 -1
  71. package/dist/commands/data/pg/credentials/url.js +1 -1
  72. package/dist/commands/data/pg/destroy.d.ts +1 -1
  73. package/dist/commands/data/pg/destroy.js +2 -2
  74. package/dist/commands/data/pg/docs.d.ts +1 -1
  75. package/dist/commands/data/pg/docs.js +1 -1
  76. package/dist/commands/data/pg/fork.d.ts +1 -1
  77. package/dist/commands/data/pg/fork.js +3 -3
  78. package/dist/commands/data/pg/info.d.ts +1 -1
  79. package/dist/commands/data/pg/info.js +2 -2
  80. package/dist/commands/data/pg/levels.d.ts +1 -1
  81. package/dist/commands/data/pg/levels.js +1 -1
  82. package/dist/commands/data/pg/quotas/index.d.ts +1 -1
  83. package/dist/commands/data/pg/quotas/index.js +2 -2
  84. package/dist/commands/data/pg/quotas/update.d.ts +1 -1
  85. package/dist/commands/data/pg/quotas/update.js +2 -2
  86. package/dist/commands/data/pg/settings.d.ts +1 -1
  87. package/dist/commands/data/pg/settings.js +1 -1
  88. package/dist/commands/data/pg/update.d.ts +1 -1
  89. package/dist/commands/data/pg/update.js +3 -3
  90. package/dist/commands/data/pg/upgrade/run.d.ts +15 -0
  91. package/dist/commands/data/pg/upgrade/run.js +58 -0
  92. package/dist/commands/data/pg/upgrade/wait.d.ts +6 -0
  93. package/dist/commands/data/pg/upgrade/wait.js +18 -0
  94. package/dist/commands/data/pg/wait.d.ts +2 -1
  95. package/dist/commands/data/pg/wait.js +8 -6
  96. package/dist/commands/domains/index.js +2 -2
  97. package/dist/commands/pg/backups/delete.js +1 -1
  98. package/dist/commands/pg/backups/restore.js +1 -1
  99. package/dist/commands/pg/copy.js +1 -1
  100. package/dist/commands/pg/credentials/destroy.js +1 -1
  101. package/dist/commands/pg/credentials/repair-default.js +1 -1
  102. package/dist/commands/pg/credentials/rotate.js +1 -1
  103. package/dist/commands/pg/credentials.js +1 -1
  104. package/dist/commands/pg/links/destroy.js +1 -1
  105. package/dist/commands/pg/pull.js +1 -1
  106. package/dist/commands/pg/push.js +1 -1
  107. package/dist/commands/pg/reset.js +1 -1
  108. package/dist/commands/pg/unfollow.js +1 -1
  109. package/dist/commands/pg/upgrade/cancel.js +1 -1
  110. package/dist/commands/pg/upgrade/dryrun.js +1 -1
  111. package/dist/commands/pg/upgrade/prepare.js +1 -1
  112. package/dist/commands/pg/upgrade/run.js +1 -1
  113. package/dist/commands/ps/index.js +1 -1
  114. package/dist/commands/redis/cli.js +1 -1
  115. package/dist/commands/redis/stats-reset.js +1 -1
  116. package/dist/commands/redis/upgrade.js +1 -1
  117. package/dist/commands/releases/index.js +1 -1
  118. package/dist/commands/releases/info.js +1 -1
  119. package/dist/commands/spaces/destroy.js +1 -1
  120. package/dist/commands/spaces/peerings/destroy.js +1 -1
  121. package/dist/commands/spaces/vpn/destroy.js +1 -1
  122. package/dist/hooks/command_not_found/setup-otel-telemetry.js +4 -1
  123. package/dist/hooks/finally/send-otel-and-sentry-errors.js +4 -1
  124. package/dist/hooks/init/setup-otel-telemetry.js +4 -1
  125. package/dist/hooks/postrun/send-otel-telemetry.js +6 -1
  126. package/dist/hooks/prerun/collect-and-send-herokulytics.js +4 -1
  127. package/dist/lib/addons/{create_addon.js → create-addon.js} +1 -1
  128. package/dist/lib/addons/{destroy_addon.js → destroy-addon.js} +1 -1
  129. package/dist/lib/addons/util.js +1 -1
  130. package/dist/lib/analytics-telemetry/telemetry-manager.js +0 -1
  131. package/dist/lib/analytics-telemetry/telemetry-utils.d.ts +6 -0
  132. package/dist/lib/analytics-telemetry/telemetry-utils.js +22 -3
  133. package/dist/lib/analytics-telemetry/worker-client.d.ts +5 -3
  134. package/dist/lib/analytics-telemetry/worker-client.js +20 -6
  135. package/dist/lib/certs/{certificate_details.d.ts → certificate-details.d.ts} +1 -1
  136. package/dist/lib/certs/{certificate_details.js → certificate-details.js} +1 -1
  137. package/dist/lib/certs/{display_table.d.ts → display-table.d.ts} +1 -1
  138. package/dist/lib/certs/{display_table.js → display-table.js} +1 -1
  139. package/dist/lib/certs/flags.d.ts +1 -1
  140. package/dist/lib/data/types.d.ts +156 -153
  141. package/dist/lib/data/types.js +3 -3
  142. package/dist/lib/utils/{tableUtils.js → table-utils.js} +1 -1
  143. package/npm-shrinkwrap.json +27 -323
  144. package/oclif.manifest.json +2099 -1964
  145. package/package.json +2 -3
  146. /package/dist/lib/addons/{addons_wait.d.ts → addons-wait.d.ts} +0 -0
  147. /package/dist/lib/addons/{addons_wait.js → addons-wait.js} +0 -0
  148. /package/dist/lib/addons/{create_addon.d.ts → create-addon.d.ts} +0 -0
  149. /package/dist/lib/addons/{destroy_addon.d.ts → destroy-addon.d.ts} +0 -0
  150. /package/dist/lib/apps/{error_info.d.ts → error-info.d.ts} +0 -0
  151. /package/dist/lib/apps/{error_info.js → error-info.js} +0 -0
  152. /package/dist/lib/certs/{format_date.d.ts → format-date.d.ts} +0 -0
  153. /package/dist/lib/certs/{format_date.js → format-date.js} +0 -0
  154. /package/dist/lib/certs/{get_cert_and_key.d.ts → get-cert-and-key.d.ts} +0 -0
  155. /package/dist/lib/certs/{get_cert_and_key.js → get-cert-and-key.js} +0 -0
  156. /package/dist/lib/{confirmCommand.d.ts → confirm-command.d.ts} +0 -0
  157. /package/dist/lib/{confirmCommand.js → confirm-command.js} +0 -0
  158. /package/dist/lib/container/{docker_helper.d.ts → docker-helper.d.ts} +0 -0
  159. /package/dist/lib/container/{docker_helper.js → docker-helper.js} +0 -0
  160. /package/dist/lib/data/{baseCommand.d.ts → base-command.d.ts} +0 -0
  161. /package/dist/lib/data/{baseCommand.js → base-command.js} +0 -0
  162. /package/dist/lib/data/{createPool.d.ts → create-pool.d.ts} +0 -0
  163. /package/dist/lib/data/{createPool.js → create-pool.js} +0 -0
  164. /package/dist/lib/data/{credentialUtils.d.ts → credential-utils.d.ts} +0 -0
  165. /package/dist/lib/data/{credentialUtils.js → credential-utils.js} +0 -0
  166. /package/dist/lib/data/{displayQuota.d.ts → display-quota.d.ts} +0 -0
  167. /package/dist/lib/data/{displayQuota.js → display-quota.js} +0 -0
  168. /package/dist/lib/data/{parseProvisionOpts.d.ts → parse-provision-opts.d.ts} +0 -0
  169. /package/dist/lib/data/{parseProvisionOpts.js → parse-provision-opts.js} +0 -0
  170. /package/dist/lib/data/{poolConfig.d.ts → pool-config.d.ts} +0 -0
  171. /package/dist/lib/data/{poolConfig.js → pool-config.js} +0 -0
  172. /package/dist/lib/pg/{push_pull.d.ts → push-pull.d.ts} +0 -0
  173. /package/dist/lib/pg/{push_pull.js → push-pull.js} +0 -0
  174. /package/dist/lib/releases/{status_helper.d.ts → status-helper.d.ts} +0 -0
  175. /package/dist/lib/releases/{status_helper.js → status-helper.js} +0 -0
  176. /package/dist/lib/{teamUtils.d.ts → team-utils.d.ts} +0 -0
  177. /package/dist/lib/{teamUtils.js → team-utils.js} +0 -0
  178. /package/dist/lib/types/{app_errors.d.ts → app-errors.d.ts} +0 -0
  179. /package/dist/lib/types/{app_errors.js → app-errors.js} +0 -0
  180. /package/dist/lib/types/{app_process_tier.d.ts → app-process-tier.d.ts} +0 -0
  181. /package/dist/lib/types/{app_process_tier.js → app-process-tier.js} +0 -0
  182. /package/dist/lib/utils/{keyValueParser.d.ts → key-value-parser.d.ts} +0 -0
  183. /package/dist/lib/utils/{keyValueParser.js → key-value-parser.js} +0 -0
  184. /package/dist/lib/utils/{tableUtils.d.ts → table-utils.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,29 @@ 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.0](https://github.com/heroku/cli/compare/v11.2.0...v11.3.0) (2026-04-15)
8
+
9
+
10
+ ### Features
11
+
12
+ * adds 'data:pg:upgrade:run/wait' commands (W-21304392) ([#3551](https://github.com/heroku/cli/issues/3551)) ([3297c5e](https://github.com/heroku/cli/commit/3297c5e218fe9105cd106000cba030e784d17a82))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * restore beforeExit handler for version commands and add comprehensive telemetry debug logging ([#3657](https://github.com/heroku/cli/issues/3657)) ([6da79cd](https://github.com/heroku/cli/commit/6da79cd4686133e1ee1f92b59127d8e012739b99))
18
+
19
+
20
+ ### Miscellaneous Chores
21
+
22
+ * remove @oclif/plugin-legacy dependency ([#3659](https://github.com/heroku/cli/issues/3659)) ([2523d48](https://github.com/heroku/cli/commit/2523d481a79f0d26ab8b6897c6b49d3e5713a218))
23
+
24
+
25
+ ### Code Refactoring
26
+
27
+ * apply lint formatting to access, accounts, addons, and apps commands ([#3664](https://github.com/heroku/cli/issues/3664)) ([5568483](https://github.com/heroku/cli/commit/5568483130be2eb90bae4096b89c164dcd1d8742))
28
+ * rename lib and script files to kebab-case ([#3663](https://github.com/heroku/cli/issues/3663)) ([c6a101f](https://github.com/heroku/cli/commit/c6a101f4295425ccd362d315f8d2733d88bc6278))
29
+
7
30
  ## [11.2.0](https://github.com/heroku/cli/compare/v11.1.1...v11.2.0) (2026-04-08)
8
31
 
9
32
 
package/bin/run.js CHANGED
@@ -12,9 +12,11 @@ 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 {isTelemetryEnabled} = await import('../dist/lib/analytics-telemetry/telemetry-utils.js')
15
+ const {isTelemetryEnabled, getTelemetryDisabledReason, telemetryDebug} = await import('../dist/lib/analytics-telemetry/telemetry-utils.js')
16
+ const enableTelemetry = isTelemetryEnabled()
16
17
 
17
- if (isTelemetryEnabled()) {
18
+ if (enableTelemetry) {
19
+ telemetryDebug('Telemetry enabled: setting up handlers (beforeExit, SIGINT, SIGTERM)')
18
20
  // Dynamically import telemetry modules
19
21
  const {setupTelemetryHandlers} = await import('../dist/lib/analytics-telemetry/worker-client.js')
20
22
  const {computeDuration} = await import('../dist/lib/analytics-telemetry/telemetry-utils.js')
@@ -23,8 +25,11 @@ if (isTelemetryEnabled()) {
23
25
  setupTelemetryHandlers({
24
26
  cliStartTime,
25
27
  computeDuration,
26
- enableTelemetry: isTelemetryEnabled(),
28
+ enableTelemetry,
27
29
  })
30
+ } else {
31
+ const reason = getTelemetryDisabledReason()
32
+ telemetryDebug('Telemetry disabled (%s): skipping telemetry handler setup', reason)
28
33
  }
29
34
 
30
35
  await execute({dir: import.meta.url})
@@ -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 { getOwner, isTeamApp } from '../../lib/teamUtils.js';
4
+ import { getOwner, isTeamApp } from '../../lib/team-utils.js';
5
5
  export default class AccessAdd extends Command {
6
6
  static args = {
7
7
  email: Args.string({ description: 'email address of the team member', required: true }),
@@ -3,7 +3,7 @@ import { HerokuAPIError } from '@heroku-cli/command/lib/api-client.js';
3
3
  import { color, hux } from '@heroku/heroku-cli-util';
4
4
  import { ux } from '@oclif/core/ux';
5
5
  import { lazyModuleLoader } from '../../lib/lazy-module-loader.js';
6
- import { getOwner, isTeamApp } from '../../lib/teamUtils.js';
6
+ import { getOwner, isTeamApp } from '../../lib/team-utils.js';
7
7
  export default class AccessIndex extends Command {
8
8
  static description = 'list who has access to an app';
9
9
  static flags = {
@@ -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 { isTeamApp } from '../../lib/teamUtils.js';
4
+ import { isTeamApp } from '../../lib/team-utils.js';
5
5
  export default class Update extends Command {
6
6
  static args = {
7
7
  email: Args.string({ description: 'email address of the team member', required: true }),
@@ -25,7 +25,7 @@ export default class Update extends Command {
25
25
  if (!isTeamApp(appInfo?.owner?.email))
26
26
  this.error(`Error: cannot update permissions. The app ${color.app(appName)} is not owned by a team`);
27
27
  permissions.push('view');
28
- permissions = Array.from(new Set(permissions.sort()));
28
+ permissions = [...new Set(permissions.sort())];
29
29
  ux.action.start(`Updating ${color.user(args.email)} in application ${color.app(appName)} with ${permissions} permissions`);
30
30
  await this.heroku.patch(`/teams/apps/${appName}/collaborators/${args.email}`, {
31
31
  body: { permissions },
@@ -2,7 +2,7 @@ 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
4
  import tsheredoc from 'tsheredoc';
5
- import createAddon from '../../lib/addons/create_addon.js';
5
+ import createAddon from '../../lib/addons/create-addon.js';
6
6
  import notify from '../../lib/notify.js';
7
7
  const heredoc = tsheredoc.default;
8
8
  export default class Create extends Command {
@@ -1,9 +1,9 @@
1
- import { color, utils } from '@heroku/heroku-cli-util';
2
1
  import { Command, flags } from '@heroku-cli/command';
2
+ import { color, utils } from '@heroku/heroku-cli-util';
3
3
  import { Args } from '@oclif/core';
4
4
  import _ from 'lodash';
5
- import destroyAddon from '../../lib/addons/destroy_addon.js';
6
- import ConfirmCommand from '../../lib/confirmCommand.js';
5
+ import destroyAddon from '../../lib/addons/destroy-addon.js';
6
+ import ConfirmCommand from '../../lib/confirm-command.js';
7
7
  import notify from '../../lib/notify.js';
8
8
  export default class Destroy extends Command {
9
9
  static args = {
@@ -1,5 +1,5 @@
1
- import * as color from '@heroku/heroku-cli-util/color';
2
1
  import { Command, flags } from '@heroku-cli/command';
2
+ import * as color from '@heroku/heroku-cli-util/color';
3
3
  import { Args, ux } from '@oclif/core';
4
4
  import open from 'open';
5
5
  import { resolveAddon } from '../../lib/addons/resolve.js';
@@ -3,7 +3,7 @@ import { color, hux } from '@heroku/heroku-cli-util';
3
3
  import { ux } from '@oclif/core/ux';
4
4
  import _ from 'lodash';
5
5
  import { formatPrice, formatState, grandfatheredPrice } from '../../lib/addons/util.js';
6
- import { huxTableNoWrapOptions } from '../../lib/utils/tableUtils.js';
6
+ import { huxTableNoWrapOptions } from '../../lib/utils/table-utils.js';
7
7
  const topic = 'addons';
8
8
  export default class Addons extends Command {
9
9
  static description = `Lists your add-ons and attachments.
@@ -61,6 +61,7 @@ async function addonGetter(api, app) {
61
61
  },
62
62
  });
63
63
  const sudoHeaders = JSON.parse(process.env.HEROKU_HEADERS || '{}');
64
+ // eslint-disable-next-line unicorn/prefer-ternary
64
65
  if (sudoHeaders['X-Heroku-Sudo'] && !sudoHeaders['X-Heroku-Sudo-User']) {
65
66
  // because the root /addon-attachments endpoint won't include relevant
66
67
  // attachments when sudo-ing for another app, we will use the more
@@ -102,15 +103,14 @@ async function addonGetter(api, app) {
102
103
  // This is probably normal (because we are asking API for all attachments)
103
104
  // but it could also be due to certain types of permissions issues, so check
104
105
  // if the attachment looks relevant to the app, and then render whatever
105
- _.values(groupedAttachments)
106
- .forEach(atts => {
106
+ for (const atts of _.values(groupedAttachments)) {
107
107
  const inaccessibleAddon = {
108
108
  addon_service: {}, app: atts[0].addon.app, attachments: atts, name: atts[0].addon.name, plan: {},
109
109
  };
110
110
  if (isRelevantToApp(inaccessibleAddon)) {
111
111
  addons.push(inaccessibleAddon);
112
112
  }
113
- });
113
+ }
114
114
  return addons;
115
115
  }
116
116
  function displayAll(addons, noWrap = false) {
@@ -1,5 +1,5 @@
1
- import { color, hux } from '@heroku/heroku-cli-util';
2
1
  import { Command, flags } from '@heroku-cli/command';
2
+ import { color, hux } from '@heroku/heroku-cli-util';
3
3
  import { Args } from '@oclif/core';
4
4
  import { resolveAddon } from '../../lib/addons/resolve.js';
5
5
  import { formatPrice, formatState, grandfatheredPrice } from '../../lib/addons/util.js';
@@ -1,13 +1,13 @@
1
1
  import { Command } from '@heroku-cli/command';
2
2
  export default class Plans extends Command {
3
- static topic: string;
3
+ static args: {
4
+ service: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
+ };
4
6
  static description: string;
5
7
  static flags: {
6
8
  json: import("@oclif/core/interfaces").BooleanFlag<boolean>;
7
9
  };
8
- static args: {
9
- service: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
10
- };
11
- private printMeteredPricingURL;
10
+ static topic: string;
12
11
  run(): Promise<void>;
12
+ private printMeteredPricingURL;
13
13
  }
@@ -1,23 +1,20 @@
1
1
  import { Command, flags } from '@heroku-cli/command';
2
- import { Args } from '@oclif/core';
3
2
  import { hux } from '@heroku/heroku-cli-util';
4
- import { formatPrice } from '../../lib/addons/util.js';
3
+ import { Args } from '@oclif/core';
5
4
  import _ from 'lodash';
6
5
  import printf from 'printf';
6
+ import { formatPrice } from '../../lib/addons/util.js';
7
7
  export default class Plans extends Command {
8
- static topic = 'addons';
8
+ static args = {
9
+ service: Args.string({ description: 'unique identifier or globally unique name of the add-on', required: true }),
10
+ };
9
11
  static description = 'list all available plans for an add-on service';
10
12
  static flags = {
11
13
  json: flags.boolean({ description: 'output in json format' }),
12
14
  };
13
- static args = {
14
- service: Args.string({ required: true, description: 'unique identifier or globally unique name of the add-on' }),
15
- };
16
- printMeteredPricingURL(service) {
17
- return printf(`https://elements.heroku.com/addons/${service}#pricing`);
18
- }
15
+ static topic = 'addons';
19
16
  async run() {
20
- const { flags, args } = await this.parse(Plans);
17
+ const { args, flags } = await this.parse(Plans);
21
18
  const { service } = args;
22
19
  let { body: plans } = await this.heroku.get(`/addon-services/${service}/plans`, {
23
20
  headers: {
@@ -29,6 +26,7 @@ export default class Plans extends Command {
29
26
  hux.styledJSON(plans);
30
27
  }
31
28
  else {
29
+ /* eslint-disable perfectionist/sort-objects */
32
30
  hux.table(plans, {
33
31
  default: {
34
32
  header: ' ',
@@ -49,6 +47,10 @@ export default class Plans extends Command {
49
47
  get: (plan) => plan.price.metered ? this.printMeteredPricingURL(service) : formatPrice({ price: plan.price, hourly: false }),
50
48
  },
51
49
  });
50
+ /* eslint-enable perfectionist/sort-objects */
52
51
  }
53
52
  }
53
+ printMeteredPricingURL(service) {
54
+ return printf(`https://elements.heroku.com/addons/${service}#pricing`);
55
+ }
54
56
  }
@@ -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 { waitForAddonDeprovisioning, waitForAddonProvisioning } from '../../lib/addons/addons_wait.js';
4
+ import { waitForAddonDeprovisioning, waitForAddonProvisioning } from '../../lib/addons/addons-wait.js';
5
5
  import { resolveAddon } from '../../lib/addons/resolve.js';
6
6
  import notify from '../../lib/notify.js';
7
7
  export default class Wait extends Command {
@@ -1,6 +1,6 @@
1
- import { color, hux } from '@heroku/heroku-cli-util';
2
1
  import { Command, flags } from '@heroku-cli/command';
3
2
  import { BuildpackCompletion, RegionCompletion, SpaceCompletion, StackCompletion, } from '@heroku-cli/command/lib/completions.js';
3
+ import { color, hux } from '@heroku/heroku-cli-util';
4
4
  import { Args, ux } from '@oclif/core';
5
5
  import fs from 'fs-extra';
6
6
  import Git from '../../lib/git/git.js';
@@ -2,7 +2,7 @@ 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
4
  import * as git from '../../lib/ci/git.js';
5
- import ConfirmCommand from '../../lib/confirmCommand.js';
5
+ import ConfirmCommand from '../../lib/confirm-command.js';
6
6
  export default class Destroy extends Command {
7
7
  static args = {
8
8
  app: Args.string({ hidden: true }),
@@ -1,6 +1,6 @@
1
1
  import { Command } from '@heroku-cli/command';
2
- import { Args, ux } from '@oclif/core';
3
2
  import { hux } from '@heroku/heroku-cli-util';
3
+ import { Args, ux } from '@oclif/core';
4
4
  function trunc(val) {
5
5
  const v = (val ?? '').toString();
6
6
  return v.length > 56 ? v.slice(0, 56) + '...' : v;
@@ -8,8 +8,8 @@ function trunc(val) {
8
8
  async function checksum(heroku, app) {
9
9
  try {
10
10
  const { body: releases } = await heroku.request(`/apps/${app}/releases`, {
11
- partial: true,
12
11
  headers: { Range: 'version ..; max=1, order=desc' },
12
+ partial: true,
13
13
  });
14
14
  if (releases?.[0]?.slug) {
15
15
  const slugId = releases[0].slug.id;
@@ -29,7 +29,7 @@ async function checksum(heroku, app) {
29
29
  }
30
30
  async function diffFiles(heroku, app1, app2) {
31
31
  const sums = await Promise.all([checksum(heroku, app1), checksum(heroku, app2)]);
32
- return sums[0] === sums[1] ? [] : [{ prop: 'slug (checksum)', app1: sums[0] ?? undefined, app2: sums[1] ?? undefined }];
32
+ return sums[0] === sums[1] ? [] : [{ app1: sums[0] ?? undefined, app2: sums[1] ?? undefined, prop: 'slug (checksum)' }];
33
33
  }
34
34
  async function diffEnv(heroku, app1, app2) {
35
35
  const [res1, res2] = await Promise.all([
@@ -41,7 +41,7 @@ async function diffEnv(heroku, app1, app2) {
41
41
  const keys = new Set([...Object.keys(vars1), ...Object.keys(vars2)]);
42
42
  return [...keys]
43
43
  .filter(k => vars1[k] !== vars2[k])
44
- .map(k => ({ prop: `config (${k})`, app1: vars1[k], app2: vars2[k] }));
44
+ .map(k => ({ app1: vars1[k], app2: vars2[k], prop: `config (${k})` }));
45
45
  }
46
46
  async function diffStack(heroku, app1, app2) {
47
47
  const [res1, res2] = await Promise.all([
@@ -50,7 +50,7 @@ async function diffStack(heroku, app1, app2) {
50
50
  ]);
51
51
  const a = res1.body?.stack?.name;
52
52
  const b = res2.body?.stack?.name;
53
- return a === b ? [] : [{ prop: 'stack', app1: a, app2: b }];
53
+ return a === b ? [] : [{ app1: a, app2: b, prop: 'stack' }];
54
54
  }
55
55
  async function diffBuildpacks(heroku, app1, app2) {
56
56
  const [res1, res2] = await Promise.all([
@@ -63,9 +63,9 @@ async function diffBuildpacks(heroku, app1, app2) {
63
63
  const urls2 = bps2.map(obj => obj.buildpack?.url ?? '');
64
64
  const longest = urls1.length >= urls2.length ? urls1 : urls2;
65
65
  const pairs = longest.map((_, k) => ({
66
- prop: `buildpack (${k})`,
67
66
  app1: urls1[k],
68
67
  app2: urls2[k],
68
+ prop: `buildpack (${k})`,
69
69
  }));
70
70
  return pairs.filter(pair => pair.app1 !== pair.app2);
71
71
  }
@@ -78,8 +78,8 @@ async function diffAddons(heroku, app1, app2) {
78
78
  const addons2 = res2.body ?? [];
79
79
  const names1 = new Set(addons1.map(addon => addon.addon_service?.name ?? '').filter(Boolean));
80
80
  const names2 = new Set(addons2.map(addon => addon.addon_service?.name ?? '').filter(Boolean));
81
- const only1 = [...names1].filter(name => !names2.has(name)).map(name => ({ prop: `add-on (${name})`, app1: 'true', app2: 'false' }));
82
- const only2 = [...names2].filter(name => !names1.has(name)).map(name => ({ prop: `add-on (${name})`, app1: 'false', app2: 'true' }));
81
+ const only1 = [...names1].filter(name => !names2.has(name)).map(name => ({ app1: 'true', app2: 'false', prop: `add-on (${name})` }));
82
+ const only2 = [...names2].filter(name => !names1.has(name)).map(name => ({ app1: 'false', app2: 'true', prop: `add-on (${name})` }));
83
83
  return [...only1, ...only2];
84
84
  }
85
85
  async function diffFeatures(heroku, app1, app2) {
@@ -91,8 +91,8 @@ async function diffFeatures(heroku, app1, app2) {
91
91
  const features2 = res2.body ?? [];
92
92
  const names1 = new Set(features1.map(f => (f.enabled ? f.name : null)).filter(Boolean));
93
93
  const names2 = new Set(features2.map(f => (f.enabled ? f.name : null)).filter(Boolean));
94
- const only1 = [...names1].filter(name => !names2.has(name)).map(name => ({ prop: `feature (${name})`, app1: 'enabled', app2: 'disabled' }));
95
- const only2 = [...names2].filter(name => !names1.has(name)).map(name => ({ prop: `feature (${name})`, app1: 'disabled', app2: 'enabled' }));
94
+ const only1 = [...names1].filter(name => !names2.has(name)).map(name => ({ app1: 'enabled', app2: 'disabled', prop: `feature (${name})` }));
95
+ const only2 = [...names2].filter(name => !names1.has(name)).map(name => ({ app1: 'disabled', app2: 'enabled', prop: `feature (${name})` }));
96
96
  return [...only1, ...only2];
97
97
  }
98
98
  export default class AppsDiff extends Command {
@@ -116,15 +116,15 @@ export default class AppsDiff extends Command {
116
116
  ]);
117
117
  const list = [...files, ...env, ...stack, ...bp, ...addons, ...features];
118
118
  const truncated = list.map(entry => ({
119
- prop: entry.prop,
120
119
  app1: trunc(entry.app1),
121
120
  app2: trunc(entry.app2),
121
+ prop: entry.prop,
122
122
  }));
123
123
  ux.stdout('\n');
124
124
  hux.table(truncated, {
125
- property: { header: 'property', get: (row) => row.prop },
126
- firstApp: { header: app1, get: (row) => row.app1 },
127
- secondApp: { header: app2, get: (row) => row.app2 },
125
+ firstApp: { get: (row) => row.app1, header: app1 },
126
+ property: { get: (row) => row.prop, header: 'property' },
127
+ secondApp: { get: (row) => row.app2, header: app2 },
128
128
  });
129
129
  ux.stdout('\n');
130
130
  }
@@ -1,18 +1,18 @@
1
1
  import { Command, flags } from '@heroku-cli/command';
2
2
  import { color, hux } from '@heroku/heroku-cli-util';
3
3
  import { ux } from '@oclif/core/ux';
4
- import errorInfo from '../../lib/apps/error_info.js';
4
+ import errorInfo from '../../lib/apps/error-info.js';
5
5
  const colorize = (level, s) => {
6
6
  switch (level) {
7
7
  case 'critical': {
8
8
  return color.failure(s);
9
9
  }
10
- case 'warning': {
11
- return color.warning(s);
12
- }
13
10
  case 'info': {
14
11
  return color.info(s);
15
12
  }
13
+ case 'warning': {
14
+ return color.warning(s);
15
+ }
16
16
  default: {
17
17
  return s;
18
18
  }
@@ -42,9 +42,9 @@ function buildErrorTable(errors, source) {
42
42
  }
43
43
  const sumErrors = (errors) => {
44
44
  const summed = {};
45
- Object.keys(errors.data).forEach(key => {
45
+ for (const key of Object.keys(errors.data)) {
46
46
  summed[key] = errors.data[key].reduce((a, b) => a + b, 0);
47
- });
47
+ }
48
48
  return summed;
49
49
  };
50
50
  export default class Errors extends Command {
@@ -66,9 +66,9 @@ export default class Errors extends Command {
66
66
  async function getAllDynoErrors(types) {
67
67
  const values = await Promise.all(types.map(dynoErrors));
68
68
  const memo = {};
69
- types.forEach((key, index) => {
69
+ for (const [index, key] of types.entries()) {
70
70
  memo[key] = values[index];
71
- });
71
+ }
72
72
  return memo;
73
73
  }
74
74
  const routerErrors = () => this.heroku.get(`/apps/${flags.app}/router-metrics/errors?${DATE_QUERY}&process_type=web`, {
@@ -2,7 +2,7 @@ import { Command, flags } from '@heroku-cli/command';
2
2
  import { color, hux } from '@heroku/heroku-cli-util';
3
3
  import { Args, ux } from '@oclif/core';
4
4
  import { filesize } from 'filesize';
5
- import * as util from 'util';
5
+ import { inspect } from 'node:util';
6
6
  import { getGeneration } from '../../lib/apps/generation.js';
7
7
  import { lazyModuleLoader } from '../../lib/lazy-module-loader.js';
8
8
  export default class AppsInfo extends Command {
@@ -70,7 +70,7 @@ repo_size=5000000
70
70
  print('slug_size', filesize(info.app.slug_size, { round: 0, standard: 'jedec' }));
71
71
  print('owner', info.app.owner.email);
72
72
  print('region', info.app.region.name);
73
- print('dynos', util.inspect(_.countBy(info.dynos, 'type')));
73
+ print('dynos', inspect(_.countBy(info.dynos, 'type')));
74
74
  print('stack', info.app.stack.name);
75
75
  }
76
76
  if (flags.shell) {
@@ -157,7 +157,7 @@ function print(info, addons, collaborators, extended, _) {
157
157
  if (extended) {
158
158
  ux.stdout('\n\n--- Extended Information ---\n\n');
159
159
  if (info.app.extended) {
160
- ux.stdout(util.inspect(info.app.extended));
160
+ ux.stdout(inspect(info.app.extended));
161
161
  }
162
162
  }
163
163
  }
@@ -3,9 +3,9 @@ import * as color from '@heroku/heroku-cli-util/color';
3
3
  import { Args, ux } from '@oclif/core';
4
4
  import tsheredoc from 'tsheredoc';
5
5
  import { appTransfer } from '../../lib/apps/app-transfer.js';
6
+ import ConfirmCommand from '../../lib/confirm-command.js';
6
7
  import { lazyModuleLoader } from '../../lib/lazy-module-loader.js';
7
- import ConfirmCommand from '../../lib/confirmCommand.js';
8
- import { getOwner, isTeamApp, isValidEmail } from '../../lib/teamUtils.js';
8
+ import { getOwner, isTeamApp, isValidEmail } from '../../lib/team-utils.js';
9
9
  import AppsLock from './lock.js';
10
10
  const heredoc = tsheredoc.default;
11
11
  export default class AppsTransfer extends Command {
@@ -1,5 +1,5 @@
1
1
  import { APIClient, Command } from '@heroku-cli/command';
2
- import { SniEndpoint } from '../../lib/types/sni_endpoint.js';
2
+ import { SniEndpoint } from '../../lib/types/sni-endpoint.js';
3
3
  export default class Add extends Command {
4
4
  static args: {
5
5
  CRT: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -2,9 +2,9 @@ import { hux, color } from '@heroku/heroku-cli-util';
2
2
  import { Command, flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
4
  import tsheredoc from 'tsheredoc';
5
- import { displayCertificateDetails } from '../../lib/certs/certificate_details.js';
5
+ import { displayCertificateDetails } from '../../lib/certs/certificate-details.js';
6
6
  import { waitForDomains } from '../../lib/certs/domains.js';
7
- import { CertAndKeyManager } from '../../lib/certs/get_cert_and_key.js';
7
+ import { CertAndKeyManager } from '../../lib/certs/get-cert-and-key.js';
8
8
  import { lazyModuleLoader } from '../../lib/lazy-module-loader.js';
9
9
  const heredoc = tsheredoc.default;
10
10
  export default class Add extends Command {
@@ -2,7 +2,7 @@ import { Command, flags } from '@heroku-cli/command';
2
2
  import * as color from '@heroku/heroku-cli-util/color';
3
3
  import { ux } from '@oclif/core/ux';
4
4
  import tsheredoc from 'tsheredoc';
5
- import ConfirmCommand from '../../../lib/confirmCommand.js';
5
+ import ConfirmCommand from '../../../lib/confirm-command.js';
6
6
  const heredoc = tsheredoc.default;
7
7
  export default class Disable extends Command {
8
8
  static description = 'disable ACM for an app';
@@ -2,7 +2,7 @@ import { color, hux } from '@heroku/heroku-cli-util';
2
2
  import { Command, flags } from '@heroku-cli/command';
3
3
  import { ux } from '@oclif/core/ux';
4
4
  import tsheredoc from 'tsheredoc';
5
- import { displayCertificateDetails } from '../../../lib/certs/certificate_details.js';
5
+ import { displayCertificateDetails } from '../../../lib/certs/certificate-details.js';
6
6
  import { waitForCertIssuedOnDomains } from '../../../lib/domains/domains.js';
7
7
  import { lazyModuleLoader } from '../../../lib/lazy-module-loader.js';
8
8
  const heredoc = tsheredoc.default;
@@ -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 { ux } from '@oclif/core/ux';
4
- import displayTable from '../../lib/certs/display_table.js';
4
+ import displayTable from '../../lib/certs/display-table.js';
5
5
  export default class Index extends Command {
6
6
  static description = 'list SSL certificates for an app';
7
7
  static flags = {
@@ -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 { ux } from '@oclif/core/ux';
4
- import { displayCertificateDetails } from '../../lib/certs/certificate_details.js';
4
+ import { displayCertificateDetails } from '../../lib/certs/certificate-details.js';
5
5
  import getEndpoint from '../../lib/certs/flags.js';
6
6
  export default class Info extends Command {
7
7
  static description = 'show certificate information for an SSL certificate';
@@ -3,7 +3,7 @@ import * as color from '@heroku/heroku-cli-util/color';
3
3
  import { ux } from '@oclif/core/ux';
4
4
  import tsheredoc from 'tsheredoc';
5
5
  import getEndpoint from '../../lib/certs/flags.js';
6
- import ConfirmCommand from '../../lib/confirmCommand.js';
6
+ import ConfirmCommand from '../../lib/confirm-command.js';
7
7
  const heredoc = tsheredoc.default;
8
8
  export default class Remove extends Command {
9
9
  static description = 'remove an SSL certificate from an app';
@@ -2,10 +2,10 @@ 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
4
  import tsheredoc from 'tsheredoc';
5
- import { displayCertificateDetails } from '../../lib/certs/certificate_details.js';
5
+ import { displayCertificateDetails } from '../../lib/certs/certificate-details.js';
6
6
  import getEndpoint from '../../lib/certs/flags.js';
7
- import { CertAndKeyManager } from '../../lib/certs/get_cert_and_key.js';
8
- import ConfirmCommand from '../../lib/confirmCommand.js';
7
+ import { CertAndKeyManager } from '../../lib/certs/get-cert-and-key.js';
8
+ import ConfirmCommand from '../../lib/confirm-command.js';
9
9
  const heredoc = tsheredoc.default;
10
10
  export default class Update extends Command {
11
11
  static args = {
@@ -1,5 +1,5 @@
1
1
  import { Command } from '@heroku-cli/command';
2
- import { DockerHelper } from '../../lib/container/docker_helper.js';
2
+ import { DockerHelper } from '../../lib/container/docker-helper.js';
3
3
  export default class Login extends Command {
4
4
  static topic: string;
5
5
  static description: string;
@@ -1,6 +1,6 @@
1
1
  import { Command, flags } from '@heroku-cli/command';
2
2
  import { ux } from '@oclif/core/ux';
3
- import { DockerHelper } from '../../lib/container/docker_helper.js';
3
+ import { DockerHelper } from '../../lib/container/docker-helper.js';
4
4
  import { debug } from '../../lib/container/debug.js';
5
5
  export default class Login extends Command {
6
6
  static topic = 'container';
@@ -1,5 +1,5 @@
1
1
  import { Command } from '@heroku-cli/command';
2
- import { DockerHelper } from '../../lib/container/docker_helper.js';
2
+ import { DockerHelper } from '../../lib/container/docker-helper.js';
3
3
  export default class Logout extends Command {
4
4
  static topic: string;
5
5
  static description: string;
@@ -1,6 +1,6 @@
1
1
  import { Command, flags } from '@heroku-cli/command';
2
2
  import { ux } from '@oclif/core/ux';
3
- import { DockerHelper } from '../../lib/container/docker_helper.js';
3
+ import { DockerHelper } from '../../lib/container/docker-helper.js';
4
4
  import { debug } from '../../lib/container/debug.js';
5
5
  export default class Logout extends Command {
6
6
  static topic = 'container';
@@ -1,5 +1,5 @@
1
1
  import { Command } from '@heroku-cli/command';
2
- import { DockerHelper } from '../../lib/container/docker_helper.js';
2
+ import { DockerHelper } from '../../lib/container/docker-helper.js';
3
3
  export default class Pull extends Command {
4
4
  static description: string;
5
5
  static examples: string[];
@@ -1,7 +1,7 @@
1
1
  import { color, hux } from '@heroku/heroku-cli-util';
2
2
  import { Command, flags } from '@heroku-cli/command';
3
3
  import { debug } from '../../lib/container/debug.js';
4
- import { DockerHelper } from '../../lib/container/docker_helper.js';
4
+ import { DockerHelper } from '../../lib/container/docker-helper.js';
5
5
  import { ensureContainerStack } from '../../lib/container/helpers.js';
6
6
  export default class Pull extends Command {
7
7
  static description = 'pulls an image from an app\'s process type';
@@ -1,5 +1,5 @@
1
1
  import { Command } from '@heroku-cli/command';
2
- import { DockerHelper, DockerJob, GroupedDockerJobs } from '../../lib/container/docker_helper.js';
2
+ import { DockerHelper, DockerJob, GroupedDockerJobs } from '../../lib/container/docker-helper.js';
3
3
  export default class Push extends Command {
4
4
  static description: string;
5
5
  static examples: string[];
@@ -2,7 +2,7 @@ import { Command, flags } from '@heroku-cli/command';
2
2
  import { color, hux } from '@heroku/heroku-cli-util';
3
3
  import { ux } from '@oclif/core/ux';
4
4
  import { debug } from '../../lib/container/debug.js';
5
- import { DockerHelper } from '../../lib/container/docker_helper.js';
5
+ import { DockerHelper } from '../../lib/container/docker-helper.js';
6
6
  import { ensureContainerStack } from '../../lib/container/helpers.js';
7
7
  export default class Push extends Command {
8
8
  static description = 'builds, then pushes Docker images to deploy your Heroku app';
@@ -1,5 +1,5 @@
1
1
  import { Command } from '@heroku-cli/command';
2
- import { DockerHelper } from '../../lib/container/docker_helper.js';
2
+ import { DockerHelper } from '../../lib/container/docker-helper.js';
3
3
  export default class Run extends Command {
4
4
  static description: string;
5
5
  static examples: string[];