@pega/custom-dx-components 0.23.3 → 0.23.5
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/.prettierrc.json +7 -1
- package/babel.config.cjs +13 -0
- package/jest.config.cjs +37 -0
- package/package.json +18 -10
- package/src/auth.js +578 -555
- package/src/cli.js +11 -5
- package/src/constants.js +23 -25
- package/src/currentPath.cjs +1 -0
- package/src/tasks/authenticate/helper.js +82 -18
- package/src/tasks/authenticate/index.js +21 -7
- package/src/tasks/build/helper.js +17 -8
- package/src/tasks/build/index.js +29 -7
- package/src/tasks/build-all/helper.js +2 -1
- package/src/tasks/build-all/index.js +32 -25
- package/src/tasks/bundle/builder/index.js +5 -0
- package/src/tasks/bundle/builder/webpack.config.js +3 -2
- package/src/tasks/create/index.js +17 -7
- package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +7 -7
- package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +8 -8
- package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +10 -10
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +6 -5
- package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +6 -3
- package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/time-of-day.js.mustache +6 -5
- package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +0 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +0 -1
- package/src/tasks/create-all/index.js +72 -48
- package/src/tasks/delete/helper.js +90 -40
- package/src/tasks/delete/index.js +5 -5
- package/src/tasks/delete-all/helper.js +108 -48
- package/src/tasks/delete-all/index.js +6 -6
- package/src/tasks/index.js +2 -1
- package/src/tasks/init/template/README.md +2 -204
- 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/package.json.mustache +13 -5
- package/src/tasks/init/template/src/components/_components.md +1 -1
- package/src/tasks/init/template/tasks.config.json +11 -8
- package/src/tasks/init/template/test/assets/components/create/Pega_DXIL_MyTestText/config.json +55 -0
- package/src/tasks/init/template/test/assets/components/create/Pega_DXIL_MyTestText/demo.stories.jsx +51 -0
- package/src/tasks/init/template/test/assets/components/create/Pega_DXIL_MyTestText/index.jsx +60 -0
- package/src/tasks/init/template/test/assets/components/create/Pega_DXIL_MyTestText/mock.stories.js +13 -0
- package/src/tasks/init/template/test/assets/components/create/Pega_DXIL_MyTestText/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/Boolean.js +38 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/boolean-format.js +26 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/config.json +145 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/demo.stories.jsx +61 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/event-utils.js +18 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/index.jsx +170 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/mock.stories.js +21 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyBoolean/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCaseWidget/OneColumnPage.svg +36 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCaseWidget/config.json +23 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCaseWidget/demo.stories.jsx +78 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCaseWidget/index.jsx +73 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCaseWidget/mock.stories.js +390 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCaseWidget/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/config.json +291 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/demo.stories.jsx +53 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/event-utils.js +18 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/index.jsx +296 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/mock.stories.js +23 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyCurrency/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/DateFormatter.js +61 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/FormattedText.jsx +41 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/config.json +195 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/date.js +439 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/demo.stories.jsx +73 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/index.jsx +256 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/mock.stories.js +23 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDate/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/config.json +256 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/date-time.js +92 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/date-utils.js +288 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/date.js +331 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/demo.stories.jsx +73 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/index.jsx +254 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/mock.stories.js +23 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDateTime/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/config.json +278 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/demo.stories.jsx +49 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/event-utils.js +18 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/index.jsx +270 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/mock.stories.js +21 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDecimal/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/OneColumnDetails.svg +22 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/StatusWork.jsx +26 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/config.json +35 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/demo.stories.jsx +132 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/index.jsx +83 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/mock.stories.js +189 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyDetails/utils.js +152 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/config.json +111 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/demo.stories.jsx +48 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/event-utils.js +18 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/index.jsx +231 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/mock.stories.js +22 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyEmail/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyForm/DefaultForm.svg +29 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyForm/config.json +45 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyForm/demo.stories.jsx +166 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyForm/index.jsx +42 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyForm/mock.stories.js +137 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyForm/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/config.json +344 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/demo.stories.jsx +49 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/event-utils.js +18 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/index.jsx +333 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/mock.stories.js +21 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyInteger/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/GetNextWork.jsx +35 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/OneColumnPage.svg +36 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/config.json +32 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/demo.stories.jsx +102 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/index.jsx +70 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/localizations.json +4 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/mock.stories.js +94 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPage/utils.js +229 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/Avatar.jsx +75 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/OneColumnPage.svg +36 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/Operator.jsx +237 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/config.json +66 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/demo.stories.jsx +68 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/index.jsx +108 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/mock.stories.js +51 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageCaseWidget/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageWidget/OneColumnPage.svg +36 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageWidget/config.json +59 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageWidget/demo.stories.jsx +30 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageWidget/index.jsx +48 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageWidget/mock.stories.js +23 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPageWidget/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/config.json +111 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/demo.stories.jsx +48 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/event-utils.js +18 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/index.jsx +231 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/mock.stories.js +20 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyParagraph/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/config.json +93 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/demo.stories.jsx +49 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/event-utils.js +18 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/index.jsx +275 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/mock.stories.js +21 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPercentage/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/config.json +123 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/demo.stories.jsx +46 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/event-utils.js +18 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/index.jsx +266 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/mock.stories.js +37 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPhone/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/config.json +114 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/demo.stories.jsx +78 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/event-utils.js +18 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/index.jsx +351 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/mock.stories.js +67 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyPicklist/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyText/config.json +55 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyText/demo.stories.jsx +51 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyText/index.jsx +60 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyText/mock.stories.js +13 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyText/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/StatusWork.jsx +26 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/config.json +111 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/demo.stories.jsx +48 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/event-utils.js +18 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/index.jsx +239 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/mock.stories.js +21 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTextInput/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/config.json +185 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/demo.stories.jsx +57 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/index.jsx +213 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/mock.stories.js +20 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTimeOfDay/time-of-day.js +288 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/StatusWork.jsx +26 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/TwoColumnDetails.svg +28 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/config.json +42 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/demo.stories.jsx +136 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/index.jsx +83 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/mock.stories.js +230 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnDetails/utils.js +155 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnForm/TwoColumn.svg +38 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnForm/config.json +27 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnForm/demo.stories.jsx +175 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnForm/index.jsx +45 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnForm/mock.stories.js +143 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyTwoColumnForm/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/config.json +237 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/demo.stories.jsx +46 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/event-utils.js +18 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/index.jsx +232 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/mock.stories.js +22 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/styles.js +7 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/suggestions-handler.js +10 -0
- package/src/tasks/init/template/test/assets/components/createAll/Pega_DXIL_MyURL/text-url.jsx +173 -0
- package/src/tasks/init/template/test/functionTest/localCreateAllListDeleteAll.test.js +157 -0
- package/src/tasks/init/template/test/functionTest/localCreateBuildAllDeleteAll.test.js +148 -0
- package/src/tasks/init/template/test/functionTest/localCreateBuildDelete.test.js +84 -0
- package/src/tasks/init/template/test/functionTest/localCreateListDelete.test.js +108 -0
- package/src/tasks/init/template/test/functionTest/localCreatePublishAllDeleteAll.test.js +148 -0
- package/src/tasks/init/template/test/functionTest/localCreatePublishDelete.test.js +84 -0
- package/src/tasks/init/template/test/functionTest/localCreateRenameDelete.test.js +84 -0
- package/src/tasks/init/template/test/functionTest/localPromoteRevertWP.test.js +59 -0
- package/src/tasks/list/helper.js +115 -14
- 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 +116 -61
- package/src/tasks/publish/index.js +34 -8
- package/src/tasks/publish-all/helper.js +115 -63
- package/src/tasks/publish-all/index.js +51 -30
- package/src/tasks/rename/index.js +127 -97
- package/src/tasks/revert-webpack/index.js +71 -0
- package/src/util.js +159 -320
- package/test/unitTest/util.test.js +544 -0
- package/src/tasks/generate-ai/aiPrompt.txt.mustache +0 -23
- package/src/tasks/generate-ai/aiPromptDavinci.txt.mustache +0 -14
- package/src/tasks/generate-ai/helper.js +0 -390
- package/src/tasks/generate-ai/index.js +0 -34
|
@@ -5,9 +5,11 @@ import ora from 'ora';
|
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
7
|
deleteLocalComponent,
|
|
8
|
-
|
|
8
|
+
deleteInfinityServerComponent,
|
|
9
|
+
deleteLaunchpadServerComponent,
|
|
9
10
|
getComponents,
|
|
10
|
-
getPegaServerConfig
|
|
11
|
+
getPegaServerConfig,
|
|
12
|
+
standardizeStr
|
|
11
13
|
} from '../../util.js';
|
|
12
14
|
import { getComponentsFromServer } from '../list/helper.js';
|
|
13
15
|
|
|
@@ -35,27 +37,44 @@ export const getDeleteComponentsQuestions = async (options, sourceOfComponentsOp
|
|
|
35
37
|
];
|
|
36
38
|
};
|
|
37
39
|
|
|
38
|
-
export const deleteLocalComponents = async sourceOfComponents => {
|
|
40
|
+
export const deleteLocalComponents = async (sourceOfComponents, options) => {
|
|
39
41
|
const localComponents = await getComponents();
|
|
40
42
|
|
|
43
|
+
|
|
44
|
+
|
|
41
45
|
if (localComponents.length > 0) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
message: 'Are you sure ?',
|
|
53
|
-
default: false
|
|
46
|
+
|
|
47
|
+
if (options.params.length >= 6) {
|
|
48
|
+
const componentKey = options.params[4];
|
|
49
|
+
const sDeletion = options.params[5];
|
|
50
|
+
const confirmDeletion = (sDeletion === 'Y' ||
|
|
51
|
+
sDeletion === 'y' ||
|
|
52
|
+
sDeletion === true ||
|
|
53
|
+
sDeletion === 'true') ? true : false;
|
|
54
|
+
if (confirmDeletion) {
|
|
55
|
+
await deleteLocalComponent(componentKey);
|
|
54
56
|
}
|
|
55
|
-
]);
|
|
56
|
-
if (answers.confirmDeletion) {
|
|
57
|
-
await deleteLocalComponent(answers.componentKey);
|
|
58
57
|
}
|
|
58
|
+
else {
|
|
59
|
+
const answers = await inquirer.prompt([
|
|
60
|
+
{
|
|
61
|
+
name: 'componentKey',
|
|
62
|
+
type: 'rawlist',
|
|
63
|
+
message: 'Select component to delete',
|
|
64
|
+
choices: localComponents
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'confirmDeletion',
|
|
68
|
+
type: 'confirm',
|
|
69
|
+
message: 'Are you sure ?',
|
|
70
|
+
default: false
|
|
71
|
+
}
|
|
72
|
+
]);
|
|
73
|
+
if (answers.confirmDeletion) {
|
|
74
|
+
await deleteLocalComponent(answers.componentKey);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
59
78
|
} else {
|
|
60
79
|
console.log(chalk.bold.redBright(`No custom components in ${sourceOfComponents}`));
|
|
61
80
|
}
|
|
@@ -63,16 +82,55 @@ export const deleteLocalComponents = async sourceOfComponents => {
|
|
|
63
82
|
|
|
64
83
|
export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
65
84
|
const spinner = ora('Fetching components from server').start();
|
|
85
|
+
const defaultPegaServerConfig = await getPegaServerConfig();
|
|
86
|
+
const isLaunchpad = defaultPegaServerConfig.serverType === 'launchpad';
|
|
66
87
|
const data = await getComponentsFromServer(answers);
|
|
67
88
|
|
|
68
|
-
const serverComponents = JSON.parse(data);
|
|
89
|
+
// const serverComponents = isLaunchpad ? data : JSON.parse(data).pxResults;
|
|
90
|
+
let serverComponents;
|
|
91
|
+
if (isLaunchpad) {
|
|
92
|
+
serverComponents = data;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
try {
|
|
96
|
+
if (typeof(data) == 'object') {
|
|
97
|
+
serverComponents = data.pxResults;
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
serverComponents = JSON.parse(data).pxResults;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
}
|
|
104
|
+
catch (ex) {}
|
|
105
|
+
}
|
|
69
106
|
spinner.stop();
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
20
|
|
75
|
-
|
|
107
|
+
|
|
108
|
+
if (serverComponents && serverComponents?.length > 0) {
|
|
109
|
+
if (isLaunchpad) {
|
|
110
|
+
const choicesArr = serverComponents.map(({ name: componentName, type, version }) => {
|
|
111
|
+
const name = `${standardizeStr(componentName, 45)} ${standardizeStr(type, 20)} ${standardizeStr(version, 20)}`;
|
|
112
|
+
|
|
113
|
+
const value = `${componentName}~|~${type}~|~${version}`;
|
|
114
|
+
const short = `\n Selected component : ${chalk.redBright(`${componentName} ${type} : ${version}`)}`;
|
|
115
|
+
|
|
116
|
+
return { name, value, short };
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
const launchpadAnswers = await inquirer.prompt({
|
|
120
|
+
name: 'componentToDelete',
|
|
121
|
+
type: 'rawlist',
|
|
122
|
+
pageSize: 10,
|
|
123
|
+
message: `Select component to delete \n ${standardizeStr('Component Name', 48)} ${standardizeStr('Type', 20)} ${standardizeStr(
|
|
124
|
+
'Version',
|
|
125
|
+
22
|
|
126
|
+
)}`,
|
|
127
|
+
choices: choicesArr
|
|
128
|
+
});
|
|
129
|
+
await deleteLaunchpadServerComponent(launchpadAnswers.componentToDelete);
|
|
130
|
+
} else {
|
|
131
|
+
// logic for Infinity
|
|
132
|
+
const choicesArr = serverComponents.map(({ label, pyRuleSet, pyRuleSetVersion }) => {
|
|
133
|
+
const name = `${standardizeStr(label, 45)} ${standardizeStr(pyRuleSet, 30)} ${standardizeStr(pyRuleSetVersion, 20)}`;
|
|
76
134
|
|
|
77
135
|
const value = `${label}~|~${pyRuleSet}~|~${pyRuleSetVersion}`;
|
|
78
136
|
const short = `Selected component : ${chalk.redBright(
|
|
@@ -81,27 +139,19 @@ export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
|
81
139
|
|
|
82
140
|
return { name, value, short };
|
|
83
141
|
});
|
|
84
|
-
|
|
142
|
+
const infinityAnswers = await inquirer.prompt({
|
|
85
143
|
name: 'componentToDelete',
|
|
86
144
|
type: 'rawlist',
|
|
87
145
|
pageSize: 10,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
146
|
+
message: `Select component to delete \n ${standardizeStr('Rule name', 48)} ${standardizeStr('Ruleset name', 30)} ${standardizeStr(
|
|
147
|
+
'Ruleset version',
|
|
148
|
+
22
|
|
149
|
+
)}`,
|
|
92
150
|
choices: choicesArr
|
|
93
151
|
});
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
152
|
+
await deleteInfinityServerComponent(infinityAnswers.componentToDelete);
|
|
153
|
+
}
|
|
97
154
|
} else {
|
|
98
155
|
console.log(chalk.bold.redBright(`No custom components in ${sourceOfComponents}`));
|
|
99
156
|
}
|
|
100
157
|
};
|
|
101
|
-
|
|
102
|
-
export const standardizeStr = (str, leng) => {
|
|
103
|
-
for (let i = str.length; i <= leng; i++) {
|
|
104
|
-
str += ' ';
|
|
105
|
-
}
|
|
106
|
-
return str;
|
|
107
|
-
};
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
|
|
12
12
|
import { showVersion } from '../../util.js';
|
|
13
13
|
|
|
14
|
-
const deleteComponentsFn = async (sourceOfComponents, answers) => {
|
|
14
|
+
const deleteComponentsFn = async (sourceOfComponents, answers, options) => {
|
|
15
15
|
switch (sourceOfComponents) {
|
|
16
16
|
case SOURCE_OF_COMPONENT_TYPES.LOCAL: {
|
|
17
|
-
await deleteLocalComponents(sourceOfComponents);
|
|
17
|
+
await deleteLocalComponents(sourceOfComponents, options);
|
|
18
18
|
break;
|
|
19
19
|
}
|
|
20
20
|
case SOURCE_OF_COMPONENT_TYPES.SERVER: {
|
|
@@ -34,16 +34,16 @@ export default async options => {
|
|
|
34
34
|
let sourceOfComponentsOption = SOURCE_OF_COMPONENT_TYPES.LOCAL;
|
|
35
35
|
if (options.params[3] === SOURCE_OF_COMPONENT_TYPES.LOCAL) {
|
|
36
36
|
sourceOfComponentsOption = options.params[3];
|
|
37
|
-
await deleteComponentsFn(sourceOfComponentsOption);
|
|
37
|
+
await deleteComponentsFn(sourceOfComponentsOption, null, options);
|
|
38
38
|
} else if (options.params[3] === SOURCE_OF_COMPONENT_TYPES.SERVER) {
|
|
39
39
|
sourceOfComponentsOption = options.params[3];
|
|
40
40
|
const questions = await getDeleteComponentsQuestions(options, sourceOfComponentsOption);
|
|
41
41
|
const answers = await inquirer.prompt(questions);
|
|
42
|
-
await deleteComponentsFn(sourceOfComponentsOption, answers);
|
|
42
|
+
await deleteComponentsFn(sourceOfComponentsOption, answers, options);
|
|
43
43
|
} else {
|
|
44
44
|
const questions = await getDeleteComponentsQuestions(options);
|
|
45
45
|
const answers = await inquirer.prompt(questions);
|
|
46
46
|
const { sourceOfComponents } = answers;
|
|
47
|
-
await deleteComponentsFn(sourceOfComponents, answers);
|
|
47
|
+
await deleteComponentsFn(sourceOfComponents, answers, options);
|
|
48
48
|
}
|
|
49
49
|
};
|
|
@@ -3,10 +3,13 @@ import inquirer from 'inquirer';
|
|
|
3
3
|
import ora from 'ora';
|
|
4
4
|
|
|
5
5
|
import {
|
|
6
|
+
deleteInfinityServerComponent,
|
|
7
|
+
deleteLaunchpadServerComponent,
|
|
6
8
|
deleteLocalComponent,
|
|
7
9
|
deleteServerComponent,
|
|
8
10
|
getComponents,
|
|
9
11
|
getPegaServerConfig,
|
|
12
|
+
standardizeStr,
|
|
10
13
|
validateRulesetVersion
|
|
11
14
|
} from '../../util.js';
|
|
12
15
|
import { getComponentsFromServer } from '../list/helper.js';
|
|
@@ -36,7 +39,7 @@ export const getDeleteComponentsQuestions = async (options, sourceOfComponentsOp
|
|
|
36
39
|
|
|
37
40
|
|
|
38
41
|
|
|
39
|
-
export const deleteLocalComponents = async sourceOfComponents => {
|
|
42
|
+
export const deleteLocalComponents = async (sourceOfComponents, options) => {
|
|
40
43
|
const localComponents = await getComponents();
|
|
41
44
|
|
|
42
45
|
for (var index in localComponents) {
|
|
@@ -44,45 +47,100 @@ export const deleteLocalComponents = async sourceOfComponents => {
|
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
if (localComponents.length > 0) {
|
|
47
|
-
const answers = await inquirer.prompt([
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
if (options.params.length >= 5) {
|
|
52
|
+
const sDeletion = options.params[4];
|
|
53
|
+
const confirmDeletion = (sDeletion === 'Y' ||
|
|
54
|
+
sDeletion === 'y' ||
|
|
55
|
+
sDeletion === true ||
|
|
56
|
+
sDeletion === 'true') ? true : false;
|
|
57
|
+
if (confirmDeletion) {
|
|
58
|
+
for (var index in localComponents) {
|
|
59
|
+
var componentToDelete = localComponents[index];
|
|
60
|
+
//console.log(chalk.bold.green("Deleting: " + componentToDelete));
|
|
61
|
+
await deleteLocalComponent(componentToDelete);
|
|
62
|
+
}
|
|
54
63
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
64
|
+
}
|
|
65
|
+
else{
|
|
66
|
+
const answers = await inquirer.prompt([
|
|
67
|
+
|
|
68
|
+
{
|
|
69
|
+
name: 'confirmDeletion',
|
|
70
|
+
type: 'confirm',
|
|
71
|
+
message: 'Delete all local ?',
|
|
72
|
+
default: false
|
|
73
|
+
}
|
|
74
|
+
]);
|
|
75
|
+
if (answers.confirmDeletion) {
|
|
76
|
+
for (const component of localComponents) {
|
|
77
|
+
// console.log(chalk.bold.green("Deleting: " + componentToDelete));
|
|
78
|
+
// eslint-disable-next-line no-await-in-loop
|
|
79
|
+
await deleteLocalComponent(component);
|
|
80
|
+
}
|
|
61
81
|
}
|
|
62
82
|
}
|
|
63
|
-
|
|
83
|
+
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
64
86
|
console.log(chalk.bold.redBright(`No custom components in ${sourceOfComponents}`));
|
|
65
87
|
}
|
|
66
88
|
};
|
|
67
89
|
|
|
68
90
|
export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
69
91
|
const spinner = ora('Fetching components from server').start();
|
|
92
|
+
const defaultPegaServerConfig = await getPegaServerConfig();
|
|
93
|
+
const isLaunchpad = defaultPegaServerConfig.serverType === 'launchpad';
|
|
70
94
|
const data = await getComponentsFromServer(answers);
|
|
71
|
-
const defaultPegaConfig = await getPegaServerConfig();
|
|
72
95
|
|
|
73
|
-
const serverComponents =
|
|
96
|
+
// const serverComponents = isLaunchpad ? data : data.pxResults;
|
|
97
|
+
let serverComponents;
|
|
98
|
+
if (isLaunchpad) {
|
|
99
|
+
serverComponents = data;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
try {
|
|
103
|
+
if (typeof(data) == 'object') {
|
|
104
|
+
serverComponents = data.pxResults;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
serverComponents = JSON.parse(data).pxResults;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
catch (ex) {}
|
|
112
|
+
}
|
|
113
|
+
|
|
74
114
|
spinner.stop();
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
)
|
|
115
|
+
|
|
116
|
+
if (serverComponents && serverComponents?.length > 0) {
|
|
117
|
+
if (isLaunchpad) {
|
|
118
|
+
serverComponents.forEach((component) => {
|
|
119
|
+
console.log(chalk.bold.green(component.name));
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const confirmDeletionAnswers = await inquirer.prompt([
|
|
123
|
+
{
|
|
124
|
+
name: 'confirmDeletion',
|
|
125
|
+
type: 'confirm',
|
|
126
|
+
message: 'All custom components for the tenant would be deleted. Do you want to proceed ?',
|
|
127
|
+
default: false
|
|
128
|
+
}
|
|
129
|
+
]);
|
|
130
|
+
|
|
131
|
+
if (confirmDeletionAnswers.confirmDeletion) {
|
|
132
|
+
const componentsList = serverComponents.map((component) => `${component.name}~|~`);
|
|
133
|
+
for (const componentToDelete of componentsList) {
|
|
134
|
+
// eslint-disable-next-line no-await-in-loop
|
|
135
|
+
await deleteLaunchpadServerComponent(componentToDelete);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
} else {
|
|
139
|
+
const choicesArr = serverComponents.map(({ label, pyRuleSet, pyRuleSetVersion }) => {
|
|
140
|
+
const name = `${standardizeStr(label, 45)} ${standardizeStr(pyRuleSet, 30)} ${standardizeStr(pyRuleSetVersion, 20)}`;
|
|
81
141
|
|
|
82
142
|
const value = `${label}~|~${pyRuleSet}~|~${pyRuleSetVersion}`;
|
|
83
|
-
|
|
84
|
-
`${label} ${pyRuleSet} : ${pyRuleSetVersion}`
|
|
85
|
-
)}`;
|
|
143
|
+
const short = `\n Selected component : ${chalk.redBright(`${label} ${pyRuleSet} : ${pyRuleSetVersion}`)}`;
|
|
86
144
|
|
|
87
145
|
return { name, value, short };
|
|
88
146
|
});
|
|
@@ -91,8 +149,8 @@ export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
|
91
149
|
{
|
|
92
150
|
name: 'rulesetName',
|
|
93
151
|
message: 'Enter ruleset name',
|
|
94
|
-
default:
|
|
95
|
-
|
|
152
|
+
default: defaultPegaServerConfig.rulesetName,
|
|
153
|
+
validate: (value) => {
|
|
96
154
|
if (value.trim()) {
|
|
97
155
|
return true;
|
|
98
156
|
}
|
|
@@ -102,8 +160,8 @@ export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
|
102
160
|
{
|
|
103
161
|
name: 'rulesetVersion',
|
|
104
162
|
message: 'Enter ruleset version',
|
|
105
|
-
|
|
106
|
-
|
|
163
|
+
default: defaultPegaServerConfig.rulesetVersion,
|
|
164
|
+
validate: (value) => {
|
|
107
165
|
if (validateRulesetVersion(value)) {
|
|
108
166
|
return true;
|
|
109
167
|
}
|
|
@@ -112,16 +170,22 @@ export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
|
112
170
|
}
|
|
113
171
|
]);
|
|
114
172
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
173
|
+
let bHasAtLeastOneComponent = false;
|
|
174
|
+
for (const choice of choicesArr) {
|
|
175
|
+
const componentToDelete = choice.value;
|
|
176
|
+
const [name, rulesetName, rulesetVersion] = componentToDelete.split('~|~');
|
|
177
|
+
if (rulesetName === selectedComp.rulesetName && rulesetVersion === selectedComp.rulesetVersion) {
|
|
178
|
+
console.log(chalk.bold.green(name));
|
|
179
|
+
bHasAtLeastOneComponent = true;
|
|
120
180
|
}
|
|
121
181
|
}
|
|
122
182
|
|
|
183
|
+
if (!bHasAtLeastOneComponent) {
|
|
184
|
+
console.log(chalk.bold.redBright(`No custom components in ${sourceOfComponents} that match ruleSet:${selectedComp.rulesetName}.`));
|
|
185
|
+
process.exit(1);
|
|
186
|
+
}
|
|
123
187
|
|
|
124
|
-
|
|
188
|
+
const confirmDeletionAnswers = await inquirer.prompt([
|
|
125
189
|
{
|
|
126
190
|
name: 'confirmDeletion',
|
|
127
191
|
type: 'confirm',
|
|
@@ -129,12 +193,15 @@ export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
|
129
193
|
default: false
|
|
130
194
|
}
|
|
131
195
|
]);
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
196
|
+
if (confirmDeletionAnswers.confirmDeletion) {
|
|
197
|
+
for (const choice of choicesArr) {
|
|
198
|
+
const componentToDelete = choice.value;
|
|
199
|
+
// eslint-disable-next-line no-unused-vars
|
|
200
|
+
const [name, rulesetName, rulesetVersion] = componentToDelete.split('~|~');
|
|
201
|
+
if (rulesetName === selectedComp.rulesetName && rulesetVersion === selectedComp.rulesetVersion) {
|
|
202
|
+
// eslint-disable-next-line no-await-in-loop
|
|
203
|
+
await deleteInfinityServerComponent(componentToDelete);
|
|
204
|
+
}
|
|
138
205
|
}
|
|
139
206
|
}
|
|
140
207
|
}
|
|
@@ -144,10 +211,3 @@ export const deleteServerComponents = async (sourceOfComponents, answers) => {
|
|
|
144
211
|
console.log(chalk.bold.redBright(`No custom components in ${sourceOfComponents}`));
|
|
145
212
|
}
|
|
146
213
|
};
|
|
147
|
-
|
|
148
|
-
export const standardizeStr = (str, leng) => {
|
|
149
|
-
for (let i = str.length; i <= leng; i++) {
|
|
150
|
-
str += ' ';
|
|
151
|
-
}
|
|
152
|
-
return str;
|
|
153
|
-
};
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
|
|
12
12
|
import { showVersion } from '../../util.js';
|
|
13
13
|
|
|
14
|
-
const deleteComponentsFn = async (sourceOfComponents, answers) => {
|
|
14
|
+
const deleteComponentsFn = async (sourceOfComponents, answers, options) => {
|
|
15
15
|
switch (sourceOfComponents) {
|
|
16
16
|
case SOURCE_OF_COMPONENT_TYPES.LOCAL: {
|
|
17
|
-
await deleteLocalComponents(sourceOfComponents);
|
|
17
|
+
await deleteLocalComponents(sourceOfComponents, options);
|
|
18
18
|
break;
|
|
19
19
|
}
|
|
20
20
|
case SOURCE_OF_COMPONENT_TYPES.SERVER: {
|
|
@@ -28,22 +28,22 @@ const deleteComponentsFn = async (sourceOfComponents, answers) => {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
export default async options => {
|
|
31
|
+
export default async (options) => {
|
|
32
32
|
showVersion();
|
|
33
33
|
|
|
34
34
|
let sourceOfComponentsOption = SOURCE_OF_COMPONENT_TYPES.LOCAL;
|
|
35
35
|
if (options.params[3] === SOURCE_OF_COMPONENT_TYPES.LOCAL) {
|
|
36
36
|
sourceOfComponentsOption = options.params[3];
|
|
37
|
-
await deleteComponentsFn(sourceOfComponentsOption);
|
|
37
|
+
await deleteComponentsFn(sourceOfComponentsOption, null, options);
|
|
38
38
|
} else if (options.params[3] === SOURCE_OF_COMPONENT_TYPES.SERVER) {
|
|
39
39
|
sourceOfComponentsOption = options.params[3];
|
|
40
40
|
const questions = await getDeleteComponentsQuestions(options, sourceOfComponentsOption);
|
|
41
41
|
const answers = await inquirer.prompt(questions);
|
|
42
|
-
await deleteComponentsFn(sourceOfComponentsOption, answers);
|
|
42
|
+
await deleteComponentsFn(sourceOfComponentsOption, answers, options);
|
|
43
43
|
} else {
|
|
44
44
|
const questions = await getDeleteComponentsQuestions(options);
|
|
45
45
|
const answers = await inquirer.prompt(questions);
|
|
46
46
|
const { sourceOfComponents } = answers;
|
|
47
|
-
await deleteComponentsFn(sourceOfComponents, answers);
|
|
47
|
+
await deleteComponentsFn(sourceOfComponents, answers, options);
|
|
48
48
|
}
|
|
49
49
|
};
|
package/src/tasks/index.js
CHANGED
|
@@ -3,9 +3,11 @@ export { default as createAllComponents } from './create-all/index.js';
|
|
|
3
3
|
export { default as deleteComponent } from './delete/index.js';
|
|
4
4
|
export { default as deleteAllComponents } from './delete-all/index.js';
|
|
5
5
|
export { default as initProject } from './init/index.js';
|
|
6
|
+
export { default as promoteWebPack } from './promote-webpack/index.js';
|
|
6
7
|
export { default as publishComponent } from './publish/index.js';
|
|
7
8
|
export { default as publishAllComponents } from './publish-all/index.js';
|
|
8
9
|
export { default as renameComponent } from './rename/index.js';
|
|
10
|
+
export { default as revertWebPack } from './revert-webpack/index.js';
|
|
9
11
|
export { default as listComponents } from './list/index.js';
|
|
10
12
|
export { default as updateComponent } from './update/index.js';
|
|
11
13
|
export { default as validate } from './validator/index.js';
|
|
@@ -13,4 +15,3 @@ export { default as authenticate } from './authenticate/index.js';
|
|
|
13
15
|
export { default as upgrade } from './upgrade/index.js';
|
|
14
16
|
export { default as buildComponent } from './build/index.js';
|
|
15
17
|
export { default as buildAllComponents } from './build-all/index.js';
|
|
16
|
-
export { default as generateWithAI } from './generate-ai/index.js';
|