@pega/custom-dx-components 23.1.11 → 23.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/README.md +3 -3
  2. package/SECURITY.md +10 -0
  3. package/package.json +1 -1
  4. package/src/constants.js +1 -0
  5. package/src/tasks/build-all/index.js +10 -25
  6. package/src/tasks/build-comp/index.js +1 -0
  7. package/src/tasks/bundle/builder/index.js +6 -3
  8. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.ts.mustache +35 -0
  9. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.tsx.mustache +23 -6
  10. package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +10 -47
  11. package/src/tasks/create/templates/Constellation/Field/Boolean/mock.ts.mustache +2 -1
  12. package/src/tasks/create/templates/Constellation/Field/Boolean/styles.ts.mustache +7 -14
  13. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js → src/tasks/create/templates/Constellation/Field/Date/DateFormatter.ts.mustache} +6 -6
  14. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.tsx.mustache +20 -0
  15. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js → src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache} +2 -2
  16. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +24 -6
  17. package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +18 -59
  18. package/src/tasks/create/templates/Constellation/Field/Date/mock.ts.mustache +2 -1
  19. package/src/tasks/create/templates/Constellation/Field/Date/styles.ts.mustache +7 -14
  20. package/src/tasks/create/templates/Constellation/Field/DateTime/{date-time.js.mustache → date-time.ts.mustache} +12 -12
  21. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.js → src/tasks/create/templates/Constellation/Field/DateTime/date-utils.ts.mustache} +27 -26
  22. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js → src/tasks/create/templates/Constellation/Field/DateTime/date.ts.mustache} +1 -0
  23. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +25 -7
  24. package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +12 -59
  25. package/src/tasks/create/templates/Constellation/Field/DateTime/mock.ts.mustache +2 -1
  26. package/src/tasks/create/templates/Constellation/Field/DateTime/styles.ts.mustache +7 -14
  27. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.tsx.mustache +25 -7
  28. package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +14 -67
  29. package/src/tasks/create/templates/Constellation/Field/Decimal/mock.ts.mustache +8 -1
  30. package/src/tasks/create/templates/Constellation/Field/Decimal/styles.ts.mustache +7 -14
  31. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.tsx.mustache +27 -7
  32. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +23 -75
  33. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.ts.mustache +9 -1
  34. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.ts.mustache +7 -14
  35. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.tsx.mustache +24 -7
  36. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +13 -54
  37. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.ts.mustache +8 -2
  38. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.ts.mustache +7 -14
  39. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.tsx.mustache +24 -7
  40. package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +23 -87
  41. package/src/tasks/create/templates/Constellation/Field/Integer/mock.ts.mustache +8 -2
  42. package/src/tasks/create/templates/Constellation/Field/Integer/styles.ts.mustache +7 -14
  43. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.tsx.mustache +24 -7
  44. package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +12 -60
  45. package/src/tasks/create/templates/Constellation/Field/Picklist/mock.ts.mustache +8 -1
  46. package/src/tasks/create/templates/Constellation/Field/Picklist/styles.ts.mustache +7 -14
  47. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.ts.mustache} +2 -1
  48. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.tsx.mustache +25 -7
  49. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/embed-utils.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.ts.mustache} +2 -1
  50. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +15 -76
  51. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/mock.ts.mustache +8 -1
  52. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/picklist-utils.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/picklist-utils.ts.mustache} +1 -0
  53. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-constants.js → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-constants.ts.mustache} +1 -1
  54. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{repeat-utils.js.mustache → repeat-utils.ts.mustache} +6 -12
  55. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/styles.ts.mustache +7 -14
  56. package/{tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/textformat-utils.jsx → src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.tsx.mustache} +30 -10
  57. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +1 -1
  58. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.tsx.mustache +26 -8
  59. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +11 -58
  60. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/mock.ts.mustache +9 -1
  61. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/styles.ts.mustache +7 -14
  62. package/src/tasks/create/templates/Constellation/Field/{Picklist-Autocomplete/textformat-utils.jsx.mustache → Picklist-RadioButtons/textformat-utils.tsx.mustache} +1 -0
  63. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.tsx.mustache +23 -6
  64. package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +4 -22
  65. package/src/tasks/create/templates/Constellation/Field/Text/mock.ts.mustache +8 -1
  66. package/src/tasks/create/templates/Constellation/Field/Text/styles.ts.mustache +7 -14
  67. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.tsx.mustache +24 -7
  68. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +9 -46
  69. package/src/tasks/create/templates/Constellation/Field/Text-Email/mock.ts.mustache +8 -1
  70. package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.ts.mustache +7 -14
  71. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.tsx.mustache +24 -7
  72. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +10 -50
  73. package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.ts.mustache +8 -1
  74. package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.ts.mustache +7 -14
  75. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.tsx.mustache +24 -7
  76. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +12 -48
  77. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.ts.mustache +8 -1
  78. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.ts.mustache +7 -14
  79. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.tsx.mustache +24 -7
  80. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +13 -52
  81. package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.ts.mustache +8 -1
  82. package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.ts.mustache +7 -14
  83. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.tsx.mustache +24 -7
  84. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +15 -71
  85. package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.ts.mustache +8 -1
  86. package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.ts.mustache +7 -14
  87. package/src/tasks/create/templates/Constellation/Field/Text-URL/{text-url.jsx.mustache → text-url.tsx.mustache} +4 -3
  88. package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.stories.tsx.mustache +23 -7
  89. package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +16 -52
  90. package/src/tasks/create/templates/Constellation/Field/TimeofDay/mock.ts.mustache +2 -1
  91. package/src/tasks/create/templates/Constellation/Field/TimeofDay/styles.ts.mustache +7 -14
  92. package/src/tasks/create/templates/Constellation/Field/{DateTime/date-utils.js.mustache → TimeofDay/time-of-day.ts.mustache} +24 -23
  93. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +17 -6
  94. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +4 -17
  95. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.ts.mustache +7 -14
  96. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +13 -4
  97. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +4 -18
  98. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.ts.mustache +7 -14
  99. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js → src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.ts.mustache} +15 -13
  100. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +14 -6
  101. package/src/tasks/create/templates/Constellation/Template/FORM/index.tsx.mustache +5 -13
  102. package/src/tasks/create/templates/Constellation/Template/FORM/styles.ts.mustache +7 -14
  103. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +14 -6
  104. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.tsx.mustache +4 -10
  105. package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.ts.mustache +7 -14
  106. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +11 -6
  107. package/src/tasks/create/templates/Constellation/Template/PAGE/index.tsx.mustache +5 -16
  108. package/src/tasks/create/templates/Constellation/Template/PAGE/styles.ts.mustache +7 -14
  109. package/{tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js → src/tasks/create/templates/Constellation/Template/PAGE/utils.ts.mustache} +28 -14
  110. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +11 -6
  111. package/src/tasks/create/templates/Constellation/Widget/CASE/index.tsx.mustache +3 -10
  112. package/src/tasks/create/templates/Constellation/Widget/CASE/styles.ts.mustache +7 -14
  113. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +14 -6
  114. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +4 -18
  115. package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.ts.mustache +7 -14
  116. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +3 -13
  117. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.tsx.mustache +4 -19
  118. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +11 -6
  119. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +24 -39
  120. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.ts.mustache +7 -14
  121. package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.tsx.mustache +11 -6
  122. package/src/tasks/create/templates/Launchpad/Widget/CASE/index.tsx.mustache +3 -9
  123. package/src/tasks/create/templates/Launchpad/Widget/CASE/styles.ts.mustache +7 -14
  124. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.tsx.mustache +1 -11
  125. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.tsx.mustache +33 -51
  126. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +11 -6
  127. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +22 -21
  128. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/styles.ts.mustache +7 -14
  129. package/src/tasks/delete-all/helper.js +37 -5
  130. package/src/tasks/init/template/.eslintignore +6 -0
  131. package/src/tasks/init/template/README.md +4 -4
  132. package/src/tasks/init/template/SECURITY.md +10 -0
  133. package/src/tasks/init/template/package.json.mustache +12 -14
  134. package/src/tasks/init/template/tasks.config.json +2 -1
  135. package/src/tasks/linter/index.js +7 -4
  136. package/src/tasks/list/helper.js +10 -0
  137. package/src/tasks/list/index.js +20 -3
  138. package/src/tasks/promote-webpack/index.js +6 -32
  139. package/src/tasks/publish/helper.js +1 -1
  140. package/src/tasks/publish/index.js +6 -4
  141. package/src/tasks/publish-all/helper.js +52 -40
  142. package/src/tasks/publish-all/index.js +16 -17
  143. package/src/tasks/revert-webpack/index.js +4 -23
  144. package/src/util.js +171 -66
  145. package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.tsx +23 -6
  146. package/tests/assets/components/create/Pega_DXIL_MyTestText/index.tsx +4 -22
  147. package/tests/assets/components/create/Pega_DXIL_MyTestText/mock.ts +8 -1
  148. package/tests/assets/components/create/Pega_DXIL_MyTestText/styles.ts +7 -14
  149. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
  150. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.tsx +23 -6
  151. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.tsx +10 -47
  152. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/mock.ts +2 -1
  153. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/styles.ts +7 -14
  154. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +11 -6
  155. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.tsx +3 -10
  156. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
  157. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.tsx +27 -7
  158. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.tsx +23 -75
  159. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/mock.ts +9 -1
  160. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/styles.ts +7 -14
  161. package/{src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
  162. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
  163. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyDate/date.js → Constellation/Pega_DXIL_MyDate/date.ts} +2 -2
  164. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +24 -6
  165. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.tsx +18 -59
  166. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/mock.ts +2 -1
  167. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/styles.ts +7 -14
  168. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MyDateTime/date-time.js → Constellation/Pega_DXIL_MyDateTime/date-time.ts} +12 -12
  169. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.ts +288 -0
  170. package/{src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.ts} +1 -0
  171. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +25 -7
  172. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.tsx +12 -59
  173. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/mock.ts +2 -1
  174. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/styles.ts +7 -14
  175. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.tsx +25 -7
  176. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.tsx +14 -67
  177. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/mock.ts +8 -1
  178. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/styles.ts +7 -14
  179. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +15 -4
  180. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.tsx +4 -17
  181. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.ts +7 -14
  182. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.tsx +24 -7
  183. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.tsx +9 -46
  184. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/mock.ts +8 -1
  185. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/styles.ts +7 -14
  186. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.tsx +14 -6
  187. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.tsx +5 -13
  188. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/styles.ts +7 -14
  189. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.tsx +24 -7
  190. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.tsx +23 -87
  191. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/mock.ts +8 -2
  192. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/styles.ts +7 -14
  193. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +11 -6
  194. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.tsx +5 -16
  195. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/styles.ts +7 -14
  196. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/{utils.js → utils.ts} +28 -14
  197. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +3 -13
  198. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.tsx +4 -19
  199. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +11 -6
  200. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +24 -39
  201. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
  202. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +14 -6
  203. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +4 -18
  204. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/styles.ts +7 -14
  205. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.tsx +24 -7
  206. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.tsx +12 -48
  207. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/mock.ts +8 -1
  208. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/styles.ts +7 -14
  209. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.tsx +24 -7
  210. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.tsx +13 -54
  211. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/mock.ts +8 -2
  212. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/styles.ts +7 -14
  213. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.tsx +24 -7
  214. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.tsx +13 -52
  215. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/mock.ts +8 -1
  216. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/styles.ts +7 -14
  217. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.tsx +24 -7
  218. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.tsx +12 -60
  219. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.ts +8 -1
  220. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/styles.ts +7 -14
  221. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.tsx +26 -8
  222. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.tsx +11 -58
  223. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/mock.ts +9 -1
  224. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/styles.ts +7 -14
  225. package/tests/assets/components/createAll/Constellation/{Pega_DXIL_MySearchbox/textformat-utils.jsx → Pega_DXIL_MyRadioButtons/textformat-utils.tsx} +1 -0
  226. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{date.js → date.ts} +2 -1
  227. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.stories.tsx +25 -7
  228. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{embed-utils.js → embed-utils.ts} +2 -1
  229. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +15 -76
  230. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/mock.ts +8 -1
  231. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/picklist-utils.js → Constellation/Pega_DXIL_MySearchbox/picklist-utils.ts} +1 -0
  232. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{repeat-constants.js → repeat-constants.ts} +1 -1
  233. package/tests/assets/components/createAll/{Launchpad/Pega_DXIL_MySearchbox/repeat-utils.js → Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts} +6 -12
  234. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/styles.ts +7 -14
  235. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/textformat-utils.tsx +181 -0
  236. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/utils.ts +1 -1
  237. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.tsx +23 -6
  238. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.tsx +4 -22
  239. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/mock.ts +8 -1
  240. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/styles.ts +7 -14
  241. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.tsx +24 -7
  242. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.tsx +10 -50
  243. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/mock.ts +8 -1
  244. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/styles.ts +7 -14
  245. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +23 -7
  246. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.tsx +16 -52
  247. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/mock.ts +2 -1
  248. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
  249. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/{time-of-day.js → time-of-day.ts} +24 -23
  250. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +13 -4
  251. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -18
  252. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
  253. package/{src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache → tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.ts} +15 -13
  254. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +14 -6
  255. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
  256. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
  257. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.tsx +24 -7
  258. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.tsx +15 -71
  259. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/mock.ts +8 -1
  260. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/styles.ts +7 -14
  261. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/{text-url.jsx → text-url.tsx} +4 -3
  262. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.ts +35 -0
  263. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.tsx +23 -6
  264. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.tsx +10 -47
  265. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/mock.ts +2 -1
  266. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/styles.ts +7 -14
  267. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.tsx +11 -6
  268. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.tsx +3 -9
  269. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/styles.ts +7 -14
  270. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.tsx +27 -7
  271. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.tsx +23 -75
  272. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/mock.ts +9 -1
  273. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/styles.ts +7 -14
  274. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDate/DateFormatter.js → Launchpad/Pega_DXIL_MyDate/DateFormatter.ts} +6 -6
  275. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.tsx +20 -0
  276. package/{src/tasks/create/templates/Constellation/Field/Date/date.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.ts} +2 -2
  277. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +24 -6
  278. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.tsx +18 -59
  279. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/mock.ts +2 -1
  280. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/styles.ts +7 -14
  281. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyDateTime/date-time.js → Launchpad/Pega_DXIL_MyDateTime/date-time.ts} +12 -12
  282. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.ts +288 -0
  283. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/{date.js → date.ts} +1 -0
  284. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +25 -7
  285. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.tsx +12 -59
  286. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/mock.ts +2 -1
  287. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/styles.ts +7 -14
  288. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.tsx +25 -7
  289. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.tsx +14 -67
  290. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/mock.ts +8 -1
  291. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/styles.ts +7 -14
  292. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +15 -4
  293. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.tsx +4 -17
  294. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.ts +7 -14
  295. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.tsx +24 -7
  296. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.tsx +9 -46
  297. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/mock.ts +8 -1
  298. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/styles.ts +7 -14
  299. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.tsx +14 -6
  300. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.tsx +5 -13
  301. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/styles.ts +7 -14
  302. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.tsx +24 -7
  303. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.tsx +23 -87
  304. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/mock.ts +8 -2
  305. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/styles.ts +7 -14
  306. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +11 -6
  307. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.tsx +5 -16
  308. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/styles.ts +7 -14
  309. package/{src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.ts} +28 -14
  310. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.tsx +1 -11
  311. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.tsx +33 -51
  312. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +11 -6
  313. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.tsx +22 -20
  314. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/styles.ts +7 -14
  315. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +14 -6
  316. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.tsx +4 -18
  317. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/styles.ts +7 -14
  318. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.tsx +24 -7
  319. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.tsx +12 -48
  320. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/mock.ts +8 -1
  321. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/styles.ts +7 -14
  322. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.tsx +24 -7
  323. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.tsx +13 -54
  324. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/mock.ts +8 -2
  325. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/styles.ts +7 -14
  326. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.tsx +24 -7
  327. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.tsx +13 -52
  328. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/mock.ts +8 -1
  329. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/styles.ts +7 -14
  330. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.tsx +24 -7
  331. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.tsx +12 -60
  332. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.ts +8 -1
  333. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/styles.ts +7 -14
  334. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.tsx +26 -8
  335. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.tsx +11 -58
  336. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/mock.ts +9 -1
  337. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/styles.ts +7 -14
  338. package/{src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.jsx.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/textformat-utils.tsx} +1 -0
  339. package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/date.ts} +2 -1
  340. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.stories.tsx +25 -7
  341. package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/embed-utils.ts} +2 -1
  342. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +15 -76
  343. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/mock.ts +8 -1
  344. package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/picklist-utils.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/picklist-utils.ts} +1 -0
  345. package/{src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-constants.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-constants.ts} +1 -1
  346. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MySearchbox/repeat-utils.js → Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts} +6 -12
  347. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/styles.ts +7 -14
  348. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/textformat-utils.tsx +181 -0
  349. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/utils.ts +1 -1
  350. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.tsx +23 -6
  351. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.tsx +4 -22
  352. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/mock.ts +8 -1
  353. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/styles.ts +7 -14
  354. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.tsx +24 -7
  355. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.tsx +10 -50
  356. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/mock.ts +8 -1
  357. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/styles.ts +7 -14
  358. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.tsx +23 -7
  359. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.tsx +16 -52
  360. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/mock.ts +2 -1
  361. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/styles.ts +7 -14
  362. package/{src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.js.mustache → tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.ts} +24 -23
  363. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +13 -4
  364. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.tsx +4 -18
  365. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.ts +7 -14
  366. package/tests/assets/components/createAll/{Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js → Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.ts} +15 -13
  367. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.tsx +14 -6
  368. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.tsx +4 -10
  369. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/styles.ts +7 -14
  370. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.tsx +24 -7
  371. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.tsx +15 -71
  372. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/mock.ts +8 -1
  373. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/styles.ts +7 -14
  374. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/{text-url.jsx → text-url.tsx} +4 -3
  375. package/tests/functional/localCreateAllListDeleteAll.test.js +10 -3
  376. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +0 -38
  377. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +0 -41
  378. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.js +0 -38
  379. package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
  380. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.js +0 -38
  381. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +0 -41
  382. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +0 -287
  383. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +0 -161
  384. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/textformat-utils.jsx +0 -161
  385. package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +0 -287
  386. /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{component-constants.js → component-constants.ts} +0 -0
  387. /package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/{format-constants.js.mustache → format-constants.ts.mustache} +0 -0
  388. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
  389. /package/tests/assets/components/createAll/Constellation/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
  390. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/{component-constants.js → component-constants.ts} +0 -0
  391. /package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MySearchbox/{format-constants.js → format-constants.ts} +0 -0
