@pega/custom-dx-components 26.1.11 → 26.1.12-alpha.0.2

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 (323) hide show
  1. package/README.md +6 -2
  2. package/package.json +48 -64
  3. package/src/ai/README.md +44 -0
  4. package/src/ai/catalog/README.md +133 -0
  5. package/src/ai/catalog/best-practices/README.md +24 -0
  6. package/src/ai/catalog/best-practices/accessibility-for-async-components.md +53 -0
  7. package/src/ai/catalog/best-practices/error-handling-and-resiliency.md +116 -0
  8. package/src/ai/catalog/best-practices/genai-assistant-integration-patterns.md +49 -0
  9. package/src/ai/catalog/best-practices/performance-and-efficiency.md +109 -0
  10. package/src/ai/catalog/best-practices/security-considerations.md +93 -0
  11. package/src/ai/catalog/best-practices/testing-pconnect-components.md +245 -0
  12. package/src/ai/catalog/best-practices/troubleshooting-common-pitfalls.md +132 -0
  13. package/src/ai/catalog/pconnect-assignment-lifecycle/SKILL.md +44 -0
  14. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/README.md +39 -0
  15. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/approval-workflow-decision.md +47 -0
  16. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/attachment-upload.md +45 -0
  17. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/bulk-action-submit.md +50 -0
  18. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/confirm-before-destructive-action.md +43 -0
  19. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/create-and-stage-new-case.md +45 -0
  20. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/graceful-submit-failure.md +39 -0
  21. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/modal-assignment-submit.md +58 -0
  22. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/multi-step-wizard.md +44 -0
  23. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/resolve-or-ignore-duplicate.md +47 -0
  24. package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/safe-case-deletion.md +36 -0
  25. package/src/ai/catalog/pconnect-case-collaboration/SKILL.md +42 -0
  26. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/README.md +36 -0
  27. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/look-up-user-details.md +43 -0
  28. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/manage-case-attachments.md +51 -0
  29. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/manage-case-participants.md +52 -0
  30. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/participant-and-follower.md +40 -0
  31. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/post-and-manage-feed.md +50 -0
  32. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/relate-cases.md +35 -0
  33. package/src/ai/catalog/pconnect-case-collaboration/cookbooks/tag-case-and-find-related.md +44 -0
  34. package/src/ai/catalog/pconnect-data-subscriptions/SKILL.md +42 -0
  35. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/README.md +35 -0
  36. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/data-page-subscription-cleanup.md +41 -0
  37. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/publish-and-subscribe-events.md +40 -0
  38. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/pubsub-cleanup.md +38 -0
  39. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/query-paginated-list-data.md +44 -0
  40. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/realtime-case-subscription.md +46 -0
  41. package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/refresh-and-update-data.md +41 -0
  42. package/src/ai/catalog/pconnect-forms-and-fields/SKILL.md +44 -0
  43. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/README.md +36 -0
  44. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/autosave-tracking.md +45 -0
  45. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/cascading-dependent-fields.md +51 -0
  46. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/collect-form-changes-for-manual-save.md +45 -0
  47. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/custom-field-validators.md +44 -0
  48. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/discard-changes-and-reset-form.md +41 -0
  49. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/full-form-validation.md +38 -0
  50. package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/persist-widget-ui-state.md +41 -0
  51. package/src/ai/catalog/pconnect-lists-and-views/SKILL.md +44 -0
  52. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/README.md +35 -0
  53. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/activate-and-switch-container-items.md +52 -0
  54. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/container-item-lifecycle.md +61 -0
  55. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/insert-delete-list-rows.md +40 -0
  56. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/reorder-list-rows.md +39 -0
  57. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/repeating-row-edit.md +39 -0
  58. package/src/ai/catalog/pconnect-lists-and-views/cookbooks/view-personalization.md +60 -0
  59. package/src/ai/catalog/pconnect-navigation-locale-genai/SKILL.md +45 -0
  60. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/README.md +35 -0
  61. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/agent-conversation-for-tasks.md +54 -0
  62. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/bookmarkable-filter-state.md +40 -0
  63. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/deep-link-semantic-url.md +39 -0
  64. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/genai-assistant-conversation.md +43 -0
  65. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/locale-switch-and-relocalize.md +38 -0
  66. package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/persist-operator-preferences.md +40 -0
  67. package/src/ai/catalog/references/architecture-overview.md +52 -0
  68. package/src/ai/catalog/references/pconnect-actions-api.md +948 -0
  69. package/src/ai/catalog/references/pconnect-case-info-data-info-localization.md +618 -0
  70. package/src/ai/catalog/references/pconnect-case-validation-utilities.md +238 -0
  71. package/src/ai/catalog/references/pconnect-container-manager.md +215 -0
  72. package/src/ai/catalog/references/pconnect-list-actions.md +250 -0
  73. package/src/ai/catalog/references/pconnect-misc-suggestions-creation.md +231 -0
  74. package/src/ai/catalog/references/pconnect-reference-context-component.md +471 -0
  75. package/src/ai/catalog/references/pconnect-state-config.md +316 -0
  76. package/src/ai/catalog/references/pconnect-validation-api.md +45 -0
  77. package/src/ai/catalog/references/pcore-analytics-genai-details.md +50 -0
  78. package/src/ai/catalog/references/pcore-bootstrap-init-details.md +121 -0
  79. package/src/ai/catalog/references/pcore-bootstrap-registry-routing.md +253 -0
  80. package/src/ai/catalog/references/pcore-case-collaboration-details.md +191 -0
  81. package/src/ai/catalog/references/pcore-case-collaboration-genai.md +264 -0
  82. package/src/ai/catalog/references/pcore-environment-info-details.md +96 -0
  83. package/src/ai/catalog/references/pcore-environment-locale-namespace.md +175 -0
  84. package/src/ai/catalog/references/pcore-messaging-details.md +99 -0
  85. package/src/ai/catalog/references/pcore-misc-details.md +207 -0
  86. package/src/ai/catalog/references/pcore-misc-utilities.md +325 -0
  87. package/src/ai/catalog/references/pcore-rest-data-details.md +164 -0
  88. package/src/ai/catalog/references/pcore-rest-data-messaging.md +308 -0
  89. package/src/ai/catalog/references/pcore-store-context-details.md +40 -0
  90. package/src/ai/catalog/references/pcore-store-context-state.md +130 -0
  91. package/src/ai/index.js +154 -0
  92. package/src/ai/project/.claude/skills/boolean/SKILL.md +43 -0
  93. package/src/ai/project/.claude/skills/case/SKILL.md +58 -0
  94. package/src/ai/project/.claude/skills/create-dx-component/SKILL.md +98 -0
  95. package/src/ai/project/.claude/skills/create-dx-component/assets/PConnProps.d.ts +24 -0
  96. package/src/ai/project/.claude/skills/create-dx-component/assets/create-nonce.ts +5 -0
  97. package/src/ai/project/.claude/skills/create-dx-component/assets/event-utils.ts +18 -0
  98. package/src/ai/project/.claude/skills/create-dx-component/assets/styles.ts +7 -0
  99. package/src/ai/project/.claude/skills/create-dx-component/cookbooks/README.md +28 -0
  100. package/src/ai/project/.claude/skills/create-dx-component/cookbooks/build-a-data-widget.md +281 -0
  101. package/src/ai/project/.claude/skills/create-dx-component/cookbooks/field-with-limits-and-validation.md +156 -0
  102. package/src/ai/project/.claude/skills/create-dx-component/cookbooks/status-badge-field.md +97 -0
  103. package/src/ai/project/.claude/skills/create-dx-component/references/accessibility.md +71 -0
  104. package/src/ai/project/.claude/skills/create-dx-component/references/choosing-type-and-subtype.md +79 -0
  105. package/src/ai/project/.claude/skills/create-dx-component/references/cli-workflow.md +125 -0
  106. package/src/ai/project/.claude/skills/create-dx-component/references/component-patterns.md +241 -0
  107. package/src/ai/project/.claude/skills/create-dx-component/references/config-schema.md +296 -0
  108. package/src/ai/project/.claude/skills/create-dx-component/references/cosmos-components.md +137 -0
  109. package/src/ai/project/.claude/skills/create-dx-component/references/field-behavior.md +155 -0
  110. package/src/ai/project/.claude/skills/create-dx-component/references/field-essentials.md +90 -0
  111. package/src/ai/project/.claude/skills/create-dx-component/references/field-subtypes-extra.md +68 -0
  112. package/src/ai/project/.claude/skills/create-dx-component/references/localization.md +30 -0
  113. package/src/ai/project/.claude/skills/create-dx-component/references/pcore-pconnect-apis.md +77 -0
  114. package/src/ai/project/.claude/skills/create-dx-component/references/presentation-essentials.md +57 -0
  115. package/src/ai/project/.claude/skills/create-dx-component/references/props-contract.md +182 -0
  116. package/src/ai/project/.claude/skills/create-dx-component/references/state-matrix.md +102 -0
  117. package/src/ai/project/.claude/skills/create-dx-component/references/storybook-pattern.md +262 -0
  118. package/src/ai/project/.claude/skills/create-dx-component/references/styles-pattern.md +54 -0
  119. package/src/ai/project/.claude/skills/create-dx-component/references/template-essentials.md +87 -0
  120. package/src/ai/project/.claude/skills/create-dx-component/references/template-patterns.md +131 -0
  121. package/src/ai/project/.claude/skills/create-dx-component/references/test-pattern.md +215 -0
  122. package/src/ai/project/.claude/skills/create-dx-component/references/ui-gallery-reuse.md +93 -0
  123. package/src/ai/project/.claude/skills/create-dx-component/references/widget-essentials.md +84 -0
  124. package/src/ai/project/.claude/skills/create-dx-component/references/widget-patterns.md +164 -0
  125. package/src/ai/project/.claude/skills/currency/SKILL.md +46 -0
  126. package/src/ai/project/.claude/skills/date/SKILL.md +46 -0
  127. package/src/ai/project/.claude/skills/decimal/SKILL.md +49 -0
  128. package/src/ai/project/.claude/skills/details/SKILL.md +60 -0
  129. package/src/ai/project/.claude/skills/email/SKILL.md +42 -0
  130. package/src/ai/project/.claude/skills/field/SKILL.md +68 -0
  131. package/src/ai/project/.claude/skills/form/SKILL.md +51 -0
  132. package/src/ai/project/.claude/skills/generate-component-set/SKILL.md +80 -0
  133. package/src/ai/project/.claude/skills/generate-component-set/component-manifest.json +161 -0
  134. package/src/ai/project/.claude/skills/identify-components/SKILL.md +76 -0
  135. package/src/ai/project/.claude/skills/integer/SKILL.md +45 -0
  136. package/src/ai/project/.claude/skills/page/SKILL.md +60 -0
  137. package/src/ai/project/.claude/skills/page-widget/SKILL.md +55 -0
  138. package/src/ai/project/.claude/skills/percentage/SKILL.md +52 -0
  139. package/src/ai/project/.claude/skills/phone/SKILL.md +44 -0
  140. package/src/ai/project/.claude/skills/picklist/SKILL.md +50 -0
  141. package/src/ai/project/.claude/skills/plan-dx-component/SKILL.md +51 -0
  142. package/src/ai/project/.claude/skills/plan-dx-component/references/design-system-mapping.md +108 -0
  143. package/src/ai/project/.claude/skills/plan-dx-component/references/intake.md +146 -0
  144. package/src/ai/project/.claude/skills/plan-dx-component/references/plan-template.md +76 -0
  145. package/src/ai/project/.claude/skills/plan-dx-component/references/requirements-template.md +88 -0
  146. package/src/ai/project/.claude/skills/presentation/SKILL.md +61 -0
  147. package/src/ai/project/.claude/skills/publish-library/SKILL.md +106 -0
  148. package/src/ai/project/.claude/skills/radiobuttons/SKILL.md +51 -0
  149. package/src/ai/project/.claude/skills/review-component/SKILL.md +49 -0
  150. package/src/ai/project/.claude/skills/review-component/references/checklist.md +77 -0
  151. package/src/ai/project/.claude/skills/template/SKILL.md +60 -0
  152. package/src/ai/project/.claude/skills/text/SKILL.md +45 -0
  153. package/src/ai/project/.claude/skills/update-dx-component/SKILL.md +56 -0
  154. package/src/ai/project/.claude/skills/update-dx-component/references/maintenance.md +43 -0
  155. package/src/ai/project/.claude/skills/url/SKILL.md +46 -0
  156. package/src/ai/project/.claude/skills/validate-component/SKILL.md +78 -0
  157. package/src/ai/project/.claude/skills/validate-component/references/runtime-troubleshooting.md +56 -0
  158. package/src/ai/project/.claude/skills/validate-component/scripts/check-component.mjs +327 -0
  159. package/src/ai/project/.claude/skills/widget/SKILL.md +59 -0
  160. package/src/ai/project/.gemini/settings.json +5 -0
  161. package/src/ai/project/AGENTS.md +74 -0
  162. package/src/ai/readme-section.md +91 -0
  163. package/src/cli.js +48 -7
  164. package/src/constants.js +54 -53
  165. package/src/internal-tests.js +27 -0
  166. package/src/tasks/ai-toggle/index.js +46 -0
  167. package/src/tasks/authenticate/helper.js +38 -38
  168. package/src/tasks/authenticate/index.js +17 -15
  169. package/src/tasks/build-all/helper.js +4 -4
  170. package/src/tasks/build-all/index.js +7 -7
  171. package/src/tasks/build-comp/helper.js +17 -17
  172. package/src/tasks/build-comp/index.js +10 -10
  173. package/src/tasks/build-jest-assets/index.js +7 -9
  174. package/src/tasks/build-lib/helper.js +8 -8
  175. package/src/tasks/build-lib/index.js +8 -8
  176. package/src/tasks/bundle/builder/index.js +9 -12
  177. package/src/tasks/bundle/builder/modules.js +8 -9
  178. package/src/tasks/bundle/builder/paths.js +2 -19
  179. package/src/tasks/bundle/builder/webpack.config.js +60 -77
  180. package/src/tasks/bundle/index.js +8 -8
  181. package/src/tasks/create/index.js +35 -35
  182. package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +1 -36
  183. package/src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache +2 -2
  184. package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +2 -27
  185. package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.ts.mustache +2 -2
  186. package/src/tasks/create/templates/Constellation/Field/DateTime/date.ts.mustache +2 -2
  187. package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +2 -35
  188. package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +3 -36
  189. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +4 -39
  190. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +4 -53
  191. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/index.tsx.mustache +5 -5
  192. package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +3 -36
  193. package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +7 -42
  194. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/component-constants.ts +1 -1
  195. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.ts.mustache +0 -2
  196. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.ts.mustache +1 -1
  197. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +11 -11
  198. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.ts.mustache +3 -13
  199. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.tsx.mustache +2 -3
  200. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +28 -28
  201. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +2 -2
  202. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.tsx.mustache +2 -3
  203. package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +4 -33
  204. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +3 -33
  205. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +3 -31
  206. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +3 -31
  207. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +3 -35
  208. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +3 -33
  209. package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.tsx.mustache +2 -3
  210. package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +2 -35
  211. package/src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.ts.mustache +2 -2
  212. package/src/tasks/create/templates/Constellation/Template/DETAILS/Avatar.tsx.mustache +19 -15
  213. package/src/tasks/create/templates/Constellation/Template/DETAILS/Operator.tsx.mustache +6 -6
  214. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +1 -1
  215. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +4 -8
  216. package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.ts.mustache +9 -9
  217. package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +4 -8
  218. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Avatar.tsx.mustache +19 -15
  219. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Operator.tsx.mustache +6 -6
  220. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +1 -1
  221. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +1 -1
  222. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.ts.mustache +9 -9
  223. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.ts.mustache +4 -8
  224. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +8 -8
  225. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +8 -8
  226. package/src/tasks/create/templates/Constellation/Template/PAGE/utils.ts.mustache +4 -9
  227. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.test.tsx.mustache +3 -3
  228. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +19 -14
  229. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.tsx.mustache +6 -6
  230. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +1 -1
  231. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.ts.mustache +1 -1
  232. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/index.tsx.mustache +5 -5
  233. package/src/tasks/create/templates/Launchpad/Field/Text-Phone/index.tsx.mustache +3 -35
  234. package/src/tasks/create/templates/Launchpad/Field/__components.md +1 -1
  235. package/src/tasks/create/templates/Launchpad/Template/FORM/demo.stories.tsx.mustache +8 -8
  236. package/src/tasks/create/templates/Launchpad/Template/FORM-region/demo.stories.tsx.mustache +8 -8
  237. package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.test.tsx.mustache +3 -3
  238. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +1 -1
  239. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/mock.ts.mustache +1 -1
  240. package/src/tasks/create-all/index.js +42 -41
  241. package/src/tasks/create-lib/helper.js +13 -13
  242. package/src/tasks/create-lib/index.js +5 -5
  243. package/src/tasks/create-version/helper.js +10 -10
  244. package/src/tasks/create-version/index.js +3 -4
  245. package/src/tasks/delete/helper.js +20 -19
  246. package/src/tasks/delete/index.js +2 -2
  247. package/src/tasks/delete-all/helper.js +26 -25
  248. package/src/tasks/delete-all/index.js +2 -2
  249. package/src/tasks/delete-lib/helper.js +6 -6
  250. package/src/tasks/delete-lib/index.js +6 -6
  251. package/src/tasks/delete-pub/helper.js +18 -18
  252. package/src/tasks/delete-pub/index.js +8 -8
  253. package/src/tasks/delete-version/index.js +2 -2
  254. package/src/tasks/dev-server/index.js +1 -1
  255. package/src/tasks/export-archive/helper.js +21 -21
  256. package/src/tasks/export-archive/index.js +27 -40
  257. package/src/tasks/export-rc/helper.js +34 -34
  258. package/src/tasks/export-rc/index.js +21 -31
  259. package/src/tasks/import-archive/helper.js +39 -39
  260. package/src/tasks/import-archive/index.js +69 -89
  261. package/src/tasks/import-comp/helper.js +8 -8
  262. package/src/tasks/import-comp/index.js +30 -42
  263. package/src/tasks/index.js +5 -0
  264. package/src/tasks/init/Node.gitignore +149 -0
  265. package/src/tasks/init/helper.js +15 -8
  266. package/src/tasks/init/index.js +115 -35
  267. package/src/tasks/init/template/.prettierrc.json +4 -1
  268. package/src/tasks/init/template/.storybook/main.ts +1 -4
  269. package/src/tasks/init/template/.storybook/manager.ts +1 -1
  270. package/src/tasks/init/template/.storybook/preview.tsx +2 -2
  271. package/src/tasks/init/template/.storybook/theme.js +1 -1
  272. package/src/tasks/init/template/.vscode/extensions.json +0 -1
  273. package/src/tasks/init/template/README.md +2 -2
  274. package/src/tasks/init/template/eslint.config.mjs +13 -155
  275. package/src/tasks/init/template/jest.config.cjs +2 -0
  276. package/src/tasks/init/template/package-lock.json +26864 -0
  277. package/src/tasks/init/template/package.json.mustache +19 -74
  278. package/src/tasks/init/template/setupTests.ts +10 -4
  279. package/src/tasks/init/template/tsconfig.json +14 -6
  280. package/src/tasks/internal-test/index.js +21 -0
  281. package/src/tasks/internal-test-full/index.js +15 -0
  282. package/src/tasks/internal-test-functional/index.js +15 -0
  283. package/src/tasks/internal-test-unit/index.js +13 -0
  284. package/src/tasks/linter/index.js +2 -2
  285. package/src/tasks/list/helper.js +41 -40
  286. package/src/tasks/list/index.js +3 -3
  287. package/src/tasks/list-lib/helper.js +5 -5
  288. package/src/tasks/list-lib/index.js +8 -8
  289. package/src/tasks/list-pub/helper.js +23 -16
  290. package/src/tasks/list-pub/index.js +24 -21
  291. package/src/tasks/move/helper.js +8 -8
  292. package/src/tasks/move/index.js +19 -23
  293. package/src/tasks/promote-webpack/index.js +4 -4
  294. package/src/tasks/promote-webpack/webpack.config.js +62 -93
  295. package/src/tasks/publish/helper.js +21 -21
  296. package/src/tasks/publish/index.js +16 -16
  297. package/src/tasks/publish-all/helper.js +20 -20
  298. package/src/tasks/publish-all/index.js +11 -12
  299. package/src/tasks/publish-archive/helper.js +9 -9
  300. package/src/tasks/publish-archive/index.js +12 -14
  301. package/src/tasks/publish-lib/helper.js +3 -3
  302. package/src/tasks/publish-lib/index.js +28 -34
  303. package/src/tasks/quarantine/index.js +8 -8
  304. package/src/tasks/rename/index.js +26 -30
  305. package/src/tasks/rename-lib/index.js +21 -25
  306. package/src/tasks/restore/index.js +8 -8
  307. package/src/tasks/restore-config/index.js +3 -5
  308. package/src/tasks/set-perm/index.js +8 -8
  309. package/src/tasks/show-help/index.js +17 -9
  310. package/src/tasks/show-status/index.js +2 -2
  311. package/src/tasks/store/index.js +8 -8
  312. package/src/tasks/switch-lib/helper.js +7 -7
  313. package/src/tasks/switch-lib/index.js +7 -7
  314. package/src/tasks/switch-version/helper.js +6 -6
  315. package/src/tasks/switch-version/index.js +7 -7
  316. package/src/tasks/update/index.js +1 -1
  317. package/src/tasks/upgrade/index.js +7 -7
  318. package/src/tasks/validator/index.js +49 -203
  319. package/src/util.js +169 -186
  320. package/src/rules/no-pcore-pconnect-in-presentation.js +0 -103
  321. package/src/tasks/init/template/.stylelintrc.json +0 -4
  322. package/src/tasks/init/template/babel.config.cjs +0 -22
  323. package/src/tasks/init/template/cspell.json +0 -14
