@salesforce/templates 66.2.0 → 66.3.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/analyticsTemplateGenerator.d.ts +0 -1
- package/lib/generators/analyticsTemplateGenerator.js +0 -3
- package/lib/generators/analyticsTemplateGenerator.js.map +1 -1
- package/lib/generators/apexClassGenerator.d.ts +0 -1
- package/lib/generators/apexClassGenerator.js +0 -3
- package/lib/generators/apexClassGenerator.js.map +1 -1
- package/lib/generators/apexTriggerGenerator.d.ts +0 -1
- package/lib/generators/apexTriggerGenerator.js +0 -3
- package/lib/generators/apexTriggerGenerator.js.map +1 -1
- package/lib/generators/baseGenerator.d.ts +9 -4
- package/lib/generators/baseGenerator.js +35 -44
- package/lib/generators/baseGenerator.js.map +1 -1
- package/lib/generators/lightningAppGenerator.d.ts +0 -1
- package/lib/generators/lightningAppGenerator.js +0 -3
- package/lib/generators/lightningAppGenerator.js.map +1 -1
- package/lib/generators/lightningComponentGenerator.d.ts +0 -1
- package/lib/generators/lightningComponentGenerator.js +0 -3
- package/lib/generators/lightningComponentGenerator.js.map +1 -1
- package/lib/generators/lightningEventGenerator.d.ts +0 -1
- package/lib/generators/lightningEventGenerator.js +0 -3
- package/lib/generators/lightningEventGenerator.js.map +1 -1
- package/lib/generators/lightningInterfaceGenerator.d.ts +0 -1
- package/lib/generators/lightningInterfaceGenerator.js +0 -3
- package/lib/generators/lightningInterfaceGenerator.js.map +1 -1
- package/lib/generators/lightningTestGenerator.d.ts +0 -1
- package/lib/generators/lightningTestGenerator.js +0 -3
- package/lib/generators/lightningTestGenerator.js.map +1 -1
- package/lib/generators/projectGenerator.d.ts +5 -3
- package/lib/generators/projectGenerator.js +29 -29
- package/lib/generators/projectGenerator.js.map +1 -1
- package/lib/generators/staticResourceGenerator.d.ts +0 -1
- package/lib/generators/staticResourceGenerator.js +0 -3
- package/lib/generators/staticResourceGenerator.js.map +1 -1
- package/lib/generators/visualforceComponentGenerator.d.ts +0 -1
- package/lib/generators/visualforceComponentGenerator.js +0 -3
- package/lib/generators/visualforceComponentGenerator.js.map +1 -1
- package/lib/generators/visualforcePageGenerator.d.ts +0 -1
- package/lib/generators/visualforcePageGenerator.js +0 -3
- package/lib/generators/visualforcePageGenerator.js.map +1 -1
- package/lib/generators/webApplicationGenerator.d.ts +0 -1
- package/lib/generators/webApplicationGenerator.js +14 -14
- package/lib/generators/webApplicationGenerator.js.map +1 -1
- package/lib/service/gitRepoUtils.d.ts +3 -1
- package/lib/service/gitRepoUtils.js +3 -2
- package/lib/service/gitRepoUtils.js.map +1 -1
- package/lib/service/templateService.d.ts +5 -3
- package/lib/service/templateService.js +14 -7
- package/lib/service/templateService.js.map +1 -1
- package/lib/utils/constants.d.ts +1 -0
- package/lib/utils/constants.js +5 -1
- package/lib/utils/constants.js.map +1 -1
- package/lib/utils/createUtil.d.ts +3 -2
- package/lib/utils/createUtil.js +10 -5
- package/lib/utils/createUtil.js.map +1 -1
- package/lib/utils/types.d.ts +13 -2
- package/lib/utils/types.js.map +1 -1
- package/lib/utils/webappTemplateUtils.d.ts +7 -2
- package/lib/utils/webappTemplateUtils.js +16 -7
- package/lib/utils/webappTemplateUtils.js.map +1 -1
- package/package.json +1 -1
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/README.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/a4d-webapp-generate.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/build-validation.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/code-quality.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/graphql/tools/schemas/shared.graphqls +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/graphql.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/images.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/react.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/react_image_processing.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/typescript.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/ui-layout.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/webapp-nav-and-placeholders.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/webapp-no-node-e.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/webapp-ui-first.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.a4drules/webapp.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.forceignore +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.husky/pre-commit +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.prettierignore +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/.prettierrc +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/AGENT.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/CHANGELOG.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/README.md +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/config/project-scratch-def.json +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/.graphqlrc.yml +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/.prettierignore +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/.prettierrc +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/appreacttemplateb2e.webapplication-meta.xml +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.d.ts +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/build/vite.config.js +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/codegen.yml +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/e2e/app.spec.ts +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/eslint.config.js +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/index.html +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/package-lock.json +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/package.json +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/playwright.config.ts +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/scripts/get-graphql-schema.mjs +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/scripts/rewrite-e2e-assets.mjs +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/api/graphql-operations-types.ts +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/accounts.ts +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/api/utils/query/highRevenueAccountsQuery.graphql +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/app.tsx +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/appLayout.tsx +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/book.svg +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/copy.svg +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/rocket.svg +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/icons/star.svg +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-1.png +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-2.png +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/codey-3.png +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/assets/images/vibe-codey.svg +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/components/AgentforceConversationClient.tsx +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/index.ts +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/navigationMenu.tsx +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/Home.tsx +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/pages/NotFound.tsx +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/router-utils.tsx +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/routes.tsx +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/styles/global.css +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/src/types/conversation.ts +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/tsconfig.json +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/tsconfig.node.json +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/vite-env.d.ts +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/vite.config.ts +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/vitest-env.d.ts +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/vitest.config.ts +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/vitest.setup.ts +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/force-app/main/default/webapplications/appreacttemplateb2e/webapplication.json +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/jest.config.js +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/package.json +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/scripts/apex/hello.apex +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/scripts/soql/account.soql +0 -0
- /package/lib/templates/project/{react-b2e → reactb2e}/sfdx-project.json +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/README.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/a4d-webapp-generate.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/build-validation.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/code-quality.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/graphql/tools/knowledge/lds-explore-graphql-schema.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/graphql/tools/knowledge/lds-generate-graphql-mutationquery.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/graphql/tools/knowledge/lds-generate-graphql-readquery.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/graphql/tools/knowledge/lds-guide-graphql.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/graphql/tools/schemas/shared.graphqls +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/graphql.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/images.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/react.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/react_image_processing.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/typescript.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/ui-layout.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/webapp-nav-and-placeholders.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/webapp-no-node-e.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/webapp-ui-first.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.a4drules/webapp.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.forceignore +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.husky/pre-commit +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.prettierignore +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/.prettierrc +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/AGENT.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/CHANGELOG.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/README.md +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/config/project-scratch-def.json +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/classes/WebAppAuthUtils.cls +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/classes/WebAppAuthUtils.cls-meta.xml +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/classes/WebAppChangePassword.cls +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/classes/WebAppChangePassword.cls-meta.xml +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/classes/WebAppForgotPassword.cls +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/classes/WebAppForgotPassword.cls-meta.xml +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/classes/WebAppLogin.cls +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/classes/WebAppLogin.cls-meta.xml +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/classes/WebAppRegistration.cls +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/classes/WebAppRegistration.cls-meta.xml +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/digitalExperienceConfigs/appreacttemplateb2x1.digitalExperienceConfig +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/digitalExperiences/site/appreacttemplateb2x1/appreacttemplateb2x1.digitalExperience-meta.xml +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/digitalExperiences/site/appreacttemplateb2x1/sfdc_cms__site/appreacttemplateb2x1/_meta.json +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/digitalExperiences/site/appreacttemplateb2x1/sfdc_cms__site/appreacttemplateb2x1/content.json +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/networks/appreacttemplateb2x.network +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/package.xml +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/sites/appreacttemplateb2x.site +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/.graphqlrc.yml +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/.prettierignore +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/.prettierrc +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/appreacttemplateb2x.webapplication-meta.xml +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/build/vite.config.d.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/build/vite.config.js +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/codegen.yml +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/e2e/app.spec.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/eslint.config.js +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/index.html +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/package-lock.json +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/package.json +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/playwright.config.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/scripts/get-graphql-schema.mjs +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/scripts/rewrite-e2e-assets.mjs +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/api/graphql-operations-types.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/api/utils/accounts.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/api/utils/query/highRevenueAccountsQuery.graphql +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/app.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/appLayout.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/book.svg +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/copy.svg +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/rocket.svg +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/icons/star.svg +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/codey-1.png +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/codey-2.png +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/codey-3.png +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/assets/images/vibe-codey.svg +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/alerts/status-alert.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/authHelpers.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/authenticationConfig.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/authenticationRouteLayout.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/privateRouteLayout.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/sessionTimeout/SessionTimeoutValidator.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/sessionTimeout/sessionTimeService.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/auth/sessionTimeout/sessionTimeoutConfig.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/footers/footer-link.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/forms/auth-form.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/forms/submit-button.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/card-layout.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/card-skeleton.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/layout/centered-page-layout.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/alert.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/button.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/card.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/dialog.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/field.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/index.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/input.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/label.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/pagination.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/select.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/separator.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/skeleton.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/spinner.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/table.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components/ui/tabs.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/components.json +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/context/AuthContext.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/hooks/form.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/hooks/useCountdownTimer.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/hooks/useRetryWithBackoff.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/layouts/AuthAppLayout.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/lib/data-sdk.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/lib/utils.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/navigationMenu.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/ChangePassword.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/ForgotPassword.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Home.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Login.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/NotFound.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Profile.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/Register.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/pages/ResetPassword.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/router-utils.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/routes.tsx +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/styles/global.css +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/src/utils/helpers.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/tsconfig.json +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/tsconfig.node.json +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/vite-env.d.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/vite.config.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/vitest-env.d.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/vitest.config.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/vitest.setup.ts +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/force-app/main/default/webapplications/appreacttemplateb2x/webapplication.json +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/jest.config.js +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/package.json +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/scripts/apex/hello.apex +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/scripts/soql/account.soql +0 -0
- /package/lib/templates/project/{react-b2x → reactb2x}/sfdx-project.json +0 -0
|
@@ -7,8 +7,6 @@ const tslib_1 = require("tslib");
|
|
|
7
7
|
* Licensed under the BSD 3-Clause license.
|
|
8
8
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
9
|
*/
|
|
10
|
-
const fs = require("fs");
|
|
11
|
-
const promises_1 = require("node:fs/promises");
|
|
12
10
|
const path = require("path");
|
|
13
11
|
const utils_1 = require("../utils");
|
|
14
12
|
const webappTemplateUtils_1 = require("../utils/webappTemplateUtils");
|
|
@@ -17,8 +15,8 @@ const VALID_PROJECT_TEMPLATES = [
|
|
|
17
15
|
'standard',
|
|
18
16
|
'empty',
|
|
19
17
|
'analytics',
|
|
20
|
-
'
|
|
21
|
-
'
|
|
18
|
+
'reactb2e',
|
|
19
|
+
'reactb2x',
|
|
22
20
|
];
|
|
23
21
|
const GITIGNORE = 'gitignore';
|
|
24
22
|
const HUSKY_FOLDER = '.husky';
|
|
@@ -49,30 +47,30 @@ const filestocopy = [
|
|
|
49
47
|
const emptyfolderarray = ['aura', 'lwc'];
|
|
50
48
|
const analyticsfolderarray = ['aura', 'classes', 'lwc', 'waveTemplates'];
|
|
51
49
|
const analyticsVscodeExt = 'salesforce.analyticsdx-vscode';
|
|
52
|
-
function extendJSON(filepath, replacer) {
|
|
53
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
54
|
-
const originalContent = JSON.parse(yield (0, promises_1.readFile)(filepath, 'utf8').catch(() => '{}'));
|
|
55
|
-
const newContent = JSON.stringify(originalContent, replacer, 2);
|
|
56
|
-
yield (0, promises_1.writeFile)(filepath, newContent);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
50
|
class ProjectGenerator extends baseGenerator_1.BaseGenerator {
|
|
60
|
-
constructor(options) {
|
|
61
|
-
super(options);
|
|
51
|
+
constructor(options, context, cwd) {
|
|
52
|
+
super(options, context, cwd);
|
|
62
53
|
this.sourceRootWithPartialPath('project');
|
|
63
54
|
}
|
|
55
|
+
extendJSON(filepath, replacer) {
|
|
56
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const originalContent = JSON.parse(yield this._fs.promises.readFile(filepath, 'utf8').catch(() => '{}'));
|
|
58
|
+
const newContent = JSON.stringify(originalContent, replacer, 2);
|
|
59
|
+
yield this._fs.promises.writeFile(filepath, newContent);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
64
62
|
/**
|
|
65
63
|
* Returns template path for primary; if it doesn't exist, returns fallback path.
|
|
66
|
-
* Used so
|
|
64
|
+
* Used so reactb2e/reactb2x can omit shared files and fall back to standard.
|
|
67
65
|
*/
|
|
68
66
|
templatePathWithFallback(primary, fallback) {
|
|
69
67
|
const primaryPath = this.templatePath(primary);
|
|
70
|
-
return
|
|
68
|
+
return this._fs.existsSync(primaryPath)
|
|
71
69
|
? primaryPath
|
|
72
70
|
: this.templatePath(fallback);
|
|
73
71
|
}
|
|
74
72
|
validateOptions() {
|
|
75
|
-
utils_1.CreateUtil.checkInputs(this.options.
|
|
73
|
+
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
76
74
|
if (!VALID_PROJECT_TEMPLATES.includes(this.options.template)) {
|
|
77
75
|
throw new Error(`Invalid project template: ${this.options.template}. Valid options: ${VALID_PROJECT_TEMPLATES.join(', ')}`);
|
|
78
76
|
}
|
|
@@ -106,7 +104,7 @@ class ProjectGenerator extends baseGenerator_1.BaseGenerator {
|
|
|
106
104
|
yield this.render(this.templatePathWithFallback(manifestFile, 'standard/Manifest.xml'), this.destinationPath(path.join(this.outputdir, projectname, 'manifest', 'package.xml')), { apiversion: this.apiversion });
|
|
107
105
|
}
|
|
108
106
|
if (template === 'standard') {
|
|
109
|
-
yield makeEmptyFolders(folderlayout, standardfolderarray);
|
|
107
|
+
yield this.makeEmptyFolders(folderlayout, standardfolderarray);
|
|
110
108
|
// Add Husky directory and hooks
|
|
111
109
|
this._createHuskyConfig(path.join(this.outputdir, projectname));
|
|
112
110
|
// VSCode config files
|
|
@@ -126,11 +124,11 @@ class ProjectGenerator extends baseGenerator_1.BaseGenerator {
|
|
|
126
124
|
}
|
|
127
125
|
}
|
|
128
126
|
if (template === 'empty') {
|
|
129
|
-
yield makeEmptyFolders(folderlayout, emptyfolderarray);
|
|
127
|
+
yield this.makeEmptyFolders(folderlayout, emptyfolderarray);
|
|
130
128
|
yield this.render(this.templatePath('.forceignore'), this.destinationPath(path.join(this.outputdir, projectname, '.forceignore')), {});
|
|
131
129
|
}
|
|
132
130
|
if (template === 'analytics') {
|
|
133
|
-
yield makeEmptyFolders(folderlayout, analyticsfolderarray);
|
|
131
|
+
yield this.makeEmptyFolders(folderlayout, analyticsfolderarray);
|
|
134
132
|
// Add Husky directory and hooks
|
|
135
133
|
this._createHuskyConfig(path.join(this.outputdir, projectname));
|
|
136
134
|
// VSCode config files
|
|
@@ -138,7 +136,7 @@ class ProjectGenerator extends baseGenerator_1.BaseGenerator {
|
|
|
138
136
|
yield this.render(this.templatePath(`${file}.json`), this.destinationPath(path.join(this.outputdir, projectname, '.vscode', `${file}.json`)), {});
|
|
139
137
|
}
|
|
140
138
|
// add the analytics vscode extension to the recommendations
|
|
141
|
-
yield extendJSON(path.join(this.outputdir, projectname, '.vscode', 'extensions.json'), (key, value) => {
|
|
139
|
+
yield this.extendJSON(path.join(this.outputdir, projectname, '.vscode', 'extensions.json'), (key, value) => {
|
|
142
140
|
if (key === 'recommendations' &&
|
|
143
141
|
Array.isArray(value) &&
|
|
144
142
|
!value.some((n) => n === analyticsVscodeExt)) {
|
|
@@ -175,21 +173,23 @@ class ProjectGenerator extends baseGenerator_1.BaseGenerator {
|
|
|
175
173
|
_createHuskyConfig(projectRootDir) {
|
|
176
174
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
177
175
|
const huskyDirPath = path.join(projectRootDir, HUSKY_FOLDER);
|
|
178
|
-
if (!
|
|
179
|
-
|
|
176
|
+
if (!this._fs.existsSync(huskyDirPath)) {
|
|
177
|
+
this._fs.mkdirSync(huskyDirPath);
|
|
180
178
|
}
|
|
181
179
|
for (const file of huskyhookarray) {
|
|
182
180
|
yield this.render(this.templatePath(path.join(HUSKY_FOLDER, file)), this.destinationPath(path.join(huskyDirPath, file)), {});
|
|
183
181
|
}
|
|
184
182
|
});
|
|
185
183
|
}
|
|
184
|
+
makeEmptyFolders(toplevelfolders, metadatafolders) {
|
|
185
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
186
|
+
for (const folder of metadatafolders) {
|
|
187
|
+
yield this._fs.promises.mkdir(path.join(...toplevelfolders, folder), {
|
|
188
|
+
recursive: true,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
}
|
|
186
193
|
}
|
|
187
194
|
exports.default = ProjectGenerator;
|
|
188
|
-
function makeEmptyFolders(toplevelfolders, metadatafolders) {
|
|
189
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
190
|
-
for (const folder of metadatafolders) {
|
|
191
|
-
yield (0, promises_1.mkdir)(path.join(...toplevelfolders, folder), { recursive: true });
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
195
|
//# sourceMappingURL=projectGenerator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projectGenerator.js","sourceRoot":"","sources":["../../src/generators/projectGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"projectGenerator.js","sourceRoot":"","sources":["../../src/generators/projectGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;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AAC,EAChD,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,EACnD,EAAE,CACH,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;IAEa,gBAAgB,CAC5B,eAAyB,EACzB,eAAyB;;YAEzB,KAAK,MAAM,MAAM,IAAI,eAAe,EAAE,CAAC;gBACrC,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,eAAe,EAAE,MAAM,CAAC,EAAE;oBACnE,SAAS,EAAE,IAAI;iBAChB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KAAA;CACF;AA5RD,mCA4RC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { StaticResourceOptions } from '../utils/types';
|
|
2
2
|
import { BaseGenerator } from './baseGenerator';
|
|
3
3
|
export default class StaticResourceGenerator extends BaseGenerator<StaticResourceOptions> {
|
|
4
|
-
constructor(options: StaticResourceOptions);
|
|
5
4
|
validateOptions(): void;
|
|
6
5
|
generate(): Promise<void>;
|
|
7
6
|
}
|
|
@@ -14,9 +14,6 @@ const utils_1 = require("../utils");
|
|
|
14
14
|
const baseGenerator_1 = require("./baseGenerator");
|
|
15
15
|
const EXTENSION_TEMPLATES = ['js', 'css', 'json', 'txt'];
|
|
16
16
|
class StaticResourceGenerator extends baseGenerator_1.BaseGenerator {
|
|
17
|
-
constructor(options) {
|
|
18
|
-
super(options);
|
|
19
|
-
}
|
|
20
17
|
validateOptions() {
|
|
21
18
|
utils_1.CreateUtil.checkInputs(this.options.resourcename);
|
|
22
19
|
if (!(0, mime_types_1.extension)(this.options.contenttype.toLowerCase())) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staticResourceGenerator.js","sourceRoot":"","sources":["../../src/generators/staticResourceGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,2CAAuC;AACvC,6BAA6B;AAC7B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,GAAG,YAAY,IAAI,GAAG,EAAE,CAAC,CACpD,EACD,EAAE,CACH,CAAC;YACJ,CAAC;iBAAM,IAAI,GAAG,KAAK,KAAK,EAAE,CAAC;gBACzB,oDAAoD;gBACpD,MAAM,IAAI,CAAC,MAAM,CACf,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,EAC7B,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,UAAU,CAAC,CACpD,EACD,EAAE,CACH,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACN,0DAA0D;gBAC1D,MAAM,IAAI,CAAC,MAAM,CACf,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,EACnC,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,YAAY,WAAW,CAAC,CACtD,EACD,EAAE,CACH,CAAC;YACJ,CAAC;YAED,MAAM,IAAI,CAAC,MAAM,CACf,IAAI,CAAC,YAAY,CAAC,mCAAmC,CAAC,EACtD,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,YAAY,oBAAoB,CAAC,CAC/D,EACD;gBACE,WAAW,EAAE,WAAW;aACzB,CACF,CAAC;QACJ,CAAC;KAAA;CACF;AAtDD,0CAsDC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { VisualforceComponentOptions } from '../utils/types';
|
|
2
2
|
import { BaseGenerator } from './baseGenerator';
|
|
3
3
|
export default class VisualforceComponentGenerator extends BaseGenerator<VisualforceComponentOptions> {
|
|
4
|
-
constructor(options: VisualforceComponentOptions);
|
|
5
4
|
validateOptions(): void;
|
|
6
5
|
generate(): Promise<void>;
|
|
7
6
|
}
|
|
@@ -11,9 +11,6 @@ const path = require("path");
|
|
|
11
11
|
const utils_1 = require("../utils");
|
|
12
12
|
const baseGenerator_1 = require("./baseGenerator");
|
|
13
13
|
class VisualforceComponentGenerator extends baseGenerator_1.BaseGenerator {
|
|
14
|
-
constructor(options) {
|
|
15
|
-
super(options);
|
|
16
|
-
}
|
|
17
14
|
validateOptions() {
|
|
18
15
|
utils_1.CreateUtil.checkInputs(this.options.componentname);
|
|
19
16
|
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualforceComponentGenerator.js","sourceRoot":"","sources":["../../src/generators/visualforceComponentGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,6BAA8B,SAAQ,6BAA0C;
|
|
1
|
+
{"version":3,"file":"visualforceComponentGenerator.js","sourceRoot":"","sources":["../../src/generators/visualforceComponentGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,6BAA8B,SAAQ,6BAA0C;IAC5F,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACnD,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAEY,QAAQ;;YACnB,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;YACxD,IAAI,CAAC,yBAAyB,CAAC,sBAAsB,CAAC,CAAC;YAEvD,MAAM,IAAI,CAAC,MAAM,CACf,IAAI,CAAC,YAAY,CAAC,GAAG,QAAQ,YAAY,CAAC,EAC1C,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,aAAa,YAAY,CAAC,CACxD,EACD,EAAE,CACH;gBACC,MAAM,IAAI,CAAC,MAAM,CACf,IAAI,CAAC,YAAY,CAAC,+BAA+B,CAAC,EAClD,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,aAAa,qBAAqB,CAAC,CACjE,EACD,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAChD,CAAC;QACN,CAAC;KAAA;CACF;AAzBD,gDAyBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { VisualforcePageOptions } from '../utils/types';
|
|
2
2
|
import { BaseGenerator } from './baseGenerator';
|
|
3
3
|
export default class VisualforcePageGenerator extends BaseGenerator<VisualforcePageOptions> {
|
|
4
|
-
constructor(options: VisualforcePageOptions);
|
|
5
4
|
validateOptions(): void;
|
|
6
5
|
generate(): Promise<void>;
|
|
7
6
|
}
|
|
@@ -11,9 +11,6 @@ const path = require("path");
|
|
|
11
11
|
const utils_1 = require("../utils");
|
|
12
12
|
const baseGenerator_1 = require("./baseGenerator");
|
|
13
13
|
class VisualforcePageGenerator extends baseGenerator_1.BaseGenerator {
|
|
14
|
-
constructor(options) {
|
|
15
|
-
super(options);
|
|
16
|
-
}
|
|
17
14
|
validateOptions() {
|
|
18
15
|
utils_1.CreateUtil.checkInputs(this.options.pagename);
|
|
19
16
|
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visualforcePageGenerator.js","sourceRoot":"","sources":["../../src/generators/visualforcePageGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,wBAAyB,SAAQ,6BAAqC;
|
|
1
|
+
{"version":3,"file":"visualforcePageGenerator.js","sourceRoot":"","sources":["../../src/generators/visualforcePageGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,wBAAyB,SAAQ,6BAAqC;IAClF,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9C,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAChD,CAAC;IAEY,QAAQ;;YACnB,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;YACnD,IAAI,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,CAAC;YAElD,MAAM,IAAI,CAAC,MAAM,CACf,IAAI,CAAC,YAAY,CAAC,GAAG,QAAQ,OAAO,CAAC,EACrC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,QAAQ,OAAO,CAAC,CAAC,EACnE,EAAE,CACH,CAAC;YACF,MAAM,IAAI,CAAC,MAAM,CACf,IAAI,CAAC,YAAY,CAAC,qBAAqB,CAAC,EACxC,IAAI,CAAC,eAAe,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,QAAQ,gBAAgB,CAAC,CACvD,EACD,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAChD,CAAC;QACJ,CAAC;KAAA;CACF;AAvBD,2CAuBC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { WebApplicationOptions } from '../utils/types';
|
|
2
2
|
import { BaseGenerator } from './baseGenerator';
|
|
3
3
|
export default class WebApplicationGenerator extends BaseGenerator<WebApplicationOptions> {
|
|
4
|
-
constructor(options: WebApplicationOptions);
|
|
5
4
|
validateOptions(): void;
|
|
6
5
|
generate(): Promise<void>;
|
|
7
6
|
private generateDefault;
|
|
@@ -8,21 +8,19 @@ const tslib_1 = require("tslib");
|
|
|
8
8
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
9
|
*/
|
|
10
10
|
const kit_1 = require("@salesforce/kit");
|
|
11
|
-
const fs = require("fs");
|
|
12
11
|
const path = require("path");
|
|
13
|
-
const promises_1 = require("node:fs/promises");
|
|
14
12
|
const utils_1 = require("../utils");
|
|
15
13
|
const baseGenerator_1 = require("./baseGenerator");
|
|
16
14
|
class WebApplicationGenerator extends baseGenerator_1.BaseGenerator {
|
|
17
|
-
constructor(options) {
|
|
18
|
-
super(options);
|
|
19
|
-
}
|
|
20
15
|
validateOptions() {
|
|
21
16
|
utils_1.CreateUtil.checkInputs(this.options.webappname);
|
|
22
17
|
utils_1.CreateUtil.checkInputs(this.options.template);
|
|
23
18
|
// Ensure output directory includes 'webapplications' folder
|
|
24
19
|
if (!this.options.internal) {
|
|
25
|
-
const fileparts = path
|
|
20
|
+
const fileparts = path
|
|
21
|
+
.resolve(this.outputdir)
|
|
22
|
+
.split(path.sep)
|
|
23
|
+
.filter(Boolean);
|
|
26
24
|
const endsWithWebApplications = fileparts[fileparts.length - 1] === 'webapplications';
|
|
27
25
|
if (!endsWithWebApplications) {
|
|
28
26
|
this.outputdir = path.join(this.outputdir, 'webapplications');
|
|
@@ -63,11 +61,11 @@ class WebApplicationGenerator extends baseGenerator_1.BaseGenerator {
|
|
|
63
61
|
}
|
|
64
62
|
copyDirectoryRecursive(sourceDir_1, destDir_1) {
|
|
65
63
|
return tslib_1.__awaiter(this, arguments, void 0, function* (sourceDir, destDir, excludeFiles = new Set()) {
|
|
66
|
-
if (!
|
|
64
|
+
if (!this._fs.existsSync(sourceDir)) {
|
|
67
65
|
return;
|
|
68
66
|
}
|
|
69
|
-
yield
|
|
70
|
-
const entries =
|
|
67
|
+
yield this._fs.promises.mkdir(destDir, { recursive: true });
|
|
68
|
+
const entries = this._fs.readdirSync(sourceDir, { withFileTypes: true });
|
|
71
69
|
for (const entry of entries) {
|
|
72
70
|
const sourcePath = path.join(sourceDir, entry.name);
|
|
73
71
|
const destPath = path.join(destDir, entry.name);
|
|
@@ -78,13 +76,15 @@ class WebApplicationGenerator extends baseGenerator_1.BaseGenerator {
|
|
|
78
76
|
if (entry.isDirectory()) {
|
|
79
77
|
yield this.copyDirectoryRecursive(sourcePath, destPath, excludeFiles);
|
|
80
78
|
}
|
|
81
|
-
else if (!
|
|
79
|
+
else if (!this._fs.existsSync(destPath)) {
|
|
82
80
|
// Copy file and track it
|
|
83
|
-
const content = yield
|
|
84
|
-
yield
|
|
85
|
-
|
|
81
|
+
const content = yield this._fs.promises.readFile(sourcePath);
|
|
82
|
+
yield this._fs.promises.mkdir(path.dirname(destPath), {
|
|
83
|
+
recursive: true,
|
|
84
|
+
});
|
|
85
|
+
yield this._fs.promises.writeFile(destPath, content);
|
|
86
86
|
// Register the created file
|
|
87
|
-
const relativePath = path.relative(
|
|
87
|
+
const relativePath = path.relative(this._cwd, destPath);
|
|
88
88
|
this.changes.created.push(relativePath);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webApplicationGenerator.js","sourceRoot":"","sources":["../../src/generators/webApplicationGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"webApplicationGenerator.js","sourceRoot":"","sources":["../../src/generators/webApplicationGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAuD;AACvD,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,uBAAwB,SAAQ,6BAAoC;IAChF,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAChD,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE9C,4DAA4D;QAC5D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;YAC3B,MAAM,SAAS,GAAG,IAAI;iBACnB,OAAO,CAAC,I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AAC;oBAEnE,4BAA4B;oBAC5B,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;oBACxD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBAC1C,CAAC;YACH,CAAC;QACH,CAAC;KAAA;CACF;AA7HD,0CA6HC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as nodeFs from 'fs';
|
|
1
2
|
interface RepoInfo {
|
|
2
3
|
username: string;
|
|
3
4
|
name: string;
|
|
@@ -23,7 +24,8 @@ export declare function getStoragePathForCustomTemplates(repoUri: URL): string;
|
|
|
23
24
|
* Load custom templates Git repo. Currently only supports GitHub.
|
|
24
25
|
* @param repoUri repo uri
|
|
25
26
|
* @param forceLoadingRemoteRepo by default do not reload remote repo if the repo is already downloaded
|
|
27
|
+
* @param fs node-fs-compatible object, defaults to node:fs
|
|
26
28
|
* @returns path to the local storage location of the repo
|
|
27
29
|
*/
|
|
28
|
-
export declare function loadCustomTemplatesGitRepo(repoUri: URL, forceLoadingRemoteRepo?: boolean): Promise<string>;
|
|
30
|
+
export declare function loadCustomTemplatesGitRepo(repoUri: URL, forceLoadingRemoteRepo?: boolean, fs?: typeof nodeFs): Promise<string>;
|
|
29
31
|
export {};
|
|
@@ -15,7 +15,7 @@ const tslib_1 = require("tslib");
|
|
|
15
15
|
* See https://github.com/vercel/next.js for more information
|
|
16
16
|
*/
|
|
17
17
|
const crypto = require("crypto");
|
|
18
|
-
const
|
|
18
|
+
const nodeFs = require("fs");
|
|
19
19
|
const got_1 = require("got");
|
|
20
20
|
const path = require("path");
|
|
21
21
|
const tar_1 = require("tar");
|
|
@@ -88,10 +88,11 @@ function getStoragePathForCustomTemplates(repoUri) {
|
|
|
88
88
|
* Load custom templates Git repo. Currently only supports GitHub.
|
|
89
89
|
* @param repoUri repo uri
|
|
90
90
|
* @param forceLoadingRemoteRepo by default do not reload remote repo if the repo is already downloaded
|
|
91
|
+
* @param fs node-fs-compatible object, defaults to node:fs
|
|
91
92
|
* @returns path to the local storage location of the repo
|
|
92
93
|
*/
|
|
93
94
|
function loadCustomTemplatesGitRepo(repoUri_1) {
|
|
94
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* (repoUri, forceLoadingRemoteRepo = false) {
|
|
95
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (repoUri, forceLoadingRemoteRepo = false, fs = nodeFs) {
|
|
95
96
|
const customTemplatesPath = getStoragePathForCustomTemplates(repoUri);
|
|
96
97
|
// Do not load the remote repo if already the repo is already downloaded.
|
|
97
98
|
if (fs.existsSync(customTemplatesPath) && !forceLoadingRemoteRepo) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitRepoUtils.js","sourceRoot":"","sources":["../../src/service/gitRepoUtils.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B;;;gGAGgG;;AA8BhG,kBAEC;AAMD,kCAyCC;AAOD,4EAQC;
|
|
1
|
+
{"version":3,"file":"gitRepoUtils.js","sourceRoot":"","sources":["../../src/service/gitRepoUtils.ts"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B;;;gGAGgG;;AA8BhG,kBAEC;AAMD,kCAyCC;AAOD,4EAQC;AASD,gEAkDC;;AAvJD;;;GAGG;AAEH,iCAAiC;AACjC,6BAA6B;AAC7B,6BAAsB;AACtB,6BAA6B;AAC7B,6BAA8B;AAC9B,8BAA8B;AAE9B,kCAA8B;AAC9B,qCAA0C;AAC1C,mDAAgD;AAShD,MAAM,iBAAiB,GAAG,OAAO,CAAC;AAElC;;GAEG;AACH,SAAgB,GAAG;IACjB,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;AACpD,CAAC;AAED;;;GAGG;AACH,SAAsB,WAAW,CAAC,OAAY;;QAC5C,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAA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AAC,CAChE,CAAC;QACJ,CAAC;QAED,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,CAAC;QAExE,MAAM,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,mBAAmB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAElE,gEAAgE;QAChE,MAAM,QAAQ,GAAG,MAAM,IAAA,aAAG,EACxB,+BAA+B,QAAQ,IAAI,IAAI,WAAW,MAAM,EAAE,CACnE,CAAC;QAEF,0CAA0C;QAC1C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;QAC/D,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;QAExE,IAAI,CAAC;YACH,MAAM,IAAA,aAAO,EAAC;gBACZ,GAAG,EAAE,mBAAmB;gBACxB,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;gBACpD,IAAI,EAAE,QAAQ;aACf,CAAC,CAAC;QACL,CAAC;gBAAS,CAAC;YACT,8BAA8B;YAC9B,MAAM,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACrD,CAAC;QAED,OAAO,mBAAmB,CAAC;IAC7B,CAAC;CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CreateOutput, GeneratorClass, TemplateOptions, TemplateType } from '../utils/types';
|
|
1
|
+
import { type CreateOutput, type GeneratorClass, type GeneratorContext, type TemplateOptions, TemplateType } from '../utils/types';
|
|
2
2
|
export declare function importGenerator<TOptions extends TemplateOptions>(templateType: TemplateType): GeneratorClass<TOptions>;
|
|
3
3
|
/**
|
|
4
4
|
* Template Service
|
|
@@ -6,12 +6,14 @@ export declare function importGenerator<TOptions extends TemplateOptions>(templa
|
|
|
6
6
|
export declare class TemplateService {
|
|
7
7
|
private static instance;
|
|
8
8
|
private _cwd;
|
|
9
|
-
|
|
9
|
+
private _context;
|
|
10
|
+
constructor(cwd?: string, context?: GeneratorContext);
|
|
10
11
|
/**
|
|
11
12
|
* Get an instance of TemplateService
|
|
12
13
|
* @param cwd cwd of current environment. CLI: don't need to set explicitly. VS Code: it's typically the root workspace path
|
|
14
|
+
* @param context optional generator context with fs and templatesRootPath
|
|
13
15
|
*/
|
|
14
|
-
static getInstance(cwd?: string): TemplateService;
|
|
16
|
+
static getInstance(cwd?: string, context?: GeneratorContext): TemplateService;
|
|
15
17
|
/**
|
|
16
18
|
* Getting cwd of current environment
|
|
17
19
|
*/
|
|
@@ -21,19 +21,26 @@ function importGenerator(templateType) {
|
|
|
21
21
|
* Template Service
|
|
22
22
|
*/
|
|
23
23
|
class TemplateService {
|
|
24
|
-
constructor(cwd
|
|
25
|
-
this._cwd = cwd;
|
|
24
|
+
constructor(cwd, context) {
|
|
25
|
+
this._cwd = cwd !== null && cwd !== void 0 ? cwd : process.cwd();
|
|
26
|
+
this._context = context;
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* Get an instance of TemplateService
|
|
29
30
|
* @param cwd cwd of current environment. CLI: don't need to set explicitly. VS Code: it's typically the root workspace path
|
|
31
|
+
* @param context optional generator context with fs and templatesRootPath
|
|
30
32
|
*/
|
|
31
|
-
static getInstance(cwd) {
|
|
33
|
+
static getInstance(cwd, context) {
|
|
32
34
|
if (!TemplateService.instance) {
|
|
33
|
-
TemplateService.instance = new TemplateService(cwd);
|
|
35
|
+
TemplateService.instance = new TemplateService(cwd, context);
|
|
34
36
|
}
|
|
35
|
-
else
|
|
36
|
-
|
|
37
|
+
else {
|
|
38
|
+
if (cwd) {
|
|
39
|
+
TemplateService.instance.cwd = cwd;
|
|
40
|
+
}
|
|
41
|
+
if (context) {
|
|
42
|
+
TemplateService.instance._context = context;
|
|
43
|
+
}
|
|
37
44
|
}
|
|
38
45
|
return TemplateService.instance;
|
|
39
46
|
}
|
|
@@ -62,7 +69,7 @@ class TemplateService {
|
|
|
62
69
|
customTemplatesRootPathOrGitRepo,
|
|
63
70
|
};
|
|
64
71
|
const Generator = importGenerator(templateType);
|
|
65
|
-
const instance = new Generator(templateOptions);
|
|
72
|
+
const instance = new Generator(templateOptions, this._context, this._cwd);
|
|
66
73
|
return instance.run(runOptions);
|
|
67
74
|
}
|
|
68
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templateService.js","sourceRoot":"","sources":["../../src/service/templateService.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
1
|
+
{"version":3,"file":"templateService.js","sourceRoot":"","sources":["../../src/service/templateService.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAYH,0CAQC;AAlBD,0CAOwB;AACxB,kCAA8B;AAE9B,SAAgB,eAAe,CAC7B,YAA0B;IAE1B,MAAM,SAAS,GAAG,kBAAU,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC/C,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,UAAG,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAa,eAAe;IAK1B,YAAY,GAAY,EAAE,OAA0B;QAClD,IAAI,CAAC,IAAI,GAAG,GAAG,aAAH,GAAG,cAAH,GAAG,GAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,WAAW,CACvB,GAAY,EACZ,OAA0B;QAE1B,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;YAC9B,eAAe,CAAC,QAAQ,GAAG,IAAI,eAAe,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QAC/D,CAAC;aAAM,CAAC;YACN,IAAI,GAAG,EAAE,CAAC;gBACR,eAAe,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC;YACrC,CAAC;YACD,IAAI,OAAO,EAAE,CAAC;gBACZ,eAAe,CAAC,QAAQ,CAAC,QAAQ,GAAG,OAAO,CAAC;YAC9C,CAAC;QACH,CAAC;QACD,OAAO,eAAe,CAAC,QAAQ,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,IAAW,GAAG;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC;IACnB,CAAC;IAED;;;OAGG;IACH,IAAW,GAAG,CAAC,GAAW;QACxB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IAED;;;;;OAKG;IACI,MAAM,CACX,YAA0B,EAC1B,eAAyB,EACzB,gCAAyC;QAEzC,MAAM,UAAU,GAAG;YACjB,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,gCAAgC;SACjC,CAAC;QAEF,MAAM,SAAS,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;QAChD,MAAM,QAAQ,GAAG,IAAI,SAAS,CAAC,eAAe,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC1E,OAAO,QAAQ,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACF;AAnED,0CAmEC"}
|
package/lib/utils/constants.d.ts
CHANGED
package/lib/utils/constants.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_API_VERSION = void 0;
|
|
3
|
+
exports.dirnameTemplatesDefault = exports.DEFAULT_API_VERSION = void 0;
|
|
4
4
|
/*
|
|
5
5
|
* Copyright (c) 2024, salesforce.com, inc.
|
|
6
6
|
* All rights reserved.
|
|
7
7
|
* Licensed under the BSD 3-Clause license.
|
|
8
8
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
9
|
*/
|
|
10
|
+
const path = require("path");
|
|
10
11
|
exports.DEFAULT_API_VERSION = '66.0';
|
|
12
|
+
exports.dirnameTemplatesDefault = process.env.ESBUILD_PLATFORM !== 'web'
|
|
13
|
+
? path.join(__dirname, '..', 'templates')
|
|
14
|
+
: undefined;
|
|
11
15
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAEhB,QAAA,mBAAmB,GAAG,MAAM,CAAC;AAE7B,QAAA,uBAAuB,GAClC,OAAO,CAAC,GAAG,CAAC,gBAAgB,KAAK,KAAK;IACpC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,WAAW,CAAC;IACzC,CAAC,CAAC,SAAS,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import * as nodeFs from 'fs';
|
|
1
2
|
export declare class CreateUtil {
|
|
2
3
|
static checkInputs(flagValue: string): string;
|
|
3
|
-
static getCommandTemplatesForFiletype(filetype: RegExp, command: string): string[];
|
|
4
|
+
static getCommandTemplatesForFiletype(filetype: RegExp, command: string, fs?: typeof nodeFs, templatesRootPath?: string): string[];
|
|
4
5
|
/** Get the names of directories that contain matching template files.
|
|
5
6
|
* This will look in directories under the command/subdir folder.
|
|
6
7
|
* @param command the command name
|
|
@@ -11,5 +12,5 @@ export declare class CreateUtil {
|
|
|
11
12
|
static getCommandTemplatesInSubdirs(command: string, { filetype, subdir }?: {
|
|
12
13
|
filetype?: RegExp;
|
|
13
14
|
subdir?: string;
|
|
14
|
-
}): string[];
|
|
15
|
+
}, fs?: typeof nodeFs, templatesRootPath?: string): string[];
|
|
15
16
|
}
|
package/lib/utils/createUtil.js
CHANGED
|
@@ -7,8 +7,9 @@ exports.CreateUtil = void 0;
|
|
|
7
7
|
* Licensed under the BSD 3-Clause license.
|
|
8
8
|
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
10
|
+
const nodeFs = require("fs");
|
|
11
11
|
const path = require("path");
|
|
12
|
+
const constants_1 = require("./constants");
|
|
12
13
|
const i18n_1 = require("../i18n");
|
|
13
14
|
class CreateUtil {
|
|
14
15
|
static checkInputs(flagValue) {
|
|
@@ -31,9 +32,11 @@ class CreateUtil {
|
|
|
31
32
|
return '';
|
|
32
33
|
}
|
|
33
34
|
// TODO: switch filetype to a string instead of regex
|
|
34
|
-
static getCommandTemplatesForFiletype(filetype, command) {
|
|
35
|
+
static getCommandTemplatesForFiletype(filetype, command, fs = nodeFs, templatesRootPath) {
|
|
36
|
+
var _a;
|
|
37
|
+
const basePath = (_a = templatesRootPath !== null && templatesRootPath !== void 0 ? templatesRootPath : constants_1.dirnameTemplatesDefault) !== null && _a !== void 0 ? _a : '';
|
|
35
38
|
const files = fs
|
|
36
|
-
.readdirSync(path.resolve(
|
|
39
|
+
.readdirSync(path.resolve(basePath, command))
|
|
37
40
|
.filter((file) => filetype.test(file))
|
|
38
41
|
.map((file) => {
|
|
39
42
|
return file.split('.', 1).toString();
|
|
@@ -47,8 +50,10 @@ class CreateUtil {
|
|
|
47
50
|
* @param subdir optional subdirectory under `templates/${command}`
|
|
48
51
|
* @return the set of template names
|
|
49
52
|
*/
|
|
50
|
-
static getCommandTemplatesInSubdirs(command, { filetype, subdir } = {}) {
|
|
51
|
-
|
|
53
|
+
static getCommandTemplatesInSubdirs(command, { filetype, subdir } = {}, fs = nodeFs, templatesRootPath) {
|
|
54
|
+
var _a;
|
|
55
|
+
const basePath = (_a = templatesRootPath !== null && templatesRootPath !== void 0 ? templatesRootPath : constants_1.dirnameTemplatesDefault) !== null && _a !== void 0 ? _a : '';
|
|
56
|
+
let basedir = path.resolve(basePath, command);
|
|
52
57
|
if (subdir) {
|
|
53
58
|
basedir = path.join(basedir, subdir);
|
|
54
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createUtil.js","sourceRoot":"","sources":["../../src/utils/createUtil.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,
|
|
1
|
+
{"version":3,"file":"createUtil.js","sourceRoot":"","sources":["../../src/utils/createUtil.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,6BAA6B;AAC7B,2CAAsD;AACtD,kCAA8B;AAE9B,MAAa,UAAU;IACd,MAAM,CAAC,WAAW,CAAC,SAAiB;QACzC,MAAM,WAAW,GAAG,OAAO,CAAC;QAE5B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,UAAG,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,CAAC;QACzD,CAAC;QACD,MAAM,iBAAiB,GAAG,WAAW,CAAC;QAEtC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YACvC,MAAM,IAAI,KAAK,CAAC,UAAG,CAAC,QAAQ,CAAC,8BAA8B,CAAC,CAAC,CAAC;QAChE,CAAC;QACD,MAAM,aAAa,GAAG,IAAI,CAAC;QAC3B,IAAI,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,KAAK,CAAC,UAAG,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,CAAC;QAC1D,CAAC;QACD,MAAM,aAAa,GAAG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AM,OAAO,GAAG,EAAE;aACf,WAAW,CAAC,OAAO,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;aAC7C,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;aAClC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,QAAQ,EAAE,CAAC;YACb,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAC5B,EAAE;iBACC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;iBAC7D,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAC1D,CAAC;QACJ,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAvED,gCAuEC"}
|
package/lib/utils/types.d.ts
CHANGED
|
@@ -14,7 +14,18 @@ import VisualforceComponentGenerator from '../generators/visualforceComponentGen
|
|
|
14
14
|
import VisualforcePageGenerator from '../generators/visualforcePageGenerator';
|
|
15
15
|
import WebApplicationGenerator from '../generators/webApplicationGenerator';
|
|
16
16
|
import { BaseGenerator } from '../generators/baseGenerator';
|
|
17
|
-
export type GeneratorClass<TOptions extends TemplateOptions> = new (options: TOptions) => BaseGenerator<TOptions>;
|
|
17
|
+
export type GeneratorClass<TOptions extends TemplateOptions> = new (options: TOptions, context?: GeneratorContext, cwd?: string) => BaseGenerator<TOptions>;
|
|
18
|
+
/**
|
|
19
|
+
* Optional context for generators allowing fs and template path injection.
|
|
20
|
+
* When not provided, defaults to Node's fs and __dirname-based template resolution.
|
|
21
|
+
* cwd is owned by TemplateService; pass via constructor param.
|
|
22
|
+
*/
|
|
23
|
+
export type GeneratorContext = {
|
|
24
|
+
/** Node-fs-compatible object. Defaults to require('node:fs'). Pass memfs for web. */
|
|
25
|
+
readonly fs?: typeof import('node:fs');
|
|
26
|
+
/** Absolute path to built-in templates root. Overrides __dirname-based resolution. */
|
|
27
|
+
readonly templatesRootPath?: string;
|
|
28
|
+
};
|
|
18
29
|
export type Generators = typeof AnalyticsTemplateGenerator | typeof ApexClassGenerator | typeof ApexTriggerGenerator | typeof FlexipageGenerator | typeof LightningAppGenerator | typeof LightningComponentGenerator | typeof LightningEventGenerator | typeof LightningTestGenerator | typeof LightningInterfaceGenerator | typeof DigitalExperienceSiteGenerator | typeof ProjectGenerator | typeof StaticResourceGenerator | typeof VisualforceComponentGenerator | typeof VisualforcePageGenerator | typeof WebApplicationGenerator;
|
|
19
30
|
/**
|
|
20
31
|
* Available Template types
|
|
@@ -102,7 +113,7 @@ export interface ProjectOptions extends TemplateOptions {
|
|
|
102
113
|
* Note that namespace is a reserved keyword for yeoman generator
|
|
103
114
|
*/
|
|
104
115
|
ns: string;
|
|
105
|
-
template: 'standard' | 'empty' | 'analytics' | '
|
|
116
|
+
template: 'standard' | 'empty' | 'analytics' | 'reactb2e' | 'reactb2x';
|
|
106
117
|
manifest: boolean;
|
|
107
118
|
loginurl: string;
|
|
108
119
|
}
|