@forge/cli 0.0.0-experimental-deeb8f6 → 0.0.0-experimental-c8e9749
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/CHANGELOG.md +1110 -2
- package/npm-shrinkwrap.json +13212 -223
- package/out/analytics-client/analytics-client.d.ts +36 -0
- package/out/analytics-client/analytics-client.d.ts.map +1 -0
- package/out/analytics-client/analytics-client.js +140 -0
- package/out/analytics-client/analytics-message-handler.d.ts +21 -0
- package/out/analytics-client/analytics-message-handler.d.ts.map +1 -0
- package/out/analytics-client/analytics-message-handler.js +43 -0
- package/out/autocomplete/autocomplete-config.json +243 -0
- package/out/autocomplete/index.d.ts +5 -0
- package/out/autocomplete/index.d.ts.map +1 -0
- package/out/autocomplete/index.js +41 -0
- package/out/autocomplete/isSupportedShell.d.ts +2 -0
- package/out/autocomplete/isSupportedShell.d.ts.map +1 -0
- package/out/autocomplete/isSupportedShell.js +11 -0
- package/out/autocomplete/types.d.ts +14 -0
- package/out/autocomplete/types.d.ts.map +1 -0
- package/out/autocomplete/types.js +2 -0
- package/out/autocomplete/util.d.ts +6 -0
- package/out/autocomplete/util.d.ts.map +1 -0
- package/out/autocomplete/util.js +15 -0
- package/out/bin/cli.d.ts +1 -0
- package/out/bin/cli.d.ts.map +1 -1
- package/out/bin/cli.js +4 -1
- package/out/bin/postinstall.d.ts +2 -0
- package/out/bin/postinstall.d.ts.map +1 -0
- package/out/bin/postinstall.js +23 -0
- package/out/command-line/anon-user-id.d.ts +3 -0
- package/out/command-line/anon-user-id.d.ts.map +1 -0
- package/out/command-line/anon-user-id.js +17 -0
- package/out/command-line/command.d.ts +80 -0
- package/out/command-line/command.d.ts.map +1 -0
- package/out/command-line/command.js +408 -0
- package/out/command-line/controller/assertUnreachable.d.ts +2 -0
- package/out/command-line/controller/assertUnreachable.d.ts.map +1 -0
- package/out/command-line/controller/assertUnreachable.js +7 -0
- package/out/command-line/controller/autocomplete-controller.d.ts +12 -0
- package/out/command-line/controller/autocomplete-controller.d.ts.map +1 -0
- package/out/command-line/controller/autocomplete-controller.js +54 -0
- package/out/command-line/controller/deploy-controller.d.ts +42 -0
- package/out/command-line/controller/deploy-controller.d.ts.map +1 -0
- package/out/command-line/controller/deploy-controller.js +139 -0
- package/out/command-line/controller/feedback-controller.d.ts +9 -0
- package/out/command-line/controller/feedback-controller.d.ts.map +1 -0
- package/out/command-line/controller/feedback-controller.js +19 -0
- package/out/command-line/controller/getNodeVersion.d.ts +2 -0
- package/out/command-line/controller/getNodeVersion.d.ts.map +1 -0
- package/out/command-line/controller/getNodeVersion.js +7 -0
- package/out/command-line/controller/install-controller.d.ts +35 -0
- package/out/command-line/controller/install-controller.d.ts.map +1 -0
- package/out/command-line/controller/install-controller.js +157 -0
- package/out/command-line/controller/lint-controller.d.ts +9 -0
- package/out/command-line/controller/lint-controller.d.ts.map +1 -0
- package/out/command-line/controller/lint-controller.js +20 -0
- package/out/command-line/controller/pre-command-controller.d.ts +25 -0
- package/out/command-line/controller/pre-command-controller.d.ts.map +1 -0
- package/out/command-line/controller/pre-command-controller.js +57 -0
- package/out/command-line/controller/prerequisites-controller.d.ts +15 -0
- package/out/command-line/controller/prerequisites-controller.d.ts.map +1 -0
- package/out/command-line/controller/prerequisites-controller.js +41 -0
- package/out/command-line/controller/settings-controller.d.ts +19 -0
- package/out/command-line/controller/settings-controller.d.ts.map +1 -0
- package/out/command-line/controller/settings-controller.js +48 -0
- package/out/command-line/controller/stubController.d.ts +9 -0
- package/out/command-line/controller/stubController.d.ts.map +1 -0
- package/out/command-line/controller/stubController.js +15 -0
- package/out/command-line/controller/tunnel-controller.d.ts +14 -0
- package/out/command-line/controller/tunnel-controller.d.ts.map +1 -0
- package/out/command-line/controller/tunnel-controller.js +43 -0
- package/out/command-line/dependency-injection.d.ts +76 -0
- package/out/command-line/dependency-injection.d.ts.map +1 -0
- package/out/command-line/dependency-injection.js +211 -0
- package/out/command-line/environment.d.ts +2 -0
- package/out/command-line/environment.d.ts.map +1 -0
- package/out/command-line/environment.js +16 -0
- package/out/command-line/errors.d.ts +6 -0
- package/out/command-line/errors.d.ts.map +1 -0
- package/out/command-line/errors.js +12 -0
- package/out/command-line/index.d.ts +5 -0
- package/out/command-line/index.d.ts.map +1 -0
- package/out/command-line/index.js +73 -0
- package/out/command-line/register-app-commands.d.ts +10 -0
- package/out/command-line/register-app-commands.d.ts.map +1 -0
- package/out/command-line/register-app-commands.js +128 -0
- package/out/command-line/register-authentication-command.d.ts +16 -0
- package/out/command-line/register-authentication-command.d.ts.map +1 -0
- package/out/command-line/register-authentication-command.js +94 -0
- package/out/command-line/register-autocomplete-commands.d.ts +3 -0
- package/out/command-line/register-autocomplete-commands.d.ts.map +1 -0
- package/out/command-line/register-autocomplete-commands.js +14 -0
- package/out/command-line/register-contributors-commands.d.ts +3 -0
- package/out/command-line/register-contributors-commands.d.ts.map +1 -0
- package/out/command-line/register-contributors-commands.js +134 -0
- package/out/command-line/register-deployment-commands.d.ts +22 -0
- package/out/command-line/register-deployment-commands.d.ts.map +1 -0
- package/out/command-line/register-deployment-commands.js +16 -0
- package/out/command-line/register-environment-variables-commands.d.ts +3 -0
- package/out/command-line/register-environment-variables-commands.d.ts.map +1 -0
- package/out/command-line/register-environment-variables-commands.js +103 -0
- package/out/command-line/register-feedback-commands.d.ts +3 -0
- package/out/command-line/register-feedback-commands.d.ts.map +1 -0
- package/out/command-line/register-feedback-commands.js +32 -0
- package/out/command-line/register-installation-commands.d.ts +6 -0
- package/out/command-line/register-installation-commands.d.ts.map +1 -0
- package/out/command-line/register-installation-commands.js +143 -0
- package/out/command-line/register-lint-command.d.ts +8 -0
- package/out/command-line/register-lint-command.d.ts.map +1 -0
- package/out/command-line/register-lint-command.js +16 -0
- package/out/command-line/register-log-commands.d.ts +4 -0
- package/out/command-line/register-log-commands.d.ts.map +1 -0
- package/out/command-line/register-log-commands.js +139 -0
- package/out/command-line/register-providers-commands.d.ts +3 -0
- package/out/command-line/register-providers-commands.d.ts.map +1 -0
- package/out/command-line/register-providers-commands.js +44 -0
- package/out/command-line/register-settings-commands.d.ts +3 -0
- package/out/command-line/register-settings-commands.d.ts.map +1 -0
- package/out/command-line/register-settings-commands.js +39 -0
- package/out/command-line/register-tunnel-commands.d.ts +3 -0
- package/out/command-line/register-tunnel-commands.d.ts.map +1 -0
- package/out/command-line/register-tunnel-commands.js +15 -0
- package/out/command-line/register-webtrigger-commands.d.ts +3 -0
- package/out/command-line/register-webtrigger-commands.d.ts.map +1 -0
- package/out/command-line/register-webtrigger-commands.js +56 -0
- package/out/command-line/sentry.d.ts +4 -0
- package/out/command-line/sentry.d.ts.map +1 -0
- package/out/command-line/sentry.js +16 -0
- package/out/command-line/unique-machine-id.d.ts +3 -0
- package/out/command-line/unique-machine-id.d.ts.map +1 -0
- package/out/command-line/unique-machine-id.js +19 -0
- package/out/command-line/version-info.d.ts +9 -0
- package/out/command-line/version-info.d.ts.map +1 -0
- package/out/command-line/version-info.js +42 -0
- package/out/command-line/view/analytics-settings-view.d.ts +7 -0
- package/out/command-line/view/analytics-settings-view.d.ts.map +1 -0
- package/out/command-line/view/analytics-settings-view.js +18 -0
- package/out/command-line/view/deploy-view.d.ts +21 -0
- package/out/command-line/view/deploy-view.d.ts.map +1 -0
- package/out/command-line/view/deploy-view.js +58 -0
- package/out/command-line/view/install-view.d.ts +18 -0
- package/out/command-line/view/install-view.d.ts.map +1 -0
- package/out/command-line/view/install-view.js +56 -0
- package/out/command-line/view/lint-view.d.ts +12 -0
- package/out/command-line/view/lint-view.d.ts.map +1 -0
- package/out/command-line/view/lint-view.js +31 -0
- package/out/command-line/view/lite-lint-view.d.ts +10 -0
- package/out/command-line/view/lite-lint-view.d.ts.map +1 -0
- package/out/command-line/view/lite-lint-view.js +18 -0
- package/out/command-line/view/settings-view.d.ts +10 -0
- package/out/command-line/view/settings-view.d.ts.map +1 -0
- package/out/command-line/view/settings-view.js +26 -0
- package/out/command-line/view/tunnel-view.d.ts +20 -0
- package/out/command-line/view/tunnel-view.d.ts.map +1 -0
- package/out/command-line/view/tunnel-view.js +92 -0
- package/out/contributors/add-contributor.d.ts +17 -0
- package/out/contributors/add-contributor.d.ts.map +1 -0
- package/out/contributors/add-contributor.js +14 -0
- package/out/contributors/graphql-client.d.ts +14 -0
- package/out/contributors/graphql-client.d.ts.map +1 -0
- package/out/contributors/graphql-client.js +113 -0
- package/out/contributors/list-contributors.d.ts +18 -0
- package/out/contributors/list-contributors.d.ts.map +1 -0
- package/out/contributors/list-contributors.js +14 -0
- package/out/contributors/remove-contributors.d.ts +18 -0
- package/out/contributors/remove-contributors.d.ts.map +1 -0
- package/out/contributors/remove-contributors.js +14 -0
- package/out/deploy/deployer/deploy-monitor-graphql-client.d.ts +24 -0
- package/out/deploy/deployer/deploy-monitor-graphql-client.d.ts.map +1 -0
- package/out/deploy/deployer/deploy-monitor-graphql-client.js +57 -0
- package/out/deploy/deployer/deployer.d.ts +40 -0
- package/out/deploy/deployer/deployer.d.ts.map +1 -0
- package/out/deploy/deployer/deployer.js +187 -0
- package/out/deploy/deployer/index.d.ts +4 -0
- package/out/deploy/deployer/index.d.ts.map +1 -0
- package/out/deploy/deployer/index.js +6 -0
- package/out/deploy/deployer/trigger-deploy-graphql-client.d.ts +19 -0
- package/out/deploy/deployer/trigger-deploy-graphql-client.d.ts.map +1 -0
- package/out/deploy/deployer/trigger-deploy-graphql-client.js +49 -0
- package/out/deploy/index.d.ts +5 -0
- package/out/deploy/index.d.ts.map +1 -0
- package/out/deploy/index.js +7 -0
- package/out/deploy/package-upload-deploy.d.ts +20 -0
- package/out/deploy/package-upload-deploy.d.ts.map +1 -0
- package/out/deploy/package-upload-deploy.js +37 -0
- package/out/deploy/packager/archiver.d.ts +27 -0
- package/out/deploy/packager/archiver.d.ts.map +1 -0
- package/out/deploy/packager/archiver.js +76 -0
- package/out/deploy/packager/index.d.ts +3 -0
- package/out/deploy/packager/index.d.ts.map +1 -0
- package/out/deploy/packager/index.js +5 -0
- package/out/deploy/packager/nativeui-bundler.d.ts +12 -0
- package/out/deploy/packager/nativeui-bundler.d.ts.map +1 -0
- package/out/deploy/packager/nativeui-bundler.js +34 -0
- package/out/deploy/packager/packager.d.ts +32 -0
- package/out/deploy/packager/packager.d.ts.map +1 -0
- package/out/deploy/packager/packager.js +21 -0
- package/out/deploy/packager/runtime-bundler.d.ts +15 -0
- package/out/deploy/packager/runtime-bundler.d.ts.map +1 -0
- package/out/deploy/packager/runtime-bundler.js +53 -0
- package/out/deploy/uploader/artifact-graphql-client.d.ts +26 -0
- package/out/deploy/uploader/artifact-graphql-client.d.ts.map +1 -0
- package/out/deploy/uploader/artifact-graphql-client.js +100 -0
- package/out/deploy/uploader/index.d.ts +3 -0
- package/out/deploy/uploader/index.d.ts.map +1 -0
- package/out/deploy/uploader/index.js +5 -0
- package/out/deploy/uploader/uploader.d.ts +19 -0
- package/out/deploy/uploader/uploader.d.ts.map +1 -0
- package/out/deploy/uploader/uploader.js +43 -0
- package/out/environment-variables/delete-environment-variable.d.ts +18 -0
- package/out/environment-variables/delete-environment-variable.d.ts.map +1 -0
- package/out/environment-variables/delete-environment-variable.js +14 -0
- package/out/environment-variables/graphql-client.d.ts +16 -0
- package/out/environment-variables/graphql-client.d.ts.map +1 -0
- package/out/environment-variables/graphql-client.js +113 -0
- package/out/environment-variables/list-environment-variables.d.ts +22 -0
- package/out/environment-variables/list-environment-variables.d.ts.map +1 -0
- package/out/environment-variables/list-environment-variables.js +14 -0
- package/out/environment-variables/set-environment-variable.d.ts +20 -0
- package/out/environment-variables/set-environment-variable.d.ts.map +1 -0
- package/out/environment-variables/set-environment-variable.js +14 -0
- package/out/installations/graphql-client.d.ts +75 -0
- package/out/installations/graphql-client.d.ts.map +1 -0
- package/out/installations/graphql-client.js +423 -0
- package/out/installations/install-app-site.d.ts +21 -0
- package/out/installations/install-app-site.d.ts.map +1 -0
- package/out/installations/install-app-site.js +19 -0
- package/out/installations/shared.d.ts +5 -0
- package/out/installations/shared.d.ts.map +1 -0
- package/out/installations/shared.js +20 -0
- package/out/installations/site-translation/bitbucket.d.ts +24 -0
- package/out/installations/site-translation/bitbucket.d.ts.map +1 -0
- package/out/installations/site-translation/bitbucket.js +113 -0
- package/out/installations/site-translation/cloudid-products.d.ts +17 -0
- package/out/installations/site-translation/cloudid-products.d.ts.map +1 -0
- package/out/installations/site-translation/cloudid-products.js +89 -0
- package/out/installations/site-translation/index.d.ts +4 -0
- package/out/installations/site-translation/index.d.ts.map +1 -0
- package/out/installations/site-translation/index.js +6 -0
- package/out/installations/site-translation/site-translation.d.ts +12 -0
- package/out/installations/site-translation/site-translation.d.ts.map +1 -0
- package/out/installations/site-translation/site-translation.js +2 -0
- package/out/installations/uninstall-app.d.ts +25 -0
- package/out/installations/uninstall-app.d.ts.map +1 -0
- package/out/installations/uninstall-app.js +43 -0
- package/out/migration-keys/graphql-client.d.ts +8 -0
- package/out/migration-keys/graphql-client.d.ts.map +1 -0
- package/out/migration-keys/graphql-client.js +55 -0
- package/out/providers/configure-provider.d.ts +19 -0
- package/out/providers/configure-provider.d.ts.map +1 -0
- package/out/providers/configure-provider.js +14 -0
- package/out/providers/graphql-client.d.ts +8 -0
- package/out/providers/graphql-client.d.ts.map +1 -0
- package/out/providers/graphql-client.js +45 -0
- package/out/service/cached-config-service.d.ts +8 -0
- package/out/service/cached-config-service.d.ts.map +1 -0
- package/out/service/cached-config-service.js +16 -0
- package/out/service/command-suggestion-service.d.ts +4 -0
- package/out/service/command-suggestion-service.d.ts.map +1 -0
- package/out/service/command-suggestion-service.js +17 -0
- package/out/service/docker-service.d.ts +24 -0
- package/out/service/docker-service.d.ts.map +1 -0
- package/out/service/docker-service.js +71 -0
- package/out/service/installation-service.d.ts +51 -0
- package/out/service/installation-service.d.ts.map +1 -0
- package/out/service/installation-service.js +91 -0
- package/out/service/lint-service.d.ts +23 -0
- package/out/service/lint-service.d.ts.map +1 -0
- package/out/service/lint-service.js +39 -0
- package/out/service/lite-lint-service.d.ts +10 -0
- package/out/service/lite-lint-service.d.ts.map +1 -0
- package/out/service/lite-lint-service.js +27 -0
- package/out/service/migration-keys-service.d.ts +19 -0
- package/out/service/migration-keys-service.d.ts.map +1 -0
- package/out/service/migration-keys-service.js +14 -0
- package/out/service/port-finding-service.d.ts +12 -0
- package/out/service/port-finding-service.d.ts.map +1 -0
- package/out/service/port-finding-service.js +34 -0
- package/out/service/resource-packaging-service.d.ts +46 -0
- package/out/service/resource-packaging-service.d.ts.map +1 -0
- package/out/service/resource-packaging-service.js +132 -0
- package/out/service/resources-uploader-service.d.ts +16 -0
- package/out/service/resources-uploader-service.d.ts.map +1 -0
- package/out/service/resources-uploader-service.js +39 -0
- package/out/service/tunnel-analytics-service.d.ts +11 -0
- package/out/service/tunnel-analytics-service.d.ts.map +1 -0
- package/out/service/tunnel-analytics-service.js +24 -0
- package/out/service/tunnel-service.d.ts +41 -0
- package/out/service/tunnel-service.d.ts.map +1 -0
- package/out/service/tunnel-service.js +196 -0
- package/out/storage/local-file-storage.d.ts +17 -0
- package/out/storage/local-file-storage.d.ts.map +1 -0
- package/out/storage/local-file-storage.js +53 -0
- package/out/webtrigger/get-webtrigger-url.d.ts +27 -0
- package/out/webtrigger/get-webtrigger-url.d.ts.map +1 -0
- package/out/webtrigger/get-webtrigger-url.js +26 -0
- package/out/webtrigger/graphql-client.d.ts +14 -0
- package/out/webtrigger/graphql-client.d.ts.map +1 -0
- package/out/webtrigger/graphql-client.js +52 -0
- package/out/workers/analytics-message-worker.d.ts +12 -0
- package/out/workers/analytics-message-worker.d.ts.map +1 -0
- package/out/workers/analytics-message-worker.js +29 -0
- package/out/workers/forge-cli-workers.d.ts +2 -0
- package/out/workers/forge-cli-workers.d.ts.map +1 -0
- package/out/workers/forge-cli-workers.js +21 -0
- package/out/workers/tunnel-clean-up-worker.d.ts +8 -0
- package/out/workers/tunnel-clean-up-worker.d.ts.map +1 -0
- package/out/workers/tunnel-clean-up-worker.js +31 -0
- package/out/workers/version-check-worker.d.ts +8 -0
- package/out/workers/version-check-worker.d.ts.map +1 -0
- package/out/workers/version-check-worker.js +20 -0
- package/out/workers/worker-info.d.ts +8 -0
- package/out/workers/worker-info.d.ts.map +1 -0
- package/out/workers/worker-info.js +15 -0
- package/out/workers/worker.d.ts +6 -0
- package/out/workers/worker.d.ts.map +1 -0
- package/out/workers/worker.js +9 -0
- package/out/workers/workers-starter.d.ts +5 -0
- package/out/workers/workers-starter.d.ts.map +1 -0
- package/out/workers/workers-starter.js +22 -0
- package/package.json +60 -5
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AnalyticsSettingsView = void 0;
|
|
4
|
+
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
|
+
const ANALYTICS_TRUE = 'Yes';
|
|
6
|
+
const ANALYTICS_FALSE = 'No';
|
|
7
|
+
class AnalyticsSettingsView {
|
|
8
|
+
constructor(ui) {
|
|
9
|
+
this.ui = ui;
|
|
10
|
+
}
|
|
11
|
+
async promptForPreference() {
|
|
12
|
+
this.ui.info(cli_shared_1.Text.settings.analytics.banner);
|
|
13
|
+
this.ui.emptyLine();
|
|
14
|
+
const value = await this.ui.promptForList(cli_shared_1.Text.settings.analytics.promptMessage, [ANALYTICS_TRUE, ANALYTICS_FALSE]);
|
|
15
|
+
return value === ANALYTICS_TRUE;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.AnalyticsSettingsView = AnalyticsSettingsView;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { UI } from '@forge/cli-shared';
|
|
2
|
+
import { LintResult } from '@forge/lint';
|
|
3
|
+
import { DeploymentResult } from '../register-deployment-commands';
|
|
4
|
+
export declare class DeployView {
|
|
5
|
+
private readonly ui;
|
|
6
|
+
constructor(ui: UI);
|
|
7
|
+
getLogger(): UI;
|
|
8
|
+
displayStart(environment: string): void;
|
|
9
|
+
displayLintRunning(): void;
|
|
10
|
+
displayOutdatedInstallationsMessage(): void;
|
|
11
|
+
displayLintErrors(lintResults: LintResult[]): void;
|
|
12
|
+
displayLintWarnings(warnings: number): void;
|
|
13
|
+
displayNoLintProblems(): void;
|
|
14
|
+
displayConnectKeyChangeWarning(environment: string, migrationKey: string, connectKey: string): void;
|
|
15
|
+
displayConnectKeyDeleteWarning(environment: string): void;
|
|
16
|
+
displayMPACAppConnectKeyChangeError(mpacAppKey: string, connectKey: string): void;
|
|
17
|
+
promptToContinueDeletingConnectKey(): Promise<boolean>;
|
|
18
|
+
promptToContinueChangingConnectKey(): Promise<boolean>;
|
|
19
|
+
reportDeploymentProgress(id: string, environment: string, showDistributionPageLink: boolean, deployCallback: () => Promise<DeploymentResult>): Promise<DeploymentResult>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=deploy-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/deploy-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAuC,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAqB,UAAU,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,EAAE;IAE5B,SAAS,IAAI,EAAE;IAIf,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAIvC,kBAAkB,IAAI,IAAI;IAI1B,mCAAmC,IAAI,IAAI;IAK3C,iBAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,IAAI;IAKlD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI3C,qBAAqB,IAAI,IAAI;IAI7B,8BAA8B,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAInG,8BAA8B,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAIzD,mCAAmC,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAI3E,kCAAkC,IAAI,OAAO,CAAC,OAAO,CAAC;IAItD,kCAAkC,IAAI,OAAO,CAAC,OAAO,CAAC;IAItD,wBAAwB,CACnC,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,MAAM,EACnB,wBAAwB,EAAE,OAAO,EACjC,cAAc,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,GAC9C,OAAO,CAAC,gBAAgB,CAAC;CAY7B"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeployView = void 0;
|
|
4
|
+
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
|
+
const lint_1 = require("@forge/lint");
|
|
6
|
+
const cs_ari_1 = require("@forge/util/packages/cs-ari");
|
|
7
|
+
class DeployView {
|
|
8
|
+
constructor(ui) {
|
|
9
|
+
this.ui = ui;
|
|
10
|
+
}
|
|
11
|
+
getLogger() {
|
|
12
|
+
return this.ui;
|
|
13
|
+
}
|
|
14
|
+
displayStart(environment) {
|
|
15
|
+
this.ui.info(cli_shared_1.Text.deploy.cmd.start1(environment, cli_shared_1.environmentToOption));
|
|
16
|
+
}
|
|
17
|
+
displayLintRunning() {
|
|
18
|
+
this.ui.info(cli_shared_1.Text.lint.running);
|
|
19
|
+
}
|
|
20
|
+
displayOutdatedInstallationsMessage() {
|
|
21
|
+
this.ui.emptyLine();
|
|
22
|
+
this.ui.warn(cli_shared_1.Text.deploy.outdatedInstallations);
|
|
23
|
+
}
|
|
24
|
+
displayLintErrors(lintResults) {
|
|
25
|
+
this.ui.info(cli_shared_1.Text.deploy.taskLint.lintError);
|
|
26
|
+
(0, lint_1.reportLintResults)(this.ui, lintResults);
|
|
27
|
+
}
|
|
28
|
+
displayLintWarnings(warnings) {
|
|
29
|
+
this.ui.info(cli_shared_1.Text.deploy.taskLint.lintWarning(warnings) + '\n');
|
|
30
|
+
}
|
|
31
|
+
displayNoLintProblems() {
|
|
32
|
+
this.ui.info(cli_shared_1.LogColor.trace(cli_shared_1.Text.lint.noProblems) + '\n');
|
|
33
|
+
}
|
|
34
|
+
displayConnectKeyChangeWarning(environment, migrationKey, connectKey) {
|
|
35
|
+
this.ui.warn(cli_shared_1.Text.deploy.connectKeyChange.connectKeyChangeWarning(environment, migrationKey, connectKey));
|
|
36
|
+
}
|
|
37
|
+
displayConnectKeyDeleteWarning(environment) {
|
|
38
|
+
this.ui.warn(cli_shared_1.Text.deploy.connectKeyChange.connectKeyDeleteWarning(environment));
|
|
39
|
+
}
|
|
40
|
+
displayMPACAppConnectKeyChangeError(mpacAppKey, connectKey) {
|
|
41
|
+
this.ui.info(cli_shared_1.Text.deploy.connectKeyChange.mpacAppConnectKeyChangeError(mpacAppKey, connectKey));
|
|
42
|
+
}
|
|
43
|
+
async promptToContinueDeletingConnectKey() {
|
|
44
|
+
return await this.ui.confirm(cli_shared_1.Text.deploy.connectKeyChange.continueDelete);
|
|
45
|
+
}
|
|
46
|
+
async promptToContinueChangingConnectKey() {
|
|
47
|
+
return await this.ui.confirm(cli_shared_1.Text.deploy.connectKeyChange.continueChange);
|
|
48
|
+
}
|
|
49
|
+
async reportDeploymentProgress(id, environment, showDistributionPageLink, deployCallback) {
|
|
50
|
+
const result = await this.ui.displayProgress(() => deployCallback(), cli_shared_1.Text.deploy.cmd.start2(environment, cli_shared_1.environmentToOption), cli_shared_1.Text.deploy.cmd.success);
|
|
51
|
+
this.ui.info(cli_shared_1.Text.deploy.cmd.successDetails(environment, cli_shared_1.environmentToOption));
|
|
52
|
+
if (environment === 'production' && showDistributionPageLink) {
|
|
53
|
+
this.ui.info(cli_shared_1.Text.deploy.cmd.distributePageLink((0, cs_ari_1.parseAppAri)((0, cs_ari_1.parse)(id)).appId));
|
|
54
|
+
}
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.DeployView = DeployView;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UI } from '@forge/cli-shared';
|
|
2
|
+
import { AppEnvironmentPermissions, Installation } from '../../service/installation-service';
|
|
3
|
+
interface InstallOrUpgradeCommandText {
|
|
4
|
+
listScopes: (scopes: string[]) => string;
|
|
5
|
+
listEgressAddresses: (egressAddresses: string[]) => string;
|
|
6
|
+
permissionsMismatch: (environment: string) => string;
|
|
7
|
+
promptForPermissionsConfirmation: (permissionsMismatchInDevelopment: boolean) => string;
|
|
8
|
+
}
|
|
9
|
+
export declare class NoScopesError extends Error {
|
|
10
|
+
}
|
|
11
|
+
export declare class InstallView {
|
|
12
|
+
private readonly ui;
|
|
13
|
+
constructor(ui: UI);
|
|
14
|
+
promptForPermissionsConfirmation({ scopes, egressAddresses, addedScopes }: AppEnvironmentPermissions, manifestScopes: string[], manifestEgressAddresses: string[], environment: string, confirmScopes: boolean, nonInteractive: boolean, text: InstallOrUpgradeCommandText): Promise<boolean>;
|
|
15
|
+
promptForUpgrade(installations: Installation[]): Promise<Installation>;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=install-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/install-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,EAAE,EAA8B,MAAM,mBAAmB,CAAC;AAIjH,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAE7F,UAAU,2BAA2B;IACnC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;IACzC,mBAAmB,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC;IAC3D,mBAAmB,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IACrD,gCAAgC,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,MAAM,CAAC;CACzF;AAED,qBAAa,aAAc,SAAQ,KAAK;CAAG;AAE3C,qBAAa,WAAW;IACV,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,EAAE;IAEtB,gCAAgC,CAC3C,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,EAAE,yBAAyB,EACnE,cAAc,EAAE,MAAM,EAAE,EACxB,uBAAuB,EAAE,MAAM,EAAE,EACjC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,OAAO,EACtB,cAAc,EAAE,OAAO,EACvB,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,OAAO,CAAC;IAoCN,gBAAgB,CAAC,aAAa,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC;CAqBpF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InstallView = exports.NoScopesError = void 0;
|
|
4
|
+
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
|
+
const egress_1 = require("@forge/egress");
|
|
6
|
+
const lodash_1 = require("lodash");
|
|
7
|
+
class NoScopesError extends Error {
|
|
8
|
+
}
|
|
9
|
+
exports.NoScopesError = NoScopesError;
|
|
10
|
+
class InstallView {
|
|
11
|
+
constructor(ui) {
|
|
12
|
+
this.ui = ui;
|
|
13
|
+
}
|
|
14
|
+
async promptForPermissionsConfirmation({ scopes, egressAddresses, addedScopes }, manifestScopes, manifestEgressAddresses, environment, confirmScopes, nonInteractive, text) {
|
|
15
|
+
if (scopes.length === 0) {
|
|
16
|
+
throw new NoScopesError();
|
|
17
|
+
}
|
|
18
|
+
if (addedScopes.length)
|
|
19
|
+
this.ui.info(text.listScopes(addedScopes));
|
|
20
|
+
if (egressAddresses.length)
|
|
21
|
+
this.ui.info(text.listEgressAddresses(egressAddresses));
|
|
22
|
+
const cleanedManifestScopes = [...new Set(['read:me', ...manifestScopes])];
|
|
23
|
+
const groupedManifestEgressAddresses = (0, egress_1.sortAndGroupEgressPermissionsByDomain)(manifestEgressAddresses);
|
|
24
|
+
let permissionsMismatchWithManifest = false;
|
|
25
|
+
if ((0, cli_shared_1.environmentToOption)(environment) === cli_shared_1.DEFAULT_ENVIRONMENT_OPTION) {
|
|
26
|
+
const scopesMismatch = !(0, lodash_1.isEqual)([...cleanedManifestScopes].sort(), [...scopes].sort());
|
|
27
|
+
const egressAddressesMismatch = !(0, lodash_1.isEqual)([...groupedManifestEgressAddresses].sort(), [...egressAddresses].sort());
|
|
28
|
+
permissionsMismatchWithManifest = scopesMismatch || egressAddressesMismatch;
|
|
29
|
+
if (permissionsMismatchWithManifest) {
|
|
30
|
+
this.ui.warn(text.permissionsMismatch((0, cli_shared_1.environmentToOption)(environment)));
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
if (!confirmScopes && !nonInteractive) {
|
|
34
|
+
const scopesConfirmationResult = await this.ui.confirm(text.promptForPermissionsConfirmation(permissionsMismatchWithManifest));
|
|
35
|
+
if (scopesConfirmationResult)
|
|
36
|
+
this.ui.emptyLine();
|
|
37
|
+
return scopesConfirmationResult;
|
|
38
|
+
}
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
async promptForUpgrade(installations) {
|
|
42
|
+
const installationIndex = await this.ui.promptForSingleChoiceTable(cli_shared_1.Text.upgradeContext.promptInstallation, cli_shared_1.Text.upgradeContext.overview, ['Environment', 'Site', 'Product', 'Version'], installations.map(({ id, environmentKey, product, site, version }) => ({
|
|
43
|
+
names: [
|
|
44
|
+
(0, cli_shared_1.environmentToOption)(environmentKey),
|
|
45
|
+
site,
|
|
46
|
+
(0, cli_shared_1.capitalizeProduct)(product),
|
|
47
|
+
cli_shared_1.Text.install.booleanToScope(version.isLatest)
|
|
48
|
+
],
|
|
49
|
+
value: id,
|
|
50
|
+
primary: site
|
|
51
|
+
})));
|
|
52
|
+
const installation = installations[installationIndex];
|
|
53
|
+
return installation;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
exports.InstallView = InstallView;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { UI } from '@forge/cli-shared';
|
|
2
|
+
import { LintFixState, LintLogger, LintResult } from '@forge/lint';
|
|
3
|
+
export declare class LintView {
|
|
4
|
+
private readonly ui;
|
|
5
|
+
private lintResultReporter;
|
|
6
|
+
constructor(ui: UI, lintResultReporter?: (logger: LintLogger, lintResults: LintResult[], showSummary?: boolean | undefined) => void);
|
|
7
|
+
reportLintResult(results: LintResult[]): void;
|
|
8
|
+
reportFixResult(result: LintFixState): void;
|
|
9
|
+
getLogger(): LintLogger;
|
|
10
|
+
showBlurb(): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=lint-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lint-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/lint-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,EAAE,EAAY,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAqB,MAAM,aAAa,CAAC;AAEtF,qBAAa,QAAQ;IACP,OAAO,CAAC,QAAQ,CAAC,EAAE;IAAM,OAAO,CAAC,kBAAkB;gBAAlC,EAAE,EAAE,EAAE,EAAU,kBAAkB,6FAAoB;IAE5E,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI;IAI7C,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAU3C,SAAS,IAAI,UAAU;IAIvB,SAAS,IAAI,IAAI;CAGzB"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LintView = void 0;
|
|
4
|
+
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
|
+
const lint_1 = require("@forge/lint");
|
|
6
|
+
class LintView {
|
|
7
|
+
constructor(ui, lintResultReporter = lint_1.reportLintResults) {
|
|
8
|
+
this.ui = ui;
|
|
9
|
+
this.lintResultReporter = lintResultReporter;
|
|
10
|
+
}
|
|
11
|
+
reportLintResult(results) {
|
|
12
|
+
this.lintResultReporter(this.ui, results);
|
|
13
|
+
}
|
|
14
|
+
reportFixResult(result) {
|
|
15
|
+
if (!result.errorsFixed && !result.warningsFixed) {
|
|
16
|
+
this.ui.info(cli_shared_1.LogColor.trace(cli_shared_1.Text.lint.noProblems));
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
this.ui.info(cli_shared_1.Text.lint.fixed(result.errorsFixed, result.warningsFixed));
|
|
20
|
+
this.ui.info('');
|
|
21
|
+
this.ui.info(cli_shared_1.Text.lint.fixFollowUp);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
getLogger() {
|
|
25
|
+
return this.ui;
|
|
26
|
+
}
|
|
27
|
+
showBlurb() {
|
|
28
|
+
this.ui.info(cli_shared_1.Text.lint.blurb);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.LintView = LintView;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UI } from '@forge/cli-shared';
|
|
2
|
+
import { LintLogger, LintResult } from '@forge/lint';
|
|
3
|
+
export declare class LiteLintView {
|
|
4
|
+
private readonly ui;
|
|
5
|
+
private reporter;
|
|
6
|
+
constructor(ui: UI, reporter?: (logger: LintLogger, lintResults: LintResult[], showSummary?: boolean | undefined) => void);
|
|
7
|
+
reportErrors(report: LintResult[]): void;
|
|
8
|
+
getLogger(): LintLogger;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=lite-lint-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lite-lint-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/lite-lint-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAqB,UAAU,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAExE,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,EAAE;IAAM,OAAO,CAAC,QAAQ;gBAAxB,EAAE,EAAE,EAAE,EAAU,QAAQ,6FAAoB;IAElE,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI;IAKxC,SAAS,IAAI,UAAU;CAG/B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LiteLintView = void 0;
|
|
4
|
+
const lint_1 = require("@forge/lint");
|
|
5
|
+
class LiteLintView {
|
|
6
|
+
constructor(ui, reporter = lint_1.reportLintResults) {
|
|
7
|
+
this.ui = ui;
|
|
8
|
+
this.reporter = reporter;
|
|
9
|
+
}
|
|
10
|
+
reportErrors(report) {
|
|
11
|
+
this.ui.emptyLine();
|
|
12
|
+
this.reporter(this.ui, report, false);
|
|
13
|
+
}
|
|
14
|
+
getLogger() {
|
|
15
|
+
return this.ui;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.LiteLintView = LiteLintView;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UI } from '@forge/cli-shared';
|
|
2
|
+
declare type PreferenceValue = boolean | undefined;
|
|
3
|
+
export declare class SettingsView {
|
|
4
|
+
private readonly ui;
|
|
5
|
+
constructor(ui: UI);
|
|
6
|
+
showSettings(preferences: [string, string, PreferenceValue][], json?: boolean): void;
|
|
7
|
+
setSuccess(setting: string, value: string): void;
|
|
8
|
+
}
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=settings-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/settings-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAE7C,aAAK,eAAe,GAAG,OAAO,GAAG,SAAS,CAAC;AAE3C,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,EAAE;IAE5B,YAAY,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,OAAO;IAiB7E,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAIjD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SettingsView = void 0;
|
|
4
|
+
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
|
+
class SettingsView {
|
|
6
|
+
constructor(ui) {
|
|
7
|
+
this.ui = ui;
|
|
8
|
+
}
|
|
9
|
+
showSettings(preferences, json) {
|
|
10
|
+
this.ui.table([
|
|
11
|
+
['setting', 'Setting'],
|
|
12
|
+
['description', 'Description'],
|
|
13
|
+
['value', 'Value']
|
|
14
|
+
], preferences.map(([preference, desc, value]) => ({ setting: preference, description: desc, value })), {
|
|
15
|
+
json,
|
|
16
|
+
format: {
|
|
17
|
+
value: (value) => (value === undefined ? 'Not set' : String(value))
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
setSuccess(setting, value) {
|
|
22
|
+
this.ui.info(cli_shared_1.Text.settings.set.success(setting, value));
|
|
23
|
+
this.ui.emptyLine();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.SettingsView = SettingsView;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { CommandLineUI, exitOnError, UserError } from '@forge/cli-shared';
|
|
3
|
+
import { spawn } from 'cross-spawn';
|
|
4
|
+
export interface DownloadProgressCallbacks {
|
|
5
|
+
onStart: () => void;
|
|
6
|
+
onSuccess: () => void;
|
|
7
|
+
onFailure: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare class TunnelViewError extends UserError {
|
|
10
|
+
}
|
|
11
|
+
export declare class TunnelView {
|
|
12
|
+
private readonly ui;
|
|
13
|
+
constructor(ui: CommandLineUI);
|
|
14
|
+
dockerPreamble(): void;
|
|
15
|
+
getTunnelErrorHandler(exitFn: typeof exitOnError): (err: Error) => Promise<void>;
|
|
16
|
+
updatePullPercent(dataBuffer: Buffer, dockerPullPercent: number): number;
|
|
17
|
+
calculateProgress(progress: string, regex: RegExp, dockerPullPercent: number, clamp: number): number;
|
|
18
|
+
reportDownloadProgress(imageDownloadChildProcess: ReturnType<typeof spawn>, { onStart, onFailure, onSuccess }: DownloadProgressCallbacks): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=tunnel-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tunnel-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/tunnel-view.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAkB,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC1F,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGpC,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,qBAAa,eAAgB,SAAQ,SAAS;CAAG;AAEjD,qBAAa,UAAU;IACT,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,aAAa;IAEvC,cAAc,IAAI,IAAI;IAMtB,qBAAqB,CAAC,MAAM,EAAE,OAAO,WAAW,GAAG,CAAC,GAAG,EAAE,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC;IAQhF,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,MAAM;IA+BxE,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAQpG,sBAAsB,CAC3B,yBAAyB,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,EACnD,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,yBAAyB,GAC3D,OAAO,CAAC,IAAI,CAAC;CAyCjB"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TunnelView = exports.TunnelViewError = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const cli_shared_1 = require("@forge/cli-shared");
|
|
6
|
+
const ora_1 = tslib_1.__importDefault(require("ora"));
|
|
7
|
+
class TunnelViewError extends cli_shared_1.UserError {
|
|
8
|
+
}
|
|
9
|
+
exports.TunnelViewError = TunnelViewError;
|
|
10
|
+
class TunnelView {
|
|
11
|
+
constructor(ui) {
|
|
12
|
+
this.ui = ui;
|
|
13
|
+
}
|
|
14
|
+
dockerPreamble() {
|
|
15
|
+
this.ui.info(cli_shared_1.Text.tunnel.preamble);
|
|
16
|
+
this.ui.info(cli_shared_1.Text.ctrlC);
|
|
17
|
+
this.ui.emptyLine();
|
|
18
|
+
}
|
|
19
|
+
getTunnelErrorHandler(exitFn) {
|
|
20
|
+
const handler = async (err) => {
|
|
21
|
+
if (this.ui.debugEnabled)
|
|
22
|
+
this.ui.error(err);
|
|
23
|
+
return await exitFn(this.ui, new TunnelViewError(cli_shared_1.Text.tunnel.error.tunnelPackageMissing));
|
|
24
|
+
};
|
|
25
|
+
return handler;
|
|
26
|
+
}
|
|
27
|
+
updatePullPercent(dataBuffer, dockerPullPercent) {
|
|
28
|
+
const regexPullStarted = /(Pulling fs layer)/g;
|
|
29
|
+
const regexWait = /(Waiting)/g;
|
|
30
|
+
const regexVerify = /(Verifying Checksum)/g;
|
|
31
|
+
const regexDownloadComplete = /(Download complete)/g;
|
|
32
|
+
const regexPullComplete = /(Pull complete)/g;
|
|
33
|
+
const regexDigest = /(Digest: )/g;
|
|
34
|
+
const progress = dataBuffer.toString();
|
|
35
|
+
if (dockerPullPercent >= 99) {
|
|
36
|
+
return dockerPullPercent;
|
|
37
|
+
}
|
|
38
|
+
if (progress.match(regexPullComplete) || progress.match(regexDigest)) {
|
|
39
|
+
dockerPullPercent = 99;
|
|
40
|
+
return dockerPullPercent;
|
|
41
|
+
}
|
|
42
|
+
if (progress.match(regexDownloadComplete) && dockerPullPercent < 95) {
|
|
43
|
+
dockerPullPercent = 95;
|
|
44
|
+
return dockerPullPercent;
|
|
45
|
+
}
|
|
46
|
+
dockerPullPercent = this.calculateProgress(progress, regexPullStarted, dockerPullPercent, 33);
|
|
47
|
+
dockerPullPercent = this.calculateProgress(progress, regexWait, dockerPullPercent, 66);
|
|
48
|
+
dockerPullPercent = this.calculateProgress(progress, regexVerify, dockerPullPercent, 92);
|
|
49
|
+
return dockerPullPercent;
|
|
50
|
+
}
|
|
51
|
+
calculateProgress(progress, regex, dockerPullPercent, clamp) {
|
|
52
|
+
if (progress.match(regex) && dockerPullPercent <= clamp) {
|
|
53
|
+
const expectedNewPercent = dockerPullPercent + progress.match(regex).length * 3;
|
|
54
|
+
return Math.min(expectedNewPercent, clamp);
|
|
55
|
+
}
|
|
56
|
+
return dockerPullPercent;
|
|
57
|
+
}
|
|
58
|
+
reportDownloadProgress(imageDownloadChildProcess, { onStart, onFailure, onSuccess }) {
|
|
59
|
+
return new Promise((resolve, reject) => {
|
|
60
|
+
var _a, _b;
|
|
61
|
+
let dockerPullPercent = 0;
|
|
62
|
+
const spinner = (0, ora_1.default)({
|
|
63
|
+
spinner: {
|
|
64
|
+
frames: ['']
|
|
65
|
+
},
|
|
66
|
+
prefixText: cli_shared_1.Text.tunnel.pullDockerProgress(dockerPullPercent)
|
|
67
|
+
}).start();
|
|
68
|
+
onStart();
|
|
69
|
+
(_a = imageDownloadChildProcess.stdout) === null || _a === void 0 ? void 0 : _a.on('data', (data) => {
|
|
70
|
+
dockerPullPercent = this.updatePullPercent(data, dockerPullPercent);
|
|
71
|
+
spinner.prefixText = cli_shared_1.Text.tunnel.pullDockerProgress(dockerPullPercent);
|
|
72
|
+
});
|
|
73
|
+
(_b = imageDownloadChildProcess.stderr) === null || _b === void 0 ? void 0 : _b.on('data', (data) => {
|
|
74
|
+
spinner.prefixText = cli_shared_1.Text.tunnel.error.pullDocker;
|
|
75
|
+
spinner.stopAndPersist();
|
|
76
|
+
this.ui.warn(cli_shared_1.Text.tunnel.error.dockerPullFailed(''));
|
|
77
|
+
this.ui.emptyLine();
|
|
78
|
+
imageDownloadChildProcess.removeAllListeners();
|
|
79
|
+
onFailure();
|
|
80
|
+
reject(data.toString());
|
|
81
|
+
});
|
|
82
|
+
imageDownloadChildProcess.on('exit', () => {
|
|
83
|
+
spinner.prefixText = cli_shared_1.Text.tunnel.pullDockerProgress(100);
|
|
84
|
+
spinner.stopAndPersist();
|
|
85
|
+
this.ui.info(cli_shared_1.LogColor.trace(cli_shared_1.Text.tunnel.pullDockerSuccess));
|
|
86
|
+
onSuccess();
|
|
87
|
+
resolve();
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
exports.TunnelView = TunnelView;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AppConfigProvider } from '@forge/cli-shared';
|
|
2
|
+
export interface ContributorDetails {
|
|
3
|
+
email: string;
|
|
4
|
+
}
|
|
5
|
+
export interface AppContributorDetails extends ContributorDetails {
|
|
6
|
+
appId: string;
|
|
7
|
+
}
|
|
8
|
+
export interface AddContributorClient {
|
|
9
|
+
addContributor(details: AppContributorDetails): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export declare class AddContributorCommand {
|
|
12
|
+
private readonly client;
|
|
13
|
+
private readonly getAppConfig;
|
|
14
|
+
constructor(client: AddContributorClient, getAppConfig: AppConfigProvider);
|
|
15
|
+
execute(details: ContributorDetails): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=add-contributor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-contributor.d.ts","sourceRoot":"","sources":["../../src/contributors/add-contributor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAsB,SAAQ,kBAAkB;IAC/D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/D;AAED,qBAAa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAAwB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAA3D,MAAM,EAAE,oBAAoB,EAAmB,YAAY,EAAE,iBAAiB;IAE9F,OAAO,CAAC,OAAO,EAAE,kBAAkB;CAOjD"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddContributorCommand = void 0;
|
|
4
|
+
class AddContributorCommand {
|
|
5
|
+
constructor(client, getAppConfig) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
this.getAppConfig = getAppConfig;
|
|
8
|
+
}
|
|
9
|
+
async execute(details) {
|
|
10
|
+
const { id: appId } = await this.getAppConfig();
|
|
11
|
+
await this.client.addContributor(Object.assign(Object.assign({}, details), { appId }));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.AddContributorCommand = AddContributorCommand;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GraphQLClient } from '@forge/cli-shared';
|
|
2
|
+
import { AppContributorDetails, AddContributorClient } from './add-contributor';
|
|
3
|
+
import { Contributor, ListContributorsClient } from './list-contributors';
|
|
4
|
+
import { RemoveContributorsDetails, RemoveContributorsClient } from './remove-contributors';
|
|
5
|
+
export declare class MissingAppContributors extends Error {
|
|
6
|
+
}
|
|
7
|
+
export declare class GraphqlClient implements AddContributorClient, ListContributorsClient, RemoveContributorsClient {
|
|
8
|
+
private readonly graphqlClient;
|
|
9
|
+
constructor(graphqlClient: GraphQLClient);
|
|
10
|
+
addContributor(details: AppContributorDetails): Promise<void>;
|
|
11
|
+
listContributors(appId: string): Promise<Contributor[]>;
|
|
12
|
+
removeContributors(details: RemoveContributorsDetails): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=graphql-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql-client.d.ts","sourceRoot":"","sources":["../../src/contributors/graphql-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,aAAa,EAGd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAE5F,qBAAa,sBAAuB,SAAQ,KAAK;CAAG;AACpD,qBAAa,aAAc,YAAW,oBAAoB,EAAE,sBAAsB,EAAE,wBAAwB;IAC9F,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAE5C,cAAc,CAAC,OAAO,EAAE,qBAAqB;IAgD7C,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IA8BvD,kBAAkB,CAAC,OAAO,EAAE,yBAAyB;CA+CnE"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GraphqlClient = exports.MissingAppContributors = void 0;
|
|
4
|
+
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
|
+
class MissingAppContributors extends Error {
|
|
6
|
+
}
|
|
7
|
+
exports.MissingAppContributors = MissingAppContributors;
|
|
8
|
+
class GraphqlClient {
|
|
9
|
+
constructor(graphqlClient) {
|
|
10
|
+
this.graphqlClient = graphqlClient;
|
|
11
|
+
}
|
|
12
|
+
async addContributor(details) {
|
|
13
|
+
const mutation = `
|
|
14
|
+
mutation forge_cli_addContributor($input: AddAppContributorInput!) {
|
|
15
|
+
ecosystem {
|
|
16
|
+
addAppContributor(input: $input) {
|
|
17
|
+
success
|
|
18
|
+
errors {
|
|
19
|
+
message
|
|
20
|
+
extensions {
|
|
21
|
+
errorType
|
|
22
|
+
statusCode
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
const { response: { ecosystem: { addAppContributor } }, requestId } = await this.graphqlClient.mutate(mutation, {
|
|
30
|
+
input: {
|
|
31
|
+
appId: details.appId,
|
|
32
|
+
newContributorEmail: details.email,
|
|
33
|
+
role: cli_shared_1.AppContributorRole.Admin
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
if (!addAppContributor) {
|
|
37
|
+
throw new cli_shared_1.GraphQlMutationError(`Unable to get a response (requestId: ${requestId || 'unknown'})`, { requestId });
|
|
38
|
+
}
|
|
39
|
+
const { success, errors } = addAppContributor;
|
|
40
|
+
const error = (0, cli_shared_1.getError)(errors);
|
|
41
|
+
if (!success) {
|
|
42
|
+
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, {
|
|
43
|
+
requestId,
|
|
44
|
+
code: error.code,
|
|
45
|
+
statusCode: error.statusCode
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async listContributors(appId) {
|
|
50
|
+
const query = `
|
|
51
|
+
query forge_cli_listContributors($id: ID!) {
|
|
52
|
+
appContributors(id: $id) {
|
|
53
|
+
accountId
|
|
54
|
+
email
|
|
55
|
+
status
|
|
56
|
+
isOwner
|
|
57
|
+
publicName
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
`;
|
|
61
|
+
const { appContributors } = await this.graphqlClient.query(query, {
|
|
62
|
+
id: appId
|
|
63
|
+
});
|
|
64
|
+
if (!appContributors) {
|
|
65
|
+
throw new MissingAppContributors(cli_shared_1.Text.listContributors.missingAppContributors);
|
|
66
|
+
}
|
|
67
|
+
return appContributors.map((contributor) => ({
|
|
68
|
+
accountId: contributor.accountId,
|
|
69
|
+
email: contributor.email,
|
|
70
|
+
isOwner: contributor.isOwner,
|
|
71
|
+
publicName: contributor.publicName,
|
|
72
|
+
accountStatus: contributor.status
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
async removeContributors(details) {
|
|
76
|
+
const mutation = `
|
|
77
|
+
mutation forge_cli_removeContributors($input: RemoveAppContributorsInput!) {
|
|
78
|
+
ecosystem {
|
|
79
|
+
removeAppContributors(input: $input) {
|
|
80
|
+
success
|
|
81
|
+
errors {
|
|
82
|
+
message
|
|
83
|
+
extensions {
|
|
84
|
+
errorType
|
|
85
|
+
statusCode
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
`;
|
|
92
|
+
const { response: { ecosystem: { removeAppContributors } }, requestId } = await this.graphqlClient.mutate(mutation, {
|
|
93
|
+
input: {
|
|
94
|
+
appId: details.appId,
|
|
95
|
+
emails: details.emails,
|
|
96
|
+
accountIds: details.accountIds
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
if (!removeAppContributors) {
|
|
100
|
+
throw new cli_shared_1.GraphQlMutationError(`Unable to get a response (requestId: ${requestId || 'unknown'})`, { requestId });
|
|
101
|
+
}
|
|
102
|
+
const { success, errors } = removeAppContributors;
|
|
103
|
+
const error = (0, cli_shared_1.getError)(errors);
|
|
104
|
+
if (!success) {
|
|
105
|
+
throw new cli_shared_1.GraphQlMutationError(`${error.message} (requestId: ${requestId || 'unknown'})`, {
|
|
106
|
+
requestId,
|
|
107
|
+
code: error.code,
|
|
108
|
+
statusCode: error.statusCode
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
exports.GraphqlClient = GraphqlClient;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AppConfigProvider } from '@forge/cli-shared';
|
|
2
|
+
export interface Contributor {
|
|
3
|
+
accountId: string;
|
|
4
|
+
email?: string | null;
|
|
5
|
+
accountStatus: string;
|
|
6
|
+
publicName: string;
|
|
7
|
+
isOwner?: boolean | null;
|
|
8
|
+
}
|
|
9
|
+
export interface ListContributorsClient {
|
|
10
|
+
listContributors(appId: string): Promise<Contributor[]>;
|
|
11
|
+
}
|
|
12
|
+
export declare class ListContributorsCommand {
|
|
13
|
+
private readonly client;
|
|
14
|
+
private readonly getAppConfig;
|
|
15
|
+
constructor(client: ListContributorsClient, getAppConfig: AppConfigProvider);
|
|
16
|
+
execute(): Promise<Contributor[]>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=list-contributors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-contributors.d.ts","sourceRoot":"","sources":["../../src/contributors/list-contributors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;CACzD;AAED,qBAAa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAA0B,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAA7D,MAAM,EAAE,sBAAsB,EAAmB,YAAY,EAAE,iBAAiB;IAEhG,OAAO,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;CAI/C"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListContributorsCommand = void 0;
|
|
4
|
+
class ListContributorsCommand {
|
|
5
|
+
constructor(client, getAppConfig) {
|
|
6
|
+
this.client = client;
|
|
7
|
+
this.getAppConfig = getAppConfig;
|
|
8
|
+
}
|
|
9
|
+
async execute() {
|
|
10
|
+
const { id: appId } = await this.getAppConfig();
|
|
11
|
+
return await this.client.listContributors(appId);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.ListContributorsCommand = ListContributorsCommand;
|