heroku 8.4.4-beta.4 → 9.0.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.
Files changed (44) hide show
  1. package/bin/run +0 -2
  2. package/lib/commands/ci/config/get.d.ts +16 -0
  3. package/lib/commands/ci/config/get.js +37 -0
  4. package/lib/commands/ci/config/set.d.ts +12 -0
  5. package/lib/commands/ci/config/set.js +52 -0
  6. package/lib/commands/ci/debug.d.ts +13 -0
  7. package/lib/commands/ci/debug.js +105 -0
  8. package/lib/commands/ci/index.js +1 -1
  9. package/lib/commands/ci/info.js +1 -1
  10. package/lib/commands/ci/last.js +1 -1
  11. package/lib/commands/ci/open.d.ts +12 -0
  12. package/lib/commands/ci/open.js +23 -0
  13. package/lib/commands/ci/rerun.js +1 -1
  14. package/lib/commands/ci/run.js +1 -1
  15. package/lib/commands/domains/index.d.ts +1 -1
  16. package/lib/commands/pipelines/add.js +1 -1
  17. package/lib/commands/pipelines/connect.js +1 -1
  18. package/lib/commands/pipelines/create.js +1 -1
  19. package/lib/commands/pipelines/destroy.js +1 -1
  20. package/lib/commands/pipelines/diff.js +1 -1
  21. package/lib/commands/pipelines/info.js +1 -1
  22. package/lib/commands/pipelines/promote.js +1 -1
  23. package/lib/commands/pipelines/remove.js +1 -1
  24. package/lib/commands/pipelines/rename.js +1 -1
  25. package/lib/commands/pipelines/setup.js +1 -1
  26. package/lib/commands/pipelines/transfer.js +1 -1
  27. package/lib/commands/pipelines/update.js +1 -1
  28. package/lib/global_telemetry.d.ts +0 -1
  29. package/lib/global_telemetry.js +0 -1
  30. package/lib/lib/{pipelines/api.d.ts → api.d.ts} +10 -5
  31. package/lib/lib/{pipelines/api.js → api.js} +48 -4
  32. package/lib/lib/ci/pipelines.d.ts +3 -3
  33. package/lib/lib/ci/pipelines.js +10 -9
  34. package/lib/lib/ci/test-run.d.ts +1 -0
  35. package/lib/lib/ci/test-run.js +2 -1
  36. package/lib/lib/git/git.d.ts +8 -0
  37. package/lib/lib/git/git.js +19 -0
  38. package/lib/lib/pipelines/disambiguate.js +1 -1
  39. package/lib/lib/pipelines/ownership.js +1 -1
  40. package/lib/lib/pipelines/setup/create-apps.d.ts +2 -1
  41. package/lib/lib/pipelines/setup/create-apps.js +1 -1
  42. package/lib/lib/pipelines/setup/poll-app-setups.js +1 -1
  43. package/oclif.manifest.json +162 -1
  44. package/package.json +11 -12
package/bin/run CHANGED
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- require('dotenv').config()
4
-
5
3
  process.env.HEROKU_UPDATE_INSTRUCTIONS = process.env.HEROKU_UPDATE_INSTRUCTIONS || 'update with: "npm update -g heroku"'
6
4
 
7
5
  const now = new Date()
