@pega/custom-dx-components 26.1.11 → 26.1.12-alpha.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/package.json +48 -64
- package/src/ai/README.md +44 -0
- package/src/ai/catalog/README.md +133 -0
- package/src/ai/catalog/best-practices/README.md +24 -0
- package/src/ai/catalog/best-practices/accessibility-for-async-components.md +53 -0
- package/src/ai/catalog/best-practices/error-handling-and-resiliency.md +116 -0
- package/src/ai/catalog/best-practices/genai-assistant-integration-patterns.md +49 -0
- package/src/ai/catalog/best-practices/performance-and-efficiency.md +109 -0
- package/src/ai/catalog/best-practices/security-considerations.md +93 -0
- package/src/ai/catalog/best-practices/testing-pconnect-components.md +245 -0
- package/src/ai/catalog/best-practices/troubleshooting-common-pitfalls.md +132 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/SKILL.md +44 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/README.md +39 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/approval-workflow-decision.md +47 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/attachment-upload.md +45 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/bulk-action-submit.md +50 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/confirm-before-destructive-action.md +43 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/create-and-stage-new-case.md +45 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/graceful-submit-failure.md +39 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/modal-assignment-submit.md +58 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/multi-step-wizard.md +44 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/resolve-or-ignore-duplicate.md +47 -0
- package/src/ai/catalog/pconnect-assignment-lifecycle/cookbooks/safe-case-deletion.md +36 -0
- package/src/ai/catalog/pconnect-case-collaboration/SKILL.md +42 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/README.md +36 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/look-up-user-details.md +43 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/manage-case-attachments.md +51 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/manage-case-participants.md +52 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/participant-and-follower.md +40 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/post-and-manage-feed.md +50 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/relate-cases.md +35 -0
- package/src/ai/catalog/pconnect-case-collaboration/cookbooks/tag-case-and-find-related.md +44 -0
- package/src/ai/catalog/pconnect-data-subscriptions/SKILL.md +42 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/README.md +35 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/data-page-subscription-cleanup.md +41 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/publish-and-subscribe-events.md +40 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/pubsub-cleanup.md +38 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/query-paginated-list-data.md +44 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/realtime-case-subscription.md +46 -0
- package/src/ai/catalog/pconnect-data-subscriptions/cookbooks/refresh-and-update-data.md +41 -0
- package/src/ai/catalog/pconnect-forms-and-fields/SKILL.md +44 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/README.md +36 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/autosave-tracking.md +45 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/cascading-dependent-fields.md +51 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/collect-form-changes-for-manual-save.md +45 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/custom-field-validators.md +44 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/discard-changes-and-reset-form.md +41 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/full-form-validation.md +38 -0
- package/src/ai/catalog/pconnect-forms-and-fields/cookbooks/persist-widget-ui-state.md +41 -0
- package/src/ai/catalog/pconnect-lists-and-views/SKILL.md +44 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/README.md +35 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/activate-and-switch-container-items.md +52 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/container-item-lifecycle.md +61 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/insert-delete-list-rows.md +40 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/reorder-list-rows.md +39 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/repeating-row-edit.md +39 -0
- package/src/ai/catalog/pconnect-lists-and-views/cookbooks/view-personalization.md +60 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/SKILL.md +45 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/README.md +35 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/agent-conversation-for-tasks.md +54 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/bookmarkable-filter-state.md +40 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/deep-link-semantic-url.md +39 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/genai-assistant-conversation.md +43 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/locale-switch-and-relocalize.md +38 -0
- package/src/ai/catalog/pconnect-navigation-locale-genai/cookbooks/persist-operator-preferences.md +40 -0
- package/src/ai/catalog/references/architecture-overview.md +52 -0
- package/src/ai/catalog/references/pconnect-actions-api.md +948 -0
- package/src/ai/catalog/references/pconnect-case-info-data-info-localization.md +618 -0
- package/src/ai/catalog/references/pconnect-case-validation-utilities.md +238 -0
- package/src/ai/catalog/references/pconnect-container-manager.md +215 -0
- package/src/ai/catalog/references/pconnect-list-actions.md +250 -0
- package/src/ai/catalog/references/pconnect-misc-suggestions-creation.md +231 -0
- package/src/ai/catalog/references/pconnect-reference-context-component.md +471 -0
- package/src/ai/catalog/references/pconnect-state-config.md +316 -0
- package/src/ai/catalog/references/pconnect-validation-api.md +45 -0
- package/src/ai/catalog/references/pcore-analytics-genai-details.md +50 -0
- package/src/ai/catalog/references/pcore-bootstrap-init-details.md +121 -0
- package/src/ai/catalog/references/pcore-bootstrap-registry-routing.md +253 -0
- package/src/ai/catalog/references/pcore-case-collaboration-details.md +191 -0
- package/src/ai/catalog/references/pcore-case-collaboration-genai.md +264 -0
- package/src/ai/catalog/references/pcore-environment-info-details.md +96 -0
- package/src/ai/catalog/references/pcore-environment-locale-namespace.md +175 -0
- package/src/ai/catalog/references/pcore-messaging-details.md +99 -0
- package/src/ai/catalog/references/pcore-misc-details.md +207 -0
- package/src/ai/catalog/references/pcore-misc-utilities.md +325 -0
- package/src/ai/catalog/references/pcore-rest-data-details.md +164 -0
- package/src/ai/catalog/references/pcore-rest-data-messaging.md +308 -0
- package/src/ai/catalog/references/pcore-store-context-details.md +40 -0
- package/src/ai/catalog/references/pcore-store-context-state.md +130 -0
- package/src/ai/index.js +154 -0
- package/src/ai/project/.claude/skills/boolean/SKILL.md +43 -0
- package/src/ai/project/.claude/skills/case/SKILL.md +58 -0
- package/src/ai/project/.claude/skills/create-dx-component/SKILL.md +98 -0
- package/src/ai/project/.claude/skills/create-dx-component/assets/PConnProps.d.ts +24 -0
- package/src/ai/project/.claude/skills/create-dx-component/assets/create-nonce.ts +5 -0
- package/src/ai/project/.claude/skills/create-dx-component/assets/event-utils.ts +18 -0
- package/src/ai/project/.claude/skills/create-dx-component/assets/styles.ts +7 -0
- package/src/ai/project/.claude/skills/create-dx-component/cookbooks/README.md +28 -0
- package/src/ai/project/.claude/skills/create-dx-component/cookbooks/build-a-data-widget.md +281 -0
- package/src/ai/project/.claude/skills/create-dx-component/cookbooks/field-with-limits-and-validation.md +156 -0
- package/src/ai/project/.claude/skills/create-dx-component/cookbooks/status-badge-field.md +97 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/accessibility.md +71 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/choosing-type-and-subtype.md +79 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/cli-workflow.md +125 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/component-patterns.md +241 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/config-schema.md +296 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/cosmos-components.md +137 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/field-behavior.md +155 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/field-essentials.md +90 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/field-subtypes-extra.md +68 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/localization.md +30 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/pcore-pconnect-apis.md +77 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/presentation-essentials.md +57 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/props-contract.md +182 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/state-matrix.md +102 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/storybook-pattern.md +262 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/styles-pattern.md +54 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/template-essentials.md +87 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/template-patterns.md +131 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/test-pattern.md +215 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/ui-gallery-reuse.md +93 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/widget-essentials.md +84 -0
- package/src/ai/project/.claude/skills/create-dx-component/references/widget-patterns.md +164 -0
- package/src/ai/project/.claude/skills/currency/SKILL.md +46 -0
- package/src/ai/project/.claude/skills/date/SKILL.md +46 -0
- package/src/ai/project/.claude/skills/decimal/SKILL.md +49 -0
- package/src/ai/project/.claude/skills/details/SKILL.md +60 -0
- package/src/ai/project/.claude/skills/email/SKILL.md +42 -0
- package/src/ai/project/.claude/skills/field/SKILL.md +68 -0
- package/src/ai/project/.claude/skills/form/SKILL.md +51 -0
- package/src/ai/project/.claude/skills/generate-component-set/SKILL.md +80 -0
- package/src/ai/project/.claude/skills/generate-component-set/component-manifest.json +161 -0
- package/src/ai/project/.claude/skills/identify-components/SKILL.md +76 -0
- package/src/ai/project/.claude/skills/integer/SKILL.md +45 -0
- package/src/ai/project/.claude/skills/page/SKILL.md +60 -0
- package/src/ai/project/.claude/skills/page-widget/SKILL.md +55 -0
- package/src/ai/project/.claude/skills/percentage/SKILL.md +52 -0
- package/src/ai/project/.claude/skills/phone/SKILL.md +44 -0
- package/src/ai/project/.claude/skills/picklist/SKILL.md +50 -0
- package/src/ai/project/.claude/skills/plan-dx-component/SKILL.md +51 -0
- package/src/ai/project/.claude/skills/plan-dx-component/references/design-system-mapping.md +108 -0
- package/src/ai/project/.claude/skills/plan-dx-component/references/intake.md +146 -0
- package/src/ai/project/.claude/skills/plan-dx-component/references/plan-template.md +76 -0
- package/src/ai/project/.claude/skills/plan-dx-component/references/requirements-template.md +88 -0
- package/src/ai/project/.claude/skills/presentation/SKILL.md +61 -0
- package/src/ai/project/.claude/skills/publish-library/SKILL.md +106 -0
- package/src/ai/project/.claude/skills/radiobuttons/SKILL.md +51 -0
- package/src/ai/project/.claude/skills/review-component/SKILL.md +49 -0
- package/src/ai/project/.claude/skills/review-component/references/checklist.md +77 -0
- package/src/ai/project/.claude/skills/template/SKILL.md +60 -0
- package/src/ai/project/.claude/skills/text/SKILL.md +45 -0
- package/src/ai/project/.claude/skills/update-dx-component/SKILL.md +56 -0
- package/src/ai/project/.claude/skills/update-dx-component/references/maintenance.md +43 -0
- package/src/ai/project/.claude/skills/url/SKILL.md +46 -0
- package/src/ai/project/.claude/skills/validate-component/SKILL.md +78 -0
- package/src/ai/project/.claude/skills/validate-component/references/runtime-troubleshooting.md +56 -0
- package/src/ai/project/.claude/skills/validate-component/scripts/check-component.mjs +327 -0
- package/src/ai/project/.claude/skills/widget/SKILL.md +59 -0
- package/src/ai/project/.gemini/settings.json +5 -0
- package/src/ai/project/AGENTS.md +74 -0
- package/src/ai/readme-section.md +91 -0
- package/src/cli.js +48 -7
- package/src/constants.js +54 -53
- package/src/internal-tests.js +27 -0
- package/src/tasks/ai-toggle/index.js +46 -0
- package/src/tasks/authenticate/helper.js +38 -38
- package/src/tasks/authenticate/index.js +17 -15
- package/src/tasks/build-all/helper.js +4 -4
- package/src/tasks/build-all/index.js +7 -7
- package/src/tasks/build-comp/helper.js +17 -17
- package/src/tasks/build-comp/index.js +10 -10
- package/src/tasks/build-jest-assets/index.js +7 -9
- package/src/tasks/build-lib/helper.js +8 -8
- package/src/tasks/build-lib/index.js +8 -8
- package/src/tasks/bundle/builder/index.js +9 -12
- package/src/tasks/bundle/builder/modules.js +8 -9
- package/src/tasks/bundle/builder/paths.js +2 -19
- package/src/tasks/bundle/builder/webpack.config.js +60 -77
- package/src/tasks/bundle/index.js +8 -8
- package/src/tasks/create/index.js +35 -35
- package/src/tasks/create/templates/Constellation/Field/Boolean/index.tsx.mustache +1 -36
- package/src/tasks/create/templates/Constellation/Field/Date/date.ts.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Field/Date/index.tsx.mustache +2 -27
- package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.ts.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Field/DateTime/date.ts.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Field/DateTime/index.tsx.mustache +2 -35
- package/src/tasks/create/templates/Constellation/Field/Decimal/index.tsx.mustache +3 -36
- package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.tsx.mustache +4 -39
- package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.tsx.mustache +4 -53
- package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/index.tsx.mustache +5 -5
- package/src/tasks/create/templates/Constellation/Field/Integer/index.tsx.mustache +3 -36
- package/src/tasks/create/templates/Constellation/Field/Picklist/index.tsx.mustache +7 -42
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/component-constants.ts +1 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/date.ts.mustache +0 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/embed-utils.ts.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/index.tsx.mustache +11 -11
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/repeat-utils.ts.mustache +3 -13
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/textformat-utils.tsx.mustache +2 -3
- package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/utils.ts.mustache +28 -28
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/index.tsx.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/textformat-utils.tsx.mustache +2 -3
- package/src/tasks/create/templates/Constellation/Field/Text/index.tsx.mustache +4 -33
- package/src/tasks/create/templates/Constellation/Field/Text-Email/index.tsx.mustache +3 -33
- package/src/tasks/create/templates/Constellation/Field/Text-Input/index.tsx.mustache +3 -31
- package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.tsx.mustache +3 -31
- package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.tsx.mustache +3 -35
- package/src/tasks/create/templates/Constellation/Field/Text-URL/index.tsx.mustache +3 -33
- package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.tsx.mustache +2 -3
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/index.tsx.mustache +2 -35
- package/src/tasks/create/templates/Constellation/Field/TimeofDay/time-of-day.ts.mustache +2 -2
- package/src/tasks/create/templates/Constellation/Template/DETAILS/Avatar.tsx.mustache +19 -15
- package/src/tasks/create/templates/Constellation/Template/DETAILS/Operator.tsx.mustache +6 -6
- package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS/index.tsx.mustache +4 -8
- package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.ts.mustache +9 -9
- package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +4 -8
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Avatar.tsx.mustache +19 -15
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/Operator.tsx.mustache +6 -6
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.ts.mustache +9 -9
- package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.ts.mustache +4 -8
- package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.tsx.mustache +8 -8
- package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.tsx.mustache +8 -8
- package/src/tasks/create/templates/Constellation/Template/PAGE/utils.ts.mustache +4 -9
- package/src/tasks/create/templates/Constellation/Widget/CASE/demo.test.tsx.mustache +3 -3
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.tsx.mustache +19 -14
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.tsx.mustache +6 -6
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.ts.mustache +1 -1
- package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/index.tsx.mustache +5 -5
- package/src/tasks/create/templates/Launchpad/Field/Text-Phone/index.tsx.mustache +3 -35
- package/src/tasks/create/templates/Launchpad/Field/__components.md +1 -1
- package/src/tasks/create/templates/Launchpad/Template/FORM/demo.stories.tsx.mustache +8 -8
- package/src/tasks/create/templates/Launchpad/Template/FORM-region/demo.stories.tsx.mustache +8 -8
- package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.test.tsx.mustache +3 -3
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/index.tsx.mustache +1 -1
- package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/mock.ts.mustache +1 -1
- package/src/tasks/create-all/index.js +42 -41
- package/src/tasks/create-lib/helper.js +13 -13
- package/src/tasks/create-lib/index.js +5 -5
- package/src/tasks/create-version/helper.js +10 -10
- package/src/tasks/create-version/index.js +3 -4
- package/src/tasks/delete/helper.js +20 -19
- package/src/tasks/delete/index.js +2 -2
- package/src/tasks/delete-all/helper.js +26 -25
- package/src/tasks/delete-all/index.js +2 -2
- package/src/tasks/delete-lib/helper.js +6 -6
- package/src/tasks/delete-lib/index.js +6 -6
- package/src/tasks/delete-pub/helper.js +18 -18
- package/src/tasks/delete-pub/index.js +8 -8
- package/src/tasks/delete-version/index.js +2 -2
- package/src/tasks/dev-server/index.js +1 -1
- package/src/tasks/export-archive/helper.js +21 -21
- package/src/tasks/export-archive/index.js +27 -40
- package/src/tasks/export-rc/helper.js +34 -34
- package/src/tasks/export-rc/index.js +21 -31
- package/src/tasks/import-archive/helper.js +39 -39
- package/src/tasks/import-archive/index.js +69 -89
- package/src/tasks/import-comp/helper.js +8 -8
- package/src/tasks/import-comp/index.js +30 -42
- package/src/tasks/index.js +5 -0
- package/src/tasks/init/Node.gitignore +149 -0
- package/src/tasks/init/helper.js +15 -8
- package/src/tasks/init/index.js +115 -35
- package/src/tasks/init/template/.prettierrc.json +4 -1
- package/src/tasks/init/template/.storybook/main.ts +1 -4
- package/src/tasks/init/template/.storybook/manager.ts +1 -1
- package/src/tasks/init/template/.storybook/preview.tsx +2 -2
- package/src/tasks/init/template/.storybook/theme.js +1 -1
- package/src/tasks/init/template/.vscode/extensions.json +0 -1
- package/src/tasks/init/template/README.md +2 -2
- package/src/tasks/init/template/eslint.config.mjs +13 -155
- package/src/tasks/init/template/jest.config.cjs +2 -0
- package/src/tasks/init/template/package-lock.json +26864 -0
- package/src/tasks/init/template/package.json.mustache +19 -74
- package/src/tasks/init/template/setupTests.ts +10 -4
- package/src/tasks/init/template/tsconfig.json +14 -6
- package/src/tasks/internal-test/index.js +21 -0
- package/src/tasks/internal-test-full/index.js +15 -0
- package/src/tasks/internal-test-functional/index.js +15 -0
- package/src/tasks/internal-test-unit/index.js +13 -0
- package/src/tasks/linter/index.js +2 -2
- package/src/tasks/list/helper.js +41 -40
- package/src/tasks/list/index.js +3 -3
- package/src/tasks/list-lib/helper.js +5 -5
- package/src/tasks/list-lib/index.js +8 -8
- package/src/tasks/list-pub/helper.js +23 -16
- package/src/tasks/list-pub/index.js +24 -21
- package/src/tasks/move/helper.js +8 -8
- package/src/tasks/move/index.js +19 -23
- package/src/tasks/promote-webpack/index.js +4 -4
- package/src/tasks/promote-webpack/webpack.config.js +62 -93
- package/src/tasks/publish/helper.js +21 -21
- package/src/tasks/publish/index.js +16 -16
- package/src/tasks/publish-all/helper.js +20 -20
- package/src/tasks/publish-all/index.js +11 -12
- package/src/tasks/publish-archive/helper.js +9 -9
- package/src/tasks/publish-archive/index.js +12 -14
- package/src/tasks/publish-lib/helper.js +3 -3
- package/src/tasks/publish-lib/index.js +28 -34
- package/src/tasks/quarantine/index.js +8 -8
- package/src/tasks/rename/index.js +26 -30
- package/src/tasks/rename-lib/index.js +21 -25
- package/src/tasks/restore/index.js +8 -8
- package/src/tasks/restore-config/index.js +3 -5
- package/src/tasks/set-perm/index.js +8 -8
- package/src/tasks/show-help/index.js +17 -9
- package/src/tasks/show-status/index.js +2 -2
- package/src/tasks/store/index.js +8 -8
- package/src/tasks/switch-lib/helper.js +7 -7
- package/src/tasks/switch-lib/index.js +7 -7
- package/src/tasks/switch-version/helper.js +6 -6
- package/src/tasks/switch-version/index.js +7 -7
- package/src/tasks/update/index.js +1 -1
- package/src/tasks/upgrade/index.js +7 -7
- package/src/tasks/validator/index.js +49 -203
- package/src/util.js +169 -186
- package/src/rules/no-pcore-pconnect-in-presentation.js +0 -103
- package/src/tasks/init/template/.stylelintrc.json +0 -4
- package/src/tasks/init/template/babel.config.cjs +0 -22
- package/src/tasks/init/template/cspell.json +0 -14
|
@@ -30,10 +30,10 @@ export const getFilePathQuestions = async () => {
|
|
|
30
30
|
type: 'fuzzypath',
|
|
31
31
|
message: 'Enter full path of the component folder',
|
|
32
32
|
default: defaultPath,
|
|
33
|
-
excludePath: nodePath => nodePath.startsWith('node_modules'),
|
|
33
|
+
excludePath: (nodePath) => nodePath.startsWith('node_modules'),
|
|
34
34
|
// excludePath :: (String) -> Bool
|
|
35
35
|
// excludePath to exclude some paths from the file-system scan
|
|
36
|
-
excludeFilter: nodePath => nodePath.indexOf('/.') >= 0,
|
|
36
|
+
excludeFilter: (nodePath) => nodePath.indexOf('/.') >= 0,
|
|
37
37
|
// excludeFilter :: (String) -> Bool
|
|
38
38
|
// excludeFilter to exclude some paths from the final list, e.g. '.'
|
|
39
39
|
itemType: 'directory',
|
|
@@ -47,15 +47,15 @@ export const getFilePathQuestions = async () => {
|
|
|
47
47
|
suggestOnly: false,
|
|
48
48
|
// suggestOnly :: Bool
|
|
49
49
|
// Restrict prompt answer to available choices or use them as suggestions
|
|
50
|
-
depthLimit: 2
|
|
50
|
+
depthLimit: 2,
|
|
51
51
|
// depthLimit :: integer >= 0
|
|
52
52
|
// Limit the depth of sub-folders to scan
|
|
53
53
|
// Defaults to infinite depth if undefined
|
|
54
|
-
}
|
|
54
|
+
},
|
|
55
55
|
];
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
export const getFileNameQuestions = async zipFileList => {
|
|
58
|
+
export const getFileNameQuestions = async (zipFileList) => {
|
|
59
59
|
addDebugLog('getFileNameQuestions', '', '');
|
|
60
60
|
|
|
61
61
|
return [
|
|
@@ -63,12 +63,12 @@ export const getFileNameQuestions = async zipFileList => {
|
|
|
63
63
|
name: 'fileName',
|
|
64
64
|
type: 'rawlist',
|
|
65
65
|
message: `Select component`,
|
|
66
|
-
choices: zipFileList
|
|
67
|
-
}
|
|
66
|
+
choices: zipFileList,
|
|
67
|
+
},
|
|
68
68
|
];
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
export const updateSavedFilePath = async filePath => {
|
|
71
|
+
export const updateSavedFilePath = async (filePath) => {
|
|
72
72
|
const currentDirectory = process.cwd();
|
|
73
73
|
const arPathParts = currentDirectory.split(path.sep);
|
|
74
74
|
const configDef = getConfigDefaults();
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
-
import { promisify } from 'util';
|
|
3
2
|
import { join } from 'path';
|
|
4
3
|
|
|
5
4
|
import inquirer from 'inquirer';
|
|
6
|
-
import ncp from 'ncp';
|
|
7
5
|
import chalk from 'chalk';
|
|
8
6
|
|
|
9
7
|
import {
|
|
@@ -17,7 +15,6 @@ import {
|
|
|
17
15
|
getComponents,
|
|
18
16
|
getUseInputConfig,
|
|
19
17
|
getInputConfigForCommand,
|
|
20
|
-
convertYNToBoolean
|
|
21
18
|
} from '../../util.js';
|
|
22
19
|
import { TASKS_CONFIG_JSON_FILENAME } from '../../constants.js';
|
|
23
20
|
import { getFilePathQuestions, getFileNameQuestions, updateSavedFilePath } from './helper.js';
|
|
@@ -32,15 +29,9 @@ const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
|
|
|
32
29
|
|
|
33
30
|
import { convertIntoPascalCase, getComponentDirectoryPath } from '../../util.js';
|
|
34
31
|
|
|
35
|
-
const copy = promisify(ncp);
|
|
36
|
-
|
|
37
32
|
let gFilePath = '';
|
|
38
33
|
|
|
39
|
-
export const updateConfig = async (
|
|
40
|
-
{ oldComponentKey, newComponentKey, library, version, targetDirectory, newLabel = '', organization },
|
|
41
|
-
options,
|
|
42
|
-
onlyCompanion = false
|
|
43
|
-
) => {
|
|
34
|
+
export const updateConfig = async ({ oldComponentKey, newComponentKey, library, version, targetDirectory, newLabel = '', organization }) => {
|
|
44
35
|
addDebugLog('updateConfig', `oldComponentKey: ${oldComponentKey}, newComponentKey: ${newComponentKey}`, '');
|
|
45
36
|
|
|
46
37
|
let configData = fs.readFileSync(join(targetDirectory, '/config.json'), { encoding: 'utf8' });
|
|
@@ -65,7 +56,7 @@ export const updateFile = async (fileName, oldComponentKeyPC, newComponentKeyPC,
|
|
|
65
56
|
addDebugLog(
|
|
66
57
|
'updateFile',
|
|
67
58
|
`fileName: ${fileName}, oldComponentKeyPC: ${oldComponentKeyPC}, newComponentKeyPC: ${newComponentKeyPC}, targetDirectory: ${targetDirectory}`,
|
|
68
|
-
''
|
|
59
|
+
'',
|
|
69
60
|
);
|
|
70
61
|
|
|
71
62
|
let fileData = fs.readFileSync(join(targetDirectory, '/', fileName), { encoding: 'utf8' });
|
|
@@ -78,7 +69,7 @@ export const updateFile = async (fileName, oldComponentKeyPC, newComponentKeyPC,
|
|
|
78
69
|
};
|
|
79
70
|
|
|
80
71
|
// rename the component
|
|
81
|
-
export const renameComponent = async (componentKey, orgLib, version, newName = '', newLabel = '', organization
|
|
72
|
+
export const renameComponent = async (componentKey, orgLib, version, newName = '', newLabel = '', organization) => {
|
|
82
73
|
addDebugLog('renameComponent', `orgLib: ${orgLib}, componentKey: ${componentKey}`, '');
|
|
83
74
|
|
|
84
75
|
const componentName = newName != '' ? newName : componentKey.split('_')[2];
|
|
@@ -104,19 +95,16 @@ export const renameComponent = async (componentKey, orgLib, version, newName = '
|
|
|
104
95
|
const fileName = targetFileList[fileIndex];
|
|
105
96
|
|
|
106
97
|
if (fileName === 'config.json') {
|
|
107
|
-
await updateConfig(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
},
|
|
118
|
-
options
|
|
119
|
-
);
|
|
98
|
+
await updateConfig({
|
|
99
|
+
oldComponentKey,
|
|
100
|
+
newComponentKey,
|
|
101
|
+
componentName,
|
|
102
|
+
library,
|
|
103
|
+
version,
|
|
104
|
+
targetDirectory,
|
|
105
|
+
newLabel,
|
|
106
|
+
organization,
|
|
107
|
+
});
|
|
120
108
|
} else {
|
|
121
109
|
await updateFile(fileName, oldComponentKeyPC, newComponentKeyPC, targetDirectory);
|
|
122
110
|
}
|
|
@@ -128,7 +116,6 @@ export const renameComponent = async (componentKey, orgLib, version, newName = '
|
|
|
128
116
|
export const importComp = async (filePath, fileName, askValidate) => {
|
|
129
117
|
addDebugLog('importComp', `filePath: ${filePath}, fileName: ${fileName}`, '');
|
|
130
118
|
|
|
131
|
-
const currentDirectory = process.cwd();
|
|
132
119
|
// const compDirectory = join(currentDirectory, "src", "components");
|
|
133
120
|
|
|
134
121
|
const copyFilePath = join(filePath, fileName);
|
|
@@ -155,7 +142,7 @@ export const importComp = async (filePath, fileName, askValidate) => {
|
|
|
155
142
|
type: 'rawlist',
|
|
156
143
|
message: `Proceed as ?`,
|
|
157
144
|
default: 'No import',
|
|
158
|
-
choices: ['No import', 'Overwrite', 'New name']
|
|
145
|
+
choices: ['No import', 'Overwrite', 'New name'],
|
|
159
146
|
},
|
|
160
147
|
{
|
|
161
148
|
name: 'componentName',
|
|
@@ -163,7 +150,7 @@ export const importComp = async (filePath, fileName, askValidate) => {
|
|
|
163
150
|
when(answers) {
|
|
164
151
|
return answers.proceedAs === 'New name';
|
|
165
152
|
},
|
|
166
|
-
validate: value => {
|
|
153
|
+
validate: (value) => {
|
|
167
154
|
/* value should not be empty
|
|
168
155
|
It should not have spaces
|
|
169
156
|
It should not start with a number
|
|
@@ -173,7 +160,7 @@ export const importComp = async (filePath, fileName, askValidate) => {
|
|
|
173
160
|
return true;
|
|
174
161
|
}
|
|
175
162
|
return 'Only alphanumeric values are allowed, starting with alphabets, no spaces.';
|
|
176
|
-
}
|
|
163
|
+
},
|
|
177
164
|
},
|
|
178
165
|
{
|
|
179
166
|
name: 'componentLabel',
|
|
@@ -181,13 +168,13 @@ export const importComp = async (filePath, fileName, askValidate) => {
|
|
|
181
168
|
when(answers) {
|
|
182
169
|
return answers.proceedAs === 'New name';
|
|
183
170
|
},
|
|
184
|
-
validate: value => {
|
|
171
|
+
validate: (value) => {
|
|
185
172
|
if (value) {
|
|
186
173
|
return true;
|
|
187
174
|
}
|
|
188
175
|
return 'Please provide value for label';
|
|
189
|
-
}
|
|
190
|
-
}
|
|
176
|
+
},
|
|
177
|
+
},
|
|
191
178
|
]);
|
|
192
179
|
|
|
193
180
|
switch (proceedAnswers.proceedAs) {
|
|
@@ -196,11 +183,12 @@ export const importComp = async (filePath, fileName, askValidate) => {
|
|
|
196
183
|
// fs.rmSync(copyDir, { recursive: true, force: true, maxRetries: 2 });
|
|
197
184
|
process.exit();
|
|
198
185
|
break;
|
|
199
|
-
case 'Overwrite':
|
|
186
|
+
case 'Overwrite': {
|
|
200
187
|
// remove existing
|
|
201
188
|
const existingComp = await getComponentDirectoryPath(potentialCompKey);
|
|
202
189
|
fs.rmSync(existingComp, { recursive: true, force: true, maxRetries: 2 });
|
|
203
190
|
break;
|
|
191
|
+
}
|
|
204
192
|
case 'New name':
|
|
205
193
|
newName = proceedAnswers.componentName;
|
|
206
194
|
newLabel = proceedAnswers.componentLabel;
|
|
@@ -222,7 +210,7 @@ export const importComp = async (filePath, fileName, askValidate) => {
|
|
|
222
210
|
newName,
|
|
223
211
|
newLabel,
|
|
224
212
|
configDef.organization,
|
|
225
|
-
null
|
|
213
|
+
null,
|
|
226
214
|
);
|
|
227
215
|
console.log(`\n${chalk.green(`${fileName}`)} has been imported as ${chalk.green(`${newCompKey}`)}\n`);
|
|
228
216
|
|
|
@@ -232,8 +220,8 @@ export const importComp = async (filePath, fileName, askValidate) => {
|
|
|
232
220
|
name: 'doValidate',
|
|
233
221
|
type: 'confirm',
|
|
234
222
|
message: `Validate ${chalk.yellow(`${newCompKey}`)}`,
|
|
235
|
-
default: true
|
|
236
|
-
}
|
|
223
|
+
default: true,
|
|
224
|
+
},
|
|
237
225
|
]);
|
|
238
226
|
|
|
239
227
|
if (validateAnswers.doValidate) {
|
|
@@ -247,20 +235,20 @@ export const importComp = async (filePath, fileName, askValidate) => {
|
|
|
247
235
|
}
|
|
248
236
|
};
|
|
249
237
|
|
|
250
|
-
export const getFolderList = async filePath => {
|
|
238
|
+
export const getFolderList = async (filePath) => {
|
|
251
239
|
addDebugLog('getFolderList', `filePath: ${filePath}`, '');
|
|
252
240
|
if (fs.existsSync(filePath)) {
|
|
253
241
|
return fs
|
|
254
242
|
.readdirSync(filePath, { withFileTypes: true })
|
|
255
|
-
.filter(dirent => dirent.isDirectory() && !dirent.name.startsWith('.'))
|
|
256
|
-
.map(dirent => dirent.name);
|
|
243
|
+
.filter((dirent) => dirent.isDirectory() && !dirent.name.startsWith('.'))
|
|
244
|
+
.map((dirent) => dirent.name);
|
|
257
245
|
} else {
|
|
258
246
|
console.log(chalk.red.bold(`File path: ${filePath} does not exist or no permissions.`));
|
|
259
247
|
process.exit(1);
|
|
260
248
|
}
|
|
261
249
|
};
|
|
262
250
|
|
|
263
|
-
export const hasConfig = dir => {
|
|
251
|
+
export const hasConfig = (dir) => {
|
|
264
252
|
const configPath = join(gFilePath, dir, 'config.json');
|
|
265
253
|
if (fs.existsSync(configPath)) {
|
|
266
254
|
return true;
|
|
@@ -269,7 +257,7 @@ export const hasConfig = dir => {
|
|
|
269
257
|
return false;
|
|
270
258
|
};
|
|
271
259
|
|
|
272
|
-
export const getComponentList = async filePath => {
|
|
260
|
+
export const getComponentList = async (filePath) => {
|
|
273
261
|
addDebugLog('getComponentList', `filePath: ${filePath}`, '');
|
|
274
262
|
let compList = await getFolderList(filePath);
|
|
275
263
|
|
|
@@ -282,7 +270,7 @@ export const getComponentList = async filePath => {
|
|
|
282
270
|
return compList;
|
|
283
271
|
};
|
|
284
272
|
|
|
285
|
-
export default async options => {
|
|
273
|
+
export default async (options) => {
|
|
286
274
|
await showVersion();
|
|
287
275
|
await checkLibraryAndArchives();
|
|
288
276
|
await checkPathAccess(pegaConfigJsonPath);
|
package/src/tasks/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export { default as deleteLibrary } from './delete-lib/index.js';
|
|
|
10
10
|
export { default as deletePublished } from './delete-pub/index.js';
|
|
11
11
|
export { default as deleteVersion } from './delete-version/index.js';
|
|
12
12
|
export { default as initProject } from './init/index.js';
|
|
13
|
+
export { enableAi, disableAi } from './ai-toggle/index.js';
|
|
13
14
|
export { default as promoteWebPack } from './promote-webpack/index.js';
|
|
14
15
|
export { default as publishComponent } from './publish/index.js';
|
|
15
16
|
export { default as publishAllComponents } from './publish-all/index.js';
|
|
@@ -41,3 +42,7 @@ export { default as buildJestAssets } from './build-jest-assets/index.js';
|
|
|
41
42
|
export { default as restoreConfig } from './restore-config/index.js';
|
|
42
43
|
export { default as restore } from './restore/index.js';
|
|
43
44
|
export { default as startDevServer } from './dev-server/index.js';
|
|
45
|
+
export { default as internalTest } from './internal-test/index.js';
|
|
46
|
+
export { default as internalTestFull } from './internal-test-full/index.js';
|
|
47
|
+
export { default as internalTestFunctional } from './internal-test-functional/index.js';
|
|
48
|
+
export { default as internalTestUnit } from './internal-test-unit/index.js';
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
lerna-debug.log*
|
|
8
|
+
|
|
9
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
10
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
11
|
+
|
|
12
|
+
# Runtime data
|
|
13
|
+
pids
|
|
14
|
+
*.pid
|
|
15
|
+
*.seed
|
|
16
|
+
*.pid.lock
|
|
17
|
+
|
|
18
|
+
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
19
|
+
lib-cov
|
|
20
|
+
|
|
21
|
+
# Coverage directory used by tools like istanbul
|
|
22
|
+
coverage
|
|
23
|
+
*.lcov
|
|
24
|
+
|
|
25
|
+
# nyc test coverage
|
|
26
|
+
.nyc_output
|
|
27
|
+
|
|
28
|
+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
29
|
+
.grunt
|
|
30
|
+
|
|
31
|
+
# Bower dependency directory (https://bower.io/)
|
|
32
|
+
bower_components
|
|
33
|
+
|
|
34
|
+
# node-waf configuration
|
|
35
|
+
.lock-wscript
|
|
36
|
+
|
|
37
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
38
|
+
build/Release
|
|
39
|
+
|
|
40
|
+
# Dependency directories
|
|
41
|
+
node_modules/
|
|
42
|
+
jspm_packages/
|
|
43
|
+
|
|
44
|
+
# Snowpack dependency directory (https://snowpack.dev/)
|
|
45
|
+
web_modules/
|
|
46
|
+
|
|
47
|
+
# TypeScript cache
|
|
48
|
+
*.tsbuildinfo
|
|
49
|
+
|
|
50
|
+
# Optional npm cache directory
|
|
51
|
+
.npm
|
|
52
|
+
|
|
53
|
+
# Optional eslint cache
|
|
54
|
+
.eslintcache
|
|
55
|
+
|
|
56
|
+
# Optional stylelint cache
|
|
57
|
+
.stylelintcache
|
|
58
|
+
|
|
59
|
+
# Optional REPL history
|
|
60
|
+
.node_repl_history
|
|
61
|
+
|
|
62
|
+
# Output of 'npm pack'
|
|
63
|
+
*.tgz
|
|
64
|
+
|
|
65
|
+
# Yarn Integrity file
|
|
66
|
+
.yarn-integrity
|
|
67
|
+
|
|
68
|
+
# dotenv environment variable files
|
|
69
|
+
.env
|
|
70
|
+
.env.*
|
|
71
|
+
!.env.example
|
|
72
|
+
|
|
73
|
+
# parcel-bundler cache (https://parceljs.org/)
|
|
74
|
+
.cache
|
|
75
|
+
.parcel-cache
|
|
76
|
+
|
|
77
|
+
# Next.js build output
|
|
78
|
+
.next
|
|
79
|
+
out
|
|
80
|
+
|
|
81
|
+
# Nuxt.js build / generate output
|
|
82
|
+
.nuxt
|
|
83
|
+
dist
|
|
84
|
+
.output
|
|
85
|
+
|
|
86
|
+
# Gatsby files
|
|
87
|
+
.cache/
|
|
88
|
+
# Comment in the public line in if your project uses Gatsby and not Next.js
|
|
89
|
+
# https://nextjs.org/blog/next-9-1#public-directory-support
|
|
90
|
+
# public
|
|
91
|
+
|
|
92
|
+
# vuepress build output
|
|
93
|
+
.vuepress/dist
|
|
94
|
+
|
|
95
|
+
# vuepress v2.x temp directory
|
|
96
|
+
.temp
|
|
97
|
+
|
|
98
|
+
# Sveltekit cache directory
|
|
99
|
+
.svelte-kit/
|
|
100
|
+
|
|
101
|
+
# vitepress build output
|
|
102
|
+
**/.vitepress/dist
|
|
103
|
+
|
|
104
|
+
# vitepress cache directory
|
|
105
|
+
**/.vitepress/cache
|
|
106
|
+
|
|
107
|
+
# Docusaurus cache and generated files
|
|
108
|
+
.docusaurus
|
|
109
|
+
|
|
110
|
+
# Serverless directories
|
|
111
|
+
.serverless/
|
|
112
|
+
|
|
113
|
+
# FuseBox cache
|
|
114
|
+
.fusebox/
|
|
115
|
+
|
|
116
|
+
# DynamoDB Local files
|
|
117
|
+
.dynamodb/
|
|
118
|
+
|
|
119
|
+
# Firebase cache directory
|
|
120
|
+
.firebase/
|
|
121
|
+
|
|
122
|
+
# TernJS port file
|
|
123
|
+
.tern-port
|
|
124
|
+
|
|
125
|
+
# Stores Visual Studio Code versions used for testing Visual Studio Code extensions
|
|
126
|
+
.vscode-test
|
|
127
|
+
|
|
128
|
+
# pnpm
|
|
129
|
+
.pnpm-store
|
|
130
|
+
|
|
131
|
+
# yarn v3
|
|
132
|
+
.pnp.*
|
|
133
|
+
.yarn/*
|
|
134
|
+
!.yarn/patches
|
|
135
|
+
!.yarn/plugins
|
|
136
|
+
!.yarn/releases
|
|
137
|
+
!.yarn/sdks
|
|
138
|
+
!.yarn/versions
|
|
139
|
+
|
|
140
|
+
# Vite files
|
|
141
|
+
vite.config.js.timestamp-*
|
|
142
|
+
vite.config.ts.timestamp-*
|
|
143
|
+
.vite/
|
|
144
|
+
|
|
145
|
+
# Astro generated types
|
|
146
|
+
.astro/
|
|
147
|
+
|
|
148
|
+
# Turbo Repo
|
|
149
|
+
.turbo
|
package/src/tasks/init/helper.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { sanitize, validateSemver } from '../../util.js';
|
|
2
2
|
|
|
3
|
-
export const getInitProjectQuestions = () => {
|
|
3
|
+
export const getInitProjectQuestions = (options = {}) => {
|
|
4
4
|
return [
|
|
5
5
|
{
|
|
6
6
|
name: 'projectName',
|
|
7
7
|
message: 'Enter Project name (required)',
|
|
8
|
-
validate: value => {
|
|
8
|
+
validate: (value) => {
|
|
9
9
|
/* value should not be empty
|
|
10
10
|
It should not have spaces
|
|
11
11
|
It should not start with a number
|
|
@@ -15,12 +15,12 @@ export const getInitProjectQuestions = () => {
|
|
|
15
15
|
return true;
|
|
16
16
|
}
|
|
17
17
|
return 'Only alphanumeric values are allowed, starting with alphabets';
|
|
18
|
-
}
|
|
18
|
+
},
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
name: 'organization',
|
|
22
22
|
message: 'Enter Organization name (required)',
|
|
23
|
-
validate: value => {
|
|
23
|
+
validate: (value) => {
|
|
24
24
|
/* value should not be empty
|
|
25
25
|
It should not have spaces
|
|
26
26
|
It should not start with a number
|
|
@@ -30,7 +30,7 @@ export const getInitProjectQuestions = () => {
|
|
|
30
30
|
return true;
|
|
31
31
|
}
|
|
32
32
|
return 'Only alphanumeric values are allowed, starting with alphabets';
|
|
33
|
-
}
|
|
33
|
+
},
|
|
34
34
|
},
|
|
35
35
|
// {
|
|
36
36
|
// name: 'version',
|
|
@@ -46,7 +46,7 @@ export const getInitProjectQuestions = () => {
|
|
|
46
46
|
{
|
|
47
47
|
name: 'description',
|
|
48
48
|
message: 'Description',
|
|
49
|
-
default: ''
|
|
49
|
+
default: '',
|
|
50
50
|
},
|
|
51
51
|
// {
|
|
52
52
|
// name: 'gitRepositoryUrl',
|
|
@@ -56,7 +56,14 @@ export const getInitProjectQuestions = () => {
|
|
|
56
56
|
{
|
|
57
57
|
name: 'author',
|
|
58
58
|
message: 'Author',
|
|
59
|
-
default: ''
|
|
60
|
-
}
|
|
59
|
+
default: '',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'confirm',
|
|
63
|
+
name: 'includeAi',
|
|
64
|
+
message: 'Enable AI-assisted component development?',
|
|
65
|
+
default: true,
|
|
66
|
+
when: () => !options.noAi,
|
|
67
|
+
},
|
|
61
68
|
];
|
|
62
69
|
};
|