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
@@ -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 Run extends Command {
8
8
  static description = 'builds, then runs the docker image locally';
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../lib/data/base-command.js';
2
2
  export default class DataMaintenancesHistory extends BaseCommand {
3
3
  static args: {
4
4
  addon: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -1,8 +1,8 @@
1
1
  import { color, hux, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
- import BaseCommand from '../../../lib/data/baseCommand.js';
5
- import { constructSortFilterTableOptions, constructTableColumns, outputCSV } from '../../../lib/utils/tableUtils.js';
4
+ import BaseCommand from '../../../lib/data/base-command.js';
5
+ import { constructSortFilterTableOptions, constructTableColumns, outputCSV } from '../../../lib/utils/table-utils.js';
6
6
  export default class DataMaintenancesHistory extends BaseCommand {
7
7
  static args = {
8
8
  addon: Args.string({ description: 'data addon', required: true }),
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../lib/data/base-command.js';
2
2
  export default class DataMaintenancesIndex extends BaseCommand {
3
3
  static description: string;
4
4
  static examples: string[];
@@ -1,9 +1,9 @@
1
1
  import { flags as Flags } from '@heroku-cli/command';
2
2
  import { hux } from '@heroku/heroku-cli-util';
3
3
  import { ux } from '@oclif/core/ux';
4
- import BaseCommand from '../../../lib/data/baseCommand.js';
4
+ import BaseCommand from '../../../lib/data/base-command.js';
5
5
  import { MaintenanceStatus } from '../../../lib/data/types.js';
6
- import { constructSortFilterTableOptions, constructTableColumns, outputCSV } from '../../../lib/utils/tableUtils.js';
6
+ import { constructSortFilterTableOptions, constructTableColumns, outputCSV } from '../../../lib/utils/table-utils.js';
7
7
  export default class DataMaintenancesIndex extends BaseCommand {
8
8
  static description = 'list maintenances for an app\'s data addons';
9
9
  static examples = [
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../lib/data/base-command.js';
2
2
  import { Maintenance } from '../../../lib/data/types.js';
3
3
  interface StyledMaintenance extends Maintenance {
4
4
  [key: string]: any;
@@ -1,7 +1,7 @@
1
1
  import { color, hux, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
- import BaseCommand from '../../../lib/data/baseCommand.js';
4
+ import BaseCommand from '../../../lib/data/base-command.js';
5
5
  import { lazyModuleLoader } from '../../../lib/lazy-module-loader.js';
6
6
  export default class DataMaintenancesInfo extends BaseCommand {
7
7
  static args = {
@@ -1,5 +1,5 @@
1
1
  import * as Heroku from '@heroku-cli/schema';
2
- import BaseCommand from '../../../lib/data/baseCommand.js';
2
+ import BaseCommand from '../../../lib/data/base-command.js';
3
3
  export default class DataMaintenancesRun extends BaseCommand {
4
4
  static args: {
5
5
  addon: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -1,7 +1,7 @@
1
1
  import { flags as Flags } from '@heroku-cli/command';
2
2
  import { color, utils } from '@heroku/heroku-cli-util';
3
3
  import { Args, ux } from '@oclif/core';
4
- import BaseCommand from '../../../lib/data/baseCommand.js';
4
+ import BaseCommand from '../../../lib/data/base-command.js';
5
5
  import { waitUntilMaintenanceComplete } from '../../../lib/data/utils.js';
6
6
  export default class DataMaintenancesRun extends BaseCommand {
7
7
  static args = {
@@ -1,5 +1,5 @@
1
1
  import * as Heroku from '@heroku-cli/schema';
2
- import BaseCommand from '../../../lib/data/baseCommand.js';
2
+ import BaseCommand from '../../../lib/data/base-command.js';
3
3
  export default class DataMaintenancesSchedule extends BaseCommand {
4
4
  static args: {
5
5
  addon: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -1,7 +1,7 @@
1
1
  import { color, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
- import BaseCommand from '../../../lib/data/baseCommand.js';
4
+ import BaseCommand from '../../../lib/data/base-command.js';
5
5
  import { lazyModuleLoader } from '../../../lib/lazy-module-loader.js';
6
6
  export default class DataMaintenancesSchedule extends BaseCommand {
7
7
  static args = {
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../lib/data/base-command.js';
2
2
  export default class DataMaintenancesWait extends BaseCommand {
3
3
  static args: {
4
4
  addon: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -1,7 +1,7 @@
1
1
  import { color, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
- import BaseCommand from '../../../lib/data/baseCommand.js';
4
+ import BaseCommand from '../../../lib/data/base-command.js';
5
5
  import { MaintenanceStatus } from '../../../lib/data/types.js';
6
6
  import { waitUntilMaintenanceComplete } from '../../../lib/data/utils.js';
7
7
  export default class DataMaintenancesWait extends BaseCommand {
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../../lib/data/base-command.js';
2
2
  export default class DataMaintenancesWindow extends BaseCommand {
3
3
  static args: {
4
4
  addon: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -1,7 +1,7 @@
1
1
  import { color, hux, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
- import BaseCommand from '../../../../lib/data/baseCommand.js';
4
+ import BaseCommand from '../../../../lib/data/base-command.js';
5
5
  export default class DataMaintenancesWindow extends BaseCommand {
6
6
  static args = {
7
7
  addon: Args.string({
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../../lib/data/base-command.js';
2
2
  export default class DataMaintenancesWindowUpdate extends BaseCommand {
3
3
  static args: {
4
4
  addon: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -1,7 +1,7 @@
1
1
  import { color, hux, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
- import BaseCommand from '../../../../lib/data/baseCommand.js';
4
+ import BaseCommand from '../../../../lib/data/base-command.js';
5
5
  export default class DataMaintenancesWindowUpdate extends BaseCommand {
6
6
  static args = {
7
7
  addon: Args.string({
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../../lib/data/base-command.js';
2
2
  export default class DataPgAttachmentsCreate extends BaseCommand {
3
3
  static args: {
4
4
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -3,7 +3,7 @@ import { flags as Flags, HerokuAPIError } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
4
  import tsheredoc from 'tsheredoc';
5
5
  import { trapConfirmationRequired } from '../../../../lib/addons/util.js';
6
- import BaseCommand from '../../../../lib/data/baseCommand.js';
6
+ import BaseCommand from '../../../../lib/data/base-command.js';
7
7
  const heredoc = tsheredoc.default;
8
8
  export default class DataPgAttachmentsCreate extends BaseCommand {
9
9
  static args = {
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../../lib/data/base-command.js';
2
2
  export default class DataPgAttachmentsDestroy extends BaseCommand {
3
3
  static args: {
4
4
  attachment_name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -1,7 +1,7 @@
1
1
  import { color, hux, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
- import BaseCommand from '../../../../lib/data/baseCommand.js';
4
+ import BaseCommand from '../../../../lib/data/base-command.js';
5
5
  export default class DataPgAttachmentsDestroy extends BaseCommand {
6
6
  static args = {
7
7
  attachment_name: Args.string({
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../../lib/data/base-command.js';
2
2
  export default class DataPgAttachmentsIndex extends BaseCommand {
3
3
  static args: {
4
4
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -1,7 +1,7 @@
1
1
  import { color, hux, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
- import BaseCommand from '../../../../lib/data/baseCommand.js';
4
+ import BaseCommand from '../../../../lib/data/base-command.js';
5
5
  export default class DataPgAttachmentsIndex extends BaseCommand {
6
6
  static args = {
7
7
  database: Args.string({
@@ -1,5 +1,5 @@
1
1
  import inquirer from 'inquirer';
2
- import BaseCommand from '../../../lib/data/baseCommand.js';
2
+ import BaseCommand from '../../../lib/data/base-command.js';
3
3
  export default class DataPgCreate extends BaseCommand {
4
4
  static baseFlags: Record<string, any>;
5
5
  static description: string;
@@ -3,11 +3,11 @@ import { color, utils } from '@heroku/heroku-cli-util';
3
3
  import { ux } from '@oclif/core/ux';
4
4
  import inquirer from 'inquirer';
5
5
  import tsheredoc from 'tsheredoc';
6
- import createAddon from '../../../lib/addons/create_addon.js';
7
- import BaseCommand from '../../../lib/data/baseCommand.js';
8
- import createPool from '../../../lib/data/createPool.js';
9
- import { parseProvisionOpts } from '../../../lib/data/parseProvisionOpts.js';
10
- import PoolConfig from '../../../lib/data/poolConfig.js';
6
+ import createAddon from '../../../lib/addons/create-addon.js';
7
+ import BaseCommand from '../../../lib/data/base-command.js';
8
+ import createPool from '../../../lib/data/create-pool.js';
9
+ import { parseProvisionOpts } from '../../../lib/data/parse-provision-opts.js';
10
+ import PoolConfig from '../../../lib/data/pool-config.js';
11
11
  import { fetchLevelsAndPricing, renderPricingInfo } from '../../../lib/data/utils.js';
12
12
  import notify from '../../../lib/notify.js';
13
13
  const heredoc = tsheredoc.default;
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../../lib/data/base-command.js';
2
2
  export default class DataPgCredentialsCreate extends BaseCommand {
3
3
  static args: {
4
4
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -2,7 +2,7 @@ import { flags as Flags } from '@heroku-cli/command';
2
2
  import { color, utils } from '@heroku/heroku-cli-util';
3
3
  import { Args, ux } from '@oclif/core';
4
4
  import tsheredoc from 'tsheredoc';
5
- import BaseCommand from '../../../../lib/data/baseCommand.js';
5
+ import BaseCommand from '../../../../lib/data/base-command.js';
6
6
  const heredoc = tsheredoc.default;
7
7
  export default class DataPgCredentialsCreate extends BaseCommand {
8
8
  static args = {
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../../lib/data/base-command.js';
2
2
  export default class DataPgCredentialsDestroy extends BaseCommand {
3
3
  static args: {
4
4
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -3,7 +3,7 @@ import * as color from '@heroku/heroku-cli-util/color';
3
3
  import { confirmCommand } from '@heroku/heroku-cli-util/hux';
4
4
  import { AddonResolver, getAddonService, isAdvancedDatabase, isEssentialDatabase, isLegacyEssentialDatabase, } from '@heroku/heroku-cli-util/utils';
5
5
  import { Args, ux } from '@oclif/core';
6
- import BaseCommand from '../../../../lib/data/baseCommand.js';
6
+ import BaseCommand from '../../../../lib/data/base-command.js';
7
7
  export default class DataPgCredentialsDestroy extends BaseCommand {
8
8
  static args = {
9
9
  database: Args.string({
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../../lib/data/base-command.js';
2
2
  export default class DataPgCredentialsIndex extends BaseCommand {
3
3
  static args: {
4
4
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -1,10 +1,10 @@
1
1
  import { color, hux, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
- import BaseCommand from '../../../../lib/data/baseCommand.js';
5
- import { sortByOwnerAndName } from '../../../../lib/data/credentialUtils.js';
4
+ import BaseCommand from '../../../../lib/data/base-command.js';
5
+ import { sortByOwnerAndName } from '../../../../lib/data/credential-utils.js';
6
6
  import { presentCredentialAttachments } from '../../../../lib/pg/util.js';
7
- import { huxTableNoWrapOptions } from '../../../../lib/utils/tableUtils.js';
7
+ import { huxTableNoWrapOptions } from '../../../../lib/utils/table-utils.js';
8
8
  export default class DataPgCredentialsIndex extends BaseCommand {
9
9
  static args = {
10
10
  database: Args.string({
@@ -1,5 +1,5 @@
1
1
  import { hux } from '@heroku/heroku-cli-util';
2
- import BaseCommand from '../../../../lib/data/baseCommand.js';
2
+ import BaseCommand from '../../../../lib/data/base-command.js';
3
3
  export default class Rotate extends BaseCommand {
4
4
  static args: {
5
5
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -1,7 +1,7 @@
1
1
  import { color, hux, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
- import BaseCommand from '../../../../lib/data/baseCommand.js';
4
+ import BaseCommand from '../../../../lib/data/base-command.js';
5
5
  export default class Rotate extends BaseCommand {
6
6
  static args = {
7
7
  database: Args.string({
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../../lib/data/base-command.js';
2
2
  export default class Url extends BaseCommand {
3
3
  static args: {
4
4
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -3,7 +3,7 @@ import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
4
  import tsheredoc from 'tsheredoc';
5
5
  import { URL } from 'url';
6
- import BaseCommand from '../../../../lib/data/baseCommand.js';
6
+ import BaseCommand from '../../../../lib/data/base-command.js';
7
7
  import { isAdvancedCredentialInfo } from '../../../../lib/data/types.js';
8
8
  const heredoc = tsheredoc.default;
9
9
  export default class Url extends BaseCommand {
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../lib/data/base-command.js';
2
2
  export default class DataPgDestroy extends BaseCommand {
3
3
  static args: {
4
4
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -1,8 +1,8 @@
1
1
  import { color, hux, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
- import destroyAddon from '../../../lib/addons/destroy_addon.js';
5
- import BaseCommand from '../../../lib/data/baseCommand.js';
4
+ import destroyAddon from '../../../lib/addons/destroy-addon.js';
5
+ import BaseCommand from '../../../lib/data/base-command.js';
6
6
  export default class DataPgDestroy extends BaseCommand {
7
7
  static args = {
8
8
  database: Args.string({
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../lib/data/base-command.js';
2
2
  export default class DataPgDocs extends BaseCommand {
3
3
  static defaultUrl: string;
4
4
  static description: string;
@@ -1,6 +1,6 @@
1
1
  import { hux } from '@heroku/heroku-cli-util';
2
2
  import { flags } from '@heroku-cli/command';
3
- import BaseCommand from '../../../lib/data/baseCommand.js';
3
+ import BaseCommand from '../../../lib/data/base-command.js';
4
4
  export default class DataPgDocs extends BaseCommand {
5
5
  static defaultUrl = 'https://devcenter.heroku.com/categories/heroku-postgres';
6
6
  static description = 'open documentation for Heroku Postgres in your web browser';
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../lib/data/base-command.js';
2
2
  export default class Fork extends BaseCommand {
3
3
  static args: {
4
4
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -2,10 +2,10 @@ import { color, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
4
  import tsheredoc from 'tsheredoc';
5
- import createAddon from '../../../lib/addons/create_addon.js';
6
- import BaseCommand from '../../../lib/data/baseCommand.js';
5
+ import createAddon from '../../../lib/addons/create-addon.js';
6
+ import BaseCommand from '../../../lib/data/base-command.js';
7
7
  import { lazyModuleLoader } from '../../../lib/lazy-module-loader.js';
8
- import { parseProvisionOpts } from '../../../lib/data/parseProvisionOpts.js';
8
+ import { parseProvisionOpts } from '../../../lib/data/parse-provision-opts.js';
9
9
  import notify from '../../../lib/notify.js';
10
10
  const heredoc = tsheredoc.default;
11
11
  export default class Fork extends BaseCommand {
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../lib/data/base-command.js';
2
2
  export default class DataPgInfo extends BaseCommand {
3
3
  static args: {
4
4
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -2,8 +2,8 @@ import { flags as Flags } from '@heroku-cli/command';
2
2
  import { color, hux, utils } from '@heroku/heroku-cli-util';
3
3
  import { Args, ux } from '@oclif/core';
4
4
  import tsheredoc from 'tsheredoc';
5
- import BaseCommand from '../../../lib/data/baseCommand.js';
6
- import { formatQuotaStatus } from '../../../lib/data/displayQuota.js';
5
+ import BaseCommand from '../../../lib/data/base-command.js';
6
+ import { formatQuotaStatus } from '../../../lib/data/display-quota.js';
7
7
  const heredoc = tsheredoc.default;
8
8
  const poolStatusRenderMap = {
9
9
  available: color.success('✓ Available'),
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../lib/data/base-command.js';
2
2
  export default class DataPgLevels extends BaseCommand {
3
3
  static baseFlags: Record<string, any>;
4
4
  static description: string;
@@ -1,7 +1,7 @@
1
1
  import { Command } from '@heroku-cli/command';
2
2
  import { hux } from '@heroku/heroku-cli-util';
3
3
  import { printTable } from '@oclif/table';
4
- import BaseCommand from '../../../lib/data/baseCommand.js';
4
+ import BaseCommand from '../../../lib/data/base-command.js';
5
5
  export default class DataPgLevels extends BaseCommand {
6
6
  static baseFlags = Command.baseFlagsWithoutPrompt();
7
7
  static description = 'show available levels for Heroku Postgres Advanced databases';
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../../lib/data/base-command.js';
2
2
  export default class DataPgQuotasIndex extends BaseCommand {
3
3
  static args: {
4
4
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -1,8 +1,8 @@
1
1
  import { utils } from '@heroku/heroku-cli-util';
2
2
  import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
- import BaseCommand from '../../../../lib/data/baseCommand.js';
5
- import { displayQuota } from '../../../../lib/data/displayQuota.js';
4
+ import BaseCommand from '../../../../lib/data/base-command.js';
5
+ import { displayQuota } from '../../../../lib/data/display-quota.js';
6
6
  export default class DataPgQuotasIndex extends BaseCommand {
7
7
  static args = {
8
8
  database: Args.string({
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../../lib/data/base-command.js';
2
2
  export default class DataPgQuotasUpdate extends BaseCommand {
3
3
  static args: {
4
4
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -2,8 +2,8 @@ import { color, utils } from '@heroku/heroku-cli-util';
2
2
  import { flags as Flags } from '@heroku-cli/command';
3
3
  import { Args, ux } from '@oclif/core';
4
4
  import tsheredoc from 'tsheredoc';
5
- import BaseCommand from '../../../../lib/data/baseCommand.js';
6
- import { displayQuota } from '../../../../lib/data/displayQuota.js';
5
+ import BaseCommand from '../../../../lib/data/base-command.js';
6
+ import { displayQuota } from '../../../../lib/data/display-quota.js';
7
7
  const heredoc = tsheredoc.default;
8
8
  const validateQuotaSetting = function (flagName, settingAmt) {
9
9
  if (settingAmt && settingAmt !== 'none' && !Number.parseInt(settingAmt, 10)) {
@@ -1,4 +1,4 @@
1
- import BaseCommand from '../../../lib/data/baseCommand.js';
1
+ import BaseCommand from '../../../lib/data/base-command.js';
2
2
  export default class DataPgSettings extends BaseCommand {
3
3
  static args: {
4
4
  database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
@@ -2,7 +2,7 @@ import { flags as Flags } from '@heroku-cli/command';
2
2
  import { color, hux, utils } from '@heroku/heroku-cli-util';
3
3
  import { Args, ux } from '@oclif/core';
4
4
  import tsheredoc from 'tsheredoc';
5
- import BaseCommand from '../../../lib/data/baseCommand.js';
5
+ import BaseCommand from '../../../lib/data/base-command.js';
6
6
  const heredoc = tsheredoc.default;
7
7
  const settingsChangeHeaders = {
8
8
  Settings: {},
@@ -1,6 +1,6 @@
1
1
  import type { Answers } from 'inquirer';
2
2
  import inquirer from 'inquirer';
3
- import BaseCommand from '../../../lib/data/baseCommand.js';
3
+ import BaseCommand from '../../../lib/data/base-command.js';
4
4
  import { PoolInfoResponse } from '../../../lib/data/types.js';
5
5
  declare const prompt: inquirer.PromptModule;
6
6
  export default class DataPgUpdate extends BaseCommand {
@@ -3,9 +3,9 @@ import { color, hux, utils, } from '@heroku/heroku-cli-util';
3
3
  import { Args, ux } from '@oclif/core';
4
4
  import inquirer from 'inquirer';
5
5
  import tsheredoc from 'tsheredoc';
6
- import BaseCommand from '../../../lib/data/baseCommand.js';
7
- import createPool from '../../../lib/data/createPool.js';
8
- import PoolConfig from '../../../lib/data/poolConfig.js';
6
+ import BaseCommand from '../../../lib/data/base-command.js';
7
+ import createPool from '../../../lib/data/create-pool.js';
8
+ import PoolConfig from '../../../lib/data/pool-config.js';
9
9
  import { fetchLevelsAndPricing, renderPricingInfo } from '../../../lib/data/utils.js';
10
10
  const heredoc = tsheredoc.default;
11
11
  // eslint-disable-next-line import/no-named-as-default-member
@@ -0,0 +1,15 @@
1
+ import BaseCommand from '../../../../lib/data/base-command.js';
2
+ export default class DataPgUpgradeRun extends BaseCommand {
3
+ static args: {
4
+ database: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
+ };
6
+ static description: string;
7
+ static examples: string[];
8
+ static flags: {
9
+ app: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
+ confirm: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ remote: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
12
+ version: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ };
14
+ run(): Promise<void>;
15
+ }
@@ -0,0 +1,58 @@
1
+ import { flags as Flags } from '@heroku-cli/command';
2
+ import { color, hux, utils } from '@heroku/heroku-cli-util';
3
+ import { Args, ux } from '@oclif/core';
4
+ import tsheredoc from 'tsheredoc';
5
+ import BaseCommand from '../../../../lib/data/base-command.js';
6
+ const heredoc = tsheredoc.default;
7
+ export default class DataPgUpgradeRun extends BaseCommand {
8
+ static args = {
9
+ database: Args.string({
10
+ description: 'database name, database attachment name, or related config var on an app',
11
+ required: true,
12
+ }),
13
+ };
14
+ static description = 'upgrade the Postgres version on a Postgres Advanced database';
15
+ static examples = [
16
+ heredoc `
17
+ # Upgrade a Postgres Advanced database to version 17
18
+ ${color.code('<%= config.bin %> <%= command.id %> DATABASE --version 17 --app my-app')}
19
+ `,
20
+ ];
21
+ static flags = {
22
+ app: Flags.app({ required: true }),
23
+ confirm: Flags.string({ char: 'c', description: 'pass in the app name to skip confirmation prompts' }),
24
+ remote: Flags.remote(),
25
+ version: Flags.string({ char: 'v', description: 'Postgres version to upgrade to' }),
26
+ };
27
+ async run() {
28
+ const { args, flags } = await this.parse(DataPgUpgradeRun);
29
+ const { app, confirm, version } = flags;
30
+ const { database } = args;
31
+ const dbResolver = new utils.pg.DatabaseResolver(this.heroku);
32
+ const { addon } = await dbResolver.getAttachment(app, database);
33
+ if (!utils.pg.isAdvancedDatabase(addon)) {
34
+ ux.error('You can only use this command on Advanced-tier databases.\n'
35
+ + `Use ${color.code(`heroku pg:upgrade:run ${addon.name} --app ${app}`)} instead.`);
36
+ }
37
+ const { body: databaseInfo } = await this.dataApi.get(`/data/postgres/v1/${addon.id}/info`);
38
+ const { version: currentVersion } = databaseInfo;
39
+ const newVersion = version ?? 'the latest supported Postgres version';
40
+ await hux.confirmCommand({
41
+ comparison: app,
42
+ confirmation: confirm,
43
+ warningMessage: heredoc(`
44
+ This command immediately upgrades your ${color.datastore(addon.name)} database from ${currentVersion} to ${newVersion}.
45
+ Your database will be unavailable until the upgrade is complete.`),
46
+ });
47
+ try {
48
+ ux.action.start(`Upgrading your ${color.datastore(addon.name)} database from ${currentVersion} to ${newVersion}`);
49
+ await this.dataApi.post(`/data/postgres/v1/${addon.id}/upgrade/run`, { body: { version } });
50
+ ux.action.stop();
51
+ ux.stderr(`Upgrade started. Use ${color.code(`heroku data:pg:upgrade:wait ${addon.name} -a ${app}`)} to monitor progress.`);
52
+ }
53
+ catch (error) {
54
+ ux.action.stop(color.red('!'));
55
+ throw error;
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,6 @@
1
+ import DataPgWait from '../wait.js';
2
+ export default class DataPgUpgradeWait extends DataPgWait {
3
+ static description: string;
4
+ static examples: string[];
5
+ protected classicWaitCommand: string;
6
+ }