@forge/cli 11.2.1-next.2-experimental-611b366 → 11.3.0-next.14-experimental-f55f6f2

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 CHANGED
@@ -1,20 +1,182 @@
1
1
  # @forge/cli
2
2
 
3
- ## 11.2.1-next.2-experimental-611b366
3
+ ## 11.3.0-next.14-experimental-f55f6f2
4
+
5
+ ### Minor Changes
6
+
7
+ - d156658: Switch the `forge create` flow to select product context first
4
8
 
5
9
  ### Patch Changes
6
10
 
11
+ - 7243788: Displaying all product options and fixing wording
7
12
  - 2cdac63: forge install should list all scopes
13
+ - 9d231e9: switch the `forge create` cross-context flow to use the new `app.contexts` manifest format
14
+ - 0aad197: Change product wording to context
8
15
  - 999a9d0: Update error messages for deployment
16
+ - 336f74f: Support serving i18n resources while using `forge tunnel`
17
+ - 210360b: Refactor text functions for easier read and maintenance
9
18
  - b4cee28: Fix uninstall message
19
+ - Updated dependencies [7243788]
20
+ - Updated dependencies [acf1edf]
10
21
  - Updated dependencies [2cdac63]
22
+ - Updated dependencies [c57e34a]
23
+ - Updated dependencies [9d231e9]
24
+ - Updated dependencies [0aad197]
11
25
  - Updated dependencies [999a9d0]
12
26
  - Updated dependencies [94e48b9]
