heroku 8.1.9 → 8.2.0-beta.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.
- package/autocomplete-scripts/README.md +7 -0
- package/autocomplete-scripts/bash/heroku.bash +59 -0
- package/autocomplete-scripts/brew/bash +4 -0
- package/autocomplete-scripts/brew/zsh/_heroku +59 -0
- package/autocomplete-scripts/zsh/_heroku +53 -0
- package/bin/bats-test-runner.js +7 -0
- package/bin/dev +17 -0
- package/bin/dev.cmd +3 -0
- package/bin/run +36 -1
- package/lib/analytics.d.ts +2 -2
- package/lib/analytics.js +3 -4
- package/lib/commands/auth/2fa/disable.d.ts +7 -0
- package/lib/commands/auth/2fa/disable.js +16 -0
- package/lib/commands/auth/2fa/index.d.ts +6 -0
- package/lib/commands/auth/2fa/index.js +18 -0
- package/lib/commands/auth/login.d.ts +8 -0
- package/lib/commands/auth/login.js +25 -0
- package/lib/commands/auth/logout.d.ts +6 -0
- package/lib/commands/auth/logout.js +14 -0
- package/lib/commands/auth/token.d.ts +7 -0
- package/lib/commands/auth/token.js +31 -0
- package/lib/commands/auth/whoami.d.ts +7 -0
- package/lib/commands/auth/whoami.js +26 -0
- package/lib/commands/authorizations/create.d.ts +13 -0
- package/lib/commands/authorizations/create.js +41 -0
- package/lib/commands/authorizations/index.d.ts +9 -0
- package/lib/commands/authorizations/index.js +35 -0
- package/lib/commands/authorizations/info.d.ts +11 -0
- package/lib/commands/authorizations/info.js +25 -0
- package/lib/commands/authorizations/revoke.d.ts +10 -0
- package/lib/commands/authorizations/revoke.js +22 -0
- package/lib/commands/authorizations/rotate.d.ts +8 -0
- package/lib/commands/authorizations/rotate.js +19 -0
- package/lib/commands/authorizations/update.d.ts +13 -0
- package/lib/commands/authorizations/update.js +36 -0
- package/lib/commands/autocomplete/create.d.ts +29 -0
- package/lib/commands/autocomplete/create.js +213 -0
- package/lib/commands/autocomplete/doctor.d.ts +12 -0
- package/lib/commands/autocomplete/doctor.js +97 -0
- package/lib/commands/autocomplete/index.d.ts +12 -0
- package/lib/commands/autocomplete/index.js +67 -0
- package/lib/commands/autocomplete/options.d.ts +25 -0
- package/lib/commands/autocomplete/options.js +210 -0
- package/lib/commands/autocomplete/script.d.ts +10 -0
- package/lib/commands/autocomplete/script.js +23 -0
- package/lib/commands/buildpacks/add.d.ts +13 -0
- package/lib/commands/buildpacks/add.js +43 -0
- package/lib/commands/buildpacks/clear.d.ts +9 -0
- package/lib/commands/buildpacks/clear.js +17 -0
- package/lib/commands/buildpacks/index.d.ts +9 -0
- package/lib/commands/buildpacks/index.js +25 -0
- package/lib/commands/buildpacks/info.d.ts +8 -0
- package/lib/commands/buildpacks/info.js +41 -0
- package/lib/commands/buildpacks/remove.d.ts +13 -0
- package/lib/commands/buildpacks/remove.js +55 -0
- package/lib/commands/buildpacks/search.d.ts +13 -0
- package/lib/commands/buildpacks/search.js +69 -0
- package/lib/commands/buildpacks/set.d.ts +13 -0
- package/lib/commands/buildpacks/set.js +42 -0
- package/lib/commands/buildpacks/versions.d.ts +8 -0
- package/lib/commands/buildpacks/versions.js +56 -0
- package/lib/commands/certs/auto/wait.d.ts +9 -0
- package/lib/commands/certs/auto/wait.js +14 -0
- package/lib/commands/ci/index.d.ts +12 -0
- package/lib/commands/ci/index.js +25 -0
- package/lib/commands/ci/info.d.ts +14 -0
- package/lib/commands/ci/info.js +29 -0
- package/lib/commands/ci/last.d.ts +11 -0
- package/lib/commands/ci/last.js +31 -0
- package/lib/commands/ci/rerun.d.ts +13 -0
- package/lib/commands/ci/rerun.js +53 -0
- package/lib/commands/ci/run.d.ts +10 -0
- package/lib/commands/ci/run.js +42 -0
- package/lib/commands/clients/create.d.ts +14 -0
- package/lib/commands/clients/create.js +37 -0
- package/lib/commands/clients/destroy.d.ts +8 -0
- package/lib/commands/clients/destroy.js +18 -0
- package/lib/commands/clients/index.d.ts +8 -0
- package/lib/commands/clients/index.js +32 -0
- package/lib/commands/clients/info.d.ts +13 -0
- package/lib/commands/clients/info.js +33 -0
- package/lib/commands/clients/rotate.d.ts +12 -0
- package/lib/commands/clients/rotate.js +33 -0
- package/lib/commands/clients/update.d.ts +13 -0
- package/lib/commands/clients/update.js +38 -0
- package/lib/commands/config/edit.d.ts +23 -0
- package/lib/commands/config/edit.js +132 -0
- package/lib/commands/config/get.d.ts +16 -0
- package/lib/commands/config/get.js +35 -0
- package/lib/commands/config/index.d.ts +11 -0
- package/lib/commands/config/index.js +33 -0
- package/lib/commands/config/unset.d.ts +12 -0
- package/lib/commands/config/unset.js +51 -0
- package/lib/commands/console.d.ts +11 -0
- package/lib/commands/console.js +30 -0
- package/lib/commands/domains/add.d.ts +19 -0
- package/lib/commands/domains/add.js +117 -0
- package/lib/commands/domains/clear.d.ts +11 -0
- package/lib/commands/domains/clear.js +26 -0
- package/lib/commands/domains/index.d.ts +40 -0
- package/lib/commands/domains/index.js +79 -0
- package/lib/commands/domains/info.d.ts +14 -0
- package/lib/commands/domains/info.js +25 -0
- package/lib/commands/domains/remove.d.ts +14 -0
- package/lib/commands/domains/remove.js +26 -0
- package/lib/commands/domains/update.d.ts +15 -0
- package/lib/commands/domains/update.js +40 -0
- package/lib/commands/domains/wait.d.ts +13 -0
- package/lib/commands/domains/wait.js +32 -0
- package/lib/commands/git/clone.d.ts +13 -0
- package/lib/commands/git/clone.js +29 -0
- package/lib/commands/git/credentials.d.ts +9 -0
- package/lib/commands/git/credentials.js +32 -0
- package/lib/commands/git/remote.d.ts +11 -0
- package/lib/commands/git/remote.js +44 -0
- package/lib/commands/labs/disable.d.ts +11 -0
- package/lib/commands/labs/disable.js +65 -0
- package/lib/commands/local/index.d.ts +17 -0
- package/lib/commands/local/index.js +75 -0
- package/lib/commands/local/run.d.ts +11 -0
- package/lib/commands/local/run.js +38 -0
- package/lib/commands/local/version.d.ts +5 -0
- package/lib/commands/local/version.js +13 -0
- package/lib/commands/logs.d.ts +16 -0
- package/lib/commands/logs.js +45 -0
- package/lib/commands/pipelines/add.d.ts +14 -0
- package/lib/commands/pipelines/add.js +61 -0
- package/lib/commands/pipelines/connect.d.ts +12 -0
- package/lib/commands/pipelines/connect.js +52 -0
- package/lib/commands/pipelines/create.d.ts +15 -0
- package/lib/commands/pipelines/create.js +91 -0
- package/lib/commands/pipelines/destroy.d.ts +9 -0
- package/lib/commands/pipelines/destroy.js +27 -0
- package/lib/commands/pipelines/diff.d.ts +19 -0
- package/lib/commands/pipelines/diff.js +152 -0
- package/lib/commands/pipelines/index.d.ts +9 -0
- package/lib/commands/pipelines/index.js +27 -0
- package/lib/commands/pipelines/info.d.ts +13 -0
- package/lib/commands/pipelines/info.js +43 -0
- package/lib/commands/pipelines/open.d.ts +9 -0
- package/lib/commands/pipelines/open.js +19 -0
- package/lib/commands/pipelines/promote.d.ts +12 -0
- package/lib/commands/pipelines/promote.js +216 -0
- package/lib/commands/pipelines/remove.d.ts +10 -0
- package/lib/commands/pipelines/remove.js +23 -0
- package/lib/commands/pipelines/rename.d.ts +10 -0
- package/lib/commands/pipelines/rename.js +33 -0
- package/lib/commands/pipelines/setup.d.ts +14 -0
- package/lib/commands/pipelines/setup.js +91 -0
- package/lib/commands/pipelines/transfer.d.ts +13 -0
- package/lib/commands/pipelines/transfer.js +65 -0
- package/lib/commands/pipelines/update.d.ts +11 -0
- package/lib/commands/pipelines/update.js +32 -0
- package/lib/commands/ps/autoscale/disable.d.ts +9 -0
- package/lib/commands/ps/autoscale/disable.js +35 -0
- package/lib/commands/ps/autoscale/enable.d.ts +13 -0
- package/lib/commands/ps/autoscale/enable.js +65 -0
- package/lib/commands/ps/wait.d.ts +12 -0
- package/lib/commands/ps/wait.js +78 -0
- package/lib/commands/rake.d.ts +14 -0
- package/lib/commands/rake.js +46 -0
- package/lib/commands/regions.d.ts +11 -0
- package/lib/commands/regions.js +45 -0
- package/lib/commands/reviewapps/disable.d.ts +17 -0
- package/lib/commands/reviewapps/disable.js +102 -0
- package/lib/commands/reviewapps/enable.d.ts +14 -0
- package/lib/commands/reviewapps/enable.js +89 -0
- package/lib/commands/run/detached.d.ts +15 -0
- package/lib/commands/run/detached.js +56 -0
- package/lib/commands/run/index.d.ts +18 -0
- package/lib/commands/run/index.js +64 -0
- package/lib/commands/run/inside.d.ts +15 -0
- package/lib/commands/run/inside.js +55 -0
- package/lib/commands/sessions/destroy.d.ts +8 -0
- package/lib/commands/sessions/destroy.js +18 -0
- package/lib/commands/sessions/index.d.ts +8 -0
- package/lib/commands/sessions/index.js +31 -0
- package/lib/commands/status.d.ts +8 -0
- package/lib/commands/status.js +46 -0
- package/lib/commands/webhooks/add.d.ts +16 -0
- package/lib/commands/webhooks/add.js +47 -0
- package/lib/commands/webhooks/deliveries/index.d.ts +12 -0
- package/lib/commands/webhooks/deliveries/index.js +80 -0
- package/lib/commands/webhooks/deliveries/info.d.ts +14 -0
- package/lib/commands/webhooks/deliveries/info.js +42 -0
- package/lib/commands/webhooks/events/index.d.ts +11 -0
- package/lib/commands/webhooks/events/index.js +46 -0
- package/lib/commands/webhooks/events/info.d.ts +14 -0
- package/lib/commands/webhooks/events/info.js +31 -0
- package/lib/commands/webhooks/index.d.ts +11 -0
- package/lib/commands/webhooks/index.js +45 -0
- package/lib/commands/webhooks/info.d.ts +14 -0
- package/lib/commands/webhooks/info.js +31 -0
- package/lib/commands/webhooks/remove.d.ts +14 -0
- package/lib/commands/webhooks/remove.js +29 -0
- package/lib/commands/webhooks/update.d.ts +19 -0
- package/lib/commands/webhooks/update.js +41 -0
- package/lib/file.js +2 -3
- package/lib/global_telemetry.d.ts +53 -0
- package/lib/global_telemetry.js +82 -0
- package/lib/hooks/command_not_found/performance_analytics.d.ts +3 -0
- package/lib/hooks/command_not_found/performance_analytics.js +7 -0
- package/lib/hooks/init/terms-of-service.js +3 -4
- package/lib/hooks/init/version.d.ts +2 -1
- package/lib/hooks/init/version.js +1 -2
- package/lib/hooks/postrun/performance_analytics.d.ts +3 -0
- package/lib/hooks/postrun/performance_analytics.js +11 -0
- package/lib/hooks/prerun/analytics.d.ts +2 -1
- package/lib/hooks/prerun/analytics.js +4 -4
- package/lib/hooks/recache.d.ts +3 -0
- package/lib/hooks/recache.js +56 -0
- package/lib/hooks/update/brew.d.ts +2 -1
- package/lib/hooks/update/brew.js +3 -5
- package/lib/hooks/update/completions.d.ts +2 -1
- package/lib/hooks/update/completions.js +2 -3
- package/lib/hooks/update/plugin-migrate.d.ts +2 -1
- package/lib/hooks/update/plugin-migrate.js +3 -5
- package/lib/hooks/update/tidy.d.ts +2 -1
- package/lib/hooks/update/tidy.js +3 -5
- package/lib/lib/authorizations/authorizations.d.ts +2 -0
- package/lib/lib/authorizations/authorizations.js +39 -0
- package/lib/lib/autocomplete/base.d.ts +11 -0
- package/lib/lib/autocomplete/base.js +44 -0
- package/lib/lib/autocomplete/cache.d.ts +2 -0
- package/lib/lib/autocomplete/cache.js +28 -0
- package/lib/lib/autocomplete/completions.d.ts +37 -0
- package/lib/lib/autocomplete/completions.js +261 -0
- package/lib/lib/buildpacks/buildpacks.d.ts +32 -0
- package/lib/lib/buildpacks/buildpacks.js +161 -0
- package/lib/lib/buildpacks/push.d.ts +0 -0
- package/lib/lib/buildpacks/push.js +4 -0
- package/lib/lib/ci/git.d.ts +8 -0
- package/lib/lib/ci/git.js +71 -0
- package/lib/lib/ci/interfaces/kolkrabbi.d.ts +311 -0
- package/lib/lib/ci/interfaces/kolkrabbi.js +7 -0
- package/lib/lib/ci/pipelines.d.ts +3 -0
- package/lib/lib/ci/pipelines.js +57 -0
- package/lib/lib/ci/source.d.ts +2 -0
- package/lib/lib/ci/source.js +42 -0
- package/lib/lib/ci/test-run.d.ts +5 -0
- package/lib/lib/ci/test-run.js +232 -0
- package/lib/lib/clients/clients.d.ts +1 -0
- package/lib/lib/clients/clients.js +25 -0
- package/lib/lib/config/quote.d.ts +2 -0
- package/lib/lib/config/quote.js +33 -0
- package/lib/lib/config/util.d.ts +3 -0
- package/lib/lib/config/util.js +12 -0
- package/lib/lib/domains/wait-for-domain.d.ts +3 -0
- package/lib/lib/domains/wait-for-domain.js +19 -0
- package/lib/lib/git/git.d.ts +8 -0
- package/lib/lib/git/git.js +56 -0
- package/lib/lib/local/fork-foreman.d.ts +1 -0
- package/lib/lib/local/fork-foreman.js +33 -0
- package/lib/lib/local/load-foreman-procfile.d.ts +0 -0
- package/lib/lib/local/load-foreman-procfile.js +2 -0
- package/lib/lib/local/run-foreman.d.ts +0 -0
- package/lib/lib/local/run-foreman.js +2 -0
- package/lib/lib/pipelines/api.d.ts +25 -0
- package/lib/lib/pipelines/api.js +130 -0
- package/lib/lib/pipelines/disambiguate.d.ts +3 -0
- package/lib/lib/pipelines/disambiguate.js +49 -0
- package/lib/lib/pipelines/github-api.d.ts +8 -0
- package/lib/lib/pipelines/github-api.js +18 -0
- package/lib/lib/pipelines/infer.d.ts +1 -0
- package/lib/lib/pipelines/infer.js +11 -0
- package/lib/lib/pipelines/key-by.d.ts +1 -0
- package/lib/lib/pipelines/key-by.js +11 -0
- package/lib/lib/pipelines/kolkrabbi-api.d.ts +14 -0
- package/lib/lib/pipelines/kolkrabbi-api.js +62 -0
- package/lib/lib/pipelines/ownership.d.ts +4 -0
- package/lib/lib/pipelines/ownership.js +40 -0
- package/lib/lib/pipelines/render-pipeline.d.ts +6 -0
- package/lib/lib/pipelines/render-pipeline.js +52 -0
- package/lib/lib/pipelines/setup/create-apps.d.ts +1 -0
- package/lib/lib/pipelines/setup/create-apps.js +44 -0
- package/lib/lib/pipelines/setup/get-ci-settings.d.ts +4 -0
- package/lib/lib/pipelines/setup/get-ci-settings.js +19 -0
- package/lib/lib/pipelines/setup/get-github-token.d.ts +1 -0
- package/lib/lib/pipelines/setup/get-github-token.js +10 -0
- package/lib/lib/pipelines/setup/get-name-and-repo.d.ts +1 -0
- package/lib/lib/pipelines/setup/get-name-and-repo.js +47 -0
- package/lib/lib/pipelines/setup/get-repo.d.ts +1 -0
- package/lib/lib/pipelines/setup/get-repo.js +8 -0
- package/lib/lib/pipelines/setup/get-settings.d.ts +9 -0
- package/lib/lib/pipelines/setup/get-settings.js +39 -0
- package/lib/lib/pipelines/setup/poll-app-setups.d.ts +1 -0
- package/lib/lib/pipelines/setup/poll-app-setups.js +25 -0
- package/lib/lib/pipelines/setup/setup-pipeline.d.ts +1 -0
- package/lib/lib/pipelines/setup/setup-pipeline.js +15 -0
- package/lib/lib/pipelines/setup/validate.d.ts +9 -0
- package/lib/lib/pipelines/setup/validate.js +31 -0
- package/lib/lib/pipelines/stages.d.ts +7 -0
- package/lib/lib/pipelines/stages.js +22 -0
- package/lib/lib/run/colorize.d.ts +2 -0
- package/lib/lib/run/colorize.js +300 -0
- package/lib/lib/run/dyno.d.ts +72 -0
- package/lib/lib/run/dyno.js +397 -0
- package/lib/lib/run/helpers.d.ts +2 -0
- package/lib/lib/run/helpers.js +34 -0
- package/lib/lib/run/line-transform.d.ts +4 -0
- package/lib/lib/run/line-transform.js +26 -0
- package/lib/lib/run/log-displayer.d.ts +10 -0
- package/lib/lib/run/log-displayer.js +79 -0
- package/lib/lib/sessions/sessions.d.ts +7 -0
- package/lib/lib/sessions/sessions.js +2 -0
- package/lib/lib/status/util.d.ts +1 -0
- package/lib/lib/status/util.js +14 -0
- package/lib/lib/webhooks/base.d.ts +13 -0
- package/lib/lib/webhooks/base.js +28 -0
- package/lib/user-config.js +2 -3
- package/oclif.manifest.json +3376 -2
- package/package.json +79 -42
- package/lib/hooks/update/b.d.ts +0 -2
- package/lib/hooks/update/b.js +0 -48
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
class DomainsInfo extends command_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
const { args, flags } = await this.parse(DomainsInfo);
|
|
8
|
+
const { body: res } = await this.heroku.get(`/apps/${flags.app}/domains/${args.hostname}`);
|
|
9
|
+
const domain = Object.assign(Object.assign({}, res), { app: res.app && res.app.name });
|
|
10
|
+
core_1.ux.styledObject(domain);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.default = DomainsInfo;
|
|
14
|
+
DomainsInfo.description = 'show detailed information for a domain on an app';
|
|
15
|
+
DomainsInfo.examples = [
|
|
16
|
+
'$ heroku domains:info www.example.com',
|
|
17
|
+
];
|
|
18
|
+
DomainsInfo.flags = {
|
|
19
|
+
help: command_1.flags.help({ char: 'h' }),
|
|
20
|
+
app: command_1.flags.app({ required: true }),
|
|
21
|
+
remote: command_1.flags.remote(),
|
|
22
|
+
};
|
|
23
|
+
DomainsInfo.args = {
|
|
24
|
+
hostname: core_1.Args.string({ required: true }),
|
|
25
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command } from '@heroku-cli/command';
|
|
2
|
+
export default class DomainsRemove extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
7
|
+
app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
};
|
|
10
|
+
static args: {
|
|
11
|
+
hostname: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const color_1 = require("@heroku-cli/color");
|
|
4
|
+
const command_1 = require("@heroku-cli/command");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const spinner_1 = require("@oclif/core/lib/cli-ux/action/spinner");
|
|
7
|
+
class DomainsRemove extends command_1.Command {
|
|
8
|
+
async run() {
|
|
9
|
+
const { args, flags } = await this.parse(DomainsRemove);
|
|
10
|
+
const action = new spinner_1.default();
|
|
11
|
+
action.start(`Removing ${color_1.color.green(args.hostname)} from ${color_1.color.app(flags.app)}`);
|
|
12
|
+
await this.heroku.delete(`/apps/${flags.app}/domains/${args.hostname}`);
|
|
13
|
+
action.stop();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.default = DomainsRemove;
|
|
17
|
+
DomainsRemove.description = 'remove a domain from an app';
|
|
18
|
+
DomainsRemove.examples = ['heroku domains:remove www.example.com'];
|
|
19
|
+
DomainsRemove.flags = {
|
|
20
|
+
help: command_1.flags.help({ char: 'h' }),
|
|
21
|
+
app: command_1.flags.app({ required: true }),
|
|
22
|
+
remote: command_1.flags.remote(),
|
|
23
|
+
};
|
|
24
|
+
DomainsRemove.args = {
|
|
25
|
+
hostname: core_1.Args.string({ required: true }),
|
|
26
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Command } from '@heroku-cli/command';
|
|
2
|
+
export default class DomainsUpdate extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
7
|
+
app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
cert: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
+
};
|
|
11
|
+
static args: {
|
|
12
|
+
hostname: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
13
|
+
};
|
|
14
|
+
run(): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const color_1 = require("@heroku-cli/color");
|
|
4
|
+
const command_1 = require("@heroku-cli/command");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const spinner_1 = require("@oclif/core/lib/cli-ux/action/spinner");
|
|
7
|
+
class DomainsUpdate extends command_1.Command {
|
|
8
|
+
async run() {
|
|
9
|
+
const { args, flags } = await this.parse(DomainsUpdate);
|
|
10
|
+
const { hostname } = args;
|
|
11
|
+
const action = new spinner_1.default();
|
|
12
|
+
try {
|
|
13
|
+
action.start(`Updating ${color_1.color.cyan(hostname)} to use ${color_1.color.cyan(flags.cert)} certificate`);
|
|
14
|
+
await this.heroku.patch(`/apps/${flags.app}/domains/${hostname}`, {
|
|
15
|
+
body: { sni_endpoint: flags.cert },
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
core_1.ux.error(error);
|
|
20
|
+
}
|
|
21
|
+
finally {
|
|
22
|
+
action.stop();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = DomainsUpdate;
|
|
27
|
+
DomainsUpdate.description = 'update a domain to use a different SSL certificate on an app';
|
|
28
|
+
DomainsUpdate.examples = ['heroku domains:update www.example.com --cert mycert'];
|
|
29
|
+
DomainsUpdate.flags = {
|
|
30
|
+
help: command_1.flags.help({ char: 'h' }),
|
|
31
|
+
app: command_1.flags.app({ required: true }),
|
|
32
|
+
remote: command_1.flags.remote(),
|
|
33
|
+
cert: command_1.flags.string({
|
|
34
|
+
required: true,
|
|
35
|
+
description: 'the name or id of the certificate you want to use for this domain',
|
|
36
|
+
}),
|
|
37
|
+
};
|
|
38
|
+
DomainsUpdate.args = {
|
|
39
|
+
hostname: core_1.Args.string({ required: true }),
|
|
40
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command } from '@heroku-cli/command';
|
|
2
|
+
export default class DomainsWait extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
|
|
6
|
+
app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
};
|
|
9
|
+
static args: {
|
|
10
|
+
hostname: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 wait_for_domain_1 = require("../../lib/domains/wait-for-domain");
|
|
6
|
+
class DomainsWait extends command_1.Command {
|
|
7
|
+
async run() {
|
|
8
|
+
const { args, flags } = await this.parse(DomainsWait);
|
|
9
|
+
let domains;
|
|
10
|
+
if (args.hostname) {
|
|
11
|
+
const { body: domain } = await this.heroku.get(`/apps/${flags.app}/domains/${args.hostname}`);
|
|
12
|
+
domains = [domain];
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
const { body: apiDomains } = await this.heroku.get(`/apps/${flags.app}/domains`);
|
|
16
|
+
domains = apiDomains.filter(domain => domain.status === 'pending');
|
|
17
|
+
}
|
|
18
|
+
for (const domain of domains) {
|
|
19
|
+
await (0, wait_for_domain_1.default)(flags.app, this.heroku, domain);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = DomainsWait;
|
|
24
|
+
DomainsWait.description = 'wait for domain to be active for an app';
|
|
25
|
+
DomainsWait.flags = {
|
|
26
|
+
help: command_1.flags.help({ char: 'h' }),
|
|
27
|
+
app: command_1.flags.app({ required: true }),
|
|
28
|
+
remote: command_1.flags.remote(),
|
|
29
|
+
};
|
|
30
|
+
DomainsWait.args = {
|
|
31
|
+
hostname: core_1.Args.string(),
|
|
32
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command } from '@heroku-cli/command';
|
|
2
|
+
export declare class GitClone extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static example: string;
|
|
5
|
+
static args: {
|
|
6
|
+
DIRECTORY: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
+
remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GitClone = void 0;
|
|
4
|
+
const command_1 = require("@heroku-cli/command");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const git_1 = require("../../lib/git/git");
|
|
7
|
+
class GitClone extends command_1.Command {
|
|
8
|
+
async run() {
|
|
9
|
+
const git = new git_1.default();
|
|
10
|
+
const { flags, args } = await this.parse(GitClone);
|
|
11
|
+
const { body: app } = await this.heroku.get(`/apps/${flags.app}`);
|
|
12
|
+
const directory = args.DIRECTORY || app.name;
|
|
13
|
+
const remote = flags.remote || 'heroku';
|
|
14
|
+
await git.spawn(['clone', '-o', remote, git.url(app.name), directory]);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.GitClone = GitClone;
|
|
18
|
+
GitClone.description = 'clones a heroku app to your local machine at DIRECTORY (defaults to app name)';
|
|
19
|
+
GitClone.example = `$ heroku git:clone -a example
|
|
20
|
+
Cloning into 'example'...
|
|
21
|
+
remote: Counting objects: 42, done.
|
|
22
|
+
...`;
|
|
23
|
+
GitClone.args = {
|
|
24
|
+
DIRECTORY: core_1.Args.string({ optional: true, description: 'where to clone the app' }),
|
|
25
|
+
};
|
|
26
|
+
GitClone.flags = {
|
|
27
|
+
app: command_1.flags.string({ char: 'a', env: 'HEROKU_APP', required: true, description: 'the Heroku app to use' }),
|
|
28
|
+
remote: command_1.flags.string({ char: 'r', description: 'the git remote to create, default "heroku"' }),
|
|
29
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command } from '@heroku-cli/command';
|
|
2
|
+
export declare class GitCredentials extends Command {
|
|
3
|
+
static hidden: boolean;
|
|
4
|
+
static description: string;
|
|
5
|
+
static args: {
|
|
6
|
+
command: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GitCredentials = void 0;
|
|
4
|
+
const command_1 = require("@heroku-cli/command");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
class GitCredentials extends command_1.Command {
|
|
7
|
+
async run() {
|
|
8
|
+
const { args } = await this.parse(GitCredentials);
|
|
9
|
+
switch (args.command) {
|
|
10
|
+
case 'get':
|
|
11
|
+
if (!this.heroku.auth)
|
|
12
|
+
throw new Error('not logged in');
|
|
13
|
+
this.log(`protocol=https
|
|
14
|
+
host=git.heroku.com
|
|
15
|
+
username=heroku
|
|
16
|
+
password=${this.heroku.auth}`);
|
|
17
|
+
break;
|
|
18
|
+
case 'erase':
|
|
19
|
+
case 'store':
|
|
20
|
+
// ignore
|
|
21
|
+
break;
|
|
22
|
+
default:
|
|
23
|
+
throw new Error(`unknown command: ${args.command}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.GitCredentials = GitCredentials;
|
|
28
|
+
GitCredentials.hidden = true;
|
|
29
|
+
GitCredentials.description = 'internal command for git-credentials';
|
|
30
|
+
GitCredentials.args = {
|
|
31
|
+
command: core_1.Args.string({ required: true }),
|
|
32
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from '@heroku-cli/command';
|
|
2
|
+
export declare class GitRemote extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static example: string;
|
|
5
|
+
static flags: {
|
|
6
|
+
app: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
};
|
|
9
|
+
static strict: boolean;
|
|
10
|
+
run(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GitRemote = void 0;
|
|
4
|
+
const color_1 = require("@heroku-cli/color");
|
|
5
|
+
const command_1 = require("@heroku-cli/command");
|
|
6
|
+
const git_1 = require("../../lib/git/git");
|
|
7
|
+
class GitRemote extends command_1.Command {
|
|
8
|
+
async run() {
|
|
9
|
+
const parsed = await this.parse(GitRemote);
|
|
10
|
+
const { flags } = parsed;
|
|
11
|
+
const argv = parsed.argv;
|
|
12
|
+
const git = new git_1.default();
|
|
13
|
+
const appName = flags.app || argv.shift() || process.env.HEROKU_APP;
|
|
14
|
+
if (!appName) {
|
|
15
|
+
this.error('Specify an app with --app');
|
|
16
|
+
}
|
|
17
|
+
const { body: app } = await this.heroku.get(`/apps/${appName}`);
|
|
18
|
+
const remote = flags.remote || (await git.remoteFromGitConfig()) || 'heroku';
|
|
19
|
+
const remotes = await git.exec(['remote']);
|
|
20
|
+
const url = git.url(app.name);
|
|
21
|
+
if (remotes.split('\n').includes(remote)) {
|
|
22
|
+
await git.exec(['remote', 'set-url', remote, url].concat(argv));
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
await git.exec(['remote', 'add', remote, url].concat(argv));
|
|
26
|
+
}
|
|
27
|
+
const newRemote = await git.remoteUrl(remote);
|
|
28
|
+
this.log(`set git remote ${color_1.default.cyan(remote)} to ${color_1.default.cyan(newRemote)}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.GitRemote = GitRemote;
|
|
32
|
+
GitRemote.description = `adds a git remote to an app repo
|
|
33
|
+
extra arguments will be passed to git remote add
|
|
34
|
+
`;
|
|
35
|
+
GitRemote.example = `# set git remote heroku to https://git.heroku.com/example.git
|
|
36
|
+
$ heroku git:remote -a example
|
|
37
|
+
|
|
38
|
+
# set git remote heroku-staging to https://git.heroku.com/example.git
|
|
39
|
+
$ heroku git:remote --remote heroku-staging -a example`;
|
|
40
|
+
GitRemote.flags = {
|
|
41
|
+
app: command_1.flags.string({ char: 'a', description: 'the Heroku app to use' }),
|
|
42
|
+
remote: command_1.flags.string({ char: 'r', description: 'the git remote to create' }),
|
|
43
|
+
};
|
|
44
|
+
GitRemote.strict = false;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from '@heroku-cli/command';
|
|
2
|
+
import { FlagInput } from '@oclif/core/lib/interfaces/parser';
|
|
3
|
+
export default class LabsDisable extends Command {
|
|
4
|
+
static description: string;
|
|
5
|
+
static args: {
|
|
6
|
+
feature: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: FlagInput;
|
|
9
|
+
run(): Promise<void>;
|
|
10
|
+
disableFeature(feature: string, app?: string): Promise<any>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const color_1 = require("@heroku-cli/color");
|
|
4
|
+
const command_1 = require("@heroku-cli/command");
|
|
5
|
+
const core_1 = require("@oclif/core");
|
|
6
|
+
const SecurityExceptionFeatures = {
|
|
7
|
+
'spaces-strict-tls': {
|
|
8
|
+
async prompt(app) {
|
|
9
|
+
core_1.ux.warn('Insecure Action');
|
|
10
|
+
const name = await core_1.ux.prompt(`You are enabling an older security protocol, TLS 1.0, which some organizations may not deem secure.
|
|
11
|
+
To proceed, type ${app} or re-run this command with --confirm ${app}`);
|
|
12
|
+
return name;
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
class LabsDisable extends command_1.Command {
|
|
17
|
+
async run() {
|
|
18
|
+
const { args, flags } = await this.parse(LabsDisable);
|
|
19
|
+
const feature = args.feature;
|
|
20
|
+
let request;
|
|
21
|
+
let target;
|
|
22
|
+
if (SecurityExceptionFeatures[feature]) {
|
|
23
|
+
if (flags.confirm !== flags.app) {
|
|
24
|
+
const prompt = SecurityExceptionFeatures[feature].prompt;
|
|
25
|
+
const confirm = await prompt(flags.app);
|
|
26
|
+
if (confirm !== flags.app) {
|
|
27
|
+
this.error('Confirmation name did not match app name. Try again.');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
try {
|
|
32
|
+
await this.heroku.get(`/account/features/${feature}`);
|
|
33
|
+
request = this.disableFeature(feature);
|
|
34
|
+
target = (await this.heroku.get('/account')).body.email;
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
if (error.http.statusCode !== 404)
|
|
38
|
+
throw error;
|
|
39
|
+
// might be an app feature
|
|
40
|
+
if (!flags.app)
|
|
41
|
+
throw error;
|
|
42
|
+
await this.heroku.get(`/apps/${flags.app}/features/${feature}`);
|
|
43
|
+
request = this.disableFeature(feature, flags.app);
|
|
44
|
+
target = flags.app;
|
|
45
|
+
}
|
|
46
|
+
core_1.ux.action.start(`Disabling ${color_1.default.green(feature)} for ${color_1.default.cyan(target)}`);
|
|
47
|
+
await request;
|
|
48
|
+
core_1.ux.action.stop();
|
|
49
|
+
}
|
|
50
|
+
disableFeature(feature, app) {
|
|
51
|
+
return this.heroku.patch(app ? `/apps/${app}/features/${feature}` : `/account/features/${feature}`, {
|
|
52
|
+
body: { enabled: false },
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.default = LabsDisable;
|
|
57
|
+
LabsDisable.description = 'disables an experimental feature';
|
|
58
|
+
LabsDisable.args = {
|
|
59
|
+
feature: core_1.Args.string({ required: true }),
|
|
60
|
+
};
|
|
61
|
+
LabsDisable.flags = {
|
|
62
|
+
app: command_1.flags.app(),
|
|
63
|
+
remote: command_1.flags.remote(),
|
|
64
|
+
confirm: command_1.flags.string({ required: false }),
|
|
65
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class Index extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static aliases: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
processname: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static examples: string[];
|
|
9
|
+
static flags: {
|
|
10
|
+
procfile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
env: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
port: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
13
|
+
restart: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
concurrency: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
15
|
+
};
|
|
16
|
+
run(): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const completions_1 = require("@heroku-cli/command/lib/completions");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const fork_foreman_1 = require("../../lib/local/fork-foreman");
|
|
6
|
+
// eslint-disable-next-line node/no-missing-require
|
|
7
|
+
const Procfile = require('../../lib/local/load-foreman-procfile');
|
|
8
|
+
class Index extends core_1.Command {
|
|
9
|
+
async run() {
|
|
10
|
+
const execArgv = ['start'];
|
|
11
|
+
const { args, flags } = await this.parse(Index);
|
|
12
|
+
if (flags.restart) {
|
|
13
|
+
this.error('--restart is no longer available\nUse forego instead: https://github.com/ddollar/forego');
|
|
14
|
+
}
|
|
15
|
+
if (flags.concurrency) {
|
|
16
|
+
this.error('--concurrency is no longer available\nUse forego instead: https://github.com/ddollar/forego');
|
|
17
|
+
}
|
|
18
|
+
if (flags.procfile)
|
|
19
|
+
execArgv.push('--procfile', flags.procfile);
|
|
20
|
+
if (flags.env)
|
|
21
|
+
execArgv.push('--env', flags.env);
|
|
22
|
+
if (flags.port)
|
|
23
|
+
execArgv.push('--port', flags.port);
|
|
24
|
+
if (args.processname) {
|
|
25
|
+
execArgv.push(args.processname);
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
const procfile = flags.procfile || 'Procfile';
|
|
29
|
+
const procHash = Procfile.loadProc(procfile);
|
|
30
|
+
const processes = Object.keys(procHash).filter(x => x !== 'release');
|
|
31
|
+
execArgv.push(processes.join(','));
|
|
32
|
+
}
|
|
33
|
+
await (0, fork_foreman_1.fork)(execArgv);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.default = Index;
|
|
37
|
+
// \n splits the description between the title shown in the help
|
|
38
|
+
// and the DESCRIPTION section shown in the help
|
|
39
|
+
Index.description = 'run heroku app locally\nStart the application specified by a Procfile (defaults to ./Procfile)';
|
|
40
|
+
Index.aliases = ['local:start'];
|
|
41
|
+
Index.args = {
|
|
42
|
+
processname: core_1.Args.string({ required: false }),
|
|
43
|
+
};
|
|
44
|
+
Index.examples = [
|
|
45
|
+
`$ heroku local
|
|
46
|
+
$ heroku local web
|
|
47
|
+
$ heroku local web=2
|
|
48
|
+
$ heroku local web=1,worker=2`,
|
|
49
|
+
];
|
|
50
|
+
Index.flags = {
|
|
51
|
+
procfile: core_1.Flags.string({
|
|
52
|
+
char: 'f',
|
|
53
|
+
description: 'use a different Procfile',
|
|
54
|
+
completion: completions_1.FileCompletion,
|
|
55
|
+
}),
|
|
56
|
+
env: core_1.Flags.string({
|
|
57
|
+
char: 'e',
|
|
58
|
+
description: 'location of env file (defaults to .env)',
|
|
59
|
+
completion: completions_1.FileCompletion,
|
|
60
|
+
}),
|
|
61
|
+
port: core_1.Flags.string({
|
|
62
|
+
char: 'p',
|
|
63
|
+
description: 'port to listen on',
|
|
64
|
+
}),
|
|
65
|
+
restart: core_1.Flags.boolean({
|
|
66
|
+
char: 'r',
|
|
67
|
+
description: 'restart process if it dies',
|
|
68
|
+
hidden: true,
|
|
69
|
+
}),
|
|
70
|
+
concurrency: core_1.Flags.string({
|
|
71
|
+
char: 'c',
|
|
72
|
+
description: 'number of processes to start',
|
|
73
|
+
hidden: true,
|
|
74
|
+
}),
|
|
75
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class Run extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static strict: boolean;
|
|
6
|
+
static flags: {
|
|
7
|
+
env: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
port: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const completions_1 = require("@heroku-cli/command/lib/completions");
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const fork_foreman_1 = require("../../lib/local/fork-foreman");
|
|
6
|
+
class Run extends core_1.Command {
|
|
7
|
+
async run() {
|
|
8
|
+
const execArgv = ['run'];
|
|
9
|
+
const { argv, flags } = await this.parse(Run);
|
|
10
|
+
if (argv.length === 0) {
|
|
11
|
+
const errorMessage = 'Usage: heroku local:run [COMMAND]\nMust specify command to run';
|
|
12
|
+
this.error(errorMessage, { exit: -1 });
|
|
13
|
+
}
|
|
14
|
+
if (flags.env)
|
|
15
|
+
execArgv.push('--env', flags.env);
|
|
16
|
+
if (flags.port)
|
|
17
|
+
execArgv.push('--port', flags.port);
|
|
18
|
+
execArgv.push('--'); // disable node-foreman flag parsing
|
|
19
|
+
execArgv.push(...argv); // eslint-disable-line unicorn/no-array-push-push
|
|
20
|
+
await (0, fork_foreman_1.fork)(execArgv);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = Run;
|
|
24
|
+
Run.description = 'run a one-off command';
|
|
25
|
+
Run.examples = [
|
|
26
|
+
'$ heroku local:run bin/migrate',
|
|
27
|
+
];
|
|
28
|
+
Run.strict = false;
|
|
29
|
+
Run.flags = {
|
|
30
|
+
env: core_1.Flags.string({
|
|
31
|
+
char: 'e',
|
|
32
|
+
completion: completions_1.FileCompletion,
|
|
33
|
+
}),
|
|
34
|
+
port: core_1.Flags.string({
|
|
35
|
+
char: 'p',
|
|
36
|
+
default: '5001',
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const fork_foreman_1 = require("../../lib/local/fork-foreman");
|
|
5
|
+
class Version extends core_1.Command {
|
|
6
|
+
async run() {
|
|
7
|
+
await this.parse(Version);
|
|
8
|
+
const execArgv = ['--version'];
|
|
9
|
+
await (0, fork_foreman_1.fork)(execArgv);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.default = Version;
|
|
13
|
+
Version.description = 'display node-foreman version';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command } from '@heroku-cli/command';
|
|
2
|
+
export default class Logs extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
num: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
ps: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
10
|
+
dyno: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
11
|
+
source: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
12
|
+
tail: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
'force-colors': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
|
4
|
+
// tslint:disable:file-name-casing
|
|
5
|
+
const color_1 = require("@heroku-cli/color");
|
|
6
|
+
const command_1 = require("@heroku-cli/command");
|
|
7
|
+
const completions_1 = require("@heroku-cli/command/lib/completions");
|
|
8
|
+
const log_displayer_1 = require("../lib/run/log-displayer");
|
|
9
|
+
class Logs extends command_1.Command {
|
|
10
|
+
async run() {
|
|
11
|
+
const { flags } = await this.parse(Logs);
|
|
12
|
+
color_1.default.enabled = flags['force-colors'] || color_1.default.enabled;
|
|
13
|
+
await (0, log_displayer_1.default)(this.heroku, {
|
|
14
|
+
app: flags.app,
|
|
15
|
+
// @ts-ignore
|
|
16
|
+
dyno: flags.dyno || flags.ps,
|
|
17
|
+
lines: flags.num || 100,
|
|
18
|
+
tail: flags.tail,
|
|
19
|
+
source: flags.source,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = Logs;
|
|
24
|
+
Logs.description = `display recent log output
|
|
25
|
+
disable colors with --no-color, HEROKU_LOGS_COLOR=0, or HEROKU_COLOR=0`;
|
|
26
|
+
Logs.examples = [
|
|
27
|
+
'$ heroku logs --app=my-app',
|
|
28
|
+
'$ heroku logs --num=50',
|
|
29
|
+
'$ heroku logs --dyno=web --app=my-app',
|
|
30
|
+
'$ heroku logs --app=my-app --tail',
|
|
31
|
+
];
|
|
32
|
+
Logs.flags = {
|
|
33
|
+
app: command_1.flags.app({ required: true }),
|
|
34
|
+
remote: command_1.flags.remote(),
|
|
35
|
+
num: command_1.flags.integer({ char: 'n', description: 'number of lines to display' }),
|
|
36
|
+
ps: command_1.flags.string({ char: 'p', description: 'hidden alias for dyno', hidden: true }),
|
|
37
|
+
dyno: command_1.flags.string({
|
|
38
|
+
char: 'd',
|
|
39
|
+
description: 'only show output from this dyno type (such as "web" or "worker")',
|
|
40
|
+
completion: completions_1.ProcessTypeCompletion,
|
|
41
|
+
}),
|
|
42
|
+
source: command_1.flags.string({ char: 's', description: 'only show output from this source (such as "app" or "heroku")' }),
|
|
43
|
+
tail: command_1.flags.boolean({ char: 't', description: 'continually stream logs' }),
|
|
44
|
+
'force-colors': command_1.flags.boolean({ description: 'force use of colors (even on non-tty output)' }),
|
|
45
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Command } from '@heroku-cli/command';
|
|
2
|
+
export default class PipelinesAdd extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static flags: {
|
|
6
|
+
app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
stage: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
9
|
+
};
|
|
10
|
+
static args: {
|
|
11
|
+
pipeline: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
12
|
+
};
|
|
13
|
+
run(): Promise<void>;
|
|
14
|
+
}
|