@@ -0,0 +1,16 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class CiConfigGet extends Command {
3
+ static description: string;
4
+ static topic: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
8
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
+ pipeline: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ shell: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
+ };
12
+ static args: {
13
+ key: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
14
+ };
15
+ run(): Promise<void>;
16
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@heroku-cli/command");
4
+ const core_1 = require("@oclif/core");
5
+ const shellescape = require("shell-escape");
6
+ const api_1 = require("../../../lib/api");
7
+ const pipelines_1 = require("../../../lib/ci/pipelines");
8
+ class CiConfigGet extends command_1.Command {
9
+ async run() {
10
+ const { args, flags } = await this.parse(CiConfigGet);
11
+ const pipeline = await (0, pipelines_1.getPipeline)(flags, this.heroku);
12
+ const { body: config } = await (0, api_1.getPipelineConfigVars)(this.heroku, pipeline.id);
13
+ const value = config[args.key];
14
+ if (flags.shell) {
15
+ core_1.ux.log(`${args.key}=${shellescape([value])}`);
16
+ }
17
+ else {
18
+ core_1.ux.log((value !== null && value !== undefined) ? value : 'undefined');
19
+ }
20
+ }
21
+ }
22
+ exports.default = CiConfigGet;
23
+ CiConfigGet.description = 'get a CI config var';
24
+ CiConfigGet.topic = 'ci';
25
+ CiConfigGet.examples = [
26
+ `$ heroku ci:config:get --pipeline=PIPELINE RAILS_ENV
27
+ test`,
28
+ ];
29
+ CiConfigGet.flags = {
30
+ help: command_1.flags.help({ char: 'h' }),
31
+ app: command_1.flags.app({ required: false }),
32
+ pipeline: command_1.flags.pipeline({ required: false }),
33
+ shell: command_1.flags.boolean({ char: 's', description: 'output config var in shell format' }),
34
+ };
35
+ CiConfigGet.args = {
36
+ key: core_1.Args.string({ required: true }),
37
+ };
@@ -0,0 +1,12 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class CiConfigSet extends Command {
3
+ static description: string;
4
+ static topic: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ app: import("@oclif/core/lib/interfaces/parser").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
+ pipeline: import("@oclif/core/lib/interfaces/parser").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
+ };
10
+ static strict: boolean;
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const pipelines_1 = require("../../../lib/ci/pipelines");
5
+ const command_1 = require("@heroku-cli/command");
6
+ const api_1 = require("../../../lib/api");
7
+ const color_1 = require("@heroku-cli/color");
8
+ function validateInput(str) {
9
+ if (!str.includes('=')) {
10
+ core_1.ux.error(`${color_1.default.cyan(str)} is invalid. Must be in the format ${color_1.default.cyan('FOO=bar')}.`, { exit: 1 });
11
+ }
12
+ return true;
13
+ }
14
+ function validateArgs(argv) {
15
+ if (argv.length === 0) {
16
+ core_1.ux.error('Usage: heroku ci:config:set KEY1=VALUE1 [KEY2=VALUE2 ...]\nMust specify KEY and VALUE to set.', { exit: 1 });
17
+ }
18
+ }
19
+ class CiConfigSet extends command_1.Command {
20
+ async run() {
21
+ const { argv, flags } = await this.parse(CiConfigSet);
22
+ validateArgs(argv);
23
+ const vars = {};
24
+ for (const str of argv) {
25
+ const iAmStr = str;
26
+ validateInput(iAmStr);
27
+ const [key, value] = iAmStr.split('=');
28
+ vars[key] = value;
29
+ }
30
+ const pipeline = await (0, pipelines_1.getPipeline)(flags, this.heroku);
31
+ core_1.ux.action.start(`Setting ${Object.keys(vars).join(', ')}`);
32
+ await (0, api_1.setPipelineConfigVars)(this.heroku, pipeline.id, vars);
33
+ core_1.ux.action.stop();
34
+ core_1.ux.styledObject(Object.keys(vars).reduce((memo, key) => {
35
+ memo[color_1.default.green(key)] = vars[key];
36
+ return memo;
37
+ }, {}));
38
+ }
39
+ }
40
+ exports.default = CiConfigSet;
41
+ CiConfigSet.description = 'set CI config vars';
42
+ CiConfigSet.topic = 'ci';
43
+ CiConfigSet.examples = [
44
+ `$ heroku ci:config:set --pipeline PIPELINE RAILS_ENV=test
45
+ Setting test config vars... done
46
+ RAILS_ENV: test`,
47
+ ];
48
+ CiConfigSet.flags = {
49
+ app: command_1.flags.app(),
50
+ pipeline: command_1.flags.pipeline({ required: true }),
51
+ };
52
+ CiConfigSet.strict = false;
@@ -0,0 +1,13 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class Debug extends Command {
3
+ static description: string;
4
+ static help: string;
5
+ static flags: {
6
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
+ 'no-cache': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
8
+ 'no-setup': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
9
+ pipeline: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ };
11
+ static topic: string;
12
+ run(): Promise<void>;
13
+ }
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const core_1 = require("@oclif/core");
4
+ const command_1 = require("@heroku-cli/command");
5
+ const lodash_1 = require("lodash");
6
+ const api_1 = require("../../lib/api");
7
+ const pipelines_1 = require("../../lib/ci/pipelines");
8
+ const kolkrabbi_api_1 = require("../../lib/pipelines/kolkrabbi-api");
9
+ const dyno_1 = require("../../lib/run/dyno");
10
+ const git_1 = require("../../lib/git/git");
11
+ const source_1 = require("../../lib/ci/source");
12
+ const test_run_1 = require("../../lib/ci/test-run");
13
+ // Default command. Run setup, source profile.d scripts and open a bash session
14
+ const SETUP_COMMAND = 'ci setup && eval $(ci env)';
15
+ class Debug extends command_1.Command {
16
+ async run() {
17
+ var _a, _b;
18
+ const { flags } = await this.parse(Debug);
19
+ const pipeline = await (0, pipelines_1.getPipeline)(flags, this.heroku);
20
+ const kolkrabbi = new kolkrabbi_api_1.default(this.config.userAgent, () => this.heroku.auth);
21
+ const pipelineRepository = await kolkrabbi.getPipelineRepository(pipeline.id);
22
+ const organization = pipelineRepository.organization &&
23
+ pipelineRepository.organization.name;
24
+ const git = new git_1.default();
25
+ const commit = await git.readCommit('HEAD');
26
+ core_1.ux.action.start('Preparing source');
27
+ const sourceBlobUrl = await (0, source_1.createSourceBlob)(commit.ref, this);
28
+ core_1.ux.action.stop();
29
+ // Create test run and wait for it to transition to `debugging`
30
+ core_1.ux.action.start('Creating test run');
31
+ const { body: run } = await (0, api_1.createTestRun)(this.heroku, {
32
+ commit_branch: commit.branch,
33
+ commit_message: commit.message,
34
+ commit_sha: commit.ref,
35
+ debug: true,
36
+ clear_cache: Boolean(flags['no-cache']),
37
+ organization,
38
+ pipeline: pipeline.id,
39
+ source_blob_url: sourceBlobUrl,
40
+ });
41
+ const testRun = await (0, test_run_1.waitForStates)(['debugging', 'errored'], run, this);
42
+ core_1.ux.action.stop();
43
+ if (testRun.status === 'errored') {
44
+ core_1.ux.error(`Test run creation failed while ${testRun.error_state} with message "${testRun.message}"`, { exit: 1 });
45
+ }
46
+ const { body: appSetup } = await (0, api_1.getAppSetup)(this.heroku, (_a = testRun.app_setup) === null || _a === void 0 ? void 0 : _a.id);
47
+ const noSetup = flags['no-setup'];
48
+ core_1.ux.log(`${noSetup ? 'Attaching' : 'Running setup and attaching'} to test dyno...`);
49
+ if (noSetup) {
50
+ core_1.ux.warn('Skipping test setup phase.');
51
+ core_1.ux.warn(`Run \`${SETUP_COMMAND}\``);
52
+ core_1.ux.warn('to execute a build and configure the environment');
53
+ }
54
+ const { body: testNodes } = await (0, api_1.getTestNodes)(this.heroku, testRun.id);
55
+ const dyno = new dyno_1.default({
56
+ heroku: this.heroku,
57
+ app: ((_b = appSetup === null || appSetup === void 0 ? void 0 : appSetup.app) === null || _b === void 0 ? void 0 : _b.id) || '',
58
+ showStatus: false,
59
+ command: '', // command is required, but is not used.
60
+ });
61
+ dyno.dyno = { attach_url: (0, lodash_1.get)(testNodes, [0, 'dyno', 'attach_url']) };
62
+ function sendSetup(data) {
63
+ if (data.toString().includes('$')) {
64
+ dyno.write(SETUP_COMMAND + '\n');
65
+ dyno.removeListener('data', sendSetup);
66
+ }
67
+ }
68
+ if (!noSetup) {
69
+ dyno.on('data', sendSetup);
70
+ }
71
+ try {
72
+ await dyno.attach();
73
+ }
74
+ catch (error) {
75
+ if (error.exitCode)
76
+ this.error(error, { exit: error.exitCode });
77
+ else
78
+ throw error;
79
+ }
80
+ await core_1.ux.action.start('Cleaning up');
81
+ await (0, api_1.updateTestRun)(this.heroku, testRun.id, {
82
+ status: 'cancelled',
83
+ message: 'debug run cancelled by Heroku CLI',
84
+ });
85
+ await core_1.ux.action.stop();
86
+ }
87
+ }
88
+ exports.default = Debug;
89
+ Debug.description = 'opens an interactive test debugging session with the contents of the current directory';
90
+ Debug.help = `Example:
91
+
92
+ $ heroku ci:debug --pipeline PIPELINE
93
+ Preparing source... done
94
+ Creating test run... done
95
+ Running setup and attaching to test dyno...
96
+
97
+ ~ $
98
+ `;
99
+ Debug.flags = {
100
+ app: command_1.flags.app(),
101
+ 'no-cache': command_1.flags.boolean({ description: 'start test run with an empty cache' }),
102
+ 'no-setup': command_1.flags.boolean({ description: 'start test dyno without running test-setup' }),
103
+ pipeline: command_1.flags.pipeline(),
104
+ };
105
+ Debug.topic = 'ci';
@@ -6,7 +6,7 @@ const test_run_1 = require("../../lib/ci/test-run");
6
6
  class CiIndex extends command_1.Command {
7
7
  async run() {
8
8
  const { flags } = await this.parse(CiIndex);
9
- const pipeline = await (0, pipelines_1.getPipeline)(flags, this);
9
+ const pipeline = await (0, pipelines_1.getPipeline)(flags, this.heroku);
10
10
  const { body: testRuns } = await this.heroku.get(`/pipelines/${pipeline.id}/test-runs`);
11
11
  await (0, test_run_1.renderList)(this, testRuns, pipeline, flags.watch, flags.json);
12
12
  }
@@ -7,7 +7,7 @@ const test_run_1 = require("../../lib/ci/test-run");
7
7
  class CiInfo extends command_1.Command {
8
8
  async run() {
9
9
  const { args, flags } = await this.parse(CiInfo);
10
- const pipeline = await (0, pipelines_1.getPipeline)(flags, this);
10
+ const pipeline = await (0, pipelines_1.getPipeline)(flags, this.heroku);
11
11
  const { body: testRun } = await this.heroku.get(`/pipelines/${pipeline.id}/test-runs/${args['test-run']}`);
12
12
  const { body: testNodes } = await this.heroku.get(`/test-runs/${testRun.id}/test-nodes`);
13
13
  await (0, test_run_1.displayTestRunInfo)(this, testRun, testNodes, flags.node);
@@ -7,7 +7,7 @@ const test_run_1 = require("../../lib/ci/test-run");
7
7
  class CiLast extends command_1.Command {
8
8
  async run() {
9
9
  const { flags } = await this.parse(CiLast);
10
- const pipeline = await (0, pipelines_1.getPipeline)(flags, this);
10
+ const pipeline = await (0, pipelines_1.getPipeline)(flags, this.heroku);
11
11
  const headers = { Range: 'number ..; order=desc,max=1' };
12
12
  const { body: latestTestRuns } = await this.heroku.get(`/pipelines/${pipeline.id}/test-runs`, { headers });
13
13
  if (latestTestRuns.length === 0) {
@@ -0,0 +1,12 @@
1
+ import { Command } from '@heroku-cli/command';
2
+ export default class CiOpen extends Command {
3
+ static description: string;
4
+ static topic: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
8
+ app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
+ pipeline: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ };
11
+ run(): Promise<void>;
12
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const command_1 = require("@heroku-cli/command");
4
+ const open = require("open");
5
+ const pipelines_1 = require("../../lib/ci/pipelines");
6
+ class CiOpen extends command_1.Command {
7
+ async run() {
8
+ const { flags } = await this.parse(CiOpen);
9
+ const pipeline = await (0, pipelines_1.getPipeline)(flags, this.heroku);
10
+ await open(`https://dashboard.heroku.com/pipelines/${pipeline.id}/tests`);
11
+ }
12
+ }
13
+ exports.default = CiOpen;
14
+ CiOpen.description = 'open the Dashboard version of Heroku CI';
15
+ CiOpen.topic = 'ci';
16
+ CiOpen.examples = [
17
+ '$ heroku ci:open --app murmuring-headland-14719',
18
+ ];
19
+ CiOpen.flags = {
20
+ help: command_1.flags.help({ char: 'h' }),
21
+ app: command_1.flags.app({ required: true }),
22
+ pipeline: command_1.flags.pipeline({ required: false }),
23
+ };
@@ -8,7 +8,7 @@ const test_run_1 = require("../../lib/ci/test-run");
8
8
  class CiReRun extends command_1.Command {
9
9
  async run() {
10
10
  const { flags, args } = await this.parse(CiReRun);
11
- const pipeline = await (0, pipelines_1.getPipeline)(flags, this);
11
+ const pipeline = await (0, pipelines_1.getPipeline)(flags, this.heroku);
12
12
  let sourceTestRun;
13
13
  if (args.number) {
14
14
  const testRunResponse = await this.heroku.get(`/pipelines/${pipeline.id}/test-runs/${args.number}`);
@@ -9,7 +9,7 @@ const test_run_1 = require("../../lib/ci/test-run");
9
9
  class CiRun extends command_1.Command {
10
10
  async run() {
11
11
  const { flags } = await this.parse(CiRun);
12
- const pipeline = await (0, pipelines_1.getPipeline)(flags, this);
12
+ const pipeline = await (0, pipelines_1.getPipeline)(flags, this.heroku);
13
13
  const commit = await git.readCommit('HEAD');
14
14
  core_1.ux.action.start('Preparing source');
15
15
  const sourceBlobUrl = await (0, source_1.createSourceBlob)(commit.ref, this);
@@ -7,8 +7,8 @@ export default class DomainsIndex extends Command {
7
7
  extended: import("@oclif/core/lib/interfaces").Flag<boolean>;
8
8
  'no-header': import("@oclif/core/lib/interfaces").Flag<boolean>;
9
9
  sort: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
- columns: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
10
  filter: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
+ columns: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
12
  csv: import("@oclif/core/lib/interfaces").Flag<boolean>;
13
13
  output: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
14
14
  help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
@@ -5,7 +5,7 @@ const command_1 = require("@heroku-cli/command");
5
5
  const completions_1 = require("@heroku-cli/command/lib/completions");
6
6
  const core_1 = require("@oclif/core");
7
7
  const inquirer_1 = require("inquirer");
8
- const api_1 = require("../../lib/pipelines/api");
8
+ const api_1 = require("../../lib/api");
9
9
  const disambiguate_1 = require("../../lib/pipelines/disambiguate");
10
10
  const infer_1 = require("../../lib/pipelines/infer");
11
11
  const stages_1 = require("../../lib/pipelines/stages");
@@ -2,7 +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 api_1 = require("../../lib/pipelines/api");
5
+ const api_1 = require("../../lib/api");
6
6
  const github_api_1 = require("../../lib/pipelines/github-api");
7
7
  const kolkrabbi_api_1 = require("../../lib/pipelines/kolkrabbi-api");
8
8
  const get_github_token_1 = require("../../lib/pipelines/setup/get-github-token");
@@ -5,7 +5,7 @@ const command_1 = require("@heroku-cli/command");
5
5
  const completions_1 = require("@heroku-cli/command/lib/completions");
6
6
  const core_1 = require("@oclif/core");
7
7
  const inquirer_1 = require("inquirer");
8
- const api_1 = require("../../lib/pipelines/api");
8
+ const api_1 = require("../../lib/api");
9
9
  const infer_1 = require("../../lib/pipelines/infer");
10
10
  const stages_1 = require("../../lib/pipelines/stages");
11
11
  class Create extends command_1.Command {
@@ -3,7 +3,7 @@ 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
5
  const core_1 = require("@oclif/core");
6
- const api_1 = require("../../lib/pipelines/api");
6
+ const api_1 = require("../../lib/api");
7
7
  const disambiguate_1 = require("../../lib/pipelines/disambiguate");
8
8
  class PipelinesDestroy extends command_1.Command {
9
9
  async run() {
@@ -4,7 +4,7 @@ const color_1 = require("@heroku-cli/color");
4
4
  const command_1 = require("@heroku-cli/command");
5
5
  const core_1 = require("@oclif/core");
6
6
  const http_call_1 = require("http-call");
7
- const api_1 = require("../../lib/pipelines/api");
7
+ const api_1 = require("../../lib/api");
8
8
  const kolkrabbi_api_1 = require("../../lib/pipelines/kolkrabbi-api");
9
9
  const PROMOTION_ORDER = ['development', 'staging', 'production'];
10
10
  async function diff(targetApp, downstreamApp, githubToken, herokuUserAgent) {
@@ -2,7 +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 api_1 = require("../../lib/pipelines/api");
5
+ const api_1 = require("../../lib/api");
6
6
  const disambiguate_1 = require("../../lib/pipelines/disambiguate");
7
7
  const render_pipeline_1 = require("../../lib/pipelines/render-pipeline");
8
8
  class PipelinesInfo extends command_1.Command {
@@ -8,7 +8,7 @@ const assert = require("assert");
8
8
  const node_fetch_1 = require("node-fetch");
9
9
  const Stream = require("stream");
10
10
  const util = require("util");
11
- const api_1 = require("../../lib/pipelines/api");
11
+ const api_1 = require("../../lib/api");
12
12
  const key_by_1 = require("../../lib/pipelines/key-by");
13
13
  const sleep = (time) => {
14
14
  return new Promise(resolve => setTimeout(resolve, time));
@@ -3,7 +3,7 @@ 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
5
  const core_1 = require("@oclif/core");
6
- const api_1 = require("../../lib/pipelines/api");
6
+ const api_1 = require("../../lib/api");
7
7
  class PipelinesRemove extends command_1.Command {
8
8
  async run() {
9
9
  const { flags: { app } } = await this.parse(PipelinesRemove);
@@ -3,7 +3,7 @@ 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
5
  const core_1 = require("@oclif/core");
6
- const api_1 = require("../../lib/pipelines/api");
6
+ const api_1 = require("../../lib/api");
7
7
  const disambiguate_1 = require("../../lib/pipelines/disambiguate");
8
8
  class PipelinesRename extends command_1.Command {
9
9
  async run() {
@@ -5,7 +5,7 @@ const command_1 = require("@heroku-cli/command");
5
5
  const core_1 = require("@oclif/core");
6
6
  const open = require("open");
7
7
  const debug_1 = require("debug");
8
- const api_1 = require("../../lib/pipelines/api");
8
+ const api_1 = require("../../lib/api");
9
9
  const github_api_1 = require("../../lib/pipelines/github-api");
10
10
  const kolkrabbi_api_1 = require("../../lib/pipelines/kolkrabbi-api");
11
11
  const create_apps_1 = require("../../lib/pipelines/setup/create-apps");
@@ -3,7 +3,7 @@ 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
5
  const core_1 = require("@oclif/core");
6
- const api_1 = require("../../lib/pipelines/api");
6
+ const api_1 = require("../../lib/api");
7
7
  const disambiguate_1 = require("../../lib/pipelines/disambiguate");
8
8
  const render_pipeline_1 = require("../../lib/pipelines/render-pipeline");
9
9
  async function getTeamOwner(heroku, name) {
@@ -4,7 +4,7 @@ const color_1 = require("@heroku-cli/color");
4
4
  const command_1 = require("@heroku-cli/command");
5
5
  const completions_1 = require("@heroku-cli/command/lib/completions");
6
6
  const core_1 = require("@oclif/core");
7
- const api_1 = require("../../lib/pipelines/api");
7
+ const api_1 = require("../../lib/api");
8
8
  class PipelinesUpdate extends command_1.Command {
9
9
  async run() {
10
10
  const { flags } = await this.parse(PipelinesUpdate);
@@ -1,4 +1,3 @@
1
- import 'dotenv/config';
2
1
  export declare const processor: any;
3
2
  interface Telemetry {
4
3
  command: string;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sendToRollbar = exports.sendToHoneycomb = exports.sendTelemetry = exports.reportCmdNotFound = exports.computeDuration = exports.setupTelemetry = exports.initializeInstrumentation = exports.processor = void 0;
4
- require("dotenv/config");
5
4
  const Rollbar = require("rollbar");
6
5
  const command_1 = require("@heroku-cli/command");
7
6
  const core_1 = require("@oclif/core");
@@ -5,10 +5,10 @@ export declare const FILTERS_HEADER: string;
5
5
  export declare const PIPELINES_HEADER: string;
6
6
  export declare function createAppSetup(heroku: APIClient, body: {
7
7
  body: any;
8
- }): Promise<import("http-call").HTTP<unknown>>;
8
+ }): Promise<import("http-call").HTTP<Heroku.AppSetup>>;
9
9
  export declare function postCoupling(heroku: APIClient, pipeline: any, app: any, stage: string): Promise<import("http-call").HTTP<unknown>>;
10
10
  export declare function createCoupling(heroku: APIClient, pipeline: any, app: string, stage: string): Promise<import("http-call").HTTP<unknown>>;
11
- export declare function createPipeline(heroku: APIClient, name: any, owner: any): Promise<import("http-call").HTTP<unknown>>;
11
+ export declare function createPipeline(heroku: APIClient, name: any, owner: any): Promise<import("http-call").HTTP<Heroku.Pipeline>>;
12
12
  export declare function createPipelineTransfer(heroku: APIClient, pipeline: Heroku.Pipeline): Promise<import("http-call").HTTP<unknown>>;
13
13
  export declare function destroyPipeline(heroku: APIClient, name: any, pipelineId: any): Promise<import("http-call").HTTP<unknown>>;
14
14
  export declare function findPipelineByName(heroku: APIClient, idOrName: string): Promise<import("http-call").HTTP<Heroku.Pipeline[]>>;
@@ -17,9 +17,14 @@ export declare function getPipeline(heroku: APIClient, id: string): Promise<impo
17
17
  export declare function updatePipeline(heroku: APIClient, id: string, body: Heroku.Pipeline): Promise<import("http-call").HTTP<Heroku.Pipeline>>;
18
18
  export declare function getTeam(heroku: APIClient, teamId: any): Promise<import("http-call").HTTP<Heroku.Team>>;
19
19
  export declare function getAccountInfo(heroku: APIClient, id?: string): Promise<import("http-call").HTTP<Heroku.Account>>;
20
- export declare function getAppSetup(heroku: APIClient, buildId: any): Promise<import("http-call").HTTP<unknown>>;
20
+ export declare function getAppSetup(heroku: APIClient, buildId: any): Promise<import("http-call").HTTP<Heroku.AppSetup>>;
21
21
  export declare function listPipelineApps(heroku: APIClient, pipelineId: string): Promise<Array<Heroku.App>>;
22
- export declare function patchCoupling(heroku: APIClient, id: string, stage: string): Promise<import("http-call").HTTP<unknown>>;
22
+ export declare function patchCoupling(heroku: APIClient, id: string, stage: string): Promise<import("http-call").HTTP<Heroku.PipelineCoupling>>;
23
23
  export declare function removeCoupling(heroku: APIClient, app: string): Promise<import("http-call").HTTP<unknown>>;
24
- export declare function updateCoupling(heroku: APIClient, app: string, stage: string): Promise<import("http-call").HTTP<unknown>>;
24
+ export declare function updateCoupling(heroku: APIClient, app: string, stage: string): Promise<import("http-call").HTTP<Heroku.PipelineCoupling>>;
25
25
  export declare function getReleases(heroku: APIClient, appId: string): Promise<import("http-call").HTTP<Heroku.Release[]>>;
26
+ export declare function getPipelineConfigVars(heroku: APIClient, pipelineID: string): Promise<import("http-call").HTTP<Heroku.ConfigVars>>;
27
+ export declare function setPipelineConfigVars(heroku: APIClient, pipelineID: string, body: Heroku.ConfigVars): Promise<import("http-call").HTTP<Heroku.ConfigVars>>;
28
+ export declare function createTestRun(heroku: APIClient, body: Heroku.TestRun): Promise<import("http-call").HTTP<Heroku.TestRun>>;
29
+ export declare function getTestNodes(heroku: APIClient, testRunIdD: string): Promise<import("http-call").HTTP<Heroku.TestRun>>;
30
+ export declare function updateTestRun(heroku: APIClient, id: string, body: Heroku.TestRun): Promise<import("http-call").HTTP<Heroku.TestRun>>;
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getReleases = exports.updateCoupling = exports.removeCoupling = exports.patchCoupling = exports.listPipelineApps = exports.getAppSetup = exports.getAccountInfo = exports.getTeam = exports.updatePipeline = exports.getPipeline = exports.getCoupling = exports.findPipelineByName = exports.destroyPipeline = exports.createPipelineTransfer = exports.createPipeline = exports.createCoupling = exports.postCoupling = exports.createAppSetup = exports.PIPELINES_HEADER = exports.FILTERS_HEADER = exports.V3_HEADER = void 0;
3
+ exports.updateTestRun = exports.getTestNodes = exports.createTestRun = exports.setPipelineConfigVars = exports.getPipelineConfigVars = exports.getReleases = exports.updateCoupling = exports.removeCoupling = exports.patchCoupling = exports.listPipelineApps = exports.getAppSetup = exports.getAccountInfo = exports.getTeam = exports.updatePipeline = exports.getPipeline = exports.getCoupling = exports.findPipelineByName = exports.destroyPipeline = exports.createPipelineTransfer = exports.createPipeline = exports.createCoupling = exports.postCoupling = exports.createAppSetup = exports.PIPELINES_HEADER = exports.FILTERS_HEADER = exports.V3_HEADER = void 0;
4
4
  const lodash_1 = require("lodash");
5
5
  exports.V3_HEADER = 'application/vnd.heroku+json; version=3';
6
6
  exports.FILTERS_HEADER = `${exports.V3_HEADER}.filters`;
7
7
  exports.PIPELINES_HEADER = `${exports.V3_HEADER}.pipelines`;
8
+ const CI_HEADER = `${exports.V3_HEADER}.ci`;
8
9
  function createAppSetup(heroku, body) {
9
10
  return heroku.post('/app-setups', { body });
10
11
  }
@@ -68,9 +69,6 @@ function updatePipeline(heroku, id, body) {
68
69
  });
69
70
  }
70
71
  exports.updatePipeline = updatePipeline;
71
- // function getApp(heroku: APIClient, app) {
72
- // return heroku.get(`/apps/${app}`)
73
- // }
74
72
  function getTeam(heroku, teamId) {
75
73
  return heroku.get(`/teams/${teamId}`);
76
74
  }
@@ -128,3 +126,49 @@ function getReleases(heroku, appId) {
128
126
  });
129
127
  }
130
128
  exports.getReleases = getReleases;
129
+ function getPipelineConfigVars(heroku, pipelineID) {
130
+ return heroku.request(`/pipelines/${pipelineID}/stage/test/config-vars`, {
131
+ method: 'GET',
132
+ headers: { Accept: exports.PIPELINES_HEADER },
133
+ });
134
+ }
135
+ exports.getPipelineConfigVars = getPipelineConfigVars;
136
+ function setPipelineConfigVars(heroku, pipelineID, body) {
137
+ return heroku.request(`/pipelines/${pipelineID}/stage/test/config-vars`, {
138
+ method: 'PATCH',
139
+ headers: { Accept: exports.PIPELINES_HEADER },
140
+ path: `/pipelines/${pipelineID}/stage/test/config-vars`,
141
+ body,
142
+ });
143
+ }
144
+ exports.setPipelineConfigVars = setPipelineConfigVars;
145
+ async function createTestRun(heroku, body) {
146
+ const headers = {
147
+ Accept: CI_HEADER,
148
+ };
149
+ return heroku.request('/test-runs', {
150
+ headers,
151
+ method: 'POST',
152
+ body,
153
+ });
154
+ }
155
+ exports.createTestRun = createTestRun;
156
+ async function getTestNodes(heroku, testRunIdD) {
157
+ return heroku.request(`/test-runs/${testRunIdD}/test-nodes`, {
158
+ headers: {
159
+ Authorization: `Bearer ${heroku.auth}`,
160
+ Accept: CI_HEADER,
161
+ },
162
+ });
163
+ }
164
+ exports.getTestNodes = getTestNodes;
165
+ function updateTestRun(heroku, id, body) {
166
+ return heroku.request(`/test-runs/${id}`, {
167
+ body,
168
+ method: 'PATCH',
169
+ headers: {
170
+ Accept: CI_HEADER,
171
+ },
172
+ });
173
+ }
174
+ exports.updateTestRun = updateTestRun;
@@ -1,3 +1,3 @@
1
- import { Command } from '@heroku-cli/command';
2
- export declare function disambiguatePipeline(pipelineIDOrName: any, command: Command): Promise<any>;
3
- export declare function getPipeline(flags: any, command: Command): Promise<any>;
1
+ import { APIClient } from '@heroku-cli/command';
2
+ export declare function disambiguatePipeline(pipelineIDOrName: any, herokuAPI: APIClient): Promise<any>;
3
+ export declare function getPipeline(flags: any, herokuAPI: APIClient): Promise<any>;
@@ -3,18 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPipeline = exports.disambiguatePipeline = void 0;
4
4
  const inquirer_1 = require("inquirer");
5
5
  const validator_1 = require("validator");
6
- async function disambiguatePipeline(pipelineIDOrName, command) {
6
+ const core_1 = require("@oclif/core");
7
+ async function disambiguatePipeline(pipelineIDOrName, herokuAPI) {
7
8
  const headers = { Accept: 'application/vnd.heroku+json; version=3.pipelines' };
8
9
  if ((0, validator_1.isUUID)(pipelineIDOrName)) {
9
- const { body: pipeline } = await command.heroku.get(`/pipelines/${pipelineIDOrName}`, { headers });
10
+ const { body: pipeline } = await herokuAPI.get(`/pipelines/${pipelineIDOrName}`, { headers });
10
11
  return pipeline;
11
12
  }
12
- const { body: pipelines } = await command.heroku.get(`/pipelines?eq[name]=${pipelineIDOrName}`, { headers });
13
+ const { body: pipelines } = await herokuAPI.get(`/pipelines?eq[name]=${pipelineIDOrName}`, { headers });
13
14
  let choices;
14
15
  let questions;
15
16
  switch (pipelines.length) {
16
17
  case 0:
17
- command.error('Pipeline not found');
18
+ core_1.ux.error('Pipeline not found');
18
19
  break;
19
20
  case 1:
20
21
  return pipelines[0];
@@ -32,24 +33,24 @@ async function disambiguatePipeline(pipelineIDOrName, command) {
32
33
  }
33
34
  }
34
35
  exports.disambiguatePipeline = disambiguatePipeline;
35
- async function getPipeline(flags, command) {
36
+ async function getPipeline(flags, herokuAPI) {
36
37
  let pipeline;
37
38
  if ((!flags.pipeline) && (!flags.app)) {
38
- command.error('Required flag: --pipeline PIPELINE or --app APP');
39
+ core_1.ux.error('Required flag: --pipeline PIPELINE or --app APP');
39
40
  }
40
41
  if (flags && flags.pipeline) {
41
- pipeline = await disambiguatePipeline(flags.pipeline, command);
42
+ pipeline = await disambiguatePipeline(flags.pipeline, herokuAPI);
42
43
  if (pipeline.pipeline) {
43
44
  pipeline = pipeline.pipeline;
44
45
  } // in case prompt returns an object like { pipeline: { ... } }
45
46
  }
46
47
  else {
47
- const { body: coupling } = await command.heroku.get(`/apps/${flags.app}/pipeline-couplings`);
48
+ const { body: coupling } = await herokuAPI.get(`/apps/${flags.app}/pipeline-couplings`);
48
49
  if ((coupling) && (coupling.pipeline)) {
49
50
  pipeline = coupling.pipeline;
50
51
  }
51
52
  else {
52
- command.error(`No pipeline found with application ${flags.app}`);
53
+ core_1.ux.error(`No pipeline found with application ${flags.app}`);
53
54
  }
54
55
  }
55
56
  return pipeline;
@@ -1,5 +1,6 @@
1
1
  import { Command } from '@heroku-cli/command';
2
2
  import * as Heroku from '@heroku-cli/schema';
3
3
  export declare function renderList(command: Command, testRuns: Heroku.TestRun[], pipeline: Heroku.Pipeline, watchOption: boolean, jsonOption: boolean): Promise<void>;
4
+ export declare function waitForStates(states: string[], testRun: Heroku.TestRun, command: Command): Promise<Heroku.TestRun>;
4
5
  export declare function displayAndExit(pipeline: Heroku.Pipeline, number: number, command: Command): Promise<void>;
5
6
  export declare function displayTestRunInfo(command: Command, testRun: Heroku.TestRun, testNodes: Heroku.TestNode[], nodeArg: string | undefined): Promise<void>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.displayTestRunInfo = exports.displayAndExit = exports.renderList = void 0;
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
6
  const https_1 = require("https");
@@ -167,6 +167,7 @@ async function waitForStates(states, testRun, command) {
167
167
  }
168
168
  return newTestRun;
169
169
  }
170
+ exports.waitForStates = waitForStates;
170
171
  async function display(pipeline, number, command) {
171
172
  let { body: testRun } = await command.heroku.get(`/pipelines/${pipeline.id}/test-runs/${number}`);
172
173
  if (testRun) {
@@ -5,4 +5,12 @@ export default class Git {
5
5
  httpGitUrl(app: string): string;
6
6
  remoteUrl(name: string): Promise<string>;
7
7
  url(app: string): string;
8
+ getBranch(symbolicRef: string): Promise<string>;
9
+ getRef(branch: string): Promise<string>;
10
+ getCommitTitle(ref: string): Promise<string>;
11
+ readCommit(commit: string): Promise<{
12
+ branch: string;
13
+ ref: string;
14
+ message: string;
15
+ }>;
8
16
  }
@@ -52,5 +52,24 @@ class Git {
52
52
  url(app) {
53
53
  return this.httpGitUrl(app);
54
54
  }
55
+ async getBranch(symbolicRef) {
56
+ return this.exec(['symbolic-ref', '--short', symbolicRef]);
57
+ }
58
+ async getRef(branch) {
59
+ return this.exec(['rev-parse', branch || 'HEAD']);
60
+ }
61
+ async getCommitTitle(ref) {
62
+ return this.exec(['log', ref || '', '-1', '--pretty=format:%s']);
63
+ }
64
+ async readCommit(commit) {
65
+ const branch = await this.getBranch('HEAD');
66
+ const ref = await this.getRef(commit);
67
+ const message = await this.getCommitTitle(ref);
68
+ return Promise.resolve({
69
+ branch: branch,
70
+ ref: ref,
71
+ message: message,
72
+ });
73
+ }
55
74
  }
56
75
  exports.default = Git;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const inquirer_1 = require("inquirer");
4
4
  const validator_1 = require("validator");
5
- const api_1 = require("./api");
5
+ const api_1 = require("../api");
6
6
  async function disambiguate(heroku, pipelineIDOrName) {
7
7
  let pipeline;
8
8
  if ((0, validator_1.isUUID)(pipelineIDOrName)) {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getOwner = exports.warnMixedOwnership = void 0;
4
4
  const color_1 = require("@heroku-cli/color");
5
5
  const core_1 = require("@oclif/core");
6
- const api_1 = require("./api");
6
+ const api_1 = require("../api");
7
7
  function warnMixedOwnership(pipelineApps, pipeline, owner) {
8
8
  const hasMixedOwnership = pipelineApps.some(app => {
9
9
  return (app.owner && app.owner.id) !== pipeline.owner.id;
@@ -1 +1,2 @@
1
- export default function createApps(heroku: any, archiveURL: any, pipeline: any, pipelineName: any, stagingAppName: any, organization: any): Promise<void | import("http-call").HTTP<unknown>[]>;
1
+ import * as Heroku from '@heroku-cli/schema';
2
+ export default function createApps(heroku: any, archiveURL: any, pipeline: any, pipelineName: any, stagingAppName: any, organization: any): Promise<void | import("http-call").HTTP<Heroku.AppSetup>[]>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const core_1 = require("@oclif/core");
4
- const api_1 = require("../api");
4
+ const api_1 = require("../../api");
5
5
  function createApp(heroku, { archiveURL, name, organization, pipeline, stage }) {
6
6
  const params = {
7
7
  source_blob: { url: archiveURL },
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const api = require("../api");
3
+ const api = require("../../api");
4
4
  const core_1 = require("@oclif/core");
5
5
  const color_1 = require("@heroku-cli/color");
6
6
  function wait(ms) {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "8.4.4-beta.4",
2
+ "version": "9.0.0-alpha.0",
3
3
  "commands": {
4
4
  "console": {
5
5
  "id": "console",
@@ -836,6 +836,46 @@
836
836
  }
837
837
  }
838
838
  },
839
+ "ci:debug": {
840
+ "id": "ci:debug",
841
+ "description": "opens an interactive test debugging session with the contents of the current directory",
842
+ "strict": true,
843
+ "pluginName": "heroku",
844
+ "pluginAlias": "heroku",
845
+ "pluginType": "core",
846
+ "aliases": [],
847
+ "flags": {
848
+ "app": {
849
+ "name": "app",
850
+ "type": "option",
851
+ "char": "a",
852
+ "description": "app to run command against",
853
+ "multiple": false
854
+ },
855
+ "no-cache": {
856
+ "name": "no-cache",
857
+ "type": "boolean",
858
+ "description": "start test run with an empty cache",
859
+ "allowNo": false
860
+ },
861
+ "no-setup": {
862
+ "name": "no-setup",
863
+ "type": "boolean",
864
+ "description": "start test dyno without running test-setup",
865
+ "allowNo": false
866
+ },
867
+ "pipeline": {
868
+ "name": "pipeline",
869
+ "type": "option",
870
+ "char": "p",
871
+ "description": "name of pipeline",
872
+ "multiple": false
873
+ }
874
+ },
875
+ "args": {},
876
+ "help": "Example:\n\n $ heroku ci:debug --pipeline PIPELINE\n Preparing source... done\n Creating test run... done\n Running setup and attaching to test dyno...\n\n~ $\n",
877
+ "topic": "ci"
878
+ },
839
879
  "ci": {
840
880
  "id": "ci",
841
881
  "description": "display the most recent CI runs for the given pipeline",
@@ -959,6 +999,45 @@
959
999
  },
960
1000
  "args": {}
961
1001
  },
1002
+ "ci:open": {
1003
+ "id": "ci:open",
1004
+ "description": "open the Dashboard version of Heroku CI",
1005
+ "strict": true,
1006
+ "pluginName": "heroku",
1007
+ "pluginAlias": "heroku",
1008
+ "pluginType": "core",
1009
+ "aliases": [],
1010
+ "examples": [
1011
+ "$ heroku ci:open --app murmuring-headland-14719"
1012
+ ],
1013
+ "flags": {
1014
+ "help": {
1015
+ "name": "help",
1016
+ "type": "boolean",
1017
+ "char": "h",
1018
+ "description": "Show CLI help.",
1019
+ "allowNo": false
1020
+ },
1021
+ "app": {
1022
+ "name": "app",
1023
+ "type": "option",
1024
+ "char": "a",
1025
+ "description": "app to run command against",
1026
+ "required": true,
1027
+ "multiple": false
1028
+ },
1029
+ "pipeline": {
1030
+ "name": "pipeline",
1031
+ "type": "option",
1032
+ "char": "p",
1033
+ "description": "name of pipeline",
1034
+ "required": false,
1035
+ "multiple": false
1036
+ }
1037
+ },
1038
+ "args": {},
1039
+ "topic": "ci"
1040
+ },
962
1041
  "ci:rerun": {
963
1042
  "id": "ci:rerun",
964
1043
  "description": "rerun tests against current directory",
@@ -3130,6 +3209,88 @@
3130
3209
  },
3131
3210
  "args": {}
3132
3211
  },
3212
+ "ci:config:get": {
3213
+ "id": "ci:config:get",
3214
+ "description": "get a CI config var",
3215
+ "strict": true,
3216
+ "pluginName": "heroku",
3217
+ "pluginAlias": "heroku",
3218
+ "pluginType": "core",
3219
+ "aliases": [],
3220
+ "examples": [
3221
+ "$ heroku ci:config:get --pipeline=PIPELINE RAILS_ENV\n test"
3222
+ ],
3223
+ "flags": {
3224
+ "help": {
3225
+ "name": "help",
3226
+ "type": "boolean",
3227
+ "char": "h",
3228
+ "description": "Show CLI help.",
3229
+ "allowNo": false
3230
+ },
3231
+ "app": {
3232
+ "name": "app",
3233
+ "type": "option",
3234
+ "char": "a",
3235
+ "description": "app to run command against",
3236
+ "required": false,
3237
+ "multiple": false
3238
+ },
3239
+ "pipeline": {
3240
+ "name": "pipeline",
3241
+ "type": "option",
3242
+ "char": "p",
3243
+ "description": "name of pipeline",
3244
+ "required": false,
3245
+ "multiple": false
3246
+ },
3247
+ "shell": {
3248
+ "name": "shell",
3249
+ "type": "boolean",
3250
+ "char": "s",
3251
+ "description": "output config var in shell format",
3252
+ "allowNo": false
3253
+ }
3254
+ },
3255
+ "args": {
3256
+ "key": {
3257
+ "name": "key",
3258
+ "required": true
3259
+ }
3260
+ },
3261
+ "topic": "ci"
3262
+ },
3263
+ "ci:config:set": {
3264
+ "id": "ci:config:set",
3265
+ "description": "set CI config vars",
3266
+ "strict": false,
3267
+ "pluginName": "heroku",
3268
+ "pluginAlias": "heroku",
3269
+ "pluginType": "core",
3270
+ "aliases": [],
3271
+ "examples": [
3272
+ "$ heroku ci:config:set --pipeline PIPELINE RAILS_ENV=test\n Setting test config vars... done\n RAILS_ENV: test"
3273
+ ],
3274
+ "flags": {
3275
+ "app": {
3276
+ "name": "app",
3277
+ "type": "option",
3278
+ "char": "a",
3279
+ "description": "app to run command against",
3280
+ "multiple": false
3281
+ },
3282
+ "pipeline": {
3283
+ "name": "pipeline",
3284
+ "type": "option",
3285
+ "char": "p",
3286
+ "description": "name of pipeline",
3287
+ "required": true,
3288
+ "multiple": false
3289
+ }
3290
+ },
3291
+ "args": {},
3292
+ "topic": "ci"
3293
+ },
3133
3294
  "ps:autoscale:disable": {
3134
3295
  "id": "ps:autoscale:disable",
3135
3296
  "description": "disable web dyno autoscaling",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "heroku",
3
3
  "description": "CLI to interact with Heroku",
4
- "version": "8.4.4-beta.4",
4
+ "version": "9.0.0-alpha.0",
5
5
  "author": "Jeff Dickey @jdxcode",
6
6
  "bin": "./bin/run",
7
7
  "bugs": "https://github.com/heroku/cli/issues",
@@ -10,18 +10,18 @@
10
10
  "@heroku-cli/command": "^10.0.0",
11
11
  "@heroku-cli/command-v9": "npm:@heroku-cli/command@^9.0.2",
12
12
  "@heroku-cli/notifications": "^1.2.2",
13
- "@heroku-cli/plugin-addons-v5": "^8.4.0",
14
- "@heroku-cli/plugin-apps-v5": "^8.4.4-beta.3",
15
- "@heroku-cli/plugin-certs-v5": "^8.2.0",
16
- "@heroku-cli/plugin-ci-v5": "^8.2.0",
17
- "@heroku-cli/plugin-container-registry-v5": "^8.2.0",
18
- "@heroku-cli/plugin-orgs-v5": "^8.2.0",
19
- "@heroku-cli/plugin-pg-v5": "^8.4.4-beta.3",
13
+ "@heroku-cli/plugin-addons-v5": "^9.0.0-alpha.0",
14
+ "@heroku-cli/plugin-apps-v5": "^9.0.0-alpha.0",
15
+ "@heroku-cli/plugin-certs-v5": "^9.0.0-alpha.0",
16
+ "@heroku-cli/plugin-ci-v5": "^9.0.0-alpha.0",
17
+ "@heroku-cli/plugin-container-registry-v5": "^9.0.0-alpha.0",
18
+ "@heroku-cli/plugin-orgs-v5": "^9.0.0-alpha.0",
19
+ "@heroku-cli/plugin-pg-v5": "^9.0.0-alpha.0",
20
20
  "@heroku-cli/plugin-ps": "^8.1.7",
21
21
  "@heroku-cli/plugin-ps-exec": "^2.4.0",
22
- "@heroku-cli/plugin-redis-v5": "^8.2.0",
22
+ "@heroku-cli/plugin-redis-v5": "^9.0.0-alpha.0",
23
23
  "@heroku-cli/plugin-run": "8.1.4",
24
- "@heroku-cli/plugin-spaces": "^8.4.0",
24
+ "@heroku-cli/plugin-spaces": "^9.0.0-alpha.0",
25
25
  "@heroku-cli/schema": "^1.0.25",
26
26
  "@heroku/buildpack-registry": "^1.0.1",
27
27
  "@heroku/eventsource": "^1.0.7",
@@ -48,7 +48,6 @@
48
48
  "chalk": "^2.4.2",
49
49
  "date-fns": "^2.30.0",
50
50
  "debug": "4.1.1",
51
- "dotenv": "^16.3.1",
52
51
  "edit-string": "^1.1.6",
53
52
  "execa": "5.1.1",
54
53
  "foreman": "^3.0.1",
@@ -341,5 +340,5 @@
341
340
  "version": "oclif readme --multi && git add README.md ../../docs"
342
341
  },
343
342
  "types": "lib/index.d.ts",
344
- "gitHead": "76704a4c3ef612150e65fe362f47fd440ad3d284"
343
+ "gitHead": "51d875ab6b89ce2334b06b20839d575fe9a19ca8"
345
344
  }