heroku 10.7.1-alpha.1 → 10.8.0-beta.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.
@@ -94,6 +94,12 @@ export declare type PgStatus = {
94
94
  'error?': boolean;
95
95
  message: string;
96
96
  };
97
+ export declare type PgUpgradeStatus = {
98
+ 'waiting?': boolean;
99
+ 'error?': boolean;
100
+ message: string;
101
+ step: string;
102
+ };
97
103
  declare type TenantInfoNames = 'Plan' | 'Status' | 'Connections' | 'PG Version' | 'Created' | 'Data Size' | 'Tables' | 'Fork/Follow' | 'Rollback' | 'Continuous Protection' | 'Billing App' | 'Add-on';
98
104
  export declare type TenantInfo = {
99
105
  name: TenantInfoNames;
@@ -114,6 +120,15 @@ export declare type PgDatabaseTenant = {
114
120
  info: Array<TenantInfo>;
115
121
  };
116
122
  export declare type PgDatabase = PgDatabaseService & PgDatabaseTenant;
123
+ export declare type PgUpgradeResponse = {
124
+ message: string;
125
+ };
126
+ export declare type PgUpgradeError = {
127
+ body: {
128
+ id: string;
129
+ message: string;
130
+ };
131
+ };
117
132
  export declare type AddOnWithPlan = Required<Heroku.AddOnAttachment['addon']> & {
118
133
  plan: Required<Heroku.AddOn['plan']>;
119
134
  };
@@ -9,6 +9,7 @@ export declare function essentialPlan(addon: AddOnAttachmentWithConfigVarsAndPla
9
9
  export declare function getConfigVarNameFromAttachment(attachment: Required<AddOnAttachment & {
10
10
  addon: AddOnAttachmentWithConfigVarsAndPlan;
11
11
  }>, config?: Record<string, string>): string;
12
+ export declare function formatResponseWithCommands(response: string): string;
12
13
  export declare function presentCredentialAttachments(app: string, credAttachments: Required<AddOnAttachment>[], credentials: CredentialsInfo, cred: string): string;
13
14
  export declare type ConnectionDetails = {
14
15
  user: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parsePostgresConnectionString = exports.databaseNameFromUrl = exports.configVarNamesFromValue = exports.bastionKeyPlan = exports.getConnectionDetails = exports.presentCredentialAttachments = exports.getConfigVarNameFromAttachment = exports.essentialPlan = exports.legacyEssentialPlan = exports.essentialNumPlan = exports.getConfigVarName = void 0;
3
+ exports.parsePostgresConnectionString = exports.databaseNameFromUrl = exports.configVarNamesFromValue = exports.bastionKeyPlan = exports.getConnectionDetails = exports.presentCredentialAttachments = exports.formatResponseWithCommands = exports.getConfigVarNameFromAttachment = exports.essentialPlan = exports.legacyEssentialPlan = exports.essentialNumPlan = exports.getConfigVarName = void 0;
4
4
  const color_1 = require("@heroku-cli/color");
5
5
  const core_1 = require("@oclif/core");
6
6
  const debug_1 = require("debug");
@@ -39,6 +39,10 @@ function getConfigVarNameFromAttachment(attachment, config = {}) {
39
39
  return getConfigVarName(configVars);
40
40
  }
41
41
  exports.getConfigVarNameFromAttachment = getConfigVarNameFromAttachment;
42
+ function formatResponseWithCommands(response) {
43
+ return response.replace(/`(.*?)`/g, (_, word) => color_1.default.cmd(word));
44
+ }
45
+ exports.formatResponseWithCommands = formatResponseWithCommands;
42
46
  function presentCredentialAttachments(app, credAttachments, credentials, cred) {
43
47
  const isForeignApp = (attOrAddon) => attOrAddon.app.name === app ? 0 : 1;
44
48
  const comparators = [
@@ -7211,65 +7211,6 @@
7211
7211
  "unfollow.js"
7212
7212
  ]
7213
7213
  },
7214
- "pg:upgrade": {
7215
- "aliases": [],
7216
- "args": {
7217
- "database": {
7218
- "description": "config var containing the connection string, unique name, ID, or alias of the database. To access another app's database, prepend the app name to the config var or alias with `APP_NAME::` . If omitted, we use DATABASE_URL.",
7219
- "name": "database"
7220
- }
7221
- },
7222
- "description": "For an Essential-* plan, this command upgrades the database's PostgreSQL version. For a Standard-tier and higher plan, this command unfollows the leader database before upgrading the PostgreSQL version.\nTo upgrade to another PostgreSQL version, use pg:copy instead\n",
7223
- "flags": {
7224
- "confirm": {
7225
- "char": "c",
7226
- "name": "confirm",
7227
- "hasDynamicHelp": false,
7228
- "multiple": false,
7229
- "type": "option"
7230
- },
7231
- "version": {
7232
- "char": "v",
7233
- "description": "PostgreSQL version to upgrade to",
7234
- "name": "version",
7235
- "hasDynamicHelp": false,
7236
- "multiple": false,
7237
- "type": "option"
7238
- },
7239
- "app": {
7240
- "char": "a",
7241
- "description": "app to run command against",
7242
- "name": "app",
7243
- "required": true,
7244
- "hasDynamicHelp": false,
7245
- "multiple": false,
7246
- "type": "option"
7247
- },
7248
- "remote": {
7249
- "char": "r",
7250
- "description": "git remote of app to use",
7251
- "name": "remote",
7252
- "hasDynamicHelp": false,
7253
- "multiple": false,
7254
- "type": "option"
7255
- }
7256
- },
7257
- "hasDynamicHelp": false,
7258
- "hiddenAliases": [],
7259
- "id": "pg:upgrade",
7260
- "pluginAlias": "heroku",
7261
- "pluginName": "heroku",
7262
- "pluginType": "core",
7263
- "strict": true,
7264
- "topic": "pg",
7265
- "isESM": false,
7266
- "relativePath": [
7267
- "lib",
7268
- "commands",
7269
- "pg",
7270
- "upgrade.js"
7271
- ]
7272
- },
7273
7214
  "pg:vacuum-stats": {
7274
7215
  "aliases": [],
7275
7216
  "args": {
@@ -13203,6 +13144,342 @@
13203
13144
  "track-functions.js"
13204
13145
  ]
13205
13146
  },
13147
+ "pg:upgrade:cancel": {
13148
+ "aliases": [],
13149
+ "args": {
13150
+ "database": {
13151
+ "description": "config var containing the connection string, unique name, ID, or alias of the database. To access another app's database, prepend the app name to the config var or alias with `APP_NAME::` . If omitted, we use DATABASE_URL.",
13152
+ "name": "database"
13153
+ }
13154
+ },
13155
+ "description": "cancels a scheduled upgrade. You can't cancel a version upgrade that's in progress.\n",
13156
+ "flags": {
13157
+ "confirm": {
13158
+ "char": "c",
13159
+ "name": "confirm",
13160
+ "hasDynamicHelp": false,
13161
+ "multiple": false,
13162
+ "type": "option"
13163
+ },
13164
+ "app": {
13165
+ "char": "a",
13166
+ "description": "app to run command against",
13167
+ "name": "app",
13168
+ "required": true,
13169
+ "hasDynamicHelp": false,
13170
+ "multiple": false,
13171
+ "type": "option"
13172
+ }
13173
+ },
13174
+ "hasDynamicHelp": false,
13175
+ "hiddenAliases": [],
13176
+ "id": "pg:upgrade:cancel",
13177
+ "pluginAlias": "heroku",
13178
+ "pluginName": "heroku",
13179
+ "pluginType": "core",
13180
+ "strict": true,
13181
+ "topic": "pg",
13182
+ "isESM": false,
13183
+ "relativePath": [
13184
+ "lib",
13185
+ "commands",
13186
+ "pg",
13187
+ "upgrade",
13188
+ "cancel.js"
13189
+ ]
13190
+ },
13191
+ "pg:upgrade:dryrun": {
13192
+ "aliases": [],
13193
+ "args": {
13194
+ "database": {
13195
+ "description": "config var containing the connection string, unique name, ID, or alias of the database. To access another app's database, prepend the app name to the config var or alias with `APP_NAME::` . If omitted, we use DATABASE_URL.",
13196
+ "name": "database"
13197
+ }
13198
+ },
13199
+ "description": "simulates a Postgres version upgrade on a Standard-tier and higher leader database by creating and upgrading a follower database. Heroku sends the results of the test upgrade via email.\n",
13200
+ "flags": {
13201
+ "confirm": {
13202
+ "char": "c",
13203
+ "name": "confirm",
13204
+ "hasDynamicHelp": false,
13205
+ "multiple": false,
13206
+ "type": "option"
13207
+ },
13208
+ "version": {
13209
+ "char": "v",
13210
+ "description": "Postgres version to upgrade to",
13211
+ "name": "version",
13212
+ "hasDynamicHelp": false,
13213
+ "multiple": false,
13214
+ "type": "option"
13215
+ },
13216
+ "app": {
13217
+ "char": "a",
13218
+ "description": "app to run command against",
13219
+ "name": "app",
13220
+ "required": true,
13221
+ "hasDynamicHelp": false,
13222
+ "multiple": false,
13223
+ "type": "option"
13224
+ }
13225
+ },
13226
+ "hasDynamicHelp": false,
13227
+ "hiddenAliases": [],
13228
+ "id": "pg:upgrade:dryrun",
13229
+ "pluginAlias": "heroku",
13230
+ "pluginName": "heroku",
13231
+ "pluginType": "core",
13232
+ "strict": true,
13233
+ "topic": "pg",
13234
+ "isESM": false,
13235
+ "relativePath": [
13236
+ "lib",
13237
+ "commands",
13238
+ "pg",
13239
+ "upgrade",
13240
+ "dryrun.js"
13241
+ ]
13242
+ },
13243
+ "pg:upgrade": {
13244
+ "aliases": [],
13245
+ "args": {
13246
+ "database": {
13247
+ "description": "config var containing the connection string, unique name, ID, or alias of the database. To access another app's database, prepend the app name to the config var or alias with `APP_NAME::` . If omitted, we use DATABASE_URL.",
13248
+ "name": "database"
13249
+ }
13250
+ },
13251
+ "description": "We're deprecating this command. To upgrade your database's Postgres version, use the new pg:upgrade:* subcommands. See https://devcenter.heroku.com/changelog-items/3179.\n\nFor an Essential-tier plan, this command upgrades the database's Postgres version. For a Standard-tier and higher plan, this command unfollows the leader database before upgrading the Postgres version.\n",
13252
+ "flags": {
13253
+ "confirm": {
13254
+ "char": "c",
13255
+ "name": "confirm",
13256
+ "hasDynamicHelp": false,
13257
+ "multiple": false,
13258
+ "type": "option"
13259
+ },
13260
+ "version": {
13261
+ "char": "v",
13262
+ "description": "Postgres version to upgrade to",
13263
+ "name": "version",
13264
+ "hasDynamicHelp": false,
13265
+ "multiple": false,
13266
+ "type": "option"
13267
+ },
13268
+ "app": {
13269
+ "char": "a",
13270
+ "description": "app to run command against",
13271
+ "name": "app",
13272
+ "required": true,
13273
+ "hasDynamicHelp": false,
13274
+ "multiple": false,
13275
+ "type": "option"
13276
+ },
13277
+ "remote": {
13278
+ "char": "r",
13279
+ "description": "git remote of app to use",
13280
+ "name": "remote",
13281
+ "hasDynamicHelp": false,
13282
+ "multiple": false,
13283
+ "type": "option"
13284
+ }
13285
+ },
13286
+ "hasDynamicHelp": false,
13287
+ "hiddenAliases": [],
13288
+ "id": "pg:upgrade",
13289
+ "pluginAlias": "heroku",
13290
+ "pluginName": "heroku",
13291
+ "pluginType": "core",
13292
+ "strict": true,
13293
+ "topic": "pg",
13294
+ "isESM": false,
13295
+ "relativePath": [
13296
+ "lib",
13297
+ "commands",
13298
+ "pg",
13299
+ "upgrade",
13300
+ "index.js"
13301
+ ]
13302
+ },
13303
+ "pg:upgrade:prepare": {
13304
+ "aliases": [],
13305
+ "args": {
13306
+ "database": {
13307
+ "description": "config var containing the connection string, unique name, ID, or alias of the database. To access another app's database, prepend the app name to the config var or alias with `APP_NAME::` . If omitted, we use DATABASE_URL.",
13308
+ "name": "database"
13309
+ }
13310
+ },
13311
+ "description": "prepares the upgrade for Standard-tier and higher leader databases and schedules it for the next available maintenance window. To start a version upgrade on Essential-tier and follower databases, use heroku pg:upgrade:run instead.\n",
13312
+ "flags": {
13313
+ "confirm": {
13314
+ "char": "c",
13315
+ "name": "confirm",
13316
+ "hasDynamicHelp": false,
13317
+ "multiple": false,
13318
+ "type": "option"
13319
+ },
13320
+ "version": {
13321
+ "char": "v",
13322
+ "description": "Postgres version to upgrade to",
13323
+ "name": "version",
13324
+ "hasDynamicHelp": false,
13325
+ "multiple": false,
13326
+ "type": "option"
13327
+ },
13328
+ "app": {
13329
+ "char": "a",
13330
+ "description": "app to run command against",
13331
+ "name": "app",
13332
+ "required": true,
13333
+ "hasDynamicHelp": false,
13334
+ "multiple": false,
13335
+ "type": "option"
13336
+ }
13337
+ },
13338
+ "hasDynamicHelp": false,
13339
+ "hiddenAliases": [],
13340
+ "id": "pg:upgrade:prepare",
13341
+ "pluginAlias": "heroku",
13342
+ "pluginName": "heroku",
13343
+ "pluginType": "core",
13344
+ "strict": true,
13345
+ "topic": "pg",
13346
+ "isESM": false,
13347
+ "relativePath": [
13348
+ "lib",
13349
+ "commands",
13350
+ "pg",
13351
+ "upgrade",
13352
+ "prepare.js"
13353
+ ]
13354
+ },
13355
+ "pg:upgrade:run": {
13356
+ "aliases": [],
13357
+ "args": {
13358
+ "database": {
13359
+ "description": "config var containing the connection string, unique name, ID, or alias of the database. To access another app's database, prepend the app name to the config var or alias with `APP_NAME::` . If omitted, we use DATABASE_URL.",
13360
+ "name": "database"
13361
+ }
13362
+ },
13363
+ "description": "starts a Postgres version upgrade\n\nOn Essential-tier databases, this command upgrades the database's Postgres version.\n\nOn Standard-tier and higher leader databases, this command runs a previously scheduled Postgres version upgrade. You must run pg:upgrade:prepare before this command to schedule a version upgrade.\n\nOn follower databases, this command unfollows the leader database before upgrading the follower's Postgres version.\n",
13364
+ "examples": [
13365
+ "# Upgrade an Essential-tier database to a specific version\n$ heroku pg:upgrade:run postgresql-curved-12345 --version 14 --app myapp\n",
13366
+ "# Upgrade a Standard-tier follower database to the latest supported version\n$ heroku pg:upgrade:run HEROKU_POSTGRESQL_BLUE_URL --app myapp\n",
13367
+ "# Run a previously scheduled upgrade on a Standard-tier leader database\n$ heroku pg:upgrade:run DATABASE_URL --app myapp\n"
13368
+ ],
13369
+ "flags": {
13370
+ "confirm": {
13371
+ "char": "c",
13372
+ "name": "confirm",
13373
+ "hasDynamicHelp": false,
13374
+ "multiple": false,
13375
+ "type": "option"
13376
+ },
13377
+ "version": {
13378
+ "char": "v",
13379
+ "description": "Postgres version to upgrade to",
13380
+ "name": "version",
13381
+ "hasDynamicHelp": false,
13382
+ "multiple": false,
13383
+ "type": "option"
13384
+ },
13385
+ "app": {
13386
+ "char": "a",
13387
+ "description": "app to run command against",
13388
+ "name": "app",
13389
+ "required": true,
13390
+ "hasDynamicHelp": false,
13391
+ "multiple": false,
13392
+ "type": "option"
13393
+ },
13394
+ "remote": {
13395
+ "char": "r",
13396
+ "description": "git remote of app to use",
13397
+ "name": "remote",
13398
+ "hasDynamicHelp": false,
13399
+ "multiple": false,
13400
+ "type": "option"
13401
+ }
13402
+ },
13403
+ "hasDynamicHelp": false,
13404
+ "hiddenAliases": [],
13405
+ "id": "pg:upgrade:run",
13406
+ "pluginAlias": "heroku",
13407
+ "pluginName": "heroku",
13408
+ "pluginType": "core",
13409
+ "strict": true,
13410
+ "topic": "pg",
13411
+ "isESM": false,
13412
+ "relativePath": [
13413
+ "lib",
13414
+ "commands",
13415
+ "pg",
13416
+ "upgrade",
13417
+ "run.js"
13418
+ ]
13419
+ },
13420
+ "pg:upgrade:wait": {
13421
+ "aliases": [],
13422
+ "args": {
13423
+ "database": {
13424
+ "description": "config var containing the connection string, unique name, ID, or alias of the database. To access another app's database, prepend the app name to the config var or alias with `APP_NAME::`",
13425
+ "name": "database"
13426
+ }
13427
+ },
13428
+ "description": "provides the status of an upgrade and blocks it until the operation is complete",
13429
+ "examples": [
13430
+ "# Wait for upgrade to complete with default settings\n$ heroku pg:upgrade:wait postgresql-curved-12345 --app myapp\n",
13431
+ "# Wait with custom polling interval\n$ heroku pg:upgrade:wait postgresql-curved-12345 --app myapp --wait-interval 10\n",
13432
+ "# Wait without showing OS notifications\n$ heroku pg:upgrade:wait postgresql-curved-12345 --app myapp --no-notify\n"
13433
+ ],
13434
+ "flags": {
13435
+ "wait-interval": {
13436
+ "description": "how frequently to poll in seconds (to avoid rate limiting)",
13437
+ "name": "wait-interval",
13438
+ "hasDynamicHelp": false,
13439
+ "multiple": false,
13440
+ "type": "option"
13441
+ },
13442
+ "no-notify": {
13443
+ "description": "do not show OS notification",
13444
+ "name": "no-notify",
13445
+ "allowNo": false,
13446
+ "type": "boolean"
13447
+ },
13448
+ "app": {
13449
+ "char": "a",
13450
+ "description": "app to run command against",
13451
+ "name": "app",
13452
+ "required": true,
13453
+ "hasDynamicHelp": false,
13454
+ "multiple": false,
13455
+ "type": "option"
13456
+ },
13457
+ "remote": {
13458
+ "char": "r",
13459
+ "description": "git remote of app to use",
13460
+ "name": "remote",
13461
+ "hasDynamicHelp": false,
13462
+ "multiple": false,
13463
+ "type": "option"
13464
+ }
13465
+ },
13466
+ "hasDynamicHelp": false,
13467
+ "hiddenAliases": [],
13468
+ "id": "pg:upgrade:wait",
13469
+ "pluginAlias": "heroku",
13470
+ "pluginName": "heroku",
13471
+ "pluginType": "core",
13472
+ "strict": true,
13473
+ "topic": "pg",
13474
+ "isESM": false,
13475
+ "relativePath": [
13476
+ "lib",
13477
+ "commands",
13478
+ "pg",
13479
+ "upgrade",
13480
+ "wait.js"
13481
+ ]
13482
+ },
13206
13483
  "ps:autoscale:disable": {
13207
13484
  "aliases": [],
13208
13485
  "args": {},
@@ -14652,5 +14929,5 @@
14652
14929
  ]
14653
14930
  }
14654
14931
  },
14655
- "version": "10.7.1-alpha.1"
14932
+ "version": "10.8.0-beta.0"
14656
14933
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "heroku",
3
3
  "description": "CLI to interact with Heroku",
4
- "version": "10.7.1-alpha.1",
4
+ "version": "10.8.0-beta.0",
5
5
  "author": "Heroku",
6
6
  "bin": "./bin/run",
7
7
  "bugs": "https://github.com/heroku/cli/issues",
@@ -13,9 +13,8 @@
13
13
  "@heroku-cli/schema": "^1.0.25",
14
14
  "@heroku/buildpack-registry": "^1.0.1",
15
15
  "@heroku/eventsource": "^1.0.7",
16
- "@heroku/heroku-cli-util": "^9.0.1",
16
+ "@heroku/heroku-cli-util": "^9.0.2",
17
17
  "@heroku/http-call": "^5.4.0",
18
- "@heroku/plugin-ai": "^1.0.1",
19
18
  "@inquirer/prompts": "^5.0.5",
20
19
  "@oclif/core": "^2.16.0",
21
20
  "@oclif/plugin-commands": "2.2.28",
@@ -80,8 +79,7 @@
80
79
  "validator": "^13.7.0",
81
80
  "word-wrap": "^1.2.5",
82
81
  "ws": "^6.2.2",
83
- "yaml": "^2.0.1",
84
- "yargs-parser": "18.1.3"
82
+ "yaml": "^2.0.1"
85
83
  },
86
84
  "devDependencies": {
87
85
  "@heroku-cli/schema": "^1.0.25",
@@ -187,8 +185,7 @@
187
185
  "@oclif/plugin-update",
188
186
  "@oclif/plugin-version",
189
187
  "@oclif/plugin-warn-if-update-available",
190
- "@oclif/plugin-which",
191
- "@heroku/plugin-ai"
188
+ "@oclif/plugin-which"
192
189
  ],
193
190
  "bin": "heroku",
194
191
  "dirname": "heroku",
@@ -391,12 +388,12 @@
391
388
  "test:acceptance": "yarn pretest && mocha --forbid-only \"test/**/*.acceptance.test.ts\" && node ./bin/bats-test-runner",
392
389
  "test:integration": "yarn pretest && mocha --forbid-only \"test/**/*.integration.test.ts\"",
393
390
  "test:smoke": "yarn pretest && mocha --forbid-only \"test/**/smoke.acceptance.test.ts\"",
394
- "test:unit:justTest:local": "mocha \"test/**/*.unit.test.ts\"",
391
+ "test:unit:justTest:local": "nyc mocha \"test/**/*.unit.test.ts\"",
395
392
  "test:unit:justTest:ci": "nyc --reporter=lcov --reporter=text-summary mocha --forbid-only \"test/**/*.unit.test.ts\"",
396
393
  "test": "yarn pretest && yarn test:unit:justTest:ci",
397
394
  "test:local": "yarn pretest && yarn test:unit:justTest:local",
398
395
  "version": "oclif readme --multi && git add README.md ../../docs"
399
396
  },
400
397
  "types": "lib/index.d.ts",
401
- "gitHead": "c89feca949fc3319131e316a95c819f5da92d23e"
398
+ "gitHead": "738723f76c2a100555b463cef070814a705d35bb"
402
399
  }