@forge/cli 11.2.0 → 11.3.0-next.12
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 +150 -0
- package/npm-shrinkwrap.json +47 -46
- package/out/command-line/command.js +1 -1
- 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.d.ts.map +1 -1
- package/out/command-line/dependency-injection.js +2 -2
- 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/register-installation-commands.js +2 -2
- 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/command-line/view/version-view.d.ts +5 -0
- package/out/command-line/view/version-view.d.ts.map +1 -1
- package/out/command-line/view/version-view.js +118 -61
- package/out/deploy/deployer/deployer.d.ts.map +1 -1
- package/out/deploy/deployer/deployer.js +6 -1
- package/out/deploy/packager/runtime-bundler.d.ts +3 -4
- package/out/deploy/packager/runtime-bundler.d.ts.map +1 -1
- package/out/deploy/packager/runtime-bundler.js +7 -15
- package/out/installations/installation-helper.js +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,155 @@
|
|
|
1
1
|
# @forge/cli
|
|
2
2
|
|
|
3
|
+
## 11.3.0-next.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 336f74f: Support serving i18n resources while using `forge tunnel`
|
|
8
|
+
- Updated dependencies [336f74f]
|
|
9
|
+
- @forge/bundler@4.21.1-next.12
|
|
10
|
+
- @forge/cli-shared@6.8.0-next.11
|
|
11
|
+
- @forge/i18n@0.0.5-next.0
|
|
12
|
+
- @forge/tunnel@5.10.1-next.12
|
|
13
|
+
- @forge/lint@5.7.3-next.12
|
|
14
|
+
- @forge/manifest@8.9.0-next.6
|
|
15
|
+
|
|
16
|
+
## 11.3.0-next.11
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- @forge/lint@5.7.3-next.11
|
|
21
|
+
- @forge/tunnel@5.10.1-next.11
|
|
22
|
+
- @forge/bundler@4.21.1-next.11
|
|
23
|
+
|
|
24
|
+
## 11.3.0-next.10
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [de0bf46]
|
|
29
|
+
- @forge/manifest@8.9.0-next.5
|
|
30
|
+
- @forge/tunnel@5.10.1-next.10
|
|
31
|
+
- @forge/bundler@4.21.1-next.10
|
|
32
|
+
- @forge/cli-shared@6.8.0-next.10
|
|
33
|
+
- @forge/lint@5.7.3-next.10
|
|
34
|
+
|
|
35
|
+
## 11.3.0-next.9
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [acf1edf]
|
|
40
|
+
- Updated dependencies [3a703de]
|
|
41
|
+
- @forge/manifest@8.9.0-next.4
|
|
42
|
+
- @forge/bundler@4.21.1-next.9
|
|
43
|
+
- @forge/cli-shared@6.8.0-next.9
|
|
44
|
+
- @forge/lint@5.7.3-next.9
|
|
45
|
+
- @forge/tunnel@5.10.1-next.9
|
|
46
|
+
|
|
47
|
+
## 11.3.0-next.8
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- 0aad197: Change product wording to context
|
|
52
|
+
- Updated dependencies [0aad197]
|
|
53
|
+
- @forge/cli-shared@6.8.0-next.8
|
|
54
|
+
- @forge/bundler@4.21.1-next.8
|
|
55
|
+
- @forge/lint@5.7.3-next.8
|
|
56
|
+
- @forge/tunnel@5.10.1-next.8
|
|
57
|
+
|
|
58
|
+
## 11.3.0-next.7
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- 9d231e9: switch the `forge create` cross-context flow to use the new `app.contexts` manifest format
|
|
63
|
+
- Updated dependencies [9d231e9]
|
|
64
|
+
- Updated dependencies [b503084]
|
|
65
|
+
- @forge/cli-shared@6.8.0-next.7
|
|
66
|
+
- @forge/manifest@8.9.0-next.3
|
|
67
|
+
- @forge/bundler@4.21.1-next.7
|
|
68
|
+
- @forge/lint@5.7.3-next.7
|
|
69
|
+
- @forge/tunnel@5.10.1-next.7
|
|
70
|
+
|
|
71
|
+
## 11.3.0-next.6
|
|
72
|
+
|
|
73
|
+
### Patch Changes
|
|
74
|
+
|
|
75
|
+
- Updated dependencies [a7db2e6]
|
|
76
|
+
- Updated dependencies [003b1ed]
|
|
77
|
+
- @forge/cli-shared@6.8.0-next.6
|
|
78
|
+
- @forge/manifest@8.9.0-next.2
|
|
79
|
+
- @forge/bundler@4.21.1-next.6
|
|
80
|
+
- @forge/lint@5.7.3-next.6
|
|
81
|
+
- @forge/tunnel@5.10.1-next.6
|
|
82
|
+
|
|
83
|
+
## 11.3.0-next.5
|
|
84
|
+
|
|
85
|
+
### Patch Changes
|
|
86
|
+
|
|
87
|
+
- 210360b: Refactor text functions for easier read and maintenance
|
|
88
|
+
- Updated dependencies [210360b]
|
|
89
|
+
- @forge/cli-shared@6.8.0-next.5
|
|
90
|
+
- @forge/bundler@4.21.1-next.5
|
|
91
|
+
- @forge/lint@5.7.3-next.5
|
|
92
|
+
- @forge/tunnel@5.10.1-next.5
|
|
93
|
+
|
|
94
|
+
## 11.3.0-next.4
|
|
95
|
+
|
|
96
|
+
### Patch Changes
|
|
97
|
+
|
|
98
|
+
- Updated dependencies [64daaa5]
|
|
99
|
+
- @forge/manifest@8.9.0-next.1
|
|
100
|
+
- @forge/bundler@4.21.1-next.4
|
|
101
|
+
- @forge/cli-shared@6.8.0-next.4
|
|
102
|
+
- @forge/lint@5.7.3-next.4
|
|
103
|
+
- @forge/tunnel@5.10.1-next.4
|
|
104
|
+
|
|
105
|
+
## 11.3.0-next.3
|
|
106
|
+
|
|
107
|
+
### Minor Changes
|
|
108
|
+
|
|
109
|
+
- d156658: Switch the `forge create` flow to select product context first
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- Updated dependencies [d156658]
|
|
114
|
+
- @forge/cli-shared@6.8.0-next.3
|
|
115
|
+
- @forge/bundler@4.21.1-next.3
|
|
116
|
+
- @forge/lint@5.7.3-next.3
|
|
117
|
+
- @forge/tunnel@5.10.1-next.3
|
|
118
|
+
|
|
119
|
+
## 11.2.1-next.2
|
|
120
|
+
|
|
121
|
+
### Patch Changes
|
|
122
|
+
|
|
123
|
+
- b4cee28: Fix uninstall message
|
|
124
|
+
- Updated dependencies [94e48b9]
|
|
125
|
+
- @forge/manifest@8.9.0-next.0
|
|
126
|
+
- @forge/bundler@4.21.1-next.2
|
|
127
|
+
- @forge/cli-shared@6.7.1-next.2
|
|
128
|
+
- @forge/lint@5.7.3-next.2
|
|
129
|
+
- @forge/tunnel@5.10.1-next.2
|
|
130
|
+
|
|
131
|
+
## 11.2.1-next.1
|
|
132
|
+
|
|
133
|
+
### Patch Changes
|
|
134
|
+
|
|
135
|
+
- 2cdac63: forge install should list all scopes
|
|
136
|
+
- Updated dependencies [2cdac63]
|
|
137
|
+
- @forge/cli-shared@6.7.1-next.1
|
|
138
|
+
- @forge/bundler@4.21.1-next.1
|
|
139
|
+
- @forge/lint@5.7.3-next.1
|
|
140
|
+
- @forge/tunnel@5.10.1-next.1
|
|
141
|
+
|
|
142
|
+
## 11.2.1-next.0
|
|
143
|
+
|
|
144
|
+
### Patch Changes
|
|
145
|
+
|
|
146
|
+
- 999a9d0: Update error messages for deployment
|
|
147
|
+
- Updated dependencies [999a9d0]
|
|
148
|
+
- @forge/cli-shared@6.7.1-next.0
|
|
149
|
+
- @forge/bundler@4.21.1-next.0
|
|
150
|
+
- @forge/lint@5.7.3-next.0
|
|
151
|
+
- @forge/tunnel@5.10.1-next.0
|
|
152
|
+
|
|
3
153
|
## 11.2.0
|
|
4
154
|
|
|
5
155
|
### 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.12",
|
|
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.12",
|
|
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.12",
|
|
14
|
+
"@forge/cli-shared": "6.8.0-next.11",
|
|
15
15
|
"@forge/egress": "1.4.0",
|
|
16
|
-
"@forge/i18n": "0.0.
|
|
17
|
-
"@forge/lint": "5.7.
|
|
18
|
-
"@forge/manifest": "8.
|
|
16
|
+
"@forge/i18n": "0.0.5-next.0",
|
|
17
|
+
"@forge/lint": "5.7.3-next.12",
|
|
18
|
+
"@forge/manifest": "8.9.0-next.6",
|
|
19
19
|
"@forge/runtime": "5.10.7",
|
|
20
|
-
"@forge/tunnel": "5.10.
|
|
20
|
+
"@forge/tunnel": "5.10.1-next.12",
|
|
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.12",
|
|
838
|
+
"resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.21.1-next.12.tgz",
|
|
839
|
+
"integrity": "sha512-q4hs8iupV/E5GOv4d7QfcYxwRpISEkdJrFmPTZhquOrgCsnX+fBPT8nju4ypzJpBmYE26COoOxjsTQ+9rgm9YA==",
|
|
840
840
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
841
841
|
"dependencies": {
|
|
842
842
|
"@babel/core": "^7.24.0",
|
|
@@ -846,12 +846,12 @@
|
|
|
846
846
|
"@babel/plugin-transform-optional-chaining": "^7.23.4",
|
|
847
847
|
"@babel/plugin-transform-react-jsx": "^7.23.4",
|
|
848
848
|
"@babel/preset-typescript": "^7.23.3",
|
|
849
|
-
"@forge/api": "5.
|
|
849
|
+
"@forge/api": "5.2.0-next.0",
|
|
850
850
|
"@forge/babel-plugin-transform-ui": "1.1.21",
|
|
851
|
-
"@forge/cli-shared": "6.
|
|
852
|
-
"@forge/i18n": "0.0.
|
|
853
|
-
"@forge/lint": "5.7.
|
|
854
|
-
"@forge/manifest": "8.
|
|
851
|
+
"@forge/cli-shared": "6.8.0-next.11",
|
|
852
|
+
"@forge/i18n": "0.0.5-next.0",
|
|
853
|
+
"@forge/lint": "5.7.3-next.12",
|
|
854
|
+
"@forge/manifest": "8.9.0-next.6",
|
|
855
855
|
"@forge/util": "1.4.8",
|
|
856
856
|
"assert": "^2.1.0",
|
|
857
857
|
"babel-loader": "^8.3.0",
|
|
@@ -891,13 +891,14 @@
|
|
|
891
891
|
}
|
|
892
892
|
},
|
|
893
893
|
"node_modules/@forge/bundler/node_modules/@forge/api": {
|
|
894
|
-
"version": "5.
|
|
895
|
-
"resolved": "https://registry.npmjs.org/@forge/api/-/api-5.
|
|
896
|
-
"integrity": "sha512-
|
|
894
|
+
"version": "5.2.0-next.0",
|
|
895
|
+
"resolved": "https://registry.npmjs.org/@forge/api/-/api-5.2.0-next.0.tgz",
|
|
896
|
+
"integrity": "sha512-emwVoxSCdOq+l4lTZK+3YOZnkMagiN/pZttpl3mA8y/DiU0tGLL49u5LipU1xdc/8c/jyGlyu8lrpMvkYmky/g==",
|
|
897
897
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
898
898
|
"dependencies": {
|
|
899
899
|
"@forge/auth": "0.0.7",
|
|
900
900
|
"@forge/egress": "1.4.0",
|
|
901
|
+
"@forge/i18n": "0.0.5-next.0",
|
|
901
902
|
"@forge/storage": "1.8.0",
|
|
902
903
|
"@forge/util": "1.4.8",
|
|
903
904
|
"headers-utils": "^3.0.2"
|
|
@@ -919,13 +920,13 @@
|
|
|
919
920
|
"license": "SEE LICENSE IN LICENSE.txt"
|
|
920
921
|
},
|
|
921
922
|
"node_modules/@forge/cli-shared": {
|
|
922
|
-
"version": "6.
|
|
923
|
-
"resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-6.
|
|
924
|
-
"integrity": "sha512-
|
|
923
|
+
"version": "6.8.0-next.11",
|
|
924
|
+
"resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-6.8.0-next.11.tgz",
|
|
925
|
+
"integrity": "sha512-AmCxVz9kNiFYTUx9/MgLHhukdDG+nzT+RRsQ49+6VYwY5Epzp+tb7EPKtqdpIk89xb8zPzZucANpgMD4rA2Sdg==",
|
|
925
926
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
926
927
|
"dependencies": {
|
|
927
|
-
"@forge/i18n": "0.0.
|
|
928
|
-
"@forge/manifest": "8.
|
|
928
|
+
"@forge/i18n": "0.0.5-next.0",
|
|
929
|
+
"@forge/manifest": "8.9.0-next.6",
|
|
929
930
|
"@forge/util": "1.4.8",
|
|
930
931
|
"@sentry/node": "7.106.0",
|
|
931
932
|
"adm-zip": "^0.5.10",
|
|
@@ -958,9 +959,9 @@
|
|
|
958
959
|
}
|
|
959
960
|
},
|
|
960
961
|
"node_modules/@forge/csp": {
|
|
961
|
-
"version": "3.
|
|
962
|
-
"resolved": "https://registry.npmjs.org/@forge/csp/-/csp-3.
|
|
963
|
-
"integrity": "sha512-
|
|
962
|
+
"version": "3.7.0-next.0",
|
|
963
|
+
"resolved": "https://registry.npmjs.org/@forge/csp/-/csp-3.7.0-next.0.tgz",
|
|
964
|
+
"integrity": "sha512-C4P3HUsEY0V9wRbucaobikHP6OZlDf9lunyLjcsQqsUDUUOxyxo8sSRjSJ76S6TyciI//ivNjy7P/TkZG+gg9w==",
|
|
964
965
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
965
966
|
"dependencies": {
|
|
966
967
|
"cheerio": "^0.22.0",
|
|
@@ -977,24 +978,24 @@
|
|
|
977
978
|
}
|
|
978
979
|
},
|
|
979
980
|
"node_modules/@forge/i18n": {
|
|
980
|
-
"version": "0.0.
|
|
981
|
-
"resolved": "https://registry.npmjs.org/@forge/i18n/-/i18n-0.0.
|
|
982
|
-
"integrity": "sha512-
|
|
981
|
+
"version": "0.0.5-next.0",
|
|
982
|
+
"resolved": "https://registry.npmjs.org/@forge/i18n/-/i18n-0.0.5-next.0.tgz",
|
|
983
|
+
"integrity": "sha512-mGTGQpnviwEUJsMgegDiyhli3SAo5nsy6azQf/gKCDFUC/VQvG+OzA4dVhfRn7vBMXZ+W/vb9XYT71+evBTSHw==",
|
|
983
984
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
984
985
|
"dependencies": {
|
|
985
986
|
"lodash": "^4.17.21"
|
|
986
987
|
}
|
|
987
988
|
},
|
|
988
989
|
"node_modules/@forge/lint": {
|
|
989
|
-
"version": "5.7.
|
|
990
|
-
"resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.7.
|
|
991
|
-
"integrity": "sha512-
|
|
990
|
+
"version": "5.7.3-next.12",
|
|
991
|
+
"resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.7.3-next.12.tgz",
|
|
992
|
+
"integrity": "sha512-Nw2AaBGEPVxsK3E6+hO9E+XDS85WkKVCJIhM8PvmcILJXram+yQ1JA1sC0IVoZsftbDyRWmpyRmeRvW6YpaoMg==",
|
|
992
993
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
993
994
|
"dependencies": {
|
|
994
|
-
"@forge/cli-shared": "6.
|
|
995
|
-
"@forge/csp": "3.
|
|
995
|
+
"@forge/cli-shared": "6.8.0-next.11",
|
|
996
|
+
"@forge/csp": "3.7.0-next.0",
|
|
996
997
|
"@forge/egress": "1.4.0",
|
|
997
|
-
"@forge/manifest": "8.
|
|
998
|
+
"@forge/manifest": "8.9.0-next.6",
|
|
998
999
|
"@typescript-eslint/typescript-estree": "^5.62.0",
|
|
999
1000
|
"array.prototype.flatmap": "^1.3.2",
|
|
1000
1001
|
"atlassian-openapi": "^1.0.18",
|
|
@@ -1003,12 +1004,12 @@
|
|
|
1003
1004
|
}
|
|
1004
1005
|
},
|
|
1005
1006
|
"node_modules/@forge/manifest": {
|
|
1006
|
-
"version": "8.
|
|
1007
|
-
"resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-8.
|
|
1008
|
-
"integrity": "sha512-
|
|
1007
|
+
"version": "8.9.0-next.6",
|
|
1008
|
+
"resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-8.9.0-next.6.tgz",
|
|
1009
|
+
"integrity": "sha512-NAlieP1UKUDjWDhf3jlGdrZsl1m5BRMSt4xSaPt0m0R+L3WuqaH9h5zXVcwjU/HrszvePM9NKIX/HEC2Aqe4kA==",
|
|
1009
1010
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
1010
1011
|
"dependencies": {
|
|
1011
|
-
"@forge/i18n": "0.0.
|
|
1012
|
+
"@forge/i18n": "0.0.5-next.0",
|
|
1012
1013
|
"@sentry/node": "7.106.0",
|
|
1013
1014
|
"ajv": "^8.12.0",
|
|
1014
1015
|
"ajv-formats": "2.1.1",
|
|
@@ -1036,14 +1037,14 @@
|
|
|
1036
1037
|
}
|
|
1037
1038
|
},
|
|
1038
1039
|
"node_modules/@forge/tunnel": {
|
|
1039
|
-
"version": "5.10.
|
|
1040
|
-
"resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.10.
|
|
1041
|
-
"integrity": "sha512-
|
|
1040
|
+
"version": "5.10.1-next.12",
|
|
1041
|
+
"resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.10.1-next.12.tgz",
|
|
1042
|
+
"integrity": "sha512-pInv9bO4Oro57Nf6+Q4Q1Cvxm/VaKgUVUA7WRFcb5TfYxDNSe5nUvhNkNft+CWS+W8Pj1r3BuEz8b9l4o+xeDw==",
|
|
1042
1043
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
1043
1044
|
"dependencies": {
|
|
1044
|
-
"@forge/bundler": "4.21.
|
|
1045
|
-
"@forge/cli-shared": "6.
|
|
1046
|
-
"@forge/csp": "3.
|
|
1045
|
+
"@forge/bundler": "4.21.1-next.12",
|
|
1046
|
+
"@forge/cli-shared": "6.8.0-next.11",
|
|
1047
|
+
"@forge/csp": "3.7.0-next.0",
|
|
1047
1048
|
"@forge/runtime": "5.10.7",
|
|
1048
1049
|
"chokidar": "^3.6.0",
|
|
1049
1050
|
"cloudflared": "^0.7.0",
|
|
@@ -189,7 +189,7 @@ class Command {
|
|
|
189
189
|
contextOption() {
|
|
190
190
|
const supportedProductsService = this.supportedProductsService;
|
|
191
191
|
return this.option('-s, --site [site]', cli_shared_1.Text.optionSite)
|
|
192
|
-
.option('-p, --product [
|
|
192
|
+
.option('-p, --product [context]', cli_shared_1.Text.optionProduct(supportedProductsService.getSupportedProducts()))
|
|
193
193
|
.precondition(async (...args) => {
|
|
194
194
|
const { site, product } = last(args);
|
|
195
195
|
return validateContext({ supportedProductsService, site, product });
|
|
@@ -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,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;YAyBjB,aAAa;YA0Bb,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;IAiInC,OAAO,CAAC,qBAAqB,CA8B3B;IAEF,OAAO,CAAC,0BAA0B,CA8BhC;YAEY,gBAAgB;IAU9B,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,oBAAoB;IA8B5B,OAAO,CAAC,uBAAuB;YAoBjB,8CAA8C;IAY5D,OAAO,CAAC,+BAA+B,CAWrC;CACH"}
|
|
@@ -198,8 +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
|
}));
|
|
@@ -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,EAKhB,gBAAgB,EAQhB,YAAY,EACZ,aAAa,EAOb,kBAAkB,EAIlB,kBAAkB,EAElB,kBAAkB,EAKlB,wBAAwB,EACzB,MAAM,mBAAmB,CAAC;AAc3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAML,0BAA0B,EAG3B,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,gCAAgC,EAAE,MAAM,sDAAsD,CAAC;AAExG,OAAO,EAAE,+BAA+B,EAAE,MAAM,qDAAqD,C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GAAG,CAAC,GAAG,KAAK,CAAC;AAC7D,oBAAY,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC"}
|
|
@@ -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);
|
|
@@ -184,7 +184,7 @@ const getDependencies = async (cliDetails) => {
|
|
|
184
184
|
const createSandbox = async (cfg) => new tunnel_2.NodeSandbox(cfg, statsigService);
|
|
185
185
|
const functionHost = new tunnel_1.LocalFunctionHost(configFile, ui, null, createSandbox);
|
|
186
186
|
const localInvocationService = new tunnel_1.LocalInvocationService(configFile, ui, runtime_1.notImplementedInspector);
|
|
187
|
-
const startTunnelCommand = new tunnel_1.StartTunnelCommand(assertiveAppConfigReader, new tunnel_1.LocalDevelopmentServer(localInvocationService, ui, configFile, fileReader, statsigService), new tunnel_1.CloudflareCreateTunnelService(ui), new tunnel_1.RegisterTunnelServiceImpl(new tunnel_1.TunnelGraphqlClient(graphQLClient)), functionHost, runtime_1.notImplementedInspector, ui, configFile);
|
|
187
|
+
const startTunnelCommand = new tunnel_1.StartTunnelCommand(assertiveAppConfigReader, new tunnel_1.LocalDevelopmentServer(localInvocationService, ui, configFile, fileReader, statsigService, i18nResourceBundlingService), new tunnel_1.CloudflareCreateTunnelService(ui), new tunnel_1.RegisterTunnelServiceImpl(new tunnel_1.TunnelGraphqlClient(graphQLClient)), functionHost, runtime_1.notImplementedInspector, ui, configFile);
|
|
188
188
|
const tunnelInteractor = new tunnel_1.TunnelInteractor(ui);
|
|
189
189
|
const configFilePortFindingService = new port_finding_service_1.ConfigFilePortFindingService(configFile);
|
|
190
190
|
const tunnelAnalyticsService = new tunnel_analytics_service_1.TunnelAnalyticsService(analyticsClientReporter, cliDetails);
|
|
@@ -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) {
|
|
@@ -46,7 +46,7 @@ const registerListInstallationsCommand = ({ cmd, ui, services: { installationsSe
|
|
|
46
46
|
['id', 'Installation ID'],
|
|
47
47
|
['environment', 'Environment'],
|
|
48
48
|
['site', 'Site'],
|
|
49
|
-
['product', hasSecondaryInstallations ? '
|
|
49
|
+
['product', hasSecondaryInstallations ? 'Context(s)' : 'Context'],
|
|
50
50
|
['majorVersion', 'Major Version']
|
|
51
51
|
], installations.map(({ id, environmentKey, product, secondaryProducts, site, version: { isLatest, version } }) => ({
|
|
52
52
|
id,
|
|
@@ -90,7 +90,7 @@ const registerUninstallCommand = (deps) => {
|
|
|
90
90
|
else {
|
|
91
91
|
const filteredInstallations = installations.filter((install) => install.product !== 'identity' && install.product !== 'jira-servicedesk');
|
|
92
92
|
const options = (0, uninstall_command_helpers_1.getMultiChoiceOptionsForUninstall)(filteredInstallations);
|
|
93
|
-
const selectedSitesIndexes = await ui.promptForTable(cli_shared_1.Text.uninstall.interactive.desc, cli_shared_1.Text.uninstall.interactive.progressInfo, ['Environment', 'Site', '
|
|
93
|
+
const selectedSitesIndexes = await ui.promptForTable(cli_shared_1.Text.uninstall.interactive.desc, cli_shared_1.Text.uninstall.interactive.progressInfo, ['Environment', 'Site', 'Context'], options);
|
|
94
94
|
const [firstUninstall, secondUninstall] = (0, uninstall_command_helpers_1.getInstallationsFromSelection)(options, selectedSitesIndexes, filteredInstallations);
|
|
95
95
|
const selectedSites = new Set(firstUninstall.map(({ site }) => site).concat(secondUninstall.map(({ site }) => site)));
|
|
96
96
|
const remainingApps = options
|
|
@@ -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,6 +1,11 @@
|
|
|
1
1
|
import { AppEnvironmentType, UI } from '@forge/cli-shared';
|
|
2
2
|
import { VersionDetails, VersionOverview } from '../../service/version-service';
|
|
3
3
|
import { Change } from 'diff';
|
|
4
|
+
export declare const getDetailsTable: ({ formatKeyValueList, formatYamlProperties }: UI, details: Partial<VersionDetails>) => {
|
|
5
|
+
entry: string;
|
|
6
|
+
details: string;
|
|
7
|
+
property: keyof VersionDetails;
|
|
8
|
+
}[];
|
|
4
9
|
export declare class VersionView {
|
|
5
10
|
private readonly ui;
|
|
6
11
|
constructor(ui: UI);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-view.d.ts","sourceRoot":"","sources":["../../../src/command-line/view/version-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"version-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AAE,EAAE,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAE,EAAE,GAAG,IAAI;IAkCxG,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAMtF,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAIzC,kBAAkB,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,IAAI;CAwBzD"}
|
|
@@ -1,9 +1,120 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VersionView = void 0;
|
|
3
|
+
exports.VersionView = exports.getDetailsTable = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
6
6
|
const chalk_1 = tslib_1.__importDefault(require("chalk"));
|
|
7
|
+
const getDetailsTable = ({ formatKeyValueList, formatYamlProperties }, details) => {
|
|
8
|
+
const deploymentDate = (date) => `${date.toISOString()}`;
|
|
9
|
+
const scopes = (scopes) => `${(0, cli_shared_1.itemList)(scopes, '')}`;
|
|
10
|
+
const egress = (egresses) => {
|
|
11
|
+
const egressItems = egresses.map((egress) => ({
|
|
12
|
+
key: egress.type,
|
|
13
|
+
value: (0, cli_shared_1.itemList)(egress.addresses, ' ')
|
|
14
|
+
}));
|
|
15
|
+
return formatKeyValueList(egressItems, '', true);
|
|
16
|
+
};
|
|
17
|
+
const securityPolicies = (policies) => {
|
|
18
|
+
const policyItems = policies.map((policy) => ({
|
|
19
|
+
key: policy.type,
|
|
20
|
+
value: policy.policies.join(', ')
|
|
21
|
+
}));
|
|
22
|
+
return formatKeyValueList(policyItems);
|
|
23
|
+
};
|
|
24
|
+
const connectKeys = (keys) => {
|
|
25
|
+
const keyItems = keys.map((key) => ({
|
|
26
|
+
key: key.product,
|
|
27
|
+
value: key.key
|
|
28
|
+
}));
|
|
29
|
+
return formatKeyValueList(keyItems, '');
|
|
30
|
+
};
|
|
31
|
+
const functions = (functions) => {
|
|
32
|
+
const functionItems = functions.map((func) => {
|
|
33
|
+
const properties = {
|
|
34
|
+
runtime: func.runtimeName,
|
|
35
|
+
handler: func.handler
|
|
36
|
+
};
|
|
37
|
+
return formatYamlProperties(properties, func.key);
|
|
38
|
+
});
|
|
39
|
+
return (0, cli_shared_1.itemList)(functionItems, '');
|
|
40
|
+
};
|
|
41
|
+
const modules = (modules) => {
|
|
42
|
+
return modules
|
|
43
|
+
.map((mod) => {
|
|
44
|
+
const items = mod.items.map((item) => formatYamlProperties(item.properties, item.key));
|
|
45
|
+
return `${chalk_1.default.bold(mod.type)}\n${(0, cli_shared_1.itemList)(items, '')}`;
|
|
46
|
+
})
|
|
47
|
+
.join('\n');
|
|
48
|
+
};
|
|
49
|
+
const remotes = (remotes) => {
|
|
50
|
+
const remoteItems = remotes.map((remote) => {
|
|
51
|
+
const properties = {
|
|
52
|
+
baseUrl: remote.baseUrl,
|
|
53
|
+
operations: remote.operations
|
|
54
|
+
};
|
|
55
|
+
return formatYamlProperties(properties, remote.key);
|
|
56
|
+
});
|
|
57
|
+
return (0, cli_shared_1.itemList)(remoteItems, '');
|
|
58
|
+
};
|
|
59
|
+
const tableData = [
|
|
60
|
+
{
|
|
61
|
+
entry: 'deployment date',
|
|
62
|
+
detailsFn: deploymentDate,
|
|
63
|
+
property: 'deploymentDateTime'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
entry: 'functions',
|
|
67
|
+
detailsFn: functions,
|
|
68
|
+
property: 'functions'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
entry: 'modules',
|
|
72
|
+
detailsFn: modules,
|
|
73
|
+
property: 'modules'
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
entry: 'license',
|
|
77
|
+
detailsFn: cli_shared_1.Text.version.check.details.license,
|
|
78
|
+
property: 'requiresLicense'
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
entry: 'scopes',
|
|
82
|
+
detailsFn: scopes,
|
|
83
|
+
property: 'scopes'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
entry: 'egress',
|
|
87
|
+
detailsFn: egress,
|
|
88
|
+
property: 'egresses'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
entry: 'policies',
|
|
92
|
+
detailsFn: securityPolicies,
|
|
93
|
+
property: 'policies'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
entry: 'connect keys',
|
|
97
|
+
detailsFn: connectKeys,
|
|
98
|
+
property: 'connectKeys'
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
entry: 'remotes',
|
|
102
|
+
detailsFn: remotes,
|
|
103
|
+
property: 'remotes'
|
|
104
|
+
}
|
|
105
|
+
];
|
|
106
|
+
return tableData
|
|
107
|
+
.filter(({ property }) => details[property] !== undefined)
|
|
108
|
+
.map(({ entry, detailsFn, property }) => ({
|
|
109
|
+
entry,
|
|
110
|
+
details: detailsFn(details[property]),
|
|
111
|
+
property
|
|
112
|
+
}));
|
|
113
|
+
};
|
|
114
|
+
exports.getDetailsTable = getDetailsTable;
|
|
115
|
+
const getPropertySummary = (property) => {
|
|
116
|
+
return property.map((item) => `${item.type}: ${item.count}`).join('\n');
|
|
117
|
+
};
|
|
7
118
|
class VersionView {
|
|
8
119
|
ui;
|
|
9
120
|
constructor(ui) {
|
|
@@ -67,65 +178,11 @@ class VersionView {
|
|
|
67
178
|
this.ui.emptyLine();
|
|
68
179
|
}
|
|
69
180
|
displayDetailsAsTable(details) {
|
|
70
|
-
const tableData = [
|
|
71
|
-
{
|
|
72
|
-
entry: 'deployment date',
|
|
73
|
-
detailsFn: cli_shared_1.Text.version.check.details.deploymentDate,
|
|
74
|
-
property: 'deploymentDateTime'
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
entry: 'functions',
|
|
78
|
-
detailsFn: cli_shared_1.Text.version.check.details.functions,
|
|
79
|
-
property: 'functions'
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
entry: 'modules',
|
|
83
|
-
detailsFn: cli_shared_1.Text.version.check.details.modules,
|
|
84
|
-
property: 'modules'
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
entry: 'license',
|
|
88
|
-
detailsFn: cli_shared_1.Text.version.check.details.license,
|
|
89
|
-
property: 'requiresLicense'
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
entry: 'scopes',
|
|
93
|
-
detailsFn: cli_shared_1.Text.version.check.details.scopes,
|
|
94
|
-
property: 'scopes'
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
entry: 'egress',
|
|
98
|
-
detailsFn: cli_shared_1.Text.version.check.details.egress,
|
|
99
|
-
property: 'egresses'
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
entry: 'policies',
|
|
103
|
-
detailsFn: cli_shared_1.Text.version.check.details.securityPolicies,
|
|
104
|
-
property: 'policies'
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
entry: 'connect keys',
|
|
108
|
-
detailsFn: cli_shared_1.Text.version.check.details.connectKeys,
|
|
109
|
-
property: 'connectKeys'
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
entry: 'remotes',
|
|
113
|
-
detailsFn: cli_shared_1.Text.version.check.details.remotes,
|
|
114
|
-
property: 'remotes'
|
|
115
|
-
}
|
|
116
|
-
];
|
|
117
|
-
const filteredData = [...tableData]
|
|
118
|
-
.sort((a, b) => a.entry.localeCompare(b.entry))
|
|
119
|
-
.filter(({ property }) => details[property] !== undefined)
|
|
120
|
-
.map(({ entry, detailsFn, property }) => ({
|
|
121
|
-
entry,
|
|
122
|
-
details: detailsFn(details[property]),
|
|
123
|
-
property
|
|
124
|
-
}));
|
|
181
|
+
const tableData = [...(0, exports.getDetailsTable)(this.ui, details)].sort((a, b) => a.entry.localeCompare(b.entry));
|
|
125
182
|
this.ui.table([
|
|
126
183
|
['entry', 'Property'],
|
|
127
184
|
['details', 'Details']
|
|
128
|
-
],
|
|
185
|
+
], tableData);
|
|
129
186
|
}
|
|
130
187
|
displayDataInJson(data) {
|
|
131
188
|
this.ui.info(JSON.stringify(data, null, 2));
|
|
@@ -188,10 +245,10 @@ class VersionView {
|
|
|
188
245
|
], data.map(({ version, egresses, modules, policies, deploymentDateTime, ...rest }) => ({
|
|
189
246
|
...rest,
|
|
190
247
|
version: version.toString(),
|
|
191
|
-
deploymentDate:
|
|
192
|
-
egresses:
|
|
193
|
-
policies:
|
|
194
|
-
modules:
|
|
248
|
+
deploymentDate: deploymentDateTime.toISOString(),
|
|
249
|
+
egresses: getPropertySummary(egresses),
|
|
250
|
+
policies: getPropertySummary(policies),
|
|
251
|
+
modules: getPropertySummary(modules)
|
|
195
252
|
})));
|
|
196
253
|
}
|
|
197
254
|
}
|
|
@@ -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,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,CAAC,EAAE,MAAM;IAIX,WAAW,IAAI,OAAO;CAG9B;AACD,qBAAa,sBAAuB,SAAQ,SAAS;IAEjD,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,GAAE,OAAe,EAC3C,SAAS,CAAC,EAAE,MAAM,G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,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
|
}
|
|
@@ -13,16 +13,15 @@ export declare class RuntimeBundler {
|
|
|
13
13
|
protected readonly fileSystemReader: FileSystemReader;
|
|
14
14
|
private readonly configReader;
|
|
15
15
|
constructor(archiverFactory: () => Archiver, logger: Logger, bundler: Bundler, fileSystemReader: FileSystemReader, configReader: ConfigReader);
|
|
16
|
-
protected packageCode(archiver: Archiver, entryPoints: EntryPoint[]): Promise<string[]>;
|
|
16
|
+
protected packageCode(archiver: Archiver, entryPoints: EntryPoint[], i18nResourceBundle: I18nResourceBundle): Promise<string[]>;
|
|
17
17
|
protected packageDependencies(archiver: Archiver): Promise<void>;
|
|
18
|
-
protected packageAll(archiver: Archiver, handlers: Handler[], packageConfig: App['package']): Promise<string[]>;
|
|
19
|
-
protected packageI18nResources(archiver: Archiver, i18nResourceBundle: I18nResourceBundle): void;
|
|
18
|
+
protected packageAll(archiver: Archiver, handlers: Handler[], packageConfig: App['package'], i18nResourceBundle: I18nResourceBundle): Promise<string[]>;
|
|
20
19
|
bundle(handlers: Handler[], i18nResourceBundle: I18nResourceBundle, packageConfig?: App['package']): Promise<RuntimeBundleResult>;
|
|
21
20
|
}
|
|
22
21
|
export declare class SandboxRuntimeBundler extends RuntimeBundler {
|
|
23
22
|
bundle(handlers: Handler[], i18nResourceBundle: I18nResourceBundle, packageConfig?: App['package']): Promise<RuntimeBundleResult>;
|
|
24
23
|
}
|
|
25
24
|
export declare class NodeRuntimeBundler extends RuntimeBundler {
|
|
26
|
-
protected packageAll(archiver: Archiver, handlers: Handler[], packageConfig: App['package']): Promise<string[]>;
|
|
25
|
+
protected packageAll(archiver: Archiver, handlers: Handler[], packageConfig: App['package'], i18nResourceBundle: I18nResourceBundle): Promise<string[]>;
|
|
27
26
|
}
|
|
28
27
|
//# sourceMappingURL=runtime-bundler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-bundler.d.ts","sourceRoot":"","sources":["../../../src/deploy/packager/runtime-bundler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAA+B,UAAU,EAAkB,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAEL,OAAO,EACP,MAAM,EAEN,gBAAgB,EAEhB,YAAY,
|
|
1
|
+
{"version":3,"file":"runtime-bundler.d.ts","sourceRoot":"","sources":["../../../src/deploy/packager/runtime-bundler.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAA+B,UAAU,EAAkB,MAAM,gBAAgB,CAAC;AAClG,OAAO,EAEL,OAAO,EACP,MAAM,EAEN,gBAAgB,EAEhB,YAAY,EACZ,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,WAAW,mBAAmB;IAClC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,qBAAa,cAAc;IAEvB,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM;IAC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5,8 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const path_1 = tslib_1.__importDefault(require("path"));
|
|
6
6
|
const bundler_1 = require("@forge/bundler");
|
|
7
7
|
const cli_shared_1 = require("@forge/cli-shared");
|
|
8
|
-
const i18n_1 = require("@forge/i18n");
|
|
9
|
-
const path_2 = require("path");
|
|
10
8
|
class RuntimeBundler {
|
|
11
9
|
archiverFactory;
|
|
12
10
|
logger;
|
|
@@ -20,12 +18,12 @@ class RuntimeBundler {
|
|
|
20
18
|
this.fileSystemReader = fileSystemReader;
|
|
21
19
|
this.configReader = configReader;
|
|
22
20
|
}
|
|
23
|
-
async packageCode(archiver, entryPoints) {
|
|
21
|
+
async packageCode(archiver, entryPoints, i18nResourceBundle) {
|
|
24
22
|
const moduleList = [];
|
|
25
23
|
if (entryPoints.length > 0) {
|
|
26
24
|
let bundlerResponse;
|
|
27
25
|
try {
|
|
28
|
-
bundlerResponse = await this.bundler.bundle({ appDirectory: process.cwd(), entryPoints });
|
|
26
|
+
bundlerResponse = await this.bundler.bundle({ appDirectory: process.cwd(), entryPoints, i18nResourceBundle });
|
|
29
27
|
}
|
|
30
28
|
catch (e) {
|
|
31
29
|
throw new bundler_1.BundlerError(e.message);
|
|
@@ -53,21 +51,15 @@ class RuntimeBundler {
|
|
|
53
51
|
archiver.addFileFrom(fileName, fileName);
|
|
54
52
|
}
|
|
55
53
|
}
|
|
56
|
-
async packageAll(archiver, handlers, packageConfig) {
|
|
54
|
+
async packageAll(archiver, handlers, packageConfig, i18nResourceBundle) {
|
|
57
55
|
const entryPoints = (0, bundler_1.getEntryPoints)(handlers);
|
|
58
|
-
const moduleList = await this.packageCode(archiver, entryPoints);
|
|
56
|
+
const moduleList = await this.packageCode(archiver, entryPoints, i18nResourceBundle);
|
|
59
57
|
await this.packageDependencies(archiver);
|
|
60
58
|
return moduleList;
|
|
61
59
|
}
|
|
62
|
-
packageI18nResources(archiver, i18nResourceBundle) {
|
|
63
|
-
(0, cli_shared_1.listFilesInI18nResourceBundle)(i18nResourceBundle).forEach(([fileName, filePath]) => {
|
|
64
|
-
archiver.addFileFrom((0, path_2.join)(i18n_1.I18N_BUNDLE_FOLDER_NAME, fileName), filePath);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
60
|
async bundle(handlers, i18nResourceBundle, packageConfig) {
|
|
68
61
|
const archiver = this.archiverFactory();
|
|
69
|
-
const moduleList = await this.packageAll(archiver, handlers, packageConfig);
|
|
70
|
-
this.packageI18nResources(archiver, i18nResourceBundle);
|
|
62
|
+
const moduleList = await this.packageAll(archiver, handlers, packageConfig, i18nResourceBundle);
|
|
71
63
|
const archivePath = await archiver.finalise();
|
|
72
64
|
this.logger.debug(cli_shared_1.Text.deploy.taskPackage.archiveCreated(archivePath));
|
|
73
65
|
return { runtimeArchivePath: archivePath, moduleList };
|
|
@@ -84,8 +76,8 @@ class SandboxRuntimeBundler extends RuntimeBundler {
|
|
|
84
76
|
}
|
|
85
77
|
exports.SandboxRuntimeBundler = SandboxRuntimeBundler;
|
|
86
78
|
class NodeRuntimeBundler extends RuntimeBundler {
|
|
87
|
-
async packageAll(archiver, handlers, packageConfig) {
|
|
88
|
-
const moduleList = await super.packageAll(archiver, handlers, packageConfig);
|
|
79
|
+
async packageAll(archiver, handlers, packageConfig, i18nResourceBundle) {
|
|
80
|
+
const moduleList = await super.packageAll(archiver, handlers, packageConfig, i18nResourceBundle);
|
|
89
81
|
const files = await this.fileSystemReader.getFileGlobList(packageConfig?.extraFiles ?? []);
|
|
90
82
|
for (const fileName of files) {
|
|
91
83
|
archiver.addFileFrom(fileName, fileName);
|
|
@@ -16,7 +16,7 @@ function validateInstallationId(installationId) {
|
|
|
16
16
|
exports.validateInstallationId = validateInstallationId;
|
|
17
17
|
async function selectSingleInstallation(ui, installations, installationTablePrompt, installationTableOverview) {
|
|
18
18
|
const hasSecondaryInstallations = installations.some(({ secondaryProducts }) => secondaryProducts?.length);
|
|
19
|
-
const installationIndex = await ui.promptForSingleChoiceTable(installationTablePrompt, installationTableOverview, ['Environment', 'Site', hasSecondaryInstallations ? '
|
|
19
|
+
const installationIndex = await ui.promptForSingleChoiceTable(installationTablePrompt, installationTableOverview, ['Environment', 'Site', hasSecondaryInstallations ? 'Context(s)' : 'Context', 'Major Version'], installations.map(({ id, environmentKey, product, secondaryProducts, site, version }) => ({
|
|
20
20
|
names: [
|
|
21
21
|
(0, cli_shared_1.environmentToOption)(environmentKey),
|
|
22
22
|
site,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/cli",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.3.0-next.12",
|
|
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,16 +18,16 @@
|
|
|
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.12",
|
|
22
|
+
"@forge/cli-shared": "6.8.0-next.11",
|
|
23
23
|
"@forge/egress": "1.4.0",
|
|
24
|
-
"@forge/lint": "5.7.
|
|
25
|
-
"@forge/manifest": "8.
|
|
24
|
+
"@forge/lint": "5.7.3-next.12",
|
|
25
|
+
"@forge/manifest": "8.9.0-next.6",
|
|
26
26
|
"@forge/runtime": "5.10.7",
|
|
27
|
-
"@forge/tunnel": "5.10.
|
|
27
|
+
"@forge/tunnel": "5.10.1-next.12",
|
|
28
28
|
"@forge/util": "1.4.8",
|
|
29
29
|
"@sentry/node": "7.106.0",
|
|
30
|
-
"@forge/i18n": "0.0.
|
|
30
|
+
"@forge/i18n": "0.0.5-next.0",
|
|
31
31
|
"ajv": "^8.12.0",
|
|
32
32
|
"archiver": "^6.0.2",
|
|
33
33
|
"case": "^1.6.3",
|