@@ -1,9 +1,7 @@
1
1
  import fs from 'fs';
2
- import { promisify } from 'util';
3
2
  import { join } from 'path';
4
3
 
5
4
  import inquirer from 'inquirer';
6
- import ncp from 'ncp';
7
5
  import chalk from 'chalk';
8
6
  import { Listr } from 'listr2';
9
7
 
@@ -18,16 +16,10 @@ import {
18
16
  zipVersionAndArchive,
19
17
  zipVersionAndArchiveCL,
20
18
  cleanUpTemp,
21
- checkAccessTokenExpiration
19
+ checkAccessTokenExpiration,
22
20
  } from '../../util.js';
23
21
  import { TASKS_CONFIG_JSON_FILENAME, ARCHIVES_PATH, BIN_ARCHIVES_PATH } from '../../constants.js';
24
- import {
25
- getFilePathQuestions,
26
- getLibraryQuestion,
27
- getLibraryVersionQuestion,
28
- updateSavedExportFilePath,
29
- getServerOrDirectoryQuestion
30
- } from './helper.js';
22
+ import { getFilePathQuestions, updateSavedExportFilePath, getServerOrDirectoryQuestion } from './helper.js';
31
23
  import { localBuildLibrary } from '../build-lib/index.js';
32
24
  import publishArchive from '../publish-archive/index.js';
