@pega/custom-dx-components 24.2.15 → 25.1.10-alpha-0.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 (466) hide show
  1. package/package.json +37 -35
  2. package/src/cli.js +6 -0
  3. package/src/constants.js +11 -3
  4. package/src/tasks/authenticate/index.js +5 -0
  5. package/src/tasks/build-all/index.js +20 -1
  6. package/src/tasks/build-jest-assets/index.js +7 -8
  7. package/src/tasks/build-lib/helper.js +39 -20
  8. package/src/tasks/build-lib/index.js +40 -18
  9. package/src/tasks/create/index.js +5 -1
  10. package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +26 -0
  11. package/src/tasks/create/templates/Constellation/Field/Boolean/create-nonce.ts.mustache +1 -0
  12. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.test.tsx.mustache +19 -0
  13. package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +26 -0
  14. package/src/tasks/create/templates/Constellation/Field/Date/create-nonce.ts.mustache +1 -0
  15. package/src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache +0 -24
  16. package/src/tasks/create/templates/Constellation/Field/Date/demo.test.tsx.mustache +52 -0
  17. package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +26 -0
  18. package/src/tasks/create/templates/Constellation/Field/DateTime/create-nonce.ts.mustache +1 -0
  19. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +1 -0
  20. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.test.tsx.mustache +72 -0
  21. package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +26 -0
  22. package/src/tasks/create/templates/Constellation/Field/Decimal/create-nonce.ts.mustache +1 -0
  23. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.test.tsx.mustache +21 -0
  24. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +26 -0
  25. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/create-nonce.ts.mustache +1 -0
  26. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.test.tsx.mustache +23 -0
  27. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +26 -0
  28. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/create-nonce.ts.mustache +1 -0
  29. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.test.tsx.mustache +18 -0
  30. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/config.json.mustache +1 -0
  31. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/create-nonce.ts.mustache +1 -0
  32. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/demo.test.tsx.mustache +27 -0
  33. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/localizations.json.mustache +10 -0
  34. package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +26 -0
  35. package/src/tasks/create/templates/Constellation/Field/Integer/create-nonce.ts.mustache +1 -0
  36. package/src/tasks/create/templates/Constellation/Field/Integer/demo.test.tsx.mustache +18 -0
  37. package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +26 -0
  38. package/src/tasks/create/templates/Constellation/Field/Picklist/create-nonce.ts.mustache +1 -0
  39. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.test.tsx.mustache +25 -0
  40. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/config.json.mustache +26 -0
  41. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/create-nonce.ts.mustache +1 -0
  42. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.test.tsx.mustache +33 -0
  43. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +7 -0
  44. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/localizations.json.mustache +5 -0
  45. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.ts.mustache +0 -4
  46. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/config.json.mustache +26 -0
  47. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/create-nonce.ts.mustache +1 -0
  48. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.test.tsx.mustache +29 -0
  49. package/src/tasks/create/templates/Constellation/Field/Text/config.json.mustache +1 -0
  50. package/src/tasks/create/templates/Constellation/Field/Text/create-nonce.ts.mustache +1 -0
  51. package/src/tasks/create/templates/Constellation/Field/Text/demo.test.tsx.mustache +19 -0
  52. package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +26 -0
  53. package/src/tasks/create/templates/Constellation/Field/Text-Email/create-nonce.ts.mustache +1 -0
  54. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.test.tsx.mustache +20 -0
  55. package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +26 -0
  56. package/src/tasks/create/templates/Constellation/Field/Text-Input/create-nonce.ts.mustache +1 -0
  57. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.test.tsx.mustache +20 -0
  58. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +26 -0
  59. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/create-nonce.ts.mustache +1 -0
  60. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.test.tsx.mustache +21 -0
  61. package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +26 -0
  62. package/src/tasks/create/templates/Constellation/Field/Text-Phone/create-nonce.ts.mustache +1 -0
  63. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.test.tsx.mustache +23 -0
  64. package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +26 -0
  65. package/src/tasks/create/templates/Constellation/Field/Text-URL/create-nonce.ts.mustache +1 -0
  66. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.test.tsx.mustache +20 -0
  67. package/src/tasks/create/templates/Constellation/Field/TimeofDay/config.json.mustache +26 -0
  68. package/src/tasks/create/templates/Constellation/Field/TimeofDay/create-nonce.ts.mustache +1 -0
  69. package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.test.tsx.mustache +33 -0
  70. package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +1 -0
  71. package/src/tasks/create/templates/Constellation/Template/DETAILS/create-nonce.ts.mustache +1 -0
  72. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +1 -0
  73. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.test.tsx.mustache +47 -0
  74. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +1 -0
  75. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/create-nonce.ts.mustache +1 -0
  76. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.test.tsx.mustache +58 -0
  77. package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +1 -0
  78. package/src/tasks/create/templates/Constellation/Template/FORM/create-nonce.ts.mustache +1 -0
  79. package/src/tasks/create/templates/Constellation/Template/FORM/demo.test.tsx.mustache +40 -0
  80. package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +1 -0
  81. package/src/tasks/create/templates/Constellation/Template/FORM-region/create-nonce.ts.mustache +1 -0
  82. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.test.tsx.mustache +56 -0
  83. package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +1 -0
  84. package/src/tasks/create/templates/Constellation/Template/PAGE/create-nonce.ts.mustache +1 -0
  85. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +4 -0
  86. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.test.tsx.mustache +24 -0
  87. package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +1 -0
  88. package/src/tasks/create/templates/Constellation/Widget/CASE/create-nonce.ts.mustache +1 -0
  89. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +1 -0
  90. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.test.tsx.mustache +28 -0
  91. package/src/tasks/create/templates/Constellation/Widget/CASE/localizations.json.mustache +8 -0
  92. package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +1 -0
  93. package/src/tasks/create/templates/Constellation/Widget/PAGE/create-nonce.ts.mustache +1 -0
  94. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +2 -0
  95. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.test.tsx.mustache +36 -0
  96. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +4 -1
  97. package/src/tasks/create/templates/Constellation/Widget/PAGE/localizations.json.mustache +10 -0
  98. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +1 -0
  99. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/create-nonce.ts.mustache +1 -0
  100. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +1 -0
  101. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.test.tsx.mustache +29 -0
  102. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/config.json.mustache +1 -0
  103. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/create-nonce.ts.mustache +1 -0
  104. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/demo.stories.tsx.mustache +1 -0
  105. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/demo.test.tsx.mustache +27 -0
  106. package/src/tasks/create/templates/Launchpad/Widget/CASE/config.json.mustache +1 -0
  107. package/src/tasks/create/templates/Launchpad/Widget/CASE/create-nonce.ts.mustache +1 -0
  108. package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.tsx.mustache +1 -0
  109. package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.test.tsx.mustache +28 -0
  110. package/src/tasks/create/templates/Launchpad/Widget/PAGE/config.json.mustache +1 -0
  111. package/src/tasks/create/templates/Launchpad/Widget/PAGE/create-nonce.ts.mustache +1 -0
  112. package/src/tasks/create/templates/Launchpad/Widget/PAGE/demo.stories.tsx.mustache +2 -0
  113. package/src/tasks/create/templates/Launchpad/Widget/PAGE/demo.test.tsx.mustache +36 -0
  114. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/config.json.mustache +1 -0
  115. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/create-nonce.ts.mustache +1 -0
  116. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +1 -0
  117. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.test.tsx.mustache +19 -0
  118. package/src/tasks/create-all/index.js +5 -1
  119. package/src/tasks/create-lib/helper.js +6 -2
  120. package/src/tasks/create-lib/index.js +18 -6
  121. package/src/tasks/create-version/helper.js +30 -0
  122. package/src/tasks/create-version/index.js +27 -8
  123. package/src/tasks/delete/helper.js +6 -2
  124. package/src/tasks/delete/index.js +5 -1
  125. package/src/tasks/delete-lib/helper.js +0 -1
  126. package/src/tasks/delete-lib/index.js +10 -11
  127. package/src/tasks/delete-pub/helper.js +142 -1
  128. package/src/tasks/delete-pub/index.js +75 -10
  129. package/src/tasks/delete-version/index.js +8 -2
  130. package/src/tasks/export-archive/helper.js +47 -3
  131. package/src/tasks/export-archive/index.js +70 -44
  132. package/src/tasks/import-archive/helper.js +249 -4
  133. package/src/tasks/import-archive/index.js +476 -40
  134. package/src/tasks/import-comp/helper.js +26 -3
  135. package/src/tasks/import-comp/index.js +78 -117
  136. package/src/tasks/index.js +1 -0
  137. package/src/tasks/init/template/.eslintrc.json +1 -1
  138. package/src/tasks/init/template/.storybook/{main.js → main.ts} +4 -3
  139. package/src/tasks/init/template/.storybook/manager.ts +6 -0
  140. package/src/tasks/init/template/.storybook/preview.tsx +4 -1
  141. package/src/tasks/init/template/.storybook/theme.js +1 -1
  142. package/src/tasks/init/template/babel.config.cjs +18 -9
  143. package/src/tasks/init/template/jest.config.cjs +29 -4
  144. package/src/tasks/init/template/package.json.mustache +54 -35
  145. package/src/tasks/init/template/setupFiles.ts +5 -0
  146. package/src/tasks/init/template/setupTests.ts +99 -0
  147. package/src/tasks/init/template/tasks.config.json +1 -1
  148. package/src/tasks/init/template/tsconfig.json +4 -1
  149. package/src/tasks/list/helper.js +21 -2
  150. package/src/tasks/list-lib/index.js +10 -1
  151. package/src/tasks/list-pub/helper.js +102 -1
  152. package/src/tasks/list-pub/index.js +108 -36
  153. package/src/tasks/move/index.js +1 -1
  154. package/src/tasks/promote-webpack/index.js +0 -3
  155. package/src/tasks/publish/helper.js +9 -7
  156. package/src/tasks/publish/index.js +85 -16
  157. package/src/tasks/publish-all/index.js +12 -1
  158. package/src/tasks/publish-archive/helper.js +58 -0
  159. package/src/tasks/publish-archive/index.js +238 -0
  160. package/src/tasks/publish-lib/index.js +277 -69
  161. package/src/tasks/rename/index.js +9 -1
  162. package/src/tasks/rename-lib/index.js +10 -1
  163. package/src/tasks/restore/index.js +84 -0
  164. package/src/tasks/set-perm/index.js +1 -2
  165. package/src/tasks/show-help/index.js +34 -13
  166. package/src/tasks/show-status/index.js +34 -11
  167. package/src/tasks/store/index.js +39 -18
  168. package/src/tasks/switch-lib/helper.js +0 -1
  169. package/src/tasks/switch-lib/index.js +13 -9
  170. package/src/tasks/switch-version/index.js +11 -6
  171. package/src/tasks/validator/index.js +1 -1
  172. package/src/util.js +468 -116
  173. package/tests/assets/library/components/create/Pega_DXIL_MyTestText/config.json +2 -1
  174. package/tests/assets/library/components/create/Pega_DXIL_MyTestText/demo.test.tsx +19 -0
  175. package/tests/assets/library/components/create/shared/create-nonce.ts +1 -0
  176. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +27 -1
  177. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.test.tsx +19 -0
  178. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +2 -1
  179. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +1 -0
  180. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.test.tsx +28 -0
  181. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/localizations.json +8 -0
  182. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +27 -1
  183. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.test.tsx +23 -0
  184. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +27 -1
  185. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/date.ts +0 -24
  186. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/demo.test.tsx +52 -0
  187. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +27 -1
  188. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +1 -0
  189. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.test.tsx +72 -0
  190. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +27 -1
  191. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.test.tsx +21 -0
  192. package/tests/assets/library/components/{create/shared → createAll/Constellation/Pega_DXIL_MyDetails}/Avatar.tsx +1 -1
  193. package/tests/assets/library/components/createAll/Constellation/{shared → Pega_DXIL_MyDetails}/Operator.tsx +1 -1
  194. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +2 -1
  195. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +2 -1
  196. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.test.tsx +47 -0
  197. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +27 -1
  198. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.test.tsx +20 -0
  199. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +2 -1
  200. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyForm/demo.test.tsx +40 -0
  201. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +2 -1
  202. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/demo.test.tsx +27 -0
  203. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/localizations.json +10 -0
  204. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +27 -1
  205. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.test.tsx +18 -0
  206. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +2 -1
  207. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +4 -0
  208. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/demo.test.tsx +24 -0
  209. package/tests/assets/library/components/createAll/Constellation/{shared → Pega_DXIL_MyPageCaseWidget}/Avatar.tsx +3 -4
  210. package/tests/assets/library/components/{create/shared → createAll/Constellation/Pega_DXIL_MyPageCaseWidget}/Operator.tsx +3 -3
  211. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +2 -1
  212. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +1 -0
  213. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.test.tsx +29 -0
  214. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +1 -1
  215. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +2 -1
  216. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +2 -0
  217. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.test.tsx +36 -0
  218. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +4 -1
  219. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/localizations.json +10 -0
  220. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +27 -1
  221. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.test.tsx +21 -0
  222. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +27 -1
  223. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.test.tsx +18 -0
  224. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +27 -1
  225. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.test.tsx +23 -0
  226. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +27 -1
  227. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.test.tsx +25 -0
  228. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +27 -1
  229. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/demo.test.tsx +29 -0
  230. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +27 -1
  231. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.test.tsx +33 -0
  232. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +7 -0
  233. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/localizations.json +5 -0
  234. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
  235. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyText/config.json +2 -1
  236. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyText/demo.test.tsx +19 -0
  237. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +27 -1
  238. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.test.tsx +20 -0
  239. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +27 -1
  240. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.test.tsx +33 -0
  241. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +76 -0
  242. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Operator.tsx +215 -0
  243. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +2 -1
  244. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +1 -1
  245. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.test.tsx +58 -0
  246. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +2 -1
  247. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.test.tsx +56 -0
  248. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +27 -1
  249. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyURL/demo.test.tsx +20 -0
  250. package/tests/assets/library/components/createAll/Constellation/shared/create-nonce.ts +1 -0
  251. package/tests/assets/original/components/create/Pega_DXIL_MyTestText/config.json +1 -0
  252. package/tests/assets/original/components/create/Pega_DXIL_MyTestText/create-nonce.ts +1 -0
  253. package/tests/assets/original/components/create/Pega_DXIL_MyTestText/demo.test.tsx +19 -0
  254. package/tests/assets/original/components/create/shared/PConnProps.d.ts +46 -0
  255. package/tests/assets/original/components/create/shared/create-nonce.ts +7 -0
  256. package/tests/assets/original/components/create/shared/suggestions-handler.ts +9 -0
  257. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +26 -0
  258. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/create-nonce.ts +1 -0
  259. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.test.tsx +19 -0
  260. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -0
  261. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/create-nonce.ts +1 -0
  262. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +1 -0
  263. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.test.tsx +28 -0
  264. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/localizations.json +8 -0
  265. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +26 -0
  266. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/create-nonce.ts +1 -0
  267. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.test.tsx +23 -0
  268. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +26 -0
  269. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/create-nonce.ts +1 -0
  270. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/date.ts +0 -24
  271. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/demo.test.tsx +52 -0
  272. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +26 -0
  273. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/create-nonce.ts +1 -0
  274. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +1 -0
  275. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.test.tsx +72 -0
  276. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +26 -0
  277. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/create-nonce.ts +1 -0
  278. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.test.tsx +21 -0
  279. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +1 -0
  280. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/create-nonce.ts +1 -0
  281. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +1 -0
  282. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.test.tsx +47 -0
  283. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +26 -0
  284. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/create-nonce.ts +1 -0
  285. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.test.tsx +20 -0
  286. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +1 -0
  287. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/create-nonce.ts +1 -0
  288. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/demo.test.tsx +40 -0
  289. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +1 -0
  290. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/create-nonce.ts +1 -0
  291. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/demo.test.tsx +27 -0
  292. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/localizations.json +10 -0
  293. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +26 -0
  294. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/create-nonce.ts +1 -0
  295. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.test.tsx +18 -0
  296. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +1 -0
  297. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/create-nonce.ts +1 -0
  298. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +4 -0
  299. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/demo.test.tsx +24 -0
  300. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
  301. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +1 -0
  302. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +1 -0
  303. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.test.tsx +29 -0
  304. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +1 -0
  305. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/create-nonce.ts +1 -0
  306. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +2 -0
  307. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.test.tsx +36 -0
  308. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +4 -1
  309. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/localizations.json +10 -0
  310. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +26 -0
  311. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/create-nonce.ts +1 -0
  312. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.test.tsx +21 -0
  313. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +26 -0
  314. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/create-nonce.ts +1 -0
  315. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.test.tsx +18 -0
  316. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +26 -0
  317. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/create-nonce.ts +1 -0
  318. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.test.tsx +23 -0
  319. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +26 -0
  320. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/create-nonce.ts +1 -0
  321. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.test.tsx +25 -0
  322. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +26 -0
  323. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/create-nonce.ts +1 -0
  324. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/demo.test.tsx +29 -0
  325. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +26 -0
  326. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/create-nonce.ts +1 -0
  327. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.test.tsx +33 -0
  328. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +7 -0
  329. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/localizations.json +5 -0
  330. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
  331. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/config.json +1 -0
  332. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/create-nonce.ts +1 -0
  333. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/demo.test.tsx +19 -0
  334. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +26 -0
  335. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/create-nonce.ts +1 -0
  336. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.test.tsx +20 -0
  337. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +26 -0
  338. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/create-nonce.ts +1 -0
  339. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.test.tsx +33 -0
  340. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
  341. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +1 -0
  342. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.test.tsx +58 -0
  343. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
  344. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +1 -0
  345. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.test.tsx +56 -0
  346. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +26 -0
  347. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/create-nonce.ts +1 -0
  348. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/demo.test.tsx +20 -0
  349. package/tests/assets/original/components/createAll/Constellation/shared/PConnProps.d.ts +46 -0
  350. package/tests/assets/original/components/createAll/Constellation/shared/create-nonce.ts +7 -0
  351. package/tests/assets/original/components/createAll/Constellation/shared/suggestions-handler.ts +9 -0
  352. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/config.json +26 -0
  353. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/create-nonce.ts +1 -0
  354. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.test.tsx +19 -0
  355. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/config.json +1 -0
  356. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/create-nonce.ts +1 -0
  357. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.tsx +1 -0
  358. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.test.tsx +28 -0
  359. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/config.json +26 -0
  360. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/create-nonce.ts +1 -0
  361. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.test.tsx +23 -0
  362. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +26 -0
  363. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/create-nonce.ts +1 -0
  364. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/date.ts +0 -24
  365. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.test.tsx +52 -0
  366. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/config.json +26 -0
  367. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/create-nonce.ts +1 -0
  368. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +1 -0
  369. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.test.tsx +72 -0
  370. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/config.json +26 -0
  371. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/create-nonce.ts +1 -0
  372. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.test.tsx +21 -0
  373. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/config.json +1 -0
  374. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/create-nonce.ts +1 -0
  375. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +1 -0
  376. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.test.tsx +47 -0
  377. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/config.json +26 -0
  378. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/create-nonce.ts +1 -0
  379. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.test.tsx +20 -0
  380. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/config.json +1 -0
  381. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/create-nonce.ts +1 -0
  382. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.test.tsx +40 -0
  383. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/config.json +1 -0
  384. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/create-nonce.ts +1 -0
  385. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +1 -0
  386. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/demo.test.tsx +27 -0
  387. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/config.json +26 -0
  388. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/create-nonce.ts +1 -0
  389. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.test.tsx +18 -0
  390. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/config.json +1 -0
  391. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/create-nonce.ts +1 -0
  392. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +4 -0
  393. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.test.tsx +24 -0
  394. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
  395. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +1 -0
  396. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +1 -0
  397. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.test.tsx +19 -0
  398. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/config.json +1 -0
  399. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/create-nonce.ts +1 -0
  400. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +2 -0
  401. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.test.tsx +36 -0
  402. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/config.json +26 -0
  403. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/create-nonce.ts +1 -0
  404. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.test.tsx +21 -0
  405. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/config.json +26 -0
  406. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/create-nonce.ts +1 -0
  407. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.test.tsx +18 -0
  408. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/config.json +26 -0
  409. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/create-nonce.ts +1 -0
  410. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.test.tsx +23 -0
  411. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/config.json +26 -0
  412. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/create-nonce.ts +1 -0
  413. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.test.tsx +25 -0
  414. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/config.json +26 -0
  415. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/create-nonce.ts +1 -0
  416. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/demo.test.tsx +29 -0
  417. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/config.json +26 -0
  418. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/create-nonce.ts +1 -0
  419. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.test.tsx +33 -0
  420. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +7 -0
  421. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/localizations.json +5 -0
  422. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
  423. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/config.json +1 -0
  424. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/create-nonce.ts +1 -0
  425. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/demo.test.tsx +19 -0
  426. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/config.json +26 -0
  427. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/create-nonce.ts +1 -0
  428. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.test.tsx +20 -0
  429. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/config.json +26 -0
  430. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/create-nonce.ts +1 -0
  431. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.test.tsx +33 -0
  432. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
  433. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +1 -0
  434. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.test.tsx +58 -0
  435. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
  436. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +1 -0
  437. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.test.tsx +56 -0
  438. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/config.json +26 -0
  439. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/create-nonce.ts +1 -0
  440. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.test.tsx +20 -0
  441. package/tests/assets/original/components/createAll/Launchpad/shared/PConnProps.d.ts +46 -0
  442. package/tests/assets/original/components/createAll/Launchpad/shared/create-nonce.ts +7 -0
  443. package/tests/assets/original/components/createAll/Launchpad/shared/suggestions-handler.ts +9 -0
  444. package/tests/functional/localCreateAllListDeleteAll.test.js +12 -8
  445. package/tests/functional/localCreateBuildAllDeleteAll.test.js +12 -8
  446. package/tests/functional/localCreateBuildDelete.test.js +12 -8
  447. package/tests/functional/localCreateListDelete.test.js +14 -9
  448. package/tests/functional/localCreatePublishAllDeleteAll.test.js +13 -9
  449. package/tests/functional/localCreatePublishDelete.test.js +12 -8
  450. package/tests/functional/localCreateRenameDelete.test.js +12 -8
  451. package/tests/functional/localLibCreateLibAlreadyDeleteLib.test.js +14 -14
  452. package/tests/functional/localLibCreateLibBuildLibDeleteLib.test.js +17 -17
  453. package/tests/functional/localLibCreateLibBuildLibListPubDeleteLib.test.js +20 -20
  454. package/tests/functional/localLibCreateLibDeleteLib.test.js +17 -17
  455. package/tests/functional/localLibCreateLibExportImportLib.test.js +27 -27
  456. package/tests/functional/localLibCreateLibExportLib.test.js +19 -19
  457. package/tests/functional/localLibCreateLibImportCompDeleteLib.test.js +14 -14
  458. package/tests/functional/localLibCreateLibListDeleteLib.test.js +22 -22
  459. package/tests/functional/localLibCreateLibListMoveDeleteLib.test.js +31 -31
  460. package/tests/functional/localLibCreateLibListSwitchDeleteLib.test.js +20 -20
  461. package/tests/functional/localLibCreateLibStatusDeleteLib.test.js +13 -29
  462. package/tests/functional/localLibCreateLibStoreRestoreDeleteLib.test.js +376 -0
  463. package/tests/functional/localLibCreateLibValidateDeleteLib.test.js +18 -18
  464. package/tests/functional/localLibCreateLibVersionDeleteLib.test.js +27 -27
  465. package/tests/functional/localPromoteRevertWP.test.js +9 -8
  466. package/tests/functional/localLibCreateLibPermDeleteLib.test.js +0 -144