13
- - @forge/cli-shared@6.7.1-next.2-experimental-611b366
14
- - @forge/manifest@8.9.0-next.0-experimental-611b366
15
- - @forge/bundler@4.21.1-next.2-experimental-611b366
16
- - @forge/lint@5.7.3-next.2-experimental-611b366
17
- - @forge/tunnel@5.10.1-next.2-experimental-611b366
27
+ - Updated dependencies [d156658]
28
+ - Updated dependencies [de0bf46]
29
+ - Updated dependencies [b503084]
30
+ - Updated dependencies [336f74f]
31
+ - Updated dependencies [210360b]
32
+ - Updated dependencies [a7db2e6]
33
+ - Updated dependencies [64daaa5]
34
+ - Updated dependencies [3a703de]
35
+ - Updated dependencies [003b1ed]
36
+ - @forge/cli-shared@6.8.0-next.13-experimental-f55f6f2
37
+ - @forge/manifest@8.9.0-next.7-experimental-f55f6f2
38
+ - @forge/bundler@4.21.1-next.14-experimental-f55f6f2
39
+ - @forge/tunnel@5.10.1-next.14-experimental-f55f6f2
40
+ - @forge/i18n@0.0.5-next.0-experimental-f55f6f2
41
+ - @forge/lint@5.7.3-next.14-experimental-f55f6f2
42
+
43
+ ## 11.3.0-next.14
44
+
45
+ ### Patch Changes
46
+
47
+ - Updated dependencies [c57e34a]
48
+ - @forge/cli-shared@6.8.0-next.13
49
+ - @forge/bundler@4.21.1-next.14
50
+ - @forge/lint@5.7.3-next.14
51
+ - @forge/tunnel@5.10.1-next.14
52
+
53
+ ## 11.3.0-next.13
54
+
55
+ ### Patch Changes
56
+
57
+ - 7243788: Displaying all product options and fixing wording
58
+ - Updated dependencies [7243788]
59
+ - @forge/cli-shared@6.8.0-next.12
60
+ - @forge/manifest@8.9.0-next.7
61
+ - @forge/bundler@4.21.1-next.13
62
+ - @forge/lint@5.7.3-next.13
63
+ - @forge/tunnel@5.10.1-next.13
64
+
65
+ ## 11.3.0-next.12
66
+
67
+ ### Patch Changes
68
+
69
+ - 336f74f: Support serving i18n resources while using `forge tunnel`
70
+ - Updated dependencies [336f74f]
71
+ - @forge/bundler@4.21.1-next.12
72
+ - @forge/cli-shared@6.8.0-next.11
73
+ - @forge/i18n@0.0.5-next.0
74
+ - @forge/tunnel@5.10.1-next.12
75
+ - @forge/lint@5.7.3-next.12
76
+ - @forge/manifest@8.9.0-next.6
77
+
78
+ ## 11.3.0-next.11
79
+
80
+ ### Patch Changes
81
+
82
+ - @forge/lint@5.7.3-next.11
83
+ - @forge/tunnel@5.10.1-next.11
84
+ - @forge/bundler@4.21.1-next.11
85
+
86
+ ## 11.3.0-next.10
87
+
88
+ ### Patch Changes
89
+
90
+ - Updated dependencies [de0bf46]
91
+ - @forge/manifest@8.9.0-next.5
92
+ - @forge/tunnel@5.10.1-next.10
93
+ - @forge/bundler@4.21.1-next.10
94
+ - @forge/cli-shared@6.8.0-next.10
95
+ - @forge/lint@5.7.3-next.10
96
+
97
+ ## 11.3.0-next.9
98
+
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies [acf1edf]
102
+ - Updated dependencies [3a703de]
103
+ - @forge/manifest@8.9.0-next.4
104
+ - @forge/bundler@4.21.1-next.9
105
+ - @forge/cli-shared@6.8.0-next.9
106
+ - @forge/lint@5.7.3-next.9
107
+ - @forge/tunnel@5.10.1-next.9
108
+
109
+ ## 11.3.0-next.8
110
+
111
+ ### Patch Changes
112
+
113
+ - 0aad197: Change product wording to context
114
+ - Updated dependencies [0aad197]
115
+ - @forge/cli-shared@6.8.0-next.8
116
+ - @forge/bundler@4.21.1-next.8
117
+ - @forge/lint@5.7.3-next.8
118
+ - @forge/tunnel@5.10.1-next.8
119
+
120
+ ## 11.3.0-next.7
121
+
122
+ ### Patch Changes
123
+
124
+ - 9d231e9: switch the `forge create` cross-context flow to use the new `app.contexts` manifest format
125
+ - Updated dependencies [9d231e9]
126
+ - Updated dependencies [b503084]
127
+ - @forge/cli-shared@6.8.0-next.7
128
+ - @forge/manifest@8.9.0-next.3
129
+ - @forge/bundler@4.21.1-next.7
130
+ - @forge/lint@5.7.3-next.7
131
+ - @forge/tunnel@5.10.1-next.7
132
+
133
+ ## 11.3.0-next.6
134
+
135
+ ### Patch Changes
136
+
137
+ - Updated dependencies [a7db2e6]
138
+ - Updated dependencies [003b1ed]
139
+ - @forge/cli-shared@6.8.0-next.6
140
+ - @forge/manifest@8.9.0-next.2
141
+ - @forge/bundler@4.21.1-next.6
142
+ - @forge/lint@5.7.3-next.6
143
+ - @forge/tunnel@5.10.1-next.6
144
+
145
+ ## 11.3.0-next.5
146
+
147
+ ### Patch Changes
148
+
149
+ - 210360b: Refactor text functions for easier read and maintenance
150
+ - Updated dependencies [210360b]
151
+ - @forge/cli-shared@6.8.0-next.5
152
+ - @forge/bundler@4.21.1-next.5
153
+ - @forge/lint@5.7.3-next.5
154
+ - @forge/tunnel@5.10.1-next.5
155
+
156
+ ## 11.3.0-next.4
157
+
158
+ ### Patch Changes
159
+
160
+ - Updated dependencies [64daaa5]
161
+ - @forge/manifest@8.9.0-next.1
162
+ - @forge/bundler@4.21.1-next.4
163
+ - @forge/cli-shared@6.8.0-next.4
164
+ - @forge/lint@5.7.3-next.4
165
+ - @forge/tunnel@5.10.1-next.4
166
+
167
+ ## 11.3.0-next.3
168
+
169
+ ### Minor Changes
170
+
171
+ - d156658: Switch the `forge create` flow to select product context first
172
+
173
+ ### Patch Changes
174
+
175
+ - Updated dependencies [d156658]
176
+ - @forge/cli-shared@6.8.0-next.3
177
+ - @forge/bundler@4.21.1-next.3
178
+ - @forge/lint@5.7.3-next.3
179
+ - @forge/tunnel@5.10.1-next.3
18
180
 
19
181
  ## 11.2.1-next.2
