@pega/custom-dx-components 0.0.1 → 0.23.1

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.
Files changed (223) hide show
  1. package/.vscode/extensions.json +1 -1
  2. package/README.md +6 -189
  3. package/package.json +34 -32
  4. package/src/auth.js +608 -0
  5. package/src/cli.js +42 -0
  6. package/src/constants.js +122 -8
  7. package/src/tasks/authenticate/helper.js +91 -8
  8. package/src/tasks/authenticate/index.js +169 -49
  9. package/src/tasks/build/helper.js +122 -0
  10. package/src/tasks/build/index.js +54 -0
  11. package/src/tasks/build-all/helper.js +70 -0
  12. package/src/tasks/build-all/index.js +79 -0
  13. package/src/tasks/{publish/bundle → bundle}/builder/index.js +49 -5
  14. package/src/tasks/{publish/bundle → bundle}/builder/webpack.config.js +5 -3
  15. package/src/tasks/{publish/bundle → bundle}/index.js +2 -2
  16. package/src/tasks/create/index.js +87 -64
  17. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +38 -0
  18. package/src/tasks/create/templates/Constellation/Field/Boolean/boolean-format.js.mustache +26 -0
  19. package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +145 -0
  20. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.jsx.mustache +61 -0
  21. package/src/tasks/create/templates/Constellation/Field/Boolean/event-utils.js.mustache +18 -0
  22. package/src/tasks/create/templates/Constellation/Field/Boolean/index.jsx.mustache +170 -0
  23. package/src/tasks/create/templates/Constellation/Field/Boolean/mock.stories.js.mustache +21 -0
  24. package/src/tasks/create/templates/Constellation/Field/Boolean/styles.js.mustache +7 -0
  25. package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +61 -0
  26. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +41 -0
  27. package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +195 -0
  28. package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +439 -0
  29. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +73 -0
  30. package/src/tasks/create/templates/Constellation/Field/Date/index.jsx.mustache +256 -0
  31. package/src/tasks/create/templates/Constellation/Field/Date/mock.stories.js.mustache +23 -0
  32. package/src/tasks/create/templates/Constellation/Field/Date/styles.js.mustache +7 -0
  33. package/src/tasks/create/templates/Constellation/Field/Date/suggestions-handler.js +10 -0
  34. package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +256 -0
  35. package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +92 -0
  36. package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +287 -0
  37. package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +328 -0
  38. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +73 -0
  39. package/src/tasks/create/templates/Constellation/Field/DateTime/index.jsx.mustache +254 -0
  40. package/src/tasks/create/templates/Constellation/Field/DateTime/mock.stories.js.mustache +23 -0
  41. package/src/tasks/create/templates/Constellation/Field/DateTime/styles.js.mustache +7 -0
  42. package/src/tasks/create/templates/Constellation/Field/DateTime/suggestions-handler.js +10 -0
  43. package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +278 -0
  44. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +49 -0
  45. package/src/tasks/create/templates/Constellation/Field/Decimal/event-utils.js.mustache +18 -0
  46. package/src/tasks/create/templates/Constellation/Field/Decimal/index.jsx.mustache +273 -0
  47. package/src/tasks/create/templates/Constellation/Field/Decimal/mock.stories.js.mustache +21 -0
  48. package/src/tasks/create/templates/Constellation/Field/Decimal/styles.js.mustache +7 -0
  49. package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.js +10 -0
  50. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +291 -0
  51. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +53 -0
  52. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.js.mustache +18 -0
  53. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.jsx.mustache +299 -0
  54. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.stories.js.mustache +23 -0
  55. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.js.mustache +7 -0
  56. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/suggestions-handler.js +10 -0
  57. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +93 -0
  58. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +49 -0
  59. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.js.mustache +18 -0
  60. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache +281 -0
  61. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.stories.js.mustache +21 -0
  62. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.js.mustache +7 -0
  63. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/suggestions-handler.js +10 -0
  64. package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +347 -0
  65. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +49 -0
  66. package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.js.mustache +18 -0
  67. package/src/tasks/create/templates/Constellation/Field/Integer/index.jsx.mustache +336 -0
  68. package/src/tasks/create/templates/Constellation/Field/Integer/mock.stories.js.mustache +21 -0
  69. package/src/tasks/create/templates/Constellation/Field/Integer/styles.js.mustache +7 -0
  70. package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.js +10 -0
  71. package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +114 -0
  72. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +78 -0
  73. package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.js.mustache +18 -0
  74. package/src/tasks/create/templates/Constellation/Field/Picklist/index.jsx.mustache +351 -0
  75. package/src/tasks/create/templates/Constellation/Field/Picklist/mock.stories.js.mustache +67 -0
  76. package/src/tasks/create/templates/Constellation/Field/Picklist/styles.js.mustache +7 -0
  77. package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.js +10 -0
  78. package/src/tasks/create/{template → templates/Constellation/Field/Text}/config.json.mustache +14 -5
  79. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +51 -0
  80. package/src/tasks/create/{template → templates/Constellation/Field/Text}/index.jsx.mustache +5 -0
  81. package/src/tasks/create/templates/Constellation/Field/Text/mock.stories.js.mustache +13 -0
  82. package/src/tasks/create/templates/Constellation/Field/Text/styles.js.mustache +7 -0
  83. package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +111 -0
  84. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +48 -0
  85. package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.js.mustache +18 -0
  86. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.jsx.mustache +231 -0
  87. package/src/tasks/create/templates/Constellation/Field/Text-Email/mock.stories.js.mustache +22 -0
  88. package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.js.mustache +7 -0
  89. package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.js +10 -0
  90. package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.jsx +26 -0
  91. package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +111 -0
  92. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +48 -0
  93. package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.js.mustache +18 -0
  94. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.jsx.mustache +239 -0
  95. package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.stories.js.mustache +21 -0
  96. package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.js.mustache +7 -0
  97. package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.js +10 -0
  98. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +111 -0
  99. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +48 -0
  100. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.js.mustache +18 -0
  101. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.jsx.mustache +231 -0
  102. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.stories.js.mustache +20 -0
  103. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.js.mustache +7 -0
  104. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.js +10 -0
  105. package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +123 -0
  106. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +46 -0
  107. package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.js.mustache +18 -0
  108. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +267 -0
  109. package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.stories.js.mustache +37 -0
  110. package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.js.mustache +7 -0
  111. package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.js +10 -0
  112. package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +237 -0
  113. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +46 -0
  114. package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.js.mustache +18 -0
  115. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +232 -0
  116. package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.stories.js.mustache +22 -0
  117. package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.js.mustache +7 -0
  118. package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.js +10 -0
  119. package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache +173 -0
  120. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/config.json.mustache +185 -0
  121. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/demo.stories.jsx.mustache +57 -0
  122. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/index.jsx.mustache +213 -0
  123. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/mock.stories.js.mustache +20 -0
  124. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/styles.js.mustache +7 -0
  125. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/suggestions-handler.js +10 -0
  126. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/time-of-day.js.mustache +287 -0
  127. package/src/tasks/create/templates/Constellation/Template/DETAILS/OneColumnDetails.svg +22 -0
  128. package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.jsx.mustache +26 -0
  129. package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +35 -0
  130. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +132 -0
  131. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.jsx.mustache +86 -0
  132. package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.stories.js.mustache +189 -0
  133. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.js.mustache +7 -0
  134. package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +152 -0
  135. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.jsx.mustache +26 -0
  136. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/TwoColumnDetails.svg +28 -0
  137. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +42 -0
  138. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +136 -0
  139. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.jsx.mustache +86 -0
  140. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.stories.js.mustache +230 -0
  141. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.js.mustache +7 -0
  142. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +155 -0
  143. package/src/tasks/create/templates/Constellation/Template/FORM/DefaultForm.svg +29 -0
  144. package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +45 -0
  145. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +169 -0
  146. package/src/tasks/create/templates/Constellation/Template/FORM/index.jsx.mustache +45 -0
  147. package/src/tasks/create/templates/Constellation/Template/FORM/mock.stories.js.mustache +137 -0
  148. package/src/tasks/create/templates/Constellation/Template/FORM/styles.js.mustache +7 -0
  149. package/src/tasks/create/templates/Constellation/Template/FORM-region/TwoColumn.svg +38 -0
  150. package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +27 -0
  151. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +178 -0
  152. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.jsx.mustache +48 -0
  153. package/src/tasks/create/templates/Constellation/Template/FORM-region/mock.stories.js.mustache +143 -0
  154. package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.js.mustache +7 -0
  155. package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.jsx.mustache +35 -0
  156. package/src/tasks/create/templates/Constellation/Template/PAGE/OneColumnPage.svg +36 -0
  157. package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +32 -0
  158. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.jsx.mustache +102 -0
  159. package/src/tasks/create/templates/Constellation/Template/PAGE/index.jsx.mustache +70 -0
  160. package/src/tasks/create/templates/Constellation/Template/PAGE/localizations.json.mustache +4 -0
  161. package/src/tasks/create/templates/Constellation/Template/PAGE/mock.stories.js.mustache +94 -0
  162. package/src/tasks/create/templates/Constellation/Template/PAGE/styles.js.mustache +7 -0
  163. package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +229 -0
  164. package/src/tasks/create/templates/Constellation/Widget/CASE/OneColumnPage.svg +36 -0
  165. package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +23 -0
  166. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.jsx.mustache +78 -0
  167. package/src/tasks/create/templates/Constellation/Widget/CASE/index.jsx.mustache +76 -0
  168. package/src/tasks/create/templates/Constellation/Widget/CASE/mock.stories.js.mustache +390 -0
  169. package/src/tasks/create/{template → templates/Constellation/Widget/CASE}/styles.js.mustache +1 -1
  170. package/src/tasks/create/templates/Constellation/Widget/PAGE/OneColumnPage.svg +36 -0
  171. package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +59 -0
  172. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.jsx.mustache +30 -0
  173. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.jsx.mustache +48 -0
  174. package/src/tasks/create/templates/Constellation/Widget/PAGE/mock.stories.js.mustache +23 -0
  175. package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.js.mustache +7 -0
  176. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.jsx.mustache +75 -0
  177. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/OneColumnPage.svg +36 -0
  178. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.jsx.mustache +240 -0
  179. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +66 -0
  180. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.jsx.mustache +68 -0
  181. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.jsx.mustache +110 -0
  182. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.stories.js.mustache +51 -0
  183. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.js.mustache +7 -0
  184. package/src/tasks/create-all/index.js +398 -0
  185. package/src/tasks/delete/helper.js +6 -4
  186. package/src/tasks/delete/index.js +4 -0
  187. package/src/tasks/delete-all/helper.js +153 -0
  188. package/src/tasks/delete-all/index.js +49 -0
  189. package/src/tasks/generate-ai/aiPrompt.txt.mustache +121 -0
  190. package/src/tasks/generate-ai/helper.js +184 -0
  191. package/src/tasks/generate-ai/index.js +33 -0
  192. package/src/tasks/index.js +7 -0
  193. package/src/tasks/init/index.js +9 -3
  194. package/src/tasks/init/template/.eslintignore +8 -0
  195. package/src/tasks/init/template/.eslintrc.json +186 -5
  196. package/src/tasks/init/template/.vscode/extensions.json +1 -1
  197. package/src/tasks/init/template/README.md +80 -61
  198. package/src/tasks/init/template/keys/DX-ComponentDev.zip +0 -0
  199. package/src/tasks/init/template/keys/dxcb.crt +32 -0
  200. package/src/tasks/init/template/keys/dxcb.key +51 -0
  201. package/src/tasks/init/template/package.json.mustache +44 -21
  202. package/src/tasks/init/template/tasks.config.json +19 -5
  203. package/src/tasks/init/template/templateNPMRC.txt +8 -0
  204. package/src/tasks/linter/index.js +46 -0
  205. package/src/tasks/list/helper.js +19 -6
  206. package/src/tasks/list/index.js +4 -0
  207. package/src/tasks/publish/helper.js +13 -4
  208. package/src/tasks/publish/index.js +14 -1
  209. package/src/tasks/publish-all/helper.js +154 -0
  210. package/src/tasks/publish-all/index.js +95 -0
  211. package/src/tasks/rename/index.js +314 -0
  212. package/src/tasks/validator/index.js +291 -18
  213. package/src/util.js +247 -6
  214. package/src/tasks/create/template/demo.stories.jsx.mustache +0 -44
  215. package/src/tasks/init/template/src/components/MBTAList/MBTAList.stories.tsx +0 -10
  216. package/src/tasks/init/template/src/components/MBTAList/MBTAList.tsx +0 -122
  217. package/src/tasks/init/template/src/components/MBTAList/icons/accessible.icon.tsx +0 -14
  218. package/src/tasks/init/template/src/components/MBTAList/icons/bus.icon.tsx +0 -13
  219. package/src/tasks/init/template/src/components/MBTAList/icons/mbta.icon.tsx +0 -10
  220. package/src/tasks/init/template/src/components/MBTAList/icons/subway.icon.tsx +0 -14
  221. package/src/tasks/init/template/src/components/MBTAList/index.ts +0 -2
  222. /package/src/tasks/{publish/bundle → bundle}/builder/modules.js +0 -0
  223. /package/src/tasks/{publish/bundle → bundle}/builder/paths.js +0 -0
