@pega/custom-dx-components 24.2.16 → 25.1.10-alpha-0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +37 -35
- package/src/cli.js +6 -0
- package/src/constants.js +12 -4
- package/src/tasks/authenticate/index.js +5 -0
- package/src/tasks/build-all/index.js +20 -1
- package/src/tasks/build-jest-assets/index.js +7 -8
- package/src/tasks/build-lib/helper.js +39 -20
- package/src/tasks/build-lib/index.js +40 -18
- package/src/tasks/create/index.js +12 -2
- package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/demo.test.tsx.mustache +19 -0
- package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Date/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache +0 -24
- package/src/tasks/create/templates/Constellation/Field/Date/demo.test.tsx.mustache +52 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/demo.test.tsx.mustache +72 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/demo.test.tsx.mustache +21 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.test.tsx.mustache +23 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.test.tsx.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/demo.test.tsx.mustache +27 -0
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/localizations.json.mustache +10 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/demo.test.tsx.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/demo.test.tsx.mustache +25 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/demo.test.tsx.mustache +33 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/localizations.json.mustache +5 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.ts.mustache +0 -4
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/demo.test.tsx.mustache +29 -0
- package/src/tasks/create/templates/Constellation/Field/Text/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text/demo.test.tsx.mustache +19 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.test.tsx.mustache +20 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.test.tsx.mustache +20 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.test.tsx.mustache +21 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.test.tsx.mustache +23 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.test.tsx.mustache +20 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/config.json.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/demo.test.tsx.mustache +33 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.test.tsx.mustache +47 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.test.tsx.mustache +58 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/demo.test.tsx.mustache +40 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.test.tsx.mustache +56 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +4 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/demo.test.tsx.mustache +24 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.test.tsx.mustache +28 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/localizations.json.mustache +8 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +2 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.test.tsx.mustache +36 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/index.tsx.mustache +4 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE/localizations.json.mustache +10 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.test.tsx.mustache +29 -0
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/config.json.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/demo.test.tsx.mustache +27 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.test.tsx.mustache +28 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/demo.stories.tsx.mustache +2 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE/demo.test.tsx.mustache +36 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/config.json.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/create-nonce.ts.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +1 -0
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.test.tsx.mustache +19 -0
- package/src/tasks/create-all/index.js +22 -2
- package/src/tasks/create-lib/helper.js +6 -3
- package/src/tasks/create-lib/index.js +18 -6
- package/src/tasks/create-version/helper.js +30 -0
- package/src/tasks/create-version/index.js +27 -8
- package/src/tasks/delete/helper.js +6 -2
- package/src/tasks/delete/index.js +5 -1
- package/src/tasks/delete-lib/helper.js +0 -1
- package/src/tasks/delete-lib/index.js +10 -11
- package/src/tasks/delete-pub/helper.js +142 -1
- package/src/tasks/delete-pub/index.js +75 -10
- package/src/tasks/delete-version/index.js +8 -2
- package/src/tasks/export-archive/helper.js +47 -3
- package/src/tasks/export-archive/index.js +70 -44
- package/src/tasks/import-archive/helper.js +249 -4
- package/src/tasks/import-archive/index.js +477 -41
- package/src/tasks/import-comp/helper.js +26 -3
- package/src/tasks/import-comp/index.js +78 -117
- package/src/tasks/index.js +1 -0
- package/src/tasks/init/template/.eslintrc.json +1 -1
- package/src/tasks/init/template/.storybook/{main.js → main.ts} +4 -3
- package/src/tasks/init/template/.storybook/manager.ts +6 -0
- package/src/tasks/init/template/.storybook/preview.tsx +4 -1
- package/src/tasks/init/template/.storybook/theme.js +1 -1
- package/src/tasks/init/template/babel.config.cjs +18 -9
- package/src/tasks/init/template/jest.config.cjs +29 -4
- package/src/tasks/init/template/package.json.mustache +54 -35
- package/src/tasks/init/template/setupFiles.ts +5 -0
- package/src/tasks/init/template/setupTests.ts +99 -0
- package/src/tasks/init/template/tasks.config.json +1 -1
- package/src/tasks/init/template/tsconfig.json +4 -1
- package/src/tasks/list/helper.js +21 -2
- package/src/tasks/list-lib/index.js +10 -1
- package/src/tasks/list-pub/helper.js +102 -1
- package/src/tasks/list-pub/index.js +108 -36
- package/src/tasks/move/index.js +1 -1
- package/src/tasks/promote-webpack/index.js +0 -3
- package/src/tasks/publish/helper.js +9 -7
- package/src/tasks/publish/index.js +85 -16
- package/src/tasks/publish-all/index.js +12 -1
- package/src/tasks/publish-archive/helper.js +58 -0
- package/src/tasks/publish-archive/index.js +238 -0
- package/src/tasks/publish-lib/index.js +277 -69
- package/src/tasks/rename/index.js +9 -1
- package/src/tasks/rename-lib/index.js +10 -1
- package/src/tasks/restore/index.js +84 -0
- package/src/tasks/set-perm/index.js +1 -2
- package/src/tasks/show-help/index.js +34 -13
- package/src/tasks/show-status/index.js +34 -11
- package/src/tasks/store/index.js +39 -18
- package/src/tasks/switch-lib/helper.js +0 -1
- package/src/tasks/switch-lib/index.js +13 -9
- package/src/tasks/switch-version/index.js +11 -6
- package/src/tasks/validator/index.js +6 -1
- package/src/util.js +493 -116
- package/tests/assets/library/components/create/Pega_DXIL_MyTestText/config.json +2 -1
- package/tests/assets/library/components/create/Pega_DXIL_MyTestText/demo.test.tsx +19 -0
- package/tests/assets/library/components/create/shared/create-nonce.ts +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.test.tsx +19 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.test.tsx +28 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/localizations.json +8 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.test.tsx +23 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/date.ts +0 -24
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/demo.test.tsx +52 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.test.tsx +72 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.test.tsx +21 -0
- package/tests/assets/library/components/{create/shared → createAll/Constellation/Pega_DXIL_MyDetails}/Avatar.tsx +1 -1
- package/tests/assets/library/components/createAll/Constellation/{shared → Pega_DXIL_MyDetails}/Operator.tsx +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.test.tsx +47 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.test.tsx +20 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyForm/demo.test.tsx +40 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/demo.test.tsx +27 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/localizations.json +10 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.test.tsx +18 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +4 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/demo.test.tsx +24 -0
- package/tests/assets/library/components/createAll/Constellation/{shared → Pega_DXIL_MyPageCaseWidget}/Avatar.tsx +3 -4
- package/tests/assets/library/components/{create/shared → createAll/Constellation/Pega_DXIL_MyPageCaseWidget}/Operator.tsx +3 -3
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +1 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.test.tsx +29 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/index.tsx +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +2 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.test.tsx +36 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +4 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/localizations.json +10 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.test.tsx +21 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.test.tsx +18 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.test.tsx +23 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.test.tsx +25 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/demo.test.tsx +29 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.test.tsx +33 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +7 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/localizations.json +5 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyText/config.json +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyText/demo.test.tsx +19 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.test.tsx +20 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.test.tsx +33 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Avatar.tsx +76 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/Operator.tsx +215 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +1 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.test.tsx +58 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +2 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.test.tsx +56 -0
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +27 -1
- package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyURL/demo.test.tsx +20 -0
- package/tests/assets/library/components/createAll/Constellation/shared/create-nonce.ts +1 -0
- package/tests/assets/original/components/create/Pega_DXIL_MyTestText/config.json +1 -0
- package/tests/assets/original/components/create/Pega_DXIL_MyTestText/create-nonce.ts +1 -0
- package/tests/assets/original/components/create/Pega_DXIL_MyTestText/demo.test.tsx +19 -0
- package/tests/assets/original/components/create/shared/PConnProps.d.ts +46 -0
- package/tests/assets/original/components/create/shared/create-nonce.ts +7 -0
- package/tests/assets/original/components/create/shared/suggestions-handler.ts +9 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/demo.test.tsx +19 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.test.tsx +28 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/localizations.json +8 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/demo.test.tsx +23 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/date.ts +0 -24
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/demo.test.tsx +52 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.test.tsx +72 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/demo.test.tsx +21 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.test.tsx +47 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/demo.test.tsx +20 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/demo.test.tsx +40 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/demo.test.tsx +27 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/localizations.json +10 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/demo.test.tsx +18 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +4 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/demo.test.tsx +24 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.test.tsx +29 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +2 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.test.tsx +36 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/index.tsx +4 -1
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/localizations.json +10 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/demo.test.tsx +21 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/demo.test.tsx +18 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/demo.test.tsx +23 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/demo.test.tsx +25 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/demo.test.tsx +29 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/demo.test.tsx +33 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/index.tsx +7 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/localizations.json +5 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/demo.test.tsx +19 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/demo.test.tsx +20 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/demo.test.tsx +33 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.test.tsx +58 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/demo.test.tsx +56 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +26 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/demo.test.tsx +20 -0
- package/tests/assets/original/components/createAll/Constellation/shared/PConnProps.d.ts +46 -0
- package/tests/assets/original/components/createAll/Constellation/shared/create-nonce.ts +7 -0
- package/tests/assets/original/components/createAll/Constellation/shared/suggestions-handler.ts +9 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/demo.test.tsx +19 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.tsx +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.test.tsx +28 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/demo.test.tsx +23 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/date.ts +0 -24
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.test.tsx +52 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.test.tsx +72 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/demo.test.tsx +21 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.test.tsx +47 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/demo.test.tsx +20 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/demo.test.tsx +40 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/demo.test.tsx +27 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/demo.test.tsx +18 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +4 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.test.tsx +24 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.test.tsx +19 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +2 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.test.tsx +36 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/demo.test.tsx +21 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/demo.test.tsx +18 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/demo.test.tsx +23 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/demo.test.tsx +25 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/demo.test.tsx +29 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/demo.test.tsx +33 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/index.tsx +7 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/localizations.json +5 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/demo.test.tsx +19 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/demo.test.tsx +20 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/demo.test.tsx +33 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.test.tsx +58 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/demo.test.tsx +56 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/config.json +26 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/create-nonce.ts +1 -0
- package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/demo.test.tsx +20 -0
- package/tests/assets/original/components/createAll/Launchpad/shared/PConnProps.d.ts +46 -0
- package/tests/assets/original/components/createAll/Launchpad/shared/create-nonce.ts +7 -0
- package/tests/assets/original/components/createAll/Launchpad/shared/suggestions-handler.ts +9 -0
- package/tests/functional/localCreateAllListDeleteAll.test.js +12 -8
- package/tests/functional/localCreateBuildAllDeleteAll.test.js +12 -8
- package/tests/functional/localCreateBuildDelete.test.js +12 -8
- package/tests/functional/localCreateListDelete.test.js +14 -9
- package/tests/functional/localCreatePublishAllDeleteAll.test.js +13 -9
- package/tests/functional/localCreatePublishDelete.test.js +12 -8
- package/tests/functional/localCreateRenameDelete.test.js +12 -8
- package/tests/functional/localLibCreateLibAlreadyDeleteLib.test.js +14 -14
- package/tests/functional/localLibCreateLibBuildLibDeleteLib.test.js +17 -17
- package/tests/functional/localLibCreateLibBuildLibListPubDeleteLib.test.js +20 -20
- package/tests/functional/localLibCreateLibDeleteLib.test.js +17 -17
- package/tests/functional/localLibCreateLibExportImportLib.test.js +27 -27
- package/tests/functional/localLibCreateLibExportLib.test.js +19 -19
- package/tests/functional/localLibCreateLibImportCompDeleteLib.test.js +14 -14
- package/tests/functional/localLibCreateLibListDeleteLib.test.js +22 -22
- package/tests/functional/localLibCreateLibListMoveDeleteLib.test.js +31 -31
- package/tests/functional/localLibCreateLibListSwitchDeleteLib.test.js +20 -20
- package/tests/functional/localLibCreateLibStatusDeleteLib.test.js +13 -29
- package/tests/functional/localLibCreateLibStoreRestoreDeleteLib.test.js +376 -0
- package/tests/functional/localLibCreateLibValidateDeleteLib.test.js +18 -18
- package/tests/functional/localLibCreateLibVersionDeleteLib.test.js +27 -27
- package/tests/functional/localPromoteRevertWP.test.js +9 -8
- package/tests/functional/localLibCreateLibPermDeleteLib.test.js +0 -144
package/src/util.js
CHANGED
|
@@ -8,6 +8,7 @@ import { createRequire } from 'module';
|
|
|
8
8
|
import {jwtDecode} from 'jwt-decode';
|
|
9
9
|
import archiver from 'archiver';
|
|
10
10
|
import {unarchive} from 'unarchive';
|
|
11
|
+
import ora from 'ora';
|
|
11
12
|
|
|
12
13
|
import chalk from 'chalk';
|
|
13
14
|
import mustache from 'mustache';
|
|
@@ -22,27 +23,33 @@ import {
|
|
|
22
23
|
TASKS_CONFIG_JSON_FILENAME,
|
|
23
24
|
INPUT_CONFIG_JSON_FILENAME,
|
|
24
25
|
PACKAGE_JSON_FILENAME,
|
|
26
|
+
PACKAGE_LOCK_JSON_FILENAME,
|
|
25
27
|
TOKEN_PATH,
|
|
26
28
|
OOTB_COMPONENT_SERVICE_REST_ENDPOINT,
|
|
27
29
|
DELETE_COMPONENT_SERVICE_REST_ENDPOINT,
|
|
28
30
|
LP_DELETE_COMPONENT_SERVICE_REST_ENDPOINT,
|
|
31
|
+
DELETE_COMPONENT_LIBRARY_SERVICE_REST_ENDPOINT,
|
|
29
32
|
OOTB_COMPONENTS,
|
|
30
33
|
USE_PROMOTED_WEB_PACK,
|
|
31
34
|
BOOTSTRAP_CONFIG,
|
|
32
35
|
LIBRARY_BASED,
|
|
36
|
+
LIBRARY_BASED_CL,
|
|
33
37
|
USE_INPUT_CONFIG,
|
|
34
38
|
SHARED_DIRECTORY,
|
|
35
39
|
SHOW_DEBUG,
|
|
36
40
|
COMPONENTS_PATH,
|
|
41
|
+
COMPONENT_SCHEMA,
|
|
37
42
|
ARCHIVES_PATH,
|
|
38
43
|
BIN_ARCHIVES_PATH,
|
|
39
44
|
TEMP_PATH,
|
|
40
45
|
JEST_TESTS_FUNCTIONAL_PATH,
|
|
41
46
|
IMPORT_RELATIVE_PATH,
|
|
42
|
-
EXPORT_RELATIVE_PATH
|
|
47
|
+
EXPORT_RELATIVE_PATH,
|
|
48
|
+
MAX_RFT_CHARS
|
|
43
49
|
} from './constants.js';
|
|
44
50
|
|
|
45
51
|
|
|
52
|
+
|
|
46
53
|
const access = promisify(fs.access);
|
|
47
54
|
|
|
48
55
|
let showDebug = false;
|
|
@@ -55,6 +62,7 @@ let addAboutData = true;
|
|
|
55
62
|
let defaultConfigs = {
|
|
56
63
|
serverType: "",
|
|
57
64
|
isLibraryBased: false,
|
|
65
|
+
isLibraryBasedCL: false,
|
|
58
66
|
devBuild: true,
|
|
59
67
|
library: "",
|
|
60
68
|
organization: "",
|
|
@@ -111,6 +119,7 @@ export const setUpDefaults = async () => {
|
|
|
111
119
|
let retrievedConfigData = {
|
|
112
120
|
serverType: "",
|
|
113
121
|
isLibraryBased: false,
|
|
122
|
+
isLibraryBasedCL: false,
|
|
114
123
|
devBuild: true,
|
|
115
124
|
library: "",
|
|
116
125
|
organization: "",
|
|
@@ -139,22 +148,30 @@ export const setUpDefaults = async () => {
|
|
|
139
148
|
retrievedConfigData.importRelativePath = data[IMPORT_RELATIVE_PATH];
|
|
140
149
|
}
|
|
141
150
|
|
|
142
|
-
|
|
143
151
|
if (data[EXPORT_RELATIVE_PATH]) {
|
|
144
152
|
retrievedConfigData.exportRelativePath = data[EXPORT_RELATIVE_PATH];
|
|
145
153
|
}
|
|
146
154
|
|
|
147
|
-
if (data[LIBRARY_BASED]) {
|
|
148
|
-
retrievedConfigData.isLibraryBased = data[LIBRARY_BASED];
|
|
149
|
-
}
|
|
150
|
-
|
|
151
155
|
if (data[USE_INPUT_CONFIG]) {
|
|
152
156
|
retrievedConfigData.useInputConfig = data[USE_INPUT_CONFIG];
|
|
153
157
|
}
|
|
154
158
|
|
|
159
|
+
if (data[LIBRARY_BASED]) {
|
|
160
|
+
retrievedConfigData.isLibraryBased = data[LIBRARY_BASED];
|
|
161
|
+
}
|
|
162
|
+
|
|
155
163
|
retrievedConfigData.library = data.component.library;
|
|
156
164
|
retrievedConfigData.version = data.component.version;
|
|
157
165
|
|
|
166
|
+
if (data[LIBRARY_BASED_CL]) {
|
|
167
|
+
retrievedConfigData.isLibraryBasedCL = data[LIBRARY_BASED_CL];
|
|
168
|
+
|
|
169
|
+
// if this is true, then force librarybased to true, so it doesn't have to be set
|
|
170
|
+
if (retrievedConfigData.isLibraryBasedCL) {
|
|
171
|
+
retrievedConfigData.isLibraryBased = retrievedConfigData.isLibraryBasedCL;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
158
175
|
|
|
159
176
|
const { organization } = JSON.parse(fs.readFileSync(path.resolve('package.json'), 'utf8'));
|
|
160
177
|
retrievedConfigData.organization = organization;
|
|
@@ -181,7 +198,6 @@ export const setUpDefaults = async () => {
|
|
|
181
198
|
return JSON.parse(JSON.stringify(retrievedConfigData));
|
|
182
199
|
}
|
|
183
200
|
|
|
184
|
-
|
|
185
201
|
export const convertYNToBoolean = (inputYN) => {
|
|
186
202
|
switch (inputYN) {
|
|
187
203
|
case 'Y':
|
|
@@ -199,46 +215,45 @@ export const convertYNToBoolean = (inputYN) => {
|
|
|
199
215
|
}
|
|
200
216
|
|
|
201
217
|
export const getInputConfigForCommand = async (commandName) => {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
218
|
+
// retrievedConfigData
|
|
219
|
+
const currentDirectory = process.cwd();
|
|
220
|
+
const inputConfigJsonPath = join(currentDirectory, INPUT_CONFIG_JSON_FILENAME);
|
|
221
|
+
const isLibraryBased = getLibraryBased();
|
|
206
222
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
223
|
+
try {
|
|
224
|
+
// force to throw error and not console log
|
|
225
|
+
await checkPathAccess(inputConfigJsonPath, {}, true);
|
|
210
226
|
|
|
211
|
-
|
|
212
|
-
|
|
227
|
+
let data = fs.readFileSync(inputConfigJsonPath, { encoding: 'utf8' });
|
|
228
|
+
data = JSON.parse(data);
|
|
213
229
|
|
|
214
|
-
|
|
215
|
-
|
|
230
|
+
if (isLibraryBased) {
|
|
231
|
+
const libraryCommands = data["libraryMode"];
|
|
216
232
|
|
|
217
|
-
|
|
218
|
-
|
|
233
|
+
if (libraryCommands[commandName]) {
|
|
234
|
+
return libraryCommands[commandName];
|
|
219
235
|
|
|
220
|
-
}
|
|
221
236
|
}
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
if (standardCommands[commandName]) {
|
|
226
|
-
return standardCommands[commandName];
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
const standardCommands = data["standard"];
|
|
227
240
|
|
|
228
|
-
|
|
241
|
+
if (standardCommands[commandName]) {
|
|
242
|
+
return standardCommands[commandName];
|
|
229
243
|
|
|
230
244
|
}
|
|
231
|
-
}
|
|
232
|
-
catch (ex) {
|
|
233
|
-
// when can't find it, always be false, assume no library based.
|
|
234
|
-
// This is IMPORTANT for init (npx install)
|
|
235
|
-
return {};
|
|
236
|
-
}
|
|
237
245
|
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
catch (ex) {
|
|
249
|
+
// when can't find it, always be false, assume no library based.
|
|
250
|
+
// This is IMPORTANT for init (npx install)
|
|
238
251
|
return {};
|
|
252
|
+
}
|
|
239
253
|
|
|
240
|
-
}
|
|
254
|
+
return {};
|
|
241
255
|
|
|
256
|
+
}
|
|
242
257
|
|
|
243
258
|
// initialize
|
|
244
259
|
// await setUpDefaults();
|
|
@@ -330,7 +345,7 @@ if (showDebug) addDebugLog("updateUseWebPackPromotion", "", "");
|
|
|
330
345
|
}
|
|
331
346
|
|
|
332
347
|
export const getAboutData = async (currentOrgLib, buildVersion, dateStamp) => {
|
|
333
|
-
if (showDebug) addDebugLog("getAboutData", `currentOrgLib: ${currentOrgLib}, buildVersion: ${buildVersion}, dateStamp: ${dateStamp}
|
|
348
|
+
if (showDebug) addDebugLog("getAboutData", `currentOrgLib: ${currentOrgLib}, buildVersion: ${buildVersion}, dateStamp: ${dateStamp}`,"");
|
|
334
349
|
const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
|
|
335
350
|
|
|
336
351
|
if (tokenAndStaticServer.C11NB2S === undefined) {
|
|
@@ -345,8 +360,51 @@ if (showDebug) addDebugLog("getAboutData", `currentOrgLib: ${currentOrgLib}, bui
|
|
|
345
360
|
return `${currentOrgLib} ${buildVersion}, ${dateStamp}, ${infinityVersion}`;
|
|
346
361
|
}
|
|
347
362
|
|
|
363
|
+
export const applyPegaData = async (configJson) => {
|
|
364
|
+
if (showDebug) addDebugLog("applyPegaData", "", "");
|
|
365
|
+
const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
|
|
366
|
+
const currentDirectory = process.cwd()
|
|
367
|
+
// const currentPackagePath = join(currentDirectory, PACKAGE_JSON_FILENAME);
|
|
368
|
+
const currentPackageLockPath = join(currentDirectory, PACKAGE_LOCK_JSON_FILENAME);
|
|
369
|
+
// let currentPackageData;
|
|
370
|
+
let currentPackageLockData;
|
|
371
|
+
|
|
372
|
+
try {
|
|
373
|
+
currentPackageLockData = fs.readFileSync(currentPackageLockPath);
|
|
374
|
+
}
|
|
375
|
+
catch (ex) {
|
|
376
|
+
console.log(chalk.red(`\nUnable to retrieve current package-lock.json.`));
|
|
377
|
+
process.exit(1);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// const cData = JSON.parse(currentPackageData);
|
|
381
|
+
// const cosmosVersion = cData.dependencies["@pega/cosmos-react-core"];
|
|
382
|
+
|
|
383
|
+
const cData = JSON.parse(currentPackageLockData);
|
|
384
|
+
const cosmosReact = cData.packages["node_modules/@pega/cosmos-react-core"];
|
|
385
|
+
const cosmosVersion = cosmosReact.version;
|
|
386
|
+
|
|
387
|
+
let infinityVersion = "";
|
|
388
|
+
|
|
389
|
+
if (tokenAndStaticServer.C11NB2S === undefined) {
|
|
390
|
+
}
|
|
391
|
+
else {
|
|
392
|
+
const jwt = jwtDecode(tokenAndStaticServer.C11NB2S);
|
|
393
|
+
infinityVersion= jwt.infinity_version;
|
|
394
|
+
// don't remove "8." from infinity version so can do a comparison
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// apply info to config.json
|
|
398
|
+
configJson.infinityVersion = infinityVersion;
|
|
399
|
+
configJson.packageCosmosVersion = cosmosVersion;
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
}
|
|
403
|
+
|
|
348
404
|
export const checkJWTExpiration = async () => {
|
|
349
405
|
const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
|
|
406
|
+
const isLibraryBased = getLibraryBased();
|
|
407
|
+
const isLibraryBasedCL = getLibraryBasedCL();
|
|
350
408
|
|
|
351
409
|
if (tokenAndStaticServer.C11NB2S === undefined) {
|
|
352
410
|
console.log(chalk.redBright("Need to authenticate, missing services token.\nBuilding a library requires authentication to acquire a token to build."));
|
|
@@ -360,46 +418,64 @@ export const checkJWTExpiration = async () => {
|
|
|
360
418
|
process.exit(1);
|
|
361
419
|
}
|
|
362
420
|
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
421
|
+
|
|
422
|
+
// only check if older isLibraryBased
|
|
423
|
+
if (!isLibraryBasedCL && isLibraryBased) {
|
|
424
|
+
// check that there is customer_org
|
|
425
|
+
if (!customer_org || customer_org === "") {
|
|
426
|
+
console.log(chalk.red(`PegaInfinity server DSS setting ${chalk.redBright.bold(`C11nCCv2CustomerOrg`)} is NOT set.`));
|
|
427
|
+
console.log(chalk.red("Please update DSS setting, save and then reauthenticate."));
|
|
428
|
+
process.exit(1);
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
export const checkAccessTokenExpiration = async() => {
|
|
437
|
+
|
|
438
|
+
const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
|
|
439
|
+
|
|
440
|
+
if (tokenAndStaticServer.access_token === undefined) {
|
|
441
|
+
console.log(chalk.redBright("Need to authenticate, missing token.\n"));
|
|
442
|
+
process.exit(1);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
const jwt = jwtDecode(tokenAndStaticServer.access_token);
|
|
446
|
+
const { exp, customer_org } = jwt;
|
|
447
|
+
if (exp < (new Date().getTime() + 1) / 1000) {
|
|
448
|
+
console.log(chalk.redBright("Authentication token has expired, please reauthenticate."));
|
|
367
449
|
process.exit(1);
|
|
368
450
|
}
|
|
369
451
|
|
|
452
|
+
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
export const getApplicationAndVersionFromToken = async() => {
|
|
456
|
+
const tokenAndStaticServer = await getC11NB2STokenAndStaticServer();
|
|
457
|
+
|
|
458
|
+
if (tokenAndStaticServer.access_token === undefined) {
|
|
459
|
+
console.log(chalk.redBright("Need to authenticate, missing token.\n"));
|
|
460
|
+
process.exit(1);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
const jwt = jwtDecode(tokenAndStaticServer.access_token);
|
|
464
|
+
const { app_name, app_version } = jwt;
|
|
465
|
+
return { app_name, app_version };
|
|
466
|
+
|
|
370
467
|
}
|
|
371
468
|
|
|
372
469
|
export const getLibraryBased = () => {
|
|
373
470
|
if (showDebug) addDebugLog("getLibraryBased", "", "");
|
|
374
|
-
// const currentDirectory = process.cwd();
|
|
375
|
-
// const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
376
|
-
|
|
377
|
-
// try {
|
|
378
|
-
// // force to throw error and not console log
|
|
379
|
-
// await checkPathAccess(pegaConfigJsonPath, {}, true);
|
|
380
|
-
// }
|
|
381
|
-
// catch (ex) {
|
|
382
|
-
// // when can't find it, always be false, assume no library based.
|
|
383
|
-
// // This is IMPORTANT for init (npx install)
|
|
384
|
-
// return false;
|
|
385
|
-
// }
|
|
386
|
-
|
|
387
|
-
// let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
388
|
-
// data = JSON.parse(data);
|
|
389
|
-
|
|
390
|
-
// if (data[LIBRARY_BASED]) {
|
|
391
|
-
// if (showDebug) addDebugLog("getLibraryBased", `based: ${data[LIBRARY_BASED]}`, "");
|
|
392
|
-
// if (showDebug) addDebugLog("getLibraryBased", "END", "-");
|
|
393
|
-
// return data[LIBRARY_BASED];
|
|
394
|
-
// }
|
|
395
|
-
// else {
|
|
396
|
-
// if (showDebug) addDebugLog("getLibraryBased", "END", "-");
|
|
397
|
-
// return false;
|
|
398
|
-
// }
|
|
399
|
-
|
|
400
471
|
return defaultConfigs.isLibraryBased;
|
|
401
472
|
}
|
|
402
473
|
|
|
474
|
+
export const getLibraryBasedCL = () => {
|
|
475
|
+
if (showDebug) addDebugLog("getLibraryBasedCL", "", "");
|
|
476
|
+
return defaultConfigs.isLibraryBasedCL;
|
|
477
|
+
}
|
|
478
|
+
|
|
403
479
|
export const getUseInputConfig = () => {
|
|
404
480
|
if (showDebug) addDebugLog("getUseInputConfig", "", "");
|
|
405
481
|
|
|
@@ -407,8 +483,6 @@ if (showDebug) addDebugLog("getUseInputConfig", "", "");
|
|
|
407
483
|
return defaultConfigs.useInputConfig;
|
|
408
484
|
}
|
|
409
485
|
|
|
410
|
-
|
|
411
|
-
|
|
412
486
|
export const setLibraryBased = async (isLibraryBased) => {
|
|
413
487
|
if (showDebug) addDebugLog("setLibraryBased", "", "");
|
|
414
488
|
const currentDirectory = process.cwd();
|
|
@@ -449,27 +523,57 @@ if (showDebug) addDebugLog("setLibraryBased", "", "");
|
|
|
449
523
|
|
|
450
524
|
}
|
|
451
525
|
|
|
526
|
+
export const setLibraryBasedCL = async (isLibraryBasedCL) => {
|
|
527
|
+
if (showDebug) addDebugLog("setLibraryBased", "", "");
|
|
528
|
+
const currentDirectory = process.cwd();
|
|
529
|
+
const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
530
|
+
|
|
531
|
+
try {
|
|
532
|
+
// force to throw error and not console log
|
|
533
|
+
await checkPathAccess(pegaConfigJsonPath, {}, true);
|
|
534
|
+
}
|
|
535
|
+
catch (ex) {
|
|
536
|
+
// when can't find it, always be false, assume no library based.
|
|
537
|
+
// This is IMPORTANT for init (npx install)
|
|
538
|
+
return false;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
542
|
+
data = JSON.parse(data);
|
|
543
|
+
|
|
544
|
+
if (data[LIBRARY_BASED_CL] != undefined) {
|
|
545
|
+
data[LIBRARY_BASED_CL] = isLibraryBasedCL;
|
|
546
|
+
|
|
547
|
+
// if not undefined, force this as well
|
|
548
|
+
if (data[LIBRARY_BASED] != undefined) {
|
|
549
|
+
data[LIBRARY_BASED] = isLibraryBasedCL;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
// update file
|
|
553
|
+
// stringify "4", makes the json string look like JSON in the file, formated instead of a single line
|
|
554
|
+
try {
|
|
555
|
+
fs.writeFileSync(pegaConfigJsonPath, JSON.stringify(data, null, 4), { encoding: 'utf8',flag:'w' });
|
|
556
|
+
}
|
|
557
|
+
catch (err) {
|
|
558
|
+
console.error(err);
|
|
559
|
+
}
|
|
560
|
+
//await forceDefaultsUpdate();
|
|
561
|
+
defaultConfigs.isLibraryBasedCL = isLibraryBasedCL;
|
|
562
|
+
|
|
563
|
+
// force libraryBased if isLibraryBasedCL is true
|
|
564
|
+
defaultConfigs.isLibraryBased = isLibraryBasedCL;
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
// reset
|
|
568
|
+
pegaData = null;
|
|
569
|
+
pegaConfig = null;
|
|
570
|
+
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
}
|
|
574
|
+
|
|
452
575
|
export const getShowDebug = () => {
|
|
453
|
-
|
|
454
|
-
// const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
455
|
-
|
|
456
|
-
// try {
|
|
457
|
-
// // force to throw error and not console log
|
|
458
|
-
// await checkPathAccess(pegaConfigJsonPath, {}, true);
|
|
459
|
-
// }
|
|
460
|
-
// catch (ex) {
|
|
461
|
-
// // when can't find it, always be false, assume no library based.
|
|
462
|
-
// // This is IMPORTANT for init (npx install)
|
|
463
|
-
// return false;
|
|
464
|
-
// }
|
|
465
|
-
|
|
466
|
-
// let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
|
|
467
|
-
// data = JSON.parse(data);
|
|
468
|
-
|
|
469
|
-
// if (data[SHOW_DEBUG]) {
|
|
470
|
-
// return data[SHOW_DEBUG];
|
|
471
|
-
// }
|
|
472
|
-
// else return false;
|
|
576
|
+
|
|
473
577
|
return defaultConfigs.showDebug;
|
|
474
578
|
|
|
475
579
|
}
|
|
@@ -640,7 +744,6 @@ if (showDebug) addDebugLog("removeTopLevelConfigFiles", `directory: ${directory}
|
|
|
640
744
|
if (configF !== "package-lock.json" &&
|
|
641
745
|
configF !== "package.json" &&
|
|
642
746
|
configF !== "tasks.config.json" &&
|
|
643
|
-
configF !== "input.config.json" &&
|
|
644
747
|
configF !== ".gitignore" &&
|
|
645
748
|
configF !== ".npmrc" &&
|
|
646
749
|
configF !== ".prettierignore") {
|
|
@@ -858,6 +961,7 @@ if (showDebug) addDebugLog("getPegaServerConfig", "", "+");
|
|
|
858
961
|
}
|
|
859
962
|
|
|
860
963
|
}
|
|
964
|
+
|
|
861
965
|
sPegaServerConfig = JSON.stringify(pegaConfig['server-config']);
|
|
862
966
|
}
|
|
863
967
|
|
|
@@ -1052,7 +1156,8 @@ if (showDebug) addDebugLog("updateConfigVersion", `componentKey: ${componentKey}
|
|
|
1052
1156
|
data.version = buildVersion;
|
|
1053
1157
|
|
|
1054
1158
|
if (addAboutData) {
|
|
1055
|
-
data.buildDate =
|
|
1159
|
+
data.buildDate = currentDate;
|
|
1160
|
+
await applyPegaData(data);
|
|
1056
1161
|
}
|
|
1057
1162
|
|
|
1058
1163
|
|
|
@@ -1194,12 +1299,6 @@ export const showVersion = async () => {
|
|
|
1194
1299
|
process.exit(1);
|
|
1195
1300
|
}
|
|
1196
1301
|
|
|
1197
|
-
// const hasGit = checkGit(process.cwd());
|
|
1198
|
-
|
|
1199
|
-
// if (!hasGit) {
|
|
1200
|
-
// console.log(chalk.redBright('DX Component Builder - Git needs to be installed.'));
|
|
1201
|
-
// process.exit(1);
|
|
1202
|
-
// }
|
|
1203
1302
|
};
|
|
1204
1303
|
|
|
1205
1304
|
export const getOOTBComponents = async () => {
|
|
@@ -1334,6 +1433,96 @@ if (showDebug) addDebugLog("deleteInfinityServerComponent", `componentKey: ${com
|
|
|
1334
1433
|
}
|
|
1335
1434
|
};
|
|
1336
1435
|
|
|
1436
|
+
export const deleteInfinityServerComponentLibrary = async (libraryName, rulesetName, rulesetVersion) => {
|
|
1437
|
+
if (showDebug) addDebugLog("deleteInfinityServerComponentLibrary", `componentKey: ${componentKey}, rulesetName: ${rulesetName}, rulesetVersion: ${rulesetVersion}`, "");
|
|
1438
|
+
const serverConfig = await getPegaServerConfig();
|
|
1439
|
+
const { server } = serverConfig;
|
|
1440
|
+
const url = constructCompleteUrl(server, DELETE_COMPONENT_LIBRARY_SERVICE_REST_ENDPOINT);
|
|
1441
|
+
const deleteUrl = `${url}/${libraryName}/rulesetname/${rulesetName}/rulesetversion/${rulesetVersion}`;
|
|
1442
|
+
try {
|
|
1443
|
+
const OauthData = fs.readFileSync(TOKEN_PATH, 'utf8');
|
|
1444
|
+
|
|
1445
|
+
let status = 500;
|
|
1446
|
+
|
|
1447
|
+
if (OauthData) {
|
|
1448
|
+
const { access_token: accessToken, token_type: tokenType } = JSON.parse(OauthData);
|
|
1449
|
+
let spinner;
|
|
1450
|
+
|
|
1451
|
+
console.log();
|
|
1452
|
+
spinner = ora(chalk.green.bold('Deleting component library...')).start();
|
|
1453
|
+
|
|
1454
|
+
const response = await fetch(deleteUrl, {
|
|
1455
|
+
method: 'DELETE',
|
|
1456
|
+
agent: getHttpsAgent(serverConfig),
|
|
1457
|
+
headers: {
|
|
1458
|
+
Authorization: `${tokenType} ${accessToken}`
|
|
1459
|
+
}
|
|
1460
|
+
});
|
|
1461
|
+
|
|
1462
|
+
spinner.stop();
|
|
1463
|
+
console.log();
|
|
1464
|
+
|
|
1465
|
+
status = response.status;
|
|
1466
|
+
if (!response.ok) {
|
|
1467
|
+
if (status === 401) {
|
|
1468
|
+
throw new Error(
|
|
1469
|
+
'Error occurred in authentication. Please regenerate using authenticate'
|
|
1470
|
+
);
|
|
1471
|
+
// console.log(accessTokenUri, refreshToken);
|
|
1472
|
+
/* TODO - Handle refresh_token */
|
|
1473
|
+
}
|
|
1474
|
+
else if (status === 404){
|
|
1475
|
+
throw new Error('404: Server resource not found');
|
|
1476
|
+
}
|
|
1477
|
+
else if (status === 405){
|
|
1478
|
+
throw new Error('405: Server method not allowed');
|
|
1479
|
+
}
|
|
1480
|
+
else if (status === 408){
|
|
1481
|
+
throw new Error('408: Server timed out');
|
|
1482
|
+
}
|
|
1483
|
+
else if (response.status === 403) {
|
|
1484
|
+
throw new Error(
|
|
1485
|
+
'Error forbidden: User does not have privileges to Publish.'
|
|
1486
|
+
);
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
try {
|
|
1492
|
+
const respData = await response.json();
|
|
1493
|
+
const message = respData.message;
|
|
1494
|
+
status = parseInt(respData.status);
|
|
1495
|
+
|
|
1496
|
+
if (status === 200) {
|
|
1497
|
+
console.log(
|
|
1498
|
+
chalk.bold.green(`${message}`)
|
|
1499
|
+
);
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
if (status === 500) {
|
|
1503
|
+
status = 999;
|
|
1504
|
+
throw new Error(message);
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
catch (err) {
|
|
1508
|
+
if (status === 500) {
|
|
1509
|
+
throw new Error(
|
|
1510
|
+
`Error occurred in authentication. Please regenerate using authenticate`
|
|
1511
|
+
);
|
|
1512
|
+
}
|
|
1513
|
+
else if (status === 999) {
|
|
1514
|
+
throw new Error (err);
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
}
|
|
1519
|
+
} catch (error) {
|
|
1520
|
+
|
|
1521
|
+
throw new Error(error);
|
|
1522
|
+
}
|
|
1523
|
+
};
|
|
1524
|
+
|
|
1525
|
+
|
|
1337
1526
|
export const deleteLaunchpadServerComponent = async componentKey => {
|
|
1338
1527
|
if (showDebug) addDebugLog("deleteLaunchpadServerComponent", `componentKey: ${componentKey}`, "");
|
|
1339
1528
|
const { server, isolationId } = await getPegaServerConfig();
|
|
@@ -1485,10 +1674,10 @@ if (showDebug) addDebugLog("getC11NB2STokenAndStaticServer", "", "");
|
|
|
1485
1674
|
}
|
|
1486
1675
|
|
|
1487
1676
|
if (OAuthData) {
|
|
1488
|
-
const { C11NB2S, appStaticContentServer } = JSON.parse(OAuthData)
|
|
1677
|
+
const { C11NB2S, appStaticContentServer, access_token } = JSON.parse(OAuthData)
|
|
1489
1678
|
|
|
1490
1679
|
if (C11NB2S) {
|
|
1491
|
-
return ({ C11NB2S, appStaticContentServer});
|
|
1680
|
+
return ({ C11NB2S, appStaticContentServer, access_token});
|
|
1492
1681
|
}
|
|
1493
1682
|
|
|
1494
1683
|
}
|
|
@@ -1610,7 +1799,7 @@ if (showDebug) addDebugLog("deletePublishExtras", `libraryName: ${libraryName},
|
|
|
1610
1799
|
// check if .DS_store file exists in Library, if so delete it because causes issue with services
|
|
1611
1800
|
|
|
1612
1801
|
const currentDirectory = process.cwd();
|
|
1613
|
-
const zipFile = libraryName.concat(".zip");
|
|
1802
|
+
const zipFile = libraryName.concat(".arch.zip");
|
|
1614
1803
|
|
|
1615
1804
|
// delete zip file
|
|
1616
1805
|
const zipPath = join(currentDirectory, zipFile);
|
|
@@ -1694,7 +1883,7 @@ if (showDebug) addDebugLog("zipVersionAndArchive", `orgLibName: ${orgLibName}, v
|
|
|
1694
1883
|
const srcDirectoryPath = join(currentDirectory, "src");
|
|
1695
1884
|
const tasksConfig = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
1696
1885
|
const packageJson = join(currentDirectory, PACKAGE_JSON_FILENAME);
|
|
1697
|
-
const archiveFileName = `${orgLibName}_${version}.zip`;
|
|
1886
|
+
const archiveFileName = `${orgLibName}_${version}.arch.zip`;
|
|
1698
1887
|
|
|
1699
1888
|
|
|
1700
1889
|
// const configContent = Buffer.from(fs.readFileSync(configJson)).toString();
|
|
@@ -1764,6 +1953,164 @@ if (showDebug) addDebugLog("zipVersionAndArchive", `orgLibName: ${orgLibName}, v
|
|
|
1764
1953
|
|
|
1765
1954
|
};
|
|
1766
1955
|
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
|
|
1959
|
+
export const zipVersionAndArchiveAndReturnBuffer = async (orgLibName, version, currentDirectory = "") => {
|
|
1960
|
+
if (showDebug) addDebugLog("zipVersionAndArchive", `orgLibName: ${orgLibName}, version: ${version}`, "");
|
|
1961
|
+
// const srcDirectoryPath = await getSrcDirectoryPath();
|
|
1962
|
+
if (currentDirectory === "") {
|
|
1963
|
+
currentDirectory = process.cwd();
|
|
1964
|
+
}
|
|
1965
|
+
const srcDirectoryPath = join(currentDirectory, "src");
|
|
1966
|
+
const tasksConfig = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
1967
|
+
const packageJson = join(currentDirectory, PACKAGE_JSON_FILENAME);
|
|
1968
|
+
const archiveFileName = `${orgLibName}_${version}.arch.zip`;
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
// const configContent = Buffer.from(fs.readFileSync(configJson)).toString();
|
|
1972
|
+
const mainDirectory = process.cwd();
|
|
1973
|
+
const archiveDirectory = join (mainDirectory, ARCHIVES_PATH, `${orgLibName}`, `${version}`);
|
|
1974
|
+
if (!fs.existsSync(archiveDirectory)) {
|
|
1975
|
+
fs.mkdirSync(archiveDirectory, { recursive: true });
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
// create componentsconfig.json
|
|
1979
|
+
await createComponentsConfigFile(archiveDirectory, join(srcDirectoryPath, "components"));
|
|
1980
|
+
|
|
1981
|
+
const archiveFile = join(archiveDirectory, archiveFileName);
|
|
1982
|
+
if (fs.existsSync(orgLibName)) {
|
|
1983
|
+
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
const output = fs.createWriteStream(archiveFile);
|
|
1987
|
+
const archive = archiver('zip', {
|
|
1988
|
+
zlib: { level: 9 } // Sets the compression level.
|
|
1989
|
+
});
|
|
1990
|
+
|
|
1991
|
+
const zipChunks = [];
|
|
1992
|
+
archive.on('data', chunk => zipChunks.push(chunk));
|
|
1993
|
+
|
|
1994
|
+
|
|
1995
|
+
// Add src directory
|
|
1996
|
+
archive.directory(srcDirectoryPath, 'src');
|
|
1997
|
+
|
|
1998
|
+
// grab all files (not directories and archive)
|
|
1999
|
+
const configFiles = await getTopLevelConfigFiles(currentDirectory);
|
|
2000
|
+
if (configFiles && configFiles.length > 0) {
|
|
2001
|
+
for (const configF of configFiles) {
|
|
2002
|
+
if (configF !== "package-lock.json") {
|
|
2003
|
+
archive.file(
|
|
2004
|
+
join(currentDirectory, configF), { name: configF });
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
// pipe archive data to the file
|
|
2011
|
+
archive.pipe(output);
|
|
2012
|
+
|
|
2013
|
+
output.on('end', function() {
|
|
2014
|
+
console.log('Data has been drained');
|
|
2015
|
+
});
|
|
2016
|
+
|
|
2017
|
+
|
|
2018
|
+
// good practice to catch warnings (ie stat failures and other non-blocking errors)
|
|
2019
|
+
archive.on('warning', function(err) {
|
|
2020
|
+
if (err.code === 'ENOENT') {
|
|
2021
|
+
// log warning
|
|
2022
|
+
} else {
|
|
2023
|
+
// throw error
|
|
2024
|
+
throw err;
|
|
2025
|
+
}
|
|
2026
|
+
});
|
|
2027
|
+
|
|
2028
|
+
// good practice to catch this error explicitly
|
|
2029
|
+
archive.on('error', function(err) {
|
|
2030
|
+
throw err;
|
|
2031
|
+
});
|
|
2032
|
+
|
|
2033
|
+
await archive.finalize();
|
|
2034
|
+
|
|
2035
|
+
const zipBuffer = Buffer.concat(zipChunks);
|
|
2036
|
+
const zipContent = zipBuffer.toString('base64');
|
|
2037
|
+
|
|
2038
|
+
return { output, zipContent};
|
|
2039
|
+
|
|
2040
|
+
};
|
|
2041
|
+
|
|
2042
|
+
export const zipUnArchiveToTempAndReturnBuffer = async(orgLibName, version) => {
|
|
2043
|
+
|
|
2044
|
+
// unarchive to temp
|
|
2045
|
+
const currentDirectory = process.cwd();
|
|
2046
|
+
const tempDirectory = join (currentDirectory, TEMP_PATH);
|
|
2047
|
+
const srcDirectoryPath = join(tempDirectory, "src");
|
|
2048
|
+
|
|
2049
|
+
const archiveFileName = `${orgLibName}_${version}.arch.zip`;
|
|
2050
|
+
const archiveDirectory = join (currentDirectory, ARCHIVES_PATH, `${orgLibName}`, `${version}`);
|
|
2051
|
+
const archFileName = join(archiveDirectory, archiveFileName);
|
|
2052
|
+
|
|
2053
|
+
await unZipFromArchive(archFileName);
|
|
2054
|
+
|
|
2055
|
+
// archive is in temp directory
|
|
2056
|
+
const archiveFile = join(tempDirectory, archiveFileName);
|
|
2057
|
+
|
|
2058
|
+
const output = fs.createWriteStream(archiveFile);
|
|
2059
|
+
const archive = archiver('zip', {
|
|
2060
|
+
zlib: { level: 9 } // Sets the compression level.
|
|
2061
|
+
});
|
|
2062
|
+
|
|
2063
|
+
const zipChunks = [];
|
|
2064
|
+
archive.on('data', chunk => zipChunks.push(chunk));
|
|
2065
|
+
|
|
2066
|
+
// Add src directory
|
|
2067
|
+
archive.directory(srcDirectoryPath, 'src');
|
|
2068
|
+
|
|
2069
|
+
// grab all files (not directories and archive)
|
|
2070
|
+
const configFiles = await getTopLevelConfigFiles(tempDirectory);
|
|
2071
|
+
if (configFiles && configFiles.length > 0) {
|
|
2072
|
+
for (const configF of configFiles) {
|
|
2073
|
+
if (configF !== "package-lock.json") {
|
|
2074
|
+
archive.file(
|
|
2075
|
+
join(tempDirectory, configF), { name: configF });
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
// pipe archive data to the file
|
|
2082
|
+
archive.pipe(output);
|
|
2083
|
+
|
|
2084
|
+
output.on('end', function() {
|
|
2085
|
+
console.log('Data has been drained');
|
|
2086
|
+
});
|
|
2087
|
+
|
|
2088
|
+
|
|
2089
|
+
// good practice to catch warnings (ie stat failures and other non-blocking errors)
|
|
2090
|
+
archive.on('warning', function(err) {
|
|
2091
|
+
if (err.code === 'ENOENT') {
|
|
2092
|
+
// log warning
|
|
2093
|
+
} else {
|
|
2094
|
+
// throw error
|
|
2095
|
+
throw err;
|
|
2096
|
+
}
|
|
2097
|
+
});
|
|
2098
|
+
|
|
2099
|
+
// good practice to catch this error explicitly
|
|
2100
|
+
archive.on('error', function(err) {
|
|
2101
|
+
throw err;
|
|
2102
|
+
});
|
|
2103
|
+
|
|
2104
|
+
await archive.finalize();
|
|
2105
|
+
|
|
2106
|
+
const zipBuffer = Buffer.concat(zipChunks);
|
|
2107
|
+
const zipContent = zipBuffer.toString('base64');
|
|
2108
|
+
|
|
2109
|
+
return { output, zipContent};
|
|
2110
|
+
|
|
2111
|
+
|
|
2112
|
+
}
|
|
2113
|
+
|
|
1767
2114
|
export const zipVersionAndArchiveCL = async (orgLibName, version, currentDirectory = "") => {
|
|
1768
2115
|
if (showDebug) addDebugLog("zipVersionAndArchiveCL", `orgLibName: ${orgLibName}, version: ${version}, currentDirectory: ${currentDirectory}`, "");
|
|
1769
2116
|
// const srcDirectoryPath = await getSrcDirectoryPath();
|
|
@@ -2098,8 +2445,12 @@ if (showDebug) addDebugLog("restoreFromArchive", `fileName: ${fileName}, orgLibN
|
|
|
2098
2445
|
const archiveDirectory = join (currentDirectory, ARCHIVES_PATH, `${orgLibName}`, `${version}`);
|
|
2099
2446
|
const archFileName = join(archiveDirectory, fileName);
|
|
2100
2447
|
|
|
2101
|
-
await unZipFromArchive(archFileName);
|
|
2102
2448
|
|
|
2449
|
+
if (!fs.existsSync(archiveDirectory)) {
|
|
2450
|
+
throw new Error (`Archive ${orgLibName}/${version} does NOT exist.`);
|
|
2451
|
+
}
|
|
2452
|
+
|
|
2453
|
+
await unZipFromArchive(archFileName);
|
|
2103
2454
|
|
|
2104
2455
|
const tempPackagePath = join (tempDirectory, PACKAGE_JSON_FILENAME);
|
|
2105
2456
|
const currentPackagePath = join(currentDirectory, PACKAGE_JSON_FILENAME);
|
|
@@ -2150,7 +2501,7 @@ if (showDebug) addDebugLog("restoreFromArchive", `fileName: ${fileName}, orgLibN
|
|
|
2150
2501
|
|
|
2151
2502
|
|
|
2152
2503
|
// remove temp (windows not working well with "sync", can be async, since as long as deleted, fine)
|
|
2153
|
-
fs.
|
|
2504
|
+
fs.rmSync(tempDirectory, { recursive: true, force: true, maxRetries: 5 }, () => {});
|
|
2154
2505
|
|
|
2155
2506
|
};
|
|
2156
2507
|
|
|
@@ -2214,21 +2565,6 @@ if (showDebug) addDebugLog("checkLibraryAndArchives", ``, "");
|
|
|
2214
2565
|
|
|
2215
2566
|
export const hasLibraryAndVersion = async (libraryName, version, devBuild) => {
|
|
2216
2567
|
if (showDebug) addDebugLog("hasLibraryAndVersion", `libraryName: ${libraryName}, version: ${version}, devBuild: ${devBuild}`, "");
|
|
2217
|
-
// const orgLib = getConfigDefaults();
|
|
2218
|
-
// const currentOrgLib = `${orgLib.organization}_${libraryName}`;
|
|
2219
|
-
// const libFiles = await getLibraryArchivesFiles(currentOrgLib);
|
|
2220
|
-
// let currentVersion = version;
|
|
2221
|
-
// if (devBuild) {
|
|
2222
|
-
// currentVersion = currentVersion.concat("-dev");
|
|
2223
|
-
// }
|
|
2224
|
-
// const fileName = `${currentOrgLib}_${currentVersion}.zip`;
|
|
2225
|
-
// if (libFiles && libFiles.length > 0) {
|
|
2226
|
-
// if (libFiles.includes(fileName)) {
|
|
2227
|
-
// return true;
|
|
2228
|
-
// }
|
|
2229
|
-
// }
|
|
2230
|
-
|
|
2231
|
-
// return false;
|
|
2232
2568
|
|
|
2233
2569
|
const orgLib = getConfigDefaults();
|
|
2234
2570
|
const currentOrgLib = `${orgLib.organization}_${libraryName}`;
|
|
@@ -2363,6 +2699,47 @@ if (showDebug) addDebugLog("getJestFunctionalTestList", ``, "");
|
|
|
2363
2699
|
|
|
2364
2700
|
}
|
|
2365
2701
|
|
|
2702
|
+
export const getSubTypeLabel = (type, subtype) => {
|
|
2703
|
+
const subTypeList = COMPONENT_SCHEMA.subtype;
|
|
2704
|
+
const typeList = subTypeList[type.toLowerCase()];
|
|
2705
|
+
|
|
2706
|
+
for (let i in typeList) {
|
|
2707
|
+
if (typeList[i]['value'] === subtype) {
|
|
2708
|
+
const label = typeList[i]['name'].replace("&", "and");
|
|
2709
|
+
return label;
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
|
|
2713
|
+
return "";
|
|
2714
|
+
}
|
|
2715
|
+
|
|
2716
|
+
export const getMaxComponentNameCount = () => {
|
|
2717
|
+
let count = MAX_RFT_CHARS - 1; // one less than max
|
|
2718
|
+
const configDef = getConfigDefaults();
|
|
2719
|
+
const orgLibCount = configDef.currentOrgLib.length + 1;
|
|
2720
|
+
const versionCount = configDef.version.length - 2;
|
|
2721
|
+
const prefixCount = versionCount + 4;
|
|
2722
|
+
|
|
2723
|
+
count = count - orgLibCount - prefixCount - 9; // 9 chars for trailing hash
|
|
2724
|
+
|
|
2725
|
+
return count;
|
|
2726
|
+
|
|
2727
|
+
}
|
|
2728
|
+
|
|
2729
|
+
export const getMaxPrefixCount = () => {
|
|
2730
|
+
// TwoColumnDetails is 16 chars
|
|
2731
|
+
return (getMaxComponentNameCount() - 16);
|
|
2732
|
+
}
|
|
2733
|
+
|
|
2734
|
+
export const isComponentValidLength = (componentKey) => {
|
|
2735
|
+
const configDef = getConfigDefaults();
|
|
2736
|
+
const componentName = componentKey.replace(configDef.currentOrgLib + "_", "");
|
|
2737
|
+
if (componentName.length < getMaxComponentNameCount()) {
|
|
2738
|
+
return true;
|
|
2739
|
+
}
|
|
2740
|
+
|
|
2741
|
+
return false;
|
|
2742
|
+
}
|
|
2366
2743
|
|
|
2367
2744
|
// init
|
|
2368
2745
|
await forceDefaultsUpdate();
|