@pega/custom-dx-components 24.2.15 → 25.1.10-alpha-0.1
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 +11 -3
- 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 +5 -1
- 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 +5 -1
- package/src/tasks/create-lib/helper.js +6 -2
- 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 +476 -40
- 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 +1 -1
- package/src/util.js +468 -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
|
@@ -7,28 +7,35 @@ import ncp from 'ncp';
|
|
|
7
7
|
import chalk from 'chalk';
|
|
8
8
|
import { Listr } from 'listr2';
|
|
9
9
|
|
|
10
|
+
import StreamZip from 'node-stream-zip';
|
|
11
|
+
|
|
12
|
+
import inquirerFuzzyPath from '@pega/inquirer-fuzzy-path';
|
|
13
|
+
|
|
10
14
|
import {
|
|
11
15
|
sanitize,
|
|
12
16
|
checkPathAccess,
|
|
13
17
|
showVersion,
|
|
14
18
|
getDirectoryFiles,
|
|
15
19
|
addDebugLog,
|
|
16
|
-
|
|
20
|
+
checkAccessTokenExpiration,
|
|
17
21
|
getConfigDefaults,
|
|
18
22
|
getLibraryBased,
|
|
23
|
+
getLibraryBasedCL,
|
|
19
24
|
unZipFromArchive,
|
|
20
25
|
zipVersionAndArchive,
|
|
21
26
|
getLibraryArchiveDirectories,
|
|
27
|
+
getHaveDependencyDifference,
|
|
22
28
|
hasLibraryAndVersion,
|
|
23
29
|
cleanUpTemp,
|
|
24
30
|
hasArchives,
|
|
25
31
|
restoreFromArchive,
|
|
26
32
|
forceDefaultsUpdate,
|
|
27
33
|
getUseInputConfig,
|
|
28
|
-
getInputConfigForCommand
|
|
34
|
+
getInputConfigForCommand,
|
|
35
|
+
getPegaServerConfig
|
|
29
36
|
} from '../../util.js';
|
|
30
37
|
import { TASKS_CONFIG_JSON_FILENAME, ARCHIVES_PATH, TEMP_PATH } from '../../constants.js';
|
|
31
|
-
import { getFilePathQuestions, getFileNameQuestions, updateTempArchive, updateSavedFilePath } from './helper.js';
|
|
38
|
+
import { getFilePathQuestions, getFileNameQuestions, updateTempArchive, updateSavedFilePath, getServerOrDirectoryQuestion, getLibraryArchiveQuestion, getServerLibraryArchives, getServerLibraryArchive } from './helper.js';
|
|
32
39
|
import { showCurrentStatus } from '../show-status/index.js';
|
|
33
40
|
|
|
34
41
|
export const DXCB_CONFIG_INTERNAL_JSON_FILENAME = 'src/dxcb.config.json';
|
|
@@ -164,11 +171,18 @@ export const getPackgeOrg = async(packagePath) => {
|
|
|
164
171
|
}
|
|
165
172
|
|
|
166
173
|
export const getLocalConfigData = async(tasksPath) => {
|
|
174
|
+
const isLibraryBasedCL = getLibraryBasedCL();
|
|
167
175
|
let configData = { library: "", version: "", buildVersion: "", devBuild: false};
|
|
168
176
|
const sTaskData = fs.readFileSync(tasksPath, { encoding: 'utf8' });
|
|
169
177
|
const taskData = sTaskData && JSON.parse(sTaskData);
|
|
170
178
|
|
|
171
|
-
|
|
179
|
+
let devBuild = taskData["server-config"].devBuild;
|
|
180
|
+
|
|
181
|
+
// no -dev in PegaInfinity
|
|
182
|
+
if (isLibraryBasedCL) {
|
|
183
|
+
devBuild = false;
|
|
184
|
+
}
|
|
185
|
+
|
|
172
186
|
configData.library = taskData["component"].library;
|
|
173
187
|
configData.version = taskData["component"].version;
|
|
174
188
|
configData.devBuild = devBuild;
|
|
@@ -184,7 +198,7 @@ export const moveComp = async(componentKey, orgLibName, version, copyShared, opt
|
|
|
184
198
|
const currentDirectory = process.cwd();
|
|
185
199
|
const tempDirectory = join(currentDirectory, TEMP_PATH);
|
|
186
200
|
const archiveDirectory = join (currentDirectory, ARCHIVES_PATH, `${orgLibName}`, `${version}`);
|
|
187
|
-
const fileName = `${orgLibName}_${version}.zip`;
|
|
201
|
+
const fileName = `${orgLibName}_${version}.arch.zip`;
|
|
188
202
|
const archFileName = join(archiveDirectory, fileName);
|
|
189
203
|
|
|
190
204
|
|
|
@@ -221,28 +235,256 @@ export const moveComp = async(componentKey, orgLibName, version, copyShared, opt
|
|
|
221
235
|
fs.rmSync(tempDirectory, { recursive: true, force: true, maxRetries: 2 });
|
|
222
236
|
}
|
|
223
237
|
|
|
238
|
+
|
|
224
239
|
export const importArch = async(filePath, fileName, hadArchive) => {
|
|
240
|
+
addDebugLog("importArch", `filePath: ${filePath}, fileName: ${fileName}`, "");
|
|
241
|
+
|
|
242
|
+
const currentDirectory = process.cwd();
|
|
243
|
+
|
|
244
|
+
const storeDirectory = join (currentDirectory, ARCHIVES_PATH);
|
|
245
|
+
if (!fs.existsSync(storeDirectory)) {
|
|
246
|
+
fs.mkdirSync(storeDirectory);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const tempDirectory = join(currentDirectory, TEMP_PATH);
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
const zipFilePath = join(filePath, fileName);
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
// we are going to use node stream zip to list contents of archive first,
|
|
256
|
+
// before we un archive to a temp directory. If pass, then un archive
|
|
257
|
+
let passCount = 0;
|
|
258
|
+
|
|
259
|
+
// check to see if have a tasks.config.json and package,json file, if not, archive not good
|
|
260
|
+
const tempTasksConfig = join(tempDirectory, "tasks.config.json");
|
|
261
|
+
const tempPackage = join(tempDirectory, "package.json");
|
|
262
|
+
const tasksConfig = "tasks.config.json";
|
|
263
|
+
const packageJson = "package.json";
|
|
264
|
+
try {
|
|
265
|
+
const testZip = new StreamZip.async({ file: zipFilePath});
|
|
266
|
+
const entries = await testZip.entries();
|
|
267
|
+
|
|
268
|
+
for (const entry of Object.values(entries)) {
|
|
269
|
+
if ( entry.name.indexOf(packageJson) >= 0 || entry.name.indexOf(tasksConfig) >= 0) {
|
|
270
|
+
passCount++;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// Do not forget to close the file once you're done
|
|
275
|
+
await testZip.close();
|
|
276
|
+
}
|
|
277
|
+
catch (ex) {
|
|
278
|
+
passCount = 0;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
if (passCount < 2) {
|
|
283
|
+
console.log(chalk.red.bold(`Zip file: ${fileName} not a compatible DX Component archive.`));
|
|
284
|
+
process.exit(1);
|
|
285
|
+
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
await unZipFromArchive(zipFilePath);
|
|
289
|
+
|
|
290
|
+
// need to get info from tasks.config and package.json
|
|
291
|
+
// we won't rely on name of file, as owner can change it
|
|
292
|
+
|
|
293
|
+
let organization = await getPackgeOrg(tempPackage);
|
|
294
|
+
let localConfig = await getLocalConfigData(tempTasksConfig);
|
|
295
|
+
|
|
296
|
+
let libName = localConfig.library;
|
|
297
|
+
let orgLibName = `${organization}_${libName}`;
|
|
298
|
+
const version = localConfig.buildVersion;
|
|
299
|
+
const devBuild = localConfig.devBuild;
|
|
300
|
+
|
|
301
|
+
const configDef = getConfigDefaults();
|
|
302
|
+
|
|
303
|
+
if (organization !== configDef.organization) {
|
|
304
|
+
console.log(`\nImported ${chalk.yellow(`${orgLibName}/${version}`)} is not the same organization as your current organization: ${chalk.yellow(`${configDef.organization}`)}.`);
|
|
305
|
+
console.log(`\nTo import, the organization of the components will be changed to match your organization.`);
|
|
306
|
+
console.log(`\n\t>>> If you don't want this to happen, then end and create a new project with an organization`);
|
|
307
|
+
console.log(`\t of ${chalk.yellow(`${organization}`)} and import there.\n`);
|
|
308
|
+
|
|
309
|
+
const proceedAnswers = await inquirer.prompt([
|
|
310
|
+
|
|
311
|
+
{
|
|
312
|
+
name: 'okToContinue',
|
|
313
|
+
type: 'confirm',
|
|
314
|
+
message: `Ok to proceed ?`,
|
|
315
|
+
default: true
|
|
316
|
+
}
|
|
317
|
+
]);
|
|
318
|
+
|
|
319
|
+
if (proceedAnswers.okToContinue) {
|
|
320
|
+
// check if new version matches existing
|
|
321
|
+
// -dev is already on version, if present, so "false", for devBuild here
|
|
322
|
+
const alreadyExists = await hasLibraryAndVersion(libName, version, false);
|
|
323
|
+
if (alreadyExists) {
|
|
324
|
+
console.log(`${chalk.yellow(`${configDef.organization}_${libName}/${version}`)} already exists.`);
|
|
325
|
+
const archDirectories = await getLibraryArchiveDirectories();
|
|
326
|
+
const newLibNameAnswers = await inquirer.prompt([
|
|
327
|
+
{
|
|
328
|
+
name: 'libraryName',
|
|
329
|
+
message: 'Enter new libray name',
|
|
330
|
+
validate: value => {
|
|
331
|
+
/* value should not be empty
|
|
332
|
+
It should not have spaces
|
|
333
|
+
It should not start with a number
|
|
334
|
+
Only case-insensitive alphanumeric values are allowed
|
|
335
|
+
*/
|
|
336
|
+
if (value && !/^\d/.test(value) && value === sanitize(value)) {
|
|
337
|
+
if (archDirectories && archDirectories.length > 0) {
|
|
338
|
+
const newOrgLib = `${configDef.organization}_${value}`;
|
|
339
|
+
if (archDirectories.includes(newOrgLib)) {
|
|
340
|
+
return `Library ${value} already exists.`;
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
return true;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
else {
|
|
347
|
+
return true;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
}
|
|
351
|
+
else {
|
|
352
|
+
return 'Only alphanumeric values are allowed, starting with alphabets, no spaces.';
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
]);
|
|
357
|
+
|
|
358
|
+
libName = newLibNameAnswers.libraryName;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// rename orgLibName
|
|
362
|
+
orgLibName = `${configDef.organization}_${libName}`;
|
|
363
|
+
|
|
364
|
+
// update temp with new info
|
|
365
|
+
await updateTempArchive(libName, version, devBuild);
|
|
366
|
+
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
process.exit();
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// rearchive temp directory
|
|
376
|
+
await zipVersionAndArchive(orgLibName, version, tempDirectory);
|
|
377
|
+
|
|
378
|
+
// delete temp directory
|
|
379
|
+
fs.rmSync(tempDirectory, { recursive: true, force: true, maxRetries: 2 });
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
if (hadArchive) {
|
|
383
|
+
console.log(`\n${chalk.green(`${fileName}`)} has been imported!`);
|
|
384
|
+
console.log(`You can switch to ${chalk.green(`${orgLibName}/${version}`)} via npm run switchLib.`);
|
|
385
|
+
console.log("");
|
|
386
|
+
}
|
|
387
|
+
else {
|
|
388
|
+
const switchToFileName = `${orgLibName}_${version}.arch.zip`;
|
|
389
|
+
|
|
390
|
+
const tasks = new Listr(
|
|
391
|
+
[
|
|
392
|
+
{
|
|
393
|
+
title: `Restoring ${orgLibName}/${version}`,
|
|
394
|
+
task: async () => {
|
|
395
|
+
await restoreFromArchive(switchToFileName, orgLibName, version);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
],
|
|
399
|
+
{ concurrent: false, exitOnError: true }
|
|
400
|
+
);
|
|
401
|
+
|
|
402
|
+
console.log(`\n${chalk.green(`${fileName}`)} has been imported!`);
|
|
403
|
+
|
|
404
|
+
await tasks.run().catch(err => {
|
|
405
|
+
console.log(chalk.bold.red(err.toString()));
|
|
406
|
+
process.exit(1);
|
|
407
|
+
});
|
|
408
|
+
|
|
409
|
+
console.log(`${chalk.bold.green(`\nSwitched to ${orgLibName}/${version}!\n`)}`);
|
|
410
|
+
|
|
411
|
+
await forceDefaultsUpdate();
|
|
412
|
+
await showCurrentStatus();
|
|
413
|
+
|
|
414
|
+
if (getHaveDependencyDifference()) {
|
|
415
|
+
console.log('\n***************************************************************');
|
|
416
|
+
console.log(chalk.bold.yellow('Dependencies have changed between versions, recommend updating.'));
|
|
417
|
+
console.log(`>>> PLEASE run ${chalk.bold.yellow("'npm update'")}.`);
|
|
418
|
+
console.log('***************************************************************\n');
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export const importArchServer = async(filePath, fileName, hadArchive) => {
|
|
225
427
|
addDebugLog("importArch", `filePath: ${filePath}, fileName: ${fileName}`, "");
|
|
226
428
|
|
|
227
429
|
const currentDirectory = process.cwd();
|
|
430
|
+
const storeDirectory = join (currentDirectory, ARCHIVES_PATH);
|
|
431
|
+
if (!fs.existsSync(storeDirectory)) {
|
|
432
|
+
fs.mkdirSync(storeDirectory);
|
|
433
|
+
}
|
|
434
|
+
|
|
228
435
|
const tempDirectory = join(currentDirectory, TEMP_PATH);
|
|
436
|
+
|
|
229
437
|
const zipFilePath = join(filePath, fileName);
|
|
230
438
|
|
|
231
|
-
|
|
439
|
+
// we are going to use node stream zip to list contents of archive first,
|
|
440
|
+
// before we un archive to a temp directory. If pass, then un archive
|
|
441
|
+
let passCount = 0;
|
|
232
442
|
|
|
233
|
-
// check to see if have a tasks.config.json file, if not, archive not good
|
|
443
|
+
// check to see if have a tasks.config.json and package,json file, if not, archive not good
|
|
234
444
|
const tempTasksConfig = join(tempDirectory, "tasks.config.json");
|
|
235
445
|
const tempPackage = join(tempDirectory, "package.json");
|
|
446
|
+
const tasksConfig = "tasks.config.json";
|
|
447
|
+
const packageJson = "package.json";
|
|
448
|
+
let testZip;
|
|
449
|
+
try {
|
|
450
|
+
testZip = new StreamZip.async({ file: zipFilePath});
|
|
451
|
+
const entries = await testZip.entries();
|
|
452
|
+
|
|
453
|
+
for (const entry of Object.values(entries)) {
|
|
454
|
+
if ( entry.name.indexOf(packageJson) >= 0 || entry.name.indexOf(tasksConfig) >= 0) {
|
|
455
|
+
passCount++;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
}
|
|
460
|
+
catch (ex) {
|
|
461
|
+
passCount = 0;
|
|
462
|
+
}
|
|
236
463
|
|
|
237
|
-
if (
|
|
464
|
+
if (passCount < 2) {
|
|
238
465
|
console.log(chalk.red.bold(`Zip file: ${fileName} not a compatible DX Component archive.`));
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
466
|
+
// Do not forget to close the file once you're done
|
|
467
|
+
await testZip.close();
|
|
468
|
+
|
|
242
469
|
process.exit(1);
|
|
243
470
|
|
|
244
471
|
}
|
|
245
472
|
|
|
473
|
+
// make directory in temp dir, can NOT be the same directory as the zip file is in
|
|
474
|
+
const dirName = fileName.replaceAll(".zip", "");
|
|
475
|
+
const newDirPath = join(TEMP_PATH, dirName);
|
|
476
|
+
fs.mkdirSync(newDirPath);
|
|
477
|
+
|
|
478
|
+
const count = await testZip.extract(null, newDirPath);
|
|
479
|
+
|
|
480
|
+
// Do not forget to close the file once you're done
|
|
481
|
+
await testZip.close();
|
|
482
|
+
|
|
483
|
+
// we want file contents to be in the TEMP_PATH (copying, but temp directory eventually will be deleted)
|
|
484
|
+
fs.cpSync(newDirPath, TEMP_PATH, {recursive: true});
|
|
485
|
+
|
|
486
|
+
// await unZipFromArchive(zipFilePath);
|
|
487
|
+
|
|
246
488
|
// need to get info from tasks.config and package.json
|
|
247
489
|
// we won't rely on name of file, as owner can change it
|
|
248
490
|
|
|
@@ -337,10 +579,11 @@ addDebugLog("importArch", `filePath: ${filePath}, fileName: ${fileName}`, "");
|
|
|
337
579
|
|
|
338
580
|
if (hadArchive) {
|
|
339
581
|
console.log(`\n${chalk.green(`${fileName}`)} has been imported!`);
|
|
340
|
-
console.log(`You can switch to ${chalk.green(`${orgLibName}/${version}`)} via npm run switchLib
|
|
582
|
+
console.log(`You can switch to ${chalk.green(`${orgLibName}/${version}`)} via npm run switchLib.`);
|
|
583
|
+
console.log("");
|
|
341
584
|
}
|
|
342
585
|
else {
|
|
343
|
-
const switchToFileName = `${orgLibName}_${version}.zip`;
|
|
586
|
+
const switchToFileName = `${orgLibName}_${version}.arch.zip`;
|
|
344
587
|
|
|
345
588
|
const tasks = new Listr(
|
|
346
589
|
[
|
|
@@ -366,10 +609,13 @@ addDebugLog("importArch", `filePath: ${filePath}, fileName: ${fileName}`, "");
|
|
|
366
609
|
await forceDefaultsUpdate();
|
|
367
610
|
await showCurrentStatus();
|
|
368
611
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
612
|
+
if (getHaveDependencyDifference()) {
|
|
613
|
+
console.log('\n***************************************************************');
|
|
614
|
+
console.log(chalk.bold.yellow('Dependencies have changed between versions, recommend updating.'));
|
|
615
|
+
console.log(`>>> PLEASE run ${chalk.bold.yellow("'npm update'")}.`);
|
|
616
|
+
console.log('***************************************************************\n');
|
|
617
|
+
}
|
|
618
|
+
|
|
373
619
|
}
|
|
374
620
|
|
|
375
621
|
|
|
@@ -391,12 +637,41 @@ export const getZipFileList = async(filePath) => {
|
|
|
391
637
|
}
|
|
392
638
|
}
|
|
393
639
|
|
|
640
|
+
function decodeBase64(encodedString) {
|
|
641
|
+
try {
|
|
642
|
+
const decodedString = atob(encodedString);
|
|
643
|
+
return decodedString;
|
|
644
|
+
} catch (error) {
|
|
645
|
+
console.error("Error decoding base64 string:", error);
|
|
646
|
+
return null;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export const writeZipBuffer = async(fileName, fileBuffer) => {
|
|
651
|
+
const currentDirectory = process.cwd();
|
|
652
|
+
const tempDirectory = join(currentDirectory, TEMP_PATH);
|
|
653
|
+
|
|
654
|
+
const storeDirectory = join (currentDirectory, ARCHIVES_PATH);
|
|
655
|
+
if (!fs.existsSync(storeDirectory)) {
|
|
656
|
+
fs.mkdirSync(storeDirectory);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
if (!fs.existsSync (tempDirectory)) {
|
|
660
|
+
fs.mkdirSync(tempDirectory);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
const filePath = join(tempDirectory, fileName);
|
|
664
|
+
fs.writeFileSync(filePath, fileBuffer, 'base64');
|
|
665
|
+
|
|
666
|
+
}
|
|
667
|
+
|
|
394
668
|
export default async options => {
|
|
395
669
|
await showVersion();
|
|
396
670
|
// await checkLibraryAndArchives();
|
|
397
671
|
|
|
398
672
|
await checkPathAccess(pegaConfigJsonPath);
|
|
399
673
|
const isLibraryBased = getLibraryBased();
|
|
674
|
+
const isLibraryBasedCL = getLibraryBasedCL();
|
|
400
675
|
const useInputConfig = getUseInputConfig();
|
|
401
676
|
|
|
402
677
|
if (!isLibraryBased) {
|
|
@@ -411,47 +686,208 @@ export default async options => {
|
|
|
411
686
|
addDebugLog("importArchive", "", "+");
|
|
412
687
|
|
|
413
688
|
|
|
414
|
-
if (options.params.length >=
|
|
415
|
-
const
|
|
416
|
-
const
|
|
689
|
+
if (options.params.length >= 6) {
|
|
690
|
+
const localOrServer = options.params[3];
|
|
691
|
+
const filePath = options.params[4];
|
|
692
|
+
const fileName = options.params[5];
|
|
693
|
+
|
|
417
694
|
await importArch( filePath, fileName, hasArch);
|
|
418
695
|
|
|
419
696
|
}
|
|
420
697
|
else {
|
|
421
698
|
|
|
422
|
-
let filePath;
|
|
423
|
-
let fileName;
|
|
424
|
-
|
|
425
699
|
if (useInputConfig) {
|
|
426
700
|
const inputConfig = await getInputConfigForCommand("importLibVersion");
|
|
427
|
-
filePath = inputConfig.fileLocation;
|
|
428
|
-
fileName = inputConfig.fileName;
|
|
701
|
+
const filePath = inputConfig.fileLocation;
|
|
702
|
+
const fileName = inputConfig.fileName;
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
console.log("");
|
|
706
|
+
|
|
707
|
+
const tasks = new Listr(
|
|
708
|
+
[
|
|
709
|
+
{
|
|
710
|
+
title: `Importing archive`,
|
|
711
|
+
task: async () => {
|
|
712
|
+
await importArch( filePath, fileName, hasArch);
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
],
|
|
716
|
+
{ concurrent: false, exitOnError: true }
|
|
717
|
+
);
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
await tasks.run().catch(err => {
|
|
721
|
+
console.log(chalk.bold.red(err.toString()));
|
|
722
|
+
process.exit(1);
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
console.log("");
|
|
726
|
+
|
|
727
|
+
// reapply to save if changed, because imported task.config may have overriden and we want
|
|
728
|
+
// to keep what was entered as the latest
|
|
729
|
+
await updateSavedFilePath(filePath);
|
|
429
730
|
|
|
430
731
|
}
|
|
431
732
|
else {
|
|
432
|
-
|
|
433
|
-
const filePathAnswers = await inquirer.prompt(filePathQuestions);
|
|
434
|
-
({ filePath } = filePathAnswers);
|
|
435
|
-
const zipFileList = await getZipFileList(filePath);
|
|
733
|
+
inquirer.registerPrompt('fuzzypath', inquirerFuzzyPath);
|
|
436
734
|
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
735
|
+
let importFrom = "Directory";
|
|
736
|
+
|
|
737
|
+
if (isLibraryBasedCL) {
|
|
738
|
+
const localOrServerQuestion = await getServerOrDirectoryQuestion();
|
|
739
|
+
const localOrServerAnswer = await inquirer.prompt(localOrServerQuestion);
|
|
740
|
+
({importFrom} = localOrServerAnswer);
|
|
741
|
+
}
|
|
742
|
+
else {
|
|
743
|
+
importFrom = "Directory";
|
|
440
744
|
}
|
|
441
745
|
|
|
442
|
-
|
|
746
|
+
if (importFrom === "Server") {
|
|
747
|
+
await checkAccessTokenExpiration();
|
|
748
|
+
|
|
749
|
+
let archiveVersions = [];
|
|
750
|
+
try {
|
|
751
|
+
archiveVersions = await getServerLibraryArchives();
|
|
752
|
+
}
|
|
753
|
+
catch (ex) {
|
|
754
|
+
console.log(chalk.redBright(ex));
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
if (archiveVersions && archiveVersions.pxResults.length > 0) {
|
|
759
|
+
// ALL option
|
|
760
|
+
const defaultPegaServerConfig = await getPegaServerConfig();
|
|
761
|
+
|
|
762
|
+
console.log(`\nRetrieved archives from server ${chalk.bold.green(`${defaultPegaServerConfig.server}`)}.`)
|
|
763
|
+
|
|
764
|
+
// to name value pairs
|
|
765
|
+
const archiveResults = archiveVersions["pxResults"].map( archive => ( { value: `${archive.pyApplicationName},${archive.pyFileName},${archive.pyFileType},${archive.pyRuleSet},${archive.pyRuleSetVersion}`, name: `${archive.pyLabel}, ${archive.pyRuleSet}:${archive.pyRuleSetVersion}` }) );
|
|
766
|
+
|
|
443
767
|
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
({fileName} = fileNameAnswers);
|
|
768
|
+
const versionQuestions = await getLibraryArchiveQuestion(archiveResults);
|
|
769
|
+
const versionAnswers = await inquirer.prompt(versionQuestions);
|
|
447
770
|
|
|
771
|
+
const {archiveData} = versionAnswers;
|
|
772
|
+
|
|
773
|
+
if (archiveData != "") {
|
|
774
|
+
|
|
775
|
+
const arArchData = archiveData.split(",");
|
|
776
|
+
let fileName = `${arArchData[1]}.${arArchData[2]}`;
|
|
777
|
+
let fileData;
|
|
778
|
+
|
|
779
|
+
console.log("");
|
|
780
|
+
|
|
781
|
+
const tasks = new Listr(
|
|
782
|
+
[
|
|
783
|
+
{
|
|
784
|
+
title: 'Fetching archive from server',
|
|
785
|
+
task: async () => {
|
|
786
|
+
// get archive
|
|
787
|
+
fileData = await getServerLibraryArchive(arArchData[0],arArchData[1], arArchData[2], arArchData[3], arArchData[4]);
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
title: 'Saving archive in store',
|
|
792
|
+
task: async () => {
|
|
793
|
+
await writeZipBuffer(fileName, fileData.pyFileSource);
|
|
794
|
+
|
|
795
|
+
// import archive
|
|
796
|
+
const currentDirectory = process.cwd();
|
|
797
|
+
const tempDirectory = join(currentDirectory, TEMP_PATH);
|
|
798
|
+
|
|
799
|
+
await importArchServer( tempDirectory, fileName, hasArch);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
],
|
|
803
|
+
{ concurrent: false, exitOnError: true }
|
|
804
|
+
);
|
|
805
|
+
|
|
806
|
+
await tasks.run().catch(err => {
|
|
807
|
+
console.log(chalk.bold.red(err.toString()));
|
|
808
|
+
process.exit(1);
|
|
809
|
+
});
|
|
810
|
+
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
}
|
|
814
|
+
else {
|
|
815
|
+
// No library with that name
|
|
816
|
+
console.log(chalk.redBright(`No library archives exist on server.`));
|
|
817
|
+
process.exit(1);
|
|
818
|
+
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
}
|
|
822
|
+
else {
|
|
823
|
+
let filePathQuestions;
|
|
824
|
+
try {
|
|
825
|
+
filePathQuestions = await getFilePathQuestions();
|
|
826
|
+
}
|
|
827
|
+
catch (ex) {
|
|
828
|
+
process.exit(1);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
let filePathAnswers;
|
|
833
|
+
try {
|
|
834
|
+
filePathAnswers = await inquirer.prompt(filePathQuestions);
|
|
835
|
+
}
|
|
836
|
+
catch(ex) {
|
|
837
|
+
process.exit(1);
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
const { filePath } = filePathAnswers;
|
|
841
|
+
const zipFileList = await getZipFileList(filePath);
|
|
842
|
+
|
|
843
|
+
if (!zipFileList || zipFileList.length === 0) {
|
|
844
|
+
console.log(chalk.red.bold(`No zip files exist at path: ${filePath}`));
|
|
845
|
+
process.exit();
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
await updateSavedFilePath(filePath);
|
|
849
|
+
|
|
850
|
+
const fileNameQuestions = await getFileNameQuestions(zipFileList);
|
|
851
|
+
const fileNameAnswers = await inquirer.prompt(fileNameQuestions);
|
|
852
|
+
const {fileName} = fileNameAnswers;
|
|
853
|
+
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
console.log("");
|
|
857
|
+
|
|
858
|
+
const tasks = new Listr(
|
|
859
|
+
[
|
|
860
|
+
{
|
|
861
|
+
title: `Importing archive`,
|
|
862
|
+
task: async () => {
|
|
863
|
+
await importArch( filePath, fileName, hasArch);
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
],
|
|
867
|
+
{ concurrent: false, exitOnError: true }
|
|
868
|
+
);
|
|
869
|
+
|
|
870
|
+
|
|
871
|
+
await tasks.run().catch(err => {
|
|
872
|
+
console.log(chalk.bold.red(err.toString()));
|
|
873
|
+
process.exit(1);
|
|
874
|
+
});
|
|
875
|
+
|
|
876
|
+
console.log("");
|
|
877
|
+
|
|
878
|
+
|
|
879
|
+
// reapply to save if changed, because imported task.config may have overriden and we want
|
|
880
|
+
// to keep what was entered as the latest
|
|
881
|
+
await updateSavedFilePath(filePath);
|
|
882
|
+
}
|
|
448
883
|
}
|
|
449
884
|
|
|
450
|
-
await importArch( filePath, fileName, hasArch);
|
|
451
885
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
|
|
455
891
|
|
|
456
892
|
}
|
|
457
893
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import fs from 'fs';
|
|
3
1
|
import path from 'path';
|
|
4
2
|
import { join } from 'path';
|
|
5
3
|
import { addDebugLog, getConfigDefaults, setConfigImportRelativePath, forceDefaultsUpdate } from '../../util.js';
|
|
@@ -20,16 +18,41 @@ addDebugLog("getFilePathQuestions", "", "");
|
|
|
20
18
|
const currentDirectory = process.cwd();
|
|
21
19
|
const arPathParts = currentDirectory.split(path.sep);
|
|
22
20
|
let defaultPath = join(arPathParts[0], arPathParts[1], arPathParts[2], configDef.importRelativePath);
|
|
21
|
+
let startDirectory = join(arPathParts[0], arPathParts[1], arPathParts[2]);
|
|
22
|
+
|
|
23
23
|
if (path.sep === "/") {
|
|
24
24
|
defaultPath = "/".concat(defaultPath);
|
|
25
|
+
startDirectory = "/".concat(startDirectory).concat("/");
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
return [
|
|
29
30
|
{
|
|
30
31
|
name: 'filePath',
|
|
32
|
+
type: 'fuzzypath',
|
|
31
33
|
message: 'Enter full file path of zip file location:',
|
|
32
|
-
default: defaultPath
|
|
34
|
+
default: defaultPath,
|
|
35
|
+
excludePath: nodePath => nodePath.startsWith('node_modules'),
|
|
36
|
+
// excludePath :: (String) -> Bool
|
|
37
|
+
// excludePath to exclude some paths from the file-system scan
|
|
38
|
+
excludeFilter: nodePath => nodePath.indexOf('/.') >= 0,
|
|
39
|
+
// excludeFilter :: (String) -> Bool
|
|
40
|
+
// excludeFilter to exclude some paths from the final list, e.g. '.'
|
|
41
|
+
itemType: 'directory',
|
|
42
|
+
// itemType :: 'any' | 'directory' | 'file'
|
|
43
|
+
// specify the type of nodes to display
|
|
44
|
+
// default value: 'any'
|
|
45
|
+
// example: itemType: 'file' - hides directories from the item list
|
|
46
|
+
rootPath: startDirectory,
|
|
47
|
+
// rootPath :: String
|
|
48
|
+
// Root search directory
|
|
49
|
+
suggestOnly: false,
|
|
50
|
+
// suggestOnly :: Bool
|
|
51
|
+
// Restrict prompt answer to available choices or use them as suggestions
|
|
52
|
+
depthLimit: 2,
|
|
53
|
+
// depthLimit :: integer >= 0
|
|
54
|
+
// Limit the depth of sub-folders to scan
|
|
55
|
+
// Defaults to infinite depth if undefined
|
|
33
56
|
}
|
|
34
57
|
];
|
|
35
58
|
};
|