package/src/constants.js CHANGED
@@ -2,17 +2,93 @@
2
2
  export const TASKS_CONFIG_JSON_FILENAME = 'tasks.config.json';
3
3
  export const BUILD_CONFIG_JSON_FILENAME = 'build.config.json';
4
4
  export const COMPONENTS_DIRECTORY_PATH = 'components-directory-path';
5
+ export const COMPONENTS_PATH = 'component'
5
6
  export const TOKEN_PATH = 'node_modules/@pega/custom-dx-components/.access_token';
7
+ export const SERVICE_TOKEN_PATH = 'node_modules/@pega/custom-dx-components/.service_token';
6
8
  export const OOTB_COMPONENTS = 'node_modules/@pega/custom-dx-components/.ootb_components';
9
+ export const AI_PROMPT_FILENAME = 'aiPrompt.txt.mustache';
7
10
 
8
11
  /* REST end points */
9
12
  export const PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT = 'PRRestService/dev/v1/publish_component';
10
13
  export const LIST_COMPONENT_SERVICE_REST_ENDPOINT = 'PRRestService/dev/v1/list_component';
11
14
  export const OOTB_COMPONENT_SERVICE_REST_ENDPOINT = 'PRRestService/dev/v1/ootb_component';
12
15
  export const DELETE_COMPONENT_SERVICE_REST_ENDPOINT = 'PRRestService/dev/v1/delete_component';
