@pega/custom-dx-components 0.0.1 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/extensions.json +1 -1
- package/README.md +6 -189
- package/babel.config.cjs +13 -0
- package/jest.config.cjs +37 -0
- package/package.json +48 -36
- package/src/cli.js +49 -1
- package/src/constants.js +134 -8
- package/src/currentPath.cjs +1 -0
- package/src/tasks/authenticate/helper.js +167 -8
- package/src/tasks/authenticate/index.js +228 -49
- package/src/tasks/build-all/helper.js +71 -0
- package/src/tasks/build-all/index.js +86 -0
- package/src/tasks/build-comp/helper.js +116 -0
- package/src/tasks/build-comp/index.js +76 -0
- package/src/tasks/{publish/bundle → bundle}/builder/index.js +54 -5
- package/src/tasks/{publish/bundle → bundle}/builder/webpack.config.js +21 -8
- package/src/tasks/{publish/bundle → bundle}/index.js +2 -2
- package/src/tasks/create/index.js +143 -70
- package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +38 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/boolean-format.js.mustache +27 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +145 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.jsx.mustache +64 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.jsx.mustache +169 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/mock.js.mustache +23 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +62 -0
- package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +42 -0
- package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +199 -0
- package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +439 -0
- package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +76 -0
- package/src/tasks/create/templates/Constellation/Field/Date/index.jsx.mustache +256 -0
- package/src/tasks/create/templates/Constellation/Field/Date/mock.js.mustache +25 -0
- package/src/tasks/create/templates/Constellation/Field/Date/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Date/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +256 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +93 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +288 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +331 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +76 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.jsx.mustache +253 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/mock.js.mustache +25 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +278 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +52 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.jsx.mustache +273 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/mock.js.mustache +23 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +291 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +56 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.jsx.mustache +300 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.js.mustache +25 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +93 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +52 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache +282 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.js.mustache +23 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +347 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +52 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/index.jsx.mustache +337 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/mock.js.mustache +23 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +114 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +81 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.jsx.mustache +353 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/mock.js.mustache +69 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/component-constants.js +5 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/config.json.mustache +115 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.js.mustache +161 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.stories.jsx.mustache +90 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.js.mustache +310 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/format-constants.js.mustache +41 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.jsx.mustache +1045 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/mock.js.mustache +69 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/picklist-utils.js.mustache +88 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-constants.js.mustache +20 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.js.mustache +657 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/suggestions-handler.js.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.jsx.mustache +161 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.js.mustache +182 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/config.json.mustache +113 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.stories.jsx.mustache +85 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.jsx.mustache +218 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/mock.js.mustache +69 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/suggestions-handler.js.mustache +9 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.jsx.mustache +161 -0
- package/src/tasks/create/{template → templates/Constellation/Field/Text}/config.json.mustache +14 -5
- package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +54 -0
- package/src/tasks/create/{template → templates/Constellation/Field/Text}/index.jsx.mustache +10 -4
- package/src/tasks/create/templates/Constellation/Field/Text/mock.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +111 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +51 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.jsx.mustache +232 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/mock.js.mustache +24 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.jsx +26 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +111 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +51 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.jsx.mustache +239 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.js.mustache +23 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +111 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +51 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.jsx.mustache +230 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.js.mustache +22 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +123 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +49 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +266 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.js.mustache +39 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +237 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +49 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +232 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.js.mustache +24 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache +175 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/config.json.mustache +185 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/demo.stories.jsx.mustache +60 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/index.jsx.mustache +214 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/mock.js.mustache +22 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/suggestions-handler.js +9 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/time-of-day.js.mustache +287 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/OneColumnDetails.svg +22 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.jsx.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +35 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +137 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/index.jsx.mustache +86 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.js.mustache +192 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +151 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.jsx.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/TwoColumnDetails.svg +28 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +42 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +140 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.jsx.mustache +86 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.js.mustache +232 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +151 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/DefaultForm.svg +29 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +45 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +177 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/index.jsx.mustache +51 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/mock.js.mustache +139 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/TwoColumn.svg +38 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +27 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +182 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/index.jsx.mustache +51 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/mock.js.mustache +145 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.jsx.mustache +33 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +32 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.jsx.mustache +105 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/index.jsx.mustache +71 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/localizations.json.mustache +4 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/mock.js.mustache +96 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +227 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +23 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.jsx.mustache +81 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/index.jsx.mustache +75 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/mock.js.mustache +391 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +59 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.jsx.mustache +33 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/index.jsx.mustache +48 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/mock.js.mustache +24 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.jsx.mustache +74 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.jsx.mustache +240 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +66 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.jsx.mustache +70 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.jsx.mustache +112 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.js.mustache +53 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Launchpad/Field/__components.md +3 -0
- package/src/tasks/create/templates/Launchpad/Template/__components.md +3 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/config.json.mustache +23 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.jsx.mustache +81 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/index.jsx.mustache +75 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/mock.js.mustache +391 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Avatar.jsx.mustache +74 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/Operator.jsx.mustache +282 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/config.json.mustache +55 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.jsx.mustache +76 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.jsx.mustache +82 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/mock.js.mustache +53 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/styles.js.mustache +15 -0
- package/src/tasks/create/templates/Launchpad/Widget/__components.md +3 -0
- package/src/tasks/create-all/index.js +398 -0
- package/src/tasks/delete/helper.js +162 -55
- package/src/tasks/delete/index.js +11 -14
- package/src/tasks/delete-all/helper.js +264 -0
- package/src/tasks/delete-all/index.js +42 -0
- package/src/tasks/index.js +8 -0
- package/src/tasks/init/helper.js +0 -1
- package/src/tasks/init/index.js +24 -5
- package/src/tasks/init/template/.eslintignore +8 -0
- package/src/tasks/init/template/.eslintrc.json +191 -5
- package/src/tasks/init/template/.storybook/main.js +9 -3
- package/src/tasks/init/template/.storybook/preview.js +14 -0
- package/src/tasks/init/template/.vscode/extensions.json +1 -1
- package/src/tasks/init/template/README.md +6 -189
- package/src/tasks/init/template/babel.config.cjs +13 -0
- package/src/tasks/init/template/jest.config.cjs +21 -0
- package/src/tasks/init/template/keys/DX-ComponentDev.zip +0 -0
- package/src/tasks/init/template/keys/dxcb.crt +32 -0
- package/src/tasks/init/template/keys/dxcb.key +51 -0
- package/src/tasks/init/template/package.json.mustache +57 -26
- package/src/tasks/init/template/src/components/_components.md +1 -0
- package/src/tasks/init/template/tasks.config.json +25 -8
- package/src/tasks/init/template/templateNPMRC.txt +8 -0
- package/src/tasks/linter/index.js +46 -0
- package/src/tasks/list/helper.js +196 -57
- package/src/tasks/list/index.js +22 -3
- package/src/tasks/promote-webpack/index.js +126 -0
- package/src/tasks/promote-webpack/webpack.config.js +376 -0
- package/src/tasks/publish/helper.js +123 -54
- package/src/tasks/publish/index.js +44 -13
- package/src/tasks/publish-all/helper.js +213 -0
- package/src/tasks/publish-all/index.js +107 -0
- package/src/tasks/rename/index.js +344 -0
- package/src/tasks/revert-webpack/index.js +69 -0
- package/src/tasks/upgrade/index.js +1 -1
- package/src/tasks/validator/index.js +291 -18
- package/src/util.js +237 -43
- package/tests/assets/components/create/Pega_DXIL_MyTestText/config.json +55 -0
- package/tests/assets/components/create/Pega_DXIL_MyTestText/demo.stories.jsx +60 -0
- package/tests/assets/components/create/Pega_DXIL_MyTestText/index.jsx +61 -0
- package/tests/assets/components/create/Pega_DXIL_MyTestText/mock.js +15 -0
- package/tests/assets/components/create/Pega_DXIL_MyTestText/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/component-constants.js +5 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/config.json +115 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/date.js +161 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/demo.stories.jsx +91 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/embed-utils.js +310 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/format-constants.js +41 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/index.jsx +1042 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/mock.js +69 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/picklist-utils.js +88 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/repeat-constants.js +20 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/repeat-utils.js +657 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +161 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyAutocomplete/utils.js +182 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/Boolean.js +38 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/boolean-format.js +27 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +145 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.stories.jsx +65 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/index.jsx +169 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/mock.js +23 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyBoolean/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/OneColumnPage.svg +36 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +23 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.jsx +91 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/index.jsx +72 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/mock.js +391 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +291 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.stories.jsx +67 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/index.jsx +297 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/mock.js +25 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyCurrency/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/DateFormatter.js +62 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/FormattedText.jsx +42 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +199 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/date.js +439 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.jsx +87 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/index.jsx +256 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/mock.js +25 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDate/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +256 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-time.js +93 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date-utils.js +288 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/date.js +331 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.jsx +87 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/index.jsx +253 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/mock.js +25 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDateTime/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +278 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.stories.jsx +61 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/index.jsx +270 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/mock.js +23 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDecimal/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/OneColumnDetails.svg +22 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/StatusWork.jsx +26 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +35 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.jsx +136 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/index.jsx +83 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/mock.js +192 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyDetails/utils.js +151 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +111 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.stories.jsx +59 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/index.jsx +232 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/mock.js +24 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyEmail/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/DefaultForm.svg +29 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +45 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/demo.stories.jsx +166 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/index.jsx +48 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/mock.js +139 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyForm/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +344 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.stories.jsx +61 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/index.jsx +334 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/mock.js +23 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyInteger/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/GetNextWork.jsx +33 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/OneColumnPage.svg +36 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +32 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.jsx +115 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/index.jsx +71 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/localizations.json +4 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/mock.js +96 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPage/utils.js +227 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Avatar.jsx +74 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/OneColumnPage.svg +36 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/Operator.jsx +237 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +66 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +81 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.jsx +110 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/mock.js +53 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/OneColumnPage.svg +36 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +59 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.jsx +30 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.jsx +48 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/mock.js +24 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPageWidget/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +111 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.stories.jsx +59 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/index.jsx +230 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/mock.js +22 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyParagraph/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +93 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.stories.jsx +61 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/index.jsx +276 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/mock.js +23 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPercentage/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +123 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.stories.jsx +59 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/index.jsx +266 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/mock.js +39 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPhone/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +114 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.stories.jsx +89 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/index.jsx +353 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/mock.js +69 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyPicklist/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/config.json +113 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/demo.stories.jsx +91 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/index.jsx +218 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/mock.js +69 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +161 -0
- package/{src/tasks/init/template/src/components/Organization_Library_VideoPlayer → tests/assets/components/createAll/Constellation/Pega_DXIL_MyText}/config.json +24 -13
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/demo.stories.jsx +60 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/index.jsx +61 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/mock.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyText/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/StatusWork.jsx +26 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +111 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.stories.jsx +61 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/index.jsx +239 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/mock.js +23 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTextInput/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +185 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.stories.jsx +70 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/index.jsx +214 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/mock.js +22 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/time-of-day.js +287 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/StatusWork.jsx +26 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/TwoColumnDetails.svg +28 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +42 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +139 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/index.jsx +83 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/mock.js +232 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/utils.js +151 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/TwoColumn.svg +38 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +27 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +175 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/index.jsx +48 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/mock.js +145 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +237 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/demo.stories.jsx +59 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/event-utils.js +18 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/index.jsx +232 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/mock.js +24 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/styles.js +15 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Constellation/Pega_DXIL_MyURL/text-url.jsx +175 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/component-constants.js +5 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/config.json +115 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/date.js +161 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/demo.stories.jsx +89 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/embed-utils.js +310 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/format-constants.js +41 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/index.jsx +1042 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/mock.js +69 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/picklist-utils.js +88 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/repeat-constants.js +20 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/repeat-utils.js +657 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/textformat-utils.jsx +161 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyAutocomplete/utils.js +182 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/Boolean.js +38 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/boolean-format.js +27 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/config.json +145 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.stories.jsx +65 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/index.jsx +169 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/mock.js +23 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyBoolean/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/OneColumnPage.svg +36 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/config.json +23 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.jsx +89 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/index.jsx +72 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/mock.js +391 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/config.json +291 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.stories.jsx +66 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/index.jsx +297 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/mock.js +25 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyCurrency/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/DateFormatter.js +62 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/FormattedText.jsx +42 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +199 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/date.js +439 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.jsx +87 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/index.jsx +256 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/mock.js +25 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDate/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/config.json +256 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-time.js +93 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date-utils.js +288 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/date.js +331 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.jsx +87 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/index.jsx +253 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/mock.js +25 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDateTime/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/config.json +278 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.stories.jsx +60 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/index.jsx +270 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/mock.js +23 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDecimal/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/OneColumnDetails.svg +22 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/StatusWork.jsx +26 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/config.json +35 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.jsx +137 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/index.jsx +83 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/mock.js +192 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyDetails/utils.js +151 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/config.json +111 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.stories.jsx +59 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/index.jsx +232 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/mock.js +24 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyEmail/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/DefaultForm.svg +29 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/config.json +45 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.stories.jsx +171 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/index.jsx +48 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/mock.js +139 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyForm/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/config.json +344 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.stories.jsx +60 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/index.jsx +334 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/mock.js +23 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyInteger/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/GetNextWork.jsx +33 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/OneColumnPage.svg +36 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/config.json +32 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.jsx +114 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/index.jsx +71 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/localizations.json +4 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/mock.js +96 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPage/utils.js +227 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Avatar.jsx +74 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/OneColumnPage.svg +36 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/Operator.jsx +279 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/config.json +55 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +85 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/index.jsx +80 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/mock.js +53 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/OneColumnPage.svg +36 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/config.json +59 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.jsx +28 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/index.jsx +48 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/mock.js +24 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/config.json +111 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.stories.jsx +59 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/index.jsx +230 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/mock.js +22 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyParagraph/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/config.json +93 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.stories.jsx +60 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/index.jsx +276 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/mock.js +23 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPercentage/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/config.json +123 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.stories.jsx +58 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/index.jsx +266 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/mock.js +39 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPhone/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/config.json +114 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.stories.jsx +89 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/index.jsx +353 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/mock.js +69 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyPicklist/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/config.json +113 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/demo.stories.jsx +89 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/index.jsx +218 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/mock.js +69 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyRadioButtons/textformat-utils.jsx +161 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/config.json +55 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/demo.stories.jsx +60 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/index.jsx +61 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/mock.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyText/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/StatusWork.jsx +26 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/config.json +111 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.stories.jsx +59 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/index.jsx +239 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/mock.js +23 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTextInput/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/config.json +185 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.stories.jsx +69 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/index.jsx +214 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/mock.js +22 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/time-of-day.js +287 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/StatusWork.jsx +26 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/TwoColumnDetails.svg +28 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/config.json +42 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +140 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/index.jsx +83 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/mock.js +232 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/utils.js +151 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/TwoColumn.svg +38 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/config.json +27 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +180 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/index.jsx +48 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/mock.js +145 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/config.json +237 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.stories.jsx +58 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/event-utils.js +18 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/index.jsx +232 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/mock.js +24 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/styles.js +15 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/suggestions-handler.js +9 -0
- package/tests/assets/components/createAll/Launchpad/Pega_DXIL_MyURL/text-url.jsx +175 -0
- package/tests/functional/localCreateAllListDeleteAll.test.js +163 -0
- package/tests/functional/localCreateBuildAllDeleteAll.test.js +157 -0
- package/tests/functional/localCreateBuildDelete.test.js +84 -0
- package/tests/functional/localCreateListDelete.test.js +108 -0
- package/tests/functional/localCreatePublishAllDeleteAll.test.js +157 -0
- package/tests/functional/localCreatePublishDelete.test.js +85 -0
- package/tests/functional/localCreateRenameDelete.test.js +84 -0
- package/tests/functional/localPromoteRevertWP.test.js +59 -0
- package/tests/unit/util.test.js +544 -0
- package/src/tasks/create/template/demo.stories.jsx.mustache +0 -44
- package/src/tasks/create/template/styles.js.mustache +0 -7
- package/src/tasks/init/template/.storybook/preview.tsx +0 -44
- package/src/tasks/init/template/src/components/MBTAList/MBTAList.stories.tsx +0 -10
- package/src/tasks/init/template/src/components/MBTAList/MBTAList.tsx +0 -122
- package/src/tasks/init/template/src/components/MBTAList/icons/accessible.icon.tsx +0 -14
- package/src/tasks/init/template/src/components/MBTAList/icons/bus.icon.tsx +0 -13
- package/src/tasks/init/template/src/components/MBTAList/icons/mbta.icon.tsx +0 -10
- package/src/tasks/init/template/src/components/MBTAList/icons/subway.icon.tsx +0 -14
- package/src/tasks/init/template/src/components/MBTAList/index.ts +0 -2
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURL.stories.tsx +0 -19
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURL.styles.ts +0 -5
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURL.types.ts +0 -10
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURLDisplay.tsx +0 -25
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURLInput.tsx +0 -24
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/config.json +0 -13
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/index.ts +0 -2
- package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/demo.stories.jsx +0 -40
- package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/index.jsx +0 -42
- package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/styles.js +0 -5
- /package/src/tasks/{publish/bundle → bundle}/builder/modules.js +0 -0
- /package/src/tasks/{publish/bundle → bundle}/builder/paths.js +0 -0
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import { URL, fileURLToPath } from 'url';
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import { promisify } from 'util';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
import inquirer from 'inquirer';
|
|
8
|
+
import ncp from 'ncp';
|
|
9
|
+
import chalk from 'chalk';
|
|
10
|
+
|
|
11
|
+
// eslint-disable-next-line import/order
|
|
12
|
+
import { checkPathAccess, showVersion ,
|
|
13
|
+
convertIntoPascalCase,
|
|
14
|
+
compileMustacheTemplate,
|
|
15
|
+
getComponentDirectoryPath,
|
|
16
|
+
getPegaServerConfig,
|
|
17
|
+
getComponents,
|
|
18
|
+
getComponentDefaults,
|
|
19
|
+
sanitize,
|
|
20
|
+
validateSemver
|
|
21
|
+
} from '../../util.js';
|
|
22
|
+
|
|
23
|
+
import { COMPONENT_SCHEMA, COMPONENTS_DIRECTORY_PATH, TASKS_CONFIG_JSON_FILENAME, COMPONENTS_PATH, CATEGORY_CONSTELLATION } from '../../constants.js';
|
|
24
|
+
|
|
25
|
+
export const DXCB_CONFIG_INTERNAL_JSON_FILENAME = 'src/dxcb.config.json';
|
|
26
|
+
|
|
27
|
+
const pegaConfigJsonPath = path.join(path.resolve(), TASKS_CONFIG_JSON_FILENAME);
|
|
28
|
+
|
|
29
|
+
const copy = promisify(ncp);
|
|
30
|
+
|
|
31
|
+
const copyComponentTemplate = async (options) => {
|
|
32
|
+
if (options.targetDirectory) {
|
|
33
|
+
return copy(options.templateDirectory, options.targetDirectory, {
|
|
34
|
+
clobber: false
|
|
35
|
+
});
|
|
36
|
+
} else {
|
|
37
|
+
return copy(options.templateDirectoryConstellation, options.targetDirectoryConstellation, {
|
|
38
|
+
clobber: false,
|
|
39
|
+
filter: (fileName) => {
|
|
40
|
+
// filter out the file config.json or config.json.mustache
|
|
41
|
+
if (fileName.indexOf('config.json') >= 0) return false;
|
|
42
|
+
else return true;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const compileMustacheTemplates = async (
|
|
49
|
+
componentDirectory,
|
|
50
|
+
{ componentKey, componentName, componentLabel, library, version, type, subtype, description, organization, allowedApplications }
|
|
51
|
+
) => {
|
|
52
|
+
const files = fs.readdirSync(componentDirectory);
|
|
53
|
+
const componentClassName = convertIntoPascalCase(componentKey);
|
|
54
|
+
|
|
55
|
+
const isTemplate = type === 'Template';
|
|
56
|
+
|
|
57
|
+
const isBool = subtype === 'Boolean';
|
|
58
|
+
const isPhone = subtype === 'Phone';
|
|
59
|
+
|
|
60
|
+
if (Array.isArray(subtype) && subtype.length === 1) {
|
|
61
|
+
subtype = subtype.toString();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
let mustacheSubType = subtype;
|
|
65
|
+
|
|
66
|
+
// overrides
|
|
67
|
+
if (typeof mustacheSubType === 'string') {
|
|
68
|
+
// eslint-disable-next-line default-case
|
|
69
|
+
switch (mustacheSubType) {
|
|
70
|
+
case 'FORM-region':
|
|
71
|
+
mustacheSubType = 'FORM';
|
|
72
|
+
break;
|
|
73
|
+
case 'DETAILS-region':
|
|
74
|
+
mustacheSubType = 'DETAILS';
|
|
75
|
+
break;
|
|
76
|
+
case 'Text-Input':
|
|
77
|
+
mustacheSubType = 'Text';
|
|
78
|
+
break;
|
|
79
|
+
case 'Picklist-Autocomplete':
|
|
80
|
+
mustacheSubType = 'Picklist';
|
|
81
|
+
break;
|
|
82
|
+
case 'Picklist-RadioButtons':
|
|
83
|
+
mustacheSubType = 'Picklist';
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const isPicklist = subtype === 'Picklist';
|
|
89
|
+
|
|
90
|
+
if (allowedApplications.trim() === '') {
|
|
91
|
+
allowedApplications = [];
|
|
92
|
+
} else {
|
|
93
|
+
if (allowedApplications.indexOf(',') !== -1) {
|
|
94
|
+
allowedApplications = allowedApplications.split(',');
|
|
95
|
+
}
|
|
96
|
+
allowedApplications = [].concat(allowedApplications);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
allowedApplications = allowedApplications.filter((el) => !!el.trim()).map((el) => el.trim());
|
|
100
|
+
files.forEach((file) => {
|
|
101
|
+
const filePath = path.join(componentDirectory, file);
|
|
102
|
+
|
|
103
|
+
const output = compileMustacheTemplate(filePath, {
|
|
104
|
+
COMPONENT_KEY: componentKey,
|
|
105
|
+
COMPONENT_NAME: componentName,
|
|
106
|
+
COMPONENT_LABEL: componentLabel,
|
|
107
|
+
COMPONENT_CLASS_NAME: componentClassName,
|
|
108
|
+
ORGANIZATION: organization,
|
|
109
|
+
VERSION: version,
|
|
110
|
+
LIBRARY: library,
|
|
111
|
+
ALLOWEDAPPS: JSON.stringify(allowedApplications),
|
|
112
|
+
TYPE: type,
|
|
113
|
+
SUB_TYPE: JSON.stringify(mustacheSubType),
|
|
114
|
+
DESCRIPTION: description || componentLabel,
|
|
115
|
+
IS_TEMPLATE: isTemplate,
|
|
116
|
+
IS_PICKLIST: isPicklist,
|
|
117
|
+
IS_BOOLEAN: isBool,
|
|
118
|
+
IS_PHONE: isPhone
|
|
119
|
+
});
|
|
120
|
+
fs.writeFileSync(filePath, output);
|
|
121
|
+
fs.renameSync(filePath, filePath.replace('.mustache', ''));
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export const validateCompile = async (
|
|
126
|
+
{ library, organization, componentName, componentLabel, version, framework, type, subtype, description, allowedApplications },
|
|
127
|
+
options
|
|
128
|
+
) => {
|
|
129
|
+
let sSubType = subtype;
|
|
130
|
+
if (Array.isArray(subtype)) {
|
|
131
|
+
sSubType = subtype.join('-');
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// await checkPathAccess(pegaConfigInternalJsonPath);
|
|
135
|
+
|
|
136
|
+
framework = convertIntoPascalCase(CATEGORY_CONSTELLATION);
|
|
137
|
+
|
|
138
|
+
const templateParentDir = `./templates/${framework}`;
|
|
139
|
+
|
|
140
|
+
let templateDir = `${templateParentDir}/${type}/${sSubType}`;
|
|
141
|
+
let templateDirectory = fileURLToPath(new URL(templateDir, import.meta.url));
|
|
142
|
+
templateDirectory = templateDirectory.replace(`${path.sep }create-all`, `${path.sep }create`);
|
|
143
|
+
|
|
144
|
+
const defaultPegaServerConfig = await getPegaServerConfig();
|
|
145
|
+
const isLaunchpad = defaultPegaServerConfig.serverType === 'launchpad';
|
|
146
|
+
const originalFramework = framework;
|
|
147
|
+
|
|
148
|
+
if (isLaunchpad) {
|
|
149
|
+
framework = "Launchpad";
|
|
150
|
+
|
|
151
|
+
templateDir = `./templates/${framework}/${type}/${sSubType}`;
|
|
152
|
+
templateDirectory = fileURLToPath(new URL(templateDir, import.meta.url));
|
|
153
|
+
templateDirectory = templateDirectory.replace(`${path.sep }create-all`, `${path.sep }create`);
|
|
154
|
+
|
|
155
|
+
// if doesn't exist, revert
|
|
156
|
+
if (!fs.existsSync(templateDirectory)) {
|
|
157
|
+
framework = originalFramework;
|
|
158
|
+
|
|
159
|
+
templateDir = `./templates/${framework}/${type}/${sSubType}`;
|
|
160
|
+
templateDirectory = fileURLToPath(new URL(templateDir, import.meta.url));
|
|
161
|
+
templateDirectory = templateDirectory.replace(`${path.sep }create-all`, `${path.sep }create`);
|
|
162
|
+
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
const componentKey = `${organization}_${library}_${componentName}`;
|
|
170
|
+
|
|
171
|
+
const targetDirectory = await getComponentDirectoryPath(componentKey);
|
|
172
|
+
|
|
173
|
+
const components = await getComponents(false);
|
|
174
|
+
|
|
175
|
+
if (components.includes(componentKey)) {
|
|
176
|
+
console.log(chalk.red(`${componentKey} component already exists in ${targetDirectory}`));
|
|
177
|
+
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// component
|
|
182
|
+
await copyComponentTemplate({
|
|
183
|
+
...options,
|
|
184
|
+
targetDirectory,
|
|
185
|
+
templateDirectory
|
|
186
|
+
});
|
|
187
|
+
await compileMustacheTemplates(targetDirectory, {
|
|
188
|
+
componentKey,
|
|
189
|
+
componentName,
|
|
190
|
+
componentLabel,
|
|
191
|
+
library,
|
|
192
|
+
version,
|
|
193
|
+
type,
|
|
194
|
+
subtype,
|
|
195
|
+
description,
|
|
196
|
+
organization,
|
|
197
|
+
allowedApplications
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
console.log(chalk.green(`created ${componentKey} component in ${targetDirectory}`));
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
export const validateCompileAll = async ({ prefix, library, version, allowedApplications, organization }, options) => {
|
|
204
|
+
// eslint-disable-next-line no-restricted-syntax, guard-for-in
|
|
205
|
+
for (const fieldIdx in COMPONENT_SCHEMA.subtype.field) {
|
|
206
|
+
const type = 'Field';
|
|
207
|
+
const subtype = COMPONENT_SCHEMA.subtype.field[fieldIdx].value;
|
|
208
|
+
const prefixNoSpace = prefix.replace(/\s+/g, '');
|
|
209
|
+
const componentNameNoSpace = COMPONENT_SCHEMA.subtype.field[fieldIdx].name.replace(/\s+/g, '');
|
|
210
|
+
const componentName = ''.concat(prefixNoSpace).concat(componentNameNoSpace);
|
|
211
|
+
const componentLabel = ''.concat(prefix).concat(' ').concat(COMPONENT_SCHEMA.subtype.field[fieldIdx].name);
|
|
212
|
+
const description = componentLabel;
|
|
213
|
+
|
|
214
|
+
// eslint-disable-next-line no-await-in-loop
|
|
215
|
+
await validateCompile(
|
|
216
|
+
{
|
|
217
|
+
library,
|
|
218
|
+
organization,
|
|
219
|
+
componentName,
|
|
220
|
+
componentLabel,
|
|
221
|
+
version,
|
|
222
|
+
type,
|
|
223
|
+
subtype,
|
|
224
|
+
description,
|
|
225
|
+
allowedApplications
|
|
226
|
+
},
|
|
227
|
+
options
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// eslint-disable-next-line no-restricted-syntax, guard-for-in
|
|
232
|
+
for (const templateIdx in COMPONENT_SCHEMA.subtype.template) {
|
|
233
|
+
const type = 'Template';
|
|
234
|
+
const subtype = COMPONENT_SCHEMA.subtype.template[templateIdx].value;
|
|
235
|
+
const prefixNoSpace = prefix.replace(/\s+/g, '');
|
|
236
|
+
const templateNameOriginal = COMPONENT_SCHEMA.subtype.template[templateIdx].name;
|
|
237
|
+
let templateName = convertIntoPascalCase(COMPONENT_SCHEMA.subtype.template[templateIdx].name);
|
|
238
|
+
let templateLabel = convertIntoPascalCase(COMPONENT_SCHEMA.subtype.template[templateIdx].name);
|
|
239
|
+
if (templateNameOriginal.indexOf('region') >= 0) {
|
|
240
|
+
const templateNameBase = convertIntoPascalCase(templateNameOriginal.replace(' region', ''));
|
|
241
|
+
templateName = 'TwoColumn'.concat(templateNameBase);
|
|
242
|
+
templateLabel = 'Two Column '.concat(templateNameBase);
|
|
243
|
+
}
|
|
244
|
+
const componentName = ''.concat(prefixNoSpace).concat(templateName);
|
|
245
|
+
const componentLabel = ''.concat(prefix).concat(' ').concat(templateLabel);
|
|
246
|
+
const description = componentLabel;
|
|
247
|
+
|
|
248
|
+
// eslint-disable-next-line no-await-in-loop
|
|
249
|
+
await validateCompile(
|
|
250
|
+
{
|
|
251
|
+
library,
|
|
252
|
+
organization,
|
|
253
|
+
componentName,
|
|
254
|
+
componentLabel,
|
|
255
|
+
version,
|
|
256
|
+
type,
|
|
257
|
+
subtype,
|
|
258
|
+
description,
|
|
259
|
+
allowedApplications
|
|
260
|
+
},
|
|
261
|
+
options
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// eslint-disable-next-line no-restricted-syntax, guard-for-in
|
|
266
|
+
for (const widgetIdx in COMPONENT_SCHEMA.subtype.widget) {
|
|
267
|
+
const type = 'Widget';
|
|
268
|
+
const subtype = COMPONENT_SCHEMA.subtype.widget[widgetIdx].value;
|
|
269
|
+
const prefixNoSpace = prefix.replace(/\s+/g, '');
|
|
270
|
+
const widgetNameOriginal = COMPONENT_SCHEMA.subtype.widget[widgetIdx].name;
|
|
271
|
+
let widgetName = convertIntoPascalCase(COMPONENT_SCHEMA.subtype.widget[widgetIdx].name).concat('Widget');
|
|
272
|
+
const widgetLabel = convertIntoPascalCase(COMPONENT_SCHEMA.subtype.widget[widgetIdx].name).concat(' Widget');
|
|
273
|
+
if (widgetName.indexOf('&') >= 0) {
|
|
274
|
+
widgetName = convertIntoPascalCase(widgetNameOriginal.replace(' & ', ''));
|
|
275
|
+
}
|
|
276
|
+
const componentName = ''.concat(prefixNoSpace).concat(widgetName);
|
|
277
|
+
const componentLabel = ''.concat(prefix).concat(' ').concat(widgetLabel);
|
|
278
|
+
const description = componentLabel;
|
|
279
|
+
|
|
280
|
+
// eslint-disable-next-line no-await-in-loop
|
|
281
|
+
await validateCompile(
|
|
282
|
+
{
|
|
283
|
+
library,
|
|
284
|
+
organization,
|
|
285
|
+
componentName,
|
|
286
|
+
componentLabel,
|
|
287
|
+
version,
|
|
288
|
+
type,
|
|
289
|
+
subtype,
|
|
290
|
+
description,
|
|
291
|
+
allowedApplications
|
|
292
|
+
},
|
|
293
|
+
options
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
export default async (options) => {
|
|
301
|
+
showVersion();
|
|
302
|
+
|
|
303
|
+
await checkPathAccess(pegaConfigJsonPath);
|
|
304
|
+
|
|
305
|
+
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
306
|
+
data = data && JSON.parse(data);
|
|
307
|
+
|
|
308
|
+
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
309
|
+
console.error(`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`);
|
|
310
|
+
process.exit(1);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
const componentData = data[COMPONENTS_PATH];
|
|
314
|
+
|
|
315
|
+
let library;
|
|
316
|
+
({ library } = componentData);
|
|
317
|
+
let { organization } = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8'));
|
|
318
|
+
|
|
319
|
+
const componentDefaults = await getComponentDefaults();
|
|
320
|
+
componentDefaults.library = library;
|
|
321
|
+
|
|
322
|
+
if (options.params.length >= 8) {
|
|
323
|
+
const prefix = options.params[3];
|
|
324
|
+
const version = options.params[4];
|
|
325
|
+
library = options.params[5];
|
|
326
|
+
const allowedApplications = options.params[6];
|
|
327
|
+
|
|
328
|
+
// overwrite
|
|
329
|
+
organization = options.params[7];
|
|
330
|
+
|
|
331
|
+
await validateCompileAll(
|
|
332
|
+
{
|
|
333
|
+
prefix,
|
|
334
|
+
library,
|
|
335
|
+
version,
|
|
336
|
+
allowedApplications,
|
|
337
|
+
organization
|
|
338
|
+
},
|
|
339
|
+
options
|
|
340
|
+
);
|
|
341
|
+
} else {
|
|
342
|
+
const questions = [
|
|
343
|
+
{
|
|
344
|
+
name: 'prefix',
|
|
345
|
+
message: 'Enter prefix label'
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
name: 'version',
|
|
349
|
+
message: 'Enter component version',
|
|
350
|
+
default: componentDefaults.version,
|
|
351
|
+
validate: (value) => {
|
|
352
|
+
if (validateSemver(value)) {
|
|
353
|
+
return true;
|
|
354
|
+
}
|
|
355
|
+
return 'Please provide semver compatible version e.g 0.0.1';
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
name: 'library',
|
|
360
|
+
message: 'Enter library name (required)',
|
|
361
|
+
default: componentDefaults.library,
|
|
362
|
+
validate: (value) => {
|
|
363
|
+
/* value should not be empty
|
|
364
|
+
It should not have spaces
|
|
365
|
+
It should not start with a number
|
|
366
|
+
Only case-insensitive alphanumeric values are allowed
|
|
367
|
+
*/
|
|
368
|
+
if (value && !/^\d/.test(value) && value === sanitize(value)) {
|
|
369
|
+
return true;
|
|
370
|
+
}
|
|
371
|
+
return 'Only alphanumeric values are allowed, starting with alphabets';
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
name: 'allowedApplications',
|
|
376
|
+
message: 'Please enter the application names to be supported (comma-separated). ',
|
|
377
|
+
suffix: 'Keep empty for all applications'
|
|
378
|
+
}
|
|
379
|
+
];
|
|
380
|
+
|
|
381
|
+
await inquirer.prompt(questions).then(async (answers) => {
|
|
382
|
+
({library} = answers);
|
|
383
|
+
const { version, allowedApplications } = answers;
|
|
384
|
+
let { prefix } = answers;
|
|
385
|
+
prefix = prefix.replace(/[^a-zA-Z0-9 ]/g, '');
|
|
386
|
+
await validateCompileAll(
|
|
387
|
+
{
|
|
388
|
+
prefix,
|
|
389
|
+
library,
|
|
390
|
+
version,
|
|
391
|
+
allowedApplications,
|
|
392
|
+
organization
|
|
393
|
+
},
|
|
394
|
+
options
|
|
395
|
+
);
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
};
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
1
2
|
import chalk from 'chalk';
|
|
2
3
|
import inquirer from 'inquirer';
|
|
3
4
|
import ora from 'ora';
|
|
4
5
|
|
|
5
|
-
import
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { join } from 'path';
|
|
8
|
+
|
|
6
9
|
import {
|
|
7
|
-
constructCompleteUrl,
|
|
8
10
|
deleteLocalComponent,
|
|
9
|
-
|
|
11
|
+
deleteInfinityServerComponent,
|
|
12
|
+
deleteLaunchpadServerComponent,
|
|
10
13
|
getComponents,
|
|
11
14
|
getPegaServerConfig,
|
|
12
|
-
|
|
15
|
+
standardizeStr,
|
|
16
|
+
sanitize
|
|
13
17
|
} from '../../util.js';
|
|
14
18
|
import { getComponentsFromServer } from '../list/helper.js';
|
|
15
19
|
|
|
20
|
+
import { TASKS_CONFIG_JSON_FILENAME, COMPONENTS_DIRECTORY_PATH, COMPONENTS_PATH } from '../../constants.js';
|
|
21
|
+
|
|
16
22
|
export const SOURCE_OF_COMPONENT_TYPES = {
|
|
17
23
|
SERVER: 'Server',
|
|
18
24
|
LOCAL: 'Local'
|
|
19
25
|
};
|
|
20
26
|
|
|
21
|
-
|
|
27
|
+
let library;
|
|
28
|
+
let organization;
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export const getDeleteComponentsQuestions = async (options) => {
|
|
22
32
|
const defaultPegaServerConfig = await getPegaServerConfig();
|
|
23
33
|
|
|
24
34
|
return [
|
|
@@ -35,26 +45,82 @@ export const getDeleteComponentsQuestions = async (options, sourceOfComponentsOp
|
|
|
35
45
|
];
|
|
36
46
|
};
|
|
37
47
|
|
|
38
|
-
export const
|
|
48
|
+
export const getLaunchPadFilterQuestions = async () => {
|
|
49
|
+
const defaultPegaServerConfig = await getPegaServerConfig();
|
|
50
|
+
|
|
51
|
+
const currentDirectory = process.cwd();
|
|
52
|
+
const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
53
|
+
|
|
54
|
+
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
55
|
+
data = data && JSON.parse(data);
|
|
56
|
+
|
|
57
|
+
if (!data[COMPONENTS_DIRECTORY_PATH]) {
|
|
58
|
+
console.error(
|
|
59
|
+
`${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
|
|
60
|
+
);
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const componentData = data[COMPONENTS_PATH];
|
|
65
|
+
|
|
66
|
+
({ library } = componentData);
|
|
67
|
+
({ organization } = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8')));
|
|
68
|
+
|
|
69
|
+
return [
|
|
70
|
+
{
|
|
71
|
+
name: 'organization',
|
|
72
|
+
message: 'Enter component organization (required)',
|
|
73
|
+
default: organization,
|
|
74
|
+
validate: value => {
|
|
75
|
+
if (value) {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
return 'Please provide value for organization';
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'library',
|
|
83
|
+
message: 'Enter library name (required)',
|
|
84
|
+
default: library,
|
|
85
|
+
validate: value => {
|
|
86
|
+
if (value) {
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
return 'Please provide value for library';
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const deleteLocalComponents = async (sourceOfComponents, options) => {
|
|
39
96
|
const localComponents = await getComponents();
|
|
40
97
|
|
|
41
98
|
if (localComponents.length > 0) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
99
|
+
if (options.params.length >= 6) {
|
|
100
|
+
const componentKey = options.params[4];
|
|
101
|
+
const sDeletion = options.params[5];
|
|
102
|
+
const confirmDeletion = sDeletion === 'Y' || sDeletion === 'y' || sDeletion === true || sDeletion === 'true';
|
|
103
|
+
if (confirmDeletion) {
|
|
104
|
+
await deleteLocalComponent(componentKey);
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
const answers = await inquirer.prompt([
|
|
108
|
+
{
|
|
109
|
+
name: 'componentKey',
|
|
110
|
+
type: 'rawlist',
|
|
111
|
+
message: 'Select component to delete',
|
|
112
|
+
choices: localComponents
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'confirmDeletion',
|
|
116
|
+
type: 'confirm',
|
|
117
|
+
message: 'Are you sure ?',
|
|
118
|
+
default: false
|
|
119
|
+
}
|
|
120
|
+
]);
|
|
121
|
+
if (answers.confirmDeletion) {
|
|
122
|
+
await deleteLocalComponent(answers.componentKey);
|
|
54
123
|
}
|
|
55
|
-
]);
|
|
56
|
-
if (answers.confirmDeletion) {
|
|
57
|
-
await deleteLocalComponent(answers.componentKey);
|
|
58
124
|
}
|
|
59
125
|
} else {
|
|
60
126
|
console.log(chalk.bold.redBright(`No custom components in ${sourceOfComponents}`));
|
|
@@ -62,44 +128,85 @@ export const deleteLocalComponents = async sourceOfComponents => {
|
|
|
62
128
|
};
|
|
63
129
|
|
|
64
130
|
export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
65
|
-
const spinner = ora('Fetching components from server').start();
|
|
66
|
-
const data = await getComponentsFromServer(answers);
|
|
67
131
|
|
|
68
|
-
const
|
|
132
|
+
const defaultPegaServerConfig = await getPegaServerConfig();
|
|
133
|
+
const isLaunchpad = defaultPegaServerConfig.serverType === 'launchpad';
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
if (isLaunchpad) {
|
|
137
|
+
const questions = await getLaunchPadFilterQuestions();
|
|
138
|
+
const lpAnswers = await inquirer.prompt(questions);
|
|
139
|
+
|
|
140
|
+
({library, organization} = lpAnswers);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const spinner = ora('Fetching components from server').start();
|
|
144
|
+
const data = await getComponentsFromServer(library, organization);
|
|
69
145
|
spinner.stop();
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const value = `${label}~|~${pyRuleSet}~|~${pyRuleSetVersion}`;
|
|
78
|
-
const short = `Selected component : ${chalk.redBright(
|
|
79
|
-
`${label} ${pyRuleSet} : ${pyRuleSetVersion}`
|
|
80
|
-
)}`;
|
|
81
|
-
|
|
82
|
-
return { name, value, short };
|
|
83
|
-
});
|
|
84
|
-
const answers = await inquirer.prompt({
|
|
85
|
-
name: 'componentToDelete',
|
|
86
|
-
type: 'rawlist',
|
|
87
|
-
pageSize: 10,
|
|
88
|
-
message: `Select component to delete \n ${standardizeStr('Rule name', 48)} ${standardizeStr(
|
|
89
|
-
'Ruleset name',
|
|
90
|
-
30
|
|
91
|
-
)} ${standardizeStr('Ruleset version', 22)}`,
|
|
92
|
-
choices: choicesArr
|
|
93
|
-
});
|
|
94
|
-
await deleteServerComponent(answers.componentToDelete);
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
let serverComponents;
|
|
149
|
+
if (isLaunchpad) {
|
|
150
|
+
serverComponents = data;
|
|
151
|
+
|
|
95
152
|
} else {
|
|
96
|
-
|
|
153
|
+
try {
|
|
154
|
+
if (typeof data === 'object') {
|
|
155
|
+
serverComponents = data.pxResults;
|
|
156
|
+
} else {
|
|
157
|
+
serverComponents = JSON.parse(data).pxResults;
|
|
158
|
+
}
|
|
159
|
+
} catch (ex) {
|
|
160
|
+
/* empty */
|
|
161
|
+
}
|
|
97
162
|
}
|
|
98
|
-
};
|
|
99
163
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
164
|
+
|
|
165
|
+
if (serverComponents && serverComponents?.length > 0) {
|
|
166
|
+
if (isLaunchpad) {
|
|
167
|
+
const choicesArr = serverComponents.map(({ name: componentName, type, version }) => {
|
|
168
|
+
const name = `${standardizeStr(componentName, 45)} ${standardizeStr(type, 20)} ${standardizeStr(version, 20)}`;
|
|
169
|
+
|
|
170
|
+
const value = `${componentName}~|~${type}~|~${version}`;
|
|
171
|
+
const short = `\n Selected component : ${chalk.redBright(`${componentName} ${type} : ${version}`)}`;
|
|
172
|
+
|
|
173
|
+
return { name, value, short };
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
const launchpadAnswers = await inquirer.prompt({
|
|
177
|
+
name: 'componentToDelete',
|
|
178
|
+
type: 'rawlist',
|
|
179
|
+
pageSize: 10,
|
|
180
|
+
message: `Select component to delete \n ${standardizeStr('Component Name', 48)} ${standardizeStr('Type', 20)} ${standardizeStr(
|
|
181
|
+
'Version',
|
|
182
|
+
22
|
|
183
|
+
)}`,
|
|
184
|
+
choices: choicesArr
|
|
185
|
+
});
|
|
186
|
+
await deleteLaunchpadServerComponent(launchpadAnswers.componentToDelete);
|
|
187
|
+
} else {
|
|
188
|
+
// logic for Infinity
|
|
189
|
+
const choicesArr = serverComponents.map(({ label, pyRuleSet, pyRuleSetVersion }) => {
|
|
190
|
+
const name = `${standardizeStr(label, 45)} ${standardizeStr(pyRuleSet, 30)} ${standardizeStr(pyRuleSetVersion, 20)}`;
|
|
191
|
+
|
|
192
|
+
const value = `${label}~|~${pyRuleSet}~|~${pyRuleSetVersion}`;
|
|
193
|
+
const short = `\n Selected component : ${chalk.redBright(`${label} ${pyRuleSet} : ${pyRuleSetVersion}`)}`;
|
|
194
|
+
|
|
195
|
+
return { name, value, short };
|
|
196
|
+
});
|
|
197
|
+
const infinityAnswers = await inquirer.prompt({
|
|
198
|
+
name: 'componentToDelete',
|
|
199
|
+
type: 'rawlist',
|
|
200
|
+
pageSize: 10,
|
|
201
|
+
message: `Select component to delete \n ${standardizeStr('Rule name', 48)} ${standardizeStr('Ruleset name', 30)} ${standardizeStr(
|
|
202
|
+
'Ruleset version',
|
|
203
|
+
22
|
|
204
|
+
)}`,
|
|
205
|
+
choices: choicesArr
|
|
206
|
+
});
|
|
207
|
+
await deleteInfinityServerComponent(infinityAnswers.componentToDelete);
|
|
208
|
+
}
|
|
209
|
+
} else {
|
|
210
|
+
console.log(chalk.bold.redBright(`No custom components in ${sourceOfComponents}`));
|
|
103
211
|
}
|
|
104
|
-
return str;
|
|
105
212
|
};
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import inquirer from 'inquirer';
|
|
2
|
-
import ora from 'ora';
|
|
3
|
-
import chalk from 'chalk';
|
|
4
2
|
|
|
5
|
-
import {
|
|
6
|
-
deleteLocalComponents,
|
|
7
|
-
SOURCE_OF_COMPONENT_TYPES,
|
|
8
|
-
deleteServerComponents,
|
|
9
|
-
getDeleteComponentsQuestions
|
|
10
|
-
} from './helper.js';
|
|
3
|
+
import { showVersion } from '../../util.js';
|
|
11
4
|
|
|
12
|
-
|
|
5
|
+
import { deleteLocalComponents, SOURCE_OF_COMPONENT_TYPES, deleteServerComponents, getDeleteComponentsQuestions } from './helper.js';
|
|
6
|
+
|
|
7
|
+
const deleteComponentsFn = async (sourceOfComponents, answers, options) => {
|
|
13
8
|
switch (sourceOfComponents) {
|
|
14
9
|
case SOURCE_OF_COMPONENT_TYPES.LOCAL: {
|
|
15
|
-
await deleteLocalComponents(sourceOfComponents);
|
|
10
|
+
await deleteLocalComponents(sourceOfComponents, options);
|
|
16
11
|
break;
|
|
17
12
|
}
|
|
18
13
|
case SOURCE_OF_COMPONENT_TYPES.SERVER: {
|
|
@@ -26,20 +21,22 @@ const deleteComponentsFn = async (sourceOfComponents, answers) => {
|
|
|
26
21
|
}
|
|
27
22
|
};
|
|
28
23
|
|
|
29
|
-
export default async options => {
|
|
24
|
+
export default async (options) => {
|
|
25
|
+
showVersion();
|
|
26
|
+
|
|
30
27
|
let sourceOfComponentsOption = SOURCE_OF_COMPONENT_TYPES.LOCAL;
|
|
31
28
|
if (options.params[3] === SOURCE_OF_COMPONENT_TYPES.LOCAL) {
|
|
32
29
|
sourceOfComponentsOption = options.params[3];
|
|
33
|
-
await deleteComponentsFn(sourceOfComponentsOption);
|
|
30
|
+
await deleteComponentsFn(sourceOfComponentsOption, null, options);
|
|
34
31
|
} else if (options.params[3] === SOURCE_OF_COMPONENT_TYPES.SERVER) {
|
|
35
32
|
sourceOfComponentsOption = options.params[3];
|
|
36
33
|
const questions = await getDeleteComponentsQuestions(options, sourceOfComponentsOption);
|
|
37
34
|
const answers = await inquirer.prompt(questions);
|
|
38
|
-
await deleteComponentsFn(sourceOfComponentsOption, answers);
|
|
35
|
+
await deleteComponentsFn(sourceOfComponentsOption, answers, options);
|
|
39
36
|
} else {
|
|
40
37
|
const questions = await getDeleteComponentsQuestions(options);
|
|
41
38
|
const answers = await inquirer.prompt(questions);
|
|
42
39
|
const { sourceOfComponents } = answers;
|
|
43
|
-
await deleteComponentsFn(sourceOfComponents, answers);
|
|
40
|
+
await deleteComponentsFn(sourceOfComponents, answers, options);
|
|
44
41
|
}
|
|
45
42
|
};
|