heroku 8.7.1 → 9.0.0-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.
Files changed (96) hide show
  1. package/README.md +4 -1
  2. package/lib/commands/apps/create.d.ts +28 -0
  3. package/lib/commands/apps/create.js +194 -0
  4. package/lib/commands/apps/destroy.d.ts +14 -0
  5. package/lib/commands/apps/destroy.js +46 -0
  6. package/lib/commands/apps/errors.d.ts +12 -0
  7. package/lib/commands/apps/errors.js +119 -0
  8. package/lib/commands/apps/favorites/add.d.ts +9 -0
  9. package/lib/commands/apps/favorites/add.js +37 -0
  10. package/lib/commands/apps/favorites/index.d.ts +9 -0
  11. package/lib/commands/apps/favorites/index.js +25 -0
  12. package/lib/commands/apps/favorites/remove.d.ts +9 -0
  13. package/lib/commands/apps/favorites/remove.js +27 -0
  14. package/lib/commands/apps/index.d.ts +16 -0
  15. package/lib/commands/apps/index.js +119 -0
  16. package/lib/commands/apps/info.d.ts +18 -0
  17. package/lib/commands/apps/info.js +163 -0
  18. package/lib/commands/apps/open.d.ts +14 -0
  19. package/lib/commands/apps/open.js +29 -0
  20. package/lib/commands/apps/rename.d.ts +15 -0
  21. package/lib/commands/apps/rename.js +50 -0
  22. package/lib/commands/apps/stacks/index.d.ts +10 -0
  23. package/lib/commands/apps/stacks/index.js +43 -0
  24. package/lib/commands/apps/stacks/set.d.ts +14 -0
  25. package/lib/commands/apps/stacks/set.js +41 -0
  26. package/lib/commands/auth/logout.js +1 -0
  27. package/lib/commands/ci/config/get.d.ts +16 -0
  28. package/lib/commands/ci/config/get.js +37 -0
  29. package/lib/commands/ci/config/index.d.ts +12 -0
  30. package/lib/commands/ci/config/index.js +43 -0
  31. package/lib/commands/ci/config/set.d.ts +12 -0
  32. package/lib/commands/ci/config/set.js +48 -0
  33. package/lib/commands/ci/config/unset.d.ts +13 -0
  34. package/lib/commands/ci/config/unset.js +35 -0
  35. package/lib/commands/ci/debug.d.ts +13 -0
  36. package/lib/commands/ci/debug.js +105 -0
  37. package/lib/commands/ci/index.js +1 -1
  38. package/lib/commands/ci/info.js +1 -1
  39. package/lib/commands/ci/last.js +1 -1
  40. package/lib/commands/ci/migrate-manifest.d.ts +7 -0
  41. package/lib/commands/ci/migrate-manifest.js +74 -0
  42. package/lib/commands/ci/open.d.ts +12 -0
  43. package/lib/commands/ci/open.js +23 -0
  44. package/lib/commands/ci/rerun.js +1 -1
  45. package/lib/commands/ci/run.js +1 -1
  46. package/lib/commands/config/set.d.ts +11 -0
  47. package/lib/commands/config/set.js +59 -0
  48. package/lib/commands/domains/index.d.ts +1 -1
  49. package/lib/commands/drains/add.d.ts +11 -0
  50. package/lib/commands/drains/add.js +22 -0
  51. package/lib/commands/drains/index.d.ts +10 -0
  52. package/lib/commands/drains/index.js +49 -0
  53. package/lib/commands/drains/remove.d.ts +12 -0
  54. package/lib/commands/drains/remove.js +21 -0
  55. package/lib/commands/pipelines/add.js +1 -1
  56. package/lib/commands/pipelines/connect.js +1 -1
  57. package/lib/commands/pipelines/create.js +1 -1
  58. package/lib/commands/pipelines/destroy.js +1 -1
  59. package/lib/commands/pipelines/diff.js +1 -1
  60. package/lib/commands/pipelines/info.js +1 -1
  61. package/lib/commands/pipelines/promote.js +1 -1
  62. package/lib/commands/pipelines/remove.js +1 -1
  63. package/lib/commands/pipelines/rename.js +1 -1
  64. package/lib/commands/pipelines/setup.js +1 -1
  65. package/lib/commands/pipelines/transfer.js +1 -1
  66. package/lib/commands/pipelines/update.js +1 -1
  67. package/lib/lib/{pipelines/api.d.ts → api.d.ts} +10 -5
  68. package/lib/lib/{pipelines/api.js → api.js} +48 -4
  69. package/lib/lib/apps/confirm-app.d.ts +1 -0
  70. package/lib/lib/apps/confirm-app.js +23 -0
  71. package/lib/lib/apps/error_info.d.ts +7 -0
  72. package/lib/lib/apps/error_info.js +185 -0
  73. package/lib/lib/buildpacks/buildpacks.js +3 -4
  74. package/lib/lib/ci/git.d.ts +7 -1
  75. package/lib/lib/ci/git.js +44 -1
  76. package/lib/lib/ci/pipelines.d.ts +3 -3
  77. package/lib/lib/ci/pipelines.js +10 -9
  78. package/lib/lib/ci/test-run.d.ts +1 -0
  79. package/lib/lib/ci/test-run.js +2 -1
  80. package/lib/lib/ci/validate.d.ts +2 -0
  81. package/lib/lib/ci/validate.js +10 -0
  82. package/lib/lib/git/git.d.ts +11 -0
  83. package/lib/lib/git/git.js +38 -0
  84. package/lib/lib/git/push.d.ts +1 -0
  85. package/lib/lib/git/push.js +6 -0
  86. package/lib/lib/pipelines/disambiguate.js +1 -1
  87. package/lib/lib/pipelines/ownership.js +1 -1
  88. package/lib/lib/pipelines/setup/create-apps.d.ts +2 -1
  89. package/lib/lib/pipelines/setup/create-apps.js +1 -1
  90. package/lib/lib/pipelines/setup/poll-app-setups.js +1 -1
  91. package/lib/lib/types/favorites.d.ts +7 -0
  92. package/lib/lib/types/favorites.js +2 -0
  93. package/oclif.manifest.json +879 -11
  94. package/package.json +8 -4
  95. package/lib/lib/buildpacks/push.d.ts +0 -0
  96. package/lib/lib/buildpacks/push.js +0 -4
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const command_1 = require("@heroku-cli/command");
4
4
  const cp = require("child_process");
