heroku 10.7.0 → 10.7.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/access/index.js +2 -1
- package/lib/commands/accounts/current.js +2 -1
- package/lib/commands/addons/index.js +3 -2
- package/lib/commands/addons/info.js +3 -2
- package/lib/commands/addons/plans.js +3 -2
- package/lib/commands/addons/services.js +3 -2
- package/lib/commands/apps/create.js +2 -1
- package/lib/commands/apps/errors.js +4 -3
- package/lib/commands/apps/favorites/index.js +3 -2
- package/lib/commands/apps/index.js +7 -6
- package/lib/commands/apps/info.js +4 -3
- package/lib/commands/apps/stacks/index.js +2 -1
- package/lib/commands/authorizations/create.js +2 -1
- package/lib/commands/authorizations/index.js +3 -2
- package/lib/commands/authorizations/info.js +2 -1
- package/lib/commands/autocomplete/doctor.js +2 -1
- package/lib/commands/buildpacks/index.js +2 -2
- package/lib/commands/buildpacks/info.js +3 -2
- package/lib/commands/buildpacks/search.js +2 -1
- package/lib/commands/buildpacks/versions.js +2 -1
- package/lib/commands/certs/add.js +2 -1
- package/lib/commands/certs/auto/enable.js +3 -2
- package/lib/commands/certs/auto/index.js +5 -4
- package/lib/commands/ci/config/index.js +4 -3
- package/lib/commands/ci/config/set.js +2 -1
- package/lib/commands/clients/create.js +2 -1
- package/lib/commands/clients/index.js +3 -2
- package/lib/commands/clients/info.js +4 -3
- package/lib/commands/clients/rotate.js +4 -3
- package/lib/commands/config/edit.js +2 -1
- package/lib/commands/config/index.js +4 -3
- package/lib/commands/config/set.js +2 -1
- package/lib/commands/container/pull.js +2 -2
- package/lib/commands/container/push.js +5 -4
- package/lib/commands/container/run.js +3 -2
- package/lib/commands/domains/add.js +2 -1
- package/lib/commands/domains/index.js +5 -4
- package/lib/commands/domains/info.js +2 -1
- package/lib/commands/drains/index.js +4 -3
- package/lib/commands/features/index.js +3 -2
- package/lib/commands/features/info.js +4 -3
- package/lib/commands/keys/add.js +2 -1
- package/lib/commands/keys/index.js +3 -2
- package/lib/commands/labs/disable.js +2 -1
- package/lib/commands/labs/index.js +3 -2
- package/lib/commands/labs/info.js +4 -3
- package/lib/commands/members/index.js +2 -1
- package/lib/commands/notifications/index.js +3 -2
- package/lib/commands/pg/backups/index.js +7 -6
- package/lib/commands/pg/backups/info.js +4 -3
- package/lib/commands/pg/backups/schedules.js +2 -1
- package/lib/commands/pg/credentials.js +2 -1
- package/lib/commands/pg/diagnose.js +3 -2
- package/lib/commands/pg/info.js +4 -3
- package/lib/commands/pg/links/index.js +3 -2
- package/lib/commands/pg/settings/index.js +3 -2
- package/lib/commands/pipelines/diff.js +3 -2
- package/lib/commands/pipelines/index.js +3 -2
- package/lib/commands/pipelines/info.js +2 -1
- package/lib/commands/pipelines/promote.js +2 -1
- package/lib/commands/pipelines/transfer.js +2 -1
- package/lib/commands/ps/index.js +5 -4
- package/lib/commands/ps/type.js +5 -4
- package/lib/commands/ps/wait.js +2 -1
- package/lib/commands/regions.js +3 -3
- package/lib/commands/releases/index.js +3 -2
- package/lib/commands/releases/info.js +6 -5
- package/lib/commands/sessions/index.js +3 -2
- package/lib/commands/spaces/create.js +3 -2
- package/lib/commands/spaces/index.js +2 -1
- package/lib/commands/spaces/ps.js +3 -2
- package/lib/commands/spaces/topology.js +4 -3
- package/lib/commands/spaces/trusted-ips/index.js +3 -2
- package/lib/commands/spaces/vpn/config.js +2 -1
- package/lib/commands/spaces/vpn/connections.js +4 -3
- package/lib/commands/spaces/vpn/info.js +6 -5
- package/lib/commands/spaces/vpn/wait.js +2 -1
- package/lib/commands/status.js +3 -2
- package/lib/commands/teams/index.js +3 -3
- package/lib/commands/telemetry/index.js +3 -2
- package/lib/commands/usage/addons.js +3 -2
- package/lib/commands/webhooks/add.js +2 -1
- package/lib/commands/webhooks/deliveries/index.js +2 -2
- package/lib/commands/webhooks/deliveries/info.js +5 -4
- package/lib/commands/webhooks/events/index.js +2 -1
- package/lib/commands/webhooks/events/info.js +3 -2
- package/lib/commands/webhooks/index.js +2 -2
- package/lib/commands/webhooks/info.js +3 -2
- package/lib/global_telemetry.d.ts +1 -1
- package/lib/global_telemetry.js +3 -1
- package/lib/lib/authorizations/authorizations.js +2 -2
- package/lib/lib/certs/certificate_details.js +2 -1
- package/lib/lib/certs/display_table.js +2 -2
- package/lib/lib/ci/test-run.js +4 -3
- package/lib/lib/confirmCommand.js +2 -1
- package/lib/lib/domains/domains.js +4 -3
- package/lib/lib/domains/wait-for-domain.js +2 -2
- package/lib/lib/orgs/utils.js +2 -1
- package/lib/lib/pipelines/render-pipeline.js +3 -2
- package/lib/lib/pipelines/setup/get-ci-settings.js +2 -2
- package/lib/lib/pipelines/setup/get-name-and-repo.js +3 -2
- package/lib/lib/pipelines/setup/get-settings.js +6 -6
- package/lib/lib/redis/api.js +4 -3
- package/lib/lib/spaces/hosts.js +3 -2
- package/lib/lib/spaces/outbound-rules.js +4 -3
- package/lib/lib/spaces/peering.js +5 -4
- package/lib/lib/spaces/spaces.js +3 -2
- package/lib/lib/spaces/vpn-connections.js +3 -3
- package/lib/lib/telemetry/util.js +3 -2
- package/oclif.manifest.json +1 -1
- package/package.json +9 -6
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const command_1 = require("@heroku-cli/command");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
const color_1 = require("@heroku-cli/color");
|
|
6
7
|
class UsageAddons extends command_1.Command {
|
|
7
8
|
displayAppUsage(app, usageAddons, appAddons) {
|
|
@@ -10,8 +11,8 @@ class UsageAddons extends command_1.Command {
|
|
|
10
11
|
quantity: data.quantity,
|
|
11
12
|
addonId: addon.id,
|
|
12
13
|
})));
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
heroku_cli_util_1.hux.styledHeader(`Usage for ${color_1.default.app(app)}`);
|
|
15
|
+
heroku_cli_util_1.hux.table(metersArray, {
|
|
15
16
|
'Add-on': {
|
|
16
17
|
get: row => {
|
|
17
18
|
const matchingAddon = appAddons.find(a => a.id === row.addonId);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const command_1 = require("@heroku-cli/command");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
const spinner_1 = require("@oclif/core/lib/cli-ux/action/spinner");
|
|
6
7
|
const base_1 = require("../../lib/webhooks/base");
|
|
7
8
|
class WebhooksAdd extends base_1.default {
|
|
@@ -21,7 +22,7 @@ class WebhooksAdd extends base_1.default {
|
|
|
21
22
|
});
|
|
22
23
|
const secret = response.headers && response.headers['heroku-webhook-secret'];
|
|
23
24
|
if (secret) {
|
|
24
|
-
|
|
25
|
+
heroku_cli_util_1.hux.styledHeader('Webhooks Signing Secret');
|
|
25
26
|
this.log(secret);
|
|
26
27
|
}
|
|
27
28
|
else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const command_1 = require("@heroku-cli/command");
|
|
4
|
-
const
|
|
4
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
5
|
const base_1 = require("../../../lib/webhooks/base");
|
|
6
6
|
class Deliveries extends base_1.default {
|
|
7
7
|
async run() {
|
|
@@ -33,7 +33,7 @@ class Deliveries extends base_1.default {
|
|
|
33
33
|
this.warn('It is possible to filter deliveries by using the --status flag');
|
|
34
34
|
}
|
|
35
35
|
const printLine = (...args) => this.log(...args);
|
|
36
|
-
|
|
36
|
+
heroku_cli_util_1.hux.table(deliveries, {
|
|
37
37
|
id: {
|
|
38
38
|
header: 'Delivery ID',
|
|
39
39
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const command_1 = require("@heroku-cli/command");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
const base_1 = require("../../../lib/webhooks/base");
|
|
6
7
|
class DeliveriesInfo extends base_1.default {
|
|
7
8
|
async run() {
|
|
@@ -21,10 +22,10 @@ class DeliveriesInfo extends base_1.default {
|
|
|
21
22
|
Error: delivery.last_attempt && delivery.last_attempt.error_class,
|
|
22
23
|
'Next Attempt': delivery.next_attempt_at,
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
heroku_cli_util_1.hux.styledHeader(delivery.id);
|
|
26
|
+
heroku_cli_util_1.hux.styledObject(obj);
|
|
27
|
+
heroku_cli_util_1.hux.styledHeader('Event Payload');
|
|
28
|
+
heroku_cli_util_1.hux.styledJSON(event.payload);
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
31
|
exports.default = DeliveriesInfo;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const command_1 = require("@heroku-cli/command");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
const base_1 = require("../../../lib/webhooks/base");
|
|
6
7
|
class EventsIndex extends base_1.default {
|
|
7
8
|
async run() {
|
|
@@ -15,7 +16,7 @@ class EventsIndex extends base_1.default {
|
|
|
15
16
|
else {
|
|
16
17
|
events.sort((a, b) => Date.parse(a.created_at) - Date.parse(b.created_at));
|
|
17
18
|
const printLine = (...args) => this.log(...args);
|
|
18
|
-
|
|
19
|
+
heroku_cli_util_1.hux.table(events, {
|
|
19
20
|
id: {
|
|
20
21
|
header: 'Event ID',
|
|
21
22
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const command_1 = require("@heroku-cli/command");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
const base_1 = require("../../../lib/webhooks/base");
|
|
6
7
|
class Info extends base_1.default {
|
|
7
8
|
async run() {
|
|
@@ -12,8 +13,8 @@ class Info extends base_1.default {
|
|
|
12
13
|
const obj = {
|
|
13
14
|
payload: JSON.stringify(webhookEvent.payload, null, 2),
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
heroku_cli_util_1.hux.styledHeader(webhookEvent.id);
|
|
17
|
+
heroku_cli_util_1.hux.styledObject(obj);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
20
|
exports.default = Info;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const color_1 = require("@heroku-cli/color");
|
|
4
4
|
const command_1 = require("@heroku-cli/command");
|
|
5
|
-
const
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
6
6
|
const base_1 = require("../../lib/webhooks/base");
|
|
7
7
|
class Webhooks extends base_1.default {
|
|
8
8
|
async run() {
|
|
@@ -15,7 +15,7 @@ class Webhooks extends base_1.default {
|
|
|
15
15
|
}
|
|
16
16
|
webhooks.sort((a, b) => Date.parse(a.created_at) - Date.parse(b.created_at));
|
|
17
17
|
const printLine = (...args) => this.log(...args);
|
|
18
|
-
|
|
18
|
+
heroku_cli_util_1.hux.table(webhooks, {
|
|
19
19
|
id: {
|
|
20
20
|
header: 'Webhook ID',
|
|
21
21
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const command_1 = require("@heroku-cli/command");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
const base_1 = require("../../lib/webhooks/base");
|
|
6
7
|
class WebhooksInfo extends base_1.default {
|
|
7
8
|
async run() {
|
|
@@ -14,8 +15,8 @@ class WebhooksInfo extends base_1.default {
|
|
|
14
15
|
Include: webhook.include.join(','),
|
|
15
16
|
Level: webhook.level,
|
|
16
17
|
};
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
heroku_cli_util_1.hux.styledHeader(webhook.id);
|
|
19
|
+
heroku_cli_util_1.hux.styledObject(obj);
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
exports.default = WebhooksInfo;
|
|
@@ -25,7 +25,7 @@ export declare function initializeInstrumentation(): void;
|
|
|
25
25
|
export declare function setupTelemetry(config: any, opts: any): {
|
|
26
26
|
command: any;
|
|
27
27
|
os: any;
|
|
28
|
-
version:
|
|
28
|
+
version: string;
|
|
29
29
|
exitCode: number;
|
|
30
30
|
exitState: string;
|
|
31
31
|
cliRunDuration: number;
|
package/lib/global_telemetry.js
CHANGED
|
@@ -57,10 +57,12 @@ function setupTelemetry(config, opts) {
|
|
|
57
57
|
const now = new Date();
|
|
58
58
|
const cmdStartTime = now.getTime();
|
|
59
59
|
const isRegularCmd = Boolean(opts.Command);
|
|
60
|
+
const mcpMode = process.env.HEROKU_MCP_MODE === 'true';
|
|
61
|
+
const mcpServerVersion = process.env.HEROKU_MCP_SERVER_VERSION || 'unknown';
|
|
60
62
|
const irregularTelemetryObject = {
|
|
61
63
|
command: opts.id,
|
|
62
64
|
os: config.platform,
|
|
63
|
-
version: config.version
|
|
65
|
+
version: `${config.version}${mcpMode ? ` (MCP ${mcpServerVersion})` : ''}`,
|
|
64
66
|
exitCode: 0,
|
|
65
67
|
exitState: 'successful',
|
|
66
68
|
cliRunDuration: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.display = void 0;
|
|
4
|
-
const
|
|
4
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
5
|
const date_fns_1 = require("date-fns");
|
|
6
6
|
function display(auth) {
|
|
7
7
|
const obj = {
|
|
@@ -24,7 +24,7 @@ function display(auth) {
|
|
|
24
24
|
obj['Expires at'] = `${date} (in ${(0, date_fns_1.formatDistanceToNow)(date)})`;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
heroku_cli_util_1.hux.styledObject(obj, [
|
|
28
28
|
'Client',
|
|
29
29
|
'Redirect URI',
|
|
30
30
|
'ID',
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.displayCertificateDetails = void 0;
|
|
4
4
|
const format_date_1 = require("./format_date");
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
6
7
|
const color_1 = require("@heroku-cli/color");
|
|
7
8
|
const displayCertificateDetails = function (sniEndpoint, message = 'Certificate details:') {
|
|
8
9
|
const now = new Date();
|
|
@@ -23,7 +24,7 @@ const displayCertificateDetails = function (sniEndpoint, message = 'Certificate
|
|
|
23
24
|
if (sniEndpoint.domains.length > 0 && !sniEndpoint.domains.some(domain => domain.match('^[a-f0-9]{8}(-[a-f0-9]{4}){3}-[a-f0-9]{12}'))) {
|
|
24
25
|
tableObject['Domain(s)'] = sniEndpoint.domains;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
+
heroku_cli_util_1.hux.styledObject(tableObject);
|
|
27
28
|
if (sniEndpoint.ssl_cert['ca_signed?']) {
|
|
28
29
|
core_1.ux.log('SSL certificate is verified by a root authority.');
|
|
29
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
4
4
|
const format_date_1 = require("./format_date");
|
|
5
5
|
function type(endpoint) {
|
|
6
6
|
if (endpoint.ssl_cert && endpoint.ssl_cert.acm) {
|
|
@@ -46,6 +46,6 @@ function default_1(endpoints) {
|
|
|
46
46
|
if (endpoints.some(endpoint => !endpoint.ssl_cert.acm)) {
|
|
47
47
|
columns.associated_domains = { header: 'Domains' };
|
|
48
48
|
}
|
|
49
|
-
|
|
49
|
+
heroku_cli_util_1.hux.table(mapped, columns);
|
|
50
50
|
}
|
|
51
51
|
exports.default = default_1;
|
package/lib/lib/ci/test-run.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.displayTestRunInfo = exports.displayAndExit = exports.waitForStates = exports.renderList = void 0;
|
|
4
4
|
const color_1 = require("@heroku-cli/color");
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
6
7
|
const https_1 = require("https");
|
|
7
8
|
const node_crypto_1 = require("node:crypto");
|
|
8
9
|
const phoenix_1 = require("phoenix");
|
|
@@ -87,7 +88,7 @@ function sort(testRuns) {
|
|
|
87
88
|
function draw(testRuns, watchOption = false, jsonOption = false, count = 15) {
|
|
88
89
|
const latestTestRuns = sort(testRuns).slice(0, count);
|
|
89
90
|
if (jsonOption) {
|
|
90
|
-
|
|
91
|
+
heroku_cli_util_1.hux.styledJSON(latestTestRuns);
|
|
91
92
|
return;
|
|
92
93
|
}
|
|
93
94
|
if (watchOption) {
|
|
@@ -103,7 +104,7 @@ function draw(testRuns, watchOption = false, jsonOption = false, count = 15) {
|
|
|
103
104
|
status: testRun.status,
|
|
104
105
|
});
|
|
105
106
|
});
|
|
106
|
-
|
|
107
|
+
heroku_cli_util_1.hux.table(data, {
|
|
107
108
|
iconStatus: {
|
|
108
109
|
minWidth: 1, header: '', // header '' is to make sure that width is 1 character
|
|
109
110
|
},
|
|
@@ -122,7 +123,7 @@ async function renderList(command, testRuns, pipeline, watchOption, jsonOption)
|
|
|
122
123
|
const watchable = (Boolean(watchOption && !jsonOption));
|
|
123
124
|
if (!jsonOption) {
|
|
124
125
|
const header = `${watchOption ? 'Watching' : 'Showing'} latest test runs for the ${pipeline.name} pipeline`;
|
|
125
|
-
|
|
126
|
+
heroku_cli_util_1.hux.styledHeader(header);
|
|
126
127
|
}
|
|
127
128
|
draw(testRuns, watchOption, jsonOption);
|
|
128
129
|
if (!watchable) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const color_1 = require("@heroku-cli/color");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
async function confirmCommand(app, confirm, message) {
|
|
6
7
|
if (confirm) {
|
|
7
8
|
if (confirm === app)
|
|
@@ -14,7 +15,7 @@ This command will affect the app ${color_1.default.bold.red(app)}`;
|
|
|
14
15
|
}
|
|
15
16
|
core_1.ux.warn(message);
|
|
16
17
|
console.error();
|
|
17
|
-
const entered = await
|
|
18
|
+
const entered = await heroku_cli_util_1.hux.prompt(`To proceed, type ${color_1.default.bold.red(app)} or re-run this command with ${color_1.default.bold.red('--confirm', app)}`, { required: true });
|
|
18
19
|
if (entered === app) {
|
|
19
20
|
return;
|
|
20
21
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.waitForCertIssuedOnDomains = exports.printDomains = exports.waitForDomains = exports.getDomains = void 0;
|
|
4
4
|
const psl_1 = require("psl");
|
|
5
5
|
const core_1 = require("@oclif/core");
|
|
6
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
6
7
|
const color_1 = require("@heroku-cli/color");
|
|
7
8
|
const wait = function (ms) {
|
|
8
9
|
return new Promise(function (resolve) {
|
|
@@ -49,11 +50,11 @@ function printDomains(domains, message) {
|
|
|
49
50
|
domains = domains.filter(domain => domain.kind === 'custom');
|
|
50
51
|
const domains_with_type = domains.map(domain => Object.assign({}, domain, { type: type(domain) }));
|
|
51
52
|
if (domains_with_type.length === 0) {
|
|
52
|
-
|
|
53
|
+
heroku_cli_util_1.hux.styledHeader(`${message} Add a custom domain to your app by running ${color_1.default.cmd('heroku domains:add <yourdomain.com>')}`);
|
|
53
54
|
}
|
|
54
55
|
else {
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
heroku_cli_util_1.hux.styledHeader(`${message} Update your application's DNS settings as follows`);
|
|
57
|
+
heroku_cli_util_1.hux.table(domains_with_type, {
|
|
57
58
|
domain: {
|
|
58
59
|
get: ({ hostname }) => hostname,
|
|
59
60
|
},
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const color_1 = require("@heroku-cli/color");
|
|
4
|
-
const
|
|
4
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
5
|
const spinner_1 = require("@oclif/core/lib/cli-ux/action/spinner");
|
|
6
6
|
async function waitForDomain(app, heroku, domain) {
|
|
7
7
|
const action = new spinner_1.default();
|
|
8
8
|
action.start(`Waiting for ${color_1.color.green(domain.hostname || 'domain')}`);
|
|
9
9
|
while (domain.status === 'pending') {
|
|
10
|
-
await
|
|
10
|
+
await heroku_cli_util_1.hux.wait(5000);
|
|
11
11
|
const { body: updatedDomain } = await heroku.get(`/apps/${app}/domains/${domain.id}`);
|
|
12
12
|
domain = updatedDomain;
|
|
13
13
|
}
|
package/lib/lib/orgs/utils.js
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.printGroupsJSON = exports.printGroups = void 0;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
const _ = require("lodash");
|
|
6
7
|
const color_1 = require("@heroku-cli/color");
|
|
7
8
|
const printGroups = function (teams, type) {
|
|
8
9
|
const typeLabel = type.label ? type.label : 'Team';
|
|
9
10
|
teams = _.sortBy(teams, 'name');
|
|
10
|
-
|
|
11
|
+
heroku_cli_util_1.hux.table(teams, {
|
|
11
12
|
name: {
|
|
12
13
|
header: typeLabel,
|
|
13
14
|
get: ({ name }) => color_1.default.green(name),
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const color_1 = require("@heroku-cli/color");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
const lodash_1 = require("lodash");
|
|
6
7
|
const ownership_1 = require("./ownership");
|
|
7
8
|
async function renderPipeline(heroku, pipeline, pipelineApps,
|
|
8
9
|
// eslint-disable-next-line unicorn/no-object-as-default-parameter
|
|
9
10
|
{ withOwners, showOwnerWarning } = { withOwners: false, showOwnerWarning: false }) {
|
|
10
|
-
|
|
11
|
+
heroku_cli_util_1.hux.styledHeader(pipeline.name);
|
|
11
12
|
let owner;
|
|
12
13
|
if (pipeline.owner) {
|
|
13
14
|
owner = await (0, ownership_1.getOwner)(heroku, pipelineApps, pipeline);
|
|
@@ -44,7 +45,7 @@ async function renderPipeline(heroku, pipeline, pipelineApps,
|
|
|
44
45
|
const stagingApps = (0, lodash_1.sortBy)(pipelineApps.filter(app => app.pipelineCoupling.stage === 'staging'), ['name']);
|
|
45
46
|
const productionApps = (0, lodash_1.sortBy)(pipelineApps.filter(app => app.pipelineCoupling.stage === 'production'), ['name']);
|
|
46
47
|
const apps = developmentApps.concat(reviewApps).concat(stagingApps).concat(productionApps);
|
|
47
|
-
|
|
48
|
+
heroku_cli_util_1.hux.table(apps, columns);
|
|
48
49
|
if (showOwnerWarning && pipeline.owner) {
|
|
49
50
|
(0, ownership_1.warnMixedOwnership)(pipelineApps, pipeline, owner);
|
|
50
51
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
4
4
|
async function getCISettings(yes, organization) {
|
|
5
5
|
const settings = {
|
|
6
6
|
ci: true,
|
|
@@ -10,7 +10,7 @@ async function getCISettings(yes, organization) {
|
|
|
10
10
|
delete settings.organization;
|
|
11
11
|
return settings;
|
|
12
12
|
}
|
|
13
|
-
settings.ci = await
|
|
13
|
+
settings.ci = await heroku_cli_util_1.hux.confirm('Enable automatic Heroku CI test runs?');
|
|
14
14
|
if (settings.ci && organization) {
|
|
15
15
|
settings.organization = organization;
|
|
16
16
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@oclif/core");
|
|
4
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
4
5
|
const validate_1 = require("./validate");
|
|
5
6
|
function filter(obj) {
|
|
6
7
|
const ret = {};
|
|
@@ -17,7 +18,7 @@ async function getNameAndRepo(args) {
|
|
|
17
18
|
repo: '',
|
|
18
19
|
};
|
|
19
20
|
if (!args.name) {
|
|
20
|
-
const name = await
|
|
21
|
+
const name = await heroku_cli_util_1.hux.prompt('Pipeline name', {
|
|
21
22
|
required: true,
|
|
22
23
|
});
|
|
23
24
|
const [valid, msg] = (0, validate_1.pipelineName)(name);
|
|
@@ -29,7 +30,7 @@ async function getNameAndRepo(args) {
|
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
if (!args.repo) {
|
|
32
|
-
const repo = await
|
|
33
|
+
const repo = await heroku_cli_util_1.hux.prompt('GitHub repository to connect to (e.g. rails/rails)', {
|
|
33
34
|
required: true,
|
|
34
35
|
});
|
|
35
36
|
const [valid, msg] = (0, validate_1.repoName)(repo);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
4
4
|
const DEFAULT_SETTINGS = {
|
|
5
5
|
auto_deploy: true,
|
|
6
6
|
wait_for_ci: true,
|
|
@@ -23,16 +23,16 @@ async function getSettings(yes, branch) {
|
|
|
23
23
|
auto_destroy: true,
|
|
24
24
|
},
|
|
25
25
|
};
|
|
26
|
-
settings.auto_deploy = await
|
|
26
|
+
settings.auto_deploy = await heroku_cli_util_1.hux.confirm(`Automatically deploy the ${branch} branch to staging?`);
|
|
27
27
|
if (settings.auto_deploy) {
|
|
28
|
-
settings.wait_for_ci = await
|
|
28
|
+
settings.wait_for_ci = await heroku_cli_util_1.hux.confirm(`Wait for CI to pass before deploying the ${branch} branch to staging?`);
|
|
29
29
|
}
|
|
30
|
-
settings.pull_requests.enabled = await
|
|
30
|
+
settings.pull_requests.enabled = await heroku_cli_util_1.hux.confirm('Enable review apps?');
|
|
31
31
|
if (settings.pull_requests.enabled) {
|
|
32
|
-
settings.pull_requests.auto_deploy = await
|
|
32
|
+
settings.pull_requests.auto_deploy = await heroku_cli_util_1.hux.confirm('Automatically create review apps for every PR?');
|
|
33
33
|
}
|
|
34
34
|
if (settings.pull_requests.enabled) {
|
|
35
|
-
settings.pull_requests.auto_destroy = await
|
|
35
|
+
settings.pull_requests.auto_destroy = await heroku_cli_util_1.hux.confirm('Automatically destroy idle review apps after 5 days?');
|
|
36
36
|
}
|
|
37
37
|
return settings;
|
|
38
38
|
}
|
package/lib/lib/redis/api.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
exports.default = (app, database, json, heroku) => {
|
|
6
7
|
const HOST = process.env.HEROKU_DATA_HOST || process.env.HEROKU_REDIS_HOST || 'api.data.heroku.com';
|
|
7
8
|
const ADDON = process.env.HEROKU_REDIS_ADDON_NAME || 'heroku-redis';
|
|
@@ -94,7 +95,7 @@ exports.default = (app, database, json, heroku) => {
|
|
|
94
95
|
const { formation, metaas_source, port } = json_data, filteredRedis = tslib_1.__rest(json_data, ["formation", "metaas_source", "port"]);
|
|
95
96
|
redii.push(filteredRedis);
|
|
96
97
|
}
|
|
97
|
-
|
|
98
|
+
heroku_cli_util_1.hux.styledJSON(redii);
|
|
98
99
|
return;
|
|
99
100
|
}
|
|
100
101
|
// print out the info of the addon and redis db info
|
|
@@ -108,8 +109,8 @@ exports.default = (app, database, json, heroku) => {
|
|
|
108
109
|
uxHeader += ` (${db.addon.config_vars.join(', ')})`;
|
|
109
110
|
}
|
|
110
111
|
if (uxHeader) {
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
heroku_cli_util_1.hux.styledHeader(uxHeader);
|
|
113
|
+
heroku_cli_util_1.hux.styledObject(
|
|
113
114
|
// eslint-disable-next-line unicorn/no-array-reduce
|
|
114
115
|
redis.info.reduce(function (memo, row) {
|
|
115
116
|
memo[row.name] = row.values;
|
package/lib/lib/spaces/hosts.js
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.displayHostsAsJSON = exports.displayHosts = void 0;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
const format_1 = require("./format");
|
|
6
7
|
function displayHosts(space, hosts) {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
heroku_cli_util_1.hux.styledHeader(`${space} Hosts`);
|
|
9
|
+
heroku_cli_util_1.hux.table(hosts, {
|
|
9
10
|
host_id: {
|
|
10
11
|
header: 'Host ID',
|
|
11
12
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.displayRulesAsJSON = exports.displayRules = exports.parsePorts = void 0;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
function parsePorts(protocol, port = '') {
|
|
6
7
|
if (port === '-1' || port === 'any') {
|
|
7
8
|
if (protocol === 'icmp') {
|
|
@@ -29,11 +30,11 @@ exports.parsePorts = parsePorts;
|
|
|
29
30
|
function displayRules(space, ruleset) {
|
|
30
31
|
const rules = ruleset.rules || [];
|
|
31
32
|
if (rules.length > 0) {
|
|
32
|
-
|
|
33
|
+
heroku_cli_util_1.hux.styledHeader('Outbound Rules');
|
|
33
34
|
display(ruleset.rules);
|
|
34
35
|
}
|
|
35
36
|
else {
|
|
36
|
-
|
|
37
|
+
heroku_cli_util_1.hux.styledHeader(`${space} has no Outbound Rules. Your Dynos cannot communicate with hosts outside of ${space}.`);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
exports.displayRules = displayRules;
|
|
@@ -42,7 +43,7 @@ function displayRulesAsJSON(ruleset) {
|
|
|
42
43
|
}
|
|
43
44
|
exports.displayRulesAsJSON = displayRulesAsJSON;
|
|
44
45
|
function display(rules) {
|
|
45
|
-
|
|
46
|
+
heroku_cli_util_1.hux.table(lined(rules), {
|
|
46
47
|
line: {
|
|
47
48
|
header: 'Rule Number',
|
|
48
49
|
},
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.displayPeerings = exports.displayPeeringsAsJSON = exports.displayPeeringInfo = void 0;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
const format_1 = require("./format");
|
|
6
7
|
function displayPeeringInfo(space, info) {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
heroku_cli_util_1.hux.styledHeader(`${space} Peering Info`);
|
|
9
|
+
heroku_cli_util_1.hux.styledObject({
|
|
9
10
|
'AWS Account ID': info.aws_account_id,
|
|
10
11
|
'AWS Region': info.aws_region,
|
|
11
12
|
'AWS VPC ID': info.vpc_id,
|
|
@@ -20,8 +21,8 @@ function displayPeeringsAsJSON(peerings) {
|
|
|
20
21
|
}
|
|
21
22
|
exports.displayPeeringsAsJSON = displayPeeringsAsJSON;
|
|
22
23
|
function displayPeerings(space, peerings) {
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
heroku_cli_util_1.hux.styledHeader(`${space} Peerings`);
|
|
25
|
+
heroku_cli_util_1.hux.table(peerings, {
|
|
25
26
|
pcx_id: {
|
|
26
27
|
header: 'PCX ID',
|
|
27
28
|
},
|
package/lib/lib/spaces/spaces.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.renderInfo = exports.displayNat = exports.displayShieldState = void 0;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
const generation_1 = require("../apps/generation");
|
|
6
7
|
function displayShieldState(space) {
|
|
7
8
|
return space.shield ? 'on' : 'off';
|
|
@@ -21,8 +22,8 @@ function renderInfo(space, json) {
|
|
|
21
22
|
core_1.ux.log(JSON.stringify(space, null, 2));
|
|
22
23
|
}
|
|
23
24
|
else {
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
heroku_cli_util_1.hux.styledHeader(space.name || '');
|
|
26
|
+
heroku_cli_util_1.hux.styledObject({
|
|
26
27
|
ID: space.id,
|
|
27
28
|
Team: (_a = space.team) === null || _a === void 0 ? void 0 : _a.name,
|
|
28
29
|
Region: (_b = space.region) === null || _b === void 0 ? void 0 : _b.description,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.displayVPNConfigInfo = void 0;
|
|
4
|
-
const
|
|
4
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
5
|
function displayVPNConfigInfo(space, name, config) {
|
|
6
|
-
|
|
6
|
+
heroku_cli_util_1.hux.styledHeader(`${name} VPN Tunnels`);
|
|
7
7
|
const configTunnels = config.tunnels || [];
|
|
8
8
|
configTunnels.forEach((val, i) => {
|
|
9
9
|
val.tunnel_id = 'Tunnel ' + (i + 1);
|
|
10
10
|
val.routable_cidr = config.space_cidr_block;
|
|
11
11
|
val.ike_version = config.ike_version;
|
|
12
12
|
});
|
|
13
|
-
|
|
13
|
+
heroku_cli_util_1.hux.table(configTunnels, {
|
|
14
14
|
tunnel_id: { header: 'VPN Tunnel' },
|
|
15
15
|
customer_ip: { header: 'Customer Gateway' },
|
|
16
16
|
ip: { header: 'VPN Gateway' },
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.displayTelemetryDrain = exports.validateAndFormatSignals = void 0;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
|
+
const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
|
|
5
6
|
function validateAndFormatSignals(signalInput) {
|
|
6
7
|
const signalOptions = ['traces', 'metrics', 'logs'];
|
|
7
8
|
if (!signalInput || signalInput === 'all')
|
|
@@ -16,7 +17,7 @@ function validateAndFormatSignals(signalInput) {
|
|
|
16
17
|
}
|
|
17
18
|
exports.validateAndFormatSignals = validateAndFormatSignals;
|
|
18
19
|
async function displayTelemetryDrain(telemetryDrain, heroku) {
|
|
19
|
-
|
|
20
|
+
heroku_cli_util_1.hux.styledHeader(telemetryDrain.id);
|
|
20
21
|
const displayObject = {
|
|
21
22
|
Signals: telemetryDrain.signals.join(', '),
|
|
22
23
|
Endpoint: telemetryDrain.exporter.endpoint,
|
|
@@ -41,6 +42,6 @@ async function displayTelemetryDrain(telemetryDrain, heroku) {
|
|
|
41
42
|
if (telemetryDrain.exporter.headers) {
|
|
42
43
|
displayObject.Headers = JSON.stringify(telemetryDrain.exporter.headers);
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
+
heroku_cli_util_1.hux.styledObject(displayObject, ['App', 'Space', 'Signals', 'Endpoint', 'Transport', 'Headers']);
|
|
45
46
|
}
|
|
46
47
|
exports.displayTelemetryDrain = displayTelemetryDrain;
|
package/oclif.manifest.json
CHANGED
|
@@ -14652,5 +14652,5 @@
|
|
|
14652
14652
|
]
|
|
14653
14653
|
}
|
|
14654
14654
|
},
|
|
14655
|
-
"version": "10.7.
|
|
14655
|
+
"version": "10.7.1-alpha.1"
|
|
14656
14656
|
}
|