@@ -9,7 +9,8 @@ import inquirer from 'inquirer';
9
9
  import {
10
10
  convertIntoPascalCase,
11
11
  checkPathAccess,
12
- showVersion
12
+ showVersion,
13
+ updateUseWebPackPromotion
13
14
  } from '../../util.js';
14
15
 
15
16
  import {
@@ -22,8 +23,6 @@ import {
22
23
 
23
24
 
24
25
 
25
- let redirectFile = "";
26
-
27
26
  export const copyWebPack = async () => {
28
27
 
29
28
  // first check to see if already have the file
@@ -79,48 +78,23 @@ export const copyWebPack = async () => {
79
78
  }
80
79
 
81
80
 
82
-
83
-
84
-
81
+ console.log(chalk.bold.green(`Bundler now using ${newWebPackConfigDir}.`));
82
+ console.log(chalk.bold.green(`Utilize this file for webpack modifications.`));
85
83
 
86
84
  }
87
85
 
88
- redirectFile = newWebPackConfigDir;
89
-
90
-
91
-
92
- }
93
-
94
- export const updateBuilder = async () => {
95
-
96
- const builderIndexDir = fileURLToPath(new URL(BUILDER_INDEX_FILE_PATH, import.meta.url));
97
-
98
- let indexFileJS = fs.readFileSync(builderIndexDir, { encoding: 'utf8' });
99
86
 
100
- if (indexFileJS.length > 0) {
101
- // comment out original webpack reference
102
-
103
- // if not commented out, comment out
104
- if (indexFileJS.indexOf("// import configFactory from './webpack.config.js';") < 0) {
105
- indexFileJS = indexFileJS.replaceAll("import configFactory from './webpack.config.js';", "// import configFactory from './webpack.config.js';");
106
- }
107
87
 
108
- // uncomment out promoted webpack reference
109
- indexFileJS = indexFileJS.replaceAll("// import configFactory from '../../../../../../../webpack.config.js';", "import configFactory from '../../../../../../../webpack.config.js';");
110
88
 
111
- fs.writeFileSync(builderIndexDir, indexFileJS, { encoding: 'utf8' });
112
89
 
113
- console.log(chalk.bold.green(`Bundler now using ${redirectFile}.`));
114
- console.log(chalk.bold.green(`Utilize this file for webpack modifications.`));
115
- }
90
+ }
116
91
 
117
92
 
118
- }
119
93
 