20
182
 
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@forge/cli",
3
- "version": "11.2.1-next.2-experimental-611b366",
3
+ "version": "11.3.0-next.14-experimental-f55f6f2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@forge/cli",
9
- "version": "11.2.1-next.2-experimental-611b366",
9
+ "version": "11.3.0-next.14-experimental-f55f6f2",
10
10
  "hasInstallScript": true,
11
11
  "license": "SEE LICENSE IN LICENSE.txt",
12
12
  "dependencies": {
13
- "@forge/bundler": "4.21.1-next.2-experimental-611b366",
14
- "@forge/cli-shared": "6.7.1-next.2-experimental-611b366",
13
+ "@forge/bundler": "4.21.1-next.14-experimental-f55f6f2",
14
+ "@forge/cli-shared": "6.8.0-next.13-experimental-f55f6f2",
15
15
  "@forge/egress": "1.4.0",
16
- "@forge/i18n": "0.0.4",
17
- "@forge/lint": "5.7.3-next.2-experimental-611b366",
18
- "@forge/manifest": "8.9.0-next.0-experimental-611b366",
16
+ "@forge/i18n": "0.0.5-next.0-experimental-f55f6f2",
17
+ "@forge/lint": "5.7.3-next.14-experimental-f55f6f2",
18
+ "@forge/manifest": "8.9.0-next.7-experimental-f55f6f2",
19
19
  "@forge/runtime": "5.10.7",
20
- "@forge/tunnel": "5.10.1-next.2-experimental-611b366",
20
+ "@forge/tunnel": "5.10.1-next.14-experimental-f55f6f2",
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.1-next.2-experimental-611b366",
838
- "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.21.1-next.2-experimental-611b366.tgz",
839
- "integrity": "sha512-SUkcoi2LbSTgc11L+hcgKc3P3CMm93EYO4AFokfa2FIdYMXv6x5X8s4fPJPLm6t8vdC6Yfd4TLaR2+C60IGzpw==",
837
+ "version": "4.21.1-next.14-experimental-f55f6f2",
838
+ "resolved": "https://registry.npmjs.org/@forge/bundler/-/bundler-4.21.1-next.14-experimental-f55f6f2.tgz",
839
+ "integrity": "sha512-qbn4ohPKFv/8YGGfSFlc4G3bb4lbMdELHqTIaSbw1ucf7L3MU+6kSvXNZs6t2v4ES/bbfyimdUc3tnj0emUaGA==",
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.1.1",
849
+ "@forge/api": "5.2.0-next.0-experimental-f55f6f2",
850
850
  "@forge/babel-plugin-transform-ui": "1.1.21",
851
- "@forge/cli-shared": "6.7.1-next.2-experimental-611b366",
852
- "@forge/i18n": "0.0.4",
853
- "@forge/lint": "5.7.3-next.2-experimental-611b366",
854
- "@forge/manifest": "8.9.0-next.0-experimental-611b366",
851
+ "@forge/cli-shared": "6.8.0-next.13-experimental-f55f6f2",
852
+ "@forge/i18n": "0.0.5-next.0-experimental-f55f6f2",
853
+ "@forge/lint": "5.7.3-next.14-experimental-f55f6f2",
854
+ "@forge/manifest": "8.9.0-next.7-experimental-f55f6f2",
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.1.1",
895
- "resolved": "https://registry.npmjs.org/@forge/api/-/api-5.1.1.tgz",
896
- "integrity": "sha512-Ph3w6H404bg/DGBoqksUaxNt19f/cONrV1UNEhdMIISo/R8jVSaeimgcC8hNDbd8iYVJfRoDvzlKmjBGod1AAw==",
894
+ "version": "5.2.0-next.0-experimental-f55f6f2",
895
+ "resolved": "https://registry.npmjs.org/@forge/api/-/api-5.2.0-next.0-experimental-f55f6f2.tgz",
896
+ "integrity": "sha512-sq9SpEM50Z5n0Eaf0yT9t3C7Py8eD4k3R93t1HewKkzCztFYvnO26J60WvqLcIvbHcX10G2N9YzAz6NXRpGDcw==",
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-experimental-f55f6f2",
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.7.1-next.2-experimental-611b366",
923
- "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-6.7.1-next.2-experimental-611b366.tgz",
924
- "integrity": "sha512-wpRNnfYPJiQd+E5N0EQujpTOr8Ys9uCC6rtKi2pZ0KKMPgWD3GzUoOfV8dEWsIDnB9s8EpajCBHg7xRlBn0ekg==",
923
+ "version": "6.8.0-next.13-experimental-f55f6f2",
924
+ "resolved": "https://registry.npmjs.org/@forge/cli-shared/-/cli-shared-6.8.0-next.13-experimental-f55f6f2.tgz",
925
+ "integrity": "sha512-y2mPCQeEcs9Esu5bmTtBCM3HkX5/a820r3xp5EUmKNEqhzdx1esRNUDk8baOAzO8PtkV39mPO33VeQeHvyg3Mw==",
925
926
  "license": "SEE LICENSE IN LICENSE.txt",
926
927
  "dependencies": {
927
- "@forge/i18n": "0.0.4",
928
- "@forge/manifest": "8.9.0-next.0-experimental-611b366",
928
+ "@forge/i18n": "0.0.5-next.0-experimental-f55f6f2",
929
+ "@forge/manifest": "8.9.0-next.7-experimental-f55f6f2",
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.6.2-experimental-611b366",
962
- "resolved": "https://registry.npmjs.org/@forge/csp/-/csp-3.6.2-experimental-611b366.tgz",
963
- "integrity": "sha512-y73arlJF1Zd1V2CVsC0ELrjp5Cv94xSam4gRuvpcL0rlsweJRVG8WSNTqy/Mv0q6P7PM14tpbNhPf5v4yNcc6A==",
962
+ "version": "3.7.0-next.0-experimental-f55f6f2",
963
+ "resolved": "https://registry.npmjs.org/@forge/csp/-/csp-3.7.0-next.0-experimental-f55f6f2.tgz",
964
+ "integrity": "sha512-wVbRP3ck0sZ0frVnrlmONTA7PHYSMtzzbqglFoAC1oqTE7ehfqUY0jMYqzAWMe1gyLArb9zoyhcIQBK3kpnrfA==",
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.4",
981
- "resolved": "https://registry.npmjs.org/@forge/i18n/-/i18n-0.0.4.tgz",
982
- "integrity": "sha512-V1blbHd5DHtmDDyJmTFHik+NQe5cFoaDUP/u0Ox3SFf4J9XizQCMTzh37w/fr6N9fz/Xz/wQifQh6Ej8GaRjCA==",
981
+ "version": "0.0.5-next.0-experimental-f55f6f2",
982
+ "resolved": "https://registry.npmjs.org/@forge/i18n/-/i18n-0.0.5-next.0-experimental-f55f6f2.tgz",
983
+ "integrity": "sha512-vbSgKe5MrO2ogUrcn33ip31cuDftswKbL30peZagIUKGEXccjpR4Zn84AGUhvEfp/F++p+FhYnWD6g1mhiCTow==",
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.3-next.2-experimental-611b366",
990
- "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.7.3-next.2-experimental-611b366.tgz",
991
- "integrity": "sha512-O8Y3jBMIPAEQoy4LZNg2y8WnMUVMqF9p14jWkZkSxp3yYqxetAD1l1H2VdJS9ibw38ABFBiifOkfumSgIhi2SQ==",
990
+ "version": "5.7.3-next.14-experimental-f55f6f2",
991
+ "resolved": "https://registry.npmjs.org/@forge/lint/-/lint-5.7.3-next.14-experimental-f55f6f2.tgz",
992
+ "integrity": "sha512-eC2m+yiZdalLDGzQx+PCTV2mCDeomJ9cQ0MJtuJpUtCXdLb+SKJziEc30vUd/3XW3H/tb6at8h8vbohiB0agiA==",
992
993
  "license": "SEE LICENSE IN LICENSE.txt",
993
994
  "dependencies": {
994
- "@forge/cli-shared": "6.7.1-next.2-experimental-611b366",
995
- "@forge/csp": "3.6.2-experimental-611b366",
995
+ "@forge/cli-shared": "6.8.0-next.13-experimental-f55f6f2",
996
+ "@forge/csp": "3.7.0-next.0-experimental-f55f6f2",
996
997
  "@forge/egress": "1.4.0",
997
- "@forge/manifest": "8.9.0-next.0-experimental-611b366",
998
+ "@forge/manifest": "8.9.0-next.7-experimental-f55f6f2",
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.9.0-next.0-experimental-611b366",
1007
- "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-8.9.0-next.0-experimental-611b366.tgz",
1008
- "integrity": "sha512-8zgE3gs19EpHdlTt8/K9SN6+OtAWNr2xPsvur0vMCxs+TSqWcRURFFKF1+zxiJL16oKupPoLcpmcGy5Z2nnZXA==",
1007
+ "version": "8.9.0-next.7-experimental-f55f6f2",
1008
+ "resolved": "https://registry.npmjs.org/@forge/manifest/-/manifest-8.9.0-next.7-experimental-f55f6f2.tgz",
1009
+ "integrity": "sha512-duDFyqEgxHWOugItZWfUoHugubJXIS6Ccl5eYqE7C/zJpVspKR/TXg8855eQ9eIwCS+aBw6lfeDDxgKWob1JUg==",
1009
1010
  "license": "SEE LICENSE IN LICENSE.txt",
1010
1011
  "dependencies": {
1011
- "@forge/i18n": "0.0.4",
1012
+ "@forge/i18n": "0.0.5-next.0-experimental-f55f6f2",
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.1-next.2-experimental-611b366",
1040
- "resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.10.1-next.2-experimental-611b366.tgz",
1041
- "integrity": "sha512-pz3ZvOuFG8fuRtOR6/w0SNMJmPke/uC+8KjKGNBYylAQFggJjN0rAdinHHmFoJdC8pF58CCVkqZv0h7tY9OAeA==",
1040
+ "version": "5.10.1-next.14-experimental-f55f6f2",
1041
+ "resolved": "https://registry.npmjs.org/@forge/tunnel/-/tunnel-5.10.1-next.14-experimental-f55f6f2.tgz",
1042
+ "integrity": "sha512-vReLtHXnVsGZX09eMkKXFnE7bYDfkxRQpAqGPcpOilvifm/8u28V+vZu7Tb47AqbMTB/pkkq/W3J7vqkZ2pnuA==",
1042
1043
  "license": "SEE LICENSE IN LICENSE.txt",
1043
1044
  "dependencies": {
1044
- "@forge/bundler": "4.21.1-next.2-experimental-611b366",
1045
- "@forge/cli-shared": "6.7.1-next.2-experimental-611b366",
1046
- "@forge/csp": "3.6.2-experimental-611b366",
1045
+ "@forge/bundler": "4.21.1-next.14-experimental-f55f6f2",
1046
+ "@forge/cli-shared": "6.8.0-next.13-experimental-f55f6f2",
1047
+ "@forge/csp": "3.7.0-next.0-experimental-f55f6f2",
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 [product]', cli_shared_1.Text.optionProduct(supportedProductsService.getSupportedProducts()))
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 });
@@ -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,E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,EAAE,MAAM,iCAAiC,CAAC;AAKpE,eAAO,MAAM,eAAe,eAAsB,UAAU,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6YvE,CAAC;AAGF,aAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAC7D,oBAAY,YAAY,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC"}
@@ -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,EAAE,sBAAsB,EAAqB,aAAa,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG/G,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAuBtD,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKrD;AA4CD,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,GAC1B,OAAO,CAQT;AAED,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAW7E;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,oBAAoB,CACxC,EAAE,EAAE,aAAa,EACjB,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,MAAM,EACZ,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,2BAA2B,GACnD,OAAO,CAAC,sBAAsB,CAAC,CAuBjC;AAmJD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,QAGlD"}
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;AA0KD,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
- const PRODUCT_OPTIONS = [
17
- 'show-all',
18
- 'bitbucket',
19
- 'compass',
20
- 'confluence',
21
- 'jira',
22
- 'jira-service-management',
23
- 'teamwork-graph'
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
- .split('-')
29
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
30
- .join(' ');
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, type, ui) {
44
- if (type === TemplateCategory.SHOW_ALL) {
45
- return await ui.promptForList(cli_shared_1.Text.create.promptTemplate, filteredTemplates);
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
- const productList = PRODUCT_OPTIONS.filter((productName) => productName === 'show-all' ||
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
- template = await promptAndSelectTemplate(ui, createAppCommand, template, directory);
120
+ const selection = await promptAndSelectTemplate(ui, createAppCommand, template, directory);
121
+ template = selection.template;
85
122
  ui.emptyLine();
86
123
  directory = directory;
87
- const args = { name, template, directory };
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 type = await ui.promptForList(cli_shared_1.Text.create.promptCategory, Object.values(TemplateCategory));
128
- const filteredTemplates = filterTemplatesByCategory(templatesWithoutCsuik, type);
129
- template = await selectedTemplate(filteredTemplates, type, ui);
130
- template = modifyTemplateByCategory(template, type);
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
+ }, productOptions.length);
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 template;
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 ? 'Product(s)' : 'Product'],
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', 'Product'], options);
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
@@ -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,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAG9B,qBAAa,WAAW;IACV,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAAF,EAAE,EAAE,EAAE;IAEtB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC;IAIxF,mBAAmB,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;IAIzF,mBAAmB,CAAC,QAAQ,EAAE,MAAM,OAAO,CAAC,eAAe,EAAE,CAAC,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAI3F,8BAA8B,IAAI,OAAO,CAAC,CAAC,MAAM,cAAc,CAAC,EAAE,CAAC;IAmDzE,2BAA2B,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAMlG,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI;IAuE7D,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAI7C,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAMxG,kBAAkB,CAAC,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,EAAE,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IAMlG,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI;IAY7D,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI;IAI7C,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAMxG,kBAAkB,CAAC,QAAQ,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,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
- ], filteredData);
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: cli_shared_1.Text.version.list.details.deploymentDate(deploymentDateTime),
192
- egresses: cli_shared_1.Text.version.list.details.egresses(egresses),
193
- policies: cli_shared_1.Text.version.list.details.policies(policies),
194
- modules: cli_shared_1.Text.version.list.details.modules(modules)
248
+ deploymentDate: deploymentDateTime.toISOString(),
249
+ egresses: getPropertySummary(egresses),
250
+ policies: getPropertySummary(policies),
251
+ modules: getPropertySummary(modules)
195
252
  })));
