@pega/dx-component-builder-sdk 0.1.47 → 0.1.49
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 +3 -2
- package/src/auth.js +726 -508
- package/src/cli.js +1 -1
- package/src/constants.js +728 -2
- package/src/tasks/authenticate/index.js +12 -2
- package/src/tasks/build/helper.js +10 -6
- package/src/tasks/build/index.js +76 -22
- package/src/tasks/build-all/helper.js +16 -11
- package/src/tasks/build-all/index.js +106 -42
- package/src/tasks/bundle/{builder → builderAngular}/paths.js +3 -2
- package/src/tasks/bundle/builderAngular/webpack.config.js +342 -0
- package/src/tasks/bundle/builderAssociated/index.js +218 -0
- package/src/tasks/bundle/builderAssociated/modules.js +139 -0
- package/src/tasks/bundle/builderAssociated/paths.js +51 -0
- package/src/tasks/bundle/{builder → builderAssociated}/webpack.config.js +5 -4
- package/src/tasks/bundle/builderReact/index.js +218 -0
- package/src/tasks/bundle/builderReact/modules.js +139 -0
- package/src/tasks/bundle/builderReact/paths.js +51 -0
- package/src/tasks/bundle/builderReact/webpack.config.js +337 -0
- package/src/tasks/bundle/index.js +122 -5
- package/src/tasks/create/index.js +54 -12
- package/src/tasks/create/templates/Constellation/field/Boolean/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Date/DateFormatter.js.mustache +7 -7
- package/src/tasks/create/templates/Constellation/field/Date/date.js.mustache +8 -8
- package/src/tasks/create/templates/Constellation/field/Date/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/DateTime/date-time.js.mustache +10 -10
- package/src/tasks/create/templates/Constellation/field/DateTime/date-utils.js.mustache +6 -5
- package/src/tasks/create/templates/Constellation/field/DateTime/date.js.mustache +6 -3
- package/src/tasks/create/templates/Constellation/field/DateTime/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Decimal/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/field/Decimal/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Decimal-Currency/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/field/Decimal-Currency/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/index.jsx.mustache +4 -4
- package/src/tasks/create/templates/Constellation/field/Decimal-Percentage/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Integer/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/field/Integer/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Picklist/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Text/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Text-Email/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Text-Input/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Text-Paragraph/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Text-Phone/index.jsx.mustache +0 -1
- package/src/tasks/create/templates/Constellation/field/Text-Phone/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/Text-URL/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/field/TimeOfDay/styles.js.mustache +14 -0
- package/src/tasks/create/templates/Constellation/field/{TimeofDay → TimeOfDay}/time-of-day.js.mustache +6 -5
- package/src/tasks/create/templates/Constellation/template/DETAILS/demo.stories.jsx.mustache +20 -6
- package/src/tasks/create/templates/Constellation/template/DETAILS/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/template/DETAILS/mock.stories.js.mustache +20 -10
- package/src/tasks/create/templates/Constellation/template/DETAILS/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/demo.stories.jsx.mustache +20 -7
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/mock.stories.js.mustache +28 -13
- package/src/tasks/create/templates/Constellation/template/DETAILS-region/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/template/FORM/demo.stories.jsx.mustache +92 -16
- package/src/tasks/create/templates/Constellation/template/FORM/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/template/FORM/mock.stories.js.mustache +24 -12
- package/src/tasks/create/templates/Constellation/template/FORM/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/template/FORM-region/demo.stories.jsx.mustache +91 -13
- package/src/tasks/create/templates/Constellation/template/FORM-region/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/template/FORM-region/mock.stories.js.mustache +24 -12
- package/src/tasks/create/templates/Constellation/template/FORM-region/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/template/PAGE/demo.stories.jsx.mustache +1 -0
- package/src/tasks/create/templates/Constellation/template/PAGE/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/widget/CASE/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/widget/CASE/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/widget/PAGE/styles.js.mustache +13 -6
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/Operator.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/index.jsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/widget/PAGE-CASE/styles.js.mustache +13 -6
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.html.mustache +42 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.scss.mustache +24 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/boolean.component.ts.mustache +165 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/config.json.mustache +87 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/demo.stories.jsx.mustache +56 -0
- package/src/tasks/create/templates/SDK-Angular/field/Boolean/mock.stories.js.mustache +15 -0
- package/src/tasks/create/templates/SDK-Angular/field/Date/config.json.mustache +147 -0
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.html.mustache +35 -0
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Date/date.component.ts.mustache +209 -0
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/config.json.mustache +204 -0
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.html.mustache +31 -0
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/DateTime/date-time.component.ts.mustache +177 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/config.json.mustache +94 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/decimal.component.html.mustache +32 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/decimal.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/decimal.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal/decimal.component.ts.mustache +170 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/config.json.mustache +125 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/decimal-currency.component.html.mustache +33 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/decimal-currency.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/decimal-currency.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Currency/decimal-currency.component.ts.mustache +175 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/config.json.mustache +94 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.html.mustache +33 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Decimal-Percentage/decimal-percentage.component.ts.mustache +176 -0
- package/src/tasks/create/templates/SDK-Angular/field/Integer/config.json.mustache +88 -0
- package/src/tasks/create/templates/SDK-Angular/field/Integer/integer.component.html.mustache +33 -0
- package/src/tasks/create/templates/SDK-Angular/field/Integer/integer.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Integer/integer.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Integer/integer.component.ts.mustache +180 -0
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/config.json.mustache +86 -0
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/picklist.component.html.mustache +30 -0
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/picklist.component.scss.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/picklist.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Picklist/picklist.component.ts.mustache +195 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text/config.json.mustache +83 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text/text.component.html.mustache +17 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text/text.component.scss.mustache +30 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text/text.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text/text.component.ts.mustache +145 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/config.json.mustache +83 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/text-email.component.html.mustache +31 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/text-email.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/text-email.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Email/text-email.component.ts.mustache +175 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/config.json.mustache +83 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/text.component.html.mustache +31 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/text.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/text.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Input/text.component.ts.mustache +177 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/config.json.mustache +83 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/text-paragraph.component.html.mustache +31 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/text-paragraph.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/text-paragraph.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Paragraph/text-paragraph.component.ts.mustache +179 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/config.json.mustache +95 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/text-phone.component.html.mustache +30 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/text-phone.component.scss.mustache +81 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/text-phone.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-Phone/text-phone.component.ts.mustache +194 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/config.json.mustache +111 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.html.mustache +30 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.spec.ts.mustache +26 -0
- package/src/tasks/create/templates/SDK-Angular/field/Text-URL/text-url.component.ts.mustache +174 -0
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.html.mustache +30 -0
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.scss.mustache +20 -0
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/field/TimeOfDay/time-of-day.component.ts.mustache +172 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/DefaultForm.svg +29 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/config.json.mustache +21 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/demo.stories.jsx.mustache +71 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/details.component.html.mustache +7 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/details.component.scss.mustache +7 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/details.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/details.component.ts.mustache +121 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS/mock.stories.js.mustache +294 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/TwoColumnDetails.svg +28 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/config.json.mustache +27 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/demo.stories.jsx.mustache +73 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/details.component.html.mustache +6 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/details.component.scss.mustache +7 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/details.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/details.component.ts.mustache +92 -0
- package/src/tasks/create/templates/SDK-Angular/template/DETAILS-region/mock.stories.js.mustache +290 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/DefaultForm.svg +29 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/config.json.mustache +45 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/demo.stories.jsx.mustache +215 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.html.mustache +23 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.scss.mustache +33 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM/form.component.ts.mustache +71 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/TwoColumn.svg +38 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/config.json.mustache +49 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/demo.stories.jsx.mustache +183 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/form.component.html.mustache +16 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/form.component.scss.mustache +28 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/form.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/form.component.ts.mustache +26 -0
- package/src/tasks/create/templates/SDK-Angular/template/FORM-region/mock.stories.js.mustache +132 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/OneColumnPage.svg +28 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/config.json.mustache +32 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/demo.stories.jsx.mustache +80 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/mock.stories.js.mustache +115 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/page.component.html.mustache +15 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/page.component.scss.mustache +3 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/page.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/template/PAGE/page.component.ts.mustache +63 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/case.component.html.mustache +15 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/case.component.scss.mustache +22 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/case.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/case.component.ts.mustache +111 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/config.json.mustache +23 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/demo.stories.jsx.mustache +70 -0
- package/src/tasks/create/templates/SDK-Angular/widget/CASE/mock.stories.js.mustache +390 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/config.json.mustache +59 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/demo.stories.jsx.mustache +29 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/mock.stories.js.mustache +23 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/page.component.html.mustache +17 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/page.component.scss.mustache +19 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/page.component.ts.mustache +32 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE/pagecomponent.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/OneColumnPage.svg +36 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/config.json.mustache +66 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/demo.stories.jsx.mustache +52 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/mock.stories.js.mustache +52 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.html.mustache +28 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.scss.mustache +137 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.spec.ts.mustache +25 -0
- package/src/tasks/create/templates/SDK-Angular/widget/PAGE-CASE/page-case.component.ts.mustache +115 -0
- package/src/tasks/create/templates/SDK-React/field/Boolean/index.tsx.mustache +3 -3
- package/src/tasks/create/templates/SDK-React/field/Date/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/DateTime/index.tsx.mustache +6 -7
- package/src/tasks/create/templates/SDK-React/field/Decimal/demo.stories.jsx.mustache +5 -1
- package/src/tasks/create/templates/SDK-React/field/Decimal/index.tsx.mustache +78 -28
- package/src/tasks/create/templates/SDK-React/field/Decimal-Currency/index.tsx.mustache +3 -3
- package/src/tasks/create/templates/SDK-React/field/Decimal-Percentage/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Integer/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Picklist/demo.stories.jsx.mustache +13 -0
- package/src/tasks/create/templates/SDK-React/field/Picklist/index.tsx.mustache +30 -10
- package/src/tasks/create/templates/SDK-React/field/Text/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Email/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Input/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Paragraph/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/field/Text-Phone/index.tsx.mustache +6 -5
- package/src/tasks/create/templates/SDK-React/field/Text-URL/index.tsx.mustache +11 -0
- package/src/tasks/create/templates/SDK-React/field/TimeOfDay/config.json.mustache +135 -0
- package/src/tasks/create/templates/SDK-React/field/{TimeofDay → TimeOfDay}/index.tsx.mustache +12 -1
- package/src/tasks/create/templates/SDK-React/template/DETAILS/index.tsx.mustache +7 -3
- package/src/tasks/create/templates/SDK-React/template/DETAILS-region/index.tsx.mustache +8 -4
- package/src/tasks/create/templates/SDK-React/template/FORM/index.tsx.mustache +30 -20
- package/src/tasks/create/templates/SDK-React/template/FORM-region/demo.stories.jsx.mustache +2 -2
- package/src/tasks/create/templates/SDK-React/template/PAGE/demo.stories.jsx.mustache +1 -0
- package/src/tasks/create/templates/SDK-React/widget/CASE/index.tsx.mustache +4 -3
- package/src/tasks/create/templates/SDK-React/widget/PAGE/index.tsx.mustache +7 -7
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/demo.stories.jsx.mustache +2 -10
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/index.tsx.mustache +138 -36
- package/src/tasks/create/templates/SDK-React/widget/PAGE-CASE/mock.stories.js.mustache +1 -1
- package/src/tasks/create-all/index.js +112 -56
- package/src/tasks/delete/helper.js +88 -24
- package/src/tasks/delete/index.js +17 -8
- package/src/tasks/delete-all/helper.js +88 -25
- package/src/tasks/delete-all/index.js +15 -6
- package/src/tasks/list/helper.js +2 -3
- package/src/tasks/list/index.js +14 -7
- package/src/tasks/map/map.js +212 -20
- package/src/tasks/map-all/index.js +19 -2
- package/src/tasks/override/index.js +140 -79
- package/src/tasks/override-all/index.js +54 -6
- package/src/tasks/publish/helper.js +94 -51
- package/src/tasks/publish/index.js +87 -34
- package/src/tasks/publish-all/helper.js +97 -58
- package/src/tasks/publish-all/index.js +127 -48
- package/src/tasks/rename/index.js +184 -111
- package/src/tasks/validator/index.js +31 -7
- package/src/util.js +187 -39
- package/src/tasks/create/templates/Constellation/field/TimeofDay/styles.js.mustache +0 -7
- /package/src/tasks/bundle/{builder → builderAngular}/index.js +0 -0
- /package/src/tasks/bundle/{builder → builderAngular}/modules.js +0 -0
- /package/src/tasks/create/templates/Constellation/field/{TimeofDay → TimeOfDay}/config.json.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/field/{TimeofDay → TimeOfDay}/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/field/{TimeofDay → TimeOfDay}/index.jsx.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/field/{TimeofDay → TimeOfDay}/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/Constellation/field/{TimeofDay → TimeOfDay}/suggestions-handler.js +0 -0
- /package/src/tasks/create/templates/{SDK-React/field/TimeofDay → SDK-Angular/field/TimeOfDay}/config.json.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/field/{TimeofDay → TimeOfDay}/demo.stories.jsx.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/field/{TimeofDay → TimeOfDay}/mock.stories.js.mustache +0 -0
- /package/src/tasks/create/templates/SDK-React/field/{TimeofDay → TimeOfDay}/styles.js.mustache +0 -0
|
@@ -17,7 +17,7 @@ let server = null;
|
|
|
17
17
|
const generateAccessToken = async config => {
|
|
18
18
|
|
|
19
19
|
let authSuccess = false;
|
|
20
|
-
const { serverType, authService, isolationId, grantType, clientId, clientSecret, user, password } = config;
|
|
20
|
+
const { serverType, authService, isolationId, grantType, clientId, clientSecret, user, password, legacyTLS } = config;
|
|
21
21
|
// Try to gracefully deal with missing trailing slashes for server (and later conditionally for redirectUri)
|
|
22
22
|
const server = config.server.endsWith('/') ? config.server : `${config.server}/`;
|
|
23
23
|
|
|
@@ -67,6 +67,7 @@ const generateAccessToken = async config => {
|
|
|
67
67
|
clientId: clientId,
|
|
68
68
|
clientSecret: clientSecret,
|
|
69
69
|
ignoreInvalidCerts: true,
|
|
70
|
+
useNodeFetch:true,
|
|
70
71
|
...authCodeConfig
|
|
71
72
|
};
|
|
72
73
|
if (serverType === 'infinity') {
|
|
@@ -75,9 +76,12 @@ const generateAccessToken = async config => {
|
|
|
75
76
|
authConfig.password = Buffer.from(password).toString('base64');
|
|
76
77
|
}
|
|
77
78
|
}
|
|
79
|
+
if (legacyTLS) {
|
|
80
|
+
authConfig.legacyTLS = true;
|
|
81
|
+
}
|
|
78
82
|
if (serverType === 'launchpad') {
|
|
79
83
|
authConfig.isolationId = isolationId;
|
|
80
|
-
|
|
84
|
+
authConfig.noPKCE = true;
|
|
81
85
|
}
|
|
82
86
|
|
|
83
87
|
try {
|
|
@@ -148,6 +152,9 @@ export default async options => {
|
|
|
148
152
|
serverConfig.server = data[SERVER_CONFIG][serverConfig.serverType === "infinity" ? SERVER_REST_URL : LP_SERVER_REST_URL];
|
|
149
153
|
serverConfig.authService = data.authConfig?.authService || 'pega';
|
|
150
154
|
const isPwdNonEmpty = serverConfig['password'] ? true : false;
|
|
155
|
+
if( data[SERVER_CONFIG]['legacyTLS'] ) {
|
|
156
|
+
serverConfig.legacyTLS = true;
|
|
157
|
+
}
|
|
151
158
|
|
|
152
159
|
const questions = await getAuthQuestions(serverConfig);
|
|
153
160
|
const answers = await inquirer.prompt(questions);
|
|
@@ -179,6 +186,9 @@ export default async options => {
|
|
|
179
186
|
|
|
180
187
|
delete serverConfig.serverType;
|
|
181
188
|
delete serverConfig.server;
|
|
189
|
+
if( serverConfig.legacyTLS ) {
|
|
190
|
+
delete serverConfig.legacyTLS;
|
|
191
|
+
}
|
|
182
192
|
|
|
183
193
|
if (authOK & bWriteUpdate) {
|
|
184
194
|
// Don't write password value (unless it already had a value)
|
|
@@ -25,11 +25,14 @@ export const cleanUp = async () => {
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
fs.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
if (fs.existsSync('lib')) {
|
|
29
|
+
fs.rm('lib', { recursive: true }, err => {
|
|
30
|
+
if (err) {
|
|
31
|
+
throw err;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
export const getBuildCategory = async (options) => {
|
|
@@ -53,7 +56,7 @@ export const getBuildComponentQuestions = async (category) => {
|
|
|
53
56
|
const defaultPegaConfig = await getPegaServerConfig();
|
|
54
57
|
|
|
55
58
|
if (components.length == 0) {
|
|
56
|
-
console.log(chalk.
|
|
59
|
+
console.log(chalk.redBright("No components to build"));
|
|
57
60
|
process.exit(1);
|
|
58
61
|
}
|
|
59
62
|
|
|
@@ -73,6 +76,7 @@ export const getBuildComponentQuestions = async (category) => {
|
|
|
73
76
|
},
|
|
74
77
|
{
|
|
75
78
|
name: 'devBuild',
|
|
79
|
+
type: 'confirm',
|
|
76
80
|
message: 'Generate development build ?',
|
|
77
81
|
default: defaultPegaConfig.devBuild
|
|
78
82
|
}
|
package/src/tasks/build/index.js
CHANGED
|
@@ -4,31 +4,73 @@ import chalk from 'chalk';
|
|
|
4
4
|
|
|
5
5
|
import validate from '../validator/index.js';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import { bundleReactComponent, bundleAngularComponent, bundleAssociatedComponent} from '../bundle/index.js';
|
|
8
8
|
import lintComponent from '../linter/index.js';
|
|
9
9
|
import { getBuildComponentQuestions, getBuildCategory, cleanUp } from './helper.js';
|
|
10
|
-
import { getComponentDirectoryPath, showVersion, getOptionsCategory } from '../../util.js';
|
|
10
|
+
import { getComponentDirectoryPath, showVersion, getOptionsCategory, getFramework, getLocalComponentKeyFromConfig, convertIntoKebabCase, convertIntoPascalCase } from '../../util.js';
|
|
11
11
|
|
|
12
12
|
import { CATEGORY_CUSTOM } from '../../constants.js';
|
|
13
13
|
|
|
14
|
+
|
|
14
15
|
export default async options => {
|
|
15
16
|
showVersion();
|
|
16
17
|
|
|
17
|
-
const
|
|
18
|
-
|
|
18
|
+
const framework = await getFramework();
|
|
19
|
+
|
|
20
|
+
let category;
|
|
21
|
+
let componentKey;
|
|
22
|
+
let sourceMap;
|
|
23
|
+
let devBuild;
|
|
24
|
+
let content;
|
|
25
|
+
|
|
26
|
+
if (options.params.length >= 7) {
|
|
27
|
+
category = options.params[3]
|
|
28
|
+
componentKey = options.params[4];
|
|
29
|
+
sourceMap = options.params[5];
|
|
30
|
+
const dBuild = options.params[6];
|
|
31
|
+
devBuild = (dBuild === 'Y' ||
|
|
32
|
+
dBuild === 'y' ||
|
|
33
|
+
dBuild === true ||
|
|
34
|
+
dBuild === 'true') ? true : false;
|
|
19
35
|
|
|
20
|
-
|
|
21
|
-
if (category == null) {
|
|
22
|
-
category = getOptionsCategory(options);
|
|
36
|
+
content = { componentKey, sourceMap, devBuild};
|
|
23
37
|
}
|
|
38
|
+
else {
|
|
39
|
+
const catQuestion = await getBuildCategory(options);
|
|
40
|
+
const catAnswers = await inquirer.prompt(catQuestion);
|
|
24
41
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
42
|
+
category = catAnswers.category;
|
|
43
|
+
if (category == null) {
|
|
44
|
+
category = getOptionsCategory(options);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const questions = await getBuildComponentQuestions(category);
|
|
48
|
+
const answers = await inquirer.prompt(questions);
|
|
49
|
+
({ componentKey, sourceMap, devBuild } = answers);
|
|
50
|
+
|
|
51
|
+
content = {
|
|
52
|
+
...answers
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const sDevBuild = devBuild ? '(dev build)' : '';
|
|
58
|
+
const sFramework = framework.split("-")[1];
|
|
59
|
+
|
|
60
|
+
let associatedComponentKey = componentKey;
|
|
61
|
+
|
|
62
|
+
switch (framework) {
|
|
63
|
+
case "SDK-Angular":
|
|
64
|
+
let arComp = componentKey.split("/");
|
|
65
|
+
arComp[1] = convertIntoKebabCase(convertIntoPascalCase(arComp[1]));
|
|
66
|
+
componentKey = arComp.join("/")
|
|
67
|
+
break;
|
|
68
|
+
case "SDK-React":
|
|
69
|
+
break;
|
|
70
|
+
case "SDK-WebComponents":
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
28
73
|
|
|
29
|
-
let content = {
|
|
30
|
-
...answers
|
|
31
|
-
};
|
|
32
74
|
|
|
33
75
|
const customTasks = new Listr(
|
|
34
76
|
[
|
|
@@ -39,7 +81,7 @@ export default async options => {
|
|
|
39
81
|
}
|
|
40
82
|
},
|
|
41
83
|
{
|
|
42
|
-
title:
|
|
84
|
+
title: `Lint ${sFramework} component`,
|
|
43
85
|
task: async () => {
|
|
44
86
|
const targetDirectory = await getComponentDirectoryPath(componentKey, category);
|
|
45
87
|
// console.log(`in buildComponent Lint component task: componentKey: ${componentKey} targetDirectory: ${targetDirectory}`);
|
|
@@ -47,20 +89,26 @@ export default async options => {
|
|
|
47
89
|
}
|
|
48
90
|
},
|
|
49
91
|
{
|
|
50
|
-
title:
|
|
51
|
-
task: async () => await
|
|
92
|
+
title: `Bundle React component ${sDevBuild}`,
|
|
93
|
+
task: async () => await bundleReactComponent(componentKey, sourceMap, devBuild, category),
|
|
94
|
+
enabled: ok => framework === "SDK-React"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
title: `Bundle Angular component ${sDevBuild}`,
|
|
98
|
+
task: async () => await bundleAngularComponent(componentKey, sourceMap, devBuild, category),
|
|
99
|
+
enabled: ok => framework === "SDK-Angular"
|
|
52
100
|
},
|
|
53
101
|
{
|
|
54
102
|
title: 'Lint associated component',
|
|
55
103
|
task: async () => {
|
|
56
|
-
const targetDirectory = await getComponentDirectoryPath(
|
|
104
|
+
const targetDirectory = await getComponentDirectoryPath(associatedComponentKey, "constellation");
|
|
57
105
|
// console.log(`in buildComponent Lint component task: componentKey: ${componentKey} targetDirectory: ${targetDirectory}`);
|
|
58
106
|
await lintComponent(targetDirectory);
|
|
59
107
|
}
|
|
60
108
|
},
|
|
61
109
|
{
|
|
62
|
-
title:
|
|
63
|
-
task: async () => await
|
|
110
|
+
title: `Bundle associated component ${sDevBuild}`,
|
|
111
|
+
task: async () => await bundleAssociatedComponent(associatedComponentKey, sourceMap, devBuild, "constellation")
|
|
64
112
|
}
|
|
65
113
|
],
|
|
66
114
|
{
|
|
@@ -77,7 +125,7 @@ export default async options => {
|
|
|
77
125
|
}
|
|
78
126
|
},
|
|
79
127
|
{
|
|
80
|
-
title:
|
|
128
|
+
title: `Lint ${sFramework} component`,
|
|
81
129
|
task: async () => {
|
|
82
130
|
const targetDirectory = await getComponentDirectoryPath(componentKey, category);
|
|
83
131
|
// console.log(`in buildComponent Lint component task: componentKey: ${componentKey} targetDirectory: ${targetDirectory}`);
|
|
@@ -85,8 +133,14 @@ export default async options => {
|
|
|
85
133
|
}
|
|
86
134
|
},
|
|
87
135
|
{
|
|
88
|
-
title:
|
|
89
|
-
task: async () => await
|
|
136
|
+
title: `Bundle React component ${sDevBuild}`,
|
|
137
|
+
task: async () => await bundleReactComponent(componentKey, sourceMap, devBuild, category),
|
|
138
|
+
enabled: ok => framework === "SDK-React"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
title: `Bundle Angular component ${sDevBuild}`,
|
|
142
|
+
task: async () => await bundleAngularComponent(componentKey, sourceMap, devBuild, category),
|
|
143
|
+
enabled: ok => framework === "SDK-Angular"
|
|
90
144
|
}
|
|
91
145
|
],
|
|
92
146
|
{
|
|
@@ -13,17 +13,21 @@ import {
|
|
|
13
13
|
import { COMPONENT_SCHEMA, CATEGORY_CUSTOM } from '../../constants.js';
|
|
14
14
|
|
|
15
15
|
export const cleanUp = async () => {
|
|
16
|
-
fs.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
if (fs.existsSync('dist/components')) {
|
|
17
|
+
fs.rm('dist/components', { recursive: true }, err => {
|
|
18
|
+
if (err) {
|
|
19
|
+
throw err;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
21
23
|
|
|
22
|
-
fs.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
if (fs.existsSync('lib')) {
|
|
25
|
+
fs.rm('lib', { recursive: true }, err => {
|
|
26
|
+
if (err) {
|
|
27
|
+
throw err;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
}
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
export const getBuildCategory = async (options) => {
|
|
@@ -47,13 +51,14 @@ export const getBuildComponentQuestions = async (category) => {
|
|
|
47
51
|
const defaultPegaConfig = await getPegaServerConfig();
|
|
48
52
|
|
|
49
53
|
if (components.length == 0) {
|
|
50
|
-
console.log(chalk.
|
|
54
|
+
console.log(chalk.redBright("No components to build"));
|
|
51
55
|
process.exit(1);
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
return [
|
|
55
59
|
{
|
|
56
60
|
name: 'devBuild',
|
|
61
|
+
type: 'confirm',
|
|
57
62
|
message: 'Generate development build ?',
|
|
58
63
|
default: defaultPegaConfig.devBuild
|
|
59
64
|
}
|
|
@@ -4,16 +4,22 @@ import chalk from 'chalk';
|
|
|
4
4
|
|
|
5
5
|
import validate from '../validator/index.js';
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import { bundleReactComponent, bundleAngularComponent, bundleAssociatedComponent} from '../bundle/index.js';
|
|
8
8
|
import lintComponent from '../linter/index.js';
|
|
9
9
|
import { getBuildComponentQuestions, getBuildCategory, cleanUp } from './helper.js';
|
|
10
|
-
import { getComponentDirectoryPath, showVersion, getOptionsCategory, getComponentsObj } from '../../util.js';
|
|
10
|
+
import { getComponentDirectoryPath, showVersion, getOptionsCategory, getComponentsObj, getFramework, getLocalComponentKeyFromConfig, convertIntoKebabCase, convertIntoPascalCase } from '../../util.js';
|
|
11
11
|
|
|
12
12
|
import { CATEGORY_CUSTOM } from '../../constants.js';
|
|
13
13
|
|
|
14
|
-
export function getCustomTasks(componentKey, category, sourceMap, devBuild, content, options) {
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
export function getCustomTasks(componentKey, category, sourceMap, devBuild, content, options, associatedComponentKey, framework) {
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
const sDevBuild = devBuild ? '(dev build)' : '';
|
|
20
|
+
const sFramework = framework.split("-")[1];
|
|
21
|
+
|
|
22
|
+
return new Listr(
|
|
17
23
|
[
|
|
18
24
|
{
|
|
19
25
|
title: 'Validate config schema',
|
|
@@ -22,7 +28,7 @@ export function getCustomTasks(componentKey, category, sourceMap, devBuild, cont
|
|
|
22
28
|
}
|
|
23
29
|
},
|
|
24
30
|
{
|
|
25
|
-
title:
|
|
31
|
+
title: `Lint ${sFramework} component`,
|
|
26
32
|
task: async () => {
|
|
27
33
|
const targetDirectory = await getComponentDirectoryPath(componentKey, category);
|
|
28
34
|
// console.log(`in buildComponent Lint component task: componentKey: ${componentKey} targetDirectory: ${targetDirectory}`);
|
|
@@ -30,20 +36,26 @@ export function getCustomTasks(componentKey, category, sourceMap, devBuild, cont
|
|
|
30
36
|
}
|
|
31
37
|
},
|
|
32
38
|
{
|
|
33
|
-
title:
|
|
34
|
-
task: async () => await
|
|
39
|
+
title: `Bundle React component ${sDevBuild}`,
|
|
40
|
+
task: async () => await bundleReactComponent(componentKey, sourceMap, devBuild, category),
|
|
41
|
+
enabled: ok => framework === "SDK-React"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: `Bundle Angular component ${sDevBuild}`,
|
|
45
|
+
task: async () => await bundleAngularComponent(componentKey, sourceMap, devBuild, category),
|
|
46
|
+
enabled: ok => framework === "SDK-Angular"
|
|
35
47
|
},
|
|
36
48
|
{
|
|
37
49
|
title: 'Lint associated component',
|
|
38
50
|
task: async () => {
|
|
39
|
-
const targetDirectory = await getComponentDirectoryPath(
|
|
51
|
+
const targetDirectory = await getComponentDirectoryPath(associatedComponentKey, "constellation");
|
|
40
52
|
// console.log(`in buildComponent Lint component task: componentKey: ${componentKey} targetDirectory: ${targetDirectory}`);
|
|
41
53
|
await lintComponent(targetDirectory);
|
|
42
54
|
}
|
|
43
55
|
},
|
|
44
56
|
{
|
|
45
|
-
title:
|
|
46
|
-
task: async () => await
|
|
57
|
+
title: `Bundle associated component ${sDevBuild}`,
|
|
58
|
+
task: async () => await bundleAssociatedComponent(associatedComponentKey, sourceMap, devBuild, "constellation")
|
|
47
59
|
}
|
|
48
60
|
],
|
|
49
61
|
{
|
|
@@ -51,13 +63,13 @@ export function getCustomTasks(componentKey, category, sourceMap, devBuild, cont
|
|
|
51
63
|
}
|
|
52
64
|
);
|
|
53
65
|
|
|
54
|
-
return customTasks;
|
|
55
66
|
}
|
|
56
67
|
|
|
57
68
|
|
|
58
|
-
export function getOverrideTasks(componentKey, category, sourceMap, devBuild, content, options) {
|
|
59
|
-
|
|
60
|
-
const
|
|
69
|
+
export function getOverrideTasks(componentKey, category, sourceMap, devBuild, content, options, framework) {
|
|
70
|
+
const sDevBuild = devBuild ? '(dev build)' : '';
|
|
71
|
+
const sFramework = framework.split("-")[1];
|
|
72
|
+
return new Listr(
|
|
61
73
|
[
|
|
62
74
|
{
|
|
63
75
|
title: 'Validate config schema',
|
|
@@ -66,7 +78,7 @@ export function getOverrideTasks(componentKey, category, sourceMap, devBuild, co
|
|
|
66
78
|
}
|
|
67
79
|
},
|
|
68
80
|
{
|
|
69
|
-
title:
|
|
81
|
+
title: `Lint ${sFramework} component`,
|
|
70
82
|
task: async () => {
|
|
71
83
|
const targetDirectory = await getComponentDirectoryPath(componentKey, category);
|
|
72
84
|
// console.log(`in buildComponent Lint component task: componentKey: ${componentKey} targetDirectory: ${targetDirectory}`);
|
|
@@ -74,8 +86,14 @@ export function getOverrideTasks(componentKey, category, sourceMap, devBuild, co
|
|
|
74
86
|
}
|
|
75
87
|
},
|
|
76
88
|
{
|
|
77
|
-
title:
|
|
78
|
-
task: async () => await
|
|
89
|
+
title: `Bundle React component ${sDevBuild}`,
|
|
90
|
+
task: async () => await bundleReactComponent(componentKey, sourceMap, devBuild, category),
|
|
91
|
+
enabled: ok => framework === "SDK-React"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
title: `Bundle Angular component ${sDevBuild}`,
|
|
95
|
+
task: async () => await bundleAngularComponent(componentKey, sourceMap, devBuild, category),
|
|
96
|
+
enabled: ok => framework === "SDK-Angular"
|
|
79
97
|
}
|
|
80
98
|
],
|
|
81
99
|
{
|
|
@@ -83,38 +101,83 @@ export function getOverrideTasks(componentKey, category, sourceMap, devBuild, co
|
|
|
83
101
|
}
|
|
84
102
|
);
|
|
85
103
|
|
|
86
|
-
return overrideTasks;
|
|
87
104
|
}
|
|
88
105
|
|
|
89
106
|
export default async options => {
|
|
90
107
|
showVersion();
|
|
91
108
|
|
|
92
|
-
const
|
|
93
|
-
const catAnswers = await inquirer.prompt(catQuestion);
|
|
109
|
+
const framework = await getFramework();
|
|
94
110
|
|
|
95
|
-
let
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
111
|
+
let sourceMap;
|
|
112
|
+
let devBuild;
|
|
113
|
+
let category;
|
|
114
|
+
let content;
|
|
115
|
+
let components;
|
|
99
116
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
117
|
+
if (options.params.length >= 5) {
|
|
118
|
+
category = options.params[3];
|
|
119
|
+
const dBuild = options.params[4];
|
|
120
|
+
devBuild = (dBuild === 'Y' ||
|
|
121
|
+
dBuild === 'y' ||
|
|
122
|
+
dBuild === true ||
|
|
123
|
+
dBuild === 'true') ? true : false;
|
|
124
|
+
|
|
125
|
+
content = { devBuild };
|
|
126
|
+
components = await getComponentsObj(false, category);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
const catQuestion = await getBuildCategory(options);
|
|
130
|
+
const catAnswers = await inquirer.prompt(catQuestion);
|
|
104
131
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
132
|
+
category = catAnswers.category;
|
|
133
|
+
if (category == null) {
|
|
134
|
+
category = getOptionsCategory(options);
|
|
135
|
+
}
|
|
108
136
|
|
|
109
|
-
|
|
137
|
+
components = await getComponentsObj(false, category);
|
|
138
|
+
const questions = await getBuildComponentQuestions(category);
|
|
139
|
+
const answers = await inquirer.prompt(questions);
|
|
140
|
+
({ sourceMap, devBuild } = answers);
|
|
110
141
|
|
|
142
|
+
content = {
|
|
143
|
+
...answers
|
|
144
|
+
};
|
|
145
|
+
}
|
|
111
146
|
|
|
112
147
|
if (category === CATEGORY_CUSTOM) {
|
|
113
|
-
for (
|
|
114
|
-
componentKey =
|
|
115
|
-
|
|
148
|
+
for (const component of components) {
|
|
149
|
+
let componentKey = component.value;
|
|
150
|
+
const componentKeyName = component.name;
|
|
151
|
+
console.log(chalk.bold.green(`Building: ${componentKeyName}`));
|
|
152
|
+
|
|
153
|
+
let associatedComponentKey = componentKey;
|
|
154
|
+
|
|
155
|
+
switch (framework) {
|
|
156
|
+
case "SDK-Angular":
|
|
157
|
+
let arComp = componentKey.split("/");
|
|
158
|
+
arComp[1] = convertIntoKebabCase(convertIntoPascalCase(arComp[1]));
|
|
159
|
+
componentKey = arComp.join("/")
|
|
160
|
+
break;
|
|
161
|
+
case "SDK-React":
|
|
162
|
+
break;
|
|
163
|
+
case "SDK-WebComponents":
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
116
166
|
|
|
117
|
-
|
|
167
|
+
// switch (framework) {
|
|
168
|
+
// case "SDK-Angular":
|
|
169
|
+
// let arComp = associatedComponentKey.split("/");
|
|
170
|
+
// const componentKeyPascal = await getLocalComponentKeyFromConfig(associatedComponentKey);
|
|
171
|
+
// arComp[1] = componentKeyPascal;
|
|
172
|
+
// associatedComponentKey = arComp.join("/")
|
|
173
|
+
// break;
|
|
174
|
+
// case "SDK-React":
|
|
175
|
+
// break;
|
|
176
|
+
// case "SDK-WebComponents":
|
|
177
|
+
// break;
|
|
178
|
+
// }
|
|
179
|
+
|
|
180
|
+
let myCustomTasks = getCustomTasks(componentKey, category, sourceMap, devBuild, content, options, associatedComponentKey, framework);
|
|
118
181
|
|
|
119
182
|
await myCustomTasks.run().catch(err => {
|
|
120
183
|
console.log(chalk.bold.red(err.toString()));
|
|
@@ -122,19 +185,20 @@ export default async options => {
|
|
|
122
185
|
}
|
|
123
186
|
}
|
|
124
187
|
else {
|
|
125
|
-
for (
|
|
126
|
-
componentKey =
|
|
127
|
-
|
|
188
|
+
for (const component of components) {
|
|
189
|
+
const componentKey = component.value;
|
|
190
|
+
const componentKeyName = component.name;
|
|
191
|
+
console.log(chalk.bold.green(`Building: ${componentKeyName}`));
|
|
128
192
|
|
|
129
|
-
let myOverrideTasks = getOverrideTasks(componentKey, category, sourceMap, devBuild, content, options);
|
|
193
|
+
let myOverrideTasks = getOverrideTasks(componentKey, category, sourceMap, devBuild, content, options, framework);
|
|
130
194
|
|
|
131
|
-
await
|
|
195
|
+
await myOverrideTasks.run().catch(err => {
|
|
132
196
|
console.log(chalk.bold.red(err.toString()));
|
|
133
197
|
});
|
|
134
198
|
}
|
|
135
199
|
}
|
|
136
200
|
|
|
137
|
-
cleanUp();
|
|
201
|
+
await cleanUp();
|
|
138
202
|
|
|
139
203
|
return true;
|
|
140
204
|
};
|
|
@@ -36,6 +36,7 @@ const resolveModule = (resolveFn, filePath) => {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
// config after eject: we're in ./config/
|
|
39
|
+
// building a standard Angular component for Angular SDK, use same ts config as buid:dev
|
|
39
40
|
export default {
|
|
40
41
|
dotenv: resolveApp('.env'),
|
|
41
42
|
appPath: resolveApp('.'),
|
|
@@ -43,8 +44,8 @@ export default {
|
|
|
43
44
|
appPublic: resolveApp('public'),
|
|
44
45
|
appIndexJs: resolveModule(resolveApp, 'src/index'),
|
|
45
46
|
appPackageJson: resolveApp('package.json'),
|
|
46
|
-
appSrc: resolveApp('src'),
|
|
47
|
-
appTsConfig: resolveApp('tsconfig.json'),
|
|
47
|
+
appSrc: resolveApp('src/app/_components'),
|
|
48
|
+
appTsConfig: resolveApp('tsconfig.app.json'),
|
|
48
49
|
appJsConfig: resolveApp('jsconfig.json'),
|
|
49
50
|
appNodeModules: resolveApp('node_modules')
|
|
50
51
|
};
|