120
94
  export default async options => {
121
95
  showVersion();
122
96
 
123
97
  await copyWebPack();
124
- await updateBuilder();
98
+ await updateUseWebPackPromotion(true);
125
99
 
126
100
  };
@@ -94,7 +94,7 @@ export const zipComponent = async componentKey => {
94
94
 
95
95
  const configContent = Buffer.from(fs.readFileSync(`${srcDirectory}/config.json`)).toString();
96
96
 
97
- fs.rmdir('dist', { recursive: true }, err => {
97
+ fs.rm('dist', { recursive: true }, err => {
98
98
  if (err) {
99
99
  throw err;
100
100
  }
@@ -9,7 +9,7 @@ import { getComponentDirectoryPath, showVersion } from '../../util.js';
9
9
 
10
10
  import { getPublishComponentQuestions, publishComponentToServer, zipComponent } from './helper.js';
11
11
 
12
- export default async (options) => {
12
+ export default async options => {
13
13
  showVersion();
14
14
 
15
15
  let componentKey;
@@ -19,13 +19,15 @@ export default async (options) => {
19
19
 
20
20
  let doFetch = true;
21
21
 
22
- if (options.params.length >= 8) {
22
+ if (options.params.length >= 7) {
23
23
  componentKey = options.params[3];
24
24
  const rulesetName = options.params[4];
25
25
  const rulesetVersion = options.params[5];
26
26
  const dBuild = options.params[6];
27
27
  devBuild = dBuild === 'Y' || dBuild === 'y' || dBuild === true || dBuild === 'true';
28
- doFetch = false;
28
+
29
+ // eslint-disable-next-line no-unneeded-ternary,no-nested-ternary
30
+ doFetch = options.params.length >= 7 ? (options.params[7] === 'noFetch' ? false : true) : true;
29
31
 
30
32
  content = { componentKey, rulesetName, rulesetVersion, devBuild };
31
33
  } else {
@@ -79,7 +81,7 @@ export default async (options) => {
79
81
  }
80
82
  );
81
83
 
82
- await tasks.run().catch((err) => {
84
+ await tasks.run().catch(err => {
83
85
  console.log(chalk.bold.red(err.toString()));
84
86
  });
85
87
  return true;
@@ -159,55 +159,67 @@ export const publishComponentToServer = async (data, doFetch) => {
159
159
  headers.Authorization = `${tokenType} ${accessToken}`;
160
160
  }
161
161
 
162
- fetch(url, {
162
+
163
+ const response = await fetch(url, {
163
164
  method: 'POST',
164
165
  agent: getHttpsAgent(defaultPegaConfig),
165
- headers,
166
+ headers: headers,
166
167
  body: JSON.stringify(apiBody)
167
- })
168
- .then(response => {
169
- status = response.status;
170
- return response.text();
171
- })
172
- .then(resp => {
173
- const respData = isLaunchpad ? resp : JSON.parse(resp);
174
- if (status === 401) {
175
- throw new Error(
176
- 'Error occurred in authentication. Please regenerate using authenticate'
177
- );
178
- // console.log(accessTokenUri, refreshToken);
179
- /* TODO - Handle refresh_token */
180
- } else if (status === 200 || status === 201) {
181
- console.log(
168
+ });
169
+
170
+ status = response.status;
171
+ if (!response.ok) {
172
+ if (status === 401) {
173
+ throw new Error(
174
+ 'Error occurred in authentication. Please regenerate using authenticate'
175
+ );
176
+ // console.log(accessTokenUri, refreshToken);
177
+ /* TODO - Handle refresh_token */
178
+ }
179
+ else if (status === 404){
180
+ throw new Error('404: Server resource not found');
181
+ }
182
+ else if (status === 405){
183
+ throw new Error('405: Server method not allowed');
184
+ }
185
+ else if (status === 408){
186
+ throw new Error('408: Server timed out');
187
+ }
188
+ else if (response.status === 403) {
189
+ throw new Error(
190
+ 'Error forbidden: User does not have privileges to Publish.'
191
+ );
192
+ }
193
+ }
194
+
195
+ try {
196
+ const respData = isLaunchpad ? await response.text() : await response.json();
197
+ console.log(
182
198
  chalk.bold.green(`Success : ${isLaunchpad ? respData : respData.message}`)
199
+ );
200
+
201
+ if (status === 500) {
202
+ status = 999;
203
+ throw new Error(respData.message);
204
+ }
205
+ }
206
+ catch (err) {
207
+ if (status === 500) {
208
+ throw new Error(
209
+ `Error occurred in authentication. Please regenerate using authenticate`
183
210
  );
184
- } else {
185
- throw new Error(`${respData.message}`);
186
- }
187
- })
188
- .catch(e => {
189
- if (e.code === 'ECONNREFUSED') {
190
- // eslint-disable-next-line prefer-promise-reject-errors
191
- Promise.reject(
192
- `${chalk.bold.red(
193
- 'Error occurred in authentication. Please regenerate using authenticate'
194
- )}`
195
- );
196
- } else if (status === 403) {
197
- // eslint-disable-next-line prefer-promise-reject-errors
198
- Promise.reject(
199
- `${chalk.bold.red('Error forbidden: User does not have privileges to Publish.')}`
200
- );
201
- } else {
202
- // eslint-disable-next-line prefer-promise-reject-errors
203
- Promise.reject(`${chalk.bold.red(e)}`);
204
- }
205
- });
211
+ }
212
+ else if (status === 999) {
213
+ throw new Error (err);
214
+ }
215
+ }
216
+
206
217
  } else {
207
218
  throw new Error(`Error occurred in authentication. Please regenerate using authenticate`);
208
219
  }
209
220
  } catch (err) {
210
- throw new Error(`Error occurred in authentication. Please regenerate using authenticate`);
221
+ // throw new Error(`Error occurred in authentication. Please regenerate using authenticate`);
222
+ throw new Error(err);
211
223
  }
212
224
  }
213
225
  };
@@ -16,8 +16,8 @@ import {
16
16
 
17
17
  export function getCustomTasks(componentKey, sourceMap, devBuild, content, options) {
18
18
  const sDevBuild = devBuild ? '(dev build)' : '';
19
- // eslint-disable-next-line no-unneeded-ternary
20
- const doFetch = options.params.length >= 7 ? false : true;
19
+ // eslint-disable no-unneeded-ternary,no-nested-ternary
20
+ const doFetch = options.params.length >= 7 ? (options.params[6] === 'noFetch' ? false : true) : true;
21
21
  return new Listr(
22
22
  [
23
23
  {
@@ -26,13 +26,6 @@ export function getCustomTasks(componentKey, sourceMap, devBuild, content, optio
26
26
  await validate(componentKey);
27
27
  }
28
28
  },
29
- {
30
- title: `Bundle Component ${sDevBuild}`,
31
- task: async () => {
32
- await bundleComponent(componentKey, sourceMap, devBuild);
33
- },
34
- skip: () => (options.skipBundle ? 'Skipped bundling component' : undefined)
35
- },
36
29
  {
37
30
  title: 'Lint component',
38
31
  task: async () => {
@@ -41,6 +34,13 @@ export function getCustomTasks(componentKey, sourceMap, devBuild, content, optio
41
34
  await lintComponent(targetDirectory);
42
35
  }
43
36
  },
37
+ {
38
+ title: `Bundle Component ${sDevBuild}`,
39
+ task: async () => {
40
+ await bundleComponent(componentKey, sourceMap, devBuild);
41
+ },
42
+ skip: () => (options.skipBundle ? 'Skipped bundling component' : undefined)
43
+ },
44
44
  {
45
45
  title: 'Zip Component',
46
46
  task: async () => {
@@ -55,9 +55,7 @@ export function getCustomTasks(componentKey, sourceMap, devBuild, content, optio
55
55
  }
56
56
  }
57
57
  ],
58
- {
59
- exitOnError: true
60
- }
58
+ { concurrent: false, exitOnError: true }
61
59
  );
62
60
  }
63
61
 
@@ -76,7 +74,7 @@ export default async options => {
76
74
  let devBuild;
77
75
  let content;
78
76
 
79
- if (options.params.length >= 7) {
77
+ if (options.params.length >= 6) {
80
78
  const rulesetName = options.params[3];
81
79
  const rulesetVersion = options.params[4];
82
80
  const dBuild = options.params[5];
@@ -94,16 +92,17 @@ export default async options => {
94
92
  }
95
93
 
96
94
  // eslint-disable-next-line no-shadow
97
- for (const componentKey of components) {
95
+ for await (const componentKey of components) {
98
96
  console.log(chalk.bold.green(`Publishing: ${componentKey}`));
99
97
 
100
98
  const myCustomTasks = getCustomTasks(componentKey, sourceMap, devBuild, content, options);
101
99
 
102
- // eslint-disable-next-line no-await-in-loop
103
- await myCustomTasks.run().catch(err => {
100
+ try {
101
+ await myCustomTasks.run();
102
+ } catch (err) {
104
103
  console.log(chalk.bold.red(err.toString()));
105
104
  process.exit(1);
106
- });
105
+ }
107
106
  }
108
107
 
109
108
  // once done, remove leftover directories
@@ -8,7 +8,8 @@ import { up } from 'inquirer/lib/utils/readline.js';
8
8
 
9
9
  import {
10
10
  convertIntoPascalCase,
11
- showVersion
11
+ showVersion,
12
+ updateUseWebPackPromotion
12
13
  } from '../../util.js';
13
14
  import {
14
15
  WEBPACK_CONFIG_JS_FILENAME,
@@ -33,37 +34,17 @@ export const renamePromotedWebPack = async () => {
33
34
  process.exit();
34
35
  }
35
36
 
37
+ console.log(chalk.bold.green("Bundler reverted to using internal webpack.config.js."));
36
38
  console.log(chalk.bold.green(`File ${promoteWebPackDir} marked as not used.`));
37
39
 
38
40
  }
39
41
 
40
- export const revertBuilder = async () => {
41
42
 
42
- const builderIndexDir = fileURLToPath(new URL(BUILDER_INDEX_FILE_PATH, import.meta.url));
43
-
44
- let indexFileJS = fs.readFileSync(builderIndexDir, { encoding: 'utf8' });
45
-
46
- if (indexFileJS.length > 0) {
47
- // uncomment out original webpack reference
48
- indexFileJS = indexFileJS.replaceAll("// import configFactory from './webpack.config.js';", "import configFactory from './webpack.config.js';");
49
-
50
- // comment out promoted webpack reference
51
- if (indexFileJS.indexOf("// import configFactory from '../../../../../../../webpack.config.js';") < 0) {
52
- indexFileJS = indexFileJS.replaceAll("import configFactory from '../../../../../../../webpack.config.js';", "// import configFactory from '../../../../../../../webpack.config.js';");
53
- }
54
-
55
- fs.writeFileSync(builderIndexDir, indexFileJS, { encoding: 'utf8' });
56
-
57
- console.log(chalk.bold.green(`Bundler reverted to using internal webpack.config.js.`));
58
- }
59
-
60
-
61
- }
62
43
 
63
44
  export default async options => {
64
45
  showVersion();
65
46
 
66
47
  await renamePromotedWebPack();
67
- await revertBuilder();
48
+ await updateUseWebPackPromotion(false);
68
49
 
69
50
  };
package/src/util.js CHANGED
@@ -19,24 +19,87 @@ import {
19
19
  OOTB_COMPONENT_SERVICE_REST_ENDPOINT,
20
20
  DELETE_COMPONENT_SERVICE_REST_ENDPOINT,
21
21
  LP_DELETE_COMPONENT_SERVICE_REST_ENDPOINT,
22
- OOTB_COMPONENTS
22
+ OOTB_COMPONENTS,
23
+ USE_PROMOTED_WEB_PACK
23
24
  } from './constants.js';
24
25
 
25
26
  const access = promisify(fs.access);
26
27
 
27
- export const checkPathAccess = async (path, options = {}) => {
28
+ export const checkPathAccess = async (path, options = {}, throwError = false) => {
28
29
  const { errorMessage } = options;
29
30
 
30
31
  try {
31
32
  await access(path, fs.constants.R_OK);
32
33
  } catch (err) {
33
- const message =
34
- errorMessage || `${chalk.red.bold('ERROR')} Could not able to access path - ${path}`;
35
- console.error(message);
36
- process.exit(1);
34
+ if (throwError) {
35
+ throw new Error(err);
36
+ }
37
+ else {
38
+ const message =
39
+ errorMessage || `${chalk.red.bold('ERROR')} Could not able to access path - ${path}`;
40
+ console.error(message);
41
+ process.exit(1);
42
+ }
43
+
37
44
  }
38
45
  };
39
46
 
47
+ export const getUseWebPackPromotion = async () => {
48
+ const currentDirectory = process.cwd();
49
+ const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
50
+
51
+ try {
52
+ // force to throw error and not console log
53
+ await checkPathAccess(pegaConfigJsonPath, {}, true);
54
+ }
55
+ catch (ex) {
56
+ // when can't find it, always be false, assume no webpack override.
57
+ // This is IMPORTANT for init (npx install)
58
+ return false;
59
+ }
60
+
61
+ let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
62
+ data = JSON.parse(data);
63
+
64
+ if (!data[COMPONENTS_DIRECTORY_PATH]) {
65
+ console.error(
66
+ `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
67
+ );
68
+ process.exit(1);
69
+ }
70
+
71
+ if (data[USE_PROMOTED_WEB_PACK] == null) {
72
+ // value doesn't exist in task config, so add it with default of false
73
+ data[USE_PROMOTED_WEB_PACK] = false;
74
+ await updateUseWebPackPromotion(false);
75
+ }
76
+
77
+ return data[USE_PROMOTED_WEB_PACK];
78
+
79
+ }
80
+
81
+ export const updateUseWebPackPromotion = async ( useValue = false ) => {
82
+ const currentDirectory = process.cwd();
83
+ const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
84
+
85
+ await checkPathAccess(pegaConfigJsonPath);
86
+
87
+ let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
88
+ data = JSON.parse(data);
89
+
90
+ if (!data[COMPONENTS_DIRECTORY_PATH]) {
91
+ console.error(
92
+ `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
93
+ );
94
+ process.exit(1);
95
+ }
96
+
97
+ data["usePromotedWebPack"] = useValue;
98
+
99
+ fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(data, null, 4), { encoding: 'utf8' });
100
+
101
+ }
102
+
40
103
  export const deleteLocalComponent = async componentKey => {
41
104
  const currentDirectory = process.cwd();
42
105
  const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
@@ -360,46 +423,68 @@ export const deleteInfinityServerComponent = async componentKey => {
360
423
 
361
424
  if (OauthData) {
362
425
  const { access_token: accessToken, token_type: tokenType } = JSON.parse(OauthData);
363
- fetch(deleteUrl, {
426
+
427
+ const response = await fetch(deleteUrl, {
364
428
  method: 'DELETE',
365
429
  agent: getHttpsAgent(serverConfig),
366
430
  headers: {
367
431
  Authorization: `${tokenType} ${accessToken}`
368
432
  }
369
- })
370
- .then(response => {
371
- status = response.status;
372
- return response.text();
373
- })
374
- .then(resp => {
375
- let respData;
376
- try {
377
- respData = JSON.parse(resp);
378
- } catch (e) {
379
- console.log(chalk.bold.redBright(`Failure : ${resp}`));
380
- process.exit(1);
381
- }
433
+ });
434
+
435
+ status = response.status;
436
+ if (!response.ok) {
437
+ if (status === 401) {
438
+ throw new Error(
439
+ 'Error occurred in authentication. Please regenerate using authenticate'
440
+ );
441
+ // console.log(accessTokenUri, refreshToken);
442
+ /* TODO - Handle refresh_token */
443
+ }
444
+ else if (status === 404){
445
+ throw new Error('404: Server resource not found');
446
+ }
447
+ else if (status === 405){
448
+ throw new Error('405: Server method not allowed');
449
+ }
450
+ else if (status === 408){
451
+ throw new Error('408: Server timed out');
452
+ }
453
+ else if (response.status === 403) {
454
+ throw new Error(
455
+ 'Error forbidden: User does not have privileges to Publish.'
456
+ );
457
+ }
382
458
 
383
- if (status === 200) {
384
- console.log(chalk.bold.green(`Success : ${respData.message}`));
385
- } else {
386
- throw new Error(`${respData.message}`);
387
- }
388
- })
389
- .catch(e => {
390
- if (status === 403) {
391
- // eslint-disable-next-line prefer-promise-reject-errors
392
- Promise.reject(
393
- `${chalk.bold.red('Error forbidden: User does not have privileges to Delete.')}`
459
+
460
+ }
461
+
462
+ try {
463
+ const respData = await response.json();
464
+ console.log(
465
+ chalk.bold.green(`Success : ${respData.message}`)
466
+ );
467
+
468
+ if (status === 500) {
469
+ status = 999;
470
+ throw new Error(respData.message);
471
+ }
472
+ }
473
+ catch (err) {
474
+ if (status === 500) {
475
+ throw new Error(
476
+ `Error occurred in authentication. Please regenerate using authenticate`
394
477
  );
395
- } else {
396
- // eslint-disable-next-line prefer-promise-reject-errors
397
- Promise.reject(`${chalk.bold.red(e)}`);
398
- }
399
- });
478
+ }
479
+ else if (status === 999) {
480
+ throw new Error (err);
481
+ }
482
+ }
483
+
400
484
  }
401
485
  } catch (error) {
402
- console.log(`\n${chalk.bold.red(error)}`);
486
+
487
+ throw new Error(error);
403
488
  }
404
489
  };
405
490
 
@@ -430,42 +515,62 @@ export const deleteLaunchpadServerComponent = async componentKey => {
430
515
  componentName
431
516
  };
432
517
 
433
- fetch(deleteUrl, {
518
+
519
+ const response = await fetch(deleteUrl, {
434
520
  method: 'DELETE',
435
521
  agent: new https.Agent({ rejectUnauthorized: false }),
436
522
  headers,
437
523
  body: JSON.stringify(apiBody)
438
- })
439
- .then(response => {
440
- status = response.status;
441
- return response.text();
442
- })
443
- .then(response => {
444
- if (status === 401) {
524
+ });
525
+
526
+ status = response.status;
527
+ if (!response.ok) {
528
+ if (status === 401) {
529
+ throw new Error(
530
+ 'Error occurred in authentication. Please regenerate using authenticate'
531
+ );
532
+ // console.log(accessTokenUri, refreshToken);
533
+ /* TODO - Handle refresh_token */
534
+ }
535
+ else if (status === 404){
536
+ throw new Error('404: Server resource not found');
537
+ }
538
+ else if (status === 405){
539
+ throw new Error('405: Server method not allowed');
540
+ }
541
+ else if (status === 408){
542
+ throw new Error('408: Server timed out');
543
+ }
544
+ else if (response.status === 403) {
545
+ throw new Error(
546
+ 'Error forbidden: User does not have privileges to Publish.'
547
+ );
548
+ }
549
+ }
550
+
551
+ try {
552
+ const respData = await response.text();
553
+ console.log(
554
+ chalk.bold.green(`Success : ${respData}`)
555
+ );
556
+
557
+ if (status === 500) {
558
+ status = 999;
559
+ throw new Error(respData.message);
560
+ }
561
+ }
562
+ catch (err) {
563
+ if (status === 500) {
445
564
  throw new Error(
446
- 'Error occurred in authentication. Please regenerate using authenticate'
447
- );
448
- // console.log(accessTokenUri, refreshToken);
449
- /* TODO - Handle refresh_token */
450
- } else if (status === 200 || status === 201) {
451
- console.log(chalk.bold.green(`Success : ${response}`));
452
- } else {
453
- throw new Error(`${response.message}`);
454
- }
455
- })
456
- .catch(e => {
457
- if (status === 403) {
458
- // eslint-disable-next-line prefer-promise-reject-errors
459
- Promise.reject(
460
- `${chalk.bold.red('Error forbidden: User does not have privileges to Delete.')}`
565
+ `Error occurred in authentication. Please regenerate using authenticate`
461
566
  );
462
- } else {
463
- // eslint-disable-next-line prefer-promise-reject-errors
464
- Promise.reject(`${chalk.bold.red(e)}`);
465
- }
466
- });
567
+ }
568
+ else if (status === 999) {
569
+ throw new Error (err);
570
+ }
571
+ }
467
572
  }
468
573
  } catch (error) {
469
- console.log(`\n${chalk.bold.red(error)}`);
574
+ throw new Error(error);
470
575
  }
471
576
  };