13
- export const TOKEN_URL_V1 = 'PRRestService/oauth2/v1/token';
16
+ export const BOOTSTRAP_SERVICE_REST_ENDPOINT = "PRRestService/application/v2/data_views/D_pxBootstrapConfig";
17
+ export const SERVICES_AI_REST_ENDPOINT = 'generativeai';
18
+ export const INF_TOKEN_URL_V1 = 'PRRestService/oauth2/v1/token';
19
+ export const INF_AUTHORIZE_URL_V1 = 'PRRestService/oauth2/v1/authorize';
20
+ export const LP_TOKEN_URL = 'uas/oauth/token';
21
+ export const LP_AUTHORIZE_URL = 'uas/oauth/authorize';
22
+ export const LP_LIST_COMPONENT_SERVICE_REST_ENDPOINT = 'pegalaunchpad/c11n/v103/app/appstudiox/componentslist';
23
+
24
+
25
+
26
+ export const FIELD_PATH = '/field';
27
+ export const TEMPLATE_PATH = '/template';
28
+ export const WIDGET_PATH = '/widget';
29
+
30
+ export const COMPONENT_PREFIX_FIELD_PATH = "field/";
31
+ export const COMPONENT_PREFIX_TEMPLATE_PATH = "template/";
32
+ export const COMPONENT_PREFIX_WIDGET_PATH = "widget/";
33
+
34
+ export const CATEGORY_CONSTELLATION = "constellation";
35
+
36
+ export const AUTHENTICATE_SCHEMA = {
37
+ serverType: [
38
+ {
39
+ name: 'Infinity',
40
+ value: 'infinity'
41
+ },
42
+ {
43
+ name: 'Launchpad',
44
+ value: 'launchpad'
45
+ }
46
+ ],
47
+ grantType: [
48
+ {
49
+ name: 'Authorization code',
50
+ value: 'authCode'
51
+ },
52
+ {
53
+ name: 'Password credentials',
54
+ value: 'passwordCreds'
55
+ },
56
+ {
57
+ name: 'Client credentials',
58
+ value: 'clientCreds'
59
+ }
60
+ ]
61
+ };
14
62
 
