heroku 8.1.8 → 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 +81 -43
- package/lib/hooks/update/b.d.ts +0 -2
- package/lib/hooks/update/b.js +0 -48
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Command } from '@heroku-cli/command';
|
|
2
|
+
export default class AuthorizationsRotate extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static args: {
|
|
5
|
+
id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
run(): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 authorizations_1 = require("../../lib/authorizations/authorizations");
|
|
6
|
+
class AuthorizationsRotate extends command_1.Command {
|
|
7
|
+
async run() {
|
|
8
|
+
const { args } = await this.parse(AuthorizationsRotate);
|
|
9
|
+
core_1.ux.action.start('Rotating OAuth Authorization');
|
|
10
|
+
const { body: authorization } = await this.heroku.post(`/oauth/authorizations/${encodeURIComponent(args.id)}/actions/regenerate-tokens`);
|
|
11
|
+
core_1.ux.action.stop();
|
|
12
|
+
(0, authorizations_1.display)(authorization);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.default = AuthorizationsRotate;
|
|
16
|
+
AuthorizationsRotate.description = 'updates an OAuth authorization token';
|
|
17
|
+
AuthorizationsRotate.args = {
|
|
18
|
+
id: core_1.Args.string({ required: true }),
|
|
19
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command } from '@heroku-cli/command';
|
|
2
|
+
export default class AuthorizationsUpdate extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
description: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
6
|
+
'client-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
'client-secret': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
8
|
+
};
|
|
9
|
+
static args: {
|
|
10
|
+
id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 authorizations_1 = require("../../lib/authorizations/authorizations");
|
|
6
|
+
class AuthorizationsUpdate extends command_1.Command {
|
|
7
|
+
async run() {
|
|
8
|
+
const { args, flags } = await this.parse(AuthorizationsUpdate);
|
|
9
|
+
core_1.ux.action.start('Updating OAuth Authorization');
|
|
10
|
+
let client;
|
|
11
|
+
if (flags['client-id']) {
|
|
12
|
+
client = {
|
|
13
|
+
id: flags['client-id'],
|
|
14
|
+
secret: flags['client-secret'],
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
const { body: authentication } = await this.heroku.patch(`/oauth/authorizations/${args.id}`, {
|
|
18
|
+
body: {
|
|
19
|
+
description: flags.description,
|
|
20
|
+
client,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
core_1.ux.action.stop();
|
|
24
|
+
(0, authorizations_1.display)(authentication);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.default = AuthorizationsUpdate;
|
|
28
|
+
AuthorizationsUpdate.description = 'updates an OAuth authorization';
|
|
29
|
+
AuthorizationsUpdate.flags = {
|
|
30
|
+
description: command_1.flags.string({ char: 'd', description: 'set a custom authorization description' }),
|
|
31
|
+
'client-id': command_1.flags.string({ description: 'identifier of OAuth client to set', dependsOn: ['client-secret'] }),
|
|
32
|
+
'client-secret': command_1.flags.string({ description: 'secret of OAuth client to set', dependsOn: ['client-id'] }),
|
|
33
|
+
};
|
|
34
|
+
AuthorizationsUpdate.args = {
|
|
35
|
+
id: core_1.Args.string({ required: true }),
|
|
36
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AutocompleteBase } from '../../lib/autocomplete/base';
|
|
2
|
+
export default class Create extends AutocompleteBase {
|
|
3
|
+
static hidden: boolean;
|
|
4
|
+
static description: string;
|
|
5
|
+
private _commands?;
|
|
6
|
+
run(): Promise<void>;
|
|
7
|
+
private ensureDirs;
|
|
8
|
+
private createFiles;
|
|
9
|
+
private get bashSetupScriptPath();
|
|
10
|
+
private get bashCommandsListPath();
|
|
11
|
+
private get zshSetupScriptPath();
|
|
12
|
+
private get zshCompletionSettersPath();
|
|
13
|
+
private get skipEllipsis();
|
|
14
|
+
private get commands();
|
|
15
|
+
private get bashCommandsList();
|
|
16
|
+
private get zshCompletionSetters();
|
|
17
|
+
private get zshCommandsSetter();
|
|
18
|
+
private get zshCommandsFlagsSetters();
|
|
19
|
+
private genCmdPublicFlags;
|
|
20
|
+
private genCmdWithDescription;
|
|
21
|
+
private genZshCmdFlagsSetter;
|
|
22
|
+
private genZshAllCmdsListSetter;
|
|
23
|
+
private get envAnalyticsDir();
|
|
24
|
+
private get envCommandsPath();
|
|
25
|
+
private get bashSetupScript();
|
|
26
|
+
private get zshSetupScript();
|
|
27
|
+
private get completionDotsFunc();
|
|
28
|
+
private wantsLocalFiles;
|
|
29
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const fs = require("fs-extra");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const base_1 = require("../../lib/autocomplete/base");
|
|
6
|
+
const debug = require('debug')('autocomplete:create');
|
|
7
|
+
const AC_LIB_PATH = path.resolve(__dirname, '..', '..', '..', 'autocomplete-scripts');
|
|
8
|
+
class Create extends base_1.AutocompleteBase {
|
|
9
|
+
async run() {
|
|
10
|
+
this.errorIfWindows();
|
|
11
|
+
// 1. ensure needed dirs
|
|
12
|
+
await this.ensureDirs();
|
|
13
|
+
// 2. save (generated) autocomplete files
|
|
14
|
+
await this.createFiles();
|
|
15
|
+
}
|
|
16
|
+
async ensureDirs() {
|
|
17
|
+
// ensure autocomplete cache dir
|
|
18
|
+
await fs.ensureDir(this.autocompleteCacheDir);
|
|
19
|
+
// ensure autocomplete completions dir
|
|
20
|
+
await fs.ensureDir(this.completionsCacheDir);
|
|
21
|
+
}
|
|
22
|
+
async createFiles() {
|
|
23
|
+
await fs.writeFile(this.bashSetupScriptPath, this.bashSetupScript);
|
|
24
|
+
await fs.writeFile(this.zshSetupScriptPath, this.zshSetupScript);
|
|
25
|
+
await fs.writeFile(this.bashCommandsListPath, this.bashCommandsList);
|
|
26
|
+
await fs.writeFile(this.zshCompletionSettersPath, this.zshCompletionSetters);
|
|
27
|
+
}
|
|
28
|
+
get bashSetupScriptPath() {
|
|
29
|
+
// <cacheDir>/autocomplete/bash_setup
|
|
30
|
+
return path.join(this.autocompleteCacheDir, 'bash_setup');
|
|
31
|
+
}
|
|
32
|
+
get bashCommandsListPath() {
|
|
33
|
+
// <cacheDir>/autocomplete/commands
|
|
34
|
+
return path.join(this.autocompleteCacheDir, 'commands');
|
|
35
|
+
}
|
|
36
|
+
get zshSetupScriptPath() {
|
|
37
|
+
// <cacheDir>/autocomplete/zsh_setup
|
|
38
|
+
return path.join(this.autocompleteCacheDir, 'zsh_setup');
|
|
39
|
+
}
|
|
40
|
+
get zshCompletionSettersPath() {
|
|
41
|
+
// <cacheDir>/autocomplete/commands_setters
|
|
42
|
+
return path.join(this.autocompleteCacheDir, 'commands_setters');
|
|
43
|
+
}
|
|
44
|
+
get skipEllipsis() {
|
|
45
|
+
return process.env.HEROKU_AC_ZSH_SKIP_ELLIPSIS === '1';
|
|
46
|
+
}
|
|
47
|
+
get commands() {
|
|
48
|
+
if (this._commands)
|
|
49
|
+
return this._commands;
|
|
50
|
+
const plugins = this.config.plugins;
|
|
51
|
+
const commands = [];
|
|
52
|
+
plugins.forEach(p => {
|
|
53
|
+
p.commands.forEach(c => {
|
|
54
|
+
if (c.hidden)
|
|
55
|
+
return;
|
|
56
|
+
try {
|
|
57
|
+
commands.push(c);
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
debug(`Error creating completions for command ${c.id}`);
|
|
61
|
+
debug(error.message);
|
|
62
|
+
this.writeLogFile(error.message);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
this._commands = commands;
|
|
67
|
+
return this._commands;
|
|
68
|
+
}
|
|
69
|
+
get bashCommandsList() {
|
|
70
|
+
return this.commands.map(c => {
|
|
71
|
+
try {
|
|
72
|
+
const publicFlags = this.genCmdPublicFlags(c).trim();
|
|
73
|
+
return `${c.id} ${publicFlags}`;
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
debug(`Error creating bash completion for command ${c.id}, moving on...`);
|
|
77
|
+
debug(error.message);
|
|
78
|
+
this.writeLogFile(error.message);
|
|
79
|
+
return '';
|
|
80
|
+
}
|
|
81
|
+
}).join('\n');
|
|
82
|
+
}
|
|
83
|
+
get zshCompletionSetters() {
|
|
84
|
+
const cmdsSetter = this.zshCommandsSetter;
|
|
85
|
+
const flagSetters = this.zshCommandsFlagsSetters;
|
|
86
|
+
return `${cmdsSetter}\n${flagSetters}`;
|
|
87
|
+
}
|
|
88
|
+
get zshCommandsSetter() {
|
|
89
|
+
const cmdsWithDescriptions = this.commands.map(c => {
|
|
90
|
+
try {
|
|
91
|
+
return this.genCmdWithDescription(c);
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
debug(`Error creating zsh autocomplete for command ${c.id}, moving on...`);
|
|
95
|
+
debug(error.message);
|
|
96
|
+
this.writeLogFile(error.message);
|
|
97
|
+
return '';
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
return this.genZshAllCmdsListSetter(cmdsWithDescriptions);
|
|
101
|
+
}
|
|
102
|
+
get zshCommandsFlagsSetters() {
|
|
103
|
+
return this.commands.map(c => {
|
|
104
|
+
try {
|
|
105
|
+
return this.genZshCmdFlagsSetter(c);
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
debug(`Error creating zsh autocomplete for command ${c.id}, moving on...`);
|
|
109
|
+
debug(error.message);
|
|
110
|
+
this.writeLogFile(error.message);
|
|
111
|
+
return '';
|
|
112
|
+
}
|
|
113
|
+
}).join('\n');
|
|
114
|
+
}
|
|
115
|
+
genCmdPublicFlags(command) {
|
|
116
|
+
const Flags = command.flags || {};
|
|
117
|
+
return Object.keys(Flags)
|
|
118
|
+
.filter(flag => !Flags[flag].hidden)
|
|
119
|
+
.map(flag => `--${flag}`)
|
|
120
|
+
.join(' ');
|
|
121
|
+
}
|
|
122
|
+
genCmdWithDescription(command) {
|
|
123
|
+
let description = '';
|
|
124
|
+
if (command.description) {
|
|
125
|
+
const text = command.description.split('\n')[0];
|
|
126
|
+
description = `:"${text}"`;
|
|
127
|
+
}
|
|
128
|
+
return `"${command.id.replace(/:/g, '\\:')}"${description}`;
|
|
129
|
+
}
|
|
130
|
+
genZshCmdFlagsSetter(command) {
|
|
131
|
+
const id = command.id;
|
|
132
|
+
const flagscompletions = Object.keys(command.flags || {})
|
|
133
|
+
.filter(flag => command.flags && !command.flags[flag].hidden)
|
|
134
|
+
.map(flag => {
|
|
135
|
+
const f = (command.flags && command.flags[flag]) || { description: '' };
|
|
136
|
+
const isBoolean = f.type === 'boolean';
|
|
137
|
+
const hasCompletion = 'completion' in f || this.findCompletion(id, flag, f.description);
|
|
138
|
+
const name = isBoolean ? flag : `${flag}=-`;
|
|
139
|
+
let cachecompl = '';
|
|
140
|
+
if (hasCompletion) {
|
|
141
|
+
cachecompl = ': :_compadd_flag_options';
|
|
142
|
+
}
|
|
143
|
+
if (this.wantsLocalFiles(flag)) {
|
|
144
|
+
cachecompl = ': :_files';
|
|
145
|
+
}
|
|
146
|
+
const help = isBoolean ? '(switch) ' : (hasCompletion ? '(autocomplete) ' : '');
|
|
147
|
+
const completion = `--${name}[${help}${f.description}]${cachecompl}`;
|
|
148
|
+
return `"${completion}"`;
|
|
149
|
+
})
|
|
150
|
+
.join('\n');
|
|
151
|
+
if (flagscompletions) {
|
|
152
|
+
return `_set_${id.replace(/:/g, '_')}_flags () {
|
|
153
|
+
_flags=(
|
|
154
|
+
${flagscompletions}
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
`;
|
|
158
|
+
}
|
|
159
|
+
return `# no flags for ${id}`;
|
|
160
|
+
}
|
|
161
|
+
genZshAllCmdsListSetter(cmdsWithDesc) {
|
|
162
|
+
return `
|
|
163
|
+
_set_all_commands_list () {
|
|
164
|
+
_all_commands_list=(
|
|
165
|
+
${cmdsWithDesc.join('\n')}
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
`;
|
|
169
|
+
}
|
|
170
|
+
get envAnalyticsDir() {
|
|
171
|
+
return `HEROKU_AC_ANALYTICS_DIR=${path.join(this.autocompleteCacheDir, 'completion_analytics')};`;
|
|
172
|
+
}
|
|
173
|
+
get envCommandsPath() {
|
|
174
|
+
return `HEROKU_AC_COMMANDS_PATH=${path.join(this.autocompleteCacheDir, 'commands')};`;
|
|
175
|
+
}
|
|
176
|
+
get bashSetupScript() {
|
|
177
|
+
return `${this.envAnalyticsDir}
|
|
178
|
+
${this.envCommandsPath}
|
|
179
|
+
HEROKU_AC_BASH_COMPFUNC_PATH=${path.join(AC_LIB_PATH, 'bash', 'heroku.bash')} && test -f $HEROKU_AC_BASH_COMPFUNC_PATH && source $HEROKU_AC_BASH_COMPFUNC_PATH;
|
|
180
|
+
`;
|
|
181
|
+
}
|
|
182
|
+
get zshSetupScript() {
|
|
183
|
+
return `${this.skipEllipsis ? '' : this.completionDotsFunc}
|
|
184
|
+
${this.envAnalyticsDir}
|
|
185
|
+
${this.envCommandsPath}
|
|
186
|
+
HEROKU_AC_ZSH_SETTERS_PATH=\${HEROKU_AC_COMMANDS_PATH}_setters && test -f $HEROKU_AC_ZSH_SETTERS_PATH && source $HEROKU_AC_ZSH_SETTERS_PATH;
|
|
187
|
+
fpath=(
|
|
188
|
+
${path.join(AC_LIB_PATH, 'zsh')}
|
|
189
|
+
$fpath
|
|
190
|
+
);
|
|
191
|
+
autoload -Uz compinit;
|
|
192
|
+
compinit;
|
|
193
|
+
`;
|
|
194
|
+
}
|
|
195
|
+
get completionDotsFunc() {
|
|
196
|
+
return `expand-or-complete-with-dots() {
|
|
197
|
+
echo -n "..."
|
|
198
|
+
zle expand-or-complete
|
|
199
|
+
zle redisplay
|
|
200
|
+
}
|
|
201
|
+
zle -N expand-or-complete-with-dots
|
|
202
|
+
bindkey "^I" expand-or-complete-with-dots`;
|
|
203
|
+
}
|
|
204
|
+
wantsLocalFiles(flag) {
|
|
205
|
+
return [
|
|
206
|
+
'file',
|
|
207
|
+
'procfile',
|
|
208
|
+
].includes(flag);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
exports.default = Create;
|
|
212
|
+
Create.hidden = true;
|
|
213
|
+
Create.description = 'create autocomplete setup scripts and completion functions';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FlagInput } from '@oclif/core/lib/interfaces/parser';
|
|
2
|
+
import { AutocompleteBase } from '../../lib/autocomplete/base';
|
|
3
|
+
export default class Doctor extends AutocompleteBase {
|
|
4
|
+
static hidden: boolean;
|
|
5
|
+
static description: string;
|
|
6
|
+
static args: {
|
|
7
|
+
shell: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: FlagInput;
|
|
10
|
+
run(): Promise<void>;
|
|
11
|
+
private printList;
|
|
12
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
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 fs = require("fs-extra");
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const base_1 = require("../../lib/autocomplete/base");
|
|
8
|
+
class Doctor extends base_1.AutocompleteBase {
|
|
9
|
+
async run() {
|
|
10
|
+
const { args, flags } = await this.parse(Doctor);
|
|
11
|
+
const shell = args.shell || this.config.shell;
|
|
12
|
+
const printLine = (...args) => this.log(...args);
|
|
13
|
+
this.errorIfNotSupportedShell(shell);
|
|
14
|
+
const data = [];
|
|
15
|
+
// cli version
|
|
16
|
+
data.push({ name: 'cli version', value: this.config.version });
|
|
17
|
+
// plugin version
|
|
18
|
+
const pjson = require(path.resolve(__dirname, '..', '..', '..', 'package.json'));
|
|
19
|
+
data.push({ name: 'plugin version', value: pjson.version });
|
|
20
|
+
// check shell shim source env var
|
|
21
|
+
// i.e. HEROKU_AC_<shell>_SETUP_PATH
|
|
22
|
+
const shellProfilePath = path.join(process.env.HOME || '', shell === 'zsh' ? '.zshrc' : '.bashrc');
|
|
23
|
+
const shellProfile = fs.readFileSync(shellProfilePath);
|
|
24
|
+
const regex = /AC_\w+_SETUP_PATH/;
|
|
25
|
+
const shimVlaue = regex.exec(shellProfile.toString()) ? 'present' : 'missing';
|
|
26
|
+
data.push({ name: `~/${shell === 'zsh' ? '.zshrc' : '.bashrc'} shimmed`, value: shimVlaue });
|
|
27
|
+
// check shell shim
|
|
28
|
+
const shellCompletion = path.join(this.autocompleteCacheDir, `${shell}_setup`);
|
|
29
|
+
const shellCompletionValue = fs.existsSync(shellCompletion) ? 'present' : 'missing';
|
|
30
|
+
data.push({ name: `${shell} shim file`, value: shellCompletionValue });
|
|
31
|
+
// check shell command cache
|
|
32
|
+
const shellCmdCache = path.join(this.autocompleteCacheDir, shell === 'zsh' ? 'commands_setters' : 'commands');
|
|
33
|
+
const shellCmdCacheValue = fs.existsSync(shellCmdCache) ? 'present' : 'missing';
|
|
34
|
+
data.push({ name: `${shell} commands cache`, value: shellCmdCacheValue });
|
|
35
|
+
// check app completion cache
|
|
36
|
+
const appsCache = path.join(this.completionsCacheDir, 'app');
|
|
37
|
+
let appsCacheValue;
|
|
38
|
+
if (fs.existsSync(appsCache)) {
|
|
39
|
+
const length = fs.readJSONSync(appsCache).length;
|
|
40
|
+
appsCacheValue = length || 'empty';
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
appsCacheValue = 'missing';
|
|
44
|
+
}
|
|
45
|
+
data.push({ name: 'apps completion cache', value: appsCacheValue });
|
|
46
|
+
core_1.ux.table(data, {
|
|
47
|
+
name: {},
|
|
48
|
+
value: {},
|
|
49
|
+
}, { 'no-header': true, printLine });
|
|
50
|
+
if (flags.verbose)
|
|
51
|
+
this.printList();
|
|
52
|
+
}
|
|
53
|
+
printList() {
|
|
54
|
+
this.log();
|
|
55
|
+
const header = 'Completable Commands';
|
|
56
|
+
this.log(header);
|
|
57
|
+
this.log('='.repeat(header.length));
|
|
58
|
+
this.config.plugins.forEach(p => {
|
|
59
|
+
p.commands.forEach(c => {
|
|
60
|
+
try {
|
|
61
|
+
if (c.hidden) {
|
|
62
|
+
this.log(`${c.id} (hidden)`);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
const results = Object.keys(c.flags).map((f) => {
|
|
66
|
+
let out = `--${f}`;
|
|
67
|
+
const flag = c.flags[f];
|
|
68
|
+
if (flag.type === 'option')
|
|
69
|
+
out += '=';
|
|
70
|
+
const hasCompletion = 'completion' in flag || this.findCompletion(c.id, f, flag.description);
|
|
71
|
+
if (hasCompletion) {
|
|
72
|
+
out += '(c)';
|
|
73
|
+
}
|
|
74
|
+
if (flag.hidden)
|
|
75
|
+
out += '(h)';
|
|
76
|
+
return out;
|
|
77
|
+
});
|
|
78
|
+
if (results.length > 0)
|
|
79
|
+
this.log(`${c.id} -> ${results}`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
catch (_a) {
|
|
83
|
+
this.log(`Error creating autocomplete for command ${c.id}`);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.default = Doctor;
|
|
90
|
+
Doctor.hidden = true;
|
|
91
|
+
Doctor.description = 'autocomplete diagnostic';
|
|
92
|
+
Doctor.args = {
|
|
93
|
+
shell: core_1.Args.string({ description: 'shell type', required: false }),
|
|
94
|
+
};
|
|
95
|
+
Doctor.flags = {
|
|
96
|
+
verbose: command_1.flags.boolean({ description: 'list completable commands' }),
|
|
97
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FlagInput } from '@oclif/core/lib/interfaces/parser';
|
|
2
|
+
import { AutocompleteBase } from '../../lib/autocomplete/base';
|
|
3
|
+
export default class Index extends AutocompleteBase {
|
|
4
|
+
static description: string;
|
|
5
|
+
static args: {
|
|
6
|
+
shell: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: FlagInput;
|
|
9
|
+
static examples: string[];
|
|
10
|
+
run(): Promise<void>;
|
|
11
|
+
private updateCache;
|
|
12
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const command_1 = require("@heroku-cli/command");
|
|
4
|
+
const completions_1 = require("@heroku-cli/command/lib/completions");
|
|
5
|
+
const chalk_1 = require("chalk");
|
|
6
|
+
const core_1 = require("@oclif/core");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
const base_1 = require("../../lib/autocomplete/base");
|
|
9
|
+
const cache_1 = require("../../lib/autocomplete/cache");
|
|
10
|
+
const create_1 = require("./create");
|
|
11
|
+
class Index extends base_1.AutocompleteBase {
|
|
12
|
+
async run() {
|
|
13
|
+
const { args, flags } = await this.parse(Index);
|
|
14
|
+
const shell = args.shell || this.config.shell;
|
|
15
|
+
this.errorIfNotSupportedShell(shell);
|
|
16
|
+
core_1.ux.action.start(`${chalk_1.default.bold('Building the autocomplete cache')}`);
|
|
17
|
+
await create_1.default.run([], this.config);
|
|
18
|
+
await this.updateCache(completions_1.AppCompletion, 'app');
|
|
19
|
+
await this.updateCache(completions_1.PipelineCompletion, 'pipeline');
|
|
20
|
+
await this.updateCache(completions_1.SpaceCompletion, 'space');
|
|
21
|
+
await this.updateCache(completions_1.TeamCompletion, 'team');
|
|
22
|
+
core_1.ux.action.stop();
|
|
23
|
+
if (!flags['refresh-cache']) {
|
|
24
|
+
const bin = this.config.bin;
|
|
25
|
+
const bashNote = 'If your terminal starts as a login shell you may need to print the init script into ~/.bash_profile or ~/.profile.';
|
|
26
|
+
const zshNote = `After sourcing, you can run \`${chalk_1.default.cyan('$ compaudit -D')}\` to ensure no permissions conflicts are present`;
|
|
27
|
+
const note = shell === 'zsh' ? zshNote : bashNote;
|
|
28
|
+
const tabStr = shell === 'bash' ? '<TAB><TAB>' : '<TAB>';
|
|
29
|
+
this.log(`
|
|
30
|
+
${chalk_1.default.bold(`Setup Instructions for ${bin.toUpperCase()} CLI Autocomplete ---`)}
|
|
31
|
+
|
|
32
|
+
1) Add the autocomplete env var to your ${shell} profile and source it
|
|
33
|
+
${chalk_1.default.cyan(`$ printf "$(${bin} autocomplete:script ${shell})" >> ~/.${shell}rc; source ~/.${shell}rc`)}
|
|
34
|
+
|
|
35
|
+
NOTE: ${note}
|
|
36
|
+
|
|
37
|
+
2) Test it out, e.g.:
|
|
38
|
+
${chalk_1.default.cyan(`$ ${bin} ${tabStr}`)} # Command completion
|
|
39
|
+
${chalk_1.default.cyan(`$ ${bin} apps:info --${tabStr}`)} # Flag completion
|
|
40
|
+
${chalk_1.default.cyan(`$ ${bin} apps:info --app=${tabStr}`)} # Flag option completion
|
|
41
|
+
|
|
42
|
+
Visit the autocomplete Dev Center doc at https://devcenter.heroku.com/articles/heroku-cli-autocomplete
|
|
43
|
+
|
|
44
|
+
Enjoy!
|
|
45
|
+
`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async updateCache(completion, cacheKey) {
|
|
49
|
+
const cachePath = path.join(this.completionsCacheDir, cacheKey);
|
|
50
|
+
const options = await completion.options({ config: this.config });
|
|
51
|
+
await (0, cache_1.updateCache)(cachePath, options);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.default = Index;
|
|
55
|
+
Index.description = 'display autocomplete installation instructions';
|
|
56
|
+
Index.args = {
|
|
57
|
+
shell: core_1.Args.string({ description: 'shell type', required: false }),
|
|
58
|
+
};
|
|
59
|
+
Index.flags = {
|
|
60
|
+
'refresh-cache': command_1.flags.boolean({ description: 'refresh cache only (ignores displaying instructions)', char: 'r' }),
|
|
61
|
+
};
|
|
62
|
+
Index.examples = [
|
|
63
|
+
'$ heroku autocomplete',
|
|
64
|
+
'$ heroku autocomplete bash',
|
|
65
|
+
'$ heroku autocomplete zsh',
|
|
66
|
+
'$ heroku autocomplete --refresh-cache',
|
|
67
|
+
];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AutocompleteBase } from '../../lib/autocomplete/base';
|
|
2
|
+
export default class Options extends AutocompleteBase {
|
|
3
|
+
static hidden: boolean;
|
|
4
|
+
static description: string;
|
|
5
|
+
static flags: {
|
|
6
|
+
app: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
|
|
7
|
+
};
|
|
8
|
+
static args: {
|
|
9
|
+
completion: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
|
|
10
|
+
};
|
|
11
|
+
parsedArgs: {
|
|
12
|
+
[name: string]: string;
|
|
13
|
+
};
|
|
14
|
+
parsedFlags: {
|
|
15
|
+
[name: string]: string;
|
|
16
|
+
};
|
|
17
|
+
run(): Promise<void>;
|
|
18
|
+
private processCommandLine;
|
|
19
|
+
private determineCompletion;
|
|
20
|
+
private fetchOptions;
|
|
21
|
+
private parsedFlagsWithEnvVars;
|
|
22
|
+
private throwError;
|
|
23
|
+
private findFlagFromWildArg;
|
|
24
|
+
private determineCmdState;
|
|
25
|
+
}
|