package/src/util.js CHANGED
@@ -8,6 +8,7 @@ import { createRequire } from 'module';
8
8
  import {jwtDecode} from 'jwt-decode';
9
9
  import archiver from 'archiver';
10
10
  import {unarchive} from 'unarchive';
11
+ import ora from 'ora';
11
12
 
12
13
  import chalk from 'chalk';
13
14
  import mustache from 'mustache';
@@ -22,18 +23,22 @@ import {
22
23
  TASKS_CONFIG_JSON_FILENAME,
23
24
  INPUT_CONFIG_JSON_FILENAME,
24
25
  PACKAGE_JSON_FILENAME,
26
+ PACKAGE_LOCK_JSON_FILENAME,
25
27
  TOKEN_PATH,
26
28
  OOTB_COMPONENT_SERVICE_REST_ENDPOINT,
27
29
  DELETE_COMPONENT_SERVICE_REST_ENDPOINT,
28
30
  LP_DELETE_COMPONENT_SERVICE_REST_ENDPOINT,
31
+ DELETE_COMPONENT_LIBRARY_SERVICE_REST_ENDPOINT,
29
32
  OOTB_COMPONENTS,
30
33
  USE_PROMOTED_WEB_PACK,
31
34
  BOOTSTRAP_CONFIG,
32
35
  LIBRARY_BASED,
36
+ LIBRARY_BASED_CL,
33
37
  USE_INPUT_CONFIG,
34
38
  SHARED_DIRECTORY,
35
39
  SHOW_DEBUG,
36
40
  COMPONENTS_PATH,
41
+ COMPONENT_SCHEMA,
37
42
  ARCHIVES_PATH,
38
43
  BIN_ARCHIVES_PATH,
39
44
  TEMP_PATH,
@@ -43,6 +48,7 @@ import {
43
48
  } from './constants.js';
44
49
 
45
50
 
51
+
46
52
  const access = promisify(fs.access);
47
53
 
48
54
  let showDebug = false;
@@ -55,6 +61,7 @@ let addAboutData = true;
55
61
  let defaultConfigs = {
56
62
  serverType: "",
57
63
  isLibraryBased: false,
64
+ isLibraryBasedCL: false,
58
65
  devBuild: true,
59
66
  library: "",
60
67
  organization: "",
@@ -111,6 +118,7 @@ export const setUpDefaults = async () => {
111
118
  let retrievedConfigData = {
112
119
  serverType: "",
113
120
  isLibraryBased: false,
121
+ isLibraryBasedCL: false,
114
122
  devBuild: true,
115
123
  library: "",
116
124
  organization: "",
@@ -139,22 +147,30 @@ export const setUpDefaults = async () => {
139
147
  retrievedConfigData.importRelativePath = data[IMPORT_RELATIVE_PATH];
140
148
  }
141
149
 
142
-
143
150
  if (data[EXPORT_RELATIVE_PATH]) {
144
151
  retrievedConfigData.exportRelativePath = data[EXPORT_RELATIVE_PATH];
145
152
  }
146
153
 
147
- if (data[LIBRARY_BASED]) {
148
- retrievedConfigData.isLibraryBased = data[LIBRARY_BASED];
149
- }
150
-
151
154
  if (data[USE_INPUT_CONFIG]) {
152
155
  retrievedConfigData.useInputConfig = data[USE_INPUT_CONFIG];
153
156
  }
154
157
 
158
+ if (data[LIBRARY_BASED]) {
159
+ retrievedConfigData.isLibraryBased = data[LIBRARY_BASED];
160
+ }
161
+
155
162
  retrievedConfigData.library = data.component.library;
156
163
  retrievedConfigData.version = data.component.version;
157
164
 
165
+ if (data[LIBRARY_BASED_CL]) {
166
+ retrievedConfigData.isLibraryBasedCL = data[LIBRARY_BASED_CL];
167
+
168
+ // if this is true, then force librarybased to true, so it doesn't have to be set
169
+ if (retrievedConfigData.isLibraryBasedCL) {
170
+ retrievedConfigData.isLibraryBased = retrievedConfigData.isLibraryBasedCL;
171
+ }
172
+ }
173
+
158
174
 
159
175
  const { organization } = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8'));
160
176
  retrievedConfigData.organization = organization;
@@ -181,7 +197,6 @@ export const setUpDefaults = async () => {
181
197
  return JSON.parse(JSON.stringify(retrievedConfigData));
182
198
  }
183
199
 
184
-
185
200
  export const convertYNToBoolean = (inputYN) => {
186
201
  switch (inputYN) {
187
202
  case 'Y':
@@ -199,46 +214,45 @@ export const convertYNToBoolean = (inputYN) => {
199
214
  }
200
215
 
201
216
  export const getInputConfigForCommand = async (commandName) => {
202
- // retrievedConfigData
203
- const currentDirectory = process.cwd();
204
- const inputConfigJsonPath = join(currentDirectory, INPUT_CONFIG_JSON_FILENAME);
205
- const isLibraryBased = getLibraryBased();
217
+ // retrievedConfigData
218
+ const currentDirectory = process.cwd();
219
+ const inputConfigJsonPath = join(currentDirectory, INPUT_CONFIG_JSON_FILENAME);
220
+ const isLibraryBased = getLibraryBased();
206
221
 
207
- try {
208
- // force to throw error and not console log
209
- await checkPathAccess(inputConfigJsonPath, {}, true);
222
+ try {
223
+ // force to throw error and not console log
224
+ await checkPathAccess(inputConfigJsonPath, {}, true);
210
225
 
211
- let data = fs.readFileSync(inputConfigJsonPath, { encoding: 'utf8' });
212
- data = JSON.parse(data);
226
+ let data = fs.readFileSync(inputConfigJsonPath, { encoding: 'utf8' });
227
+ data = JSON.parse(data);
213
228
 
214
- if (isLibraryBased) {
215
- const libraryCommands = data["libraryMode"];
229
+ if (isLibraryBased) {
230
+ const libraryCommands = data["libraryMode"];
216
231
 
217
- if (libraryCommands[commandName]) {
218
- return libraryCommands[commandName];
232
+ if (libraryCommands[commandName]) {
233
+ return libraryCommands[commandName];
219
234
 
220
- }
221
235
  }
222
- else {
223
- const standardCommands = data["standard"];
224
-
225
- if (standardCommands[commandName]) {
226
- return standardCommands[commandName];
236
+ }
237
+ else {
238
+ const standardCommands = data["standard"];
227
239
 
228
- }
240
+ if (standardCommands[commandName]) {
241
+ return standardCommands[commandName];
229
242
 
230
243
  }
231
- }
232
- catch (ex) {
233
- // when can't find it, always be false, assume no library based.
234
- // This is IMPORTANT for init (npx install)
235
- return {};
236
- }
237
244
 
245
+ }
246
+ }
247
+ catch (ex) {
248
+ // when can't find it, always be false, assume no library based.
249
+ // This is IMPORTANT for init (npx install)
238
250
  return {};
251
+ }
239
252
 
240
- }
253
+ return {};
241
254
 
255
+ }
242
256
 
243
257
  // initialize
244
258
  // await setUpDefaults();
@@ -330,7 +344,7 @@ if (showDebug) addDebugLog("updateUseWebPackPromotion", "", "");
330
344
  }
331
345
 
332
346
  export const getAboutData = async (currentOrgLib, buildVersion, dateStamp) => {
333
- if (showDebug) addDebugLog("getAboutData", `currentOrgLib: ${currentOrgLib}, buildVersion: ${buildVersion}, dateStamp: ${dateStamp}`)
347
+ if (showDebug) addDebugLog("getAboutData", `currentOrgLib: ${currentOrgLib}, buildVersion: ${buildVersion}, dateStamp: ${dateStamp}`,"");
334
348
  const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
335
349
 
336
350
  if (tokenAndStaticServer.C11NB2S === undefined) {
@@ -345,8 +359,51 @@ if (showDebug) addDebugLog("getAboutData", `currentOrgLib: ${currentOrgLib}, bui
345
359
  return `${currentOrgLib} ${buildVersion}, ${dateStamp}, ${infinityVersion}`;
346
360
  }
347
361
 
362
+ export const applyPegaData = async (configJson) => {
363
+ if (showDebug) addDebugLog("applyPegaData", "", "");
364
+ const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
365
+ const currentDirectory = process.cwd()
366
+ // const currentPackagePath = join(currentDirectory, PACKAGE_JSON_FILENAME);
367
+ const currentPackageLockPath = join(currentDirectory, PACKAGE_LOCK_JSON_FILENAME);
368
+ // let currentPackageData;
369
+ let currentPackageLockData;
370
+
371
+ try {
372
+ currentPackageLockData = fs.readFileSync(currentPackageLockPath);
373
+ }
374
+ catch (ex) {
375
+ console.log(chalk.red(`\nUnable to retrieve current package-lock.json.`));
376
+ process.exit(1);
377
+ }
378
+
379
+ // const cData = JSON.parse(currentPackageData);
380
+ // const cosmosVersion = cData.dependencies["@pega/cosmos-react-core"];
381
+
382
+ const cData = JSON.parse(currentPackageLockData);
383
+ const cosmosReact = cData.packages["node_modules/@pega/cosmos-react-core"];
384
+ const cosmosVersion = cosmosReact.version;
385
+
386
+ let infinityVersion = "";
387
+
388
+ if (tokenAndStaticServer.C11NB2S === undefined) {
389
+ }
390
+ else {
391
+ const jwt = jwtDecode(tokenAndStaticServer.C11NB2S);
392
+ infinityVersion= jwt.infinity_version;
393
+ // don't remove "8." from infinity version so can do a comparison
394
+ }
395
+
396
+ // apply info to config.json
397
+ configJson.infinityVersion = infinityVersion;
398
+ configJson.packageCosmosVersion = cosmosVersion;
399
+
400
+
401
+ }
402
+
348
403
  export const checkJWTExpiration = async () => {
349
404
  const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
405
+ const isLibraryBased = getLibraryBased();
406
+ const isLibraryBasedCL = getLibraryBasedCL();
350
407
 
351
408
  if (tokenAndStaticServer.C11NB2S === undefined) {
352
409
  console.log(chalk.redBright("Need to authenticate, missing services token.\nBuilding a library requires authentication to acquire a token to build."));
@@ -360,46 +417,64 @@ export const checkJWTExpiration = async () => {
360
417
  process.exit(1);
361
418
  }
362
419
 
363
- // check that there is customer_org
364
- if (!customer_org || customer_org === "") {
365
- console.log(chalk.red(`PegaInfinity server DSS setting ${chalk.redBright.bold(`C11nCCv2CustomerOrg`)} is NOT set.`));
366
- console.log(chalk.red("Please update DSS setting, save and then reauthenticate."));
420
+
421
+ // only check if older isLibraryBased
422
+ if (!isLibraryBasedCL && isLibraryBased) {
423
+ // check that there is customer_org
424
+ if (!customer_org || customer_org === "") {
425
+ console.log(chalk.red(`PegaInfinity server DSS setting ${chalk.redBright.bold(`C11nCCv2CustomerOrg`)} is NOT set.`));
426
+ console.log(chalk.red("Please update DSS setting, save and then reauthenticate."));
427
+ process.exit(1);
428
+ }
429
+
430
+ }
431
+
432
+
433
+ }
434
+
435
+ export const checkAccessTokenExpiration = async() => {
436
+
437
+ const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
438
+
439
+ if (tokenAndStaticServer.access_token === undefined) {
440
+ console.log(chalk.redBright("Need to authenticate, missing token.\n"));
441
+ process.exit(1);
442
+ }
443
+
444
+ const jwt = jwtDecode(tokenAndStaticServer.access_token);
445
+ const { exp, customer_org } = jwt;
446
+ if (exp < (new Date().getTime() + 1) / 1000) {
447
+ console.log(chalk.redBright("Authentication token has expired, please reauthenticate."));
448
+ process.exit(1);
449
+ }
450
+
451
+
452
+ }
453
+
454
+ export const getApplicationAndVersionFromToken = async() => {
455
+ const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
456
+
457
+ if (tokenAndStaticServer.access_token === undefined) {
458
+ console.log(chalk.redBright("Need to authenticate, missing token.\n"));
367
459
  process.exit(1);
368
460
  }
369
461
 
462
+ const jwt = jwtDecode(tokenAndStaticServer.access_token);
463
+ const { app_name, app_version } = jwt;
464
+ return { app_name, app_version };
465
+
370
466
  }
371
467
 
372
468
  export const getLibraryBased = () => {
373
469
  if (showDebug) addDebugLog("getLibraryBased", "", "");
374
- // const currentDirectory = process.cwd();
375
- // const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
376
-
377
- // try {
378
- // // force to throw error and not console log
379
- // await checkPathAccess(pegaConfigJsonPath, {}, true);
380
- // }
381
- // catch (ex) {
382
- // // when can't find it, always be false, assume no library based.
383
- // // This is IMPORTANT for init (npx install)
384
- // return false;
385
- // }
386
-
387
- // let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
388
- // data = JSON.parse(data);
389
-
390
- // if (data[LIBRARY_BASED]) {
391
- // if (showDebug) addDebugLog("getLibraryBased", `based: ${data[LIBRARY_BASED]}`, "");
392
- // if (showDebug) addDebugLog("getLibraryBased", "END", "-");
393
- // return data[LIBRARY_BASED];
394
- // }
395
- // else {
396
- // if (showDebug) addDebugLog("getLibraryBased", "END", "-");
397
- // return false;
398
- // }
399
-
400
470
  return defaultConfigs.isLibraryBased;
401
471
  }
402
472
 
473
+ export const getLibraryBasedCL = () => {
474
+ if (showDebug) addDebugLog("getLibraryBasedCL", "", "");
475
+ return defaultConfigs.isLibraryBasedCL;
476
+ }
477
+
403
478
  export const getUseInputConfig = () => {
404
479
  if (showDebug) addDebugLog("getUseInputConfig", "", "");
405
480
 
@@ -407,8 +482,6 @@ if (showDebug) addDebugLog("getUseInputConfig", "", "");
407
482
  return defaultConfigs.useInputConfig;
408
483
  }
409
484
 
410
-
411
-
412
485
  export const setLibraryBased = async (isLibraryBased) => {
413
486
  if (showDebug) addDebugLog("setLibraryBased", "", "");
414
487
  const currentDirectory = process.cwd();
@@ -449,27 +522,57 @@ if (showDebug) addDebugLog("setLibraryBased", "", "");
449
522
 
450
523
  }
451
524
 
525
+ export const setLibraryBasedCL = async (isLibraryBasedCL) => {
526
+ if (showDebug) addDebugLog("setLibraryBased", "", "");
527
+ const currentDirectory = process.cwd();
528
+ const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
529
+
530
+ try {
531
+ // force to throw error and not console log
532
+ await checkPathAccess(pegaConfigJsonPath, {}, true);
533
+ }
534
+ catch (ex) {
535
+ // when can't find it, always be false, assume no library based.
536
+ // This is IMPORTANT for init (npx install)
537
+ return false;
538
+ }
539
+
540
+ let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
541
+ data = JSON.parse(data);
542
+
543
+ if (data[LIBRARY_BASED_CL] != undefined) {
544
+ data[LIBRARY_BASED_CL] = isLibraryBasedCL;
545
+
546
+ // if not undefined, force this as well
547
+ if (data[LIBRARY_BASED] != undefined) {
548
+ data[LIBRARY_BASED] = isLibraryBasedCL;
549
+ }
550
+
551
+ // update file
552
+ // stringify "4", makes the json string look like JSON in the file, formated instead of a single line
553
+ try {
554
+ fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(data, null, 4), { encoding: 'utf8',flag:'w' });
555
+ }
556
+ catch (err) {
557
+ console.error(err);
558
+ }
559
+ //await forceDefaultsUpdate();
560
+ defaultConfigs.isLibraryBasedCL = isLibraryBasedCL;
561
+
562
+ // force libraryBased if isLibraryBasedCL is true
563
+ defaultConfigs.isLibraryBased = isLibraryBasedCL;
564
+
565
+
566
+ // reset
567
+ pegaData = null;
568
+ pegaConfig = null;
569
+
570
+ }
571
+
572
+ }
573
+
452
574
  export const getShowDebug = () => {
453
- // const currentDirectory = process.cwd();
454
- // const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
455
-
456
- // try {
457
- // // force to throw error and not console log
458
- // await checkPathAccess(pegaConfigJsonPath, {}, true);
459
- // }
460
- // catch (ex) {
461
- // // when can't find it, always be false, assume no library based.
462
- // // This is IMPORTANT for init (npx install)
463
- // return false;
464
- // }
465
-
466
- // let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
467
- // data = JSON.parse(data);
468
-
469
- // if (data[SHOW_DEBUG]) {
470
- // return data[SHOW_DEBUG];
471
- // }
472
- // else return false;
575
+
473
576
  return defaultConfigs.showDebug;
474
577
 
475
578
  }
@@ -640,7 +743,6 @@ if (showDebug) addDebugLog("removeTopLevelConfigFiles", `directory: ${directory}
640
743
  if (configF !== "package-lock.json" &&
641
744
  configF !== "package.json" &&
642
745
  configF !== "tasks.config.json" &&
643
- configF !== "input.config.json" &&
644
746
  configF !== ".gitignore" &&
645
747
  configF !== ".npmrc" &&
646
748
  configF !== ".prettierignore") {
@@ -850,11 +952,15 @@ if (showDebug) addDebugLog("getPegaServerConfig", "", "+");
850
952
 
851
953
  if (OAuthData) {
852
954
  const oOAuthData = JSON.parse(OAuthData);
853
- const isolationId = oOAuthData["isolation-ids"].write;
854
- pegaConfig['server-config'].isolationId = isolationId[0];
955
+ if (oOAuthData["isolation-ids"]) {
956
+ const isolationId = oOAuthData["isolation-ids"].write;
957
+ pegaConfig['server-config'].isolationId = isolationId[0];
958
+ }
959
+
855
960
  }
856
961
 
857
962
  }
963
+
858
964
  sPegaServerConfig = JSON.stringify(pegaConfig['server-config']);
859
965
  }
860
966
 
@@ -1049,7 +1155,8 @@ if (showDebug) addDebugLog("updateConfigVersion", `componentKey: ${componentKey}
1049
1155
  data.version = buildVersion;
1050
1156
 
1051
1157
  if (addAboutData) {
1052
- data.buildDate = dateStamp;
1158
+ data.buildDate = currentDate;
1159
+ await applyPegaData(data);
1053
1160
  }
1054
1161
 
1055
1162
 
@@ -1191,12 +1298,6 @@ export const showVersion = async () => {
1191
1298
  process.exit(1);
1192
1299
  }
1193
1300
 
1194
- // const hasGit = checkGit(process.cwd());
1195
-
1196
- // if (!hasGit) {
1197
- // console.log(chalk.redBright('DX Component Builder - Git needs to be installed.'));
1198
- // process.exit(1);
1199
- // }
1200
1301
  };
1201
1302
 
1202
1303
  export const getOOTBComponents = async () => {
@@ -1331,6 +1432,96 @@ if (showDebug) addDebugLog("deleteInfinityServerComponent", `componentKey: ${com
1331
1432
  }
1332
1433
  };
1333
1434
 
1435
+ export const deleteInfinityServerComponentLibrary = async (libraryName, rulesetName, rulesetVersion) => {
1436
+ if (showDebug) addDebugLog("deleteInfinityServerComponentLibrary", `componentKey: ${componentKey}, rulesetName: ${rulesetName}, rulesetVersion: ${rulesetVersion}`, "");
1437
+ const serverConfig = await getPegaServerConfig();
1438
+ const { server } = serverConfig;
1439
+ const url = constructCompleteUrl(server, DELETE_COMPONENT_LIBRARY_SERVICE_REST_ENDPOINT);
1440
+ const deleteUrl = `${url}/${libraryName}/rulesetname/${rulesetName}/rulesetversion/${rulesetVersion}`;
1441
+ try {
1442
+ const OauthData = fs.readFileSync(TOKEN_PATH, 'utf8');
1443
+
1444
+ let status = 500;
1445
+
1446
+ if (OauthData) {
1447
+ const { access_token: accessToken, token_type: tokenType } = JSON.parse(OauthData);
1448
+ let spinner;
1449
+
1450
+ console.log();
1451
+ spinner = ora(chalk.green.bold('Deleting component library...')).start();
1452
+
1453
+ const response = await fetch(deleteUrl, {
1454
+ method: 'DELETE',
1455
+ agent: getHttpsAgent(serverConfig),
1456
+ headers: {
1457
+ Authorization: `${tokenType} ${accessToken}`
1458
+ }
1459
+ });
1460
+
1461
+ spinner.stop();
1462
+ console.log();
1463
+
1464
+ status = response.status;
1465
+ if (!response.ok) {
1466
+ if (status === 401) {
1467
+ throw new Error(
1468
+ 'Error occurred in authentication. Please regenerate using authenticate'
1469
+ );
1470
+ // console.log(accessTokenUri, refreshToken);
1471
+ /* TODO - Handle refresh_token */
1472
+ }
1473
+ else if (status === 404){
1474
+ throw new Error('404: Server resource not found');
1475
+ }
1476
+ else if (status === 405){
1477
+ throw new Error('405: Server method not allowed');
1478
+ }
1479
+ else if (status === 408){
1480
+ throw new Error('408: Server timed out');
1481
+ }
1482
+ else if (response.status === 403) {
1483
+ throw new Error(
1484
+ 'Error forbidden: User does not have privileges to Publish.'
1485
+ );
1486
+ }
1487
+
1488
+ }
1489
+
1490
+ try {
1491
+ const respData = await response.json();
1492
+ const message = respData.message;
1493
+ status = parseInt(respData.status);
1494
+
1495
+ if (status === 200) {
1496
+ console.log(
1497
+ chalk.bold.green(`${message}`)
1498
+ );
1499
+ }
1500
+
1501
+ if (status === 500) {
1502
+ status = 999;
1503
+ throw new Error(message);
1504
+ }
1505
+ }
1506
+ catch (err) {
1507
+ if (status === 500) {
1508
+ throw new Error(
1509
+ `Error occurred in authentication. Please regenerate using authenticate`
1510
+ );
1511
+ }
1512
+ else if (status === 999) {
1513
+ throw new Error (err);
1514
+ }
1515
+ }
1516
+
1517
+ }
1518
+ } catch (error) {
1519
+
1520
+ throw new Error(error);
1521
+ }
1522
+ };
1523
+
1524
+
1334
1525
  export const deleteLaunchpadServerComponent = async componentKey => {
1335
1526
  if (showDebug) addDebugLog("deleteLaunchpadServerComponent", `componentKey: ${componentKey}`, "");
1336
1527
  const { server, isolationId } = await getPegaServerConfig();
@@ -1482,10 +1673,10 @@ if (showDebug) addDebugLog("getC11NB2STokenAndStaticServer", "", "");
1482
1673
  }
1483
1674
 
1484
1675
  if (OAuthData) {
1485
- const { C11NB2S, appStaticContentServer } = JSON.parse(OAuthData)
1676
+ const { C11NB2S, appStaticContentServer, access_token } = JSON.parse(OAuthData)
1486
1677
 
1487
1678
  if (C11NB2S) {
1488
- return ({ C11NB2S, appStaticContentServer});
1679
+ return ({ C11NB2S, appStaticContentServer, access_token});
1489
1680
  }
1490
1681
 
1491
1682
  }
@@ -1607,7 +1798,7 @@ if (showDebug) addDebugLog("deletePublishExtras", `libraryName: ${libraryName},
1607
1798
  // check if .DS_store file exists in Library, if so delete it because causes issue with services
1608
1799
 
1609
1800
  const currentDirectory = process.cwd();
1610
- const zipFile = libraryName.concat(".zip");
1801
+ const zipFile = libraryName.concat(".arch.zip");
1611
1802
 
1612
1803
  // delete zip file
1613
1804
  const zipPath = join(currentDirectory, zipFile);
@@ -1691,7 +1882,7 @@ if (showDebug) addDebugLog("zipVersionAndArchive", `orgLibName: ${orgLibName}, v
1691
1882
  const srcDirectoryPath = join(currentDirectory, "src");
1692
1883
  const tasksConfig = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
1693
1884
  const packageJson = join(currentDirectory, PACKAGE_JSON_FILENAME);
1694
- const archiveFileName = `${orgLibName}_${version}.zip`;
1885
+ const archiveFileName = `${orgLibName}_${version}.arch.zip`;
1695
1886
 
1696
1887
 
1697
1888
  // const configContent = Buffer.from(fs.readFileSync(configJson)).toString();
@@ -1761,6 +1952,164 @@ if (showDebug) addDebugLog("zipVersionAndArchive", `orgLibName: ${orgLibName}, v
1761
1952
 
1762
1953
  };
1763
1954
 
1955
+
1956
+
1957
+
1958
+ export const zipVersionAndArchiveAndReturnBuffer = async (orgLibName, version, currentDirectory = "") => {
1959
+ if (showDebug) addDebugLog("zipVersionAndArchive", `orgLibName: ${orgLibName}, version: ${version}`, "");
1960
+ // const srcDirectoryPath = await getSrcDirectoryPath();
1961
+ if (currentDirectory === "") {
1962
+ currentDirectory = process.cwd();
1963
+ }
1964
+ const srcDirectoryPath = join(currentDirectory, "src");
1965
+ const tasksConfig = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
1966
+ const packageJson = join(currentDirectory, PACKAGE_JSON_FILENAME);
1967
+ const archiveFileName = `${orgLibName}_${version}.arch.zip`;
1968
+
1969
+
1970
+ // const configContent = Buffer.from(fs.readFileSync(configJson)).toString();
1971
+ const mainDirectory = process.cwd();
1972
+ const archiveDirectory = join (mainDirectory, ARCHIVES_PATH, `${orgLibName}`, `${version}`);
1973
+ if (!fs.existsSync(archiveDirectory)) {
1974
+ fs.mkdirSync(archiveDirectory, { recursive: true });
1975
+ }
1976
+
1977
+ // create componentsconfig.json
1978
+ await createComponentsConfigFile(archiveDirectory, join(srcDirectoryPath, "components"));
1979
+
1980
+ const archiveFile = join(archiveDirectory, archiveFileName);
1981
+ if (fs.existsSync(orgLibName)) {
1982
+
1983
+ }
1984
+
1985
+ const output = fs.createWriteStream(archiveFile);
1986
+ const archive = archiver('zip', {
1987
+ zlib: { level: 9 } // Sets the compression level.
1988
+ });
1989
+
1990
+ const zipChunks = [];
1991
+ archive.on('data', chunk => zipChunks.push(chunk));
1992
+
1993
+
1994
+ // Add src directory
1995
+ archive.directory(srcDirectoryPath, 'src');
1996
+
1997
+ // grab all files (not directories and archive)
1998
+ const configFiles = await getTopLevelConfigFiles(currentDirectory);
1999
+ if (configFiles && configFiles.length > 0) {
2000
+ for (const configF of configFiles) {
2001
+ if (configF !== "package-lock.json") {
2002
+ archive.file(
2003
+ join(currentDirectory, configF), { name: configF });
2004
+ }
2005
+
2006
+ }
2007
+ }
2008
+
2009
+ // pipe archive data to the file
2010
+ archive.pipe(output);
2011
+
2012
+ output.on('end', function() {
2013
+ console.log('Data has been drained');
2014
+ });
2015
+
2016
+
2017
+ // good practice to catch warnings (ie stat failures and other non-blocking errors)
2018
+ archive.on('warning', function(err) {
2019
+ if (err.code === 'ENOENT') {
2020
+ // log warning
2021
+ } else {
2022
+ // throw error
2023
+ throw err;
2024
+ }
2025
+ });
2026
+
2027
+ // good practice to catch this error explicitly
2028
+ archive.on('error', function(err) {
2029
+ throw err;
2030
+ });
2031
+
2032
+ await archive.finalize();
2033
+
2034
+ const zipBuffer = Buffer.concat(zipChunks);
2035
+ const zipContent = zipBuffer.toString('base64');
2036
+
2037
+ return { output, zipContent};
2038
+
2039
+ };
2040
+
2041
+ export const zipUnArchiveToTempAndReturnBuffer = async(orgLibName, version) => {
2042
+
2043
+ // unarchive to temp
2044
+ const currentDirectory = process.cwd();
2045
+ const tempDirectory = join (currentDirectory, TEMP_PATH);
2046
+ const srcDirectoryPath = join(tempDirectory, "src");
2047
+
2048
+ const archiveFileName = `${orgLibName}_${version}.arch.zip`;
2049
+ const archiveDirectory = join (currentDirectory, ARCHIVES_PATH, `${orgLibName}`, `${version}`);
2050
+ const archFileName = join(archiveDirectory, archiveFileName);
2051
+
2052
+ await unZipFromArchive(archFileName);
2053
+
2054
+ // archive is in temp directory
2055
+ const archiveFile = join(tempDirectory, archiveFileName);
2056
+
2057
+ const output = fs.createWriteStream(archiveFile);
2058
+ const archive = archiver('zip', {
2059
+ zlib: { level: 9 } // Sets the compression level.
2060
+ });
2061
+
2062
+ const zipChunks = [];
2063
+ archive.on('data', chunk => zipChunks.push(chunk));
2064
+
2065
+ // Add src directory
2066
+ archive.directory(srcDirectoryPath, 'src');
2067
+
2068
+ // grab all files (not directories and archive)
2069
+ const configFiles = await getTopLevelConfigFiles(tempDirectory);
2070
+ if (configFiles && configFiles.length > 0) {
2071
+ for (const configF of configFiles) {
2072
+ if (configF !== "package-lock.json") {
2073
+ archive.file(
2074
+ join(tempDirectory, configF), { name: configF });
2075
+ }
2076
+
2077
+ }
2078
+ }
2079
+
2080
+ // pipe archive data to the file
2081
+ archive.pipe(output);
2082
+
2083
+ output.on('end', function() {
2084
+ console.log('Data has been drained');
2085
+ });
2086
+
2087
+
2088
+ // good practice to catch warnings (ie stat failures and other non-blocking errors)
2089
+ archive.on('warning', function(err) {
2090
+ if (err.code === 'ENOENT') {
2091
+ // log warning
2092
+ } else {
2093
+ // throw error
2094
+ throw err;
2095
+ }
2096
+ });
2097
+
2098
+ // good practice to catch this error explicitly
2099
+ archive.on('error', function(err) {
2100
+ throw err;
2101
+ });
2102
+
2103
+ await archive.finalize();
2104
+
2105
+ const zipBuffer = Buffer.concat(zipChunks);
2106
+ const zipContent = zipBuffer.toString('base64');
2107
+
2108
+ return { output, zipContent};
2109
+
2110
+
2111
+ }
2112
+
1764
2113
  export const zipVersionAndArchiveCL = async (orgLibName, version, currentDirectory = "") => {
1765
2114
  if (showDebug) addDebugLog("zipVersionAndArchiveCL", `orgLibName: ${orgLibName}, version: ${version}, currentDirectory: ${currentDirectory}`, "");
1766
2115
  // const srcDirectoryPath = await getSrcDirectoryPath();
@@ -2095,8 +2444,12 @@ if (showDebug) addDebugLog("restoreFromArchive", `fileName: ${fileName}, orgLibN
2095
2444
  const archiveDirectory = join (currentDirectory, ARCHIVES_PATH, `${orgLibName}`, `${version}`);
2096
2445
  const archFileName = join(archiveDirectory, fileName);
2097
2446
 
2098
- await unZipFromArchive(archFileName);
2099
2447
 
2448
+ if (!fs.existsSync(archiveDirectory)) {
2449
+ throw new Error (`Archive ${orgLibName}/${version} does NOT exist.`);
2450
+ }
2451
+
2452
+ await unZipFromArchive(archFileName);
2100
2453
 
2101
2454
  const tempPackagePath = join (tempDirectory, PACKAGE_JSON_FILENAME);
2102
2455
  const currentPackagePath = join(currentDirectory, PACKAGE_JSON_FILENAME);
@@ -2211,21 +2564,6 @@ if (showDebug) addDebugLog("checkLibraryAndArchives", ``, "");
2211
2564
 
2212
2565
  export const hasLibraryAndVersion = async (libraryName, version, devBuild) => {
2213
2566
  if (showDebug) addDebugLog("hasLibraryAndVersion", `libraryName: ${libraryName}, version: ${version}, devBuild: ${devBuild}`, "");
2214
- // const orgLib = getConfigDefaults();
2215
- // const currentOrgLib = `${orgLib.organization}_${libraryName}`;
2216
- // const libFiles = await getLibraryArchivesFiles(currentOrgLib);
2217
- // let currentVersion = version;
2218
- // if (devBuild) {
2219
- // currentVersion = currentVersion.concat("-dev");
2220
- // }
2221
- // const fileName = `${currentOrgLib}_${currentVersion}.zip`;
2222
- // if (libFiles && libFiles.length > 0) {
2223
- // if (libFiles.includes(fileName)) {
2224
- // return true;
2225
- // }
2226
- // }
2227
-
2228
- // return false;
2229
2567
 
2230
2568
  const orgLib = getConfigDefaults();
2231
2569
  const currentOrgLib = `${orgLib.organization}_${libraryName}`;
@@ -2360,6 +2698,20 @@ if (showDebug) addDebugLog("getJestFunctionalTestList", ``, "");
2360
2698
 
2361
2699
  }
2362
2700
 
2701
+ export const getSubTypeLabel = (type, subtype) => {
2702
+ const subTypeList = COMPONENT_SCHEMA.subtype;
2703
+ const typeList = subTypeList[type.toLowerCase()];
2704
+
2705
+ for (let i in typeList) {
2706
+ if (typeList[i]['value'] === subtype) {
2707
+ const label = typeList[i]['name'].replace("&", "and");
2708
+ return label;
2709
+ }
2710
+ }
2711
+
2712
+ return "";
2713
+ }
2714
+
2363
2715
 
2364
2716
  // init
2365
2717
  await forceDefaultsUpdate();