15
63
  export const COMPONENT_SCHEMA = {
64
+ generationType: [
65
+ {
66
+ name: 'Constellation Design System',
67
+ value: 'CDS'
68
+ },
69
+ {
70
+ name: 'AI Generation',
71
+ value: 'AI'
72
+ }
73
+ ],
74
+ framework: [
75
+ {
76
+ name: 'Constellation',
77
+ value: 'Constellation'
78
+ },
79
+ {
80
+ name: 'SDK Angular',
81
+ value: 'SDK-Angular'
82
+ },
83
+ {
84
+ name: 'SDK React',
85
+ value: 'SDK-React'
86
+ },
87
+ {
88
+ name: 'SDK Web Components',
89
+ value: 'SDK-WebComponents'
90
+ }
91
+ ],
16
92
  type: [
17
93
  {
18
94
  name: 'Field',
@@ -33,21 +109,25 @@ export const COMPONENT_SCHEMA = {
33
109
  name: 'Text',
34
110
  value: 'Text'
35
111
  },
112
+ {
113
+ name: 'Text Input',
114
+ value: 'Text-Input'
115
+ },
36
116
  {
37
117
  name: 'Paragraph',
38
118
  value: 'Text-Paragraph'
39
119
  },
40
120
  {
41
121
  name: 'Email',
42
- value: 'Email'
122
+ value: 'Text-Email'
43
123
  },
44
124
  {
45
125
  name: 'Phone',
46
- value: 'Phone'
126
+ value: 'Text-Phone'
47
127
  },
48
128
  {
49
129
  name: 'URL',
50
- value: 'URL'
130
+ value: 'Text-URL'
51
131
  },
52
132
  {
53
133
  name: 'Integer',
@@ -78,15 +158,49 @@ export const COMPONENT_SCHEMA = {
78
158
  value: 'DateTime'
79
159
  },
80
160
  {
81
- name: 'TimeofDay',
82
- value: 'TimeofDay'
161
+ name: 'TimeOfDay',
162
+ value: 'TimeOfDay'
83
163
  },
84
164
  {
85
165
  name: 'Picklist',
86
166
  value: 'Picklist'
87
167
  }
88
168
  ],
89
- template: ['DETAILS', 'FORM', 'PAGE'],
90
- widget: ['PAGE', 'CASE']
169
+ template: [
170
+ {
171
+ name: 'DETAILS',
172
+ value: 'DETAILS'
173
+ },
174
+ {
175
+ name: 'DETAILS region',
176
+ value: 'DETAILS-region'
177
+ },
178
+ {
179
+ name: 'FORM',
180
+ value: 'FORM'
181
+ },
182
+ {
183
+ name: 'FORM region',
184
+ value: 'FORM-region'
185
+ },
186
+ {
187
+ name: 'PAGE',
188
+ value: 'PAGE'
189
+ }
190
+ ],
191
+ widget: [
192
+ {
193
+ name: 'CASE',
194
+ value: 'CASE'
195
+ },
196
+ {
197
+ name: 'PAGE',
198
+ value: 'PAGE'
199
+ },
200
+ {
201
+ name: 'PAGE & CASE',
202
+ value: ['PAGE', 'CASE']
203
+ }
204
+ ]
91
205
  }
92
206
  };
@@ -1,24 +1,98 @@
1
1
  /* eslint-disable import/prefer-default-export */
2
2
  import { getPegaServerConfig } from '../../util.js';
3
3
 
4
- export const getAuthQuestions = async () => {
5
- const defaultPegaConfig = await getPegaServerConfig();
4
+ import { AUTHENTICATE_SCHEMA } from '../../constants.js';
5
+
6
+ export const getAuthQuestions = async (dxcbConfig) => {
7
+ const defaultPegaConfig = dxcbConfig;
8
+ const aMustAsk = dxcbConfig['questions_askAlways'] ? dxcbConfig['questions_askAlways'].split(',') : [];
9
+ const aNeverAsk = dxcbConfig['questions_askNever'] ? dxcbConfig['questions_askNever'].split(',') : [];
10
+
11
+ const initAnswers = (answers) => {
12
+ // Setup default answers (if they are present and non-empty)
13
+ answers.serverType = defaultPegaConfig.serverType || "infinity";
14
+ answers.server = defaultPegaConfig.server || undefined;
15
+ answers.isolationId = defaultPegaConfig.isolationId || undefined;
16
+ answers.clientId = defaultPegaConfig.clientId || undefined;
17
+ answers.grantType = defaultPegaConfig.grantType || "authCode";
18
+ answers.clientSecret = defaultPegaConfig.clientSecret || undefined;
19
+ answers.user = defaultPegaConfig.user || undefined;
20
+ answers.password = defaultPegaConfig.password || undefined;
21
+ };
22
+
23
+ const fnStandardWhen = (prop, answers) => {
24
+ if (aNeverAsk.includes(prop)) {
25
+ return false;
26
+ }
27
+ return aMustAsk.includes(prop) || !answers[prop];
28
+ };
6
29
 
7
30
  return [
31
+ {
32
+ name: 'serverType',
33
+ type: 'rawlist',
34
+ message: 'Enter Pega server type',
35
+ default: answers => {
36
+ return defaultPegaConfig.serverType;
37
+ },
38
+ choices: AUTHENTICATE_SCHEMA.serverType,
39
+ validate: value => {
40
+ if (value.trim()) {
41
+ return true;
42
+ }
43
+ return 'Pega server type cannot be empty';
44
+ },
45
+ when: answers => {
46
+ initAnswers(answers);
47
+ return fnStandardWhen('serverType', answers);
48
+ }
49
+ },
8
50
  {
9
51
  name: 'server',
10
52
  message: 'Enter pega server url',
11
- default: defaultPegaConfig.server
53
+ default: defaultPegaConfig.server,
54
+ when: answers => {
55
+ return fnStandardWhen('server', answers);
56
+ }
57
+ },
58
+ {
59
+ name: 'isolationId',
60
+ message: 'Enter isolation id',
61
+ default: defaultPegaConfig.isolationId,
62
+ when: answers => {
63
+ return answers.serverType === "launchpad" && fnStandardWhen('isolationId', answers);
64
+ }
65
+ },
66
+ {
67
+ name: 'grantType',
68
+ type: 'rawlist',
69
+ message: 'Enter OAuth 2.0 grant type',
70
+ default: defaultPegaConfig.grantType,
71
+ choices: answers => {
72
+ return AUTHENTICATE_SCHEMA.grantType.filter(gt => !(answers.serverType === "launchpad" && gt.value === "passwordCreds"));
73
+ },
74
+ validate: value => {
75
+ if (value.trim()) {
76
+ return true;
77
+ }
78
+ return 'Grant type cannot be empty';
79
+ },
80
+ when: answers => {
81
+ return fnStandardWhen('grantType', answers);
82
+ }
12
83
  },
13
84
  {
14
85
  name: 'user',
15
86
  message: 'Enter user id',
16
87
  default: defaultPegaConfig.user,
17
- validate: value => {
18
- if (value.trim()) {
88
+ validate: (value, answers) => {
89
+ if (value.trim() || answers.grantType === "authCode") {
19
90
  return true;
20
91
  }
21
92
  return 'Username cannot be empty';
93
+ },
94
+ when: answers => {
95
+ return (answers.serverType === "infinity" && answers.grantType === "passwordCreds") && fnStandardWhen('user', answers);
22
96
  }
23
97
  },
24
98
  {
@@ -26,11 +100,14 @@ export const getAuthQuestions = async () => {
26
100
  type: 'password',
27
101
  message: 'Enter password',
28
102
  default: defaultPegaConfig.password,
29
- validate: value => {
30
- if (value.trim()) {
103
+ validate: (value, answers) => {
104
+ if (value.trim() || answers.grantType === "authCode") {
31
105
  return true;
32
106
  }
33
107
  return 'Password cannot be empty';
108
+ },
109
+ when: answers => {
110
+ return (answers.user && (answers.serverType === "infinity" && answers.grantType === "passwordCreds") && fnStandardWhen('password', answers));
34
111
  }
35
112
  },
36
113
  {
@@ -42,6 +119,9 @@ export const getAuthQuestions = async () => {
42
119
  return true;
43
120
  }
44
121
  return 'clientId cannot be empty';
122
+ },
123
+ when: answers => {
124
+ return fnStandardWhen('clientId', answers);
45
125
  }
46
126
  },
47
127
  {
@@ -49,11 +129,14 @@ export const getAuthQuestions = async () => {
49
129
  type: 'password',
50
130
  message: 'Enter clientSecret',
51
131
  default: defaultPegaConfig.clientSecret,
52
- validate: value => {
132
+ validate: (value, answers) => {
53
133
  if (value.trim()) {
54
134
  return true;
55
135
  }
56
136
  return 'clientSecret cannot be empty';
137
+ },
138
+ when: answers => {
139
+ return (answers.grantType !== "authCode" && fnStandardWhen('clientSecret', answers));
57
140
  }
58
141
  }
59
142
  ];
@@ -1,75 +1,195 @@
1
1
  import path from 'path';
2
- import fs from 'fs';
3
- import https from 'https';
2
+ import fs from 'node:fs';
4
3
 
5
4
  import chalk from 'chalk';
6
5
  import inquirer from 'inquirer';
7
- import fetch from 'node-fetch';
8
6
 
9
- import { checkPathAccess, getTokenUrl } from '../../util.js';
10
- import { TOKEN_PATH } from '../../constants.js';
7
+ import { checkPathAccess, showVersion, storeServicesToken } from '../../util.js';
8
+ import { TOKEN_PATH, INF_TOKEN_URL_V1, INF_AUTHORIZE_URL_V1, LP_TOKEN_URL, LP_AUTHORIZE_URL } from '../../constants.js';
11
9
 
12
10
  import { getAuthQuestions } from './helper.js';
11
+ import PegaAuth from '../../auth.js';
13
12
 
14
13
  export const TASKS_CONFIG_JSON_FILENAME = 'tasks.config.json';
15
14
 
16
15
  const pegaConfigJsonPath = path.join(path.resolve(), TASKS_CONFIG_JSON_FILENAME);
16
+ let server = null;
17
17
 
18
18
  const generateAccessToken = async config => {
19
- const formData = new URLSearchParams();
20
- formData.append('client_id', config.clientId);
21
- formData.append('client_secret', config.clientSecret);
22
- formData.append('username', config.user);
23
- formData.append('password', config.password);
24
- formData.append('grant_type', 'password');
25
-
26
- const accessTokenUri = await getTokenUrl(config.server);
27
- fetch(accessTokenUri, {
28
- agent: new https.Agent({ rejectUnauthorized: false }),
29
- method: 'POST',
30
- headers: { 'content-type': 'application/x-www-form-urlencoded' },
31
- body: formData.toString()
32
- })
33
- .then(response => response.json())
34
- .then(data => {
35
- if (data && data.errors) {
36
- const errMessages = data.errors;
37
- errMessages.forEach(msgArr => {
38
- throw new Error(`Failed with error - ${JSON.stringify(msgArr.message)}`);
39
- });
19
+
20
+ let authSuccess = false;
21
+ const { serverType, authService, isolationId, grantType, clientId, clientSecret, user, password } = config;
22
+ // Try to gracefully deal with missing trailing slashes for server (and later conditionally for redirectUri)
23
+ const server = config.server.endsWith('/') ? config.server : `${config.server}/`;
24
+
25
+ return new Promise((resolve, reject) => {
26
+ const sTokenUri = `${server}${serverType === 'infinity' ? INF_TOKEN_URL_V1 : LP_TOKEN_URL}`;
27
+ const sAuthorizeUri = `${server}${serverType === 'infinity' ? INF_AUTHORIZE_URL_V1 : LP_AUTHORIZE_URL}`;
28
+ // console.log(`grantType: ${config.grantType}`);
29
+ const browserAuthSuccessMarkup = `<div style="width: 300px; padding: 10px;">
30
+ <svg xmlns="http://www. w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 311 68" version="1.1">
31
+ <title>Logo</title>
32
+ <defs/>
33
+ <g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
34
+ <g id="Logo">
35
+ <g id="pega_logo_horizontal_positive_rgb">
36
+ <path d="M136.36,17.098 L136.173,17.009 C136.154,16.998 133.96,16.01 132.245,17.815 L132.026,18.046 L135.539,19.768 L136.36,17.098 Z M152.441,36.389 C152.441,36.389 150.91,39.13 150.224,40.143 C149.535,41.164 147.38,41.798 145.517,40.908 C144.665,40.503 136.694,35.854 133.644,36.12 C118.205,37.466 113.999,31.105 113.503,30.527 C113.005,29.949 112.077,30.218 112.74,31.355 C116.127,37.163 126.15,39.856 126.15,39.856 C128.771,46.172 129.085,50.597 129.085,50.597 C126.489,48.574 123.687,46.869 120.714,45.453 C112.768,40.121 100.329,33.518 83.207,29.379 C84.191,15.797 91.044,-3.837 123.092,0.806 C123.092,0.806 129.522,1.86 133.809,4.824 C133.809,4.824 132.779,5.904 131.425,7.256 C130.071,8.605 131.569,9.471 131.569,9.471 L138.338,14.792 C138.417,17.607 138.533,18.396 140.651,20.944 C142.769,23.487 151.004,32.112 152.081,33.266 C153.329,34.6 152.441,36.389 152.441,36.389 Z M78.633,9.915 C76.938,16.897 77.068,23.049 77.939,28.221 C76.33,27.901 74.697,27.594 73.014,27.32 C37.94,21.612 27.361,38.899 31.455,52.916 C19.86,57.274 8.963,62.263 0.214,67.162 C13.98,34.146 43.896,5.087 69.145,1.268 C77.389,0.181 79.708,5.529 78.633,9.915 L78.633,9.915 Z" id="Fill-1" fill="#1F2555"/>
37
+ <path d="M83.492,40.09 C97.157,39.01 110.054,40.381 120.713,45.453 C112.768,40.121 100.329,33.518 83.206,29.379 C82.864,34.111 83.23,38.107 83.492,40.09 Z M81.52,40.262 C66.209,41.723 48.105,46.663 31.455,52.916 C27.361,38.899 37.941,21.612 73.014,27.32 C74.697,27.594 76.33,27.901 77.938,28.221 C78.77,33.166 80.276,37.228 81.52,40.262 L81.52,40.262 Z" id="Fill-2" fill="#00A6A7"/>
38
+ <path d="M286.63,35.039 L291.379,23.446 L296.129,35.039 L286.63,35.039 Z M287.854,14 L272.536,50 L280.553,50 L283.819,41.985 L298.938,41.985 L302.204,50 L310.427,50 L295.108,14 L287.854,14 Z M188.647,26.704 C188.647,29.787 186.335,32.153 182.375,32.153 L176.1,32.153 L176.1,21.149 L182.219,21.149 C186.181,21.149 188.647,23.052 188.647,26.601 L188.647,26.704 Z M182.889,14 L168.18,14 L168.18,50 L176.1,50 L176.1,39.2 L182.115,39.2 C190.19,39.2 196.673,34.878 196.673,26.547 L196.673,26.444 C196.673,19.09 191.48,14 182.889,14 Z M239.764,18.02 C235.989,21.708 234.075,26.376 234.075,31.896 C234.075,37.421 235.953,42.054 239.663,45.675 C243.366,49.292 248.022,51.123 253.503,51.123 C259.992,51.123 265.064,49.159 268.587,45.284 L268.769,45.08 L268.769,28.556 L253.112,28.556 L253.112,35.244 L261.279,35.244 L261.279,41.993 C259.164,43.252 256.525,43.891 253.429,43.891 C250.221,43.891 247.454,42.792 245.203,40.62 C242.958,38.458 241.819,35.527 241.819,31.926 C241.819,28.322 242.992,25.379 245.304,23.18 C247.624,20.972 250.538,19.852 253.966,19.852 C255.769,19.852 257.366,20.074 258.711,20.512 C259.973,20.922 261.251,21.667 262.517,22.712 L266.897,17.183 C264.586,15.147 260.427,12.467 253.503,12.467 C248.162,12.467 243.539,14.336 239.764,18.02 Z M210.336,35.604 L225.842,35.604 L225.842,28.556 L210.336,28.556 L210.336,21.042 L229.623,21.042 L229.623,14 L202.466,14 L202.466,50 L229.879,50 L229.879,42.955 L210.336,42.955 L210.336,35.604 L210.336,35.604 Z" id="Fill-3" fill="#1F2555"/>
39
+ </g>
40
+ </g>
41
+ </g>
42
+ </svg>
43
+ </div>
44
+ <div style="font-size: 2em; font-family: Arial; padding: 10px">
45
+ Authentication is complete!!
46
+ </div>
47
+ <div style="font-size: 13m; font-family: Arial; padding: 10px">
48
+ This browser tab or window may be closed.
49
+ </div>
50
+ <div style="padding: 10px;">
51
+ </div>`;
52
+
53
+ const authCodeConfig = grantType === 'authCode' ? {
54
+ authorizeUri: sAuthorizeUri,
55
+ redirectUri: config.redirectUri.endsWith('/') ? config.redirectUri : `${config.redirectUri}/`,
56
+ cert: config.cert,
57
+ key: config.key,
58
+ winTitle: 'DX Component Dev',
59
+ winBodyHtml: browserAuthSuccessMarkup
60
+ } : {};
61
+
62
+ // Build auth config structure
63
+ const authConfig = {
64
+ serverType: serverType,
65
+ authService: authService,
66
+ grantType: grantType,
67
+ tokenUri: sTokenUri,
68
+ clientId: clientId,
69
+ clientSecret: clientSecret,
70
+ ignoreInvalidCerts: true,
71
+ ...authCodeConfig
72
+ };
73
+ if (serverType === 'infinity') {
74
+ if (grantType !== 'clientCreds' && user && password) {
75
+ authConfig.userIdentifier = user;
76
+ authConfig.password = Buffer.from(password).toString('base64');
40
77
  }
41
- if (data.token_type) {
42
- fs.writeFile(TOKEN_PATH, JSON.stringify(data), err => {
43
- if (err) {
44
- console.error(err);
78
+ }
79
+ if (serverType === 'launchpad') {
80
+ authConfig.isolationId = isolationId;
81
+ authConfig.noPKCE = true;
82
+ }
83
+
84
+ try {
85
+ const auth = new PegaAuth(authConfig);
86
+ if (grantType === 'authCode') {
87
+ console.log(`${chalk.green('Awaiting authorization to complete (Ctrl-C to exit). You may need to enter credentials within your default browser.')}`);
88
+ }
89
+ // console.log(`authConfig: ${JSON.stringify(authConfig)}`);
90
+
91
+ auth.login()
92
+ .then((token) => {
93
+ if (token?.token_type) {
94
+ fs.writeFile(TOKEN_PATH, JSON.stringify(token), err => {
95
+ if (err) {
96
+ console.error(err);
97
+ return reject(authSuccess);
98
+ }
99
+ console.log(`${chalk.bold.green('Authenticated successfully !!')}`);
100
+ authSuccess = true;
101
+ return resolve(authSuccess);
102
+ });
103
+ } else {
104
+ console.log(`${chalk.bold.red('Authentication failed:' + JSON.stringify(token.errors ? token.errors : token))}`);
105
+ return reject(authSuccess);
45
106
  }
46
- console.log(`${chalk.bold.green('Authenticated successfully !!')}`);
107
+ })
108
+ .catch((e) => {
109
+ console.log(`${chalk.bold.red('Authentication failed:' + e)}`);
110
+ return reject(authSuccess);
47
111
  });
48
- }
49
- })
50
- .catch(e => console.log(`${chalk.bold.red(e)}`));
112
+
113
+ } catch (e) {
114
+ console.log(`Authentication failed: Problem initializing OAuth library`);
115
+ return reject(authSuccess);
116
+ }
117
+
118
+ });
51
119
  };
52
120
 
53
121
  export default async options => {
122
+
123
+ let authOK = false;
124
+
125
+ showVersion();
126
+
54
127
  await checkPathAccess(pegaConfigJsonPath);
55
128
 
56
- let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
57
- data = data && JSON.parse(data);
129
+ let cfgData = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
130
+ let data = null;
131
+ if (cfgData) {
132
+ try {
133
+ data = JSON.parse(cfgData);
134
+ } catch (e) {
135
+ console.log(`${chalk.red('Invalid JSON within tasks.config.json')}`);
136
+ process.exit(1);
137
+ }
138
+ }
58
139
 
59
140
  const serverConfig = data['server-config'];
60
- const params = options.params;
141
+ const isPwdNonEmpty = serverConfig['password'] ? true : false;
61
142
 
62
- const questions = await getAuthQuestions(params);
143
+ // console.log(`serverConfig: ${JSON.stringify(serverConfig)}`);
144
+ const questions = await getAuthQuestions(serverConfig);
145
+ // console.log(`questions: ${JSON.stringify(questions)}`);
63
146
  const answers = await inquirer.prompt(questions);
64
- serverConfig.server = answers.server;
65
- serverConfig.user = answers.user;
66
- serverConfig.password = answers.password;
67
- serverConfig.clientId = answers.clientId;
68
- serverConfig.clientSecret = answers.clientSecret;
69
- await generateAccessToken(serverConfig);
70
-
71
- data = JSON.stringify(data, null, 2);
72
- fs.writeFile(pegaConfigJsonPath, data, err => {
73
- if (err) throw err;
74
- });
147
+ const aProps = ['serverType', 'server', 'isolationId', 'clientId', 'grantType', 'clientSecret', 'user', 'password'];
148
+ serverConfig.authService = serverConfig.authService || 'pega';
149
+ const isLaunchPad = answers.serverType === "launchpad";
150
+ let bWriteUpdate = false;
151
+ for (let i = 0; i < aProps.length; i += 1) {
152
+ const prop = aProps[i];
153
+ const configValue = serverConfig[prop];
154
+ const answerValue = answers[prop];
155
+ // Treat an empty serverConfig property value as same as an undefined answer response
156
+ if (configValue !== answerValue && !(configValue === '' && answerValue === undefined)) {
157
+ // console.log(`property ${prop} changed from ${configValue} to ${answerValue}`);
158
+ serverConfig[prop] = answerValue;
159
+ if (prop !== 'password' || isPwdNonEmpty) {
160
+ bWriteUpdate = true;
161
+ }
162
+ }
163
+ }
164
+
165
+ try {
166
+ // console.log(`serverConfig: ${JSON.stringify(serverConfig)}`);
167
+ authOK = await generateAccessToken(serverConfig);
168
+ } catch (e) {
169
+ console.log(`${chalk.bold.red('Authentication failed:' + JSON.stringify(e))}`);
170
+ }
171
+
172
+ if (authOK) {
173
+ await storeServicesToken();
174
+ }
175
+
176
+ if (authOK & bWriteUpdate) {
177
+ // Don't write password value (unless it already had a value)
178
+ if (!isPwdNonEmpty) {
179
+ serverConfig['password'] = '';
180
+ }
181
+ console.log(`${chalk.green('Writing updated config...')}`);
182
+ let updCfg = null;
183
+ try {
184
+ updCfg = JSON.stringify(data, null, 2);
185
+ // console.log(`updated config: ${updCfg}`);
186
+ fs.writeFileSync(pegaConfigJsonPath, updCfg, err => {
187
+ if (err) throw err;
188
+ });
189
+ } catch (e) {
190
+
191
+ }
192
+ }
193
+
194
+ process.exit(1);
75
195
  };