1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const command_1 = require("@heroku-cli/command");
|
4 | const cli_ux_1 = require("cli-ux");
|
5 | const buildpacks_1 = require("../../buildpacks");
|
6 | class Index extends command_1.Command {
|
7 | async run() {
|
8 | let { flags } = this.parse(Index);
|
9 | let buildpacksCommand = new buildpacks_1.BuildpackCommand(this.heroku);
|
10 | let buildpacks = await buildpacksCommand.fetch(flags.app);
|
11 | if (buildpacks.length === 0) {
|
12 | this.log(`${flags.app} has no Buildpack URL set.`);
|
13 | }
|
14 | else {
|
15 | cli_ux_1.cli.styledHeader(`${flags.app} Buildpack URL${buildpacks.length > 1 ? 's' : ''}`);
|
16 | buildpacksCommand.display(buildpacks, '');
|
17 | }
|
18 | }
|
19 | }
|
20 | Index.description = 'display the buildpacks for an app';
|
21 | Index.flags = {
|
22 | app: command_1.flags.app({ required: true }),
|
23 | remote: command_1.flags.remote()
|
24 | };
|
25 | exports.default = Index;
|