@salesforce/templates 66.1.0 → 66.2.0
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/lib/generators/projectGenerator.d.ts +6 -0
- package/lib/generators/projectGenerator.js +43 -4
- package/lib/generators/projectGenerator.js.map +1 -1
- package/lib/templates/project/react-b2e/.a4drules/README.md +35 -0
- package/lib/templates/project/react-b2e/.a4drules/a4d-webapp-generate.md +27 -0
- package/lib/templates/project/react-b2e/.a4drules/build-validation.md +78 -0
- package/lib/templates/project/react-b2e/.a4drules/code-quality.md +137 -0
- package/lib/templates/project/react-b2e/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md +227 -0
- package/lib/templates/project/react-b2e/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +212 -0
- package/lib/templates/project/react-b2e/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md +185 -0
- package/lib/templates/project/react-b2e/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +205 -0
- package/lib/templates/project/react-b2e/.a4drules/graphql/tools/schemas/shared.graphqls +1150 -0
- package/lib/templates/project/react-b2e/.a4drules/graphql.md +409 -0
- package/lib/templates/project/react-b2e/.a4drules/images.md +13 -0
- package/lib/templates/project/react-b2e/.a4drules/react.md +387 -0
- package/lib/templates/project/react-b2e/.a4drules/react_image_processing.md +45 -0
- package/lib/templates/project/react-b2e/.a4drules/typescript.md +224 -0
- package/lib/templates/project/react-b2e/.a4drules/ui-layout.md +23 -0
- package/lib/templates/project/react-b2e/.a4drules/webapp-nav-and-placeholders.md +33 -0
- package/lib/templates/project/react-b2e/.a4drules/webapp-no-node-e.md +25 -0
- package/lib/templates/project/react-b2e/.a4drules/webapp-ui-first.md +32 -0
- package/lib/templates/project/react-b2e/.a4drules/webapp.md +75 -0
- package/lib/templates/project/react-b2e/.forceignore +15 -0
- package/lib/templates/project/react-b2e/.husky/pre-commit +4 -0
- package/lib/templates/project/react-b2e/.prettierignore +11 -0
- package/lib/templates/project/react-b2e/.prettierrc +17 -0
- package/lib/templates/project/react-b2e/AGENT.md +75 -0
- package/lib/templates/project/react-b2e/CHANGELOG.md +696 -0
- package/lib/templates/project/react-b2e/README.md +18 -0
- package/lib/templates/project/react-b2e/config/project-scratch-def.json +13 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/.graphqlrc.yml +2 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/.prettierignore +9 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/.prettierrc +11 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/appreacttemplateb2e.webapplication-meta.xml +7 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.d.ts +2 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.js +93 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/codegen.yml +94 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/e2e/app.spec.ts +17 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/eslint.config.js +141 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/index.html +13 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/package-lock.json +14392 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/package.json +58 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/playwright.config.ts +24 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/scripts/get-graphql-schema.mjs +68 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/scripts/rewrite-e2e-assets.mjs +23 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/graphql-operations-types.ts +116 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/accounts.ts +33 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/app.tsx +22 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/appLayout.tsx +19 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/book.svg +3 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/copy.svg +4 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/rocket.svg +3 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/star.svg +3 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-1.png +0 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-2.png +0 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-3.png +0 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/vibe-codey.svg +194 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/components/AgentforceConversationClient.tsx +127 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/index.ts +6 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/navigationMenu.tsx +80 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Home.tsx +12 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/NotFound.tsx +18 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/router-utils.tsx +35 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/routes.tsx +22 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/styles/global.css +13 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/src/types/conversation.ts +21 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/tsconfig.json +36 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/tsconfig.node.json +13 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/vite-env.d.ts +1 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/vite.config.ts +102 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/vitest-env.d.ts +2 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/vitest.config.ts +11 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/vitest.setup.ts +1 -0
- package/lib/templates/project/react-b2e/force-app/main/default/webapplications/appreacttemplateb2e/webapplication.json +7 -0
- package/lib/templates/project/react-b2e/jest.config.js +6 -0
- package/lib/templates/project/react-b2e/package.json +38 -0
- package/lib/templates/project/react-b2e/scripts/apex/hello.apex +10 -0
- package/lib/templates/project/react-b2e/scripts/soql/account.soql +6 -0
- package/lib/templates/project/react-b2e/sfdx-project.json +12 -0
- package/lib/templates/project/react-b2x/.a4drules/README.md +35 -0
- package/lib/templates/project/react-b2x/.a4drules/a4d-webapp-generate.md +27 -0
- package/lib/templates/project/react-b2x/.a4drules/build-validation.md +78 -0
- package/lib/templates/project/react-b2x/.a4drules/code-quality.md +137 -0
- package/lib/templates/project/react-b2x/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md +227 -0
- package/lib/templates/project/react-b2x/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +212 -0
- package/lib/templates/project/react-b2x/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md +185 -0
- package/lib/templates/project/react-b2x/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +205 -0
- package/lib/templates/project/react-b2x/.a4drules/graphql/tools/schemas/shared.graphqls +1150 -0
- package/lib/templates/project/react-b2x/.a4drules/graphql.md +409 -0
- package/lib/templates/project/react-b2x/.a4drules/images.md +13 -0
- package/lib/templates/project/react-b2x/.a4drules/react.md +387 -0
- package/lib/templates/project/react-b2x/.a4drules/react_image_processing.md +45 -0
- package/lib/templates/project/react-b2x/.a4drules/typescript.md +224 -0
- package/lib/templates/project/react-b2x/.a4drules/ui-layout.md +23 -0
- package/lib/templates/project/react-b2x/.a4drules/webapp-nav-and-placeholders.md +33 -0
- package/lib/templates/project/react-b2x/.a4drules/webapp-no-node-e.md +25 -0
- package/lib/templates/project/react-b2x/.a4drules/webapp-ui-first.md +32 -0
- package/lib/templates/project/react-b2x/.a4drules/webapp.md +75 -0
- package/lib/templates/project/react-b2x/.forceignore +15 -0
- package/lib/templates/project/react-b2x/.husky/pre-commit +4 -0
- package/lib/templates/project/react-b2x/.prettierignore +11 -0
- package/lib/templates/project/react-b2x/.prettierrc +17 -0
- package/lib/templates/project/react-b2x/AGENT.md +75 -0
- package/lib/templates/project/react-b2x/CHANGELOG.md +696 -0
- package/lib/templates/project/react-b2x/README.md +18 -0
- package/lib/templates/project/react-b2x/config/project-scratch-def.json +13 -0
- package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppAuthUtils.cls +68 -0
- package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppAuthUtils.cls-meta.xml +5 -0
- package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppChangePassword.cls +77 -0
- package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppChangePassword.cls-meta.xml +5 -0
- package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppForgotPassword.cls +71 -0
- package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppForgotPassword.cls-meta.xml +5 -0
- package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppLogin.cls +105 -0
- package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppLogin.cls-meta.xml +5 -0
- package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppRegistration.cls +162 -0
- package/lib/templates/project/react-b2x/force-app/main/default/classes/WebAppRegistration.cls-meta.xml +5 -0
- package/lib/templates/project/react-b2x/force-app/main/default/digitalExperienceConfigs/appreacttemplateb2x1.digitalExperienceConfig +8 -0
- package/lib/templates/project/react-b2x/force-app/main/default/digitalExperiences/site/appreacttemplateb2x1/appreacttemplateb2x1.digitalExperience-meta.xml +11 -0
- package/lib/templates/project/react-b2x/force-app/main/default/digitalExperiences/site/appreacttemplateb2x1/sfdc_cms__site/appreacttemplateb2x1/_meta.json +5 -0
- package/lib/templates/project/react-b2x/force-app/main/default/digitalExperiences/site/appreacttemplateb2x1/sfdc_cms__site/appreacttemplateb2x1/content.json +10 -0
- package/lib/templates/project/react-b2x/force-app/main/default/networks/appreacttemplateb2x.network +60 -0
- package/lib/templates/project/react-b2x/force-app/main/default/package.xml +20 -0
- package/lib/templates/project/react-b2x/force-app/main/default/sites/appreacttemplateb2x.site +31 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/.graphqlrc.yml +2 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/.prettierignore +9 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/.prettierrc +11 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/appreacttemplateb2x.webapplication-meta.xml +7 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/build/vite.config.d.ts +2 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/build/vite.config.js +93 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/codegen.yml +94 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/e2e/app.spec.ts +17 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/eslint.config.js +141 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/index.html +13 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/package-lock.json +18408 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/package.json +66 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/playwright.config.ts +24 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/scripts/get-graphql-schema.mjs +68 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/scripts/rewrite-e2e-assets.mjs +23 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/graphql-operations-types.ts +116 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/utils/accounts.ts +33 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/api/utils/query/highRevenueAccountsQuery.graphql +29 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/app.tsx +13 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/appLayout.tsx +11 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/book.svg +3 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/copy.svg +4 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/rocket.svg +3 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/star.svg +3 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/codey-1.png +0 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/codey-2.png +0 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/codey-3.png +0 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/vibe-codey.svg +194 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/alerts/status-alert.tsx +45 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/authHelpers.ts +73 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/authenticationConfig.ts +61 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/authenticationRouteLayout.tsx +21 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/privateRouteLayout.tsx +36 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/sessionTimeout/SessionTimeoutValidator.tsx +616 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/sessionTimeout/sessionTimeService.ts +161 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/sessionTimeout/sessionTimeoutConfig.ts +77 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/footers/footer-link.tsx +36 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/forms/auth-form.tsx +81 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/forms/submit-button.tsx +49 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/card-layout.tsx +23 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/card-skeleton.tsx +38 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/centered-page-layout.tsx +73 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/alert.tsx +69 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/button.tsx +67 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/card.tsx +92 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/dialog.tsx +143 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/field.tsx +222 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/index.ts +72 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/input.tsx +19 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/label.tsx +19 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/pagination.tsx +112 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/select.tsx +183 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/separator.tsx +26 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/skeleton.tsx +14 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/spinner.tsx +15 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/table.tsx +87 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/tabs.tsx +78 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/components.json +18 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/context/AuthContext.tsx +95 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/hooks/form.tsx +116 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/hooks/useCountdownTimer.ts +266 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/hooks/useRetryWithBackoff.ts +109 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/layouts/AuthAppLayout.tsx +12 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/lib/data-sdk.ts +21 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/lib/utils.ts +6 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/navigationMenu.tsx +80 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/ChangePassword.tsx +107 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/ForgotPassword.tsx +73 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Home.tsx +12 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Login.tsx +97 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/NotFound.tsx +18 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Profile.tsx +178 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Register.tsx +138 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/ResetPassword.tsx +107 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/router-utils.tsx +35 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/routes.tsx +71 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/styles/global.css +135 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/src/utils/helpers.ts +121 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/tsconfig.json +36 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/tsconfig.node.json +13 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/vite-env.d.ts +1 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/vite.config.ts +102 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/vitest-env.d.ts +2 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/vitest.config.ts +11 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/vitest.setup.ts +1 -0
- package/lib/templates/project/react-b2x/force-app/main/default/webapplications/appreacttemplateb2x/webapplication.json +7 -0
- package/lib/templates/project/react-b2x/jest.config.js +6 -0
- package/lib/templates/project/react-b2x/package.json +38 -0
- package/lib/templates/project/react-b2x/scripts/apex/hello.apex +10 -0
- package/lib/templates/project/react-b2x/scripts/soql/account.soql +6 -0
- package/lib/templates/project/react-b2x/sfdx-project.json +12 -0
- package/lib/templates/webapplication/reactbasic/.graphqlrc.yml +2 -0
- package/lib/templates/webapplication/reactbasic/build/vite.config.js +20 -1
- package/lib/templates/webapplication/reactbasic/codegen.yml +94 -0
- package/lib/templates/webapplication/reactbasic/e2e/app.spec.ts +0 -7
- package/lib/templates/webapplication/reactbasic/eslint.config.js +28 -0
- package/lib/templates/webapplication/reactbasic/package-lock.json +10090 -2874
- package/lib/templates/webapplication/reactbasic/package.json +16 -4
- package/lib/templates/webapplication/reactbasic/scripts/get-graphql-schema.mjs +68 -0
- package/lib/templates/webapplication/reactbasic/src/api/graphql-operations-types.ts +23 -34
- package/lib/templates/webapplication/reactbasic/src/api/utils/accounts.ts +33 -0
- package/lib/templates/webapplication/reactbasic/src/app.tsx +10 -1
- package/lib/templates/webapplication/reactbasic/src/appLayout.tsx +2 -0
- package/lib/templates/webapplication/reactbasic/src/navigationMenu.tsx +80 -0
- package/lib/templates/webapplication/reactbasic/src/router-utils.tsx +35 -0
- package/lib/templates/webapplication/reactbasic/src/routes.tsx +1 -7
- package/lib/templates/webapplication/reactbasic/vite.config.ts +20 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/types.d.ts +1 -1
- package/lib/utils/webappTemplateUtils.d.ts +49 -0
- package/lib/utils/webappTemplateUtils.js +210 -0
- package/lib/utils/webappTemplateUtils.js.map +1 -0
- package/package.json +8 -6
- package/lib/templates/webapplication/reactbasic/src/pages/About.tsx +0 -12
package/lib/templates/project/react-b2x/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md
ADDED
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# GraphQL Query Generation Guidelines
|
|
2
|
+
|
|
3
|
+
You are a GraphQL expert, and your role is to help craft GraphQL queries that match Salesforce schema requirements and specificities.
|
|
4
|
+
|
|
5
|
+
This is the main instructions source, and you will leverage the following rules to complete your task:
|
|
6
|
+
- The `LDS_Explore_GraphQLSchema` rule provides Salesforce's static GraphQL schema information
|
|
7
|
+
- The `LDS_Generate_GraphQLReadQuery` rule is specialized in GraphQL read query generation
|
|
8
|
+
- The `LDS_Generate_GraphQLMutationQuery` rule is specialized in GraphQL mutation query generation
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
**CRITICAL ENFORCEMENT RULES:**
|
|
12
|
+
- **Workflow Enforcement** - You **MUST** follow the workflow steps below, in order
|
|
13
|
+
- **Workflow Steps are Mandatory** - All workflow steps are mandatory, none can be skipped
|
|
14
|
+
- **Workflow Steps Chaining** - Steps need to be chained one after the other
|
|
15
|
+
- **Hard Stop on Failed Step** - Any failed step blocks the workflow until remediation actions are completed
|
|
16
|
+
- **Step Status Reporting** - Each step must report final status in a clear and concise way
|
|
17
|
+
- **Common Knowledge** - You **MUST NOT** rely on common Salesforce knowledge related to entities, always ask for introspection data - if not available, **FAIL** the query generation (hard stop)
|
|
18
|
+
- **Never guess** - You **MUST NOT** guess field type, always rely on introspection data (e.g. Owner doesn't mean User, the field might have a different type or be polymorphic)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## STEP 1: General Query Information
|
|
22
|
+
|
|
23
|
+
### Information Workflow
|
|
24
|
+
|
|
25
|
+
1. Identify namespace: one of `uiapi` or `setup`, defaults to `uiapi`
|
|
26
|
+
2. Identify query type: one of `read` or `mutation`, defaults to `read`
|
|
27
|
+
3. Identify desired output
|
|
28
|
+
4. Use the [information report template](#information-report-template) below to report result
|
|
29
|
+
|
|
30
|
+
### Information Report Template
|
|
31
|
+
|
|
32
|
+
You want to build a GraphQL {type} query on entities hosted in the {namespace} namespace.
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## STEP 2: Select Introspection Method
|
|
36
|
+
|
|
37
|
+
**IMPORTANT** - This is an **interactive step**, you **MUST** wait for the user to answer your questions, and you **MUST** pause until they do:
|
|
38
|
+
Ask the user how they want to retrieve the introspection information using the following list:
|
|
39
|
+
1. ***Manually*** - User will execute the queries for you
|
|
40
|
+
2. ***Connect API*** - You will execute introspection queries using the `graphql`Connect API endpoint
|
|
41
|
+
3. ***Salesforce CLI*** - You will execute introspection queries using Salesforce CLI
|
|
42
|
+
|
|
43
|
+
**WAIT** for the user's answer.
|
|
44
|
+
|
|
45
|
+
If user picks option 2, Connect API:
|
|
46
|
+
1. ***Local org details*** - Ask for server url, API version (e.g. 65) and a valid OAuth token, and store these in url, version and token variables
|
|
47
|
+
2. ***Default API Version*** - If no API version is provided, use 66 as the default value
|
|
48
|
+
3. ***Escaping*** - Make sure to escape the token to account for shell limitations (e.g. the `!` character might need to be escaped when using bash)
|
|
49
|
+
**WAIT** for the user's answer.
|
|
50
|
+
|
|
51
|
+
**Report** - Mention the method you will use to retrieve introspection data, one of `Salesforce CLI`, `Connect API` or `user manual request`; if `Connect API`, mention server url `{url}/services/data/v{version}.0/graphql` and token
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
## STEP 3: Entities Identification
|
|
55
|
+
|
|
56
|
+
**CRITICAL** Your goal is to extract and list **entities** involved in the query to generate:
|
|
57
|
+
- **Entity Names** must obey CamelCase convention
|
|
58
|
+
- **Introspection** - If some entity names are not provided and can't be deduced from context, use the [Map Entity Names](#map-entity-names) workflow
|
|
59
|
+
- **Resolution** - If some entity names are resolved by the previous introspection sub step, ask the user for their names
|
|
60
|
+
- Do **NOT** try to resolve exact field names, as this will be completed as part of [STEP 4](#step-4-iterative-entities-introspection)
|
|
61
|
+
- **Report** - Use the [Identification Report Template](#identification-report-template) to report final step status
|
|
62
|
+
|
|
63
|
+
### Map Entity Names
|
|
64
|
+
|
|
65
|
+
**List Accessible Entities** - Get a list of accessible entities using one of the following options, depending on the method selected by [STEP 2](#step-2-select-introspection-method):
|
|
66
|
+
1. If `Salesforce CLI` was selected, use the `sf sobject list --sobject all` command
|
|
67
|
+
2. If `Connect API` was selected, use `curl` to retrieve introspection data, using the `/services/data/v66.0/ui-api/object-info/` endpoint
|
|
68
|
+
3. Otherwise, you **MUST** ask the user to retrieve the list of accessible entities for you, and wait for their answer
|
|
69
|
+
|
|
70
|
+
**Report Status** - Use the [report template](#identification-report-template) to report status
|
|
71
|
+
**HARD STOP** - Evaluate [hard stop rules](#identification-hard-stop-rules)
|
|
72
|
+
|
|
73
|
+
### Identification Hard Stop Rules
|
|
74
|
+
|
|
75
|
+
**Triggering conditions** - ALWAYS
|
|
76
|
+
|
|
77
|
+
If the unknown entity list is not empty:
|
|
78
|
+
- the global step status is `FAILED`
|
|
79
|
+
- stop generation
|
|
80
|
+
- go through [remediation actions](#identification-remediation-actions)
|
|
81
|
+
|
|
82
|
+
### Identification Report Template
|
|
83
|
+
|
|
84
|
+
**Triggering conditions** - ALWAYS
|
|
85
|
+
|
|
86
|
+
List identified entities:
|
|
87
|
+
- `Entity1` (`Field1.1`, `Field1.2`, ...)
|
|
88
|
+
List unknown entities:
|
|
89
|
+
- entity textual name
|
|
90
|
+
|
|
91
|
+
### Identification Remediation Actions
|
|
92
|
+
|
|
93
|
+
**Triggering conditions** - Only if the global status for the step is `FAILED`
|
|
94
|
+
|
|
95
|
+
**Interactive** - Ask the user for clarification on any unknown entities, and restart [STEP 3](#step-3-entities-identification)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## STEP 4: Iterative Entities Introspection
|
|
99
|
+
|
|
100
|
+
**CRITICAL** Your goal is to extract and list entity **fields** involved in the query to generate
|
|
101
|
+
|
|
102
|
+
### Introspection Workflow
|
|
103
|
+
|
|
104
|
+
**Triggering conditions** - ALWAYS
|
|
105
|
+
|
|
106
|
+
Rules:
|
|
107
|
+
1. Start with the list of entities from [STEP 3](#step-3-entities-identification)
|
|
108
|
+
2. **NO ASSUMPTIONS** - You ***MUST*** rely only on introspection data for field name and type
|
|
109
|
+
3. **NO COMMON KNOWLEDGE** - You ***MUST*** rely only on introspection data for field name and type
|
|
110
|
+
4. You **MUST** follow the workflow below until all entities involved in the query to generate are properly described
|
|
111
|
+
|
|
112
|
+
**CRITICAL** - **WORKFLOW** - using the list of unknown entities, ***strictly*** follow the following steps, in order:
|
|
113
|
+
1. **Cleanup** - Remove from the list all entities for which you already retrieved introspection information
|
|
114
|
+
2. **Introspection Phase** - Request introspection data for all unknown entities
|
|
115
|
+
1. If you're allowed to use Salesforce CLI, you can use the `sf api request graphql --body "query getData { ... }"` using the [Introspection GraphQL Query](#introspection-graphql-query) query template to replace the $query variable
|
|
116
|
+
2. If you have valid url, version and token variables, use `curl` to retrieve introspection data, using the [Introspection GraphQL Query](#introspection-graphql-query) query template and proper escaping to avoid shell issues with token characters
|
|
117
|
+
3. If you don't have valid url, version or token info, you **MUST** ask the user to run the query for you using the [Introspection GraphQL Query](#introspection-graphql-query) query template and **WAIT** for them to provide the required data
|
|
118
|
+
4. **HARD STOP** - If you didn't get any introspection data back, **STOP** here, and jump to point 8 below
|
|
119
|
+
3. **Fields Identification** - Using introspection data, retrieve requested field types
|
|
120
|
+
4. **Reference Fields** - Using introspection data, identify reference requested fields (`dataType="REFERENCE"`)
|
|
121
|
+
1. **IMPORTANT** - Two fields with the same name from two different entities might have different types
|
|
122
|
+
2. retrieve possible types using the `referenceToInfos` attribute
|
|
123
|
+
3. **Polymorphic Fields** - Reference fields with more than entry in the `referenceToInfos` attribute are polymorphic
|
|
124
|
+
4. add any unknown entity references to the list of entities to introspect
|
|
125
|
+
5. **Child Relationships** - Using introspection data, identify all requested fields that are child relationships using the `childObjectApiName` attribute
|
|
126
|
+
1. add any unknown types to the list of types to discover
|
|
127
|
+
6. **Secondary Introspection Phase** - If list of types to discover is not empty, resume the process from point 1 above
|
|
128
|
+
7. **Field Type Information** - Retrieve GraphQL detailed type information for all non reference non child relationships requested fields using the `LDS_Explore_GraphQLSchema` rule
|
|
129
|
+
8. **Report** - Use the [Introspection Report Template](#introspection-report-template) to report on retrieved information
|
|
130
|
+
9. **Evaluate** - Evaluate the [Introspection Hard Stop Rules](#introspection-hard-stop-rules)
|
|
131
|
+
|
|
132
|
+
### Introspection Hard Stop Rules
|
|
133
|
+
|
|
134
|
+
**Triggering conditions** - ALWAYS
|
|
135
|
+
|
|
136
|
+
**Critical rule** - If the global status is `FAILED`, **STOP** generation here, and go through [introspection remediation actions](#introspection-remediation-actions)
|
|
137
|
+
|
|
138
|
+
### Introspection Remediation Actions
|
|
139
|
+
|
|
140
|
+
**Triggering conditions** - Only if the global status for the step is `FAILED`
|
|
141
|
+
|
|
142
|
+
**Action** - Ask for clarification on any unknown fields, and resume the [Introspection Workflow](#introspection-workflow).
|
|
143
|
+
|
|
144
|
+
### Introspection Report Template
|
|
145
|
+
|
|
146
|
+
**Critical rule** An entity is ✅ only if it has no unknown fields, otherwise it is ❌
|
|
147
|
+
**Critical rule** If any of the entities is not checked in the report, the global status is `FAILED`
|
|
148
|
+
|
|
149
|
+
Introspection phase:
|
|
150
|
+
{✅|❌} `Entity1`
|
|
151
|
+
- Standard fields: `Field1` (`type`), `Field2` (`type`)...
|
|
152
|
+
- Reference fields: `Field3` (`referenceToInfos` information from introspection)...
|
|
153
|
+
- Child relationships: `Field4` (`childObjectApiName` from introspection)
|
|
154
|
+
- Unknown fields: `Field5`...
|
|
155
|
+
{✅|❌} `Entity2`
|
|
156
|
+
- ...
|
|
157
|
+
Introspection workflow status: {SUCCESS|FAILED}
|
|
158
|
+
|
|
159
|
+
### Introspection GraphQL Query
|
|
160
|
+
|
|
161
|
+
**CRITICAL RULES**
|
|
162
|
+
- When using the request below, proceed with batches of 3 entities max in order to limit the payload size.
|
|
163
|
+
- When introspecting for mutation create queries, add `required` and `createable` to the `fields` field.
|
|
164
|
+
- When introspecting for mutation update queries, add `updateable` to the `fields` field.
|
|
165
|
+
- When introspecting for mutation create or update queries, make sure you query for all fields (no pre-filtering).
|
|
166
|
+
- You don't need introspection for mutation delete queries, as you only need the `Id` field.
|
|
167
|
+
|
|
168
|
+
```graphql
|
|
169
|
+
query getData {
|
|
170
|
+
uiapi {
|
|
171
|
+
objectInfos(apiNames: ["EntityName1", "EntityName2", ...]) {
|
|
172
|
+
ApiName
|
|
173
|
+
childRelationships { childObjectApiName, fieldName, relationshipName }
|
|
174
|
+
fields { ApiName, dataType, relationshipName, referenceToInfos { ApiName } }
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
## STEP 5: Read Query Generation
|
|
182
|
+
|
|
183
|
+
**Triggering conditions**
|
|
184
|
+
1. Only if the [iterative entities introspection](#step-4-iterative-entities-introspection) step global status is `SUCCESS`
|
|
185
|
+
2. Only if the query to generate is a read query
|
|
186
|
+
|
|
187
|
+
Run the `LDS_Generate_GraphQLReadQuery` rule.
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
## STEP 6: Mutation Query Generation
|
|
191
|
+
|
|
192
|
+
**Triggering conditions**
|
|
193
|
+
1. Only if the [iterative entities introspection](#step-4-iterative-entities-introspection) step global status is `SUCCESS`
|
|
194
|
+
2. Only if the query to generate is a mutation query
|
|
195
|
+
|
|
196
|
+
Run the `LDS_Generate_GraphQLMutationQuery` rule.
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
## COMMON WORKFLOW VIOLATIONS TO AVOID
|
|
200
|
+
|
|
201
|
+
- **Bypass Hard Stop Rules** - When a [workflow](#introspection-workflow) step fails to complete, you **MUST** stop here and wait for the remediation action to be completed - **NEVER** attempt to proceed with subsequent rules
|
|
202
|
+
- **Guess Field Name or Type** - You **MUST NOT** try to guess field name or type based on assumptions, only leverage introspection and schema data
|
|
203
|
+
- **Skip Introspection Phase** - **NEVER** bypass introspection phase - only use data from introspection, whether you auto executed the query or asked the user to run it for you
|
|
204
|
+
- **Invalid Type Consistency** - Strong typing must be enforced at all times, and type information must come either from introspection or using the GraphQL schema
|
|
205
|
+
- **Bypass Workflow** - You **MUST** follow strictly steps in the [introspection workflow](#introspection-workflow), **NEVER** try to bypass any step, or continue with subsequent steps if the current one exited with a failed status
|