@forge/cli 10.13.6 → 11.0.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/CHANGELOG.md +251 -0
- package/LICENSE.txt +7 -0
- package/npm-shrinkwrap.json +142 -130
- package/out/autocomplete/autocomplete-config.json +26 -0
- package/out/command-line/command.d.ts +15 -2
- package/out/command-line/command.d.ts.map +1 -1
- package/out/command-line/command.js +29 -6
- package/out/command-line/controller/deploy-controller.d.ts.map +1 -1
- package/out/command-line/controller/deploy-controller.js +4 -7
- package/out/command-line/controller/install-controller.d.ts +3 -3
- package/out/command-line/controller/install-controller.d.ts.map +1 -1
- package/out/command-line/controller/install-controller.js +16 -13
- package/out/command-line/controller/version-controller.d.ts +36 -0
- package/out/command-line/controller/version-controller.d.ts.map +1 -0
- package/out/command-line/controller/version-controller.js +114 -0
- package/out/command-line/dependency-injection.d.ts +4 -1
- package/out/command-line/dependency-injection.d.ts.map +1 -1
- package/out/command-line/dependency-injection.js +14 -6
- package/out/command-line/index.d.ts +1 -1
- package/out/command-line/index.d.ts.map +1 -1
- package/out/command-line/index.js +6 -4
- package/out/command-line/register-app-commands.d.ts.map +1 -1
- package/out/command-line/register-app-commands.js +9 -1
- package/out/command-line/register-installation-commands.d.ts +2 -10
- package/out/command-line/register-installation-commands.d.ts.map +1 -1
- package/out/command-line/register-installation-commands.js +29 -32
- package/out/command-line/register-version-commands.d.ts +4 -0
- package/out/command-line/register-version-commands.d.ts.map +1 -0
- package/out/command-line/register-version-commands.js +76 -0
- package/out/command-line/register-webtrigger-commands.d.ts +1 -1
- package/out/command-line/register-webtrigger-commands.d.ts.map +1 -1
- package/out/command-line/register-webtrigger-commands.js +13 -5
- package/out/command-line/view/deploy-view.d.ts +1 -1
- package/out/command-line/view/deploy-view.d.ts.map +1 -1
- package/out/command-line/view/deploy-view.js +2 -2
- package/out/command-line/view/version-view.d.ts +26 -0
- package/out/command-line/view/version-view.d.ts.map +1 -0
- package/out/command-line/view/version-view.js +198 -0
- package/out/environment/graphql-client.d.ts +1 -0
- package/out/environment/graphql-client.d.ts.map +1 -1
- package/out/environment/graphql-client.js +3 -1
- package/out/environment/list-environment.d.ts +1 -0
- package/out/environment/list-environment.d.ts.map +1 -1
- package/out/installations/graphql-client.d.ts +6 -5
- package/out/installations/graphql-client.d.ts.map +1 -1
- package/out/installations/graphql-client.js +44 -7
- package/out/installations/installation-helper.d.ts.map +1 -1
- package/out/installations/installation-helper.js +1 -1
- package/out/installations/site-translation/bitbucket.d.ts +3 -4
- package/out/installations/site-translation/bitbucket.d.ts.map +1 -1
- package/out/installations/site-translation/bitbucket.js +1 -1
- package/out/installations/site-translation/index.d.ts +1 -1
- package/out/installations/site-translation/index.d.ts.map +1 -1
- package/out/installations/site-translation/index.js +1 -1
- package/out/installations/site-translation/site-translation.d.ts +3 -4
- package/out/installations/site-translation/site-translation.d.ts.map +1 -1
- package/out/installations/site-translation/sited-products.d.ts +29 -0
- package/out/installations/site-translation/sited-products.d.ts.map +1 -0
- package/out/installations/site-translation/sited-products.js +133 -0
- package/out/service/installation-service.d.ts +18 -4
- package/out/service/installation-service.d.ts.map +1 -1
- package/out/service/installation-service.js +44 -10
- package/out/service/tunnel-service.d.ts.map +1 -1
- package/out/service/tunnel-service.js +1 -1
- package/out/service/version-service.d.ts +77 -0
- package/out/service/version-service.d.ts.map +1 -0
- package/out/service/version-service.js +163 -0
- package/out/version/graphql-client.d.ts +25 -0
- package/out/version/graphql-client.d.ts.map +1 -0
- package/out/version/graphql-client.js +144 -0
- package/package.json +13 -11
- package/out/installations/site-translation/cloudid-products.d.ts +0 -25
- package/out/installations/site-translation/cloudid-products.d.ts.map +0 -1
- package/out/installations/site-translation/cloudid-products.js +0 -103
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/deploy-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,oBAAo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Q,CAAC,iCAAiC;IAClD,OAAO,CAAC,QAAQ,CAAC,8BAA8B;IAC/C,OAAO,CAAC,QAAQ,CAAC,wBAAwB;gBAXxB,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,oBAAoB,EAAE,mBAAmB,EACzC,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,oBAAoB,EAC1C,qBAAqB,EAAE,qBAAqB,EAC5C,oBAAoB,EAAE,oBAAoB,EAC1C,UAAU,EAAE,UAAU,EACtB,iCAAiC,EAAE,0BAA0B,EAC7D,8BAA8B,EAAE,0BAA0B,EAC1D,wBAAwB,EAAE,wBAAwB;IAGrE,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,6BAA6B;YAWvB,wBAAwB;YA2BxB,mBAAmB;YAmCnB,oBAAoB;YA4BpB,2BAA2B;YAe3B,wBAAwB;IAkBzB,GAAG,CAAC,EACf,WAAW,EACX,MAAM,EACN,cAAc,EACd,YAAY,EACb,EAAE,aAAa,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;CAiFpD"}
|
|
@@ -203,15 +203,12 @@ class DeployController {
|
|
|
203
203
|
}
|
|
204
204
|
const handlers = await this.configFile.getAppHandlers();
|
|
205
205
|
const resources = await this.configFile.getResources();
|
|
206
|
-
let
|
|
206
|
+
let hasNoInstallationsForEnv = true;
|
|
207
207
|
try {
|
|
208
|
-
|
|
209
|
-
environment: 'production'
|
|
210
|
-
});
|
|
211
|
-
hasProdInstallations = !prodInstallations.installations.length;
|
|
208
|
+
hasNoInstallationsForEnv = await this.installationsService.hasNoAppInstallationsForEnv(appDetails.environmentType);
|
|
212
209
|
}
|
|
213
210
|
catch (err) {
|
|
214
|
-
this.deployView.
|
|
211
|
+
this.deployView.displayHasNoAppInstallationsForEnvError();
|
|
215
212
|
if (verify) {
|
|
216
213
|
throw err;
|
|
217
214
|
}
|
|
@@ -221,7 +218,7 @@ class DeployController {
|
|
|
221
218
|
: this.sandboxPackageUploadDeployCommand;
|
|
222
219
|
const config = await this.configFile.readConfig();
|
|
223
220
|
const packageConfig = config.app?.package;
|
|
224
|
-
const analytics = await this.deployView.reportDeploymentProgress(appDetails,
|
|
221
|
+
const analytics = await this.deployView.reportDeploymentProgress(appDetails, hasNoInstallationsForEnv, () => deployCommand.execute({
|
|
225
222
|
handlers,
|
|
226
223
|
resources,
|
|
227
224
|
environmentKey: environment,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { AppConfigProvider, ConfigFile, UI,
|
|
2
|
+
import { AppConfigProvider, ConfigFile, UI, SupportedProductsService } from '@forge/cli-shared';
|
|
3
3
|
import { URL } from 'url';
|
|
4
4
|
import { InstallAppSiteCommand } from '../../installations/install-app-site';
|
|
5
5
|
import { InstallationService } from '../../service/installation-service';
|
|
@@ -25,8 +25,8 @@ export declare class InstallController {
|
|
|
25
25
|
private readonly installAppSiteCommand;
|
|
26
26
|
private readonly installationService;
|
|
27
27
|
private readonly installView;
|
|
28
|
-
private readonly
|
|
29
|
-
constructor(appConfigProvider: AppConfigProvider, configFile: ConfigFile, ui: UI, installAppSiteCommand: InstallAppSiteCommand, installationService: InstallationService, installView: InstallView,
|
|
28
|
+
private readonly supportedProductsService;
|
|
29
|
+
constructor(appConfigProvider: AppConfigProvider, configFile: ConfigFile, ui: UI, installAppSiteCommand: InstallAppSiteCommand, installationService: InstallationService, installView: InstallView, supportedProductsService: SupportedProductsService);
|
|
30
30
|
private securityPrompt;
|
|
31
31
|
private installOrUpgrade;
|
|
32
32
|
private promptForProduct;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/install-controller.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,iBAAiB,EAEjB,UAAU,EAEV,EAAE,
|
|
1
|
+
{"version":3,"file":"install-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/install-controller.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,iBAAiB,EAEjB,UAAU,EAEV,EAAE,EAYF,wBAAwB,EAEzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAA6B,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAYD,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,WAAW,EAAE,MAAM;CAGhC;AASD,qBAAa,iBAAiB;IAE1B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IACtC,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,wBAAwB;gBANxB,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,UAAU,EACtB,EAAE,EAAE,EAAE,EACN,qBAAqB,EAAE,qBAAqB,EAC5C,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,WAAW,EACxB,wBAAwB,EAAE,wBAAwB;YAGvD,cAAc;YAmBd,gBAAgB;YA8ChB,gBAAgB;YAQhB,aAAa;YAsBb,gBAAgB;IAwB9B,OAAO,CAAC,uCAAuC;IAY/C,OAAO,CAAC,cAAc;IAGtB,OAAO,CAAC,qBAAqB;IAgB7B,OAAO,CAAC,qBAAqB,CAK3B;IAEW,GAAG,CAAC,EACf,WAAW,EACX,IAAI,EACJ,OAAO,EACP,OAAO,EACP,aAAa,EACb,OAAO,EACP,YAAY,EACZ,eAAe,EACf,cAAc,EACf,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;YAkHrB,kBAAkB;IAUhC,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,oBAAoB;IA8B5B,OAAO,CAAC,uBAAuB;YAoBjB,8CAA8C;CAW7D"}
|
|
@@ -16,15 +16,15 @@ class InstallController {
|
|
|
16
16
|
installAppSiteCommand;
|
|
17
17
|
installationService;
|
|
18
18
|
installView;
|
|
19
|
-
|
|
20
|
-
constructor(appConfigProvider, configFile, ui, installAppSiteCommand, installationService, installView,
|
|
19
|
+
supportedProductsService;
|
|
20
|
+
constructor(appConfigProvider, configFile, ui, installAppSiteCommand, installationService, installView, supportedProductsService) {
|
|
21
21
|
this.appConfigProvider = appConfigProvider;
|
|
22
22
|
this.configFile = configFile;
|
|
23
23
|
this.ui = ui;
|
|
24
24
|
this.installAppSiteCommand = installAppSiteCommand;
|
|
25
25
|
this.installationService = installationService;
|
|
26
26
|
this.installView = installView;
|
|
27
|
-
this.
|
|
27
|
+
this.supportedProductsService = supportedProductsService;
|
|
28
28
|
}
|
|
29
29
|
async securityPrompt(site) {
|
|
30
30
|
this.ui.info(cli_shared_1.Text.install.security.banner(site.host));
|
|
@@ -43,6 +43,7 @@ class InstallController {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
async installOrUpgrade(upgrade, environment, environmentType, site, product, appId, text, license, overrides) {
|
|
46
|
+
const isWorkspaceProduct = !!product && (await this.supportedProductsService.isWorkspaceProduct(product));
|
|
46
47
|
return this.ui.displayProgress(async () => {
|
|
47
48
|
if (upgrade) {
|
|
48
49
|
const isAlreadyUpdated = await this.installationService.upgradeInstallation(site, product, environment, appId);
|
|
@@ -60,7 +61,7 @@ class InstallController {
|
|
|
60
61
|
}
|
|
61
62
|
}, text.cmd.start(environment, environmentType), (alreadyUpdated) => {
|
|
62
63
|
if (alreadyUpdated) {
|
|
63
|
-
return
|
|
64
|
+
return isWorkspaceProduct
|
|
64
65
|
? cli_shared_1.Text.upgrade.alreadyUpdated.spinnerWorkspace
|
|
65
66
|
: cli_shared_1.Text.upgrade.alreadyUpdated.spinnerSite;
|
|
66
67
|
}
|
|
@@ -71,11 +72,10 @@ class InstallController {
|
|
|
71
72
|
}
|
|
72
73
|
async promptForProduct() {
|
|
73
74
|
this.ui.info(cli_shared_1.Text.installationContext.overviewProduct);
|
|
74
|
-
|
|
75
|
-
return await this.ui.promptForList(cli_shared_1.Text.installationContext.promptProduct, (0, cli_shared_1.getSupportedProducts)({ enableAtlas }));
|
|
75
|
+
return await this.ui.promptForList(cli_shared_1.Text.installationContext.promptProduct, await this.supportedProductsService.getSupportedProducts());
|
|
76
76
|
}
|
|
77
77
|
async promptForSite(product) {
|
|
78
|
-
const isWorkspaceBased = product && (
|
|
78
|
+
const isWorkspaceBased = product && (await this.supportedProductsService.isWorkspaceProduct(product));
|
|
79
79
|
const overviewText = isWorkspaceBased
|
|
80
80
|
? cli_shared_1.Text.installationContext.overviewWorkspace
|
|
81
81
|
: cli_shared_1.Text.installationContext.overviewSite;
|
|
@@ -88,18 +88,19 @@ class InstallController {
|
|
|
88
88
|
if (!trySite) {
|
|
89
89
|
throw new cli_shared_1.ValidationError(invalidText);
|
|
90
90
|
}
|
|
91
|
-
return
|
|
91
|
+
return this.supportedProductsService.validateSite(trySite, product);
|
|
92
92
|
}
|
|
93
93
|
async promptForUpgrade(siteOption, productOption, environmentOption) {
|
|
94
94
|
const { installations } = await this.installationService.listNonTechnicalAppInstallations({
|
|
95
|
-
site: siteOption
|
|
95
|
+
site: siteOption,
|
|
96
96
|
product: productOption,
|
|
97
97
|
environment: environmentOption
|
|
98
98
|
});
|
|
99
99
|
const { site, product, environmentKey, environmentType } = await this.installView.promptForUpgrade(installations);
|
|
100
|
+
const productName = (0, cli_shared_1.productDisplayName)(product);
|
|
100
101
|
return {
|
|
101
|
-
site:
|
|
102
|
-
product:
|
|
102
|
+
site: await this.supportedProductsService.validateSite(site, productName),
|
|
103
|
+
product: productName,
|
|
103
104
|
environment: environmentKey,
|
|
104
105
|
environmentType
|
|
105
106
|
};
|
|
@@ -155,7 +156,9 @@ class InstallController {
|
|
|
155
156
|
}
|
|
156
157
|
product = product ? product : await this.promptForProduct();
|
|
157
158
|
site = site ? site : await this.promptForSite(product);
|
|
158
|
-
const bannerText = product && (
|
|
159
|
+
const bannerText = product && (await this.supportedProductsService.isWorkspaceProduct(product))
|
|
160
|
+
? text.bannerWorkspace
|
|
161
|
+
: text.bannerSite;
|
|
159
162
|
this.ui.info(bannerText);
|
|
160
163
|
if ((0, cli_shared_1.isSecureSite)(site)) {
|
|
161
164
|
await this.securityPrompt(site);
|
|
@@ -193,7 +196,7 @@ class InstallController {
|
|
|
193
196
|
if (!uniqueProductsFromScopes || uniqueProductsFromScopes.length <= 1)
|
|
194
197
|
return;
|
|
195
198
|
const { installations } = await this.installationService.listNonTechnicalAppInstallations({
|
|
196
|
-
site
|
|
199
|
+
site,
|
|
197
200
|
environment
|
|
198
201
|
});
|
|
199
202
|
const productsToUpgrade = installations
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { VersionView } from '../view/version-view';
|
|
2
|
+
import { VersionService } from '../../service/version-service';
|
|
3
|
+
interface AppVersionOptions {
|
|
4
|
+
environment: string;
|
|
5
|
+
majorVersion?: number;
|
|
6
|
+
json?: boolean;
|
|
7
|
+
outFile?: string;
|
|
8
|
+
nonInteractive?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface AppVersionDiffOptions {
|
|
11
|
+
environment: string;
|
|
12
|
+
version1: number;
|
|
13
|
+
version2: number;
|
|
14
|
+
outFile?: string;
|
|
15
|
+
}
|
|
16
|
+
interface AppVersionListOptions {
|
|
17
|
+
environment: string;
|
|
18
|
+
json?: boolean;
|
|
19
|
+
outFile?: string;
|
|
20
|
+
nonInteractive?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare class VersionController {
|
|
23
|
+
private readonly versionService;
|
|
24
|
+
private readonly view;
|
|
25
|
+
constructor(versionService: VersionService, view: VersionView);
|
|
26
|
+
getAppVersionDiff({ environment, version1, version2, outFile }: AppVersionDiffOptions): Promise<void>;
|
|
27
|
+
getAppVersionDetails({ environment, majorVersion, json, outFile, nonInteractive }: AppVersionOptions): Promise<void>;
|
|
28
|
+
private writeToFile;
|
|
29
|
+
private displayInJson;
|
|
30
|
+
private displayDetailsInTable;
|
|
31
|
+
private displayDiffInText;
|
|
32
|
+
private writeDiffToFile;
|
|
33
|
+
getVersionList({ environment, json, outFile, nonInteractive }: AppVersionListOptions): Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=version-controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-controller.d.ts","sourceRoot":"","sources":["../../../src/command-line/controller/version-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAkB,MAAM,+BAA+B,CAAC;AAI/E,UAAU,iBAAiB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,qBAAqB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAsBD,qBAAa,iBAAiB;IAE1B,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,IAAI;gBADJ,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAE,WAAW;IAGvB,iBAAiB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAerG,oBAAoB,CAAC,EAChC,WAAW,EACX,YAAY,EACZ,IAAY,EACZ,OAAO,EACP,cAAc,EACf,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBpC,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,iBAAiB;IA4BzB,OAAO,CAAC,eAAe;IAWV,cAAc,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;CAgBlH"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VersionController = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const fs_1 = require("fs");
|
|
6
|
+
const diff = tslib_1.__importStar(require("diff"));
|
|
7
|
+
const defaultProperties = ['appVersion', 'deploymentDateTime', 'environmentType'];
|
|
8
|
+
function filterObjectProperties(source, filteredProperties, defaultProperties) {
|
|
9
|
+
const result = {};
|
|
10
|
+
for (const prop of [...filteredProperties, ...defaultProperties]) {
|
|
11
|
+
result[prop] = source[prop];
|
|
12
|
+
}
|
|
13
|
+
return result;
|
|
14
|
+
}
|
|
15
|
+
class VersionController {
|
|
16
|
+
versionService;
|
|
17
|
+
view;
|
|
18
|
+
constructor(versionService, view) {
|
|
19
|
+
this.versionService = versionService;
|
|
20
|
+
this.view = view;
|
|
21
|
+
}
|
|
22
|
+
async getAppVersionDiff({ environment, version1, version2, outFile }) {
|
|
23
|
+
const [version1Details, version2Details] = await this.view.displayDiffProgress(() => Promise.all([
|
|
24
|
+
this.versionService.getAppVersionDetails(environment, version1),
|
|
25
|
+
this.versionService.getAppVersionDetails(environment, version2)
|
|
26
|
+
]));
|
|
27
|
+
if (outFile) {
|
|
28
|
+
this.writeDiffToFile(version1Details, version2Details, outFile);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
this.displayDiffInText(version1Details, version2Details, environment);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
async getAppVersionDetails({ environment, majorVersion, json = false, outFile, nonInteractive }) {
|
|
35
|
+
let filteredProperties = [];
|
|
36
|
+
if (!nonInteractive) {
|
|
37
|
+
filteredProperties = await this.view.promptVersionDetailsProperties();
|
|
38
|
+
}
|
|
39
|
+
const request = this.versionService.getAppVersionDetails(environment, majorVersion);
|
|
40
|
+
const versionDetails = nonInteractive ? await request : await this.view.displayDetailsProgress(() => request);
|
|
41
|
+
if (filteredProperties.length === 0) {
|
|
42
|
+
filteredProperties = Object.keys(versionDetails);
|
|
43
|
+
}
|
|
44
|
+
const filteredVersionDetails = filterObjectProperties(versionDetails, filteredProperties, defaultProperties);
|
|
45
|
+
if (outFile) {
|
|
46
|
+
this.writeToFile(filteredVersionDetails, outFile);
|
|
47
|
+
}
|
|
48
|
+
else if (json) {
|
|
49
|
+
this.displayInJson(filteredVersionDetails);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this.displayDetailsInTable(filteredVersionDetails, environment);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
writeToFile(data, outFile) {
|
|
56
|
+
this.view.displayWriteToFile(outFile);
|
|
57
|
+
(0, fs_1.writeFileSync)(outFile, JSON.stringify(data, null, 2));
|
|
58
|
+
}
|
|
59
|
+
displayInJson(data) {
|
|
60
|
+
this.view.displayDataInJson(data);
|
|
61
|
+
}
|
|
62
|
+
displayDetailsInTable(details, environment) {
|
|
63
|
+
this.view.displayVersionDetailsBanner(details.appVersion, environment, details.environmentType);
|
|
64
|
+
this.view.displayDetailsAsTable(details);
|
|
65
|
+
}
|
|
66
|
+
displayDiffInText(version1, version2, environment) {
|
|
67
|
+
this.view.displayDiffBanner(version1.appVersion, version2.appVersion, environment, version1.environmentType);
|
|
68
|
+
this.view.displayDiffAsTable({ v1: version1.appVersion, v2: version2.appVersion }, [
|
|
69
|
+
{
|
|
70
|
+
key: 'scopes',
|
|
71
|
+
diff: diff.diffJson(version1.scopes, version2.scopes)
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
key: 'deployment date',
|
|
75
|
+
diff: diff.diffJson(version1.deploymentDateTime, version2.deploymentDateTime)
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
key: 'egress',
|
|
79
|
+
diff: diff.diffJson(version1.egresses, version2.egresses)
|
|
80
|
+
},
|
|
81
|
+
{ key: 'policies', diff: diff.diffJson(version1.policies, version2.policies) },
|
|
82
|
+
{ key: 'connect keys', diff: diff.diffJson(version1.connectKeys, version2.connectKeys) },
|
|
83
|
+
{
|
|
84
|
+
key: 'functions',
|
|
85
|
+
diff: diff.diffJson(version1.functions, version2.functions)
|
|
86
|
+
},
|
|
87
|
+
{ key: 'modules', diff: diff.diffJson(version1.modules, version2.modules) },
|
|
88
|
+
{ key: 'remotes', diff: diff.diffJson(version1.remotes, version2.remotes) },
|
|
89
|
+
{ key: 'license', diff: diff.diffJson('' + version1.requiresLicense, '' + version2.requiresLicense) }
|
|
90
|
+
]);
|
|
91
|
+
}
|
|
92
|
+
writeDiffToFile(version1, version2, outFile) {
|
|
93
|
+
this.view.displayWriteToFile(outFile);
|
|
94
|
+
const patch = diff.createTwoFilesPatch(`${version1.appVersion}`, `${version2.appVersion}`, JSON.stringify(version1, null, 2), JSON.stringify(version2, null, 2));
|
|
95
|
+
(0, fs_1.writeFileSync)(outFile, patch);
|
|
96
|
+
}
|
|
97
|
+
async getVersionList({ environment, json, outFile, nonInteractive }) {
|
|
98
|
+
const request = this.versionService.getAppVersionOverviewList(environment);
|
|
99
|
+
const versionList = nonInteractive || json ? await request : await this.view.displayListProgress(() => request);
|
|
100
|
+
if (!nonInteractive && !json) {
|
|
101
|
+
this.view.displayListBanner(versionList.length, environment, versionList[0].environmentType);
|
|
102
|
+
}
|
|
103
|
+
if (outFile) {
|
|
104
|
+
this.writeToFile(versionList, outFile);
|
|
105
|
+
}
|
|
106
|
+
else if (json) {
|
|
107
|
+
this.displayInJson(versionList);
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
this.view.displayVersionList(versionList);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
exports.VersionController = VersionController;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CLIDetails, CommandLineUI, ConfigFile, CreateAppCommand, FeatureFlagService, GetAppOwnerQuery, LoginCommand, LogoutCommand, RegisterAppCommand, ViewAppLogsCommand, UserRepositoryImpl } from '@forge/cli-shared';
|
|
1
|
+
import { CLIDetails, CommandLineUI, ConfigFile, CreateAppCommand, FeatureFlagService, GetAppOwnerQuery, LoginCommand, LogoutCommand, RegisterAppCommand, ViewAppLogsCommand, UserRepositoryImpl, SupportedProductsService } from '@forge/cli-shared';
|
|
2
2
|
import { AnalyticsClientReporter } from '../analytics-client/analytics-client';
|
|
3
3
|
import { PackageUploadDeployCommand } from '../deploy';
|
|
4
4
|
import { DeleteEnvironmentVariableCommand } from '../environment-variables/delete-environment-variable';
|
|
@@ -29,6 +29,7 @@ import { StubController } from './controller/stubController';
|
|
|
29
29
|
import { PrerequisitesController } from './controller/prerequisites-controller';
|
|
30
30
|
import { DefaultEnvironmentController } from './controller/default-environment-controller';
|
|
31
31
|
import { EligibilityController } from './controller/eligibility-controller';
|
|
32
|
+
import { VersionController } from './controller/version-controller';
|
|
32
33
|
export declare const getDependencies: (cliDetails: CLIDetails | undefined) => Promise<{
|
|
33
34
|
ui: CommandLineUI;
|
|
34
35
|
cmd: Command<[], import("./command").DefaultOpts>;
|
|
@@ -65,6 +66,7 @@ export declare const getDependencies: (cliDetails: CLIDetails | undefined) => Pr
|
|
|
65
66
|
customEntitiesService: CustomEntitiesService;
|
|
66
67
|
credentialStore: import("@forge/cli-shared").CredentialStore;
|
|
67
68
|
userRepository: UserRepositoryImpl;
|
|
69
|
+
supportedProductsService: SupportedProductsService;
|
|
68
70
|
};
|
|
69
71
|
controllers: {
|
|
70
72
|
autocompleteController: AutocompleteController;
|
|
@@ -79,6 +81,7 @@ export declare const getDependencies: (cliDetails: CLIDetails | undefined) => Pr
|
|
|
79
81
|
stubController: StubController;
|
|
80
82
|
prerequisitesController: PrerequisitesController;
|
|
81
83
|
defaultEnvironmentController: DefaultEnvironmentController;
|
|
84
|
+
versionController: VersionController;
|
|
82
85
|
};
|
|
83
86
|
}>;
|
|
84
87
|
declare type PromiseType<T> = T extends Promise<infer R> ? R : never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-injection.d.ts","sourceRoot":"","sources":["../../src/command-line/dependency-injection.ts"],"names":[],"mappings":"AAIA,OAAO,EASL,UAAU,EACV,aAAa,EAEb,UAAU,EAGV,gBAAgB,EAGhB,kBAAkB,EAGlB,gBAAgB,EAQhB,YAAY,EACZ,aAAa,EAOb,kBAAkB,EAIlB,kBAAkB,EAElB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"dependency-injection.d.ts","sourceRoot":"","sources":["../../src/command-line/dependency-injection.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C;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAUlE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAGhF,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAG3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAKpE,eAAO,MAAM,eAAe,eAAsB,UAAU,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8XvE,CAAC;AAGF,aAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC7D,oBAAY,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC"}
|
|
@@ -69,6 +69,10 @@ const graphql_client_8 = require("../eligibility/graphql-client");
|
|
|
69
69
|
const roa_service_1 = require("../service/roa-service");
|
|
70
70
|
const eligibility_controller_1 = require("./controller/eligibility-controller");
|
|
71
71
|
const eligibility_view_1 = require("./view/eligibility-view");
|
|
72
|
+
const version_controller_1 = require("./controller/version-controller");
|
|
73
|
+
const version_service_1 = require("../service/version-service");
|
|
74
|
+
const version_view_1 = require("./view/version-view");
|
|
75
|
+
const graphql_client_9 = require("../version/graphql-client");
|
|
72
76
|
const getDependencies = async (cliDetails) => {
|
|
73
77
|
let cmd;
|
|
74
78
|
const ui = new cli_shared_1.CommandLineUI(() => cmd.verbose);
|
|
@@ -93,6 +97,7 @@ const getDependencies = async (cliDetails) => {
|
|
|
93
97
|
const credentialStore = (0, cli_shared_1.getCredentialStore)(ui, userRepository);
|
|
94
98
|
const featureFlagService = new cli_shared_1.FeatureFlagService(ui, cliDetails, credentialStore, appConfigReader);
|
|
95
99
|
const statsigService = new cli_shared_1.StatsigService(ui, cliDetails, credentialStore, appConfigReader);
|
|
100
|
+
const supportedProductsService = new cli_shared_1.SupportedProductsService(statsigService);
|
|
96
101
|
const settingsView = new settings_view_1.SettingsView(ui);
|
|
97
102
|
const settingsController = new settings_controller_1.SettingsController(settingsView, cachedConfigService, assertiveAppConfigReader);
|
|
98
103
|
const liteLintView = new lite_lint_view_1.LiteLintView(ui);
|
|
@@ -139,7 +144,7 @@ const getDependencies = async (cliDetails) => {
|
|
|
139
144
|
const customEntitiesService = new custom_entities_service_1.CustomEntitiesService(assertiveAppConfigReader, appOauthClientGraphql, entitiesClient);
|
|
140
145
|
const listEntitiesIndexesCommand = new list_indexes_1.ListEntitiesIndexesCommand(customEntitiesService);
|
|
141
146
|
const bitbucketTranslation = new site_translation_1.BitbucketTranslator();
|
|
142
|
-
const cloudProductTranslation = new site_translation_1.
|
|
147
|
+
const cloudProductTranslation = new site_translation_1.SitedProductTranslator(graphQLClient);
|
|
143
148
|
const installationsClient = new graphql_client_6.InstallationsGraphqlClient(graphQLClient, cloudProductTranslation, bitbucketTranslation, cli_shared_1.pause);
|
|
144
149
|
const installAppSiteCommand = new install_app_site_1.InstallAppSiteCommand(assertiveAppConfigReader, installationsClient);
|
|
145
150
|
const uninstallAppCommand = new uninstall_app_1.UninstallAppCommand(assertiveAppConfigReader, installationsClient);
|
|
@@ -159,11 +164,12 @@ const getDependencies = async (cliDetails) => {
|
|
|
159
164
|
const nodeAppPackager = new deploy_1.AppPackager(nodeRuntimeBundler, nativeUiBundler, ui);
|
|
160
165
|
const getWebTriggerURLCommand = new get_webtrigger_url_1.GetWebTriggerURLCommand(assertiveAppConfigReader, installationsClient, appEnvironmentClient, webTriggerGraphqlClient);
|
|
161
166
|
const autocompleteController = new autocomplete_controller_1.AutocompleteController(ui);
|
|
162
|
-
const installationsService = new installation_service_1.InstallationService(assertiveAppConfigReader, installationsClient, installationsClient);
|
|
167
|
+
const installationsService = new installation_service_1.InstallationService(assertiveAppConfigReader, installationsClient, installationsClient, installationsClient);
|
|
163
168
|
const installView = new install_view_1.InstallView(ui);
|
|
164
|
-
const installController = new install_controller_1.InstallController(assertiveAppConfigReader, configFile, ui, installAppSiteCommand, installationsService, installView,
|
|
169
|
+
const installController = new install_controller_1.InstallController(assertiveAppConfigReader, configFile, ui, installAppSiteCommand, installationsService, installView, supportedProductsService);
|
|
165
170
|
const feedbackController = new feedback_controller_1.FeedbackController(credentialStore, feedbackPostClient);
|
|
166
171
|
const eligibilityController = new eligibility_controller_1.EligibilityController(new roa_service_1.RoaService(assertiveAppConfigReader, new graphql_client_8.RoaEligibilityClient(graphQLClient)), new eligibility_view_1.EligibilityView(ui));
|
|
172
|
+
const versionController = new version_controller_1.VersionController(new version_service_1.VersionService(assertiveAppConfigReader, new graphql_client_9.AppVersionDetailsClient(graphQLClient)), new version_view_1.VersionView(ui));
|
|
167
173
|
const lintService = new lint_service_1.LintService(configFile, fileReader);
|
|
168
174
|
const lintView = new lint_view_1.LintView(ui);
|
|
169
175
|
const lintController = new lint_controller_1.LintController(lintService, lintView);
|
|
@@ -192,7 +198,7 @@ const getDependencies = async (cliDetails) => {
|
|
|
192
198
|
const stubController = new stubController_1.StubController();
|
|
193
199
|
const prerequisitesController = new prerequisites_controller_1.PrerequisitesController(ui, cliDetails);
|
|
194
200
|
const defaultEnvironmentController = new default_environment_controller_1.DefaultEnvironmentController(ui, credentialStore, cachedConfigService, assertiveAppConfigReader, userRepository, createEnvironmentCommand, listEnvironmentCommand, getAppOwnerQuery);
|
|
195
|
-
cmd = command_1.Command.program(ui, analyticsClientReporter, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, featureFlagService);
|
|
201
|
+
cmd = command_1.Command.program(ui, analyticsClientReporter, preCommandController, cliDetails, credentialStore, defaultEnvironmentController, featureFlagService, supportedProductsService);
|
|
196
202
|
return {
|
|
197
203
|
ui,
|
|
198
204
|
cmd,
|
|
@@ -228,7 +234,8 @@ const getDependencies = async (cliDetails) => {
|
|
|
228
234
|
migrationKeysService,
|
|
229
235
|
customEntitiesService,
|
|
230
236
|
credentialStore,
|
|
231
|
-
userRepository
|
|
237
|
+
userRepository,
|
|
238
|
+
supportedProductsService
|
|
232
239
|
},
|
|
233
240
|
controllers: {
|
|
234
241
|
autocompleteController,
|
|
@@ -242,7 +249,8 @@ const getDependencies = async (cliDetails) => {
|
|
|
242
249
|
settingsController,
|
|
243
250
|
stubController,
|
|
244
251
|
prerequisitesController,
|
|
245
|
-
defaultEnvironmentController
|
|
252
|
+
defaultEnvironmentController,
|
|
253
|
+
versionController
|
|
246
254
|
}
|
|
247
255
|
};
|
|
248
256
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Dependencies } from './dependency-injection';
|
|
2
|
-
export declare function registerCommands(deps: Dependencies): void
|
|
2
|
+
export declare function registerCommands(deps: Dependencies): Promise<void>;
|
|
3
3
|
export declare const main: () => Promise<void>;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command-line/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/command-line/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAmB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAqBvE,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,YAAY,iBAkBxD;AAQD,eAAO,MAAM,IAAI,QAAa,QAAQ,IAAI,CAUzC,CAAC"}
|
|
@@ -20,23 +20,25 @@ const register_providers_commands_1 = require("./register-providers-commands");
|
|
|
20
20
|
const register_environments_commands_1 = require("./register-environments-commands");
|
|
21
21
|
const register_storage_commands_1 = require("./register-storage-commands");
|
|
22
22
|
const register_eligibility_commands_1 = require("./register-eligibility-commands");
|
|
23
|
-
|
|
23
|
+
const register_version_commands_1 = require("./register-version-commands");
|
|
24
|
+
async function registerCommands(deps) {
|
|
24
25
|
(0, register_autocomplete_commands_1.registerCommands)(deps);
|
|
25
26
|
(0, register_authentication_command_1.registerCommands)(deps);
|
|
26
27
|
(0, register_app_commands_1.registerCommands)(deps);
|
|
27
28
|
(0, register_deployment_commands_1.registerCommands)(deps);
|
|
28
|
-
(0, register_installation_commands_1.registerCommands)(deps);
|
|
29
|
+
await (0, register_installation_commands_1.registerCommands)(deps);
|
|
29
30
|
(0, register_environments_commands_1.registerCommands)(deps);
|
|
30
31
|
(0, register_environment_variables_commands_1.registerCommands)(deps);
|
|
31
32
|
(0, register_lint_command_1.registerCommands)(deps);
|
|
32
33
|
(0, register_log_commands_1.registerCommands)(deps);
|
|
33
34
|
(0, register_tunnel_commands_1.registerCommands)(deps);
|
|
34
|
-
(0, register_webtrigger_commands_1.registerCommands)(deps);
|
|
35
|
+
await (0, register_webtrigger_commands_1.registerCommands)(deps);
|
|
35
36
|
(0, register_feedback_commands_1.registerCommands)(deps);
|
|
36
37
|
(0, register_settings_commands_1.registerCommands)(deps);
|
|
37
38
|
(0, register_providers_commands_1.registerCommands)(deps);
|
|
38
39
|
(0, register_storage_commands_1.registerCommands)(deps);
|
|
39
40
|
(0, register_eligibility_commands_1.registerCommands)(deps);
|
|
41
|
+
(0, register_version_commands_1.registerCommands)(deps);
|
|
40
42
|
}
|
|
41
43
|
exports.registerCommands = registerCommands;
|
|
42
44
|
const registerEvents = ({ ui }) => {
|
|
@@ -48,7 +50,7 @@ const main = async () => {
|
|
|
48
50
|
const cliDetails = (0, version_info_1.getCLIDetails)();
|
|
49
51
|
const deps = await (0, dependency_injection_1.getDependencies)(cliDetails);
|
|
50
52
|
registerEvents(deps);
|
|
51
|
-
registerCommands(deps);
|
|
53
|
+
await registerCommands(deps);
|
|
52
54
|
await deps.controllers.prerequisitesController.check();
|
|
53
55
|
await deps.cmd.parse(process.argv);
|
|
54
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-app-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-app-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAqB,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG/G,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"register-app-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-app-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAqB,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG/G,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAuBtD,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKrD;AA6CD,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAC1B,OAAO,CAQT;AAED,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAW7E;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,oBAAoB,CACxC,EAAE,EAAE,aAAa,EACjB,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,MAAM,EACZ,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,2BAA2B,GACnD,OAAO,CAAC,sBAAsB,CAAC,CAuBjC;AAuJD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,QAGlD"}
|
|
@@ -13,7 +13,15 @@ var TemplateCategory;
|
|
|
13
13
|
TemplateCategory["CUSTOM_UI"] = "Custom UI";
|
|
14
14
|
TemplateCategory["BACKEND"] = "Triggers and Validators";
|
|
15
15
|
})(TemplateCategory || (TemplateCategory = {}));
|
|
16
|
-
const PRODUCT_OPTIONS = [
|
|
16
|
+
const PRODUCT_OPTIONS = [
|
|
17
|
+
'show-all',
|
|
18
|
+
'bitbucket',
|
|
19
|
+
'compass',
|
|
20
|
+
'confluence',
|
|
21
|
+
'jira',
|
|
22
|
+
'jira-service-management',
|
|
23
|
+
'teamwork-graph'
|
|
24
|
+
];
|
|
17
25
|
const MAX_NAME_LENGTH = 60;
|
|
18
26
|
function formatProduct(product) {
|
|
19
27
|
return product
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { URL } from 'url';
|
|
3
1
|
import { Dependencies } from './dependency-injection';
|
|
4
2
|
import { Installation } from '../service/installation-service';
|
|
5
|
-
export declare
|
|
6
|
-
site?: string;
|
|
7
|
-
product?: string;
|
|
8
|
-
}): Promise<{
|
|
9
|
-
siteURL?: URL;
|
|
10
|
-
product?: string;
|
|
11
|
-
}>;
|
|
3
|
+
export declare const registerListInstallationsCommand: ({ cmd, ui, services: { installationsService } }: Dependencies) => void;
|
|
12
4
|
export declare const performSingleUninstall: (installId: string, { ui, commands: { uninstallAppCommand } }: Dependencies) => Promise<void>;
|
|
13
5
|
export declare const performMultipleUninstalls: (appsToUninstall: Installation[], { ui, commands: { uninstallAppCommand } }: Dependencies) => Promise<void>;
|
|
14
|
-
export declare const registerCommands: ({ cmd, ...deps }: Dependencies) => void
|
|
6
|
+
export declare const registerCommands: ({ cmd, ...deps }: Dependencies) => Promise<void>;
|
|
15
7
|
//# sourceMappingURL=register-installation-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-installation-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-installation-commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"register-installation-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-installation-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAqD/D,eAAO,MAAM,gCAAgC,oDAAqD,YAAY,SAmC7G,CAAC;AAEF,eAAO,MAAM,sBAAsB,cACtB,MAAM,6CAC0B,YAAY,kBAuBxD,CAAC;AAEF,eAAO,MAAM,yBAAyB,oBACnB,YAAY,EAAE,6CACY,YAAY,kBA8CxD,CAAC;AAsEF,eAAO,MAAM,gBAAgB,qBAA4B,YAAY,KAAG,QAAQ,IAAI,CAenF,CAAC"}
|