5
5
  const core_1 = require("@oclif/core");
6
+ const fs = require("fs");
6
7
  const util_1 = require("util");
7
8
  const execFile = (0, util_1.promisify)(cp.execFile);
8
9
  const debug = require('debug')('git');
@@ -52,5 +53,42 @@ class Git {
52
53
  url(app) {
53
54
  return this.httpGitUrl(app);
54
55
  }
56
+ async getBranch(symbolicRef) {
57
+ return this.exec(['symbolic-ref', '--short', symbolicRef]);
58
+ }
59
+ async getRef(branch) {
60
+ return this.exec(['rev-parse', branch || 'HEAD']);
61
+ }
62
+ async getCommitTitle(ref) {
63
+ return this.exec(['log', ref || '', '-1', '--pretty=format:%s']);
64
+ }
65
+ async readCommit(commit) {
66
+ const branch = await this.getBranch('HEAD');
67
+ const ref = await this.getRef(commit);
68
+ const message = await this.getCommitTitle(ref);
69
+ return Promise.resolve({
70
+ branch: branch,
71
+ ref: ref,
72
+ message: message,
73
+ });
74
+ }
75
+ inGitRepo() {
76
+ try {
77
+ fs.lstatSync('.git');
78
+ return true;
79
+ }
80
+ catch (error) {
81
+ if (error.code !== 'ENOENT')
82
+ throw error;
83
+ }
84
+ }
85
+ hasGitRemote(remote) {
86
+ return this.remoteUrl(remote)
87
+ .then((remote) => Boolean(remote));
88
+ }
89
+ createRemote(remote, url) {
90
+ return this.hasGitRemote(remote)
91
+ .then(exists => !exists ? this.exec(['remote', 'add', remote, url]) : null);
92
+ }
55
93
  }
56
94
  exports.default = Git;
@@ -0,0 +1 @@
1
+ export default function push(remote?: string): string;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function push(remote) {
4
+ return `git push ${remote || 'heroku'} main`;
5
+ }
6
+ exports.default = push;
@@ -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) {
@@ -0,0 +1,7 @@
1
+ export declare type Favorite = {
2
+ id: string;
3
+ resource_id: string;
4
+ resource_name: string;
5
+ type: string;
6
+ };
7
+ export declare type Favorites = Favorite[];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });