@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,116 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
import fetch from 'node-fetch';
|
|
5
|
+
import AdmZip from 'adm-zip';
|
|
6
|
+
import chalk from 'chalk';
|
|
7
|
+
|
|
8
|
+
import { constructCompleteUrl, getComponentDirectoryPath, getComponents, getPegaServerConfig, getHttpsAgent } from '../../util.js';
|
|
9
|
+
import { PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT, TOKEN_PATH } from '../../constants.js';
|
|
10
|
+
|
|
11
|
+
export const getPublishComponentQuestions = async () => {
|
|
12
|
+
const components = await getComponents();
|
|
13
|
+
|
|
14
|
+
if (components.length === 0) {
|
|
15
|
+
console.log(chalk.redBright('No components to build'));
|
|
16
|
+
process.exit();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const defaultPegaConfig = await getPegaServerConfig();
|
|
20
|
+
|
|
21
|
+
return [
|
|
22
|
+
{
|
|
23
|
+
name: 'componentKey',
|
|
24
|
+
type: 'rawlist',
|
|
25
|
+
message: 'Select component to build',
|
|
26
|
+
choices: components
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'sourceMap',
|
|
30
|
+
message: 'Generate source map ?',
|
|
31
|
+
default: defaultPegaConfig.sourceMap,
|
|
32
|
+
// eslint-disable-next-line sonarjs/no-redundant-boolean
|
|
33
|
+
when: () => false && !process.env.SOURCE_MAP
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: 'devBuild',
|
|
37
|
+
type: 'confirm',
|
|
38
|
+
message: 'Generate development build ?',
|
|
39
|
+
default: defaultPegaConfig.devBuild
|
|
40
|
+
}
|
|
41
|
+
];
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const zipComponent = async (componentKey) => {
|
|
45
|
+
const srcDirectory = await getComponentDirectoryPath(componentKey);
|
|
46
|
+
const buildDirectory = await path.join(path.resolve(), 'dist/components', componentKey);
|
|
47
|
+
const configJson = `${srcDirectory}/config.json`;
|
|
48
|
+
|
|
49
|
+
const zip = new AdmZip();
|
|
50
|
+
|
|
51
|
+
zip.addLocalFolder(srcDirectory, 'src/');
|
|
52
|
+
zip.addLocalFile(configJson);
|
|
53
|
+
zip.addLocalFolder(buildDirectory);
|
|
54
|
+
const zipContent = zip.toBuffer().toString('base64');
|
|
55
|
+
|
|
56
|
+
const configContent = Buffer.from(fs.readFileSync(`${srcDirectory}/config.json`)).toString();
|
|
57
|
+
fs.rmdir('dist', { recursive: true }, (err) => {
|
|
58
|
+
if (err) {
|
|
59
|
+
throw err;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
return { zipContent, configContent };
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const publishComponentToServer = async (data) => {
|
|
66
|
+
const { configContent, zipContent, rulesetName, rulesetVersion } = data;
|
|
67
|
+
|
|
68
|
+
const apiBody = {
|
|
69
|
+
configContent,
|
|
70
|
+
zipContent,
|
|
71
|
+
componentKey: JSON.parse(configContent).componentKey,
|
|
72
|
+
publishFor: 'constellation',
|
|
73
|
+
rulesetName,
|
|
74
|
+
rulesetVersion,
|
|
75
|
+
category: ''
|
|
76
|
+
};
|
|
77
|
+
const defaultPegaConfig = await getPegaServerConfig();
|
|
78
|
+
const url = constructCompleteUrl(defaultPegaConfig.server, PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT);
|
|
79
|
+
try {
|
|
80
|
+
const OauthData = fs.readFileSync(TOKEN_PATH, 'utf8');
|
|
81
|
+
if (OauthData) {
|
|
82
|
+
const { access_token: accessToken, token_type: tokenType } = JSON.parse(OauthData);
|
|
83
|
+
let status = 500;
|
|
84
|
+
fetch(url, {
|
|
85
|
+
method: 'POST',
|
|
86
|
+
agent: getHttpsAgent(defaultPegaConfig),
|
|
87
|
+
headers: {
|
|
88
|
+
Authorization: `${tokenType} ${accessToken}`
|
|
89
|
+
},
|
|
90
|
+
body: JSON.stringify(apiBody)
|
|
91
|
+
})
|
|
92
|
+
.then((response) => {
|
|
93
|
+
status = response.status;
|
|
94
|
+
return response.text();
|
|
95
|
+
})
|
|
96
|
+
.then((resp) => {
|
|
97
|
+
const respData = JSON.parse(resp);
|
|
98
|
+
if (status === 401) {
|
|
99
|
+
throw new Error('Error occurred in authentication. Please regenerate using authenticate');
|
|
100
|
+
// console.log(accessTokenUri, refreshToken);
|
|
101
|
+
/* TODO - Handle refresh_token */
|
|
102
|
+
} else if (status === 200) {
|
|
103
|
+
console.log(chalk.bold.green(`Success : ${respData.message}`));
|
|
104
|
+
} else {
|
|
105
|
+
throw new Error(`${respData.message}`);
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
|
109
|
+
.catch((e) => Promise.reject(`${chalk.bold.red(e)}`));
|
|
110
|
+
} else {
|
|
111
|
+
throw new Error(`Error occurred in authentication. Please regenerate using authenticate`);
|
|
112
|
+
}
|
|
113
|
+
} catch (err) {
|
|
114
|
+
throw new Error(`Error occurred in authentication. Please regenerate using authenticate`);
|
|
115
|
+
}
|
|
116
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import inquirer from 'inquirer';
|
|
2
|
+
import { Listr } from 'listr2';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
|
|
5
|
+
import validate from '../validator/index.js';
|
|
6
|
+
|
|
7
|
+
import bundleComponent from '../bundle/index.js';
|
|
8
|
+
import lintComponent from '../linter/index.js';
|
|
9
|
+
import { getPublishComponentQuestions } from './helper.js';
|
|
10
|
+
import { getComponentDirectoryPath, showVersion } from '../../util.js';
|
|
11
|
+
|
|
12
|
+
export default async options => {
|
|
13
|
+
showVersion();
|
|
14
|
+
|
|
15
|
+
let componentKey;
|
|
16
|
+
let sourceMap;
|
|
17
|
+
let devBuild;
|
|
18
|
+
let content;
|
|
19
|
+
|
|
20
|
+
if (options.params.length >= 6) {
|
|
21
|
+
componentKey = options.params[3];
|
|
22
|
+
sourceMap = options.params[4];
|
|
23
|
+
const dBuild = options.params[5];
|
|
24
|
+
devBuild = (dBuild === 'Y' ||
|
|
25
|
+
dBuild === 'y' ||
|
|
26
|
+
dBuild === true ||
|
|
27
|
+
dBuild === 'true') ? true : false;
|
|
28
|
+
|
|
29
|
+
content = { componentKey, sourceMap, devBuild};
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
const questions = await getPublishComponentQuestions();
|
|
33
|
+
const answers = await inquirer.prompt(questions);
|
|
34
|
+
({ componentKey, sourceMap, devBuild } = answers);
|
|
35
|
+
|
|
36
|
+
content = {
|
|
37
|
+
...answers
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
const sDevBuild = devBuild ? '(dev build)' : '';
|
|
44
|
+
const tasks = new Listr(
|
|
45
|
+
[
|
|
46
|
+
{
|
|
47
|
+
title: 'Validate config schema',
|
|
48
|
+
task: async () => {
|
|
49
|
+
await validate(componentKey);
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
title: 'Lint component',
|
|
54
|
+
task: async () => {
|
|
55
|
+
const targetDirectory = await getComponentDirectoryPath(componentKey);
|
|
56
|
+
// console.log(`in buildComponent Lint component task: componentKey: ${componentKey} targetDirectory: ${targetDirectory}`);
|
|
57
|
+
await lintComponent(targetDirectory);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: `Bundle Component ${sDevBuild}`,
|
|
62
|
+
type: 'confirm',
|
|
63
|
+
task: async () => await bundleComponent(componentKey, sourceMap, devBuild),
|
|
64
|
+
skip: () => (options.skipBundle ? 'Skipped bundling component' : undefined)
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
{
|
|
68
|
+
exitOnError: true
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
await tasks.run().catch(err => {
|
|
73
|
+
console.log(chalk.bold.red(err.toString()));
|
|
74
|
+
});
|
|
75
|
+
return true;
|
|
76
|
+
};
|
|
@@ -4,7 +4,12 @@ import webpack from 'webpack';
|
|
|
4
4
|
import FileSizeReporter from 'react-dev-utils/FileSizeReporter.js';
|
|
5
5
|
import printBuildError from 'react-dev-utils/printBuildError.js';
|
|
6
6
|
|
|
7
|
+
|
|
8
|
+
// used by promote and revert webPack commands, do not change
|
|
7
9
|
import configFactory from './webpack.config.js';
|
|
10
|
+
// import configFactory from '../../../../../../../webpack.config.js';
|
|
11
|
+
// do not change
|
|
12
|
+
|
|
8
13
|
import paths from './paths.js';
|
|
9
14
|
|
|
10
15
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
@@ -36,13 +41,40 @@ const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild;
|
|
|
36
41
|
const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024;
|
|
37
42
|
const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024;
|
|
38
43
|
|
|
44
|
+
let compilationErrors = null;
|
|
45
|
+
|
|
39
46
|
// Create the build and print the deployment instructions.
|
|
40
47
|
function build(config, previousFileSizes) {
|
|
41
48
|
console.log(`Creating a ${Env} build...`);
|
|
42
49
|
|
|
50
|
+
|
|
51
|
+
|
|
43
52
|
const compiler = webpack(config);
|
|
44
53
|
return new Promise((resolve, reject) => {
|
|
45
54
|
compiler.run((err, stats) => {
|
|
55
|
+
|
|
56
|
+
if (err != null && typeof (err) == "object") {
|
|
57
|
+
if (err.error != undefined) {
|
|
58
|
+
//store and print elsewhere
|
|
59
|
+
compilationErrors = err.error;
|
|
60
|
+
//console.log("err:" + err);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (stats != null & typeof(stats) == "object") {
|
|
64
|
+
if (stats.errors != undefined) {
|
|
65
|
+
console.log("stats:" + stats);
|
|
66
|
+
}
|
|
67
|
+
else if (stats.compilation != undefined && stats.compilation.errors != undefined) {
|
|
68
|
+
|
|
69
|
+
//store and print elsewhere
|
|
70
|
+
compilationErrors = stats.compilation.errors;
|
|
71
|
+
|
|
72
|
+
console.log("stats:" + stats);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
46
78
|
let messages;
|
|
47
79
|
if (err) {
|
|
48
80
|
if (!err.message) {
|
|
@@ -131,7 +163,11 @@ export default ({
|
|
|
131
163
|
.then(
|
|
132
164
|
({ stats, previousFileSizes, warnings }) => {
|
|
133
165
|
if (warnings.length) {
|
|
134
|
-
console.log(chalk.yellow('Compiled with warnings.\n'), warnings[0].message);
|
|
166
|
+
//console.log(chalk.yellow('Compiled with warnings.\n'), warnings[0].message);
|
|
167
|
+
console.log(chalk.yellow('Compiled with warnings.\n'));
|
|
168
|
+
for (let warning in warnings) {
|
|
169
|
+
console.log(chalk.yellow("Warning.."), warnings[warning].message);
|
|
170
|
+
}
|
|
135
171
|
} else {
|
|
136
172
|
console.log(chalk.green('Compiled successfully.\n'));
|
|
137
173
|
}
|
|
@@ -146,7 +182,7 @@ export default ({
|
|
|
146
182
|
);
|
|
147
183
|
resolve('done emitting');
|
|
148
184
|
},
|
|
149
|
-
err
|
|
185
|
+
err => {
|
|
150
186
|
reject();
|
|
151
187
|
const tscCompileOnError = process.env.TSC_COMPILE_ON_ERROR === 'true';
|
|
152
188
|
if (tscCompileOnError) {
|
|
@@ -156,11 +192,24 @@ export default ({
|
|
|
156
192
|
)
|
|
157
193
|
);
|
|
158
194
|
printBuildError(err);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
|
|
195
|
+
}
|
|
196
|
+
else if (compilationErrors != null) {
|
|
197
|
+
if (compilationErrors.length == undefined) {
|
|
198
|
+
console.log(chalk.red("Error..."), compilationErrors.message);
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
for (let error in compilationErrors) {
|
|
202
|
+
console.log(chalk.red("Error..."), compilationErrors[error].message);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
162
206
|
process.exit(1);
|
|
163
207
|
}
|
|
208
|
+
else {
|
|
209
|
+
console.log(chalk.red('Failed to compile.\n'));
|
|
210
|
+
printBuildError(JSON.stringify(err));
|
|
211
|
+
|
|
212
|
+
}
|
|
164
213
|
}
|
|
165
214
|
)
|
|
166
215
|
.catch(err => {
|
|
@@ -103,21 +103,19 @@ export default (
|
|
|
103
103
|
return loaders;
|
|
104
104
|
};
|
|
105
105
|
return {
|
|
106
|
-
mode:
|
|
106
|
+
mode: devBuild ? 'development' : 'production',
|
|
107
107
|
// Stop compilation early in production
|
|
108
108
|
bail: isEnvProduction,
|
|
109
109
|
// These are the "entry points" to our application.
|
|
110
110
|
// This means they will be the "root" imports that are included in JS bundle.
|
|
111
111
|
entry: inputFile,
|
|
112
|
-
devtool:
|
|
112
|
+
devtool: devBuild ? 'eval-cheap-module-source-map' : false,
|
|
113
113
|
output: {
|
|
114
114
|
// The build folder.
|
|
115
115
|
path: paths.appBuild,
|
|
116
116
|
// There will be one main bundle, and one file per asynchronous chunk.
|
|
117
117
|
// In development, it does not produce real files.
|
|
118
|
-
filename: isEnvProduction
|
|
119
|
-
? `${componentKey}/${componentKey}.js`
|
|
120
|
-
: isEnvDevelopment && `${componentKey}/${componentKey}.js`,
|
|
118
|
+
filename: isEnvProduction ? `${componentKey}/${componentKey}.js` : isEnvDevelopment && `${componentKey}/${componentKey}.js`,
|
|
121
119
|
chunkFilename: isEnvProduction
|
|
122
120
|
? `${componentKey}/js/[name].[contenthash:8].chunk.js`
|
|
123
121
|
: isEnvDevelopment && `${componentKey}/js/[name].chunk.js`,
|
|
@@ -125,7 +123,8 @@ export default (
|
|
|
125
123
|
name: componentKey,
|
|
126
124
|
type: 'umd',
|
|
127
125
|
export: 'default'
|
|
128
|
-
}
|
|
126
|
+
},
|
|
127
|
+
publicPath: ''
|
|
129
128
|
},
|
|
130
129
|
optimization: {
|
|
131
130
|
minimize: isEnvProduction,
|
|
@@ -310,18 +309,32 @@ export default (
|
|
|
310
309
|
resourceRegExp: /^\.\/icons$/,
|
|
311
310
|
contextRegExp: /@pega\/cosmos-react-core\/lib\/components\/Icon$/
|
|
312
311
|
}),
|
|
312
|
+
|
|
313
313
|
/* Ignore cosmos icons - windows */
|
|
314
314
|
new webpack.IgnorePlugin({
|
|
315
315
|
resourceRegExp: /^\.\/icons$/,
|
|
316
316
|
contextRegExp: /@pega\\cosmos-react-core\\lib\\components\\Icon$/
|
|
317
317
|
}),
|
|
318
|
+
|
|
319
|
+
/* Ignore cosmos streamline-icons */
|
|
320
|
+
new webpack.IgnorePlugin({
|
|
321
|
+
resourceRegExp: /^\.\/streamline-icons$/,
|
|
322
|
+
contextRegExp: /@pega\/cosmos-react-core\/lib\/components\/Icon$/
|
|
323
|
+
}),
|
|
324
|
+
|
|
325
|
+
/* Ignore cosmos streamline-icons - windows */
|
|
326
|
+
new webpack.IgnorePlugin({
|
|
327
|
+
resourceRegExp: /^\.\/streamline-icons$/,
|
|
328
|
+
contextRegExp: /@pega\\cosmos-react-core\\lib\\components\\Icon$/
|
|
329
|
+
}),
|
|
330
|
+
|
|
318
331
|
new webpack.optimize.LimitChunkCountPlugin({
|
|
319
|
-
maxChunks:
|
|
332
|
+
maxChunks: 1
|
|
320
333
|
}),
|
|
321
334
|
new webpack.optimize.MinChunkSizePlugin({
|
|
322
335
|
minChunkSize: 100000 // Minimum number of characters
|
|
323
336
|
}),
|
|
324
|
-
|
|
337
|
+
!devBuild && new CompressionPlugin(compressionBRConfObj)
|
|
325
338
|
|
|
326
339
|
/* Dont generate gzip file */
|
|
327
340
|
/* isEnvProduction && new CompressionPlugin(compressionGZConfObj) */
|
|
@@ -2,8 +2,8 @@ import path from 'path';
|
|
|
2
2
|
import fs from 'fs';
|
|
3
3
|
import { stat } from 'fs/promises';
|
|
4
4
|
|
|
5
|
-
import { BUILD_CONFIG_JSON_FILENAME } from '
|
|
6
|
-
import { getComponentDirectoryPath } from '
|
|
5
|
+
import { BUILD_CONFIG_JSON_FILENAME } from '../../constants.js';
|
|
6
|
+
import { getComponentDirectoryPath } from '../../util.js';
|
|
7
7
|
|
|
8
8
|
import buildComponent from './builder/index.js';
|
|
9
9
|
|
|
@@ -13,8 +13,10 @@ import {
|
|
|
13
13
|
getComponentDirectoryPath,
|
|
14
14
|
getComponents,
|
|
15
15
|
getComponentDefaults,
|
|
16
|
+
getPegaServerConfig,
|
|
16
17
|
sanitize,
|
|
17
|
-
validateSemver
|
|
18
|
+
validateSemver,
|
|
19
|
+
showVersion
|
|
18
20
|
} from '../../util.js';
|
|
19
21
|
import { COMPONENT_SCHEMA } from '../../constants.js';
|
|
20
22
|
|
|
@@ -45,7 +47,6 @@ const compileMustacheTemplates = async (
|
|
|
45
47
|
const componentClassName = convertIntoPascalCase(componentKey);
|
|
46
48
|
|
|
47
49
|
const isTemplate = type === 'Template';
|
|
48
|
-
const isPicklist = subtype === 'Picklist';
|
|
49
50
|
const isBool = subtype === 'Boolean';
|
|
50
51
|
const isPhone = subtype === 'Phone';
|
|
51
52
|
|
|
@@ -53,6 +54,30 @@ const compileMustacheTemplates = async (
|
|
|
53
54
|
subtype = subtype.toString();
|
|
54
55
|
}
|
|
55
56
|
|
|
57
|
+
let mustacheSubType = subtype;
|
|
58
|
+
if (typeof mustacheSubType === 'string') {
|
|
59
|
+
// eslint-disable-next-line default-case
|
|
60
|
+
switch (mustacheSubType) {
|
|
61
|
+
case 'FORM-region':
|
|
62
|
+
mustacheSubType = 'FORM';
|
|
63
|
+
break;
|
|
64
|
+
case 'DETAILS-region':
|
|
65
|
+
mustacheSubType = 'DETAILS';
|
|
66
|
+
break;
|
|
67
|
+
case 'Text-Input':
|
|
68
|
+
mustacheSubType = 'Text';
|
|
69
|
+
break;
|
|
70
|
+
case 'Picklist-Autocomplete':
|
|
71
|
+
mustacheSubType = 'Picklist';
|
|
72
|
+
break;
|
|
73
|
+
case 'Picklist-RadioButtons':
|
|
74
|
+
mustacheSubType = 'Picklist';
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const isPicklist = subtype === 'Picklist';
|
|
80
|
+
|
|
56
81
|
if (allowedApplications.trim() === '') {
|
|
57
82
|
allowedApplications = [];
|
|
58
83
|
} else {
|
|
@@ -76,8 +101,8 @@ const compileMustacheTemplates = async (
|
|
|
76
101
|
LIBRARY: library,
|
|
77
102
|
ALLOWEDAPPS: JSON.stringify(allowedApplications),
|
|
78
103
|
TYPE: type,
|
|
79
|
-
SUB_TYPE: JSON.stringify(
|
|
80
|
-
DESCRIPTION: description,
|
|
104
|
+
SUB_TYPE: JSON.stringify(mustacheSubType),
|
|
105
|
+
DESCRIPTION: description || componentLabel,
|
|
81
106
|
IS_TEMPLATE: isTemplate,
|
|
82
107
|
IS_PICKLIST: isPicklist,
|
|
83
108
|
IS_BOOLEAN: isBool,
|
|
@@ -94,28 +119,62 @@ const validateCompile = async (
|
|
|
94
119
|
componentLabel,
|
|
95
120
|
library,
|
|
96
121
|
version,
|
|
122
|
+
framework,
|
|
97
123
|
type,
|
|
98
124
|
subtype,
|
|
99
125
|
description,
|
|
100
|
-
allowedApplications
|
|
126
|
+
allowedApplications,
|
|
127
|
+
organization
|
|
101
128
|
},
|
|
102
129
|
options
|
|
103
130
|
) => {
|
|
104
|
-
const templateDirectory = fileURLToPath(new URL('./template', import.meta.url));
|
|
105
131
|
|
|
106
|
-
|
|
132
|
+
let sSubType = subtype;
|
|
133
|
+
if (Array.isArray(subtype)) {
|
|
134
|
+
sSubType = subtype.join("-");
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// for now, until add question back in
|
|
138
|
+
if (framework == undefined || framework == "") {
|
|
139
|
+
framework = "Constellation";
|
|
140
|
+
}
|
|
107
141
|
|
|
108
|
-
const componentKey = `${organization}_${library}_${componentName}`;
|
|
109
|
-
/*
|
|
110
|
-
if (!isPascalCase(componentKey)) {
|
|
111
|
-
console.log(
|
|
112
|
-
chalk.yellowBright(
|
|
113
|
-
`${componentKey} is not in Pascal Case. Attempting to create component in Pascal Case !!`
|
|
114
|
-
)
|
|
115
|
-
);
|
|
116
|
-
componentKey = convertIntoPascalCase(componentKey);
|
|
117
|
-
} */
|
|
118
142
|
|
|
143
|
+
|
|
144
|
+
const defaultPegaServerConfig = await getPegaServerConfig();
|
|
145
|
+
const isLaunchpad = defaultPegaServerConfig.serverType === 'launchpad';
|
|
146
|
+
let originalFramework = framework;
|
|
147
|
+
|
|
148
|
+
let templateDir = `./templates/${framework}/${type}/${sSubType}`;
|
|
149
|
+
let templateDirectory = fileURLToPath(new URL(templateDir, import.meta.url));
|
|
150
|
+
|
|
151
|
+
if (isLaunchpad) {
|
|
152
|
+
framework = "Launchpad";
|
|
153
|
+
|
|
154
|
+
templateDir = `./templates/${framework}/${type}/${sSubType}`;
|
|
155
|
+
templateDirectory = fileURLToPath(new URL(templateDir, import.meta.url));
|
|
156
|
+
|
|
157
|
+
// if doesn't exist, revert
|
|
158
|
+
if (!fs.existsSync(templateDirectory)) {
|
|
159
|
+
framework = originalFramework;
|
|
160
|
+
|
|
161
|
+
templateDir = `./templates/${framework}/${type}/${sSubType}`;
|
|
162
|
+
templateDirectory = fileURLToPath(new URL(templateDir, import.meta.url));
|
|
163
|
+
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
if (organization == null) {
|
|
172
|
+
({ organization } = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8')));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
const componentKey = `${organization}_${library}_${componentName}`;
|
|
119
178
|
const targetDirectory = await getComponentDirectoryPath(componentKey);
|
|
120
179
|
|
|
121
180
|
const components = await getComponents();
|
|
@@ -146,29 +205,83 @@ const validateCompile = async (
|
|
|
146
205
|
};
|
|
147
206
|
|
|
148
207
|
export default async options => {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
const
|
|
155
|
-
const
|
|
156
|
-
const
|
|
208
|
+
showVersion();
|
|
209
|
+
|
|
210
|
+
if (options.params.length >= 12) {
|
|
211
|
+
|
|
212
|
+
const type = options.params[3];
|
|
213
|
+
const subtype = options.params[4];
|
|
214
|
+
const componentName = options.params[5];
|
|
215
|
+
const componentLabel = options.params[6];
|
|
216
|
+
const version = options.params[7];
|
|
217
|
+
const library = options.params[8];
|
|
218
|
+
const allowedApplications = options.params[9];
|
|
219
|
+
const description = options.params[10];
|
|
220
|
+
const organization = options.params[11];
|
|
221
|
+
const framework = "Constellation";
|
|
222
|
+
|
|
157
223
|
await validateCompile(
|
|
158
224
|
{
|
|
159
225
|
componentName,
|
|
160
226
|
componentLabel,
|
|
161
227
|
library,
|
|
162
228
|
version,
|
|
229
|
+
framework,
|
|
163
230
|
type,
|
|
164
231
|
subtype,
|
|
165
|
-
description
|
|
232
|
+
description,
|
|
233
|
+
allowedApplications,
|
|
234
|
+
organization
|
|
166
235
|
},
|
|
167
236
|
options
|
|
168
237
|
);
|
|
169
238
|
} else {
|
|
170
239
|
const componentDefaults = await getComponentDefaults();
|
|
171
240
|
const questions = [
|
|
241
|
+
{
|
|
242
|
+
name: 'type',
|
|
243
|
+
type: 'rawlist',
|
|
244
|
+
message: 'Enter type of component',
|
|
245
|
+
default: componentDefaults.type,
|
|
246
|
+
choices: COMPONENT_SCHEMA.type
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
name: 'subtype',
|
|
250
|
+
type: 'rawlist',
|
|
251
|
+
message: 'Enter subtype of component',
|
|
252
|
+
default: componentDefaults.subtype,
|
|
253
|
+
choices: COMPONENT_SCHEMA.subtype.field,
|
|
254
|
+
when(answers) {
|
|
255
|
+
return answers.type === 'Field';
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
name: 'subtype',
|
|
260
|
+
type: 'rawlist',
|
|
261
|
+
message: 'Enter subtype of component',
|
|
262
|
+
default: componentDefaults.subtype,
|
|
263
|
+
choices: COMPONENT_SCHEMA.subtype.template,
|
|
264
|
+
when(answers) {
|
|
265
|
+
return answers.type === 'Template';
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
name: 'subtype',
|
|
270
|
+
type: 'rawlist',
|
|
271
|
+
message: 'Enter subtype of component',
|
|
272
|
+
default: [componentDefaults.subtype || COMPONENT_SCHEMA.subtype.widget[0]],
|
|
273
|
+
choices: COMPONENT_SCHEMA.subtype.widget,
|
|
274
|
+
when(answers) {
|
|
275
|
+
return answers.type === 'Widget';
|
|
276
|
+
},
|
|
277
|
+
validate: value => {
|
|
278
|
+
/* value should not be empty */
|
|
279
|
+
if (Array.isArray(value) && value.length) {
|
|
280
|
+
return true;
|
|
281
|
+
}
|
|
282
|
+
return 'Please select subtype';
|
|
283
|
+
}
|
|
284
|
+
},
|
|
172
285
|
{
|
|
173
286
|
name: 'componentName',
|
|
174
287
|
message: 'Enter component name (required)',
|
|
@@ -197,6 +310,7 @@ export default async options => {
|
|
|
197
310
|
{
|
|
198
311
|
name: 'version',
|
|
199
312
|
message: 'Enter component version',
|
|
313
|
+
default: componentDefaults.version,
|
|
200
314
|
validate: value => {
|
|
201
315
|
if (validateSemver(value)) {
|
|
202
316
|
return true;
|
|
@@ -225,62 +339,20 @@ export default async options => {
|
|
|
225
339
|
message: 'Please enter the application names to be supported (comma-separated). ',
|
|
226
340
|
suffix: 'Keep empty for all applications'
|
|
227
341
|
},
|
|
228
|
-
{
|
|
229
|
-
name: 'type',
|
|
230
|
-
type: 'rawlist',
|
|
231
|
-
message: 'Enter type of component',
|
|
232
|
-
default: componentDefaults.type,
|
|
233
|
-
choices: COMPONENT_SCHEMA.type
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
name: 'subtype',
|
|
237
|
-
type: 'rawlist',
|
|
238
|
-
message: 'Enter subtype of component',
|
|
239
|
-
default: componentDefaults.subtype,
|
|
240
|
-
choices: COMPONENT_SCHEMA.subtype.field,
|
|
241
|
-
when(answers) {
|
|
242
|
-
return answers.type === 'Field';
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
name: 'subtype',
|
|
247
|
-
type: 'rawlist',
|
|
248
|
-
message: 'Enter subtype of component',
|
|
249
|
-
default: componentDefaults.subtype,
|
|
250
|
-
choices: COMPONENT_SCHEMA.subtype.template,
|
|
251
|
-
when(answers) {
|
|
252
|
-
return answers.type === 'Template';
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
name: 'subtype',
|
|
257
|
-
type: 'checkbox',
|
|
258
|
-
message: 'Enter subtype of component',
|
|
259
|
-
default: [componentDefaults.subtype || COMPONENT_SCHEMA.subtype.widget[0]],
|
|
260
|
-
choices: COMPONENT_SCHEMA.subtype.widget,
|
|
261
|
-
when(answers) {
|
|
262
|
-
return answers.type === 'Widget';
|
|
263
|
-
},
|
|
264
|
-
validate: value => {
|
|
265
|
-
/* value should not be empty */
|
|
266
|
-
if (Array.isArray(value) && value.length) {
|
|
267
|
-
return true;
|
|
268
|
-
}
|
|
269
|
-
return 'Please select subtype';
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
342
|
{
|
|
273
343
|
name: 'description',
|
|
274
344
|
message: 'Enter description for the component',
|
|
275
345
|
default: componentDefaults.description
|
|
276
346
|
}
|
|
277
347
|
];
|
|
348
|
+
|
|
278
349
|
await inquirer.prompt(questions).then(async answers => {
|
|
279
350
|
const {
|
|
280
351
|
componentName,
|
|
281
352
|
componentLabel,
|
|
282
353
|
library,
|
|
283
354
|
version,
|
|
355
|
+
framework,
|
|
284
356
|
type,
|
|
285
357
|
subtype,
|
|
286
358
|
description,
|
|
@@ -292,6 +364,7 @@ export default async options => {
|
|
|
292
364
|
componentLabel,
|
|
293
365
|
library,
|
|
294
366
|
version,
|
|
367
|
+
framework,
|
|
295
368
|
type,
|
|
296
369
|
subtype,
|
|
297
370
|
description,
|