33
25
 
@@ -37,9 +29,7 @@ export const DXCB_CONFIG_INTERNAL_JSON_FILENAME = 'src/dxcb.config.json';
37
29
  const currentDirectory = process.cwd();
38
30
  const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
39
31
 
40
- const copy = promisify(ncp);
41
-
42
- export const updateConfig = async ({ oldComponentKey, newComponentKey, library, version, targetDirectory }, options, onlyCompanion = false) => {
32
+ export const updateConfig = async ({ oldComponentKey, newComponentKey, library, version, targetDirectory }) => {
43
33
  addDebugLog('updateConfig', `oldComponentKey: ${oldComponentKey}, newComponentKey: ${newComponentKey}`, '');
44
34
 
45
35
  let configData = fs.readFileSync(join(targetDirectory, '/config.json'), { encoding: 'utf8' });
@@ -53,7 +43,7 @@ export const updateConfig = async ({ oldComponentKey, newComponentKey, library,
53
43
  // stringify "4", makes the json string look like JSON in the file, formatted instead of a single line
54
44
  fs.writeFileSync(join(targetDirectory, '/config.json'), JSON.stringify(configData, null, 4), {
55
45
  encoding: 'utf8',
56
- flag: 'w'
46
+ flag: 'w',
57
47
  });
58
48
  };
59
49
 
@@ -61,7 +51,7 @@ export const updateFile = async (fileName, oldComponentKeyPC, newComponentKeyPC,
61
51
  addDebugLog(
62
52
  'updateFile',
63
53
  `fileName: ${fileName}, oldComponentKeyPC: ${oldComponentKeyPC}, newComponentKeyPC: ${newComponentKeyPC}, targetDirectory: ${targetDirectory}`,
64
- ''
54
+ '',
65
55
  );
66
56
 
67
57
  let fileData = fs.readFileSync(join(targetDirectory, '/', fileName), { encoding: 'utf8' });
@@ -97,14 +87,14 @@ export const exportCLArch = async (exportPath, orgLibName, selectedVersion) => {
97
87
  console.log(chalk.green(`\nExporting binaries...\n`));
98
88
 
99
89
  if (!fs.existsSync(exportPath)) {
100
- console.log(`\Path: ${chalk.yellow(`${exportPath}`)} doesn't exist.`);
90
+ console.log(`Path: ${chalk.yellow(`${exportPath}`)} doesn't exist.`);
101
91
  const newPathAnswer = await inquirer.prompt([
102
92
  {
103
93
  name: 'createNewPath',
104
94
  type: 'confirm',
105
95
  message: 'Create path',
106
- default: true
107
- }
96
+ default: true,
97
+ },
108
98
  ]);
109
99
  const createNewPath = newPathAnswer.createNewPath;
110
100
  if (createNewPath) {
@@ -124,8 +114,8 @@ export const exportCLArch = async (exportPath, orgLibName, selectedVersion) => {
124
114
  name: 'overWriteFile',
125
115
  type: 'confirm',
126
116
  message: 'Overwrite',
127
- default: true
128
- }
117
+ default: true,
118
+ },
129
119
  ]);
130
120
 
131
121
  if (!overwriteQuestion.overWriteFile) {
@@ -148,7 +138,7 @@ export const exportCLArch = async (exportPath, orgLibName, selectedVersion) => {
148
138
  }
149
139
  };
150
140
 
151
- export const exportArch = async (exportPath, orgLibName, selectedVersion, fullArchive = 'Full', currentOrArchive = '') => {
141
+ export const exportArch = async (exportPath, orgLibName, selectedVersion, fullArchive = 'Full') => {
152
142
  addDebugLog('exportArch', `exportPath: ${exportPath}, orgLibName: ${orgLibName}, selectedVersion: ${selectedVersion}`, '');
153
143
  const currentDirectory = process.cwd();
154
144
  const archiveDirectory = join(currentDirectory, ARCHIVES_PATH, `${orgLibName}`, `${selectedVersion}`);
@@ -173,14 +163,14 @@ export const exportArch = async (exportPath, orgLibName, selectedVersion, fullAr
173
163
  }
174
164
 
175
165
  if (!fs.existsSync(exportPath)) {
176
- console.log(`\Path: ${chalk.yellow(`${exportPath}`)} doesn't exist.`);
166
+ console.log(`Path: ${chalk.yellow(`${exportPath}`)} doesn't exist.`);
177
167
  const newPathAnswer = await inquirer.prompt([
178
168
  {
179
169
  name: 'createNewPath',
180
170
  type: 'confirm',
181
171
  message: 'Create path',
182
- default: true
183
- }
172
+ default: true,
173
+ },
184
174
  ]);
185
175
  const createNewPath = newPathAnswer.createNewPath;
186
176
  if (createNewPath) {
@@ -200,8 +190,8 @@ export const exportArch = async (exportPath, orgLibName, selectedVersion, fullAr
200
190
  name: 'overWriteFile',
201
191
  type: 'confirm',
202
192
  message: 'Overwrite',
203
- default: true
204
- }
193
+ default: true,
194
+ },
205
195
  ]);
206
196
 
207
197
  if (!overwriteQuestion.overWriteFile) {
@@ -227,19 +217,19 @@ export const exportArch = async (exportPath, orgLibName, selectedVersion, fullAr
227
217
  }
228
218
  };
229
219
 
230
- export const getZipFileList = async filePath => {
220
+ export const getZipFileList = async (filePath) => {
231
221
  if (fs.existsSync(filePath)) {
232
222
  return fs
233
223
  .readdirSync(filePath, { withFileTypes: true })
234
- .filter(dirent => !dirent.isDirectory() && dirent.name.match(/.*\.(zip?)/gi))
235
- .map(dirent => dirent.name);
224
+ .filter((dirent) => !dirent.isDirectory() && dirent.name.match(/.*\.(zip?)/gi))
225
+ .map((dirent) => dirent.name);
236
226
  } else {
237
227
  console.log(chalk.red.bold(`File path: ${filePath} does not exist or no permissions.`));
238
228
  process.exit(1);
239
229
  }
240
230
  };
241
231
 
242
- export default async options => {
232
+ export default async (options) => {
243
233
  await showVersion();
244
234
  await checkLibraryAndArchives();
245
235
 
@@ -256,7 +246,7 @@ export default async options => {
256
246
 
257
247
  addDebugLog('exportArchive', '', '+');
258
248
 
259
- let exportTo = '';
249
+ let exportTo;
260
250
 
261
251
  if (options.params.length >= 8) {
262
252
  // params pick full, what library/name and path
@@ -265,15 +255,12 @@ export default async options => {
265
255
  const libraryName = options.params[4];
266
256
  const libraryVersion = options.params[5];
267
257
  const filePath = options.params[6];
268
- exportTo = 'Directory';
269
-
270
- const currentOrArchive = options.params[7];
271
258
 
272
- await exportArch(filePath, libraryName, libraryVersion, fullArchive, currentOrArchive);
259
+ await exportArch(filePath, libraryName, libraryVersion, fullArchive);
273
260
  } else {
274
261
  let orgLibName = '';
275
262
  let selectedVersion = '';
276
- let fullArchive = '';
263
+ let fullArchive;
277
264
 
278
265
  // if (options.params.length >= 5) {
279
266
  // fullArchive = options.params[3];
@@ -366,13 +353,13 @@ export default async options => {
366
353
  task: async () => {
367
354
  // local archive so it will get stored
368
355
  await zipVersionAndArchive(orgLibName, selectedVersion);
369
- }
370
- }
356
+ },
357
+ },
371
358
  ],
372
- { concurrent: false, exitOnError: true }
359
+ { concurrent: false, exitOnError: true },
373
360
  );
374
361
 
375
- await tasks.run().catch(err => {
362
+ await tasks.run().catch((err) => {
376
363
  console.log(chalk.bold.red(err.toString()));
377
364
  process.exit(1);
378
365
  });
@@ -11,12 +11,12 @@ import {
11
11
  setConfigExportRelativePath,
12
12
  getComponentDirectoryPath,
13
13
  getPegaServerConfig,
14
- forceDefaultsUpdate
14
+ forceDefaultsUpdate,
15
15
  } from '../../util.js';
16
16
 
17
17
  export const SOURCE_OF_COMPONENT_TYPES = {
18
18
  SERVER: 'Server',
19
- LOCAL: 'Local'
19
+ LOCAL: 'Local',
20
20
  };
21
21
 
22
22
  export const getFilePathQuestions = async () => {
@@ -47,10 +47,10 @@ export const getFilePathQuestions = async () => {
47
47
  type: 'fuzzypath',
48
48
  message: 'Enter full file path of directory to export zip file:',
49
49
  default: defaultPath,
50
- excludePath: nodePath => nodePath.startsWith('node_modules'),
50
+ excludePath: (nodePath) => nodePath.startsWith('node_modules'),
51
51
  // excludePath :: (String) -> Bool
52
52
  // excludePath to exclude some paths from the file-system scan
53
- excludeFilter: nodePath => nodePath.indexOf('/.') >= 0,
53
+ excludeFilter: (nodePath) => nodePath.indexOf('/.') >= 0,
54
54
  // excludeFilter :: (String) -> Bool
55
55
  // excludeFilter to exclude some paths from the final list, e.g. '.'
56
56
  itemType: 'directory',
@@ -64,15 +64,15 @@ export const getFilePathQuestions = async () => {
64
64
  suggestOnly: true,
65
65
  // suggestOnly :: Bool
66
66
  // Restrict prompt answer to available choices or use them as suggestions
67
- depthLimit: 2
67
+ depthLimit: 2,
68
68
  // depthLimit :: integer >= 0
69
69
  // Limit the depth of sub-folders to scan
70
70
  // Defaults to infinite depth if undefined
71
- }
71
+ },
72
72
  ];
73
73
  };
74
74
 
75
- export const getFileNameQuestions = async zipFileList => {
75
+ export const getFileNameQuestions = async (zipFileList) => {
76
76
  addDebugLog('getFileNameQuestions', '', '');
77
77
 
78
78
  return [
@@ -80,8 +80,8 @@ export const getFileNameQuestions = async zipFileList => {
80
80
  name: 'fileName',
81
81
  type: 'rawlist',
82
82
  message: `Select zip file`,
83
- choices: zipFileList
84
- }
83
+ choices: zipFileList,
84
+ },
85
85
  ];
86
86
  };
87
87
 
@@ -98,12 +98,12 @@ export const getLibraryQuestion = async () => {
98
98
  name: 'orgLibName',
99
99
  type: 'rawlist',
100
100
  message: `Select a library (current library is ${chalk.bold.green(`${currentOrgLib}`)}) `,
101
- choices: archVersionList
102
- }
101
+ choices: archVersionList,
102
+ },
103
103
  ];
104
104
  };
105
105
 
106
- export const getLibraryVersionQuestion = async newOrgLib => {
106
+ export const getLibraryVersionQuestion = async (newOrgLib) => {
107
107
  addDebugLog('getLibraryVersionQuestion', '', '');
108
108
 
109
109
  const archVersionList = await getLibraryArchivesVersions(newOrgLib, '0.0.0');
@@ -113,8 +113,8 @@ export const getLibraryVersionQuestion = async newOrgLib => {
113
113
  name: 'selectedVersion',
114
114
  type: 'rawlist',
115
115
  message: `Select a version `,
116
- choices: archVersionList
117
- }
116
+ choices: archVersionList,
117
+ },
118
118
  ];
119
119
  };
120
120
 
@@ -128,10 +128,10 @@ export const getServerOrDirectoryQuestion = async () => {
128
128
  message: `Export to`,
129
129
  choices: [
130
130
  { name: 'Local directory', value: 'Directory' },
131
- { name: 'Server', value: 'Server' }
131
+ { name: 'Server', value: 'Server' },
132
132
  ],
133
- default: 'Directory'
134
- }
133
+ default: 'Directory',
134
+ },
135
135
  ];
