@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,376 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
|
|
4
|
+
const webpack = require('webpack');
|
|
5
|
+
const TerserPlugin = require('terser-webpack-plugin');
|
|
6
|
+
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
7
|
+
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
|
8
|
+
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent.js');
|
|
9
|
+
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin.js');
|
|
10
|
+
const CompressionPlugin = require('compression-webpack-plugin');
|
|
11
|
+
|
|
12
|
+
// Source maps are resource heavy and can cause out of memory issue for large source files.
|
|
13
|
+
|
|
14
|
+
const compressionBRConfObj = {
|
|
15
|
+
filename: '[path][base].br',
|
|
16
|
+
algorithm: 'brotliCompress',
|
|
17
|
+
test: /\.(js|css|html|svg|png|jpg|woff|woff2)$/,
|
|
18
|
+
compressionOptions: { level: 11 }
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/* For gzip use below */
|
|
22
|
+
const compressionGZConfObj = {
|
|
23
|
+
filename: '[path][base].gz',
|
|
24
|
+
algorithm: 'gzip',
|
|
25
|
+
test: /\.(js|css|html|svg|png|jpg|woff|woff2)$/,
|
|
26
|
+
compressionOptions: { level: 9 }
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
let shouldUseSourceMap = process.env.SOURCE_MAP;
|
|
30
|
+
|
|
31
|
+
const imageInlineSizeLimit = Number.parseInt(process.env.IMAGE_INLINE_SIZE_LIMIT || '10000', 10);
|
|
32
|
+
|
|
33
|
+
// style files regex
|
|
34
|
+
const cssRegex = /\.css$/;
|
|
35
|
+
const cssModuleRegex = /\.module\.css$/;
|
|
36
|
+
const sassRegex = /\.(scss|sass)$/;
|
|
37
|
+
const sassModuleRegex = /\.module\.(scss|sass)$/;
|
|
38
|
+
|
|
39
|
+
// Make sure any symlinks in the project folder are resolved:
|
|
40
|
+
// https://github.com/facebook/create-react-app/issues/637
|
|
41
|
+
const appDirectory = fs.realpathSync(process.cwd());
|
|
42
|
+
const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
|
|
43
|
+
|
|
44
|
+
buildPath = 'dist/components';
|
|
45
|
+
|
|
46
|
+
const moduleFileExtensions = [
|
|
47
|
+
'web.mjs',
|
|
48
|
+
'mjs',
|
|
49
|
+
'web.js',
|
|
50
|
+
'js',
|
|
51
|
+
'web.ts',
|
|
52
|
+
'ts',
|
|
53
|
+
'web.tsx',
|
|
54
|
+
'tsx',
|
|
55
|
+
'json',
|
|
56
|
+
'web.jsx',
|
|
57
|
+
'jsx'
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
// Resolve file paths in the same order as webpack
|
|
61
|
+
const resolveModule = (resolveFn, filePath) => {
|
|
62
|
+
const extension = moduleFileExtensions.find(ext =>
|
|
63
|
+
fs.existsSync(resolveFn(`${filePath}.${ext}`))
|
|
64
|
+
);
|
|
65
|
+
|
|
66
|
+
if (extension) {
|
|
67
|
+
return resolveFn(`${filePath}.${extension}`);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return resolveFn(`${filePath}.js`);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// config after eject: we're in ./config/
|
|
74
|
+
|
|
75
|
+
const appPath = resolveApp('.');
|
|
76
|
+
const appBuild = resolveApp(buildPath);
|
|
77
|
+
const appSrc = resolveApp('src');
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
// This is the production and development configuration.
|
|
81
|
+
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
|
|
82
|
+
//export default (
|
|
83
|
+
module.exports = (
|
|
84
|
+
webpackEnv,
|
|
85
|
+
// eslint-disable-next-line no-unused-vars
|
|
86
|
+
{ inputFile, outputFile, componentKey, externals, globals, sourceMap, devBuild }
|
|
87
|
+
) => {
|
|
88
|
+
const isEnvDevelopment = webpackEnv === 'development' || devBuild;
|
|
89
|
+
const isEnvProduction = webpackEnv === 'production';
|
|
90
|
+
sourceMap = sourceMap === 'true';
|
|
91
|
+
shouldUseSourceMap = shouldUseSourceMap || sourceMap;
|
|
92
|
+
|
|
93
|
+
// common function to get style loaders
|
|
94
|
+
const getStyleLoaders = (cssOptions, preProcessor) => {
|
|
95
|
+
const loaders = [
|
|
96
|
+
isEnvProduction && {
|
|
97
|
+
loader: MiniCssExtractPlugin.loader
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
loader: require.resolve('css-loader'),
|
|
101
|
+
options: cssOptions
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
// Options for PostCSS as we reference these options twice
|
|
105
|
+
// Adds vendor prefixing based on your specified browser support in
|
|
106
|
+
// package.json
|
|
107
|
+
loader: require.resolve('postcss-loader'),
|
|
108
|
+
options: {
|
|
109
|
+
postcssOptions: {
|
|
110
|
+
plugins: [
|
|
111
|
+
[
|
|
112
|
+
'postcss-preset-env',
|
|
113
|
+
{
|
|
114
|
+
// Options
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
].filter(Boolean);
|
|
123
|
+
if (preProcessor) {
|
|
124
|
+
loaders.push(
|
|
125
|
+
{
|
|
126
|
+
loader: require.resolve('resolve-url-loader'),
|
|
127
|
+
options: {
|
|
128
|
+
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
|
|
129
|
+
root: appSrc
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
loader: require.resolve(preProcessor),
|
|
134
|
+
options: {
|
|
135
|
+
sourceMap: true
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
return loaders;
|
|
141
|
+
};
|
|
142
|
+
return {
|
|
143
|
+
mode: devBuild ? 'development' : 'production',
|
|
144
|
+
// Stop compilation early in production
|
|
145
|
+
bail: isEnvProduction,
|
|
146
|
+
// These are the "entry points" to our application.
|
|
147
|
+
// This means they will be the "root" imports that are included in JS bundle.
|
|
148
|
+
entry: inputFile,
|
|
149
|
+
devtool: devBuild ? 'eval-cheap-module-source-map' : false,
|
|
150
|
+
output: {
|
|
151
|
+
// The build folder.
|
|
152
|
+
//path: paths.appBuild,
|
|
153
|
+
//path: resolveApp('dist/components'),
|
|
154
|
+
path: appBuild,
|
|
155
|
+
// There will be one main bundle, and one file per asynchronous chunk.
|
|
156
|
+
// In development, it does not produce real files.
|
|
157
|
+
filename: isEnvProduction
|
|
158
|
+
? `${componentKey}/${componentKey}.js`
|
|
159
|
+
: isEnvDevelopment && `${componentKey}/${componentKey}.js`,
|
|
160
|
+
chunkFilename: isEnvProduction
|
|
161
|
+
? `${componentKey}/js/[name].[contenthash:8].chunk.js`
|
|
162
|
+
: isEnvDevelopment && `${componentKey}/js/[name].chunk.js`,
|
|
163
|
+
library: {
|
|
164
|
+
name: componentKey,
|
|
165
|
+
type: 'umd',
|
|
166
|
+
export: 'default'
|
|
167
|
+
},
|
|
168
|
+
publicPath: ''
|
|
169
|
+
},
|
|
170
|
+
optimization: {
|
|
171
|
+
minimize: isEnvProduction,
|
|
172
|
+
minimizer: [new TerserPlugin(), new CssMinimizerPlugin()]
|
|
173
|
+
},
|
|
174
|
+
resolve: {
|
|
175
|
+
plugins: [],
|
|
176
|
+
extensions: ['.tsx', '.ts', '.js']
|
|
177
|
+
},
|
|
178
|
+
resolveLoader: {
|
|
179
|
+
plugins: []
|
|
180
|
+
},
|
|
181
|
+
module: {
|
|
182
|
+
strictExportPresence: true,
|
|
183
|
+
rules: [
|
|
184
|
+
{
|
|
185
|
+
// "oneOf" will traverse all following loaders until one will
|
|
186
|
+
// match the requirements. When no loader matches it will fall
|
|
187
|
+
// back to the "file" loader at the end of the loader list.
|
|
188
|
+
oneOf: [
|
|
189
|
+
// TODO: Merge this config once `image/avif` is in the mime-db
|
|
190
|
+
// https://github.com/jshttp/mime-db
|
|
191
|
+
{
|
|
192
|
+
test: [/\.avif$/],
|
|
193
|
+
loader: require.resolve('url-loader'),
|
|
194
|
+
options: {
|
|
195
|
+
limit: imageInlineSizeLimit,
|
|
196
|
+
mimetype: 'image/avif',
|
|
197
|
+
name: `${componentKey}/media/[name].[hash:8].[ext]`
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
// "url" loader works like "file" loader except that it embeds assets
|
|
201
|
+
// smaller than specified limit in bytes as data URLs to avoid requests.
|
|
202
|
+
// A missing `test` is equivalent to a match.
|
|
203
|
+
{
|
|
204
|
+
test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/, /\.svg$/],
|
|
205
|
+
loader: require.resolve('url-loader'),
|
|
206
|
+
options: {
|
|
207
|
+
limit: imageInlineSizeLimit,
|
|
208
|
+
name: `${componentKey}/media/[name].[hash:8].[ext]`
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
// Process application JS with TS-Loader.
|
|
212
|
+
// The preset includes JSX, Flow, TypeScript, and some ESnext features.
|
|
213
|
+
{
|
|
214
|
+
test: /\.(js|mjs|jsx)$/,
|
|
215
|
+
include: appSrc,
|
|
216
|
+
loader: 'ts-loader',
|
|
217
|
+
options: {
|
|
218
|
+
configFile: 'tsconfig.build.json'
|
|
219
|
+
},
|
|
220
|
+
exclude: /node_modules/
|
|
221
|
+
},
|
|
222
|
+
|
|
223
|
+
{
|
|
224
|
+
test: /\.(ts|tsx)$/,
|
|
225
|
+
loader: 'ts-loader',
|
|
226
|
+
options: {
|
|
227
|
+
configFile: 'tsconfig.build.json'
|
|
228
|
+
},
|
|
229
|
+
exclude: /node_modules/
|
|
230
|
+
},
|
|
231
|
+
// "postcss" loader applies autoprefixer to our CSS.
|
|
232
|
+
// "css" loader resolves paths in CSS and adds assets as dependencies.
|
|
233
|
+
// "style" loader turns CSS into JS modules that inject <style> tags.
|
|
234
|
+
// In production, we use MiniCSSExtractPlugin to extract that CSS
|
|
235
|
+
// to a file, but in development "style" loader enables hot editing
|
|
236
|
+
// of CSS.
|
|
237
|
+
// By default we support CSS Modules with the extension .module.css
|
|
238
|
+
{
|
|
239
|
+
test: cssRegex,
|
|
240
|
+
exclude: cssModuleRegex,
|
|
241
|
+
use: getStyleLoaders({
|
|
242
|
+
importLoaders: 1,
|
|
243
|
+
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment
|
|
244
|
+
}),
|
|
245
|
+
// Don't consider CSS imports dead code even if the
|
|
246
|
+
// containing package claims to have no side effects.
|
|
247
|
+
// Remove this when webpack adds a warning or an error for this.
|
|
248
|
+
// See https://github.com/webpack/webpack/issues/6571
|
|
249
|
+
sideEffects: true
|
|
250
|
+
},
|
|
251
|
+
// Adds support for CSS Modules (https://github.com/css-modules/css-modules)
|
|
252
|
+
// using the extension .module.css
|
|
253
|
+
{
|
|
254
|
+
test: cssModuleRegex,
|
|
255
|
+
use: getStyleLoaders({
|
|
256
|
+
importLoaders: 1,
|
|
257
|
+
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
|
|
258
|
+
modules: {
|
|
259
|
+
getLocalIdent: getCSSModuleLocalIdent
|
|
260
|
+
}
|
|
261
|
+
})
|
|
262
|
+
},
|
|
263
|
+
// Opt-in support for SASS (using .scss or .sass extensions).
|
|
264
|
+
// By default we support SASS Modules with the
|
|
265
|
+
// extensions .module.scss or .module.sass
|
|
266
|
+
{
|
|
267
|
+
test: sassRegex,
|
|
268
|
+
exclude: sassModuleRegex,
|
|
269
|
+
use: getStyleLoaders(
|
|
270
|
+
{
|
|
271
|
+
importLoaders: 3,
|
|
272
|
+
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment
|
|
273
|
+
},
|
|
274
|
+
'sass-loader'
|
|
275
|
+
),
|
|
276
|
+
// Don't consider CSS imports dead code even if the
|
|
277
|
+
// containing package claims to have no side effects.
|
|
278
|
+
// Remove this when webpack adds a warning or an error for this.
|
|
279
|
+
// See https://github.com/webpack/webpack/issues/6571
|
|
280
|
+
sideEffects: true
|
|
281
|
+
},
|
|
282
|
+
// Adds support for CSS Modules, but using SASS
|
|
283
|
+
// using the extension .module.scss or .module.sass
|
|
284
|
+
{
|
|
285
|
+
test: sassModuleRegex,
|
|
286
|
+
use: getStyleLoaders(
|
|
287
|
+
{
|
|
288
|
+
importLoaders: 3,
|
|
289
|
+
sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment,
|
|
290
|
+
modules: {
|
|
291
|
+
getLocalIdent: getCSSModuleLocalIdent
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
'sass-loader'
|
|
295
|
+
)
|
|
296
|
+
},
|
|
297
|
+
// "file" loader makes sure those assets get served by WebpackDevServer.
|
|
298
|
+
// When you `import` an asset, you get its (virtual) filename.
|
|
299
|
+
// In production, they would get copied to the `build` folder.
|
|
300
|
+
// This loader doesn't use a "test" so it will catch all modules
|
|
301
|
+
// that fall through the other loaders.
|
|
302
|
+
{
|
|
303
|
+
loader: require.resolve('file-loader'),
|
|
304
|
+
// Exclude `js` files to keep "css" loader working as it injects
|
|
305
|
+
// its runtime that would otherwise be processed through "file" loader.
|
|
306
|
+
// Also exclude `html` and `json` extensions so they get processed
|
|
307
|
+
// by webpack's internal loaders.
|
|
308
|
+
exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
|
|
309
|
+
options: {
|
|
310
|
+
name: `${componentKey}/media/[name].[hash:8].[ext]`
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
// ** STOP ** Are you adding a new loader?
|
|
314
|
+
// Make sure to add the new loader(s) before the "file" loader.
|
|
315
|
+
]
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
},
|
|
319
|
+
plugins: [
|
|
320
|
+
// This gives some necessary context to module not found errors, such as
|
|
321
|
+
// the requesting resource.
|
|
322
|
+
new ModuleNotFoundPlugin(appPath),
|
|
323
|
+
// Makes some environment variables available to the JS code, for example:
|
|
324
|
+
// if (process.env.NODE_ENV === 'production') { ... }. See `./env.js`.
|
|
325
|
+
// It is absolutely essential that NODE_ENV is set to production
|
|
326
|
+
// during a production build.
|
|
327
|
+
// Otherwise React will be compiled in the very slow development mode.
|
|
328
|
+
isEnvProduction &&
|
|
329
|
+
new webpack.DefinePlugin({
|
|
330
|
+
PRODUCTION: JSON.stringify(true)
|
|
331
|
+
}),
|
|
332
|
+
isEnvProduction &&
|
|
333
|
+
new MiniCssExtractPlugin({
|
|
334
|
+
// Options similar to the same options in webpackOptions.output
|
|
335
|
+
// both options are optional
|
|
336
|
+
filename: `${componentKey}/css/${componentKey}.[contenthash:8].css`,
|
|
337
|
+
chunkFilename: `${componentKey}/css/${componentKey}.[contenthash:8].chunk.css`
|
|
338
|
+
}),
|
|
339
|
+
// Moment.js is an extremely popular library that bundles large locale files
|
|
340
|
+
// by default due to how webpack interprets its code. This is a practical
|
|
341
|
+
// solution that requires the user to opt into importing specific locales.
|
|
342
|
+
// https://github.com/jmblog/how-to-optimize-momentjs-with-webpack
|
|
343
|
+
// You can remove this if you don't use Moment.js:
|
|
344
|
+
new webpack.IgnorePlugin({
|
|
345
|
+
resourceRegExp: /^\.\/locale$/,
|
|
346
|
+
contextRegExp: /moment$/
|
|
347
|
+
}),
|
|
348
|
+
/* Ignore cosmos icons */
|
|
349
|
+
new webpack.IgnorePlugin({
|
|
350
|
+
resourceRegExp: /^\.\/icons$/,
|
|
351
|
+
contextRegExp: /@pega\/cosmos-react-core\/lib\/components\/Icon$/
|
|
352
|
+
}),
|
|
353
|
+
|
|
354
|
+
/* Ignore cosmos icons - windows */
|
|
355
|
+
new webpack.IgnorePlugin({
|
|
356
|
+
resourceRegExp: /^\.\/icons$/,
|
|
357
|
+
contextRegExp: /@pega\\cosmos-react-core\\lib\\components\\Icon$/
|
|
358
|
+
}),
|
|
359
|
+
|
|
360
|
+
new webpack.optimize.LimitChunkCountPlugin({
|
|
361
|
+
maxChunks: 1
|
|
362
|
+
}),
|
|
363
|
+
new webpack.optimize.MinChunkSizePlugin({
|
|
364
|
+
minChunkSize: 100000 // Minimum number of characters
|
|
365
|
+
}),
|
|
366
|
+
!devBuild && new CompressionPlugin(compressionBRConfObj)
|
|
367
|
+
|
|
368
|
+
/* Don't generate gzip file */
|
|
369
|
+
/* isEnvProduction && new CompressionPlugin(compressionGZConfObj) */
|
|
370
|
+
].filter(Boolean),
|
|
371
|
+
performance: {
|
|
372
|
+
hints: 'warning'
|
|
373
|
+
},
|
|
374
|
+
externals
|
|
375
|
+
};
|
|
376
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
|
-
import https from 'https';
|
|
4
3
|
|
|
5
4
|
import fetch from 'node-fetch';
|
|
6
5
|
import AdmZip from 'adm-zip';
|
|
@@ -11,12 +10,23 @@ import {
|
|
|
11
10
|
getComponentDirectoryPath,
|
|
12
11
|
getComponents,
|
|
13
12
|
getPegaServerConfig,
|
|
14
|
-
validateRulesetVersion
|
|
13
|
+
validateRulesetVersion,
|
|
14
|
+
getHttpsAgent
|
|
15
15
|
} from '../../util.js';
|
|
16
|
-
import {
|
|
16
|
+
import {
|
|
17
|
+
PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT,
|
|
18
|
+
LP_PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT,
|
|
19
|
+
TOKEN_PATH
|
|
20
|
+
} from '../../constants.js';
|
|
17
21
|
|
|
18
22
|
export const getPublishComponentQuestions = async () => {
|
|
19
23
|
const components = await getComponents();
|
|
24
|
+
|
|
25
|
+
if (components.length === 0) {
|
|
26
|
+
console.log(chalk.redBright('No components to publish'));
|
|
27
|
+
process.exit();
|
|
28
|
+
}
|
|
29
|
+
|
|
20
30
|
const defaultPegaConfig = await getPegaServerConfig();
|
|
21
31
|
|
|
22
32
|
return [
|
|
@@ -35,6 +45,9 @@ export const getPublishComponentQuestions = async () => {
|
|
|
35
45
|
return true;
|
|
36
46
|
}
|
|
37
47
|
return 'Ruleset name cannot be empty';
|
|
48
|
+
},
|
|
49
|
+
when: () => {
|
|
50
|
+
return defaultPegaConfig.serverType === 'infinity';
|
|
38
51
|
}
|
|
39
52
|
},
|
|
40
53
|
{
|
|
@@ -46,16 +59,21 @@ export const getPublishComponentQuestions = async () => {
|
|
|
46
59
|
return true;
|
|
47
60
|
}
|
|
48
61
|
return 'Please provide compatible version e.g 01-01-01';
|
|
62
|
+
},
|
|
63
|
+
when: () => {
|
|
64
|
+
return defaultPegaConfig.serverType === 'infinity';
|
|
49
65
|
}
|
|
50
66
|
},
|
|
51
67
|
{
|
|
52
68
|
name: 'sourceMap',
|
|
53
69
|
message: 'Generate source map ?',
|
|
54
70
|
default: defaultPegaConfig.sourceMap,
|
|
71
|
+
// eslint-disable-next-line sonarjs/no-redundant-boolean
|
|
55
72
|
when: () => false && !process.env.SOURCE_MAP
|
|
56
73
|
},
|
|
57
74
|
{
|
|
58
75
|
name: 'devBuild',
|
|
76
|
+
type: 'confirm',
|
|
59
77
|
message: 'Generate development build ?',
|
|
60
78
|
default: defaultPegaConfig.devBuild
|
|
61
79
|
}
|
|
@@ -75,71 +93,122 @@ export const zipComponent = async componentKey => {
|
|
|
75
93
|
const zipContent = zip.toBuffer().toString('base64');
|
|
76
94
|
|
|
77
95
|
const configContent = Buffer.from(fs.readFileSync(`${srcDirectory}/config.json`)).toString();
|
|
96
|
+
|
|
78
97
|
fs.rmdir('dist', { recursive: true }, err => {
|
|
79
98
|
if (err) {
|
|
80
99
|
throw err;
|
|
81
100
|
}
|
|
82
101
|
});
|
|
102
|
+
|
|
83
103
|
return { zipContent, configContent };
|
|
84
104
|
};
|
|
85
105
|
|
|
86
|
-
export const publishComponentToServer = async data => {
|
|
87
|
-
const { configContent, zipContent,
|
|
88
|
-
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
106
|
+
export const publishComponentToServer = async (data, doFetch) => {
|
|
107
|
+
const { configContent, zipContent, rulesetName, rulesetVersion } = data;
|
|
108
|
+
|
|
109
|
+
const defaultPegaServerConfig = await getPegaServerConfig();
|
|
110
|
+
const { serverType, isolationId } = defaultPegaServerConfig;
|
|
111
|
+
const isLaunchpad = serverType === 'launchpad';
|
|
112
|
+
const launchpadRestEndpoint = LP_PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT.replace(
|
|
113
|
+
'{isolationId}',
|
|
114
|
+
isolationId || 'undefined'
|
|
115
|
+
);
|
|
116
|
+
let apiBody;
|
|
117
|
+
|
|
118
|
+
if (isLaunchpad) {
|
|
119
|
+
apiBody = {
|
|
120
|
+
type: 'CustomComponent',
|
|
121
|
+
zipContent,
|
|
122
|
+
componentName: JSON.parse(configContent).componentKey,
|
|
123
|
+
pxUpdateDateTime: '',
|
|
124
|
+
environmentID: defaultPegaServerConfig.isolationId
|
|
125
|
+
};
|
|
126
|
+
} else {
|
|
127
|
+
apiBody = {
|
|
128
|
+
configContent,
|
|
129
|
+
zipContent,
|
|
130
|
+
componentKey: JSON.parse(configContent).componentKey,
|
|
131
|
+
publishFor: 'constellation',
|
|
132
|
+
rulesetName,
|
|
133
|
+
rulesetVersion,
|
|
134
|
+
category: ''
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
98
138
|
const defaultPegaConfig = await getPegaServerConfig();
|
|
99
139
|
const url = constructCompleteUrl(
|
|
100
140
|
defaultPegaConfig.server,
|
|
101
|
-
PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT
|
|
141
|
+
isLaunchpad ? launchpadRestEndpoint : PUBLISH_COMPONENT_SERVICE_REST_ENDPOINT
|
|
102
142
|
);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
headers: {
|
|
143
|
+
|
|
144
|
+
if (doFetch) {
|
|
145
|
+
try {
|
|
146
|
+
const OauthData = fs.readFileSync(TOKEN_PATH, 'utf8');
|
|
147
|
+
if (OauthData) {
|
|
148
|
+
const {
|
|
149
|
+
access_token: accessToken,
|
|
150
|
+
token_type: tokenType
|
|
151
|
+
// refresh_token: refreshToken
|
|
152
|
+
} = JSON.parse(OauthData);
|
|
153
|
+
let status = 500;
|
|
154
|
+
const headers = {
|
|
116
155
|
Authorization: `${tokenType} ${accessToken}`
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
);
|
|
130
|
-
// console.log(accessTokenUri, refreshToken);
|
|
131
|
-
/* TODO - Handle refresh_token */
|
|
132
|
-
} else if (status == 200) {
|
|
133
|
-
console.log(chalk.bold.green(`Success : ${respData.message}`));
|
|
134
|
-
} else {
|
|
135
|
-
throw new Error(`${respData.message}`);
|
|
136
|
-
}
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
if (isLaunchpad) {
|
|
159
|
+
headers.cookie = `Pega-AAT=${accessToken}`;
|
|
160
|
+
headers['Content-Type'] = 'application/json';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
fetch(url, {
|
|
164
|
+
method: 'POST',
|
|
165
|
+
agent: getHttpsAgent(defaultPegaConfig),
|
|
166
|
+
headers,
|
|
167
|
+
body: JSON.stringify(apiBody)
|
|
137
168
|
})
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
169
|
+
.then(response => {
|
|
170
|
+
status = response.status;
|
|
171
|
+
return response.text();
|
|
172
|
+
})
|
|
173
|
+
.then(resp => {
|
|
174
|
+
const respData = isLaunchpad ? resp : JSON.parse(resp);
|
|
175
|
+
if (status === 401) {
|
|
176
|
+
throw new Error(
|
|
177
|
+
'Error occurred in authentication. Please regenerate using authenticate'
|
|
178
|
+
);
|
|
179
|
+
// console.log(accessTokenUri, refreshToken);
|
|
180
|
+
/* TODO - Handle refresh_token */
|
|
181
|
+
} else if (status === 200 || status === 201) {
|
|
182
|
+
console.log(
|
|
183
|
+
chalk.bold.green(`Success : ${isLaunchpad ? respData : respData.message}`)
|
|
184
|
+
);
|
|
185
|
+
} else {
|
|
186
|
+
throw new Error(`${respData.message}`);
|
|
187
|
+
}
|
|
188
|
+
})
|
|
189
|
+
.catch(e => {
|
|
190
|
+
if (e.code === 'ECONNREFUSED') {
|
|
191
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
|
192
|
+
Promise.reject(
|
|
193
|
+
`${chalk.bold.red(
|
|
194
|
+
'Error occurred in authentication. Please regenerate using authenticate'
|
|
195
|
+
)}`
|
|
196
|
+
);
|
|
197
|
+
} else if (status === 403) {
|
|
198
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
|
199
|
+
Promise.reject(
|
|
200
|
+
`${chalk.bold.red('Error forbidden: User does not have privileges to Publish.')}`
|
|
201
|
+
);
|
|
202
|
+
} else {
|
|
203
|
+
// eslint-disable-next-line prefer-promise-reject-errors
|
|
204
|
+
Promise.reject(`${chalk.bold.red(e)}`);
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
} else {
|
|
208
|
+
throw new Error(`Error occurred in authentication. Please regenerate using authenticate`);
|
|
209
|
+
}
|
|
210
|
+
} catch (err) {
|
|
211
|
+
throw new Error(`Error occurred in authentication. Please regenerate using authenticate`);
|
|
141
212
|
}
|
|
142
|
-
} catch (err) {
|
|
143
|
-
throw new Error(`Error occured in authentication. Please regenerate using authenticate`);
|
|
144
213
|
}
|
|
145
214
|
};
|