196
253
  }
197
254
  }
@@ -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,EAEZ,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,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;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB;IACrD,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAJZ,eAAe,EAAE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;AAED,qBAAa,qBAAsB,SAAQ,cAAc;IAC1C,MAAM,CACjB,QAAQ,EAAE,OAAO,EAAE,EACnB,kBAAkB,EAAE,kBAAkB,EACtC,aAAa,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,GAC7B,OAAO,CAAC,mBAAmB,CAAC;CAMhC;AAED,qBAAa,kBAAmB,SAAQ,cAAc;cACpC,UAAU,CACxB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,OAAO,EAAE,EACnB,aAAa,EAAE,GAAG,CAAC,SAAS,CAAC,EAC7B,kBAAkB,EAAE,kBAAkB,GACrC,OAAO,CAAC,MAAM,EAAE,CAAC;CASrB"}
@@ -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 ? 'Product(s)' : 'Product', 'Major Version'], installations.map(({ id, environmentKey, product, secondaryProducts, site, version }) => ({
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.2.1-next.2-experimental-611b366",
3
+ "version": "11.3.0-next.14-experimental-f55f6f2",
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.1-next.2-experimental-611b366",
22
- "@forge/cli-shared": "6.7.1-next.2-experimental-611b366",
21
+ "@forge/bundler": "4.21.1-next.14-experimental-f55f6f2",
22
+ "@forge/cli-shared": "6.8.0-next.13-experimental-f55f6f2",
23
23
  "@forge/egress": "1.4.0",
24
- "@forge/lint": "5.7.3-next.2-experimental-611b366",
25
- "@forge/manifest": "8.9.0-next.0-experimental-611b366",
24
+ "@forge/lint": "5.7.3-next.14-experimental-f55f6f2",
25
+ "@forge/manifest": "8.9.0-next.7-experimental-f55f6f2",
26
26
  "@forge/runtime": "5.10.7",
27
- "@forge/tunnel": "5.10.1-next.2-experimental-611b366",
27
+ "@forge/tunnel": "5.10.1-next.14-experimental-f55f6f2",
28
28
  "@forge/util": "1.4.8",
29
29
  "@sentry/node": "7.106.0",
30
- "@forge/i18n": "0.0.4",
30
+ "@forge/i18n": "0.0.5-next.0-experimental-f55f6f2",
31
31
  "ajv": "^8.12.0",
32
32
  "archiver": "^6.0.2",
33
33
  "case": "^1.6.3",