136
136
  };
137
137
 
@@ -143,10 +143,10 @@ export const getFullArchiveQuestions = async () => {
143
143
  message: 'Type of export',
144
144
  choices: [
145
145
  { name: 'Full Archive (code)', value: 'Full' },
146
- { name: 'CL Binary (runtime only)', value: 'Binary' }
146
+ { name: 'CL Binary (runtime only)', value: 'Binary' },
147
147
  ],
148
- default: 'Full'
149
- }
148
+ default: 'Full',
149
+ },
150
150
  ];
151
151
  };
152
152
 
@@ -155,45 +155,45 @@ export const getComponentInfoQuestions = async (rPackageJSON, library) => {
155
155
  {
156
156
  name: 'author',
157
157
  message: 'Author of this component',
158
- default: rPackageJSON.author
158
+ default: rPackageJSON.author,
159
159
  },
160
160
  {
161
161
  name: 'isLocalized',
162
162
  type: 'confirm',
163
163
  message: 'Is this component fully localized',
164
- default: false
164
+ default: false,
165
165
  },
166
166
  {
167
167
  name: 'isAccessible',
168
168
  type: 'confirm',
169
169
  message: 'Is this component accessible',
170
- default: false
170
+ default: false,
171
171
  },
172
172
  {
173
173
  name: 'isSecure',
174
174
  type: 'confirm',
175
175
  message: 'Is this component and dependent modules secure',
176
- default: false
176
+ default: false,
177
177
  },
178
178
  {
179
179
  name: 'license',
180
180
  message: 'License of this component (MIT, Apache, GPL, etc.)',
181
- default: rPackageJSON.license
181
+ default: rPackageJSON.license,
182
182
  },
183
183
  {
184
184
  name: 'organization',
185
185
  message: 'Organization name',
186
- default: rPackageJSON.organization
186
+ default: rPackageJSON.organization,
187
187
  },
188
188
  {
189
189
  name: 'library',
190
190
  message: 'Library name',
191
- default: library
192
- }
191
+ default: library,
192
+ },
193
193
  ];
