@pega/custom-dx-components 0.0.1 → 0.23.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/.vscode/extensions.json +1 -1
- package/README.md +6 -189
- package/package.json +34 -32
- package/src/auth.js +608 -0
- package/src/cli.js +42 -0
- package/src/constants.js +125 -8
- package/src/tasks/authenticate/helper.js +91 -8
- package/src/tasks/authenticate/index.js +169 -49
- package/src/tasks/build/helper.js +122 -0
- package/src/tasks/build/index.js +54 -0
- package/src/tasks/build-all/helper.js +70 -0
- package/src/tasks/build-all/index.js +79 -0
- package/src/tasks/{publish/bundle → bundle}/builder/index.js +49 -5
- package/src/tasks/{publish/bundle → bundle}/builder/webpack.config.js +5 -3
- package/src/tasks/{publish/bundle → bundle}/index.js +2 -2
- package/src/tasks/create/index.js +87 -64
- package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +38 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/boolean-format.js.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +146 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.jsx.mustache +61 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.jsx.mustache +170 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/mock.stories.js.mustache +21 -0
- package/src/tasks/create/templates/Constellation/Field/Boolean/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +61 -0
- package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +41 -0
- package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +196 -0
- package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +439 -0
- package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +73 -0
- package/src/tasks/create/templates/Constellation/Field/Date/index.jsx.mustache +256 -0
- package/src/tasks/create/templates/Constellation/Field/Date/mock.stories.js.mustache +23 -0
- package/src/tasks/create/templates/Constellation/Field/Date/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Date/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +257 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +92 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +287 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +328 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +73 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.jsx.mustache +254 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/mock.stories.js.mustache +23 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/DateTime/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +279 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +49 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.jsx.mustache +273 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/mock.stories.js.mustache +21 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +292 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +53 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.jsx.mustache +299 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.stories.js.mustache +23 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +94 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +49 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache +281 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.stories.js.mustache +21 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +348 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +49 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/index.jsx.mustache +336 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/mock.stories.js.mustache +21 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +115 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +78 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.jsx.mustache +351 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/mock.stories.js.mustache +67 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.js +10 -0
- package/src/tasks/create/{template → templates/Constellation/Field/Text}/config.json.mustache +15 -5
- package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +51 -0
- package/src/tasks/create/{template → templates/Constellation/Field/Text}/index.jsx.mustache +5 -0
- package/src/tasks/create/templates/Constellation/Field/Text/mock.stories.js.mustache +13 -0
- package/src/tasks/create/templates/Constellation/Field/Text/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +112 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +48 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.jsx.mustache +231 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/mock.stories.js.mustache +22 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.jsx +26 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +112 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +48 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.jsx.mustache +239 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.stories.js.mustache +21 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +112 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +48 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.jsx.mustache +231 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.stories.js.mustache +20 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +124 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +267 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.stories.js.mustache +37 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +238 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.js.mustache +18 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +232 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.stories.js.mustache +22 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache +173 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/config.json.mustache +186 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/demo.stories.jsx.mustache +57 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/index.jsx.mustache +213 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/mock.stories.js.mustache +20 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/suggestions-handler.js +10 -0
- package/src/tasks/create/templates/Constellation/Field/TimeOfDay/time-of-day.js.mustache +287 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/OneColumnDetails.svg +22 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.jsx.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +36 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +132 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/index.jsx.mustache +86 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.stories.js.mustache +189 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +152 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.jsx.mustache +26 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/TwoColumnDetails.svg +28 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +43 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +136 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.jsx.mustache +86 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.stories.js.mustache +230 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +155 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/DefaultForm.svg +29 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +46 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +169 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/index.jsx.mustache +45 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/mock.stories.js.mustache +137 -0
- package/src/tasks/create/templates/Constellation/Template/FORM/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/TwoColumn.svg +38 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +28 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +178 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/index.jsx.mustache +48 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/mock.stories.js.mustache +143 -0
- package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.jsx.mustache +35 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +33 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.jsx.mustache +102 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/index.jsx.mustache +70 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/localizations.json.mustache +4 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/mock.stories.js.mustache +94 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/styles.js.mustache +7 -0
- package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +229 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +24 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.jsx.mustache +78 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/index.jsx.mustache +76 -0
- package/src/tasks/create/templates/Constellation/Widget/CASE/mock.stories.js.mustache +390 -0
- package/src/tasks/create/{template → templates/Constellation/Widget/CASE}/styles.js.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +60 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.jsx.mustache +30 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/index.jsx.mustache +48 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE/mock.stories.js.mustache +23 -0
- package/src/tasks/{init/template/src/components/Organization_Library_VideoPlayer/styles.js → create/templates/Constellation/Widget/PAGE/styles.js.mustache} +3 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.jsx.mustache +75 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.jsx.mustache +240 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +67 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.jsx.mustache +68 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.jsx.mustache +110 -0
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.stories.js.mustache +51 -0
- package/src/tasks/{init/template/src/components/Organization_Library_MediaURL/MediaURL.styles.ts → create/templates/Constellation/Widget/PAGE-CASE/styles.js.mustache} +3 -1
- package/src/tasks/create-all/index.js +398 -0
- package/src/tasks/delete/helper.js +6 -4
- package/src/tasks/delete/index.js +4 -0
- package/src/tasks/delete-all/helper.js +153 -0
- package/src/tasks/delete-all/index.js +49 -0
- package/src/tasks/generate-ai/aiPrompt.txt.mustache +23 -0
- package/src/tasks/generate-ai/aiPromptDavinci.txt.mustache +14 -0
- package/src/tasks/generate-ai/helper.js +357 -0
- package/src/tasks/generate-ai/index.js +34 -0
- package/src/tasks/index.js +7 -0
- package/src/tasks/init/index.js +9 -3
- package/src/tasks/init/template/.eslintignore +8 -0
- package/src/tasks/init/template/.eslintrc.json +186 -5
- package/src/tasks/init/template/.vscode/extensions.json +1 -1
- package/src/tasks/init/template/README.md +80 -61
- package/src/tasks/init/template/keys/DX-ComponentDev.zip +0 -0
- package/src/tasks/init/template/keys/dxcb.crt +32 -0
- package/src/tasks/init/template/keys/dxcb.key +51 -0
- package/src/tasks/init/template/package.json.mustache +44 -21
- package/src/tasks/init/template/src/components/_components.md +1 -0
- package/src/tasks/init/template/tasks.config.json +19 -5
- package/src/tasks/init/template/templateNPMRC.txt +8 -0
- package/src/tasks/linter/index.js +46 -0
- package/src/tasks/list/helper.js +19 -6
- package/src/tasks/list/index.js +4 -0
- package/src/tasks/publish/helper.js +13 -4
- package/src/tasks/publish/index.js +14 -1
- package/src/tasks/publish-all/helper.js +154 -0
- package/src/tasks/publish-all/index.js +95 -0
- package/src/tasks/rename/index.js +314 -0
- package/src/tasks/validator/index.js +291 -18
- package/src/util.js +372 -6
- package/src/tasks/create/template/demo.stories.jsx.mustache +0 -44
- package/src/tasks/init/template/src/components/MBTAList/MBTAList.stories.tsx +0 -10
- package/src/tasks/init/template/src/components/MBTAList/MBTAList.tsx +0 -122
- package/src/tasks/init/template/src/components/MBTAList/icons/accessible.icon.tsx +0 -14
- package/src/tasks/init/template/src/components/MBTAList/icons/bus.icon.tsx +0 -13
- package/src/tasks/init/template/src/components/MBTAList/icons/mbta.icon.tsx +0 -10
- package/src/tasks/init/template/src/components/MBTAList/icons/subway.icon.tsx +0 -14
- package/src/tasks/init/template/src/components/MBTAList/index.ts +0 -2
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURL.stories.tsx +0 -19
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURL.types.ts +0 -10
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURLDisplay.tsx +0 -25
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURLInput.tsx +0 -24
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/config.json +0 -13
- package/src/tasks/init/template/src/components/Organization_Library_MediaURL/index.ts +0 -2
- package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/config.json +0 -44
- package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/demo.stories.jsx +0 -40
- package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/index.jsx +0 -42
- /package/src/tasks/{publish/bundle → bundle}/builder/modules.js +0 -0
- /package/src/tasks/{publish/bundle → bundle}/builder/paths.js +0 -0
|
@@ -8,23 +8,26 @@ This project provides you with an environment to extend Constellation by giving
|
|
|
8
8
|
|
|
9
9
|
Ensure you have access to the following in your system:
|
|
10
10
|
|
|
11
|
-
- Pega Infinity Server version 8.7
|
|
11
|
+
- Pega Infinity Server version 8.7 or later
|
|
12
12
|
|
|
13
|
-
- Git version 2.30
|
|
13
|
+
- Git version 2.30 or later
|
|
14
14
|
|
|
15
|
-
- System node version
|
|
15
|
+
- System node version 18
|
|
16
16
|
|
|
17
|
-
- System npm version
|
|
17
|
+
- System npm version 8
|
|
18
18
|
|
|
19
19
|
## Initialize a project
|
|
20
20
|
|
|
21
21
|
Initialize the project by performing the following procedure in a terminal:
|
|
22
22
|
|
|
23
23
|
1. Enter the following command to initialize the project.
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
Pega 8.7 - `npx @pega/custom-dx-components@1 init`
|
|
26
|
+
|
|
27
|
+
Pega 8.8 - `npx @pega/custom-dx-components@2 init`
|
|
25
28
|
|
|
26
29
|
2. If prompted, enter `y` to install the Custom UI Components package.
|
|
27
|
-
You will then be asked to set up the project by entering the required details.
|
|
30
|
+
You will then be asked to set up the project by entering the required details.
|
|
28
31
|
|
|
29
32
|
3. Enter the following details:
|
|
30
33
|
- Name of the project (required)
|
|
@@ -38,7 +41,7 @@ Example - `This project is intended to create and publish a custom component.`
|
|
|
38
41
|
- Git repository URL (optional)
|
|
39
42
|
Example - `https://git.custom-components.io/custom-cc.git`
|
|
40
43
|
- Author (optional)
|
|
41
|
-
Example - `Michelle`
|
|
44
|
+
Example - `Michelle`
|
|
42
45
|
|
|
43
46
|
The workspace is now set up to create custom components and publish them to the server.
|
|
44
47
|
|
|
@@ -47,7 +50,7 @@ The workspace is now set up to create custom components and publish them to the
|
|
|
47
50
|
Create custom components using the following procedure:
|
|
48
51
|
|
|
49
52
|
1. Enter the following command to create a component:
|
|
50
|
-
`npm run create`
|
|
53
|
+
`npm run create`
|
|
51
54
|
You will then be asked to enter or review the following details of the component:
|
|
52
55
|
- Name of the component (required)
|
|
53
56
|
Example - `customcomp0`
|
|
@@ -62,21 +65,22 @@ Example - `Field`
|
|
|
62
65
|
- Sub-type of component (required)
|
|
63
66
|
Example - `Text`
|
|
64
67
|
- Description of the component (optional)
|
|
65
|
-
Example - `This is a customized searchbox that filters data.`
|
|
68
|
+
Example - `This is a customized searchbox that filters data.`
|
|
66
69
|
The component is created in the following path: _/Users/your_user_name/project_name/src/components/component_name_
|
|
67
|
-
You can also pre-configure the values for the above options in a tasks.config.json file as shown below.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
You can also pre-configure the values for the above options in a tasks.config.json file as shown below.
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"component": {
|
|
75
|
+
"library": "basic",
|
|
76
|
+
"version": "0.0.1",
|
|
77
|
+
"type": "field",
|
|
78
|
+
"subtype": "text",
|
|
79
|
+
"description": "basic field for capturing textual data",
|
|
80
|
+
"icon": "basic-field-text.svg"
|
|
81
|
+
}
|
|
77
82
|
}
|
|
78
|
-
|
|
79
|
-
```
|
|
83
|
+
```
|
|
80
84
|
>**Note**:
|
|
81
85
|
Alternatively, you can enter the following command to skip entering the details of the component now and can manually enter the details in the config.json file after the component is created:
|
|
82
86
|
`npm run create <enter_component_name>`
|
|
@@ -85,7 +89,7 @@ A _src/components_ folder is created and the necessary files required to build t
|
|
|
85
89
|
|
|
86
90
|
```sh
|
|
87
91
|
├── src
|
|
88
|
-
|
|
92
|
+
├── components
|
|
89
93
|
├── <component_name>
|
|
90
94
|
├── index.js
|
|
91
95
|
├── demo.stories.js
|
|
@@ -99,13 +103,19 @@ The *config.json* file contains the mapping of properties for configuring the au
|
|
|
99
103
|
|
|
100
104
|
|
|
101
105
|
2. Enter the following command to start the storybook to view the demo.
|
|
102
|
-
`npm start`
|
|
106
|
+
`npm start`
|
|
103
107
|
|
|
104
108
|
3. Modify the source files to build your own component. You can also install and import third-party libraries if required for your component.
|
|
105
109
|
|
|
106
110
|
The custom component is now created. We use the information provided to create uniquely namespaced components in this convention - `<organization>_<library>_<component name>`.
|
|
107
111
|
|
|
112
|
+
4. local build, you can build the component locally to check for config validation and component validation. Enter
|
|
113
|
+
`npm buildComponent`
|
|
114
|
+
|
|
115
|
+
buildComponent will do the same first 2 steps as publish, but will not publish to the server. This allows you to compile your component locally and fix errors before publish.
|
|
116
|
+
|
|
108
117
|
## Authenticate the user
|
|
118
|
+
|
|
109
119
|
Before we publish the custom component to the Pega Infinity Server, authenticate the user to access the resources in the Pega Infinity Server.
|
|
110
120
|
|
|
111
121
|
>**Note**:
|
|
@@ -113,53 +123,57 @@ It is required that you configure a value for clientId, clientSecret, and access
|
|
|
113
123
|
1. Login to Pega Infinity Server, navigate to Records / Security / OAuth 2.0 Client Registration landing page and open the *DX-CustomComponents* record.
|
|
114
124
|
2. Click **Regenerate Client Secret**, download the Client Credentials (as the Client ID, Client Secret, and Access token endpoint will be needed), and save the record.
|
|
115
125
|
3. Update the the task.config.json file with these downloaded values:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
+
```json
|
|
127
|
+
"server-config": {
|
|
128
|
+
"server": "https://127.0.0.1:8080/prweb",
|
|
129
|
+
"user": "customcomponentoperator",
|
|
130
|
+
"password": "pwd",
|
|
131
|
+
"clientId": "<mention client ID here>",
|
|
132
|
+
"clientSecret": "<mention client secret here>",
|
|
133
|
+
"accessTokenUri": "https://127.0.0.1:8080/prweb/PRRestService/oauth2/v1/token"
|
|
134
|
+
},
|
|
135
|
+
```
|
|
126
136
|
4. Enter the following command to initiate authentication.
|
|
127
|
-
`npm run authenticate`
|
|
137
|
+
`npm run authenticate`
|
|
128
138
|
|
|
129
139
|
The user is now authenticated and can proceed to either publish or list the components.
|
|
130
140
|
|
|
131
141
|
## Publish custom components
|
|
132
142
|
Enter the following command to publish custom components to Pega Infinity Server:
|
|
133
143
|
`npm run publish`
|
|
144
|
+
`npm run publishAll`
|
|
134
145
|
Publish the finalized custom components changes to Pega Infinity Server so that it can be discoverable in authoring (design palette).
|
|
135
146
|
You will then be asked to enter the following details:
|
|
136
147
|
|
|
137
148
|
- The component to be published to Pega Infinity Server. It will be updated if the component exists.
|
|
149
|
+
- If publishAll, then you won't get a list
|
|
138
150
|
- The name of the ruleset where the component must be published.
|
|
139
151
|
- The version of the ruleset where the component must be published.
|
|
140
152
|
- Specify if the development build should be generated for debugging.
|
|
141
|
-
You can also pre-configure the values for the above options in a tasks.config.json file as shown below. The server, user name, and password must be pre-configured.
|
|
142
|
-
|
|
143
|
-
```json
|
|
144
|
-
{
|
|
145
|
-
"components-server-config": {
|
|
146
|
-
"server": "http://127.0.0.1:8080/prweb",
|
|
147
|
-
"user": "customcomponentoperator",
|
|
148
|
-
"password": "pwd"
|
|
149
|
-
"rulesetName": "TestPega-C11nGall",
|
|
150
|
-
"rulesetVersion": "01-01-03",
|
|
151
|
-
"sourceOfComponents": "Server",
|
|
152
|
-
"devBuild": false,
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
```
|
|
156
|
-
When the component is successfully published, you can use the newly published component in App Studio's view authoring.
|
|
157
153
|
|
|
154
|
+
- If publishAll, will sequentiall go through the list of local components and publish them
|
|
155
|
+
You can also pre-configure the values for the above options in a tasks.config.json file as shown below. The server, user name, and password must be pre-configured.
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"components-server-config": {
|
|
160
|
+
"server": "http://127.0.0.1:8080/prweb",
|
|
161
|
+
"user": "customcomponentoperator",
|
|
162
|
+
"password": "pwd"
|
|
163
|
+
"rulesetName": "TestPega-C11nGall",
|
|
164
|
+
"rulesetVersion": "01-01-03",
|
|
165
|
+
"sourceOfComponents": "Server",
|
|
166
|
+
"devBuild": false,
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
When the component is successfully published, you can use the newly published component in App Studio's view authoring.
|
|
158
171
|
|
|
159
|
-
|
|
160
|
-
The Rule-UI-Component instance (with component name) is created on the Pega Infinity Server after publishing the component.
|
|
172
|
+
> **Note**:
|
|
173
|
+
> The Rule-UI-Component instance (with component name) is created on the Pega Infinity Server after publishing the component.
|
|
161
174
|
|
|
162
175
|
## List custom components
|
|
176
|
+
|
|
163
177
|
View the available components in the local machine or the server.
|
|
164
178
|
|
|
165
179
|
Enter the following command to list custom components:
|
|
@@ -168,37 +182,42 @@ Enter the following command to list custom components:
|
|
|
168
182
|
You will then be asked to enter the following details:
|
|
169
183
|
|
|
170
184
|
- List components from Server or Local?
|
|
171
|
-
Example - `Server`
|
|
185
|
+
Example - `Server`
|
|
172
186
|
|
|
173
187
|
The custom components will now be listed in the terminal.
|
|
174
188
|
|
|
175
189
|
## Delete custom components
|
|
190
|
+
|
|
176
191
|
Delete the available or published components in the local machine or the server.
|
|
177
192
|
|
|
178
193
|
Enter the following command to delete custom components:
|
|
179
194
|
`npm run delete`
|
|
195
|
+
`npm run deleteAll`
|
|
180
196
|
|
|
181
197
|
You will then be asked to enter the following details:
|
|
182
198
|
|
|
183
199
|
- Delete components from Server or Local?
|
|
184
|
-
Example - `Local`
|
|
200
|
+
Example - `Local`
|
|
185
201
|
|
|
186
202
|
- Select component to delete
|
|
187
|
-
The list of available components in the following path will be displayed:
|
|
188
|
-
Select the component to be deleted from this list.
|
|
203
|
+
The list of available components in the following path will be displayed: \_/Users/your_user_name/project_name/src/components
|
|
204
|
+
Select the component to be deleted from this list.
|
|
205
|
+
- For deleteAll you will see the full list and asked if you want to delete them all.
|
|
189
206
|
|
|
190
207
|
- Are you sure?
|
|
191
|
-
Example - `yes`
|
|
208
|
+
Example - `yes`
|
|
192
209
|
|
|
193
|
-
|
|
194
|
-
If you choose to delete components from the server, the successfully published components along with their ruleset name and ruleset version from the Pega Infinity Server will be displayed. Select the component to be deleted from this list.
|
|
210
|
+
> **Note**:
|
|
211
|
+
> If you choose to delete components from the server, the successfully published components along with their ruleset name and ruleset version from the Pega Infinity Server will be displayed. Select the component to be deleted from this list.
|
|
195
212
|
|
|
196
213
|
## View existing custom components in storybook
|
|
214
|
+
|
|
197
215
|
View custom components in a storybook by performing the following procedure:
|
|
216
|
+
|
|
198
217
|
1. Enter the following command to open the project.
|
|
199
|
-
`cd <enter your project's name>`
|
|
218
|
+
`cd <enter your project's name>`
|
|
200
219
|
|
|
201
220
|
2. Enter the following command to start the storybook in development mode.
|
|
202
|
-
`npm start`
|
|
221
|
+
`npm start`
|
|
203
222
|
|
|
204
223
|
The storybook is launched in a browser where you can view the components working in isolation.
|
|
Binary file
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
|
2
|
+
MIIFezCCA2OgAwIBAgIJAKvPeOFKh/IbMA0GCSqGSIb3DQEBCwUAMHAxCzAJBgNV
|
|
3
|
+
BAYTAlVTMRYwFAYDVQQIDA1NYXNzYWNodXNldHRzMRAwDgYDVQQHDAdXYWx0aGFt
|
|
4
|
+
MRQwEgYDVQQKDAtQZWdhc3lzdGVtczENMAsGA1UECwwERFhJTDESMBAGA1UEAwwJ
|
|
5
|
+
bG9jYWxob3N0MB4XDTIzMDQyMTE4NTMxMVoXDTMzMDQxODE4NTMxMVowcDELMAkG
|
|
6
|
+
A1UEBhMCVVMxFjAUBgNVBAgMDU1hc3NhY2h1c2V0dHMxEDAOBgNVBAcMB1dhbHRo
|
|
7
|
+
YW0xFDASBgNVBAoMC1BlZ2Fze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6gYuMKVoj012MO1L2L8QKZkTmaOi2u7yU/eG4k1zUhTutLoMvPuxZnneG0PdMD
|
|
49
|
+
6Cp8D9zt7CEWoC4QQSCK5j5nS+YQSz+DQqv75JAF62WFBonEyGCZESvIKFsh7ouv
|
|
50
|
+
++g2Lr1Bh6g3JGeG3J9aRMC+yOpGb6Y2lqP3Dd16VAw2/6ES6u7jnrSUxA==
|
|
51
|
+
-----END RSA PRIVATE KEY-----
|
|
@@ -5,17 +5,24 @@
|
|
|
5
5
|
"organization": "{{organization}}",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"
|
|
8
|
+
"startStorybook": "start-storybook --port 6040 --quiet",
|
|
9
9
|
"build": "tsc -b tsconfig.build.json",
|
|
10
10
|
"lint": "run-p -cl lint:*",
|
|
11
11
|
"fix": "run-p -cl fix:*",
|
|
12
12
|
"authenticate": "custom-dx-components authenticate",
|
|
13
|
+
"buildComponent": "custom-dx-components buildComponent",
|
|
14
|
+
"buildAllComponents": "custom-dx-components buildAllComponents",
|
|
13
15
|
"create": "custom-dx-components create",
|
|
16
|
+
"createAll": "custom-dx-components createAll",
|
|
17
|
+
"generateWithAI": "custom-dx-components generateWithAI",
|
|
14
18
|
"publish": "custom-dx-components publish",
|
|
19
|
+
"publishAll": "custom-dx-components publishAll",
|
|
20
|
+
"rename": "custom-dx-components rename",
|
|
15
21
|
"list": "custom-dx-components list",
|
|
16
22
|
"validate-schema": "custom-dx-components validateSchema",
|
|
17
23
|
"update": "custom-dx-components update",
|
|
18
24
|
"delete": "custom-dx-components delete",
|
|
25
|
+
"deleteAll": "custom-dx-components deleteAll",
|
|
19
26
|
"lint:types": "tsc --noEmit",
|
|
20
27
|
"lint:es": "eslint .",
|
|
21
28
|
"lint:styles": "stylelint \"./**/*.@(js|jsx|ts|tsx)\"",
|
|
@@ -35,35 +42,51 @@
|
|
|
35
42
|
"license": "Enter License",
|
|
36
43
|
"sideEffects": false,
|
|
37
44
|
"dependencies": {
|
|
38
|
-
"@pega/cosmos-react-core": "^3.0.
|
|
39
|
-
"
|
|
45
|
+
"@pega/cosmos-react-core": "^3.0.1",
|
|
46
|
+
"@pega/cosmos-react-work": "3.0.1",
|
|
47
|
+
"dayjs": "^1.11.5",
|
|
48
|
+
"polished": "^4.2.2",
|
|
49
|
+
"prop-types": "^15.8.1",
|
|
40
50
|
"react": "^17.0.2",
|
|
41
51
|
"react-autosuggest": "^10.1.0",
|
|
42
52
|
"react-dom": "^17.0.2",
|
|
43
|
-
"react-
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
53
|
+
"react-is": "^18.2.0",
|
|
54
|
+
"react-player": "^2.10.1",
|
|
55
|
+
"react-redux": "^7.2.6",
|
|
56
|
+
"styled-components": "^5.3.5"
|
|
47
57
|
},
|
|
48
58
|
"devDependencies": {
|
|
49
|
-
"@pega/configs": "^0.3
|
|
50
|
-
"@pega/custom-dx-components": "^0.
|
|
51
|
-
"@
|
|
52
|
-
"@storybook/addon-
|
|
53
|
-
"@storybook/addon-
|
|
54
|
-
"@storybook/addon-
|
|
55
|
-
"@storybook/
|
|
56
|
-
"@storybook/
|
|
57
|
-
"@storybook/
|
|
59
|
+
"@pega/configs": "^0.5.3",
|
|
60
|
+
"@pega/custom-dx-components": "^0.23.2",
|
|
61
|
+
"@pega/eslint-config": "^0.3.2",
|
|
62
|
+
"@storybook/addon-actions": "^6.5.12",
|
|
63
|
+
"@storybook/addon-essentials": "^6.5.12",
|
|
64
|
+
"@storybook/addon-links": "^6.5.12",
|
|
65
|
+
"@storybook/addon-knobs": "^6.3.1",
|
|
66
|
+
"@storybook/addon-storysource": "^6.5.12",
|
|
67
|
+
"@storybook/builder-webpack5": "^6.5.12",
|
|
68
|
+
"@storybook/manager-webpack5": "^6.5.12",
|
|
69
|
+
"@storybook/react": "^6.5.12",
|
|
58
70
|
"@types/emoji-mart": "^3.0.9",
|
|
59
71
|
"@types/react": "^17.0.39",
|
|
60
72
|
"@types/react-color": "^3.0.6",
|
|
61
73
|
"@types/react-dom": "^17.0.11",
|
|
62
|
-
"@types/styled-components": "^5.1.
|
|
63
|
-
"eslint": "^
|
|
74
|
+
"@types/styled-components": "^5.1.26",
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
|
76
|
+
"eslint": "^8.4.1",
|
|
77
|
+
"eslint-plugin-import": "^2.25.3",
|
|
78
|
+
"eslint-plugin-jest": "^25.3.0",
|
|
79
|
+
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
80
|
+
"eslint-plugin-mdx": "^2.0.5",
|
|
81
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
82
|
+
"eslint-plugin-react": "^7.27.1",
|
|
83
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
84
|
+
"eslint-plugin-sonarjs": "^0.11.0",
|
|
85
|
+
"jest": "^29.3.1",
|
|
86
|
+
"jest-environment-jsdom": "^29.3.1",
|
|
64
87
|
"npm-run-all": "^4.1.5",
|
|
65
|
-
"prettier": "2.
|
|
66
|
-
"stylelint": "^14.
|
|
67
|
-
"typescript": "~4.
|
|
88
|
+
"prettier": "2.7.1",
|
|
89
|
+
"stylelint": "^14.11.0",
|
|
90
|
+
"typescript": "~4.8.3"
|
|
68
91
|
}
|
|
69
92
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# directory for components #
|
|
@@ -1,19 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"components-directory-path": "src/components",
|
|
3
3
|
"server-config": {
|
|
4
|
-
"server": "https://localhost:38764/prweb",
|
|
5
|
-
"user": "user",
|
|
6
|
-
"password": "password",
|
|
7
4
|
"rulesetName": "rulesetName",
|
|
8
5
|
"rulesetVersion": "rulesetVersion",
|
|
9
6
|
"sourceOfComponents": "Server",
|
|
10
7
|
"devBuild": false,
|
|
11
|
-
"
|
|
12
|
-
"
|
|
8
|
+
"serverType": "infinity",
|
|
9
|
+
"server": "https://localhost:38764/prweb",
|
|
10
|
+
"servicesServer": "https://staging.constellation.pega.io/c11n-appstatic/8.9.0-dev-13180",
|
|
11
|
+
"clientId": "10095186356008396159",
|
|
12
|
+
"clientSecret_comment": "Needed only when using 'passwordCreds' or 'clientCreds' grantType",
|
|
13
|
+
"clientSecret": "",
|
|
14
|
+
"grantType": "authCode",
|
|
15
|
+
"redirectUri": "https://localhost:4010/",
|
|
16
|
+
"cert_and_key_comment": "Path to SSL certificate file and SSL key file to use when starting local HTTPS server",
|
|
17
|
+
"cert_and_key_comment2": "Needed only when using 'authCode' grantType and redirectUri begins with 'https://localhost'",
|
|
18
|
+
"cert": "./keys/dxcb.crt",
|
|
19
|
+
"key": "./keys/dxcb.key",
|
|
20
|
+
"user_and_password_comment": "useful primarily when grantType is set to 'passwordCreds'",
|
|
21
|
+
"user": "",
|
|
22
|
+
"password": "",
|
|
23
|
+
"questions_comment": "useful for designating certain questions should always or never be asked during npm run authenticate",
|
|
24
|
+
"questions_askAlways": "",
|
|
25
|
+
"questions_askNever": ""
|
|
13
26
|
},
|
|
14
27
|
"component": {
|
|
15
28
|
"library": "",
|
|
16
29
|
"type": "",
|
|
30
|
+
"version": "",
|
|
17
31
|
"subtype": "",
|
|
18
32
|
"description": "",
|
|
19
33
|
"icon": ""
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Use default npmjs registry for the SDKs
|
|
2
|
+
registry = https://registry.npmjs.org/
|
|
3
|
+
# For now, turn off npm auto-install of peer dependencies to get rid of warnings
|
|
4
|
+
legacy-peer-deps=true
|
|
5
|
+
# Turn off messages such as > react-sdk@0.1.0 list and > dx-component-builder-sdk list
|
|
6
|
+
loglevel=silent
|
|
7
|
+
#
|
|
8
|
+
#
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ESLint } from 'eslint';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
|
|
4
|
+
export const lintComponent = async (dirToLint) => {
|
|
5
|
+
// console.log("in dx-component-builder-sdk: lintComponent - dirToLint: " + dirToLint);
|
|
6
|
+
console.log(chalk.green(` linting ${dirToLint}`));
|
|
7
|
+
|
|
8
|
+
// 1. Create an instance.
|
|
9
|
+
const eslint = new ESLint();
|
|
10
|
+
|
|
11
|
+
// 2. Lint files.
|
|
12
|
+
const results = await eslint.lintFiles([dirToLint]);
|
|
13
|
+
|
|
14
|
+
// 3. Format the results.
|
|
15
|
+
const formatter = await eslint.loadFormatter("stylish");
|
|
16
|
+
const resultText = formatter.format(results);
|
|
17
|
+
|
|
18
|
+
// 4. Output it.
|
|
19
|
+
// console.log(`lint resultText: ${resultText}`);
|
|
20
|
+
console.log(resultText);
|
|
21
|
+
|
|
22
|
+
// Indicate linting is complete
|
|
23
|
+
console.log(chalk.green(` linting complete...`));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// inpsired by https://eslint.org/docs/latest/developer-guide/nodejs-api
|
|
27
|
+
|
|
28
|
+
// (async function main() {
|
|
29
|
+
// // 1. Create an instance.
|
|
30
|
+
// const eslint = new ESLint();
|
|
31
|
+
|
|
32
|
+
// // 2. Lint files.
|
|
33
|
+
// const results = await eslint.lintFiles(["lib/**/*.js"]);
|
|
34
|
+
|
|
35
|
+
// // 3. Format the results.
|
|
36
|
+
// const formatter = await eslint.loadFormatter("stylish");
|
|
37
|
+
// const resultText = formatter.format(results);
|
|
38
|
+
|
|
39
|
+
// // 4. Output it.
|
|
40
|
+
// console.log(resultText);
|
|
41
|
+
// })().catch((error) => {
|
|
42
|
+
// process.exitCode = 1;
|
|
43
|
+
// console.error(error);
|
|
44
|
+
// });
|
|
45
|
+
|
|
46
|
+
export default lintComponent;
|
package/src/tasks/list/helper.js
CHANGED
|
@@ -4,7 +4,7 @@ import https from 'https';
|
|
|
4
4
|
import chalk from 'chalk';
|
|
5
5
|
import fetch from 'node-fetch';
|
|
6
6
|
|
|
7
|
-
import { LIST_COMPONENT_SERVICE_REST_ENDPOINT, TOKEN_PATH } from '../../constants.js';
|
|
7
|
+
import { LIST_COMPONENT_SERVICE_REST_ENDPOINT, LP_LIST_COMPONENT_SERVICE_REST_ENDPOINT, TOKEN_PATH } from '../../constants.js';
|
|
8
8
|
import { constructCompleteUrl, getComponents, getPegaServerConfig } from '../../util.js';
|
|
9
9
|
|
|
10
10
|
export const SOURCE_OF_COMPONENT_TYPES = {
|
|
@@ -42,9 +42,10 @@ export const listLocalComponents = async sourceOfComponents => {
|
|
|
42
42
|
|
|
43
43
|
export const getComponentsFromServer = async data => {
|
|
44
44
|
const defaultPegaServerConfig = await getPegaServerConfig();
|
|
45
|
+
const isLaunchpad = defaultPegaServerConfig.serverType === 'launchpad';
|
|
45
46
|
const url = constructCompleteUrl(
|
|
46
47
|
defaultPegaServerConfig.server,
|
|
47
|
-
LIST_COMPONENT_SERVICE_REST_ENDPOINT
|
|
48
|
+
isLaunchpad ? LP_LIST_COMPONENT_SERVICE_REST_ENDPOINT : LIST_COMPONENT_SERVICE_REST_ENDPOINT
|
|
48
49
|
);
|
|
49
50
|
return new Promise((resolve, reject) => {
|
|
50
51
|
try {
|
|
@@ -63,12 +64,19 @@ export const getComponentsFromServer = async data => {
|
|
|
63
64
|
refresh_token: refreshToken
|
|
64
65
|
} = JSON.parse(data);
|
|
65
66
|
let status = 500;
|
|
67
|
+
|
|
68
|
+
const headers = {
|
|
69
|
+
Authorization: `${tokenType} ${accessToken}`
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if(isLaunchpad) {
|
|
73
|
+
headers.cookie = `Pega-AAT=${accessToken}`;
|
|
74
|
+
}
|
|
75
|
+
|
|
66
76
|
fetch(url, {
|
|
67
77
|
method: 'GET',
|
|
68
78
|
agent: new https.Agent({ rejectUnauthorized: false }),
|
|
69
|
-
headers
|
|
70
|
-
Authorization: `${tokenType} ${accessToken}`
|
|
71
|
-
}
|
|
79
|
+
headers
|
|
72
80
|
})
|
|
73
81
|
.then(response => {
|
|
74
82
|
status = response.status;
|
|
@@ -100,8 +108,13 @@ export const getComponentsFromServer = async data => {
|
|
|
100
108
|
|
|
101
109
|
export const displayServerComponents = async data => {
|
|
102
110
|
const defaultPegaServerConfig = await getPegaServerConfig();
|
|
111
|
+
const isLaunchpad = defaultPegaServerConfig.serverType === 'launchpad';
|
|
103
112
|
const parsedData = JSON.parse(data);
|
|
104
|
-
const
|
|
113
|
+
const list = isLaunchpad ? parsedData.components : parsedData.pxResults;
|
|
114
|
+
/**
|
|
115
|
+
* TODO: Need to modify the components list mapping code to support Launchpad components
|
|
116
|
+
*/
|
|
117
|
+
const componentList = list?.map(({ label, pyRuleSet, pyRuleSetVersion }) => ({
|
|
105
118
|
'Rule name': label,
|
|
106
119
|
'Ruleset name': pyRuleSet,
|
|
107
120
|
'Ruleset version': pyRuleSetVersion
|
package/src/tasks/list/index.js
CHANGED
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
getListComponentsQuestions
|
|
11
11
|
} from './helper.js';
|
|
12
12
|
|
|
13
|
+
import { showVersion } from '../../util.js';
|
|
14
|
+
|
|
13
15
|
const getList = async (sourceOfComponents, answers) => {
|
|
14
16
|
switch (sourceOfComponents) {
|
|
15
17
|
case SOURCE_OF_COMPONENT_TYPES.LOCAL: {
|
|
@@ -32,6 +34,8 @@ const getList = async (sourceOfComponents, answers) => {
|
|
|
32
34
|
};
|
|
33
35
|
|
|
34
36
|
export default async options => {
|
|
37
|
+
showVersion();
|
|
38
|
+
|
|
35
39
|
let sourceOfComponentsOption = SOURCE_OF_COMPONENT_TYPES.LOCAL;
|
|
36
40
|
|
|
37
41
|
if (options.params[3] === SOURCE_OF_COMPONENT_TYPES.LOCAL) {
|