@forge/cli 11.0.0 → 11.0.1-next.14
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 +144 -0
- package/npm-shrinkwrap.json +56 -56
- package/out/command-line/controller/install-controller.d.ts +4 -3
- package/out/command-line/controller/install-controller.d.ts.map +1 -1
- package/out/command-line/controller/install-controller.js +71 -35
- package/out/command-line/register-installation-commands.d.ts +0 -3
- package/out/command-line/register-installation-commands.d.ts.map +1 -1
- package/out/command-line/register-installation-commands.js +16 -62
- package/out/command-line/uninstall-command-helpers.d.ts +18 -0
- package/out/command-line/uninstall-command-helpers.d.ts.map +1 -0
- package/out/command-line/uninstall-command-helpers.js +106 -0
- package/out/command-line/version-info.js +1 -1
- package/out/environment/graphql-client.d.ts +1 -1
- package/out/environment/graphql-client.js +2 -2
- package/out/environment/list-environment.d.ts +1 -1
- package/out/environment/list-environment.d.ts.map +1 -1
- package/out/installations/graphql-client.js +1 -1
- package/out/installations/uninstall-app.d.ts +1 -0
- package/out/installations/uninstall-app.d.ts.map +1 -1
- package/out/installations/uninstall-app.js +1 -0
- package/out/service/installation-service.d.ts +1 -1
- package/out/service/installation-service.d.ts.map +1 -1
- package/out/service/installation-service.js +6 -6
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,149 @@
|
|
|
1
1
|
# @forge/cli
|
|
2
2
|
|
|
3
|
+
## 11.0.1-next.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [c25288c]
|
|
8
|
+
- @forge/egress@1.4.0-next.0
|
|
9
|
+
- @forge/lint@5.7.1-next.9
|
|
10
|
+
- @forge/bundler@4.20.9-next.11
|
|
11
|
+
- @forge/tunnel@5.9.3-next.11
|
|
12
|
+
|
|
13
|
+
## 11.0.1-next.13
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- @forge/bundler@4.20.9-next.10
|
|
18
|
+
- @forge/tunnel@5.9.3-next.10
|
|
19
|
+
|
|
20
|
+
## 11.0.1-next.12
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [ba58c3a]
|
|
25
|
+
- Updated dependencies [55df193]
|
|
26
|
+
- @forge/manifest@8.7.0-next.4
|
|
27
|
+
- @forge/bundler@4.20.9-next.9
|
|
28
|
+
- @forge/cli-shared@6.6.1-next.8
|
|
29
|
+
- @forge/lint@5.7.1-next.8
|
|
30
|
+
- @forge/tunnel@5.9.3-next.9
|
|
31
|
+
|
|
32
|
+
## 11.0.1-next.11
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- 495119b: Handle uninstalling cross product apps
|
|
37
|
+
|
|
38
|
+
## 11.0.1-next.10
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Updated dependencies [4b050d8]
|
|
43
|
+
- @forge/manifest@8.7.0-next.3
|
|
44
|
+
- @forge/bundler@4.20.9-next.8
|
|
45
|
+
- @forge/cli-shared@6.6.1-next.7
|
|
46
|
+
- @forge/lint@5.7.1-next.7
|
|
47
|
+
- @forge/tunnel@5.9.3-next.8
|
|
48
|
+
|
|
49
|
+
## 11.0.1-next.9
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- b3b1250: enable multiselect for XPA apps
|
|
54
|
+
- Updated dependencies [b3b1250]
|
|
55
|
+
- @forge/cli-shared@6.6.1-next.6
|
|
56
|
+
- @forge/bundler@4.20.9-next.7
|
|
57
|
+
- @forge/lint@5.7.1-next.6
|
|
58
|
+
- @forge/tunnel@5.9.3-next.7
|
|
59
|
+
|
|
60
|
+
## 11.0.1-next.8
|
|
61
|
+
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- 68433cb: support node version 22
|
|
65
|
+
|
|
66
|
+
## 11.0.1-next.7
|
|
67
|
+
|
|
68
|
+
### Patch Changes
|
|
69
|
+
|
|
70
|
+
- Updated dependencies [3302cc2]
|
|
71
|
+
- @forge/util@1.4.8-next.0
|
|
72
|
+
- @forge/bundler@4.20.9-next.6
|
|
73
|
+
- @forge/cli-shared@6.6.1-next.5
|
|
74
|
+
- @forge/runtime@5.10.6-next.0
|
|
75
|
+
- @forge/tunnel@5.9.3-next.6
|
|
76
|
+
- @forge/lint@5.7.1-next.5
|
|
77
|
+
|
|
78
|
+
## 11.0.1-next.6
|
|
79
|
+
|
|
80
|
+
### Patch Changes
|
|
81
|
+
|
|
82
|
+
- 71dc617: update primaryProduct to requiredProducts
|
|
83
|
+
- Updated dependencies [71dc617]
|
|
84
|
+
- @forge/cli-shared@6.6.1-next.4
|
|
85
|
+
- @forge/bundler@4.20.9-next.5
|
|
86
|
+
- @forge/lint@5.7.1-next.4
|
|
87
|
+
- @forge/tunnel@5.9.3-next.5
|
|
88
|
+
|
|
89
|
+
## 11.0.1-next.5
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- Updated dependencies [de16df9]
|
|
94
|
+
- @forge/manifest@8.7.0-next.2
|
|
95
|
+
- @forge/bundler@4.20.9-next.4
|
|
96
|
+
- @forge/cli-shared@6.6.1-next.3
|
|
97
|
+
- @forge/lint@5.7.1-next.3
|
|
98
|
+
- @forge/tunnel@5.9.3-next.4
|
|
99
|
+
|
|
100
|
+
## 11.0.1-next.4
|
|
101
|
+
|
|
102
|
+
### Patch Changes
|
|
103
|
+
|
|
104
|
+
- Updated dependencies [48d2f56]
|
|
105
|
+
- @forge/manifest@8.7.0-next.1
|
|
106
|
+
- @forge/bundler@4.20.9-next.3
|
|
107
|
+
- @forge/cli-shared@6.6.1-next.2
|
|
108
|
+
- @forge/lint@5.7.1-next.2
|
|
109
|
+
- @forge/tunnel@5.9.3-next.3
|
|
110
|
+
|
|
111
|
+
## 11.0.1-next.3
|
|
112
|
+
|
|
113
|
+
### Patch Changes
|
|
114
|
+
|
|
115
|
+
- Updated dependencies [6b8b6e2]
|
|
116
|
+
- @forge/manifest@8.6.2-next.0
|
|
117
|
+
- @forge/bundler@4.20.9-next.2
|
|
118
|
+
- @forge/cli-shared@6.6.1-next.1
|
|
119
|
+
- @forge/lint@5.7.1-next.1
|
|
120
|
+
- @forge/tunnel@5.9.3-next.2
|
|
121
|
+
|
|
122
|
+
## 11.0.1-next.2
|
|
123
|
+
|
|
124
|
+
### Patch Changes
|
|
125
|
+
|
|
126
|
+
- @forge/bundler@4.20.9-next.1
|
|
127
|
+
- @forge/tunnel@5.9.3-next.1
|
|
128
|
+
|
|
129
|
+
## 11.0.1-next.1
|
|
130
|
+
|
|
131
|
+
### Patch Changes
|
|
132
|
+
|
|
133
|
+
- 091886c: prepare installations product field to accept multiple products
|
|
134
|
+
- Updated dependencies [091886c]
|
|
135
|
+
- Updated dependencies [29e8c8b]
|
|
136
|
+
- @forge/cli-shared@6.6.1-next.0
|
|
137
|
+
- @forge/lint@5.7.1-next.0
|
|
138
|
+
- @forge/bundler@4.20.9-next.0
|
|
139
|
+
- @forge/tunnel@5.9.3-next.0
|
|
140
|
+
|
|
141
|
+
## 11.0.1-next.0
|
|
142
|
+
|
|
143
|
+
### Patch Changes
|
|
144
|
+
|
|
145
|
+
- 2764f8a: Show secondary installations in uninstall UI.
|
|
146
|
+
|
|
3
147
|
## 11.0.0
|
|
4
148
|
|
|
5
149
|
### Major Changes
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.1-next.14",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@forge/cli",
|
|
9
|
-
"version": "11.0.
|
|
9
|
+
"version": "11.0.1-next.14",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@forge/bundler": "4.20.
|
|
14
|
-
"@forge/cli-shared": "6.6.
|
|
15
|
-
"@forge/egress": "1.
|
|
13
|
+
"@forge/bundler": "4.20.9-next.11",
|
|
14
|
+
"@forge/cli-shared": "6.6.1-next.8",
|
|
15
|
+
"@forge/egress": "1.4.0-next.0",
|
|
16
16
|
"@forge/i18n": "0.0.3",
|
|
17
|
-
"@forge/lint": "5.7.
|
|
18
|
-
"@forge/manifest": "8.
|
|
19
|
-
"@forge/runtime": "5.10.
|
|
20
|
-
"@forge/tunnel": "5.9.
|
|
21
|
-
"@forge/util": "1.4.
|
|
17
|
+
"@forge/lint": "5.7.1-next.9",
|
|
18
|
+
"@forge/manifest": "8.7.0-next.4",
|
|
19
|
+
"@forge/runtime": "5.10.6-next.0",
|
|
20
|
+
"@forge/tunnel": "5.9.3-next.11",
|
|
21
|
+
"@forge/util": "1.4.8-next.0",
|
|
22
22
|
"@sentry/node": "7.106.0",
|
|
23
23
|
"ajv": "^8.12.0",
|
|
24
24
|
"archiver": "^6.0.2",
|
|
@@ -833,9 +833,9 @@
|
|
|
833
833
|
"license": "SEE LICENSE IN LICENSE.txt"
|
|
834
834
|
},
|
|
835
835
|
"node_modules/@forge/bundler": {
|
|
836
|
-
"version": "4.20.
|
|
837
|
-
"resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.20.
|
|
838
|
-
"integrity": "sha512-
|
|
836
|
+
"version": "4.20.9-next.11",
|
|
837
|
+
"resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.20.9-next.11.tgz",
|
|
838
|
+
"integrity": "sha512-qe1gLfHsKIncAvJoAU/RaSR/SQcYvBcgtA6tZhFDrofeSp76UwEE4TrCUOMJzLfXMEjv6i6WY17euJUOmmCSiQ==",
|
|
839
839
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
840
840
|
"dependencies": {
|
|
841
841
|
"@babel/core": "^7.24.0",
|
|
@@ -845,13 +845,13 @@
|
|
|
845
845
|
"@babel/plugin-transform-optional-chaining": "^7.23.4",
|
|
846
846
|
"@babel/plugin-transform-react-jsx": "^7.23.4",
|
|
847
847
|
"@babel/preset-typescript": "^7.23.3",
|
|
848
|
-
"@forge/api": "5.0.
|
|
848
|
+
"@forge/api": "5.1.0-next.3",
|
|
849
849
|
"@forge/babel-plugin-transform-ui": "1.1.20",
|
|
850
|
-
"@forge/cli-shared": "6.6.
|
|
850
|
+
"@forge/cli-shared": "6.6.1-next.8",
|
|
851
851
|
"@forge/i18n": "0.0.3",
|
|
852
|
-
"@forge/lint": "5.7.
|
|
853
|
-
"@forge/manifest": "8.
|
|
854
|
-
"@forge/util": "1.4.
|
|
852
|
+
"@forge/lint": "5.7.1-next.9",
|
|
853
|
+
"@forge/manifest": "8.7.0-next.4",
|
|
854
|
+
"@forge/util": "1.4.8-next.0",
|
|
855
855
|
"assert": "^2.1.0",
|
|
856
856
|
"babel-loader": "^8.3.0",
|
|
857
857
|
"browserify-zlib": "^0.2.0",
|
|
@@ -889,15 +889,15 @@
|
|
|
889
889
|
}
|
|
890
890
|
},
|
|
891
891
|
"node_modules/@forge/bundler/node_modules/@forge/api": {
|
|
892
|
-
"version": "5.0.
|
|
893
|
-
"resolved": "https://registry.npmjs.org/@forge/api/-/api-5.0.
|
|
894
|
-
"integrity": "sha512-
|
|
892
|
+
"version": "5.1.0-next.3",
|
|
893
|
+
"resolved": "https://registry.npmjs.org/@forge/api/-/api-5.1.0-next.3.tgz",
|
|
894
|
+
"integrity": "sha512-c5TWBRYubx1Iq7f09xD0ZHqkmi657S//HvoJZO8tyidl6x7Eb+IqUNUe36J92gVJRrWdZqdvartXeid4Xm+BYg==",
|
|
895
895
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
896
896
|
"dependencies": {
|
|
897
897
|
"@forge/auth": "0.0.6",
|
|
898
|
-
"@forge/egress": "1.
|
|
898
|
+
"@forge/egress": "1.4.0-next.0",
|
|
899
899
|
"@forge/storage": "1.7.2",
|
|
900
|
-
"@forge/util": "1.4.
|
|
900
|
+
"@forge/util": "1.4.8-next.0",
|
|
901
901
|
"@types/node-fetch": "^2.6.11",
|
|
902
902
|
"node-fetch": "2.7.0"
|
|
903
903
|
}
|
|
@@ -918,14 +918,14 @@
|
|
|
918
918
|
"license": "SEE LICENSE IN LICENSE.txt"
|
|
919
919
|
},
|
|
920
920
|
"node_modules/@forge/cli-shared": {
|
|
921
|
-
"version": "6.6.
|
|
922
|
-
"resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-6.6.
|
|
923
|
-
"integrity": "sha512-
|
|
921
|
+
"version": "6.6.1-next.8",
|
|
922
|
+
"resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-6.6.1-next.8.tgz",
|
|
923
|
+
"integrity": "sha512-Q2xgEjsxAvrM37U6GunFSjKR4VpxrJvgNzgUq38K+QFmHKsieG3BwCSfsSdSXwl6yGmtv1r0VhOGpjTy1afrag==",
|
|
924
924
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
925
925
|
"dependencies": {
|
|
926
926
|
"@forge/i18n": "0.0.3",
|
|
927
|
-
"@forge/manifest": "8.
|
|
928
|
-
"@forge/util": "1.4.
|
|
927
|
+
"@forge/manifest": "8.7.0-next.4",
|
|
928
|
+
"@forge/util": "1.4.8-next.0",
|
|
929
929
|
"@sentry/node": "7.106.0",
|
|
930
930
|
"adm-zip": "^0.5.10",
|
|
931
931
|
"array.prototype.flatmap": "^1.3.2",
|
|
@@ -968,9 +968,9 @@
|
|
|
968
968
|
}
|
|
969
969
|
},
|
|
970
970
|
"node_modules/@forge/egress": {
|
|
971
|
-
"version": "1.
|
|
972
|
-
"resolved": "https://registry.npmjs.org/@forge/egress/-/egress-1.
|
|
973
|
-
"integrity": "sha512-
|
|
971
|
+
"version": "1.4.0-next.0",
|
|
972
|
+
"resolved": "https://registry.npmjs.org/@forge/egress/-/egress-1.4.0-next.0.tgz",
|
|
973
|
+
"integrity": "sha512-lcoISp2nyNXSRSGqnWmjYsP4Y5SgdAe7mmFKXXh/D72PlTczXEuJbxEhmhrq51oZgjK3wiakrRO5DdF2Uqz+YQ==",
|
|
974
974
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
975
975
|
"dependencies": {
|
|
976
976
|
"minimatch": "^9.0.3"
|
|
@@ -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.1-next.9",
|
|
990
|
+
"resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.7.1-next.9.tgz",
|
|
991
|
+
"integrity": "sha512-NcdaCMr30vUbu+A/L33jnsVq+1a27qdGCpfthjfeSQwKQ/Yy/yYoTWePMO1xZciZOqr7pMl17nL1pDBl6DHovA==",
|
|
992
992
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
993
993
|
"dependencies": {
|
|
994
|
-
"@forge/cli-shared": "6.6.
|
|
994
|
+
"@forge/cli-shared": "6.6.1-next.8",
|
|
995
995
|
"@forge/csp": "3.6.1",
|
|
996
|
-
"@forge/egress": "1.
|
|
997
|
-
"@forge/manifest": "8.
|
|
996
|
+
"@forge/egress": "1.4.0-next.0",
|
|
997
|
+
"@forge/manifest": "8.7.0-next.4",
|
|
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.7.0-next.4",
|
|
1007
|
+
"resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-8.7.0-next.4.tgz",
|
|
1008
|
+
"integrity": "sha512-HSfV816F5foiX3cSbEkpPfmRwQzVdhafm7QImsH4553hpNFidfvpnuDn3LxXARWfoQgozyGhRQNoXtKAnWsLow==",
|
|
1009
1009
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
1010
1010
|
"dependencies": {
|
|
1011
1011
|
"@forge/i18n": "0.0.3",
|
|
@@ -1020,12 +1020,12 @@
|
|
|
1020
1020
|
}
|
|
1021
1021
|
},
|
|
1022
1022
|
"node_modules/@forge/runtime": {
|
|
1023
|
-
"version": "5.10.
|
|
1024
|
-
"resolved": "https://registry.npmjs.org/@forge/runtime/-/runtime-5.10.
|
|
1025
|
-
"integrity": "sha512-
|
|
1023
|
+
"version": "5.10.6-next.0",
|
|
1024
|
+
"resolved": "https://registry.npmjs.org/@forge/runtime/-/runtime-5.10.6-next.0.tgz",
|
|
1025
|
+
"integrity": "sha512-kHGvi1gmPAhZdnBhHggoHw5VMxGRFqTP+KzXHKLn3lU7e81yeDjlgDNYMcfNT6W58ihg5Fm3DmD/+l7JMhPFXw==",
|
|
1026
1026
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
1027
1027
|
"dependencies": {
|
|
1028
|
-
"@forge/util": "1.4.
|
|
1028
|
+
"@forge/util": "1.4.8-next.0",
|
|
1029
1029
|
"fp-ts": "^2.16.2",
|
|
1030
1030
|
"io-ts": "^2.2.21",
|
|
1031
1031
|
"io-ts-reporters": "^2.0.1",
|
|
@@ -1036,15 +1036,15 @@
|
|
|
1036
1036
|
}
|
|
1037
1037
|
},
|
|
1038
1038
|
"node_modules/@forge/tunnel": {
|
|
1039
|
-
"version": "5.9.
|
|
1040
|
-
"resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.9.
|
|
1041
|
-
"integrity": "sha512-
|
|
1039
|
+
"version": "5.9.3-next.11",
|
|
1040
|
+
"resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.9.3-next.11.tgz",
|
|
1041
|
+
"integrity": "sha512-RqZe1w75PVDOfsgicLzHodhrN97xKjlzx7LOQkCzppjg8cEpUuixHfwAxc7BZHfXOMSZGHAfm1tDazh6GThV8Q==",
|
|
1042
1042
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
1043
1043
|
"dependencies": {
|
|
1044
|
-
"@forge/bundler": "4.20.
|
|
1045
|
-
"@forge/cli-shared": "6.6.
|
|
1044
|
+
"@forge/bundler": "4.20.9-next.11",
|
|
1045
|
+
"@forge/cli-shared": "6.6.1-next.8",
|
|
1046
1046
|
"@forge/csp": "3.6.1",
|
|
1047
|
-
"@forge/runtime": "5.10.
|
|
1047
|
+
"@forge/runtime": "5.10.6-next.0",
|
|
1048
1048
|
"chokidar": "^3.6.0",
|
|
1049
1049
|
"cloudflared": "^0.7.0",
|
|
1050
1050
|
"express": "^4.18.3",
|
|
@@ -1060,9 +1060,9 @@
|
|
|
1060
1060
|
}
|
|
1061
1061
|
},
|
|
1062
1062
|
"node_modules/@forge/util": {
|
|
1063
|
-
"version": "1.4.
|
|
1064
|
-
"resolved": "https://registry.npmjs.org/@forge/util/-/util-1.4.
|
|
1065
|
-
"integrity": "sha512-
|
|
1063
|
+
"version": "1.4.8-next.0",
|
|
1064
|
+
"resolved": "https://registry.npmjs.org/@forge/util/-/util-1.4.8-next.0.tgz",
|
|
1065
|
+
"integrity": "sha512-XqnBHqvejn7GXgFRUaIkcU2Yjhw4fB9sjtR9Jox12lO8nIqn60Bw1VsqkW6r7VuMmb5dh7A3Hnddmuw4izXSMw==",
|
|
1066
1066
|
"license": "SEE LICENSE IN LICENSE.txt"
|
|
1067
1067
|
},
|
|
1068
1068
|
"node_modules/@graphql-typed-document-node/core": {
|
|
@@ -3300,9 +3300,9 @@
|
|
|
3300
3300
|
}
|
|
3301
3301
|
},
|
|
3302
3302
|
"node_modules/cross-spawn": {
|
|
3303
|
-
"version": "7.0.
|
|
3304
|
-
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.
|
|
3305
|
-
"integrity": "sha1-
|
|
3303
|
+
"version": "7.0.6",
|
|
3304
|
+
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
|
|
3305
|
+
"integrity": "sha1-ilj+ePANzXDDcEUXWd+/rwPo7p8= sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
|
|
3306
3306
|
"dependencies": {
|
|
3307
3307
|
"path-key": "^3.1.0",
|
|
3308
3308
|
"shebang-command": "^2.0.0",
|
|
@@ -7,7 +7,7 @@ import { InstallView } from '../view/install-view';
|
|
|
7
7
|
interface InstallViewProps {
|
|
8
8
|
environment: string;
|
|
9
9
|
site?: URL;
|
|
10
|
-
|
|
10
|
+
products?: string[];
|
|
11
11
|
upgrade: boolean;
|
|
12
12
|
nonInteractive?: boolean;
|
|
13
13
|
confirmScopes: boolean;
|
|
@@ -29,19 +29,20 @@ export declare class InstallController {
|
|
|
29
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
|
-
private
|
|
32
|
+
private promptForProducts;
|
|
33
33
|
private promptForSite;
|
|
34
34
|
private promptForUpgrade;
|
|
35
35
|
private getUniqueInstallationProductsFromScopes;
|
|
36
36
|
private isValidLicense;
|
|
37
37
|
private validateLicenseOption;
|
|
38
38
|
private checkForUIKit1Modules;
|
|
39
|
-
run({ environment, site,
|
|
39
|
+
run({ environment, site, products, upgrade, confirmScopes, license, licenseModes, usersWithAccess, nonInteractive }: InstallViewProps): Promise<void>;
|
|
40
40
|
private extractAddedScopes;
|
|
41
41
|
private isValidLicenseMode;
|
|
42
42
|
private validateLicenseModes;
|
|
43
43
|
private validateUsersWithAccess;
|
|
44
44
|
private validateEcosystemAppInstallationOverridesInput;
|
|
45
|
+
private checkRequiredInstallationExists;
|
|
45
46
|
}
|
|
46
47
|
export {};
|
|
47
48
|
//# sourceMappingURL=install-controller.d.ts.map
|
|
@@ -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,EAEzB,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,EAEzB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAA2C,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAClH,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,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,iBAAiB;YAmBjB,aAAa;YA2Bb,gBAAgB;IAwB9B,OAAO,CAAC,uCAAuC;IAa/C,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,qBAAqB;IAgB7B,OAAO,CAAC,qBAAqB,CAK3B;IAEW,GAAG,CAAC,EACf,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,aAAa,EACb,OAAO,EACP,YAAY,EACZ,eAAe,EACf,cAAc,EACf,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;YA0JrB,kBAAkB;IAUhC,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,oBAAoB;IA8B5B,OAAO,CAAC,uBAAuB;YAoBjB,8CAA8C;IAY5D,OAAO,CAAC,+BAA+B,CAWrC;CACH"}
|
|
@@ -70,12 +70,17 @@ class InstallController {
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
async
|
|
73
|
+
async promptForProducts(requiredProducts) {
|
|
74
74
|
this.ui.info(cli_shared_1.Text.installationContext.overviewProduct);
|
|
75
|
-
|
|
75
|
+
if (requiredProducts?.length) {
|
|
76
|
+
return await this.ui.promptForMultiSelectList(cli_shared_1.Text.installationContext.promptOptionalProducts, await this.supportedProductsService.getSupportedProducts(requiredProducts));
|
|
77
|
+
}
|
|
78
|
+
return [
|
|
79
|
+
await this.ui.promptForList(cli_shared_1.Text.installationContext.promptProduct, await this.supportedProductsService.getSupportedProducts())
|
|
80
|
+
];
|
|
76
81
|
}
|
|
77
|
-
async promptForSite(
|
|
78
|
-
const isWorkspaceBased =
|
|
82
|
+
async promptForSite(products) {
|
|
83
|
+
const isWorkspaceBased = products.length > 0 && (await this.supportedProductsService.isWorkspaceProduct(products[0]));
|
|
79
84
|
const overviewText = isWorkspaceBased
|
|
80
85
|
? cli_shared_1.Text.installationContext.overviewWorkspace
|
|
81
86
|
: cli_shared_1.Text.installationContext.overviewSite;
|
|
@@ -88,7 +93,7 @@ class InstallController {
|
|
|
88
93
|
if (!trySite) {
|
|
89
94
|
throw new cli_shared_1.ValidationError(invalidText);
|
|
90
95
|
}
|
|
91
|
-
return this.supportedProductsService.validateSite(trySite,
|
|
96
|
+
return this.supportedProductsService.validateSite(trySite, products[0]);
|
|
92
97
|
}
|
|
93
98
|
async promptForUpgrade(siteOption, productOption, environmentOption) {
|
|
94
99
|
const { installations } = await this.installationService.listNonTechnicalAppInstallations({
|
|
@@ -143,27 +148,53 @@ class InstallController {
|
|
|
143
148
|
this.installView.displayUIKit1DeprecationMessage(uiKit1Modules);
|
|
144
149
|
}
|
|
145
150
|
};
|
|
146
|
-
async run({ environment, site,
|
|
151
|
+
async run({ environment, site, products, upgrade, confirmScopes, license, licenseModes, usersWithAccess, nonInteractive }) {
|
|
147
152
|
const { id } = await this.appConfigProvider();
|
|
148
153
|
const text = upgrade ? cli_shared_1.Text.upgrade : cli_shared_1.Text.install;
|
|
149
154
|
const validLicense = this.validateLicenseOption(license, environment);
|
|
150
155
|
const overrides = await this.validateEcosystemAppInstallationOverridesInput(licenseModes, usersWithAccess, environment);
|
|
151
|
-
|
|
152
|
-
|
|
156
|
+
const { installations } = (await this.installationService.listAppInstallations()) ?? [];
|
|
157
|
+
const environmentPermissions = await this.installationService.getAppEnvironmentPermissions(id, environment);
|
|
158
|
+
const requiredProducts = environmentPermissions?.requiredProducts;
|
|
159
|
+
if (upgrade && (!site || !products?.length)) {
|
|
160
|
+
const upgradeResult = await this.promptForUpgrade(site, products?.[0], environment);
|
|
153
161
|
environment = upgradeResult.environment;
|
|
154
162
|
site = upgradeResult.site;
|
|
155
|
-
|
|
163
|
+
products = [upgradeResult.product];
|
|
164
|
+
}
|
|
165
|
+
if (!requiredProducts?.length) {
|
|
166
|
+
products = products?.length ? products : await this.promptForProducts();
|
|
167
|
+
site = site ? site : await this.promptForSite(products);
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
site = site ? site : await this.promptForSite([]);
|
|
171
|
+
if (!products?.length) {
|
|
172
|
+
const hasRequiredInstallations = this.checkRequiredInstallationExists(installations, site.host, requiredProducts);
|
|
173
|
+
if (hasRequiredInstallations) {
|
|
174
|
+
this.ui.info(cli_shared_1.Text.install.alreadyInstalledInRequiredProduct(requiredProducts[0]));
|
|
175
|
+
products = products?.length ? products : await this.promptForProducts(requiredProducts);
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
this.ui.info(cli_shared_1.Text.install.installingToRequiredProduct(requiredProducts[0]));
|
|
179
|
+
products = requiredProducts;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
if (requiredProducts.includes(products[0])) {
|
|
184
|
+
this.ui.info(cli_shared_1.Text.install.installingToRequiredProduct(products[0]));
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
this.ui.info(cli_shared_1.Text.install.installingToOptionalProduct);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
156
190
|
}
|
|
157
|
-
|
|
158
|
-
site = site ? site : await this.promptForSite(product);
|
|
159
|
-
const bannerText = product && (await this.supportedProductsService.isWorkspaceProduct(product))
|
|
191
|
+
const bannerText = (await this.supportedProductsService.isWorkspaceProduct(products[0]))
|
|
160
192
|
? text.bannerWorkspace
|
|
161
193
|
: text.bannerSite;
|
|
162
194
|
this.ui.info(bannerText);
|
|
163
195
|
if ((0, cli_shared_1.isSecureSite)(site)) {
|
|
164
196
|
await this.securityPrompt(site);
|
|
165
197
|
}
|
|
166
|
-
const environmentPermissions = await this.installationService.getAppEnvironmentPermissions(id, environment);
|
|
167
198
|
if (!environmentPermissions?.hasDeployments) {
|
|
168
199
|
this.ui.error(new NoDeploymentError(environment), { pad: false });
|
|
169
200
|
return;
|
|
@@ -185,28 +216,30 @@ class InstallController {
|
|
|
185
216
|
const scopesConfirmationResult = await this.installView.promptForPermissionsConfirmation(environmentPermissions, addedScopes, [...manifestScopes], manifestEgressAddresses, environment, confirmScopes, !!nonInteractive, text);
|
|
186
217
|
if (!scopesConfirmationResult)
|
|
187
218
|
return;
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
219
|
+
for (const product of products) {
|
|
220
|
+
const isAlreadyUpdated = await this.installOrUpgrade(upgrade, environment, environmentType, site, product, id, text, validLicense, overrides);
|
|
221
|
+
if (isAlreadyUpdated) {
|
|
222
|
+
this.ui.info(cli_shared_1.Text.upgrade.alreadyUpdated.banner(environment, product, site.host));
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
this.ui.emptyLine();
|
|
226
|
+
this.ui.info(text.success.banner(environment, environmentType, product, site.host));
|
|
227
|
+
const uniqueProductsFromScopes = this.getUniqueInstallationProductsFromScopes(environmentScopes);
|
|
228
|
+
if (!uniqueProductsFromScopes || uniqueProductsFromScopes.length <= 1)
|
|
229
|
+
return;
|
|
230
|
+
const { installations } = await this.installationService.listNonTechnicalAppInstallations({
|
|
231
|
+
site,
|
|
232
|
+
environment
|
|
233
|
+
});
|
|
234
|
+
const productsToUpgrade = installations
|
|
235
|
+
.filter((installation) => !installation.version.isLatest)
|
|
236
|
+
.map((installation) => installation.product);
|
|
237
|
+
const installedProducts = installations.map((installation) => installation.product);
|
|
238
|
+
const productsToInstall = uniqueProductsFromScopes.filter((product) => !installedProducts.includes(product));
|
|
239
|
+
if (!productsToInstall.length && productsToUpgrade.length === 0)
|
|
240
|
+
return;
|
|
241
|
+
this.ui.warn(cli_shared_1.Text.install.multiProductScopesDetected(productsToInstall, productsToUpgrade, site.host, environment));
|
|
242
|
+
}
|
|
210
243
|
}
|
|
211
244
|
}
|
|
212
245
|
async extractAddedScopes({ addedScopes }) {
|
|
@@ -265,5 +298,8 @@ class InstallController {
|
|
|
265
298
|
? { licenseModes: ecosystemLicenseModes, usersWithAccess }
|
|
266
299
|
: undefined;
|
|
267
300
|
}
|
|
301
|
+
checkRequiredInstallationExists = (installations, site, requiredProducts) => {
|
|
302
|
+
return requiredProducts.every((requiredProduct) => installations.some((installation) => installation.site.includes(site) && installation.product.toLowerCase() === requiredProduct.toLowerCase()));
|
|
303
|
+
};
|
|
268
304
|
}
|
|
269
305
|
exports.InstallController = InstallController;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { Dependencies } from './dependency-injection';
|
|
2
|
-
import { Installation } from '../service/installation-service';
|
|
3
2
|
export declare const registerListInstallationsCommand: ({ cmd, ui, services: { installationsService } }: Dependencies) => void;
|
|
4
|
-
export declare const performSingleUninstall: (installId: string, { ui, commands: { uninstallAppCommand } }: Dependencies) => Promise<void>;
|
|
5
|
-
export declare const performMultipleUninstalls: (appsToUninstall: Installation[], { ui, commands: { uninstallAppCommand } }: Dependencies) => Promise<void>;
|
|
6
3
|
export declare const registerCommands: ({ cmd, ...deps }: Dependencies) => Promise<void>;
|
|
7
4
|
//# 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":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
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;AA2DtD,eAAO,MAAM,gCAAgC,oDAAqD,YAAY,SAmC7G,CAAC;AA6EF,eAAO,MAAM,gBAAgB,qBAA4B,YAAY,KAAG,QAAQ,IAAI,CAenF,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerCommands = exports.
|
|
3
|
+
exports.registerCommands = exports.registerListInstallationsCommand = void 0;
|
|
4
4
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
5
|
const shared_1 = require("../installations/shared");
|
|
6
|
-
const
|
|
6
|
+
const uninstall_command_helpers_1 = require("./uninstall-command-helpers");
|
|
7
7
|
const semver_1 = require("semver");
|
|
8
8
|
const COMMAND_NAME = 'install';
|
|
9
9
|
const registerInstallAppCommand = async ({ cmd, controllers: { installController }, services: { supportedProductsService } }) => {
|
|
@@ -23,7 +23,7 @@ const registerInstallAppCommand = async ({ cmd, controllers: { installController
|
|
|
23
23
|
await installController.run({
|
|
24
24
|
environment,
|
|
25
25
|
site,
|
|
26
|
-
product,
|
|
26
|
+
products: product ? [product] : [],
|
|
27
27
|
upgrade,
|
|
28
28
|
confirmScopes,
|
|
29
29
|
license,
|
|
@@ -65,52 +65,6 @@ const registerListInstallationsCommand = ({ cmd, ui, services: { installationsSe
|
|
|
65
65
|
});
|
|
66
66
|
};
|
|
67
67
|
exports.registerListInstallationsCommand = registerListInstallationsCommand;
|
|
68
|
-
const performSingleUninstall = async (installId, { ui, commands: { uninstallAppCommand } }) => {
|
|
69
|
-
const installation = await ui.displayProgress(() => uninstallAppCommand.execute(installId), cli_shared_1.Text.uninstall.cmd.start, (result) => ({
|
|
70
|
-
successful: !!result.successful,
|
|
71
|
-
message: cli_shared_1.Text.uninstall.cmd.success(false)
|
|
72
|
-
}));
|
|
73
|
-
const uninstallMessageFormat = installation.successful ? cli_shared_1.Text.uninstall.done : cli_shared_1.Text.uninstall.failed;
|
|
74
|
-
const uninstallMessage = uninstallMessageFormat((0, cli_shared_1.productDisplayName)(installation.product), installation.site, installation.environmentKey, false);
|
|
75
|
-
if (installation.successful) {
|
|
76
|
-
ui.info(uninstallMessage);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
ui.error(new shared_1.UninstallAppError(uninstallMessage));
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
exports.performSingleUninstall = performSingleUninstall;
|
|
83
|
-
const performMultipleUninstalls = async (appsToUninstall, { ui, commands: { uninstallAppCommand } }) => {
|
|
84
|
-
const filteredInstallations = appsToUninstall.filter(({ product }) => product !== 'identity');
|
|
85
|
-
const hasMultipleNonIdentityApps = filteredInstallations.length > 1;
|
|
86
|
-
const uninstalledApps = await ui.displayProgress(() => uninstallAppCommand.batchExecute([], appsToUninstall), cli_shared_1.Text.uninstall.cmd.start, (result) => {
|
|
87
|
-
const isSuccessful = !result.some(({ successful }) => successful === false);
|
|
88
|
-
return {
|
|
89
|
-
successful: isSuccessful,
|
|
90
|
-
message: cli_shared_1.Text.uninstall.cmd.success(hasMultipleNonIdentityApps)
|
|
91
|
-
};
|
|
92
|
-
});
|
|
93
|
-
const deferredErrors = [];
|
|
94
|
-
uninstalledApps.forEach((uninstall) => {
|
|
95
|
-
const uninstallMessageFormat = uninstall.successful ? cli_shared_1.Text.uninstall.done : cli_shared_1.Text.uninstall.failed;
|
|
96
|
-
const formattedMessage = uninstallMessageFormat((0, cli_shared_1.productDisplayName)(uninstall.product), uninstall.site, uninstall.environmentKey, hasMultipleNonIdentityApps);
|
|
97
|
-
if (uninstall.successful && uninstall.product !== 'identity') {
|
|
98
|
-
ui.info(formattedMessage);
|
|
99
|
-
}
|
|
100
|
-
else if (!uninstall.successful) {
|
|
101
|
-
const uninstallError = new shared_1.UninstallAppError(formattedMessage);
|
|
102
|
-
ui.error(uninstallError);
|
|
103
|
-
deferredErrors.push(uninstallError);
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
if (uninstalledApps.some(({ successful }) => successful === false)) {
|
|
107
|
-
throw new errors_1.DeferredErrors(deferredErrors);
|
|
108
|
-
}
|
|
109
|
-
if (hasMultipleNonIdentityApps) {
|
|
110
|
-
ui.info(cli_shared_1.Text.uninstall.interactive.done);
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
exports.performMultipleUninstalls = performMultipleUninstalls;
|
|
114
68
|
const registerUninstallCommand = async (deps) => {
|
|
115
69
|
const { cmd, ui, services: { installationsService, supportedProductsService } } = deps;
|
|
116
70
|
const supportedProducts = await supportedProductsService.getSupportedProducts();
|
|
@@ -135,23 +89,23 @@ const registerUninstallCommand = async (deps) => {
|
|
|
135
89
|
ui.info(cli_shared_1.Text.uninstall.info);
|
|
136
90
|
ui.info(cli_shared_1.Text.ctrlC);
|
|
137
91
|
ui.emptyLine();
|
|
138
|
-
await (0,
|
|
92
|
+
await (0, uninstall_command_helpers_1.performSingleUninstall)(installation.id, deps);
|
|
139
93
|
}
|
|
140
94
|
else {
|
|
141
95
|
const filteredInstallations = installations.filter((install) => install.product !== 'identity' && install.product !== 'jira-servicedesk');
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
})));
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if (
|
|
151
|
-
await (0,
|
|
96
|
+
const options = (0, uninstall_command_helpers_1.getMultiChoiceOptionsForUninstall)(filteredInstallations);
|
|
97
|
+
const selectedSitesIndexes = await ui.promptForTable(cli_shared_1.Text.uninstall.interactive.desc, cli_shared_1.Text.uninstall.interactive.progressInfo, ['Environment', 'Site', 'Product'], options);
|
|
98
|
+
const [firstUninstall, secondUninstall] = (0, uninstall_command_helpers_1.getInstallationsFromSelection)(options, selectedSitesIndexes, filteredInstallations);
|
|
99
|
+
const selectedSites = new Set(firstUninstall.map(({ site }) => site).concat(secondUninstall.map(({ site }) => site)));
|
|
100
|
+
const remainingApps = options
|
|
101
|
+
.filter((_, index) => !selectedSitesIndexes.includes(index))
|
|
102
|
+
.map(({ extra }) => filteredInstallations[extra.installationIdx]);
|
|
103
|
+
firstUninstall.push(...(0, shared_1.getHangingIdentityInstallationsFromSite)(installations, remainingApps, selectedSites));
|
|
104
|
+
if (firstUninstall.length > 1 || secondUninstall.length > 0) {
|
|
105
|
+
await (0, uninstall_command_helpers_1.performMultipleUninstalls)(firstUninstall, secondUninstall, deps);
|
|
152
106
|
}
|
|
153
|
-
else {
|
|
154
|
-
await (0,
|
|
107
|
+
else if (firstUninstall.length === 1) {
|
|
108
|
+
await (0, uninstall_command_helpers_1.performSingleUninstall)(firstUninstall[0].id, deps);
|
|
155
109
|
}
|
|
156
110
|
}
|
|
157
111
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Installation } from '../service/installation-service';
|
|
2
|
+
import { Dependencies } from './dependency-injection';
|
|
3
|
+
export interface Option {
|
|
4
|
+
names: string[];
|
|
5
|
+
value: string;
|
|
6
|
+
extra: {
|
|
7
|
+
primary?: boolean;
|
|
8
|
+
secondary?: boolean;
|
|
9
|
+
contextAri?: string;
|
|
10
|
+
installationIdx: number;
|
|
11
|
+
product: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare const getMultiChoiceOptionsForUninstall: (filteredInstallations: Installation[]) => Option[];
|
|
15
|
+
export declare const getInstallationsFromSelection: (options: Option[], selectedSitesIndexes: number[], filteredInstallations: Installation[]) => [Installation[], Installation[]];
|
|
16
|
+
export declare const performSingleUninstall: (installId: string, { ui, commands: { uninstallAppCommand } }: Dependencies) => Promise<void>;
|
|
17
|
+
export declare const performMultipleUninstalls: (appsToUninstallFirst: Installation[], appsToUninstallSecond: Installation[], { ui, commands: { uninstallAppCommand } }: Dependencies) => Promise<void>;
|
|
18
|
+
//# sourceMappingURL=uninstall-command-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uninstall-command-helpers.d.ts","sourceRoot":"","sources":["../../src/command-line/uninstall-command-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAItD,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CAClH;AAMD,eAAO,MAAM,iCAAiC,0BAA2B,YAAY,EAAE,KAAG,MAAM,EA8B/F,CAAC;AAEF,eAAO,MAAM,6BAA6B,YAC/B,MAAM,EAAE,wBACK,MAAM,EAAE,yBACP,YAAY,EAAE,KACpC,CAAC,YAAY,EAAE,EAAE,YAAY,EAAE,CAiBjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,cACtB,MAAM,6CAC0B,YAAY,kBAuBxD,CAAC;AAEF,eAAO,MAAM,yBAAyB,yBACd,YAAY,EAAE,yBACb,YAAY,EAAE,6CACM,YAAY,kBAsDxD,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.performMultipleUninstalls = exports.performSingleUninstall = exports.getInstallationsFromSelection = exports.getMultiChoiceOptionsForUninstall = void 0;
|
|
4
|
+
const cli_shared_1 = require("@forge/cli-shared");
|
|
5
|
+
const shared_1 = require("../installations/shared");
|
|
6
|
+
const errors_1 = require("./errors");
|
|
7
|
+
function addPrimarySuffix(productDisplayName, secondaryCount) {
|
|
8
|
+
return secondaryCount ? `${productDisplayName} (Primary)` : productDisplayName;
|
|
9
|
+
}
|
|
10
|
+
const getMultiChoiceOptionsForUninstall = (filteredInstallations) => {
|
|
11
|
+
return filteredInstallations.reduce((acc, { id, environmentKey, site, product, secondaryProducts, secondaryContexts }, idx) => {
|
|
12
|
+
acc.push({
|
|
13
|
+
names: [
|
|
14
|
+
(0, cli_shared_1.environmentToOption)(environmentKey),
|
|
15
|
+
site,
|
|
16
|
+
addPrimarySuffix((0, cli_shared_1.productDisplayName)(product), secondaryProducts?.length)
|
|
17
|
+
],
|
|
18
|
+
value: id,
|
|
19
|
+
extra: {
|
|
20
|
+
installationIdx: idx,
|
|
21
|
+
product: product,
|
|
22
|
+
primary: !!secondaryProducts?.length
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
if (secondaryProducts) {
|
|
26
|
+
secondaryProducts.forEach((secondaryProduct, secondaryIdx) => {
|
|
27
|
+
const contextAri = secondaryContexts?.[secondaryIdx];
|
|
28
|
+
acc.push({
|
|
29
|
+
names: [(0, cli_shared_1.environmentToOption)(environmentKey), site, (0, cli_shared_1.productDisplayName)(secondaryProduct)],
|
|
30
|
+
value: id,
|
|
31
|
+
extra: { secondary: true, contextAri, installationIdx: idx, product: secondaryProduct }
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return acc;
|
|
36
|
+
}, []);
|
|
37
|
+
};
|
|
38
|
+
exports.getMultiChoiceOptionsForUninstall = getMultiChoiceOptionsForUninstall;
|
|
39
|
+
const getInstallationsFromSelection = (options, selectedSitesIndexes, filteredInstallations) => {
|
|
40
|
+
const firstUninstall = options
|
|
41
|
+
.filter((_, idx) => selectedSitesIndexes.includes(idx))
|
|
42
|
+
.filter(({ extra }) => !extra?.primary)
|
|
43
|
+
.map(({ extra }) => ({
|
|
44
|
+
...filteredInstallations[extra.installationIdx],
|
|
45
|
+
...(extra.secondary && { context: extra.contextAri, product: extra.product })
|
|
46
|
+
}));
|
|
47
|
+
const secondUninstall = options
|
|
48
|
+
.filter((_, idx) => selectedSitesIndexes.includes(idx))
|
|
49
|
+
.filter(({ extra }) => extra?.primary)
|
|
50
|
+
.map(({ extra }) => filteredInstallations[extra.installationIdx]);
|
|
51
|
+
return [firstUninstall, secondUninstall];
|
|
52
|
+
};
|
|
53
|
+
exports.getInstallationsFromSelection = getInstallationsFromSelection;
|
|
54
|
+
const performSingleUninstall = async (installId, { ui, commands: { uninstallAppCommand } }) => {
|
|
55
|
+
const installation = await ui.displayProgress(() => uninstallAppCommand.execute(installId), cli_shared_1.Text.uninstall.cmd.start, (result) => ({
|
|
56
|
+
successful: !!result.successful,
|
|
57
|
+
message: cli_shared_1.Text.uninstall.cmd.success(false)
|
|
58
|
+
}));
|
|
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)(installation.product), installation.site, installation.environmentKey, false);
|
|
61
|
+
if (installation.successful) {
|
|
62
|
+
ui.info(uninstallMessage);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
ui.error(new shared_1.UninstallAppError(uninstallMessage));
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports.performSingleUninstall = performSingleUninstall;
|
|
69
|
+
const performMultipleUninstalls = async (appsToUninstallFirst, appsToUninstallSecond, { ui, commands: { uninstallAppCommand } }) => {
|
|
70
|
+
const filteredInstallations = appsToUninstallFirst.filter(({ product }) => product !== 'identity');
|
|
71
|
+
const hasMultipleNonIdentityApps = filteredInstallations.length > 1;
|
|
72
|
+
const uninstalledApps = await ui.displayProgress(async () => {
|
|
73
|
+
const result1 = await uninstallAppCommand.batchExecute([], appsToUninstallFirst);
|
|
74
|
+
if (result1.some(({ successful }) => successful === false)) {
|
|
75
|
+
return result1;
|
|
76
|
+
}
|
|
77
|
+
const result2 = await uninstallAppCommand.batchExecute([], appsToUninstallSecond);
|
|
78
|
+
return result1.concat(result2);
|
|
79
|
+
}, cli_shared_1.Text.uninstall.cmd.start, (result) => {
|
|
80
|
+
const isSuccessful = !result.some(({ successful }) => successful === false);
|
|
81
|
+
return {
|
|
82
|
+
successful: isSuccessful,
|
|
83
|
+
message: cli_shared_1.Text.uninstall.cmd.success(hasMultipleNonIdentityApps)
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
const deferredErrors = [];
|
|
87
|
+
uninstalledApps.forEach((uninstall) => {
|
|
88
|
+
const uninstallMessageFormat = uninstall.successful ? cli_shared_1.Text.uninstall.done : cli_shared_1.Text.uninstall.failed;
|
|
89
|
+
const formattedMessage = uninstallMessageFormat((0, cli_shared_1.productDisplayName)(uninstall.product), uninstall.site, uninstall.environmentKey, hasMultipleNonIdentityApps);
|
|
90
|
+
if (uninstall.successful && uninstall.product !== 'identity') {
|
|
91
|
+
ui.info(formattedMessage);
|
|
92
|
+
}
|
|
93
|
+
else if (!uninstall.successful) {
|
|
94
|
+
const uninstallError = new shared_1.UninstallAppError(formattedMessage);
|
|
95
|
+
ui.error(uninstallError);
|
|
96
|
+
deferredErrors.push(uninstallError);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
if (uninstalledApps.some(({ successful }) => successful === false)) {
|
|
100
|
+
throw new errors_1.DeferredErrors(deferredErrors);
|
|
101
|
+
}
|
|
102
|
+
if (hasMultipleNonIdentityApps) {
|
|
103
|
+
ui.info(cli_shared_1.Text.uninstall.interactive.done);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
exports.performMultipleUninstalls = performMultipleUninstalls;
|
|
@@ -21,7 +21,7 @@ const getCLIDetails = () => {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
exports.getCLIDetails = getCLIDetails;
|
|
24
|
-
const supportedNodeMajorVersions = [18, 20];
|
|
24
|
+
const supportedNodeMajorVersions = [18, 20, 22];
|
|
25
25
|
exports.semverSupportedNodeVersion = supportedNodeMajorVersions.map((v) => `${v}.x`).join(' || ');
|
|
26
26
|
exports.humanReadableSupportedNodeVersion = supportedNodeMajorVersions
|
|
27
27
|
.map((v) => `${v}.x`)
|
|
@@ -13,7 +13,7 @@ export declare class GraphqlClient implements CreateEnvironmentClient, ListEnvir
|
|
|
13
13
|
type: AppEnvironmentType;
|
|
14
14
|
key: string;
|
|
15
15
|
lastDeployedAt: string;
|
|
16
|
-
|
|
16
|
+
requiredProducts: import("@forge/cli-shared").EcosystemRequiredProduct[];
|
|
17
17
|
}[]>;
|
|
18
18
|
deleteEnvironments(details: BatchDeleteEnvironmentDetails): Promise<DeleteEnvironmentOutput[]>;
|
|
19
19
|
deleteEnvironment(details: DeleteEnvironmentDetails): Promise<true>;
|
|
@@ -59,7 +59,7 @@ class GraphqlClient {
|
|
|
59
59
|
versions(first: 1) {
|
|
60
60
|
nodes {
|
|
61
61
|
updatedAt
|
|
62
|
-
|
|
62
|
+
requiredProducts
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
@@ -77,7 +77,7 @@ class GraphqlClient {
|
|
|
77
77
|
type: environment.type,
|
|
78
78
|
key: environment.key,
|
|
79
79
|
lastDeployedAt: environment.versions?.nodes?.[0]?.updatedAt || environment.createdAt,
|
|
80
|
-
|
|
80
|
+
requiredProducts: environment.versions?.nodes?.[0]?.requiredProducts || []
|
|
81
81
|
};
|
|
82
82
|
});
|
|
83
83
|
}
|
|
@@ -4,7 +4,7 @@ export interface ListEnvironmentDetails {
|
|
|
4
4
|
}
|
|
5
5
|
export interface ListEnvironmentOutput extends Pick<AppEnvironment, 'key' | 'type'> {
|
|
6
6
|
lastDeployedAt: string;
|
|
7
|
-
|
|
7
|
+
requiredProducts?: string[];
|
|
8
8
|
}
|
|
9
9
|
export interface ListEnvironmentClient {
|
|
10
10
|
listEnvironment(details: ListEnvironmentDetails): Promise<ListEnvironmentOutput[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-environment.d.ts","sourceRoot":"","sources":["../../src/environment/list-environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEtE,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,cAAc,EAAE,KAAK,GAAG,MAAM,CAAC;IACjF,cAAc,EAAE,MAAM,CAAC;IACvB,
|
|
1
|
+
{"version":3,"file":"list-environment.d.ts","sourceRoot":"","sources":["../../src/environment/list-environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEtE,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,cAAc,EAAE,KAAK,GAAG,MAAM,CAAC;IACjF,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACpC,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC,CAAC;CACpF;AAED,qBAAa,sBAAsB;IAE/B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,MAAM,EAAE,qBAAqB,EAC7B,YAAY,EAAE,iBAAiB;IAGrC,OAAO;CAMrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall-app.d.ts","sourceRoot":"","sources":["../../src/installations/uninstall-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"uninstall-app.d.ts","sourceRoot":"","sources":["../../src/installations/uninstall-app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAE/D,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,2BAA4B,SAAQ,sBAAsB;IACzE,KAAK,EAAE,IAAI,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IACjC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC9E,YAAY,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnE,qBAAqB,CAAC,KAAK,EAAE,2BAA2B,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;CACrG;AAED,qBAAa,mBAAmB;IAE5B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,YAAY,EAAE,iBAAiB,EAC/B,MAAM,EAAE,kBAAkB;IAGhC,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAY5D,YAAY,CACvB,eAAe,GAAE,MAAM,EAAO,EAC9B,iBAAiB,CAAC,EAAE,YAAY,EAAE,GACjC,OAAO,CAAC,kBAAkB,EAAE,CAAC;CA6BjC"}
|
|
@@ -32,6 +32,7 @@ class UninstallAppCommand {
|
|
|
32
32
|
appId,
|
|
33
33
|
environmentKey: installInfo.environmentKey,
|
|
34
34
|
installationId: installInfo.id,
|
|
35
|
+
installationContext: installInfo.context,
|
|
35
36
|
async: true
|
|
36
37
|
})));
|
|
37
38
|
return appsInstallInfo.map(({ product, site, environmentKey }, index) => ({
|
|
@@ -22,7 +22,7 @@ export interface AppInstallation {
|
|
|
22
22
|
export interface AppEnvironmentVersionPermissions {
|
|
23
23
|
scopes: string[];
|
|
24
24
|
egressAddresses: string[];
|
|
25
|
-
|
|
25
|
+
requiredProducts?: string[];
|
|
26
26
|
}
|
|
27
27
|
export interface AppEnvironmentPermissions extends AppEnvironmentVersionPermissions {
|
|
28
28
|
addedScopes: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"installation-service.d.ts","sourceRoot":"","sources":["../../src/service/installation-service.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,qBAAqB,EAGrB,KAAK,EAGL,gBAAgB,EAEhB,SAAS,EACV,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAG1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,kBAAkB,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,OAAO,EAAE;QACP,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,YAAY,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,
|
|
1
|
+
{"version":3,"file":"installation-service.d.ts","sourceRoot":"","sources":["../../src/service/installation-service.ts"],"names":[],"mappings":"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"}
|
|
@@ -96,25 +96,25 @@ class InstallationService {
|
|
|
96
96
|
}
|
|
97
97
|
getPermissionsFromAppEnvironmentVersion(appEnvironmentVersion) {
|
|
98
98
|
const permissions = appEnvironmentVersion?.permissions[0];
|
|
99
|
-
const
|
|
99
|
+
const requiredProducts = appEnvironmentVersion?.requiredProducts ?? [];
|
|
100
100
|
if (!permissions) {
|
|
101
|
-
return { scopes: [], egressAddresses: [],
|
|
101
|
+
return { scopes: [], egressAddresses: [], requiredProducts };
|
|
102
102
|
}
|
|
103
103
|
const scopes = permissions.scopes.map((s) => s.key);
|
|
104
104
|
const egressAddresses = permissions?.egress ? (0, cli_shared_1.flatMap)(permissions.egress, ({ addresses }) => addresses ?? []) : [];
|
|
105
|
-
return { scopes, egressAddresses,
|
|
105
|
+
return { scopes, egressAddresses, requiredProducts };
|
|
106
106
|
}
|
|
107
107
|
async getAppEnvironmentPermissions(appId, environmentKey) {
|
|
108
108
|
const versionDetails = await this.listInstallationsClient.getVersions(appId, environmentKey, 2);
|
|
109
109
|
const versions = versionDetails?.nodes;
|
|
110
110
|
if (!versions || versions.length === 0)
|
|
111
111
|
return;
|
|
112
|
-
const [{ scopes, egressAddresses,
|
|
112
|
+
const [{ scopes, egressAddresses, requiredProducts }, oldVersion] = versions.map((appEnvironmentVersion) => this.getPermissionsFromAppEnvironmentVersion(appEnvironmentVersion));
|
|
113
113
|
const groupedEgressAddresses = (0, egress_1.sortAndGroupEgressPermissionsByDomain)(egressAddresses);
|
|
114
114
|
if (!oldVersion) {
|
|
115
115
|
return {
|
|
116
116
|
scopes,
|
|
117
|
-
|
|
117
|
+
requiredProducts,
|
|
118
118
|
hasDeployments: false,
|
|
119
119
|
egressAddresses: groupedEgressAddresses,
|
|
120
120
|
addedScopes: scopes,
|
|
@@ -125,7 +125,7 @@ class InstallationService {
|
|
|
125
125
|
const addedScopes = (0, lodash_1.difference)(scopes, oldScopes);
|
|
126
126
|
return {
|
|
127
127
|
scopes,
|
|
128
|
-
|
|
128
|
+
requiredProducts,
|
|
129
129
|
hasDeployments: true,
|
|
130
130
|
egressAddresses: groupedEgressAddresses,
|
|
131
131
|
addedScopes,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "11.0.
|
|
3
|
+
"version": "11.0.1-next.14",
|
|
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,14 +18,14 @@
|
|
|
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.20.
|
|
22
|
-
"@forge/cli-shared": "6.6.
|
|
23
|
-
"@forge/egress": "1.
|
|
24
|
-
"@forge/lint": "5.7.
|
|
25
|
-
"@forge/manifest": "8.
|
|
26
|
-
"@forge/runtime": "5.10.
|
|
27
|
-
"@forge/tunnel": "5.9.
|
|
28
|
-
"@forge/util": "1.4.
|
|
21
|
+
"@forge/bundler": "4.20.9-next.11",
|
|
22
|
+
"@forge/cli-shared": "6.6.1-next.8",
|
|
23
|
+
"@forge/egress": "1.4.0-next.0",
|
|
24
|
+
"@forge/lint": "5.7.1-next.9",
|
|
25
|
+
"@forge/manifest": "8.7.0-next.4",
|
|
26
|
+
"@forge/runtime": "5.10.6-next.0",
|
|
27
|
+
"@forge/tunnel": "5.9.3-next.11",
|
|
28
|
+
"@forge/util": "1.4.8-next.0",
|
|
29
29
|
"@sentry/node": "7.106.0",
|
|
30
30
|
"@forge/i18n": "0.0.3",
|
|
31
31
|
"ajv": "^8.12.0",
|