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.
- package/README.md +4 -1
- package/lib/commands/apps/create.d.ts +28 -0
- package/lib/commands/apps/create.js +194 -0
- package/lib/commands/apps/destroy.d.ts +14 -0
- package/lib/commands/apps/destroy.js +46 -0
- package/lib/commands/apps/errors.d.ts +12 -0
- package/lib/commands/apps/errors.js +119 -0
- package/lib/commands/apps/favorites/add.d.ts +9 -0
- package/lib/commands/apps/favorites/add.js +37 -0
- package/lib/commands/apps/favorites/index.d.ts +9 -0
- package/lib/commands/apps/favorites/index.js +25 -0
- package/lib/commands/apps/favorites/remove.d.ts +9 -0
- package/lib/commands/apps/favorites/remove.js +27 -0
- package/lib/commands/apps/index.d.ts +16 -0
- package/lib/commands/apps/index.js +119 -0
- package/lib/commands/apps/info.d.ts +18 -0
- package/lib/commands/apps/info.js +163 -0
- package/lib/commands/apps/open.d.ts +14 -0
- package/lib/commands/apps/open.js +29 -0
- package/lib/commands/apps/rename.d.ts +15 -0
- package/lib/commands/apps/rename.js +50 -0
- package/lib/commands/apps/stacks/index.d.ts +10 -0
- package/lib/commands/apps/stacks/index.js +43 -0
- package/lib/commands/apps/stacks/set.d.ts +14 -0
- package/lib/commands/apps/stacks/set.js +41 -0
- package/lib/commands/auth/logout.js +1 -0
- package/lib/commands/ci/config/get.d.ts +16 -0
- package/lib/commands/ci/config/get.js +37 -0
- package/lib/commands/ci/config/index.d.ts +12 -0
- package/lib/commands/ci/config/index.js +43 -0
- package/lib/commands/ci/config/set.d.ts +12 -0
- package/lib/commands/ci/config/set.js +48 -0
- package/lib/commands/ci/config/unset.d.ts +13 -0
- package/lib/commands/ci/config/unset.js +35 -0
- package/lib/commands/ci/debug.d.ts +13 -0
- package/lib/commands/ci/debug.js +105 -0
- package/lib/commands/ci/index.js +1 -1
- package/lib/commands/ci/info.js +1 -1
- package/lib/commands/ci/last.js +1 -1
- package/lib/commands/ci/migrate-manifest.d.ts +7 -0
- package/lib/commands/ci/migrate-manifest.js +74 -0
- package/lib/commands/ci/open.d.ts +12 -0
- package/lib/commands/ci/open.js +23 -0
- package/lib/commands/ci/rerun.js +1 -1
- package/lib/commands/ci/run.js +1 -1
- package/lib/commands/config/set.d.ts +11 -0
- package/lib/commands/config/set.js +59 -0
- package/lib/commands/domains/index.d.ts +1 -1
- package/lib/commands/drains/add.d.ts +11 -0
- package/lib/commands/drains/add.js +22 -0
- package/lib/commands/drains/index.d.ts +10 -0
- package/lib/commands/drains/index.js +49 -0
- package/lib/commands/drains/remove.d.ts +12 -0
- package/lib/commands/drains/remove.js +21 -0
- package/lib/commands/pipelines/add.js +1 -1
- package/lib/commands/pipelines/connect.js +1 -1
- package/lib/commands/pipelines/create.js +1 -1
- package/lib/commands/pipelines/destroy.js +1 -1
- package/lib/commands/pipelines/diff.js +1 -1
- package/lib/commands/pipelines/info.js +1 -1
- package/lib/commands/pipelines/promote.js +1 -1
- package/lib/commands/pipelines/remove.js +1 -1
- package/lib/commands/pipelines/rename.js +1 -1
- package/lib/commands/pipelines/setup.js +1 -1
- package/lib/commands/pipelines/transfer.js +1 -1
- package/lib/commands/pipelines/update.js +1 -1
- package/lib/lib/{pipelines/api.d.ts → api.d.ts} +10 -5
- package/lib/lib/{pipelines/api.js → api.js} +48 -4
- package/lib/lib/apps/confirm-app.d.ts +1 -0
- package/lib/lib/apps/confirm-app.js +23 -0
- package/lib/lib/apps/error_info.d.ts +7 -0
- package/lib/lib/apps/error_info.js +185 -0
- package/lib/lib/buildpacks/buildpacks.js +3 -4
- package/lib/lib/ci/git.d.ts +7 -1
- package/lib/lib/ci/git.js +44 -1
- package/lib/lib/ci/pipelines.d.ts +3 -3
- package/lib/lib/ci/pipelines.js +10 -9
- package/lib/lib/ci/test-run.d.ts +1 -0
- package/lib/lib/ci/test-run.js +2 -1
- package/lib/lib/ci/validate.d.ts +2 -0
- package/lib/lib/ci/validate.js +10 -0
- package/lib/lib/git/git.d.ts +11 -0
- package/lib/lib/git/git.js +38 -0
- package/lib/lib/git/push.d.ts +1 -0
- package/lib/lib/git/push.js +6 -0
- package/lib/lib/pipelines/disambiguate.js +1 -1
- package/lib/lib/pipelines/ownership.js +1 -1
- package/lib/lib/pipelines/setup/create-apps.d.ts +2 -1
- package/lib/lib/pipelines/setup/create-apps.js +1 -1
- package/lib/lib/pipelines/setup/poll-app-setups.js +1 -1
- package/lib/lib/types/favorites.d.ts +7 -0
- package/lib/lib/types/favorites.js +2 -0
- package/oclif.manifest.json +879 -11
- package/package.json +8 -4
- package/lib/lib/buildpacks/push.d.ts +0 -0
- package/lib/lib/buildpacks/push.js +0 -4
package/lib/lib/git/git.js
CHANGED
|
@@ -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;
|
|
@@ -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("
|
|
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("
|
|
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
|
-
|
|
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("
|
|
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 },
|