heroku 10.7.1-beta.0 → 10.8.0-alpha.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.
- package/README.md +1 -0
- package/bin/heroku-prompts.js +235 -0
- package/bin/heroku-repl.js +620 -0
- package/bin/run +36 -7
- package/lib/analytics.js +3 -1
- package/lib/commands/pg/upgrade/cancel.d.ts +13 -0
- package/lib/commands/pg/upgrade/cancel.js +53 -0
- package/lib/commands/pg/upgrade/dryrun.d.ts +14 -0
- package/lib/commands/pg/upgrade/dryrun.js +54 -0
- package/lib/commands/pg/upgrade/index.js +76 -0
- package/lib/commands/pg/upgrade/prepare.d.ts +14 -0
- package/lib/commands/pg/upgrade/prepare.js +54 -0
- package/lib/commands/pg/upgrade/run.d.ts +16 -0
- package/lib/commands/pg/upgrade/run.js +98 -0
- package/lib/commands/pg/upgrade/wait.d.ts +16 -0
- package/lib/commands/pg/upgrade/wait.js +103 -0
- package/lib/global_telemetry.d.ts +1 -1
- package/lib/global_telemetry.js +3 -1
- package/lib/lib/pg/types.d.ts +15 -0
- package/lib/lib/pg/util.d.ts +1 -0
- package/lib/lib/pg/util.js +5 -1
- package/oclif.manifest.json +465 -188
- package/package.json +8 -5
- package/lib/commands/pg/upgrade.js +0 -59
- /package/lib/commands/pg/{upgrade.d.ts → upgrade/index.d.ts} +0 -0
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.
|
|
4
|
+
"version": "10.8.0-alpha.0",
|
|
5
5
|
"author": "Heroku",
|
|
6
6
|
"bin": "./bin/run",
|
|
7
7
|
"bugs": "https://github.com/heroku/cli/issues",
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"@heroku/eventsource": "^1.0.7",
|
|
16
16
|
"@heroku/heroku-cli-util": "^9.0.2",
|
|
17
17
|
"@heroku/http-call": "^5.4.0",
|
|
18
|
+
"@heroku/plugin-ai": "^1.0.1",
|
|
18
19
|
"@inquirer/prompts": "^5.0.5",
|
|
19
20
|
"@oclif/core": "^2.16.0",
|
|
20
21
|
"@oclif/plugin-commands": "2.2.28",
|
|
@@ -79,7 +80,8 @@
|
|
|
79
80
|
"validator": "^13.7.0",
|
|
80
81
|
"word-wrap": "^1.2.5",
|
|
81
82
|
"ws": "^6.2.2",
|
|
82
|
-
"yaml": "^2.0.1"
|
|
83
|
+
"yaml": "^2.0.1",
|
|
84
|
+
"yargs-parser": "18.1.3"
|
|
83
85
|
},
|
|
84
86
|
"devDependencies": {
|
|
85
87
|
"@heroku-cli/schema": "^1.0.25",
|
|
@@ -185,7 +187,8 @@
|
|
|
185
187
|
"@oclif/plugin-update",
|
|
186
188
|
"@oclif/plugin-version",
|
|
187
189
|
"@oclif/plugin-warn-if-update-available",
|
|
188
|
-
"@oclif/plugin-which"
|
|
190
|
+
"@oclif/plugin-which",
|
|
191
|
+
"@heroku/plugin-ai"
|
|
189
192
|
],
|
|
190
193
|
"bin": "heroku",
|
|
191
194
|
"dirname": "heroku",
|
|
@@ -388,12 +391,12 @@
|
|
|
388
391
|
"test:acceptance": "yarn pretest && mocha --forbid-only \"test/**/*.acceptance.test.ts\" && node ./bin/bats-test-runner",
|
|
389
392
|
"test:integration": "yarn pretest && mocha --forbid-only \"test/**/*.integration.test.ts\"",
|
|
390
393
|
"test:smoke": "yarn pretest && mocha --forbid-only \"test/**/smoke.acceptance.test.ts\"",
|
|
391
|
-
"test:unit:justTest:local": "
|
|
394
|
+
"test:unit:justTest:local": "mocha \"test/**/*.unit.test.ts\"",
|
|
392
395
|
"test:unit:justTest:ci": "nyc --reporter=lcov --reporter=text-summary mocha --forbid-only \"test/**/*.unit.test.ts\"",
|
|
393
396
|
"test": "yarn pretest && yarn test:unit:justTest:ci",
|
|
394
397
|
"test:local": "yarn pretest && yarn test:unit:justTest:local",
|
|
395
398
|
"version": "oclif readme --multi && git add README.md ../../docs"
|
|
396
399
|
},
|
|
397
400
|
"types": "lib/index.d.ts",
|
|
398
|
-
"gitHead": "
|
|
401
|
+
"gitHead": "1a4f0898d75477fd3e1bce18341fb6cbc09f2af1"
|
|
399
402
|
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const color_1 = require("@heroku-cli/color");
|
|
4
|
-
const command_1 = require("@heroku-cli/command");
|
|
5
|
-
const core_1 = require("@oclif/core");
|
|
6
|
-
const tsheredoc_1 = require("tsheredoc");
|
|
7
|
-
const fetcher_1 = require("../../lib/pg/fetcher");
|
|
8
|
-
const host_1 = require("../../lib/pg/host");
|
|
9
|
-
const util_1 = require("../../lib/pg/util");
|
|
10
|
-
const confirmCommand_1 = require("../../lib/confirmCommand");
|
|
11
|
-
const nls_1 = require("../../nls");
|
|
12
|
-
class Upgrade extends command_1.Command {
|
|
13
|
-
async run() {
|
|
14
|
-
const { flags, args } = await this.parse(Upgrade);
|
|
15
|
-
const { app, version, confirm } = flags;
|
|
16
|
-
const { database } = args;
|
|
17
|
-
const db = await (0, fetcher_1.getAddon)(this.heroku, app, database);
|
|
18
|
-
if ((0, util_1.legacyEssentialPlan)(db))
|
|
19
|
-
core_1.ux.error('pg:upgrade is only available for Essential-* databases and follower databases on Standard-tier and higher plans.');
|
|
20
|
-
const { body: replica } = await this.heroku.get(`/client/v11/databases/${db.id}`, { hostname: (0, host_1.default)() });
|
|
21
|
-
if (replica.following) {
|
|
22
|
-
const { body: configVars } = await this.heroku.get(`/apps/${app}/config-vars`);
|
|
23
|
-
const origin = (0, util_1.databaseNameFromUrl)(replica.following, configVars);
|
|
24
|
-
await (0, confirmCommand_1.default)(app, confirm, (0, tsheredoc_1.default)(`
|
|
25
|
-
Destructive action
|
|
26
|
-
${color_1.default.addon(db.name)} will be upgraded to a newer PostgreSQL version, stop following ${origin}, and become writable.
|
|
27
|
-
|
|
28
|
-
This cannot be undone.
|
|
29
|
-
`));
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
await (0, confirmCommand_1.default)(app, confirm, (0, tsheredoc_1.default)(`
|
|
33
|
-
Destructive action
|
|
34
|
-
${color_1.default.addon(db.name)} will be upgraded to a newer PostgreSQL version.
|
|
35
|
-
|
|
36
|
-
This cannot be undone.
|
|
37
|
-
`));
|
|
38
|
-
}
|
|
39
|
-
const data = { version };
|
|
40
|
-
core_1.ux.action.start(`Starting upgrade of ${color_1.default.addon(db.name)}`);
|
|
41
|
-
await this.heroku.post(`/client/v11/databases/${db.id}/upgrade`, { hostname: (0, host_1.default)(), body: data });
|
|
42
|
-
core_1.ux.action.stop(`Use ${color_1.default.cmd('heroku pg:wait')} to track status`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.default = Upgrade;
|
|
46
|
-
Upgrade.topic = 'pg';
|
|
47
|
-
Upgrade.description = (0, tsheredoc_1.default)(`
|
|
48
|
-
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.
|
|
49
|
-
To upgrade to another PostgreSQL version, use pg:copy instead
|
|
50
|
-
`);
|
|
51
|
-
Upgrade.flags = {
|
|
52
|
-
confirm: command_1.flags.string({ char: 'c' }),
|
|
53
|
-
version: command_1.flags.string({ char: 'v', description: 'PostgreSQL version to upgrade to' }),
|
|
54
|
-
app: command_1.flags.app({ required: true }),
|
|
55
|
-
remote: command_1.flags.remote(),
|
|
56
|
-
};
|
|
57
|
-
Upgrade.args = {
|
|
58
|
-
database: core_1.Args.string({ description: `${(0, nls_1.nls)('pg:database:arg:description')} ${(0, nls_1.nls)('pg:database:arg:description:default:suffix')}` }),
|
|
59
|
-
};
|
|
File without changes
|