194
194
  };
195
195
 
196
- export const zipComponent = async componentKey => {
196
+ export const zipComponent = async (componentKey) => {
197
197
  addDebugLog('zipComponent', `componentKey: ${componentKey}`, '');
198
198
  const srcDirectory = await getComponentDirectoryPath(componentKey);
199
199
  const buildDirectory = await path.join(path.resolve(), 'dist/components', componentKey);
@@ -202,7 +202,7 @@ export const zipComponent = async componentKey => {
202
202
 
203
203
  const archive = archiver('zip', { zlib: { level: 9 } });
204
204
  const zipChunks = [];
205
- archive.on('data', chunk => zipChunks.push(chunk));
205
+ archive.on('data', (chunk) => zipChunks.push(chunk));
206
206
 
207
207
  // Add src directory
208
208
  archive.directory(srcDirectory, 'src');
@@ -239,7 +239,7 @@ export const zipComponent = async componentKey => {
239
239
  }
240
240
 
241
241
  if (fs.existsSync('dist')) {
242
- fs.rm('dist', { recursive: true }, err => {
242
+ fs.rm('dist', { recursive: true }, (err) => {
243
243
  if (err) {
244
244
  throw err;
245
245
  }
@@ -264,11 +264,11 @@ export const zipRC = async (content, archiveDirectory, archiveFileName) => {
264
264
 
265
265
  const output = fs.createWriteStream(archiveFile);
266
266
  const archive = archiver('zip', {
267
- zlib: { level: 9 } // Sets the compression level.
267
+ zlib: { level: 9 }, // Sets the compression level.
268
268
  });
269
269
 
270
270
  const zipChunks = [];
271
- archive.on('data', chunk => zipChunks.push(chunk));
271
+ archive.on('data', (chunk) => zipChunks.push(chunk));
272
272
 
273
273
  archive.append(JSON.stringify(content), { name: 'componentData.json' });
274
274
 
@@ -299,7 +299,7 @@ export const zipRC = async (content, archiveDirectory, archiveFileName) => {
299
299
  return output;
300
300
  };
301
301
 
302
- export const updateSavedExportFilePath = async filePath => {
302
+ export const updateSavedExportFilePath = async (filePath) => {
303
303
  const currentDirectory = process.cwd();
304
304
  const arPathParts = currentDirectory.split(path.sep);
305
305
  const configDef = getConfigDefaults();
@@ -18,7 +18,7 @@ import {
18
18
  getPegaServerConfig,
19
19
  getLibraryBased,
20
20
  getComponentDirectoryPath,
21
- getServerType
21
+ getServerType,
22
22
  } from '../../util.js';
23
23
  import { TASKS_CONFIG_JSON_FILENAME, PACKAGE_JSON_FILENAME } from '../../constants.js';
24
24
  import { getFilePathQuestions, updateSavedExportFilePath, zipComponent, zipRC, getComponentInfoQuestions } from './helper.js';
@@ -28,7 +28,7 @@ import inquirerFuzzyPath from '@pega/inquirer-fuzzy-path';
28
28
  const currentDirectory = process.cwd();
29
29
  const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
30
30
 
31
- export default async options => {
31
+ export default async (options) => {
32
32
  await showVersion();
33
33
 
34
34
  await checkPathAccess(pegaConfigJsonPath);
@@ -47,8 +47,6 @@ export default async options => {
47
47
 
48
48
  addDebugLog('export RC', '', '+');
49
49
 
50
- let exportTo = '';
51
-
52
50
  if (options.params.length >= 8) {
53
51
  // params pick full, what library/name and path
54
52
  // vs no params then we will select the current library
@@ -60,10 +58,6 @@ export default async options => {
60
58
  // const currentOrArchive = options.params[7];
61
59
  // await exportArch(filePath, libraryName, libraryVersion, fullArchive, currentOrArchive );
62
60
  } else {
63
- let orgLibName = '';
64
- let selectedVersion = '';
65
- let fullArchive = '';
66
-
67
61
  // if (options.params.length >= 5) {
68
62
  // fullArchive = options.params[3];
69
63
  // orgLibName = options.params[4];
@@ -80,11 +74,7 @@ export default async options => {
80
74
  // }
81
75
 
82
76
  // force full archive, binary deprecated
83
- fullArchive = 'Full';
84
77
 
85
- let filePathQuestions;
86
- let filePathAnswers;
87
- let filePath;
88
78
  let content;
89
79
 
90
80
  const localComponents = await getComponents();
@@ -97,18 +87,18 @@ export default async options => {
97
87
  name: 'componentKey',
98
88
  type: 'rawlist',
99
89
  message: 'Select component to export as a runtime component',
100
- choices: localComponents
90
+ choices: localComponents,
101
91
  },
102
92
  {
103
93
  name: 'devBuild',
104
94
  type: 'confirm',
105
95
  message: 'Generate development build ?',
106
- default: defaultPegaConfig.devBuild
107
- }
96
+ default: defaultPegaConfig.devBuild,
97
+ },
108
98
  ]);
109
99
 
110
100
  content = {
111
- ...compAnswers
101
+ ...compAnswers,
112
102
  };
113
103
 
114
104
  inquirer.registerPrompt('fuzzypath', inquirerFuzzyPath);
@@ -119,14 +109,14 @@ export default async options => {
119
109
  const devBuild = compAnswers.devBuild;
120
110
 
121
111
  if (!fs.existsSync(exportPath)) {
122
- console.log(`\Path: ${chalk.yellow(`${exportPath}`)} doesn't exist.`);
112
+ console.log(`Path: ${chalk.yellow(`${exportPath}`)} doesn't exist.`);
123
113
  const newPathAnswer = await inquirer.prompt([
124
114
  {
125
115
  name: 'createNewPath',
126
116
  type: 'confirm',
127
117
  message: 'Create path',
128
- default: true
129
- }
118
+ default: true,
119
+ },
130
120
  ]);
131
121
  const createNewPath = newPathAnswer.createNewPath;
132
122
  if (createNewPath) {
@@ -148,8 +138,8 @@ export default async options => {
148
138
  name: 'overWriteFile',
149
139
  type: 'confirm',
150
140
  message: 'Overwrite',
151
- default: true
152
- }
141
+ default: true,
142
+ },
153
143
  ]);
154
144
 
155
145
  if (!overwriteQuestion.overWriteFile) {
@@ -171,7 +161,7 @@ export default async options => {
171
161
 
172
162
  try {
173
163
  retrievedPackageData = fs.readFileSync(packagePath);
174
- } catch (ex) {
164
+ } catch {
175
165
  console.log(chalk.red(`\nUnable to retrieve package.json.`));
176
166
  process.exit(1);
177
167
  }
@@ -196,7 +186,7 @@ export default async options => {
196
186
  title: 'Validate config schema',
197
187
  task: async () => {
198
188
  await validate(componentKey);
199
- }
189
+ },
200
190
  },
201
191
  {
202
192
  title: 'Lint component',
@@ -204,34 +194,34 @@ export default async options => {
204
194
  const targetDirectory = await getComponentDirectoryPath(componentKey);
205
195
  // console.log(`in buildComponent Lint component task: componentKey: ${componentKey} targetDirectory: ${targetDirectory}`);
206
196
  await lintComponent(targetDirectory);
207
- }
197
+ },
208
198
  },
209
199
  {
210
200
  title: `Bundle Component ${sDevBuild}`,
211
201
  task: async () => bundleComponent(componentKey, defaultPegaConfig.sourceMap, devBuild),
212
- skip: () => (options.skipBundle ? 'Skipped bundling component' : undefined)
202
+ skip: () => (options.skipBundle ? 'Skipped bundling component' : undefined),
213
203
  },
214
204
  {
215
205
  title: 'Create internal zip of component',
216
206
  task: async () => {
217
207
  const output = await zipComponent(componentKey);
218
208
  content = { ...content, ...output, componentInfo: componentInfo };
219
- }
209
+ },
220
210
  },
221
211
  {
222
212
  title: 'Create zip file',
223
213
  task: async () => {
224
214
  const output = await zipRC(content, exportPath, archiveFileName);
225
215
  content = { ...content, ...output };
226
- }
227
- }
216
+ },
217
+ },
228
218
  ],
229
219
  {
230
- exitOnError: true
231
- }
220
+ exitOnError: true,
221
+ },
232
222
  );
233
223
 
234
- await tasks.run().catch(err => {
224
+ await tasks.run().catch((err) => {
235
225
  console.log(chalk.bold.red(err.toString()));
236
226
  process.exit(1);
237
227
  });