@forge/cli 11.2.0 → 11.3.0-next.4-experimental-011b3b2
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 +81 -0
- package/npm-shrinkwrap.json +35 -35
- package/out/command-line/controller/install-controller.d.ts +1 -1
- package/out/command-line/controller/install-controller.d.ts.map +1 -1
- package/out/command-line/controller/install-controller.js +5 -4
- package/out/command-line/dependency-injection.js +1 -1
- package/out/command-line/register-app-commands.d.ts +23 -1
- package/out/command-line/register-app-commands.d.ts.map +1 -1
- package/out/command-line/register-app-commands.js +101 -54
- package/out/command-line/uninstall-command-helpers.js +1 -1
- package/out/command-line/view/install-view.d.ts +3 -3
- package/out/command-line/view/install-view.d.ts.map +1 -1
- package/out/command-line/view/install-view.js +3 -3
- package/out/deploy/deployer/deployer.d.ts.map +1 -1
- package/out/deploy/deployer/deployer.js +6 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,86 @@
|
|
|
1
1
|
# @forge/cli
|
|
2
2
|
|
|
3
|
+
## 11.3.0-next.4-experimental-011b3b2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d156658: Switch the `forge create` flow to select product context first
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 2cdac63: forge install should list all scopes
|
|
12
|
+
- 999a9d0: Update error messages for deployment
|
|
13
|
+
- b4cee28: Fix uninstall message
|
|
14
|
+
- Updated dependencies [2cdac63]
|
|
15
|
+
- Updated dependencies [999a9d0]
|
|
16
|
+
- Updated dependencies [94e48b9]
|
|
17
|
+
- Updated dependencies [d156658]
|
|
18
|
+
- Updated dependencies [64daaa5]
|
|
19
|
+
- @forge/cli-shared@6.8.0-next.4-experimental-011b3b2
|
|
20
|
+
- @forge/manifest@8.9.0-next.1-experimental-011b3b2
|
|
21
|
+
- @forge/bundler@4.21.1-next.4-experimental-011b3b2
|
|
22
|
+
- @forge/lint@5.7.3-next.4-experimental-011b3b2
|
|
23
|
+
- @forge/tunnel@5.10.1-next.4-experimental-011b3b2
|
|
24
|
+
|
|
25
|
+
## 11.3.0-next.4
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [64daaa5]
|
|
30
|
+
- @forge/manifest@8.9.0-next.1
|
|
31
|
+
- @forge/bundler@4.21.1-next.4
|
|
32
|
+
- @forge/cli-shared@6.8.0-next.4
|
|
33
|
+
- @forge/lint@5.7.3-next.4
|
|
34
|
+
- @forge/tunnel@5.10.1-next.4
|
|
35
|
+
|
|
36
|
+
## 11.3.0-next.3
|
|
37
|
+
|
|
38
|
+
### Minor Changes
|
|
39
|
+
|
|
40
|
+
- d156658: Switch the `forge create` flow to select product context first
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [d156658]
|
|
45
|
+
- @forge/cli-shared@6.8.0-next.3
|
|
46
|
+
- @forge/bundler@4.21.1-next.3
|
|
47
|
+
- @forge/lint@5.7.3-next.3
|
|
48
|
+
- @forge/tunnel@5.10.1-next.3
|
|
49
|
+
|
|
50
|
+
## 11.2.1-next.2
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- b4cee28: Fix uninstall message
|
|
55
|
+
- Updated dependencies [94e48b9]
|
|
56
|
+
- @forge/manifest@8.9.0-next.0
|
|
57
|
+
- @forge/bundler@4.21.1-next.2
|
|
58
|
+
- @forge/cli-shared@6.7.1-next.2
|
|
59
|
+
- @forge/lint@5.7.3-next.2
|
|
60
|
+
- @forge/tunnel@5.10.1-next.2
|
|
61
|
+
|
|
62
|
+
## 11.2.1-next.1
|
|
63
|
+
|
|
64
|
+
### Patch Changes
|
|
65
|
+
|
|
66
|
+
- 2cdac63: forge install should list all scopes
|
|
67
|
+
- Updated dependencies [2cdac63]
|
|
68
|
+
- @forge/cli-shared@6.7.1-next.1
|
|
69
|
+
- @forge/bundler@4.21.1-next.1
|
|
70
|
+
- @forge/lint@5.7.3-next.1
|
|
71
|
+
- @forge/tunnel@5.10.1-next.1
|
|
72
|
+
|
|
73
|
+
## 11.2.1-next.0
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- 999a9d0: Update error messages for deployment
|
|
78
|
+
- Updated dependencies [999a9d0]
|
|
79
|
+
- @forge/cli-shared@6.7.1-next.0
|
|
80
|
+
- @forge/bundler@4.21.1-next.0
|
|
81
|
+
- @forge/lint@5.7.3-next.0
|
|
82
|
+
- @forge/tunnel@5.10.1-next.0
|
|
83
|
+
|
|
3
84
|
## 11.2.0
|
|
4
85
|
|
|
5
86
|
### Minor Changes
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0-next.4-experimental-011b3b2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@forge/cli",
|
|
9
|
-
"version": "11.
|
|
9
|
+
"version": "11.3.0-next.4-experimental-011b3b2",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@forge/bundler": "4.21.
|
|
14
|
-
"@forge/cli-shared": "6.
|
|
13
|
+
"@forge/bundler": "4.21.1-next.4-experimental-011b3b2",
|
|
14
|
+
"@forge/cli-shared": "6.8.0-next.4-experimental-011b3b2",
|
|
15
15
|
"@forge/egress": "1.4.0",
|
|
16
16
|
"@forge/i18n": "0.0.4",
|
|
17
|
-
"@forge/lint": "5.7.
|
|
18
|
-
"@forge/manifest": "8.
|
|
17
|
+
"@forge/lint": "5.7.3-next.4-experimental-011b3b2",
|
|
18
|
+
"@forge/manifest": "8.9.0-next.1-experimental-011b3b2",
|
|
19
19
|
"@forge/runtime": "5.10.7",
|
|
20
|
-
"@forge/tunnel": "5.10.
|
|
20
|
+
"@forge/tunnel": "5.10.1-next.4-experimental-011b3b2",
|
|
21
21
|
"@forge/util": "1.4.8",
|
|
22
22
|
"@sentry/node": "7.106.0",
|
|
23
23
|
"ajv": "^8.12.0",
|
|
@@ -834,9 +834,9 @@
|
|
|
834
834
|
"license": "SEE LICENSE IN LICENSE.txt"
|
|
835
835
|
},
|
|
836
836
|
"node_modules/@forge/bundler": {
|
|
837
|
-
"version": "4.21.
|
|
838
|
-
"resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.21.
|
|
839
|
-
"integrity": "sha512
|
|
837
|
+
"version": "4.21.1-next.4-experimental-011b3b2",
|
|
838
|
+
"resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.21.1-next.4-experimental-011b3b2.tgz",
|
|
839
|
+
"integrity": "sha512-/gjxGgvVwX88y4DpaUyjXIrifvxdJnVMXmyAxoOgBvx96fD9G/mNrr58VF5dUeIEJP4sjRLQ6pymJI0Nbb/L0g==",
|
|
840
840
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
841
841
|
"dependencies": {
|
|
842
842
|
"@babel/core": "^7.24.0",
|
|
@@ -848,10 +848,10 @@
|
|
|
848
848
|
"@babel/preset-typescript": "^7.23.3",
|
|
849
849
|
"@forge/api": "5.1.1",
|
|
850
850
|
"@forge/babel-plugin-transform-ui": "1.1.21",
|
|
851
|
-
"@forge/cli-shared": "6.
|
|
851
|
+
"@forge/cli-shared": "6.8.0-next.4-experimental-011b3b2",
|
|
852
852
|
"@forge/i18n": "0.0.4",
|
|
853
|
-
"@forge/lint": "5.7.
|
|
854
|
-
"@forge/manifest": "8.
|
|
853
|
+
"@forge/lint": "5.7.3-next.4-experimental-011b3b2",
|
|
854
|
+
"@forge/manifest": "8.9.0-next.1-experimental-011b3b2",
|
|
855
855
|
"@forge/util": "1.4.8",
|
|
856
856
|
"assert": "^2.1.0",
|
|
857
857
|
"babel-loader": "^8.3.0",
|
|
@@ -919,13 +919,13 @@
|
|
|
919
919
|
"license": "SEE LICENSE IN LICENSE.txt"
|
|
920
920
|
},
|
|
921
921
|
"node_modules/@forge/cli-shared": {
|
|
922
|
-
"version": "6.
|
|
923
|
-
"resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-6.
|
|
924
|
-
"integrity": "sha512-
|
|
922
|
+
"version": "6.8.0-next.4-experimental-011b3b2",
|
|
923
|
+
"resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-6.8.0-next.4-experimental-011b3b2.tgz",
|
|
924
|
+
"integrity": "sha512-nycxl+6quFuKpM0aWek2UOFXxo4yN0NE3PQJNMs74H0oDcpKAJXqxiGj9ry8ehV9mk/1gKeWf8t4lfMvyFRKgQ==",
|
|
925
925
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
926
926
|
"dependencies": {
|
|
927
927
|
"@forge/i18n": "0.0.4",
|
|
928
|
-
"@forge/manifest": "8.
|
|
928
|
+
"@forge/manifest": "8.9.0-next.1-experimental-011b3b2",
|
|
929
929
|
"@forge/util": "1.4.8",
|
|
930
930
|
"@sentry/node": "7.106.0",
|
|
931
931
|
"adm-zip": "^0.5.10",
|
|
@@ -958,9 +958,9 @@
|
|
|
958
958
|
}
|
|
959
959
|
},
|
|
960
960
|
"node_modules/@forge/csp": {
|
|
961
|
-
"version": "3.6.2",
|
|
962
|
-
"resolved": "https://registry.npmjs.org/@forge/csp/-/csp-3.6.2.tgz",
|
|
963
|
-
"integrity": "sha512-
|
|
961
|
+
"version": "3.6.2-experimental-011b3b2",
|
|
962
|
+
"resolved": "https://registry.npmjs.org/@forge/csp/-/csp-3.6.2-experimental-011b3b2.tgz",
|
|
963
|
+
"integrity": "sha512-OjpiAsxs4P2oobYqsz0YkCEJnw3GpWKxYg8sf15YsM5UMT7uDUP3R+gtZR8+CWFbnaTwAeubZcDXuR3hgysNBw==",
|
|
964
964
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
965
965
|
"dependencies": {
|
|
966
966
|
"cheerio": "^0.22.0",
|
|
@@ -986,15 +986,15 @@
|
|
|
986
986
|
}
|
|
987
987
|
},
|
|
988
988
|
"node_modules/@forge/lint": {
|
|
989
|
-
"version": "5.7.
|
|
990
|
-
"resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.7.
|
|
991
|
-
"integrity": "sha512-
|
|
989
|
+
"version": "5.7.3-next.4-experimental-011b3b2",
|
|
990
|
+
"resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.7.3-next.4-experimental-011b3b2.tgz",
|
|
991
|
+
"integrity": "sha512-97B1a+Ws7o6tUawJ+xz9U1ZaV73Xekn/RM9slbeCtK2ubfmgqV614xoTYS8T4kG02wYRkidjXhbH+o6VCsC3Fw==",
|
|
992
992
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
993
993
|
"dependencies": {
|
|
994
|
-
"@forge/cli-shared": "6.
|
|
995
|
-
"@forge/csp": "3.6.2",
|
|
994
|
+
"@forge/cli-shared": "6.8.0-next.4-experimental-011b3b2",
|
|
995
|
+
"@forge/csp": "3.6.2-experimental-011b3b2",
|
|
996
996
|
"@forge/egress": "1.4.0",
|
|
997
|
-
"@forge/manifest": "8.
|
|
997
|
+
"@forge/manifest": "8.9.0-next.1-experimental-011b3b2",
|
|
998
998
|
"@typescript-eslint/typescript-estree": "^5.62.0",
|
|
999
999
|
"array.prototype.flatmap": "^1.3.2",
|
|
1000
1000
|
"atlassian-openapi": "^1.0.18",
|
|
@@ -1003,9 +1003,9 @@
|
|
|
1003
1003
|
}
|
|
1004
1004
|
},
|
|
1005
1005
|
"node_modules/@forge/manifest": {
|
|
1006
|
-
"version": "8.
|
|
1007
|
-
"resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-8.
|
|
1008
|
-
"integrity": "sha512-
|
|
1006
|
+
"version": "8.9.0-next.1-experimental-011b3b2",
|
|
1007
|
+
"resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-8.9.0-next.1-experimental-011b3b2.tgz",
|
|
1008
|
+
"integrity": "sha512-TfORMu6v23018BYAgkDgvVDbbdqPgqg/v5ZI6gqXE4mJipQ+A40Sb+ThsUMHdIy3Pk/6EKu/G5aRm7CfTDQGRQ==",
|
|
1009
1009
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
1010
1010
|
"dependencies": {
|
|
1011
1011
|
"@forge/i18n": "0.0.4",
|
|
@@ -1036,14 +1036,14 @@
|
|
|
1036
1036
|
}
|
|
1037
1037
|
},
|
|
1038
1038
|
"node_modules/@forge/tunnel": {
|
|
1039
|
-
"version": "5.10.
|
|
1040
|
-
"resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.10.
|
|
1041
|
-
"integrity": "sha512-
|
|
1039
|
+
"version": "5.10.1-next.4-experimental-011b3b2",
|
|
1040
|
+
"resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.10.1-next.4-experimental-011b3b2.tgz",
|
|
1041
|
+
"integrity": "sha512-SqvZtPGNRGTKokTPL6rFFd1oQB/58SK6SERX7un4H4LjSrbso0kdYPsm0imMH3u5oPZkMwuHGmPykkv+3mIXTg==",
|
|
1042
1042
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
1043
1043
|
"dependencies": {
|
|
1044
|
-
"@forge/bundler": "4.21.
|
|
1045
|
-
"@forge/cli-shared": "6.
|
|
1046
|
-
"@forge/csp": "3.6.2",
|
|
1044
|
+
"@forge/bundler": "4.21.1-next.4-experimental-011b3b2",
|
|
1045
|
+
"@forge/cli-shared": "6.8.0-next.4-experimental-011b3b2",
|
|
1046
|
+
"@forge/csp": "3.6.2-experimental-011b3b2",
|
|
1047
1047
|
"@forge/runtime": "5.10.7",
|
|
1048
1048
|
"chokidar": "^3.6.0",
|
|
1049
1049
|
"cloudflared": "^0.7.0",
|
|
@@ -39,7 +39,7 @@ export declare class InstallController {
|
|
|
39
39
|
run({ environment, site, products, upgrade, confirmScopes, license, licenseModes, usersWithAccess, nonInteractive }: InstallViewProps): Promise<void>;
|
|
40
40
|
private getXPAProductsAndSite;
|
|
41
41
|
private checkForMultiProductScopes;
|
|
42
|
-
private
|
|
42
|
+
private convertListScope;
|
|
43
43
|
private isValidLicenseMode;
|
|
44
44
|
private validateLicenseModes;
|
|
45
45
|
private validateUsersWithAccess;
|
|
@@ -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,EAYF,wBAAwB,EAGzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,
|
|
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,EAGzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAgB,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAA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 +198,9 @@ class InstallController {
|
|
|
198
198
|
}
|
|
199
199
|
const manifestEgressAddresses = (0, cli_shared_1.flatMap)(manifestEgressEntries, ({ domains }) => domains ?? []);
|
|
200
200
|
const manifestScopes = new Set(permissions?.scopes ?? []);
|
|
201
|
-
const
|
|
202
|
-
const
|
|
201
|
+
const listScopesString = upgrade ? environmentPermissions.addedScopes : environmentPermissions.scopes;
|
|
202
|
+
const listScopes = await this.convertListScope(listScopesString);
|
|
203
|
+
const scopesConfirmationResult = await this.installView.promptForPermissionsConfirmation(environmentPermissions, listScopes, [...manifestScopes], manifestEgressAddresses, environment, confirmScopes, !!nonInteractive, text);
|
|
203
204
|
if (!scopesConfirmationResult)
|
|
204
205
|
return;
|
|
205
206
|
const successfulProducts = [];
|
|
@@ -283,9 +284,9 @@ class InstallController {
|
|
|
283
284
|
return;
|
|
284
285
|
this.ui.warn(cli_shared_1.Text.install.multiProductScopesDetected(productsToInstall, productsToUpgrade, site.host, environment));
|
|
285
286
|
};
|
|
286
|
-
async
|
|
287
|
+
async convertListScope(scopesToList) {
|
|
287
288
|
const scopesWithInteractiveConsent = (0, manifest_1.getScopesWithInteractiveConsent)();
|
|
288
|
-
return
|
|
289
|
+
return scopesToList.map((scope) => ({
|
|
289
290
|
name: scope,
|
|
290
291
|
requiresInteractiveConsent: scopesWithInteractiveConsent.has(scope)
|
|
291
292
|
}));
|
|
@@ -119,7 +119,7 @@ const getDependencies = async (cliDetails) => {
|
|
|
119
119
|
const registerAppCommand = new cli_shared_1.RegisterAppCommand(createAppGraphQLClient, registerConfigReader, appConfigWriter, ui, configFile);
|
|
120
120
|
const templater = new cli_shared_1.ComposableTemplater(downloader, extractor, lister, ui);
|
|
121
121
|
const npmInstaller = new cli_shared_1.NpmInstaller(ui);
|
|
122
|
-
const createAppCommand = new cli_shared_1.CreateAppCommand(templater, registerAppCommand, npmInstaller);
|
|
122
|
+
const createAppCommand = new cli_shared_1.CreateAppCommand(templater, registerAppCommand, npmInstaller, statsigService);
|
|
123
123
|
const getAppOwnerQuery = new cli_shared_1.GetAppOwnerQuery(graphQLClient, assertiveAppConfigReader);
|
|
124
124
|
const environmentVariablesClient = new graphql_client_1.GraphqlClient(graphQLClient);
|
|
125
125
|
const setEnvironmentVariableCommand = new set_environment_variable_1.SetEnvironmentVariableCommand(environmentVariablesClient, assertiveAppConfigReader);
|
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
import { CreateAppCommandResult, CommandLineUI, CreateAppCommand } from '@forge/cli-shared';
|
|
2
2
|
import { Dependencies } from './dependency-injection';
|
|
3
|
+
export declare enum TemplateCategory {
|
|
4
|
+
SHOW_ALL = "Show All",
|
|
5
|
+
ROVO = "Rovo Agent and action",
|
|
6
|
+
UI_KIT_2 = "UI Kit",
|
|
7
|
+
CUSTOM_UI = "Custom UI",
|
|
8
|
+
BACKEND = "Triggers and Validators"
|
|
9
|
+
}
|
|
10
|
+
export declare enum TemplateContext {
|
|
11
|
+
SHOW_ALL = "show-all",
|
|
12
|
+
BITBUCKET = "bitbucket",
|
|
13
|
+
COMPASS = "compass",
|
|
14
|
+
CONFLUENCE = "confluence",
|
|
15
|
+
JIRA = "jira",
|
|
16
|
+
JIRA_SERVICE_MANAGEMENT = "jira-service-management",
|
|
17
|
+
TEAMWORK_GRAPH = "teamwork-graph",
|
|
18
|
+
ROVO = "rovo",
|
|
19
|
+
CROSS_CONTEXT = "cross-context"
|
|
20
|
+
}
|
|
21
|
+
declare type TemplateCategoryPredicates = [TemplateCategory, (name: string) => boolean][];
|
|
22
|
+
export declare const PRODUCT_OPTIONS_DISPLAY: Partial<Record<TemplateContext, string>>;
|
|
23
|
+
export declare const CATEGORY_PREDICATES: TemplateCategoryPredicates;
|
|
3
24
|
export declare function formatProduct(product: string): string;
|
|
4
|
-
export declare function templateMatchesProduct(productName: string, templateName: string, products: (string | null)[]): boolean;
|
|
25
|
+
export declare function templateMatchesProduct(productName: string, templateName: string, products: (TemplateContext | string | null)[]): boolean;
|
|
5
26
|
export declare function directoryNameFromAppName(appName?: string): string | undefined;
|
|
6
27
|
export interface CreateCommandHandlerOptions {
|
|
7
28
|
template?: string;
|
|
@@ -9,4 +30,5 @@ export interface CreateCommandHandlerOptions {
|
|
|
9
30
|
}
|
|
10
31
|
export declare function createCommandHandler(ui: CommandLineUI, createAppCommand: CreateAppCommand, name: string, { template, directory }: CreateCommandHandlerOptions): Promise<CreateAppCommandResult>;
|
|
11
32
|
export declare function registerCommands(deps: Dependencies): void;
|
|
33
|
+
export {};
|
|
12
34
|
//# sourceMappingURL=register-app-commands.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register-app-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-app-commands.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"register-app-commands.d.ts","sourceRoot":"","sources":["../../src/command-line/register-app-commands.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EAEtB,aAAa,EACb,gBAAgB,EAEjB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,oBAAY,gBAAgB;IAC1B,QAAQ,aAAa;IACrB,IAAI,0BAA0B;IAC9B,QAAQ,WAAW;IACnB,SAAS,cAAc;IACvB,OAAO,4BAA4B;CACpC;AAED,oBAAY,eAAe;IACzB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,uBAAuB,4BAA4B;IACnD,cAAc,mBAAmB;IACjC,IAAI,SAAS;IACb,aAAa,kBAAkB;CAChC;AAOD,aAAK,0BAA0B,GAAG,CAAC,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,EAAE,CAAC;AAoBlF,eAAO,MAAM,uBAAuB,EAAE,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAG5E,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,0BAUjC,CAAC;AAKF,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAQrD;AAmDD,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,CAAC,eAAe,GAAG,MAAM,GAAG,IAAI,CAAC,EAAE,GAC5C,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,CA+BjC;AAqKD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,QAGlD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerCommands = exports.createCommandHandler = exports.directoryNameFromAppName = exports.templateMatchesProduct = exports.formatProduct = void 0;
|
|
3
|
+
exports.registerCommands = exports.createCommandHandler = exports.directoryNameFromAppName = exports.templateMatchesProduct = exports.formatProduct = exports.CATEGORY_PREDICATES = exports.PRODUCT_OPTIONS_DISPLAY = exports.TemplateContext = exports.TemplateCategory = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const fs_1 = tslib_1.__importDefault(require("fs"));
|
|
6
6
|
const sanitize_filename_1 = tslib_1.__importDefault(require("sanitize-filename"));
|
|
@@ -12,22 +12,55 @@ var TemplateCategory;
|
|
|
12
12
|
TemplateCategory["UI_KIT_2"] = "UI Kit";
|
|
13
13
|
TemplateCategory["CUSTOM_UI"] = "Custom UI";
|
|
14
14
|
TemplateCategory["BACKEND"] = "Triggers and Validators";
|
|
15
|
-
})(TemplateCategory || (TemplateCategory = {}));
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
15
|
+
})(TemplateCategory = exports.TemplateCategory || (exports.TemplateCategory = {}));
|
|
16
|
+
var TemplateContext;
|
|
17
|
+
(function (TemplateContext) {
|
|
18
|
+
TemplateContext["SHOW_ALL"] = "show-all";
|
|
19
|
+
TemplateContext["BITBUCKET"] = "bitbucket";
|
|
20
|
+
TemplateContext["COMPASS"] = "compass";
|
|
21
|
+
TemplateContext["CONFLUENCE"] = "confluence";
|
|
22
|
+
TemplateContext["JIRA"] = "jira";
|
|
23
|
+
TemplateContext["JIRA_SERVICE_MANAGEMENT"] = "jira-service-management";
|
|
24
|
+
TemplateContext["TEAMWORK_GRAPH"] = "teamwork-graph";
|
|
25
|
+
TemplateContext["ROVO"] = "rovo";
|
|
26
|
+
TemplateContext["CROSS_CONTEXT"] = "cross-context";
|
|
27
|
+
})(TemplateContext = exports.TemplateContext || (exports.TemplateContext = {}));
|
|
28
|
+
const PRODUCT_OPTIONS = {
|
|
29
|
+
[TemplateContext.SHOW_ALL]: [TemplateContext.SHOW_ALL],
|
|
30
|
+
[TemplateContext.BITBUCKET]: [TemplateContext.BITBUCKET],
|
|
31
|
+
[TemplateContext.COMPASS]: [TemplateContext.COMPASS],
|
|
32
|
+
[TemplateContext.CONFLUENCE]: [TemplateContext.CONFLUENCE],
|
|
33
|
+
[TemplateContext.JIRA]: [TemplateContext.JIRA],
|
|
34
|
+
[TemplateContext.JIRA_SERVICE_MANAGEMENT]: [TemplateContext.JIRA_SERVICE_MANAGEMENT],
|
|
35
|
+
[TemplateContext.TEAMWORK_GRAPH]: [TemplateContext.TEAMWORK_GRAPH],
|
|
36
|
+
[TemplateContext.ROVO]: [TemplateContext.ROVO],
|
|
37
|
+
[TemplateContext.CROSS_CONTEXT]: [
|
|
38
|
+
TemplateContext.COMPASS,
|
|
39
|
+
TemplateContext.CONFLUENCE,
|
|
40
|
+
TemplateContext.JIRA,
|
|
41
|
+
TemplateContext.JIRA_SERVICE_MANAGEMENT
|
|
42
|
+
]
|
|
43
|
+
};
|
|
44
|
+
exports.PRODUCT_OPTIONS_DISPLAY = {
|
|
45
|
+
[TemplateContext.CROSS_CONTEXT]: 'Cross-context'
|
|
46
|
+
};
|
|
47
|
+
exports.CATEGORY_PREDICATES = [
|
|
48
|
+
[TemplateCategory.SHOW_ALL, (name) => !!name],
|
|
49
|
+
[TemplateCategory.ROVO, (name) => name.includes('rovo')],
|
|
50
|
+
[TemplateCategory.UI_KIT_2, (name) => name.includes('ui-kit')],
|
|
51
|
+
[TemplateCategory.CUSTOM_UI, (name) => name.includes('custom-ui')],
|
|
52
|
+
[
|
|
53
|
+
TemplateCategory.BACKEND,
|
|
54
|
+
(name) => !!name && !name.includes('ui-kit') && !name.includes('custom-ui') && !name.includes('rovo') && name !== 'blank'
|
|
55
|
+
]
|
|
24
56
|
];
|
|
25
57
|
const MAX_NAME_LENGTH = 60;
|
|
26
58
|
function formatProduct(product) {
|
|
27
|
-
return product
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
59
|
+
return (exports.PRODUCT_OPTIONS_DISPLAY[product] ??
|
|
60
|
+
product
|
|
61
|
+
.split('-')
|
|
62
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
63
|
+
.join(' '));
|
|
31
64
|
}
|
|
32
65
|
exports.formatProduct = formatProduct;
|
|
33
66
|
function ensureDirectoryDoesntExist(directory) {
|
|
@@ -40,25 +73,28 @@ function ensureValidNameLength(name) {
|
|
|
40
73
|
throw new cli_shared_1.ValidationError(cli_shared_1.Text.create.error.name.tooLong(MAX_NAME_LENGTH));
|
|
41
74
|
}
|
|
42
75
|
}
|
|
43
|
-
async function selectedTemplate(filteredTemplates,
|
|
44
|
-
|
|
45
|
-
|
|
76
|
+
async function selectedTemplate(filteredTemplates, ui, categoryPredicates = exports.CATEGORY_PREDICATES) {
|
|
77
|
+
const categoryMap = filteredTemplates.reduce((map, template) => {
|
|
78
|
+
for (const [category, matchesCategory] of categoryPredicates) {
|
|
79
|
+
if (matchesCategory(template)) {
|
|
80
|
+
const templates = map.get(category) ?? [];
|
|
81
|
+
templates.push(template);
|
|
82
|
+
map.set(category, templates);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return map;
|
|
86
|
+
}, new Map());
|
|
87
|
+
if (categoryMap.size) {
|
|
88
|
+
const sortedCategories = categoryPredicates
|
|
89
|
+
.filter(([category]) => categoryMap.has(category))
|
|
90
|
+
.map(([category]) => category);
|
|
91
|
+
const category = await ui.promptForList(cli_shared_1.Text.create.promptCategory, sortedCategories);
|
|
92
|
+
const categoryFilteredTemplates = filterTemplatesByCategory(categoryMap.get(category) ?? filteredTemplates, category);
|
|
93
|
+
const template = await ui.promptForList(cli_shared_1.Text.create.promptTemplate, categoryFilteredTemplates);
|
|
94
|
+
return modifyTemplateByCategory(template, category);
|
|
46
95
|
}
|
|
47
96
|
else {
|
|
48
|
-
|
|
49
|
-
filteredTemplates.some((template) => templateMatchesProduct(productName, template, PRODUCT_OPTIONS)));
|
|
50
|
-
if (productList.length > 1) {
|
|
51
|
-
const product = await ui.promptForList(cli_shared_1.Text.create.promptProduct, productList, {
|
|
52
|
-
format: formatProduct
|
|
53
|
-
});
|
|
54
|
-
const productFilteredTemplates = product === 'show-all'
|
|
55
|
-
? filteredTemplates
|
|
56
|
-
: filteredTemplates.filter((template) => templateMatchesProduct(product, template, PRODUCT_OPTIONS));
|
|
57
|
-
return await ui.promptForList(cli_shared_1.Text.create.promptTemplate, productFilteredTemplates);
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
return await ui.promptForList(cli_shared_1.Text.create.promptTemplate, filteredTemplates);
|
|
61
|
-
}
|
|
97
|
+
return await ui.promptForList(cli_shared_1.Text.create.promptTemplate, filteredTemplates);
|
|
62
98
|
}
|
|
63
99
|
}
|
|
64
100
|
function templateMatchesProduct(productName, templateName, products) {
|
|
@@ -81,10 +117,16 @@ async function createCommandHandler(ui, createAppCommand, name, { template, dire
|
|
|
81
117
|
directory = prepareDirectoryForApp(ui, name, template, directory);
|
|
82
118
|
ui.info(cli_shared_1.Text.ctrlC);
|
|
83
119
|
({ name, directory } = await promptAndValidateAppName(ui, name, directory, template));
|
|
84
|
-
|
|
120
|
+
const selection = await promptAndSelectTemplate(ui, createAppCommand, template, directory);
|
|
121
|
+
template = selection.template;
|
|
85
122
|
ui.emptyLine();
|
|
86
123
|
directory = directory;
|
|
87
|
-
const args = {
|
|
124
|
+
const args = {
|
|
125
|
+
name,
|
|
126
|
+
template,
|
|
127
|
+
directory,
|
|
128
|
+
...(selection.requiredContext && { requiredProduct: selection.requiredContext })
|
|
129
|
+
};
|
|
88
130
|
const result = await ui.displayProgress(() => createAppCommand.execute(args), cli_shared_1.Text.create.cmd.start, cli_shared_1.Text.create.cmd.success(name));
|
|
89
131
|
ui.info(cli_shared_1.Text.create.cmd.successDetails(directory, result.environments));
|
|
90
132
|
return result;
|
|
@@ -124,36 +166,41 @@ async function promptAndSelectTemplate(ui, createAppCommand, template, directory
|
|
|
124
166
|
ui.info(cli_shared_1.Text.create.overviewTemplates);
|
|
125
167
|
const templates = await ui.displayTemporaryMessage(() => createAppCommand.getAvailableTemplates(), cli_shared_1.Text.create.waitTemplates);
|
|
126
168
|
const templatesWithoutCsuik = templates.filter((template) => !template.includes('csuik'));
|
|
127
|
-
const
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
169
|
+
const productOptions = await createAppCommand.filterAvailableProducts(Object.values(TemplateContext), TemplateContext.TEAMWORK_GRAPH, TemplateContext.CROSS_CONTEXT);
|
|
170
|
+
const productName = await ui.promptForList(cli_shared_1.Text.create.promptProduct, productOptions, {
|
|
171
|
+
format: formatProduct
|
|
172
|
+
});
|
|
173
|
+
const filteredTemplates = (PRODUCT_OPTIONS[productName] ?? [productName])
|
|
174
|
+
.map((p) => filterTemplatesByProduct(templatesWithoutCsuik, p, productOptions))
|
|
175
|
+
.flat();
|
|
176
|
+
const uniqueTemplates = [...new Set(filteredTemplates.length ? filteredTemplates : templatesWithoutCsuik)];
|
|
177
|
+
template = await selectedTemplate(uniqueTemplates, ui);
|
|
131
178
|
if (!directory) {
|
|
132
179
|
directory = template;
|
|
133
180
|
ensureDirectoryDoesntExist(directory);
|
|
134
181
|
}
|
|
182
|
+
let requiredContext = undefined;
|
|
183
|
+
if (productName === TemplateContext.CROSS_CONTEXT) {
|
|
184
|
+
requiredContext = productOptions.find((context) => templateMatchesProduct(context, template, productOptions));
|
|
185
|
+
}
|
|
186
|
+
return {
|
|
187
|
+
template,
|
|
188
|
+
requiredContext: requiredContext === TemplateContext.JIRA_SERVICE_MANAGEMENT ? TemplateContext.JIRA : requiredContext
|
|
189
|
+
};
|
|
135
190
|
}
|
|
136
|
-
return
|
|
191
|
+
return {
|
|
192
|
+
template
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function filterTemplatesByProduct(templates, product, productOptions) {
|
|
196
|
+
return product === 'show-all'
|
|
197
|
+
? templates
|
|
198
|
+
: templates.filter((template) => templateMatchesProduct(product, template, productOptions));
|
|
137
199
|
}
|
|
138
200
|
function filterTemplatesByCategory(templates, category) {
|
|
139
201
|
return category === TemplateCategory.SHOW_ALL
|
|
140
202
|
? templates
|
|
141
|
-
: templates
|
|
142
|
-
.filter((name) => {
|
|
143
|
-
switch (category) {
|
|
144
|
-
case TemplateCategory.BACKEND:
|
|
145
|
-
return (!name.includes('ui-kit') && !name.includes('custom-ui') && !name.includes('rovo') && name !== 'blank');
|
|
146
|
-
case TemplateCategory.CUSTOM_UI:
|
|
147
|
-
return name.includes('custom-ui');
|
|
148
|
-
case TemplateCategory.UI_KIT_2:
|
|
149
|
-
return name.includes('ui-kit');
|
|
150
|
-
case TemplateCategory.ROVO:
|
|
151
|
-
return name.includes('rovo');
|
|
152
|
-
default:
|
|
153
|
-
return true;
|
|
154
|
-
}
|
|
155
|
-
})
|
|
156
|
-
.map((name) => name.replace('-ui-kit', '').replace('-custom-ui', '').replace('-rovo', ''));
|
|
203
|
+
: templates.map((name) => name.replace('-ui-kit', '').replace('-custom-ui', '').replace('-rovo', ''));
|
|
157
204
|
}
|
|
158
205
|
function modifyTemplateByCategory(template, category) {
|
|
159
206
|
switch (category) {
|
|
@@ -57,7 +57,7 @@ const performSingleUninstall = async (installId, installationContext, { ui, comm
|
|
|
57
57
|
message: cli_shared_1.Text.uninstall.cmd.success(false)
|
|
58
58
|
}));
|
|
59
59
|
const uninstallMessageFormat = installation.successful ? cli_shared_1.Text.uninstall.done : cli_shared_1.Text.uninstall.failed;
|
|
60
|
-
const uninstallMessage = uninstallMessageFormat((0, cli_shared_1.productDisplayName)(
|
|
60
|
+
const uninstallMessage = uninstallMessageFormat((0, cli_shared_1.productDisplayName)((0, cli_shared_1.parseInstallationContext)(installationContext).resourceOwner), installation.site, installation.environmentKey, false);
|
|
61
61
|
if (installation.successful) {
|
|
62
62
|
ui.info(uninstallMessage);
|
|
63
63
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { UI,
|
|
1
|
+
import { UI, ListScope } from '@forge/cli-shared';
|
|
2
2
|
import { AppEnvironmentPermissions, Installation } from '../../service/installation-service';
|
|
3
3
|
interface InstallOrUpgradeCommandText {
|
|
4
|
-
listScopes: (scopes:
|
|
4
|
+
listScopes: (scopes: ListScope[]) => string;
|
|
5
5
|
listEgressAddresses: (egressAddresses: string[]) => string;
|
|
6
6
|
permissionsMismatch: (environment: string) => string;
|
|
7
7
|
promptForPermissionsConfirmation: (permissionsMismatchInDevelopment: boolean) => string;
|
|
@@ -9,7 +9,7 @@ interface InstallOrUpgradeCommandText {
|
|
|
9
9
|
export declare class InstallView {
|
|
10
10
|
private readonly ui;
|
|
11
11
|
constructor(ui: UI);
|
|
12
|
-
promptForPermissionsConfirmation({ scopes, egressAddresses }: AppEnvironmentPermissions,
|
|
12
|
+
promptForPermissionsConfirmation({ scopes, egressAddresses }: AppEnvironmentPermissions, listScopes: ListScope[], manifestScopes: string[], manifestEgressAddresses: string[], environment: string, confirmScopes: boolean, nonInteractive: boolean, text: InstallOrUpgradeCommandText): Promise<boolean>;
|
|
13
13
|
promptForUpgrade(installations: Installation[]): Promise<Installation>;
|
|
14
14
|
displayUIKit1DeprecationMessage(modules: string[]): void;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/install-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,EAAE,EAA8B,
|
|
1
|
+
{"version":3,"file":"install-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/install-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,EAAE,EAA8B,SAAS,EAAa,MAAM,mBAAmB,CAAC;AAKpH,OAAO,EAAE,yBAAyB,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAE7F,UAAU,2BAA2B;IACnC,UAAU,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,MAAM,CAAC;IAC5C,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,WAAW;IACV,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,EAAE;IAEtB,gCAAgC,CAC3C,EAAE,MAAM,EAAE,eAAe,EAAE,EAAE,yBAAyB,EACtD,UAAU,EAAE,SAAS,EAAE,EACvB,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;IA+BN,gBAAgB,CAAC,aAAa,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC;IAc5E,+BAA+B,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;CAKhE"}
|
|
@@ -10,9 +10,9 @@ class InstallView {
|
|
|
10
10
|
constructor(ui) {
|
|
11
11
|
this.ui = ui;
|
|
12
12
|
}
|
|
13
|
-
async promptForPermissionsConfirmation({ scopes, egressAddresses },
|
|
14
|
-
if (
|
|
15
|
-
this.ui.info(text.listScopes(
|
|
13
|
+
async promptForPermissionsConfirmation({ scopes, egressAddresses }, listScopes, manifestScopes, manifestEgressAddresses, environment, confirmScopes, nonInteractive, text) {
|
|
14
|
+
if (listScopes.length)
|
|
15
|
+
this.ui.info(text.listScopes(listScopes));
|
|
16
16
|
if (egressAddresses.length)
|
|
17
17
|
this.ui.info(text.listEgressAddresses(egressAddresses));
|
|
18
18
|
const groupedManifestEgressAddresses = (0, egress_1.sortAndGroupEgressPermissionsByDomain)(manifestEgressAddresses);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployer.d.ts","sourceRoot":"","sources":["../../../src/deploy/deployer/deployer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAKjB,mBAAmB,EAGnB,KAAK,EAEL,EAAE,EACF,SAAS,EAET,SAAS,EACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAsB,MAAM,iCAAiC,CAAC;AAC1F,OAAO,EAAE,mBAAmB,EAAyB,MAAM,iCAAiC,CAAC;AAG7F,qBAAa,wBAAyB,SAAQ,SAAS;IAEnD,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,GAAE,OAAe,EAC3C,SAAS,CAAC,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GACpB,OAAO,CAAC,IAAI,CAAC;YAYF,QAAQ;IAgBT,kBAAkB,CAC7B,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM;;;;YA4BL,iBAAiB;IAa/B,OAAO,CAAC,gBAAgB;IAsBxB,OAAO,CAAC,0BAA0B;IA6BlC,OAAO,CAAC,gBAAgB;CA4DzB"}
|
|
@@ -181,7 +181,12 @@ class ArtifactDeployer {
|
|
|
181
181
|
throw new AppDeploymentFailedError(true, requestId, cli_shared_1.Text.deploy.egressURL.error(causeMessage));
|
|
182
182
|
}
|
|
183
183
|
if (causeMessage?.toLowerCase().includes('existing installations')) {
|
|
184
|
-
|
|
184
|
+
if (causeMessage.toLowerCase().includes('modified')) {
|
|
185
|
+
throw new ExistingInstallationsError(true, requestId, cli_shared_1.Text.deploy.crossContext.modifyError);
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
throw new ExistingInstallationsError(true, requestId, cli_shared_1.Text.deploy.crossContext.enableError);
|
|
189
|
+
}
|
|
185
190
|
}
|
|
186
191
|
break;
|
|
187
192
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0-next.4-experimental-011b3b2",
|
|
4
4
|
"description": "A command line interface for managing Atlassian-hosted apps",
|
|
5
5
|
"author": "Atlassian",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
"postinstall": "node -e \"fs.existsSync('./out/bin/postinstall.js') && require('./out/bin/postinstall.js')\""
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@forge/bundler": "4.21.
|
|
22
|
-
"@forge/cli-shared": "6.
|
|
21
|
+
"@forge/bundler": "4.21.1-next.4-experimental-011b3b2",
|
|
22
|
+
"@forge/cli-shared": "6.8.0-next.4-experimental-011b3b2",
|
|
23
23
|
"@forge/egress": "1.4.0",
|
|
24
|
-
"@forge/lint": "5.7.
|
|
25
|
-
"@forge/manifest": "8.
|
|
24
|
+
"@forge/lint": "5.7.3-next.4-experimental-011b3b2",
|
|
25
|
+
"@forge/manifest": "8.9.0-next.1-experimental-011b3b2",
|
|
26
26
|
"@forge/runtime": "5.10.7",
|
|
27
|
-
"@forge/tunnel": "5.10.
|
|
27
|
+
"@forge/tunnel": "5.10.1-next.4-experimental-011b3b2",
|
|
28
28
|
"@forge/util": "1.4.8",
|
|
29
29
|
"@sentry/node": "7.106.0",
|
|
30
30
|
"@forge/i18n": "0.0.4",
|