├── test ├── nuts │ ├── ebikes-lwc │ │ ├── .husky │ │ │ ├── .gitignore │ │ │ └── pre-commit │ │ ├── force-app │ │ │ ├── main │ │ │ │ └── default │ │ │ │ │ ├── networkBranding │ │ │ │ │ ├── cbE_Bikes.networkBranding │ │ │ │ │ └── cbE_Bikes.networkBranding-meta.xml │ │ │ │ │ ├── lwc │ │ │ │ │ ├── orderBuilder │ │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ │ └── data │ │ │ │ │ │ │ │ ├── getOrderItemsEmpty.json │ │ │ │ │ │ │ │ └── getOrderItems.json │ │ │ │ │ │ ├── orderBuilder.css │ │ │ │ │ │ ├── orderBuilder.js-meta.xml │ │ │ │ │ │ └── orderBuilder.html │ │ │ │ │ ├── similarProducts │ │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ │ └── data │ │ │ │ │ │ │ │ ├── similarProductsWithoutData.json │ │ │ │ │ │ │ │ ├── getRecord.json │ │ │ │ │ │ │ │ └── similarProducts.json │ │ │ │ │ │ ├── similarProducts.css │ │ │ │ │ │ ├── similarProducts.html │ │ │ │ │ │ ├── similarProducts.js-meta.xml │ │ │ │ │ │ └── similarProducts.js │ │ │ │ │ ├── heroDetails │ │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ │ └── data │ │ │ │ │ │ │ │ ├── getRecordInfoProduct.json │ │ │ │ │ │ │ │ └── getRecordInfoProductFamily.json │ │ │ │ │ │ ├── heroDetails.html │ │ │ │ │ │ ├── heroDetails.js-meta.xml │ │ │ │ │ │ ├── heroDetails.css │ │ │ │ │ │ └── heroDetails.js │ │ │ │ │ ├── productListItem │ │ │ │ │ │ ├── productListItem.css │ │ │ │ │ │ ├── productListItem.js-meta.xml │ │ │ │ │ │ ├── productListItem.js │ │ │ │ │ │ └── productListItem.html │ │ │ │ │ ├── paginator │ │ │ │ │ │ ├── paginator.css │ │ │ │ │ │ ├── paginator.js-meta.xml │ │ │ │ │ │ ├── paginator.js │ │ │ │ │ │ └── paginator.html │ │ │ │ │ ├── placeholder │ │ │ │ │ │ ├── placeholder.css │ │ │ │ │ │ ├── placeholder.html │ │ │ │ │ │ ├── placeholder.js-meta.xml │ │ │ │ │ │ ├── placeholder.js │ │ │ │ │ │ └── __tests__ │ │ │ │ │ │ │ └── placeholder.test.js │ │ │ │ │ ├── createCase │ │ │ │ │ │ ├── createCase.css │ │ │ │ │ │ ├── createCase.js-meta.xml │ │ │ │ │ │ └── createCase.js │ │ │ │ │ ├── productFilter │ │ │ │ │ │ ├── productFilter.css │ │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ │ └── data │ │ │ │ │ │ │ │ └── getPicklistValues.json │ │ │ │ │ │ └── productFilter.js-meta.xml │ │ │ │ │ ├── productTileList │ │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ │ └── data │ │ │ │ │ │ │ │ └── getProductsNoRecords.json │ │ │ │ │ │ ├── productTileList.css │ │ │ │ │ │ └── productTileList.js-meta.xml │ │ │ │ │ ├── productCard │ │ │ │ │ │ ├── productCard.css │ │ │ │ │ │ └── productCard.js-meta.xml │ │ │ │ │ ├── errorPanel │ │ │ │ │ │ ├── errorPanel.js-meta.xml │ │ │ │ │ │ ├── templates │ │ │ │ │ │ │ └── inlineMessage.html │ │ │ │ │ │ └── errorPanel.js │ │ │ │ │ ├── orderItemTile │ │ │ │ │ │ ├── orderItemTile.js-meta.xml │ │ │ │ │ │ ├── orderItemTile.css │ │ │ │ │ │ └── orderItemTile.js │ │ │ │ │ ├── ldsUtils │ │ │ │ │ │ ├── ldsUtils.js-meta.xml │ │ │ │ │ │ └── ldsUtils.js │ │ │ │ │ ├── productTile │ │ │ │ │ │ ├── productTile.js-meta.xml │ │ │ │ │ │ ├── productTile.css │ │ │ │ │ │ ├── productTile.html │ │ │ │ │ │ └── productTile.js │ │ │ │ │ ├── .eslintrc.json │ │ │ │ │ ├── hero │ │ │ │ │ │ ├── hero.html │ │ │ │ │ │ ├── hero.css │ │ │ │ │ │ └── hero.js │ │ │ │ │ └── accountMap │ │ │ │ │ │ ├── accountMap.js-meta.xml │ │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ └── data │ │ │ │ │ │ │ ├── getRecordWithoutAddress.json │ │ │ │ │ │ │ └── getRecordWithAddress.json │ │ │ │ │ │ ├── accountMap.html │ │ │ │ │ │ └── accountMap.js │ │ │ │ │ ├── aura │ │ │ │ │ └── pageTemplate_2_7_3 │ │ │ │ │ │ ├── pageTemplate_2_7_3.css │ │ │ │ │ │ ├── pageTemplate_2_7_3.cmp-meta.xml │ │ │ │ │ │ ├── pageTemplate_2_7_3.design │ │ │ │ │ │ ├── pageTemplate_2_7_3.svg │ │ │ │ │ │ └── pageTemplate_2_7_3.cmp │ │ │ │ │ ├── contentassets │ │ │ │ │ ├── logo.asset │ │ │ │ │ ├── ebikeslogo.asset │ │ │ │ │ ├── logo.asset-meta.xml │ │ │ │ │ └── ebikeslogo.asset-meta.xml │ │ │ │ │ ├── staticresources │ │ │ │ │ ├── bike_assets │ │ │ │ │ │ ├── racer.png │ │ │ │ │ │ ├── commuter.png │ │ │ │ │ │ ├── enthusiast.png │ │ │ │ │ │ └── CyclingGrass.jpg │ │ │ │ │ └── bike_assets.resource-meta.xml │ │ │ │ │ ├── experiences │ │ │ │ │ ├── E_Bikes1 │ │ │ │ │ │ ├── config │ │ │ │ │ │ │ ├── languages.json │ │ │ │ │ │ │ ├── loginAppPage.json │ │ │ │ │ │ │ ├── mainAppPage.json │ │ │ │ │ │ │ └── eBikes.json │ │ │ │ │ │ ├── routes │ │ │ │ │ │ │ ├── login.json │ │ │ │ │ │ │ ├── loginError.json │ │ │ │ │ │ │ ├── recordDetail.json │ │ │ │ │ │ │ ├── register.json │ │ │ │ │ │ │ ├── home.json │ │ │ │ │ │ │ ├── createRecord.json │ │ │ │ │ │ │ ├── error.json │ │ │ │ │ │ │ ├── forgotPassword.json │ │ │ │ │ │ │ ├── checkPassword.json │ │ │ │ │ │ │ ├── recordList.json │ │ │ │ │ │ │ ├── search.json │ │ │ │ │ │ │ ├── productList.json │ │ │ │ │ │ │ ├── createCase.json │ │ │ │ │ │ │ ├── productDetail.json │ │ │ │ │ │ │ ├── relatedRecordList.json │ │ │ │ │ │ │ ├── productRelatedList.json │ │ │ │ │ │ │ ├── productExplorer.json │ │ │ │ │ │ │ ├── productFamilyList.json │ │ │ │ │ │ │ ├── serviceNotAvailable.json │ │ │ │ │ │ │ ├── productFamilyDetail.json │ │ │ │ │ │ │ └── productFamilyRelatedList.json │ │ │ │ │ │ ├── brandingSets │ │ │ │ │ │ │ └── jepson.json │ │ │ │ │ │ └── views │ │ │ │ │ │ │ ├── createRecord.json │ │ │ │ │ │ │ ├── serviceNotAvailable.json │ │ │ │ │ │ │ ├── relatedRecordList.json │ │ │ │ │ │ │ ├── productRelatedList.json │ │ │ │ │ │ │ └── productFamilyRelatedList.json │ │ │ │ │ └── E_Bikes1.site-meta.xml │ │ │ │ │ ├── pages │ │ │ │ │ ├── CommunitiesLanding.page │ │ │ │ │ └── CommunitiesLanding.page-meta.xml │ │ │ │ │ ├── tabs │ │ │ │ │ ├── Order__c.tab-meta.xml │ │ │ │ │ ├── Product_Family__c.tab-meta.xml │ │ │ │ │ ├── Product__c.tab-meta.xml │ │ │ │ │ └── Product_Explorer.tab-meta.xml │ │ │ │ │ ├── classes │ │ │ │ │ ├── PagedResult.cls-meta.xml │ │ │ │ │ ├── HeroDetailsPositionCustomPicklist.cls-meta.xml │ │ │ │ │ ├── OrderController.cls-meta.xml │ │ │ │ │ ├── ProductController.cls-meta.xml │ │ │ │ │ ├── TestOrderController.cls-meta.xml │ │ │ │ │ ├── TestProductController.cls-meta.xml │ │ │ │ │ ├── ProductRecordInfoController.cls-meta.xml │ │ │ │ │ ├── PagedResult.cls │ │ │ │ │ ├── OrderController.cls │ │ │ │ │ ├── HeroDetailsPositionCustomPicklist.cls │ │ │ │ │ ├── TestOrderController.cls │ │ │ │ │ └── ProductRecordInfoController.cls │ │ │ │ │ ├── objects │ │ │ │ │ ├── Case │ │ │ │ │ │ ├── listViews │ │ │ │ │ │ │ └── My_Cases.listView-meta.xml │ │ │ │ │ │ └── fields │ │ │ │ │ │ │ ├── Product__c.field-meta.xml │ │ │ │ │ │ │ └── Case_Category__c.field-meta.xml │ │ │ │ │ ├── Product__c │ │ │ │ │ │ ├── fields │ │ │ │ │ │ │ ├── Picture_URL__c.field-meta.xml │ │ │ │ │ │ │ ├── Fork__c.field-meta.xml │ │ │ │ │ │ │ ├── Description__c.field-meta.xml │ │ │ │ │ │ │ ├── MSRP__c.field-meta.xml │ │ │ │ │ │ │ ├── Motor__c.field-meta.xml │ │ │ │ │ │ │ ├── Battery__c.field-meta.xml │ │ │ │ │ │ │ ├── Charger__c.field-meta.xml │ │ │ │ │ │ │ ├── Front_Brakes__c.field-meta.xml │ │ │ │ │ │ │ ├── Rear_Brakes__c.field-meta.xml │ │ │ │ │ │ │ ├── Product_Family__c.field-meta.xml │ │ │ │ │ │ │ ├── Material__c.field-meta.xml │ │ │ │ │ │ │ ├── Category__c.field-meta.xml │ │ │ │ │ │ │ ├── Level__c.field-meta.xml │ │ │ │ │ │ │ ├── Seat_Color__c.field-meta.xml │ │ │ │ │ │ │ ├── Frame_Color__c.field-meta.xml │ │ │ │ │ │ │ ├── Handlebar_Color__c.field-meta.xml │ │ │ │ │ │ │ └── Waterbottle_Color__c.field-meta.xml │ │ │ │ │ │ └── listViews │ │ │ │ │ │ │ └── ProductList.listView-meta.xml │ │ │ │ │ ├── Product_Family__c │ │ │ │ │ │ ├── fields │ │ │ │ │ │ │ ├── Description__c.field-meta.xml │ │ │ │ │ │ │ └── Category__c.field-meta.xml │ │ │ │ │ │ └── listViews │ │ │ │ │ │ │ └── All_Product_Families.listView-meta.xml │ │ │ │ │ ├── Order_Item__c │ │ │ │ │ │ └── fields │ │ │ │ │ │ │ ├── Price__c.field-meta.xml │ │ │ │ │ │ │ ├── Qty_L__c.field-meta.xml │ │ │ │ │ │ │ ├── Qty_M__c.field-meta.xml │ │ │ │ │ │ │ ├── Qty_S__c.field-meta.xml │ │ │ │ │ │ │ ├── Product__c.field-meta.xml │ │ │ │ │ │ │ └── Order__c.field-meta.xml │ │ │ │ │ ├── Account │ │ │ │ │ │ └── listViews │ │ │ │ │ │ │ └── All_Acounts.listView-meta.xml │ │ │ │ │ └── Order__c │ │ │ │ │ │ └── fields │ │ │ │ │ │ └── Account__c.field-meta.xml │ │ │ │ │ ├── messageChannel │ │ │ │ │ ├── ProductSelected.messageChannel-meta.xml │ │ │ │ │ └── ProductsFiltered.messageChannel-meta.xml │ │ │ │ │ ├── cspTrustedSites │ │ │ │ │ └── s3_us_west_1_amazonaws_com.cspTrustedSite-meta.xml │ │ │ │ │ ├── flexipages │ │ │ │ │ └── Product_Explorer.flexipage-meta.xml │ │ │ │ │ ├── applications │ │ │ │ │ └── EBikes.app-meta.xml │ │ │ │ │ ├── navigationMenus │ │ │ │ │ └── Default_Navigation.navigationMenu-meta.xml │ │ │ │ │ ├── layouts │ │ │ │ │ └── CaseClose-Close Case Layout.layout-meta.xml │ │ │ │ │ └── sites │ │ │ │ │ └── E_Bikes.site-meta.xml │ │ │ └── test │ │ │ │ └── jest-mocks │ │ │ │ ├── apex.js │ │ │ │ └── lightning │ │ │ │ ├── messageService.js │ │ │ │ └── navigation.js │ │ ├── .vscode │ │ │ └── extensions.json │ │ ├── jest-sa11y-setup.js │ │ ├── ebikes-logo.png │ │ ├── README.md │ │ ├── .github │ │ │ ├── CODEOWNERS │ │ │ ├── SUPPORT.md │ │ │ ├── dependabot.yml │ │ │ ├── workflows │ │ │ │ ├── auto-assign.yml │ │ │ │ ├── codetour-watch.yml │ │ │ │ ├── welcome.yml │ │ │ │ └── stale.yml │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ └── ISSUE_TEMPLATE │ │ │ │ ├── Bug_Report.md │ │ │ │ └── Feature_Request.md │ │ ├── sfdx-project.json │ │ ├── .eslintignore │ │ ├── .prettierignore │ │ ├── .prettierrc │ │ ├── SECURITY.md │ │ ├── data │ │ │ ├── sample-data-plan.json │ │ │ ├── Accounts.json │ │ │ └── Product_Family__cs.json │ │ ├── jest.config.js │ │ ├── config │ │ │ └── project-scratch-def.json │ │ ├── .gitignore │ │ ├── bin │ │ │ ├── install-scratch.sh │ │ │ └── install-scratch.bat │ │ └── CONTRIBUTION.md │ ├── repros │ │ ├── nested-classes │ │ │ ├── classes │ │ │ │ ├── .gitignore │ │ │ │ └── ignored │ │ │ │ │ ├── Ignored.cls │ │ │ │ │ └── Ignored.cls-meta.xml │ │ │ ├── sfdx-project.json │ │ │ └── README.md │ │ ├── nested-classes2 │ │ │ ├── classes │ │ │ │ ├── .gitignore │ │ │ │ └── ignored │ │ │ │ │ ├── Ignored.cls │ │ │ │ │ └── Ignored.cls-meta.xml │ │ │ ├── sfdx-project.json │ │ │ └── README.md │ │ ├── extra-classes │ │ │ ├── force-app │ │ │ │ ├── Base.cls │ │ │ │ └── Base.cls-meta.xml │ │ │ ├── force-app-extra │ │ │ │ ├── Extra.cls │ │ │ │ └── Extra.cls-meta.xml │ │ │ ├── sfdx-project.json │ │ │ └── README.md │ │ ├── partialBundleDelete │ │ │ ├── force-app │ │ │ │ ├── experiences │ │ │ │ │ └── fooEB │ │ │ │ │ │ ├── views │ │ │ │ │ │ └── login.json │ │ │ │ │ │ ├── routes │ │ │ │ │ │ └── login.json │ │ │ │ │ │ └── fooEB.site-meta.xml │ │ │ │ ├── staticresources │ │ │ │ │ ├── ZippedResource │ │ │ │ │ │ ├── file1.json │ │ │ │ │ │ └── file2.json │ │ │ │ │ └── ZippedResource.resource-meta.xml │ │ │ │ ├── lwc │ │ │ │ │ └── testComp │ │ │ │ │ │ ├── myComp.js │ │ │ │ │ │ ├── myComp.js-meta.xml │ │ │ │ │ │ └── myComp.html │ │ │ │ └── digitalExperiences │ │ │ │ │ └── site │ │ │ │ │ └── Xcel_Energy1 │ │ │ │ │ ├── sfdc_cms__view │ │ │ │ │ ├── error │ │ │ │ │ │ └── _meta.json │ │ │ │ │ └── home │ │ │ │ │ │ ├── _meta.json │ │ │ │ │ │ ├── de.json │ │ │ │ │ │ ├── fr.json │ │ │ │ │ │ └── mobile.json │ │ │ │ │ └── Xcel_Energy1.digitalExperience-meta.xml │ │ │ └── sfdx-project.json │ │ ├── dupclasses │ │ │ ├── pkg1 │ │ │ │ ├── Hello.cls │ │ │ │ └── Hello.cls-meta.xml │ │ │ ├── pkg2 │ │ │ │ ├── Hello.cls │ │ │ │ └── Hello.cls-meta.xml │ │ │ ├── sfdx-project.json │ │ │ └── README.md │ │ └── duplabels │ │ │ ├── sfdx-project.json │ │ │ ├── pkg1 │ │ │ └── Test1.labels-meta.xml │ │ │ ├── pkg2 │ │ │ └── Test2.labels-meta.xml │ │ │ └── README.md │ ├── vivek-project │ │ ├── sfdx-source │ │ │ ├── unsorted │ │ │ │ └── main │ │ │ │ │ └── default │ │ │ │ │ └── .placeholder │ │ │ └── packaged │ │ │ │ └── main │ │ │ │ └── objects │ │ │ │ ├── Workbook__c │ │ │ │ ├── listViews │ │ │ │ │ └── All.listView-meta.xml │ │ │ │ └── fields │ │ │ │ │ ├── Learner_Profile_ID__c.field-meta.xml │ │ │ │ │ └── Learner_Permset_Group__c.field-meta.xml │ │ │ │ └── Workshop__c │ │ │ │ ├── listViews │ │ │ │ └── All.listView-meta.xml │ │ │ │ └── fields │ │ │ │ └── Workbook__c.field-meta.xml │ │ ├── sfdx-project.json │ │ └── .forceignore │ └── local │ │ └── customLabelsMetadataKeyTranslation.nut.ts ├── tsconfig.json ├── .eslintrc.cjs ├── init.js └── unit │ └── shared │ └── functions.test.ts ├── .prettierrc.json ├── bin ├── run.cmd └── run ├── .commitlintrc.json ├── .nycrc ├── commitlint.config.js ├── .husky ├── commit-msg ├── pre-push └── pre-commit ├── messages └── source.md ├── .lintstagedrc.js ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── workflows │ ├── automerge.yml │ ├── devScripts.yml │ ├── validate-pr.yml │ ├── onRelease.yml │ ├── notify-slack-on-pr-open.yml │ ├── create-github-release.yml │ ├── test.yml │ └── failureNotifications.yml ├── no-response.yml ├── ISSUE_TEMPLATE │ ├── Feature_request.md │ └── Bug_report.md └── dependabot.yml ├── .git2gus └── config.json ├── .vscode ├── tasks.json ├── settings.json └── launch.json ├── .editorconfig ├── .mocharc.json ├── .eslintrc.cjs ├── CODEOWNERS ├── .sfdevrc.json ├── command-snapshot.json ├── tsconfig.json ├── SECURITY.md ├── scripts └── esbuild.config.mjs ├── .gitignore ├── src ├── index.ts └── shared │ ├── local │ ├── types.ts │ └── functions.ts │ └── guards.ts ├── DEVELOPING.md └── CONTRIBUTING.md /test/nuts/ebikes-lwc/.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | "@salesforce/prettier-config" 2 | -------------------------------------------------------------------------------- /bin/run.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | node "%~dp0\run" %* -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npm run precommit -------------------------------------------------------------------------------- /test/nuts/repros/nested-classes/classes/.gitignore: -------------------------------------------------------------------------------- 1 | ignored 2 | -------------------------------------------------------------------------------- /test/nuts/repros/nested-classes2/classes/.gitignore: -------------------------------------------------------------------------------- 1 | ignored 2 | -------------------------------------------------------------------------------- /test/nuts/repros/extra-classes/force-app/Base.cls: -------------------------------------------------------------------------------- 1 | public class Base {} -------------------------------------------------------------------------------- /test/nuts/repros/extra-classes/force-app-extra/Extra.cls: -------------------------------------------------------------------------------- 1 | public class Extra {} -------------------------------------------------------------------------------- /.commitlintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@commitlint/config-conventional"] 3 | } 4 | -------------------------------------------------------------------------------- /test/nuts/repros/nested-classes/classes/ignored/Ignored.cls: -------------------------------------------------------------------------------- 1 | public class Ignored {} -------------------------------------------------------------------------------- /test/nuts/repros/nested-classes2/classes/ignored/Ignored.cls: -------------------------------------------------------------------------------- 1 | public class Ignored {} -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/networkBranding/cbE_Bikes.networkBranding: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/experiences/fooEB/views/login.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.nycrc: -------------------------------------------------------------------------------- 1 | { 2 | "nyc": { 3 | "extends": "@salesforce/dev-config/nyc" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { extends: ['@commitlint/config-conventional'] }; 2 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/experiences/fooEB/routes/login.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | yarn commitlint --edit 5 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | yarn build && yarn test 5 | -------------------------------------------------------------------------------- /messages/source.md: -------------------------------------------------------------------------------- 1 | # NonSourceTrackedOrgError 2 | 3 | This org does not have source tracking. 4 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/staticresources/ZippedResource/file1.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/staticresources/ZippedResource/file2.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /.lintstagedrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | '**/*.{js,json,md}?(x)': () => 'npm run reformat' 3 | }; 4 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/lwc/testComp/myComp.js: -------------------------------------------------------------------------------- 1 | const fetFoo = () => 'foo'; 2 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/orderBuilder/__tests__/data/getOrderItemsEmpty.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["vsls-contrib.codetour"] 3 | } 4 | -------------------------------------------------------------------------------- /test/nuts/repros/dupclasses/pkg1/Hello.cls: -------------------------------------------------------------------------------- 1 | public class Hello { 2 | public String version='pkg1'; 3 | } 4 | -------------------------------------------------------------------------------- /test/nuts/repros/dupclasses/pkg2/Hello.cls: -------------------------------------------------------------------------------- 1 | public class Hello { 2 | public String version='pkg2'; 3 | } 4 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### What does this PR do? 2 | 3 | ### What issues does this PR fix or reference? 4 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | yarn lint && yarn pretty-quick --staged 5 | -------------------------------------------------------------------------------- /bin/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require('@oclif/command').run() 4 | .catch(require('@oclif/errors/handle')) 5 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/similarProducts/__tests__/data/similarProductsWithoutData.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/jest-sa11y-setup.js: -------------------------------------------------------------------------------- 1 | import { registerSa11yMatcher } from '@sa11y/jest'; 2 | 3 | registerSa11yMatcher(); 4 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/ebikes-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forcedotcom/source-tracking/HEAD/test/nuts/ebikes-lwc/ebikes-logo.png -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.css: -------------------------------------------------------------------------------- 1 | .THIS .center { 2 | padding: 0 12px; 3 | } 4 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/heroDetails/__tests__/data/getRecordInfoProduct.json: -------------------------------------------------------------------------------- 1 | ["a023B000002yg4IQAQ", "Product__c"] 2 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/heroDetails/__tests__/data/getRecordInfoProductFamily.json: -------------------------------------------------------------------------------- 1 | ["a023B000002yg4IQAQ", "ProductFamily__c"] 2 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/README.md: -------------------------------------------------------------------------------- 1 | this is ebikes from github as of 8/30/2021 with the following changes 2 | 3 | 1. remove profiles from the .forceignore 4 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Default owners for everything in the repo. 2 | # They will be assigned for review on all PRs. 3 | * @trailheadapps/maintainers-ebikes-lwc 4 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productListItem/productListItem.css: -------------------------------------------------------------------------------- 1 | img.product { 2 | height: 80px; 3 | max-width: initial; 4 | pointer-events: none; 5 | } 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/similarProducts/similarProducts.css: -------------------------------------------------------------------------------- 1 | img.product { 2 | height: 120px; 3 | max-width: initial; 4 | pointer-events: none; 5 | } 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/paginator/paginator.css: -------------------------------------------------------------------------------- 1 | .nav-info { 2 | text-align: center; 3 | } 4 | 5 | .nav-next { 6 | text-align: right; 7 | height: 32px; 8 | } 9 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/placeholder/placeholder.css: -------------------------------------------------------------------------------- 1 | :host > div { 2 | text-align: center; 3 | color: #c23335; 4 | } 5 | 6 | img { 7 | height: 70px; 8 | } 9 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/contentassets/logo.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forcedotcom/source-tracking/HEAD/test/nuts/ebikes-lwc/force-app/main/default/contentassets/logo.asset -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/createCase/createCase.css: -------------------------------------------------------------------------------- 1 | .title-order, 2 | .submit-button { 3 | font-weight: bold; 4 | } 5 | 6 | .navigate-hidden { 7 | display: none; 8 | } 9 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.github/SUPPORT.md: -------------------------------------------------------------------------------- 1 | **Looking for help?** 2 | 3 | Check out the [Lightning Web Components documentation](https://developer.salesforce.com/docs/component-library/documentation/lwc). 4 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/digitalExperiences/site/Xcel_Energy1/sfdc_cms__view/error/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiName": "error", 3 | "type": "sfdc_cms__view", 4 | "path": "views" 5 | } 6 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/digitalExperiences/site/Xcel_Energy1/sfdc_cms__view/home/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiName": "home", 3 | "type": "sfdc_cms__view", 4 | "path": "views" 5 | } 6 | -------------------------------------------------------------------------------- /.git2gus/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "productTag": "a1aB00000004Bx8IAE", 3 | "defaultBuild": "offcore.tooling.58", 4 | "issueTypeLabels": { 5 | "feature": "USER STORY", 6 | "bug": "BUG P3" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/contentassets/ebikeslogo.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forcedotcom/source-tracking/HEAD/test/nuts/ebikes-lwc/force-app/main/default/contentassets/ebikeslogo.asset -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productFilter/productFilter.css: -------------------------------------------------------------------------------- 1 | section { 2 | margin-top: 16px; 3 | } 4 | 5 | section > h1 { 6 | font-weight: bold; 7 | text-transform: uppercase; 8 | } 9 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productTileList/__tests__/data/getProductsNoRecords.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageNumber": 1, 3 | "pageSize": 9, 4 | "totalItemCount": 0, 5 | "records": [] 6 | } 7 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: '/' 5 | schedule: 6 | interval: monthly 7 | open-pull-requests-limit: 10 8 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/test/jest-mocks/apex.js: -------------------------------------------------------------------------------- 1 | // Mocking how getSObjectValue retrieves the field value. 2 | export const getSObjectValue = (object, field) => { 3 | return object[field.fieldApiName]; 4 | }; 5 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/staticresources/bike_assets/racer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forcedotcom/source-tracking/HEAD/test/nuts/ebikes-lwc/force-app/main/default/staticresources/bike_assets/racer.png -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "compile", 6 | "type": "npm", 7 | "script": "compile", 8 | "problemMatcher": [] 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/staticresources/bike_assets/commuter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forcedotcom/source-tracking/HEAD/test/nuts/ebikes-lwc/force-app/main/default/staticresources/bike_assets/commuter.png -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/staticresources/bike_assets/enthusiast.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forcedotcom/source-tracking/HEAD/test/nuts/ebikes-lwc/force-app/main/default/staticresources/bike_assets/enthusiast.png -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.md] 11 | trim_trailing_whitespace = false 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/staticresources/bike_assets/CyclingGrass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/forcedotcom/source-tracking/HEAD/test/nuts/ebikes-lwc/force-app/main/default/staticresources/bike_assets/CyclingGrass.jpg -------------------------------------------------------------------------------- /test/nuts/repros/extra-classes/sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [{ "path": "force-app", "default": true }], 3 | "namespace": "", 4 | "sfdcLoginUrl": "https://login.salesforce.com", 5 | "sourceApiVersion": "53.0" 6 | } 7 | -------------------------------------------------------------------------------- /test/nuts/repros/nested-classes/sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [{ "path": "classes", "default": true }], 3 | "namespace": "", 4 | "sfdcLoginUrl": "https://login.salesforce.com", 5 | "sourceApiVersion": "53.0" 6 | } 7 | -------------------------------------------------------------------------------- /.mocharc.json: -------------------------------------------------------------------------------- 1 | { 2 | "require": "test/init.js, ts-node/register, source-map-support/register", 3 | "watch-extensions": "ts", 4 | "watch-files": ["src", "test"], 5 | "recursive": true, 6 | "reporter": "spec", 7 | "timeout": 5000 8 | } 9 | -------------------------------------------------------------------------------- /test/nuts/repros/dupclasses/pkg1/Hello.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/repros/dupclasses/pkg2/Hello.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [{ "path": "force-app", "default": true }], 3 | "namespace": "", 4 | "sfdcLoginUrl": "https://login.salesforce.com", 5 | "sourceApiVersion": "56.0" 6 | } 7 | -------------------------------------------------------------------------------- /test/nuts/repros/extra-classes/force-app/Base.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/repros/nested-classes2/sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [{ "path": "classes/ignored", "default": true }], 3 | "namespace": "", 4 | "sfdcLoginUrl": "https://login.salesforce.com", 5 | "sourceApiVersion": "53.0" 6 | } 7 | -------------------------------------------------------------------------------- /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license', 'plugin:sf-plugin/library'], 3 | // ignore eslint files in NUT test repos 4 | ignorePatterns: ['test/nuts/ebikes-lwc'], 5 | }; 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/config/languages.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultCode": "en_US", 3 | "defaultLabel": "English (US)", 4 | "id": "e7c0a94e-a8fb-4ab7-ad4e-1c7ceb9060bb", 5 | "type": "languageContainer" 6 | } 7 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [ 3 | { 4 | "path": "force-app", 5 | "default": true 6 | } 7 | ], 8 | "namespace": "", 9 | "sourceApiVersion": "52.0" 10 | } 11 | -------------------------------------------------------------------------------- /test/nuts/repros/extra-classes/force-app-extra/Extra.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/repros/nested-classes/classes/ignored/Ignored.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/repros/nested-classes2/classes/ignored/Ignored.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 51.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/vivek-project/sfdx-source/unsorted/main/default/.placeholder: -------------------------------------------------------------------------------- 1 | This file is just a placeholder. 2 | 3 | It ensures that an otherwise empty directory path is captured by Git. 4 | 5 | You can delete this file after cloning this project to your local machine. -------------------------------------------------------------------------------- /test/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@salesforce/dev-config/tsconfig-test-strict", 3 | "include": ["./**/*.ts"], 4 | "compilerOptions": { 5 | "skipLibCheck": true, 6 | "moduleResolution": "Node16", 7 | "module": "Node16" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/config/loginAppPage.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmsSettings": {}, 3 | "id": "99145371-a7c0-4ca6-bf2f-708461f8d821", 4 | "label": "login", 5 | "templateName": "Login Template", 6 | "type": "appPage" 7 | } 8 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/pages/CommunitiesLanding.page: -------------------------------------------------------------------------------- 1 | 7 | 8 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/tabs/Order__c.tab-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | Custom13: Box 5 | 6 | -------------------------------------------------------------------------------- /.github/workflows/automerge.yml: -------------------------------------------------------------------------------- 1 | name: automerge 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: '42 2,5,8,11 * * *' 6 | 7 | jobs: 8 | automerge: 9 | uses: salesforcecli/github-workflows/.github/workflows/automerge.yml@main 10 | secrets: inherit 11 | -------------------------------------------------------------------------------- /.github/workflows/devScripts.yml: -------------------------------------------------------------------------------- 1 | name: devScripts 2 | on: 3 | workflow_dispatch: 4 | schedule: 5 | - cron: '50 6 * * 0' 6 | 7 | jobs: 8 | update: 9 | uses: salesforcecli/github-workflows/.github/workflows/devScriptsUpdate.yml@main 10 | secrets: inherit 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/classes/PagedResult.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/tabs/Product_Family__c.tab-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | Custom18: Form 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/tabs/Product__c.tab-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | Custom57: Building Block 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/classes/HeroDetailsPositionCustomPicklist.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/classes/OrderController.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/classes/ProductController.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | Active 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/placeholder/placeholder.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Technical writers will be added as reviewers on markdown changes. 2 | *.md @forcedotcom/cli-docs 3 | 4 | # Comment line immediately above ownership line is reserved for related other information. Please be careful while editing. 5 | #ECCN:Open Source 6 | #GUSINFO:Platform CLI,Platform CLI -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/heroDetails/heroDetails.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productCard/productCard.css: -------------------------------------------------------------------------------- 1 | img.product { 2 | width: 100%; 3 | margin-bottom: 0.5rem; 4 | } 5 | 6 | section { 7 | font-weight: bold; 8 | font-size: 0.85rem; 9 | margin-top: 0.75rem; 10 | text-transform: uppercase; 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/repros/dupclasses/sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [ 3 | { "path": "pkg2", "default": true }, 4 | { "path": "pkg1", "default": false } 5 | ], 6 | "namespace": "", 7 | "sfdcLoginUrl": "https://login.salesforce.com", 8 | "sourceApiVersion": "53.0" 9 | } 10 | -------------------------------------------------------------------------------- /test/nuts/repros/duplabels/sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [ 3 | { "path": "pkg1", "default": true }, 4 | { "path": "pkg2", "default": false } 5 | ], 6 | "namespace": "", 7 | "sfdcLoginUrl": "https://login.salesforce.com", 8 | "sourceApiVersion": "53.0" 9 | } 10 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/lwc/testComp/myComp.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 56.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/errorPanel/errorPanel.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/heroDetails/heroDetails.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/paginator/paginator.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/placeholder/placeholder.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/digitalExperiences/site/Xcel_Energy1/Xcel_Energy1.digitalExperience-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.eslintignore: -------------------------------------------------------------------------------- 1 | **/lwc/**/*.css 2 | **/lwc/**/*.html 3 | **/lwc/**/*.json 4 | **/lwc/**/*.svg 5 | **/lwc/**/*.xml 6 | **/aura/**/*.auradoc 7 | **/aura/**/*.cmp 8 | **/aura/**/*.css 9 | **/aura/**/*.design 10 | **/aura/**/*.json 11 | **/aura/**/*.svg 12 | **/aura/**/*.xml 13 | .sfdx 14 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/orderItemTile/orderItemTile.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/staticresources/bike_assets.resource-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Public 4 | application/zip 5 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.prettierignore: -------------------------------------------------------------------------------- 1 | # List files or directories below to ignore them when running prettier 2 | # More information: https://prettier.io/docs/en/ignore.html 3 | # 4 | 5 | lcc-react-js-bike-model/ 6 | **/staticresources/** 7 | .localdevserver 8 | .sfdx 9 | .vscode 10 | jsconfig.json 11 | coverage/ -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/classes/TestOrderController.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 52.0 7 | Active 8 | 9 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productListItem/productListItem.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | false 5 | 6 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/staticresources/ZippedResource.resource-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | ; 3 | Public 4 | application/zip 5 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/classes/TestProductController.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 52.0 7 | Active 8 | 9 | -------------------------------------------------------------------------------- /test/nuts/vivek-project/sfdx-source/packaged/main/objects/Workbook__c/listViews/All.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | All 4 | Everything 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/nuts/vivek-project/sfdx-source/packaged/main/objects/Workshop__c/listViews/All.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | All 4 | Everything 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/classes/ProductRecordInfoController.cls-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 52.0 7 | Active 8 | 9 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1.site-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ChatterNetworkPicasso 5 | ebikes/s 6 | 7 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/ldsUtils/ldsUtils.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 52.0 7 | false 8 | 9 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/experiences/fooEB/fooEB.site-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ChatterNetworkPicasso 5 | fooEB/s 6 | 7 | -------------------------------------------------------------------------------- /.github/workflows/validate-pr.yml: -------------------------------------------------------------------------------- 1 | name: pr-validation 2 | 3 | on: 4 | pull_request: 5 | types: [opened, reopened, edited] 6 | # only applies to PRs that want to merge to main 7 | branches: [main] 8 | 9 | jobs: 10 | pr-validation: 11 | uses: salesforcecli/github-workflows/.github/workflows/validatePR.yml@main 12 | -------------------------------------------------------------------------------- /test/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | // Generated - Do not modify. Controlled by @salesforce/dev-scripts 2 | // See more at https://github.com/forcedotcom/sfdx-dev-packages/tree/master/packages/dev-scripts 3 | 4 | module.exports = { 5 | extends: '../.eslintrc.cjs', 6 | // Allow describe and it 7 | env: { mocha: true }, 8 | rules: {}, 9 | }; 10 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productTile/productTile.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | true 5 | Product Tile 6 | 7 | -------------------------------------------------------------------------------- /.sfdevrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "test": { 3 | "testsPath": "test/**/*.test.ts" 4 | }, 5 | "wireit": { 6 | "compile": { 7 | "command": "tspc -p . --pretty --incremental", 8 | "files": ["src/**/*.ts", "tsconfig.json", "messages"], 9 | "output": ["lib/**", "*.tsbuildinfo"], 10 | "clean": "if-file-deleted" 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@salesforce/eslint-config-lwc/recommended", "prettier"], 3 | "overrides": [ 4 | { 5 | "files": ["*.test.js"], 6 | "rules": { 7 | "@lwc/lwc/no-unexpected-wire-adapter-usages": "off" 8 | } 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /command-snapshot.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "command": "source:commit", 4 | "plugin": "@salesforce/plugin-template", 5 | "flags": ["apiversion", "json", "loglevel", "targetusername"] 6 | }, 7 | { 8 | "command": "source:status", 9 | "plugin": "@salesforce/plugin-template", 10 | "flags": ["apiversion", "json", "loglevel", "targetusername"] 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.cmp-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 52.0 7 | A Lightning Component Bundle 8 | 9 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/tabs/Product_Explorer.tab-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Created by Lightning App Builder 4 | Product_Explorer 5 | 6 | Custom3: Sun 7 | 8 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./node_modules/@salesforce/dev-config/tsconfig-strict", 3 | "compilerOptions": { 4 | "outDir": "./lib", 5 | "skipLibCheck": true, 6 | "plugins": [{ "transform": "@salesforce/core/messageTransformer", "import": "messageTransformer" }], 7 | "moduleResolution": "Node16", 8 | "module": "Node16" 9 | }, 10 | "include": ["src/**/*.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/config/mainAppPage.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmsSettings": {}, 3 | "currentThemeId": "1de30f59-39c2-4185-8b07-e304750c2009", 4 | "headMarkup": "", 5 | "id": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 6 | "isRelaxedCSPLevel": false, 7 | "label": "main", 8 | "templateName": "Starter Template", 9 | "type": "appPage" 10 | } 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/classes/PagedResult.cls: -------------------------------------------------------------------------------- 1 | public with sharing class PagedResult { 2 | @AuraEnabled 3 | public Integer pageSize { get; set; } 4 | 5 | @AuraEnabled 6 | public Integer pageNumber { get; set; } 7 | 8 | @AuraEnabled 9 | public Integer totalItemCount { get; set; } 10 | 11 | @AuraEnabled 12 | public Object[] records { get; set; } 13 | } 14 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "none", 3 | "singleQuote": true, 4 | "tabWidth": 4, 5 | "overrides": [ 6 | { 7 | "files": "**/lwc/**/*.html", 8 | "options": { "parser": "lwc" } 9 | }, 10 | { 11 | "files": "*.{cmp,page,component}", 12 | "options": { "parser": "html" } 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/login.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "e6e40fca-b8df-44af-88e7-5a9096ff0dc7", 3 | "appPageId": "99145371-a7c0-4ca6-bf2f-708461f8d821", 4 | "configurationTags": [], 5 | "id": "5bf6d3f2-f54a-46ef-922e-21dc8534e68f", 6 | "label": "Login", 7 | "routeType": "login-home", 8 | "type": "route", 9 | "urlPrefix": "" 10 | } 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/placeholder/placeholder.js: -------------------------------------------------------------------------------- 1 | import { LightningElement, api } from 'lwc'; 2 | 3 | /** Static Resources. */ 4 | import BIKE_ASSETS_URL from '@salesforce/resourceUrl/bike_assets'; 5 | 6 | export default class Placeholder extends LightningElement { 7 | @api message; 8 | 9 | /** Url for bike logo. */ 10 | logoUrl = `${BIKE_ASSETS_URL}/logo.svg`; 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/similarProducts/__tests__/data/getRecord.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiName": "Product__c", 3 | "childRelationships": {}, 4 | "eTag": "846fdcd21a53214d447e578adbe263c6", 5 | "fields": { 6 | "Product_Family__c": { 7 | "displayValue": null, 8 | "value": "amy@demo.net" 9 | } 10 | }, 11 | "id": "0031700000pHcf8AAC" 12 | } 13 | -------------------------------------------------------------------------------- /test/nuts/repros/nested-classes/README.md: -------------------------------------------------------------------------------- 1 | # Test for .gitignore file causing metadata to be ignore when using force:source:push:beta 2 | 3 | To run: 4 | 5 | sfdx force:source:beta:push -f 6 | 7 | Actual Output: 8 | 9 | No results found 10 | 11 | Expected Output: 12 | 13 | Ignored.cls should be deployed, if you remove classes/.gitignore it will be. Tested on sfdx-cli/7.131.0 darwin-x64 node-v12.22.7. 14 | -------------------------------------------------------------------------------- /test/nuts/repros/nested-classes2/README.md: -------------------------------------------------------------------------------- 1 | # Test for .gitignore file causing metadata to be ignore when using force:source:push:beta 2 | 3 | To run: 4 | 5 | sfdx force:source:beta:push -f 6 | 7 | Actual Output: 8 | 9 | No results found 10 | 11 | Expected Output: 12 | 13 | Ignored.cls should be deployed, if you remove classes/.gitignore it will be. Tested on sfdx-cli/7.131.0 darwin-x64 node-v12.22.7. 14 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | ## Security 2 | 3 | Please report any security issue to [security@salesforce.com](mailto:security@salesforce.com) 4 | as soon as it is discovered. This library limits its runtime dependencies in 5 | order to reduce the total cost of ownership as much as can be, but all consumers 6 | should remain vigilant and have their security stakeholders review all third-party 7 | products (3PP) like this one and their dependencies. 8 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/loginError.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "dec3d4ed-0782-494b-9242-94dafc6cba9a", 3 | "appPageId": "99145371-a7c0-4ca6-bf2f-708461f8d821", 4 | "configurationTags": [], 5 | "id": "a25f6d5f-e959-4942-968a-1c56d489f1fb", 6 | "label": "Login Error", 7 | "routeType": "login-error", 8 | "type": "route", 9 | "urlPrefix": "error" 10 | } 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/recordDetail.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "af3a4208-3892-4c64-a7da-4d89dbf73bcb", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "f2f10127-b247-43df-b016-91bd62bc4c09", 6 | "label": "Record Detail", 7 | "routeType": "detail", 8 | "type": "route", 9 | "urlPrefix": "detail" 10 | } 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/register.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "c20b51fb-94a9-46e0-a944-c0511e0957cf", 3 | "appPageId": "99145371-a7c0-4ca6-bf2f-708461f8d821", 4 | "configurationTags": [], 5 | "id": "f6e8a5f5-92bf-4798-908a-b210093187c5", 6 | "label": "Register", 7 | "routeType": "self-register", 8 | "type": "route", 9 | "urlPrefix": "SelfRegister" 10 | } 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productTile/productTile.css: -------------------------------------------------------------------------------- 1 | .content { 2 | padding: 8px; 3 | background-color: #ffffff; 4 | border-radius: 0.25rem; 5 | } 6 | 7 | a { 8 | color: inherit; 9 | } 10 | 11 | img.product { 12 | height: 120px; 13 | max-width: initial; 14 | pointer-events: none; 15 | } 16 | 17 | .title { 18 | font-weight: bold; 19 | text-transform: uppercase; 20 | } 21 | -------------------------------------------------------------------------------- /test/nuts/repros/duplabels/pkg1/Test1.labels-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label1 5 | en_US 6 | false 7 | Short Description 8 | Some Value 9 | 10 | -------------------------------------------------------------------------------- /test/nuts/repros/duplabels/pkg2/Test2.labels-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Label1 5 | en_US 6 | false 7 | Short Description 8 | Some Value 9 | 10 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/home.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "08b8b3ba-a99c-4e87-88a9-e3178b81eb9f", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "0a2f46d6-852c-43f6-918b-dcf3cd3c554e", 6 | "label": "Home", 7 | "pageAccess": "Public", 8 | "routeType": "home", 9 | "type": "route", 10 | "urlPrefix": "" 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.design: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/createRecord.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "0832e8af-7900-4144-84cf-0d09812e25a9", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "3b095910-c486-4fdf-8105-f9dccb711864", 6 | "label": "Create Record", 7 | "routeType": "createrecord", 8 | "type": "route", 9 | "urlPrefix": "createrecord" 10 | } 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/SECURITY.md: -------------------------------------------------------------------------------- 1 | ## Security 2 | 3 | Please report any security issue to [security@salesforce.com](mailto:security@salesforce.com) 4 | as soon as it is discovered. This library limits its runtime dependencies in 5 | order to reduce the total cost of ownership as much as can be, but all consumers 6 | should remain vigilant and have their security stakeholders review all third-party 7 | products (3PP) like this one and their dependencies. 8 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/error.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "05bb79be-31b4-4fbf-82b9-46351381af7a", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "dc3897e1-7d5c-43e8-bc95-facfe437bd58", 6 | "label": "Error", 7 | "pageAccess": "UseParent", 8 | "routeType": "error", 9 | "type": "route", 10 | "urlPrefix": "error" 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Case/listViews/My_Cases.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | My_Cases 4 | CASES.CASE_NUMBER 5 | CASES.STATUS 6 | Product__c 7 | Mine 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Picture_URL__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Picture_URL__c 4 | false 5 | 6 | false 7 | false 8 | Url 9 | 10 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/forgotPassword.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "a39993c0-0c85-4ab2-b6a4-9d476532c627", 3 | "appPageId": "99145371-a7c0-4ca6-bf2f-708461f8d821", 4 | "configurationTags": [], 5 | "id": "4d11ba48-ae98-4f79-be18-773b4a58bc43", 6 | "label": "Forgot Password", 7 | "routeType": "forgot-password", 8 | "type": "route", 9 | "urlPrefix": "ForgotPassword" 10 | } 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productTileList/productTileList.css: -------------------------------------------------------------------------------- 1 | .slds-card { 2 | background: rgb(243, 242, 242); 3 | } 4 | 5 | .search-bar { 6 | display: block; 7 | margin: 0 0.5rem 0.3rem 0.5rem; 8 | } 9 | 10 | .content { 11 | display: flex; 12 | flex-wrap: wrap; 13 | } 14 | 15 | c-product-tile { 16 | min-width: 200px; 17 | flex: 1; 18 | } 19 | 20 | c-paginator { 21 | display: block; 22 | } 23 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/checkPassword.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "ab661696-53be-4597-b29f-7410c59486fa", 3 | "appPageId": "99145371-a7c0-4ca6-bf2f-708461f8d821", 4 | "configurationTags": [], 5 | "id": "dd3385f8-c3f7-4e2a-867a-61b0bd794282", 6 | "label": "Check Password", 7 | "routeType": "check-password", 8 | "type": "route", 9 | "urlPrefix": "CheckPasswordResetEmail" 10 | } 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product_Family__c/fields/Description__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Description__c 4 | false 5 | 6 | false 7 | false 8 | TextArea 9 | 10 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/pages/CommunitiesLanding.page-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | false 5 | false 6 | Default communities landing page 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/recordList.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "a3538c57-83b2-4701-9517-a5f85ef7f86c", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "60623e7d-210a-4263-9d0f-08289b2ecb29", 6 | "label": "Record List", 7 | "pageAccess": "UseParent", 8 | "routeType": "list", 9 | "type": "route", 10 | "urlPrefix": "recordlist" 11 | } 12 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.exclude": { 3 | "**/.git": true, 4 | "**/.svn": true, 5 | "**/.hg": true, 6 | "**/CVS": true, 7 | "**/.DS_Store": true 8 | }, 9 | "search.exclude": { 10 | "**/lib": true, 11 | "**/bin": true 12 | }, 13 | "editor.tabSize": 2, 14 | "editor.formatOnSave": true, 15 | "rewrap.wrappingColumn": 80, 16 | "cSpell.words": ["repros"], 17 | "typescript.tsdk": "node_modules/typescript/lib" 18 | } 19 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/data/sample-data-plan.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "sobject": "Account__c", 4 | "saveRefs": false, 5 | "files": ["Accounts.json"] 6 | }, 7 | { 8 | "sobject": "Product_Family__c", 9 | "saveRefs": true, 10 | "files": ["Product_Family__cs.json"] 11 | }, 12 | { 13 | "sobject": "Product__c", 14 | "resolveRefs": true, 15 | "files": ["Product__cs.json"] 16 | } 17 | ] 18 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/search.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "7067e1f5-ea41-46a0-8a85-9b528ac7ca67", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "42b99c23-3e80-4705-8863-79027b6b031d", 6 | "label": "Search", 7 | "pageAccess": "UseParent", 8 | "routeType": "global-search", 9 | "type": "route", 10 | "urlPrefix": "global-search" 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/productList.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "64ffb57c-d489-405b-8ef0-9e305b69108a", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "ec3c57ca-598e-42e4-9624-11534b0fa9a9", 6 | "label": "Product List", 7 | "objectApiName": "Product__c", 8 | "routeType": "list-a03", 9 | "type": "route", 10 | "urlPrefix": "product" 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/createCase.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "4febe178-894b-4426-8345-87a24eb8161d", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "806ddd2e-4c9e-4173-9887-3d86f1c22a64", 6 | "label": "Create Case", 7 | "pageAccess": "UseParent", 8 | "routeType": "custom-create-case", 9 | "type": "route", 10 | "urlPrefix": "create-case" 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/productDetail.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "ac8fec2e-cdb0-4d1f-b114-7052cd201195", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "ee4ca899-d9e4-4054-999d-2604c74b1320", 6 | "label": "Product Detail", 7 | "objectApiName": "Product__c", 8 | "routeType": "detail-a03", 9 | "type": "route", 10 | "urlPrefix": "product" 11 | } 12 | -------------------------------------------------------------------------------- /scripts/esbuild.config.mjs: -------------------------------------------------------------------------------- 1 | import { build } from 'esbuild'; 2 | 3 | await build({ 4 | bundle: true, 5 | format: 'cjs', 6 | platform: 'node', 7 | external: [], // The whitelist of dependencies that are not bundle-able 8 | keepNames: true, 9 | plugins: [], 10 | supported: { 11 | 'dynamic-import': false, 12 | }, 13 | logOverride: { 14 | 'unsupported-dynamic-import': 'error', 15 | }, 16 | entryPoints: ['./lib/index.js'], 17 | outdir: 'dist', 18 | }); 19 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.github/workflows/auto-assign.yml: -------------------------------------------------------------------------------- 1 | name: Issue assignment 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | auto-assign: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: 'Auto-assign issue' 12 | uses: pozil/auto-assign-issue@v1 13 | with: 14 | repo-token: ${{ secrets.GITHUB_TOKEN }} 15 | assignees: ${{ secrets.DEFAULT_ISSUE_ASSIGNEE }} 16 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### What does this PR do? 2 | 3 | ### What issues does this PR fix or reference? 4 | 5 | # 6 | 7 | ## The PR fulfills these requirements: 8 | 9 | [ ] Tests for the proposed changes have been added/updated. 10 | [ ] Code linting and formatting was performed. 11 | 12 | ### Functionality Before 13 | 14 | 15 | 16 | ### Functionality After 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/relatedRecordList.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "612a81a7-50e3-46bf-b5cd-bf7bfd2ba62a", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "24dd466b-ece1-4383-8113-807fe64a0861", 6 | "label": "Related Record List", 7 | "pageAccess": "UseParent", 8 | "routeType": "relatedlist", 9 | "type": "route", 10 | "urlPrefix": "relatedlist" 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/createCase/createCase.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 52.0 7 | true 8 | Create Case 9 | 10 | lightningCommunity__Page 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Fork__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Fork__c 4 | false 5 | 6 | 100 7 | false 8 | false 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/productRelatedList.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "e264ab42-0382-4aa8-bb39-56df8e6f0aaa", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "af36f75a-4c29-489a-9aee-e147e19661e5", 6 | "label": "Product Related List", 7 | "objectApiName": "Product__c", 8 | "routeType": "relatedlist-a03", 9 | "type": "route", 10 | "urlPrefix": "product" 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Description__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Description__c 4 | false 5 | 6 | 1000 7 | false 8 | LongTextArea 9 | 5 10 | 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/MSRP__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | MSRP__c 4 | false 5 | 6 | 6 7 | false 8 | 0 9 | false 10 | Currency 11 | 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Motor__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Motor__c 4 | false 5 | 6 | 100 7 | false 8 | false 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/productExplorer.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "3f05e628-072b-4e52-b235-ca04100be399", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "8a0ce10b-80be-4463-8a0b-81bf50a70be3", 6 | "label": "Product Explorer", 7 | "pageAccess": "UseParent", 8 | "routeType": "custom-product-explorer", 9 | "type": "route", 10 | "urlPrefix": "product-explorer" 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/productFamilyList.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "33b22787-79f5-484a-a68d-336253ee7c9d", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "0c98ee0e-451e-40cd-ae0c-703c8bfa5409", 6 | "label": "Product Family List", 7 | "objectApiName": "Product_Family__c", 8 | "routeType": "list-a02", 9 | "type": "route", 10 | "urlPrefix": "product-family" 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/serviceNotAvailable.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "051e5cc7-26ba-4366-a9f6-a0067e0d96aa", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": ["allow-in-static-site"], 5 | "id": "5bc1ef73-1ab6-47c6-be70-e22710335d7a", 6 | "label": "Service Not Available", 7 | "routeType": "service-not-available", 8 | "type": "route", 9 | "urlPrefix": "service-not-available" 10 | } 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Order_Item__c/fields/Price__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Price__c 4 | false 5 | 6 | 6 7 | false 8 | 0 9 | false 10 | Currency 11 | 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Battery__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Battery__c 4 | false 5 | 6 | 100 7 | false 8 | false 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Charger__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Charger__c 4 | false 5 | 6 | 100 7 | false 8 | false 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/productFamilyDetail.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "c177692a-740d-4c05-8dce-e725b859f8a1", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "8f06df84-e849-481e-8113-863a18531f2c", 6 | "label": "Product Family Detail", 7 | "objectApiName": "Product_Family__c", 8 | "routeType": "detail-a02", 9 | "type": "route", 10 | "urlPrefix": "product-family" 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/digitalExperiences/site/Xcel_Energy1/sfdc_cms__view/home/de.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "sfdc_cms__view", 3 | "title": "Home", 4 | "contentBody": { 5 | "sfdc_cms:component": { 6 | "sfdc_cms:children": [ 7 | { 8 | "componentAttributes": { 9 | "text": "Energy Savings in Germany" 10 | }, 11 | "sfdc_cms:id": "48307a75-c62b-4773-83d0-80bafd21a072" 12 | } 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/digitalExperiences/site/Xcel_Energy1/sfdc_cms__view/home/fr.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "sfdc_cms__view", 3 | "title": "Home", 4 | "contentBody": { 5 | "sfdc_cms:component": { 6 | "sfdc_cms:children": [ 7 | { 8 | "componentAttributes": { 9 | "text": "Energy Savings in France" 10 | }, 11 | "sfdc_cms:id": "48307a75-c62b-4773-83d0-80bafd21a072" 12 | } 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /.github/no-response.yml: -------------------------------------------------------------------------------- 1 | # Configuration for probot-no-response - https://github.com/probot/no-response 2 | 3 | daysUntilClose: 7 4 | responseRequiredLabel: 'more information required' 5 | closeComment: > 6 | This issue has been automatically closed because there has been no response 7 | to our request for more information from the original author. Currently, there 8 | is not enough information provided for us to take action. Please reply and 9 | reopen this issue if you need additional assistance. 10 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Front_Brakes__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Front_Brakes__c 4 | false 5 | 6 | 100 7 | false 8 | false 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Rear_Brakes__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Rear_Brakes__c 4 | false 5 | 6 | 100 7 | false 8 | false 9 | Text 10 | false 11 | 12 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/digitalExperiences/site/Xcel_Energy1/sfdc_cms__view/home/mobile.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "sfdc_cms__view", 3 | "title": "Home", 4 | "contentBody": { 5 | "sfdc_cms:component": { 6 | "sfdc_cms:children": [ 7 | { 8 | "componentAttributes": { 9 | "text": "Energy Savings in Mobile form factor" 10 | }, 11 | "sfdc_cms:id": "48307a75-c62b-4773-83d0-80bafd21a072" 12 | } 13 | ] 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/routes/productFamilyRelatedList.json: -------------------------------------------------------------------------------- 1 | { 2 | "activeViewId": "eb60ff2f-bca3-4cc7-befe-74a5cc28d67f", 3 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 4 | "configurationTags": [], 5 | "id": "3735ee76-cd70-4ebb-bf1d-3d0d3193d8de", 6 | "label": "Product Family Related List", 7 | "objectApiName": "Product_Family__c", 8 | "routeType": "relatedlist-a02", 9 | "type": "route", 10 | "urlPrefix": "product-family" 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/repros/extra-classes/README.md: -------------------------------------------------------------------------------- 1 | # Test for non-packageDirectory metadata being deployed when using force:source:beta:push 2 | 3 | To run: 4 | 5 | sfdx force:source:beta:push -f 6 | 7 | Actual Output: 8 | 9 | *** Pushing with SOAP API v53.0 *** 10 | SOURCE PROGRESS | ████████████████████████████████████████ | 2/2 Components 11 | 12 | Expected Output: 13 | 14 | Only Base.cls should be deployed, Extra.cls is not in a named package directory. Tested on sfdx-cli/7.131.0 darwin-x64 node-v12.22.7. 15 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product_Family__c/listViews/All_Product_Families.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | All_Product_Families 4 | NAME 5 | Everything 6 | 7 | 8 | CEO 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productFilter/__tests__/data/getPicklistValues.json: -------------------------------------------------------------------------------- 1 | { 2 | "controllerValues": {}, 3 | "defaultValue": null, 4 | "eTag": "57e25eb0b5ecf048c873387bdbd07b80", 5 | "url": "/services/data/v49.0/ui-api/object-info/Product__c/picklist-values/012000000000000AAA/Category__c", 6 | "values": [ 7 | { 8 | "attributes": null, 9 | "label": "MockValue", 10 | "validFor": [], 11 | "value": "MockValue" 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productFilter/productFilter.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | true 5 | Product Filter 6 | 7 | lightning__AppPage 8 | lightning__HomePage 9 | lightningCommunity__Page 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/messageChannel/ProductSelected.messageChannel-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ProductSelected 4 | This event is fired when a product is selected. 5 | 6 | productId 7 | Selected product Id. 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.github/workflows/codetour-watch.yml: -------------------------------------------------------------------------------- 1 | name: CodeTour watch 2 | 3 | on: 4 | pull_request: 5 | types: [opened, edited, synchronize, reopened] 6 | 7 | jobs: 8 | codetour-watch: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: 'Checkout source code' 12 | uses: actions/checkout@v2 13 | 14 | - name: 'Watch CodeTour changes' 15 | uses: pozil/codetour-watch@v1.2.0 16 | with: 17 | repo-token: ${{ secrets.GITHUB_TOKEN }} 18 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/config/eBikes.json: -------------------------------------------------------------------------------- 1 | { 2 | "forgotPasswordRouteId": "4d11ba48-ae98-4f79-be18-773b4a58bc43", 3 | "isAvailableToGuests": true, 4 | "isFilteredComponentsView": false, 5 | "isProgressiveRenderingEnabled": false, 6 | "loginAppPageId": "99145371-a7c0-4ca6-bf2f-708461f8d821", 7 | "mainAppPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 8 | "preferredDomain": "none", 9 | "selfRegistrationRouteId": "f6e8a5f5-92bf-4798-908a-b210093187c5", 10 | "type": "site" 11 | } 12 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/messageChannel/ProductsFiltered.messageChannel-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ProductsFiltered 4 | This event is fired when product filters change. 5 | 6 | filters 7 | Current product filters 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Order_Item__c/fields/Qty_L__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Qty_L__c 4 | 1 5 | false 6 | 7 | 3 8 | false 9 | 0 10 | false 11 | Number 12 | false 13 | 14 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Order_Item__c/fields/Qty_M__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Qty_M__c 4 | 1 5 | false 6 | 7 | 3 8 | false 9 | 0 10 | false 11 | Number 12 | false 13 | 14 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Order_Item__c/fields/Qty_S__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Qty_S__c 4 | 1 5 | false 6 | 7 | 3 8 | false 9 | 0 10 | false 11 | Number 12 | false 13 | 14 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.github/workflows/welcome.yml: -------------------------------------------------------------------------------- 1 | name: Greeting 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | comment: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: rytswd/respost@v0.1.0 12 | with: 13 | title: Welcome! 👋 14 | body: 'Thank you for posting this issue. 🙇🏼‍♂️ We will come back to you latest within the next 48h (working days). Stay tuned!' 15 | env: 16 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 17 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/hero/hero.html: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/hero/hero.css: -------------------------------------------------------------------------------- 1 | :host { 2 | position: relative; 3 | display: block; 4 | } 5 | 6 | img, 7 | video { 8 | position: relative; 9 | width: 100%; 10 | } 11 | 12 | .c-hero-center-default, 13 | .c-hero-center-left { 14 | top: 30%; 15 | left: 10%; 16 | } 17 | 18 | .c-hero-center-right { 19 | top: 30%; 20 | right: 10%; 21 | } 22 | 23 | div { 24 | background-color: black; 25 | opacity: 0.5; 26 | top: 0; 27 | bottom: 0; 28 | left: 0; 29 | right: 0; 30 | position: absolute; 31 | } 32 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Account/listViews/All_Acounts.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | All_Acounts 4 | ACCOUNT.NAME 5 | ACCOUNT.ADDRESS1_STATE 6 | CORE.USERS.ALIAS 7 | Everything 8 | 9 | 10 | CEO 11 | 12 | 13 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/contentassets/logo.asset-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | en_US 4 | logo 5 | 6 | 7 | VIEWER 8 | 9 | 10 | 11 | 12 | 1 13 | logo.png 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/cspTrustedSites/s3_us_west_1_amazonaws_com.cspTrustedSite-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Communities 4 | s3_us_west_1_amazonaws_com Trusted Site Added Via Community Builder 6 | https://s3-us-west-1.amazonaws.com 7 | true 8 | true 9 | true 10 | 11 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Order__c/fields/Account__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Account__c 4 | Restrict 5 | false 6 | 7 | Account 8 | Orders 9 | true 10 | false 11 | false 12 | Lookup 13 | 14 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/listViews/ProductList.listView-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | ProductList 4 | OBJECT_ID 5 | NAME 6 | MSRP__c 7 | Description__c 8 | Category__c 9 | Level__c 10 | Picture_URL__c 11 | Material__c 12 | Everything 13 | 14 | 15 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Order_Item__c/fields/Product__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Product__c 4 | SetNull 5 | false 6 | 7 | Product__c 8 | Order Items 9 | Order_Items 10 | false 11 | false 12 | Lookup 13 | 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | --- 5 | 6 | **Is your feature request related to a problem? Please describe.** 7 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 8 | 9 | **Describe the solution you'd like** 10 | A clear and concise description of what you want to happen. 11 | 12 | **Describe alternatives you've considered** 13 | A clear and concise description of any alternative solutions or features you've considered. 14 | 15 | **Additional context** 16 | Add any other context or screenshots about the feature request here. 17 | -------------------------------------------------------------------------------- /test/nuts/repros/partialBundleDelete/force-app/lwc/testComp/myComp.html: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/jest.config.js: -------------------------------------------------------------------------------- 1 | const { jestConfig } = require('@salesforce/sfdx-lwc-jest/config'); 2 | const setupFilesAfterEnv = jestConfig.setupFilesAfterEnv || []; 3 | setupFilesAfterEnv.push('/jest-sa11y-setup.js'); 4 | module.exports = { 5 | ...jestConfig, 6 | moduleNameMapper: { 7 | '^@salesforce/apex$': '/force-app/test/jest-mocks/apex', 8 | '^lightning/navigation$': 9 | '/force-app/test/jest-mocks/lightning/navigation', 10 | '^lightning/messageService$': 11 | '/force-app/test/jest-mocks/lightning/messageService' 12 | }, 13 | setupFilesAfterEnv 14 | }; 15 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Product_Family__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Product_Family__c 4 | SetNull 5 | false 6 | 7 | Product_Family__c 8 | Products 9 | Products 10 | false 11 | false 12 | Lookup 13 | 14 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/classes/OrderController.cls: -------------------------------------------------------------------------------- 1 | public with sharing class OrderController { 2 | @AuraEnabled(Cacheable=true) 3 | public static Order_Item__c[] getOrderItems(Id orderId) { 4 | return [ 5 | SELECT 6 | Id, 7 | Qty_S__c, 8 | Qty_M__c, 9 | Qty_L__c, 10 | Price__c, 11 | Product__r.Name, 12 | Product__r.MSRP__c, 13 | Product__r.Picture_URL__c 14 | FROM Order_Item__c 15 | WHERE Order__c = :orderId 16 | WITH SECURITY_ENFORCED 17 | ]; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/accountMap/accountMap.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | true 5 | Account Map 6 | 7 | lightning__RecordPage 8 | 9 | 10 | 11 | 12 | Account 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: 'npm' 4 | directory: '/' 5 | schedule: 6 | interval: 'weekly' 7 | day: 'saturday' 8 | versioning-strategy: 'increase' 9 | labels: 10 | - 'dependencies' 11 | open-pull-requests-limit: 5 12 | pull-request-branch-name: 13 | separator: '-' 14 | commit-message: 15 | # cause a release for non-dev-deps 16 | prefix: fix(deps) 17 | # no release for dev-deps 18 | prefix-development: chore(dev-deps) 19 | ignore: 20 | - dependency-name: '@salesforce/dev-scripts' 21 | - dependency-name: '*' 22 | update-types: ['version-update:semver-major'] 23 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/accountMap/__tests__/data/getRecordWithoutAddress.json: -------------------------------------------------------------------------------- 1 | { 2 | "fields": { 3 | "BillingCity": { 4 | "displayValue": null, 5 | "value": null 6 | }, 7 | "BillingCountry": { 8 | "displayValue": null, 9 | "value": null 10 | }, 11 | "BillingPostalCode": { 12 | "displayValue": null, 13 | "value": null 14 | }, 15 | "BillingState": { 16 | "displayValue": null, 17 | "value": null 18 | }, 19 | "BillingStreet": { 20 | "displayValue": null, 21 | "value": null 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Case/fields/Product__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Product__c 4 | SetNull 5 | false 6 | 7 | Product__c 8 | Products 9 | Cases 10 | false 11 | false 12 | false 13 | false 14 | Lookup 15 | 16 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/orderBuilder/orderBuilder.css: -------------------------------------------------------------------------------- 1 | header { 2 | padding: 12px 16px; 3 | background-color: rgba(194, 51, 53, 1); 4 | color: #ffffff; 5 | border-top-left-radius: 0.25rem; 6 | border-top-right-radius: 0.25rem; 7 | display: flex; 8 | } 9 | 10 | header .right { 11 | flex: 1; 12 | text-align: right; 13 | } 14 | 15 | .order-total { 16 | margin-left: 4px; 17 | } 18 | 19 | .drop-zone { 20 | background: rgb(243, 242, 242); 21 | display: flex; 22 | flex-wrap: wrap; 23 | border-bottom-left-radius: 0.25rem; 24 | border-bottom-right-radius: 0.25rem; 25 | } 26 | 27 | c-placeholder, 28 | c-order-item-tile { 29 | min-width: 250px; 30 | flex: 1; 31 | } 32 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/accountMap/__tests__/data/getRecordWithAddress.json: -------------------------------------------------------------------------------- 1 | { 2 | "fields": { 3 | "BillingCity": { 4 | "displayValue": null, 5 | "value": "San Francisco" 6 | }, 7 | "BillingCountry": { 8 | "displayValue": null, 9 | "value": "USA" 10 | }, 11 | "BillingPostalCode": { 12 | "displayValue": null, 13 | "value": "94105" 14 | }, 15 | "BillingState": { 16 | "displayValue": null, 17 | "value": "California" 18 | }, 19 | "BillingStreet": { 20 | "displayValue": null, 21 | "value": "415 Mission St." 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Order_Item__c/fields/Order__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Order__c 4 | false 5 | 6 | Order__c 7 | Order Items 8 | Order_Items 9 | 0 10 | false 11 | false 12 | MasterDetail 13 | false 14 | 15 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/accountMap/accountMap.html: -------------------------------------------------------------------------------- 1 | 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # -- CLEAN 2 | tmp/ 3 | # use yarn by default, so ignore npm 4 | package-lock.json 5 | 6 | # never checkin npm config 7 | .npmrc 8 | 9 | # debug logs 10 | npm-error.log 11 | yarn-error.log 12 | lerna-debug.log 13 | 14 | # compile source 15 | lib 16 | dist 17 | 18 | # test artifacts 19 | *xunit.xml 20 | *checkstyle.xml 21 | *unitcoverage 22 | .nyc_output 23 | coverage 24 | test_session* 25 | 26 | # generated docs 27 | docs 28 | 29 | # ignore sfdx-trust files 30 | *.tgz 31 | *.sig 32 | package.json.bak. 33 | 34 | # -- CLEAN ALL 35 | *.tsbuildinfo 36 | .eslintcache 37 | .wireit 38 | node_modules 39 | 40 | # -- 41 | # put files here you don't want cleaned with sf-clean 42 | 43 | # os specific files 44 | .DS_Store 45 | .idea 46 | 47 | testProj* 48 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/networkBranding/cbE_Bikes.networkBranding-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | E-Bikes 4 | #1797C0 5 | #FFFFFF 6 | #B1BAC1 7 | #222222 8 | #51606E 9 | #DDE4E9 10 | #222222 11 | #51606E 12 | #FFFFFF 13 | 14 | -------------------------------------------------------------------------------- /test/init.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025, Salesforce, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | const path = require('path'); 17 | process.env.TS_NODE_PROJECT = path.resolve('test/tsconfig.json'); 18 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: 'Close stale issues and pull requests' 2 | on: 3 | schedule: 4 | - cron: '0 0 * * *' 5 | 6 | jobs: 7 | stale: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - uses: actions/stale@v1 11 | with: 12 | repo-token: ${{ secrets.GITHUB_TOKEN }} 13 | stale-issue-message: 'Flagging this as stale, as there was no recent activity within the last 14 days. 🧐' 14 | stale-pr-message: 'Ok, no one seems to work on this. Closing it now. 👋' 15 | stale-issue-label: 'no-issue-activity' 16 | stale-pr-label: 'no-pr-activity' 17 | days-before-stale: 14 18 | days-before-close: 7 19 | -------------------------------------------------------------------------------- /test/nuts/vivek-project/sfdx-project.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageDirectories": [ 3 | { 4 | "path": "sfdx-source/packaged", 5 | "default": false, 6 | "scopeProfiles": true, 7 | "package": "Training Hub", 8 | "versionName": "Summer '24", 9 | "versionNumber": "99.0.0.NEXT", 10 | "versionDescription": "Summer 2024 Release" 11 | }, 12 | { 13 | "path": "sfdx-source/unpackaged", 14 | "default": false 15 | }, 16 | { 17 | "path": "sfdx-source/unsorted", 18 | "default": true 19 | } 20 | ], 21 | "name": "training-hub-package", 22 | "namespace": "training_hub", 23 | "sfdcLoginUrl": "https://login.salesforce.com", 24 | "sourceApiVersion": "60.0", 25 | "packageAliases": { 26 | "Training Hub": "0Ho8X0000004CBOSA2" 27 | } 28 | } -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productCard/productCard.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | true 5 | Product Card 6 | 7 | lightning__AppPage 8 | lightning__RecordPage 9 | lightning__HomePage 10 | lightningCommunity__Page 11 | 12 | 13 | 14 | 15 | Product__c 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/config/project-scratch-def.json: -------------------------------------------------------------------------------- 1 | { 2 | "orgName": "Ebikes", 3 | "edition": "Developer", 4 | "adminEmail": "nut@mailinator.com", 5 | "hasSampleData": false, 6 | "features": ["Communities", "Walkthroughs", "EnableSetPasswordInApi"], 7 | "settings": { 8 | "communitiesSettings": { 9 | "enableNetworksEnabled": true 10 | }, 11 | "experienceBundleSettings": { 12 | "enableExperienceBundleMetadata": true 13 | }, 14 | "lightningExperienceSettings": { 15 | "enableS1DesktopEnabled": true 16 | }, 17 | "mobileSettings": { 18 | "enableS1EncryptedStoragePref2": false 19 | }, 20 | "userEngagementSettings": { 21 | "enableOrchestrationInSandbox": true 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /test/nuts/vivek-project/sfdx-source/packaged/main/objects/Workbook__c/fields/Learner_Profile_ID__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Learner_Profile_ID__c 4 | Local ID of the Profile that should be assigned to Participants who are "learners". 5 | false 6 | Local ID of the Profile that should be assigned to Participants who are "learners". 7 | 8 | 18 9 | true 10 | false 11 | false 12 | Text 13 | false 14 | 15 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/errorPanel/templates/inlineMessage.html: -------------------------------------------------------------------------------- 1 | 20 | -------------------------------------------------------------------------------- /test/nuts/vivek-project/sfdx-source/packaged/main/objects/Workbook__c/fields/Learner_Permset_Group__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Learner_Permset_Group__c 4 | Local ID of the Permission Set Group that should be applied to participants with the "learner" role. 5 | false 6 | Local ID of the Permission Set Group that should be applied to participants with the "learner" role. 7 | 8 | 18 9 | true 10 | false 11 | false 12 | Text 13 | false 14 | 15 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/orderBuilder/orderBuilder.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | true 5 | Order Builder 6 | 7 | lightning__AppPage 8 | lightning__RecordPage 9 | lightning__HomePage 10 | lightningCommunity__Page 11 | lightningCommunity__Default 12 | 13 | 14 | 15 | 16 | Order__c 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/orderItemTile/orderItemTile.css: -------------------------------------------------------------------------------- 1 | .content { 2 | padding: 8px 8px 12px 8px; 3 | background-color: #ffffff; 4 | position: relative; 5 | border-radius: 0.25rem; 6 | } 7 | 8 | img.product { 9 | height: 120px; 10 | max-width: initial; 11 | } 12 | 13 | .title { 14 | font-weight: bold; 15 | text-transform: uppercase; 16 | } 17 | 18 | .quantity { 19 | width: 58px; 20 | margin: 0 2px; 21 | } 22 | 23 | .price { 24 | width: 94px; 25 | margin: 0 2px; 26 | } 27 | 28 | .form { 29 | display: flex; 30 | } 31 | 32 | .save-button { 33 | position: absolute; 34 | top: 10px; 35 | right: 10px; 36 | } 37 | 38 | .delete-button { 39 | position: absolute; 40 | top: 10px; 41 | left: 10px; 42 | display: none; 43 | } 44 | 45 | .content:hover .delete-button { 46 | display: inherit; 47 | } 48 | -------------------------------------------------------------------------------- /test/nuts/repros/duplabels/README.md: -------------------------------------------------------------------------------- 1 | # Test for duplicate labels using force:source:push:beta 2 | 3 | To run: 4 | 5 | sfdx force:source:beta:push -f 6 | 7 | Actual Output: 8 | 9 | *** Pushing with SOAP API v53.0 *** 10 | (node:1152) Warning: The SFDX_MDAPI_TEMP_DIR environment variable is set, which may degrade performance 11 | SOURCE PROGRESS | ████████████████████████████████████████ | 2/2 Components 12 | 13 | === Component Failures [2] 14 | Type Name Problem 15 | ───── ────── ───────────────────────────────── 16 | Error Label1 Duplicate name 'Label1' specified 17 | Error Label1 Duplicate name 'Label1' specified 18 | 19 | ERROR running force:source:beta:push: Push failed. 20 | 21 | Expected Output: 22 | 23 | No error as 'pkg2' label overrides 'pkg1' label of same name when using MPD. Tested on fdx-cli/7.125.0 darwin-x64 node-v12.22.7. 24 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.gitignore: -------------------------------------------------------------------------------- 1 | # This file is used for Git repositories to specify intentionally untracked files that Git should ignore. 2 | # If you are not using git, you can delete this file. For more information see: https://git-scm.com/docs/gitignore 3 | # For useful gitignore templates see: https://github.com/github/gitignore 4 | 5 | # Salesforce dev 6 | .sfdx/ 7 | .localdevserver/ 8 | 9 | # LWC VSCode autocomplete 10 | jsconfig.json 11 | 12 | # Logs 13 | logs 14 | *.log 15 | npm-debug.log* 16 | yarn-debug.log* 17 | yarn-error.log* 18 | 19 | # Dependency directories 20 | node_modules/ 21 | yarn.lock 22 | 23 | # Eslint cache 24 | .eslintcache 25 | 26 | # MacOS system files 27 | .DS_Store 28 | 29 | # Windows system files 30 | Thumbs.db 31 | ehthumbs.db 32 | [Dd]esktop.ini 33 | $RECYCLE.BIN/ 34 | 35 | # VS Code project settings 36 | .vscode/* 37 | !.vscode/extensions.json 38 | 39 | # Codecov 40 | coverage 41 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/classes/HeroDetailsPositionCustomPicklist.cls: -------------------------------------------------------------------------------- 1 | global class HeroDetailsPositionCustomPicklist extends VisualEditor.DynamicPickList { 2 | global override VisualEditor.DataRow getDefaultValue() { 3 | VisualEditor.DataRow defaultValue = new VisualEditor.DataRow( 4 | 'Right', 5 | 'right' 6 | ); 7 | return defaultValue; 8 | } 9 | global override VisualEditor.DynamicPickListRows getValues() { 10 | VisualEditor.DataRow value1 = new VisualEditor.DataRow('Left', 'left'); 11 | VisualEditor.DataRow value2 = new VisualEditor.DataRow( 12 | 'Right', 13 | 'right' 14 | ); 15 | VisualEditor.DynamicPickListRows myValues = new VisualEditor.DynamicPickListRows(); 16 | myValues.addRow(value1); 17 | myValues.addRow(value2); 18 | return myValues; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/nuts/vivek-project/.forceignore: -------------------------------------------------------------------------------- 1 | # List files or directories below to ignore them when running "sf project deploy start" or "sf project retrieve start". 2 | # Run "sf project list ignored" at the command line to validate the list of ignored source files. 3 | # More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm 4 | # 5 | 6 | # Package XML files 7 | package.xml 8 | 9 | # LWC configuration files 10 | **/jsconfig.json 11 | **/.eslintrc.json 12 | 13 | # LWC Jest 14 | **/__tests__/** 15 | 16 | # Metadata Types to Fully Ignore 17 | **/appMenus 18 | **/duplicateRules 19 | 20 | # Profiles 21 | **.profile-meta.xml 22 | 23 | # Uncomment to NOT ignore the Admin profile 24 | #!**Admin.profile-meta.xml 25 | 26 | # Ignore the default permission set 27 | **/permissionsets/sfdcInternalInt__sfdc_scrt2.permissionset-meta.xml 28 | 29 | # Ignore Placeholder files 30 | **.placeholder -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/classes/TestOrderController.cls: -------------------------------------------------------------------------------- 1 | @isTest 2 | public class TestOrderController { 3 | @testSetup 4 | static void setup() { 5 | Account acc = new Account(Name = 'Sample Account'); 6 | insert acc; 7 | 8 | Order__c order = new Order__c(Account__c = acc.Id); 9 | insert order; 10 | 11 | Product__c p = new Product__c(Name = 'Sample Product'); 12 | insert p; 13 | 14 | Order_Item__c orderItem = new Order_Item__c( 15 | Order__c = order.Id, 16 | Product__c = p.Id 17 | ); 18 | insert orderItem; 19 | } 20 | 21 | @isTest 22 | static void testGetOrderItems() { 23 | Order__c testOrder = [SELECT Id FROM Order__c]; 24 | List orderItems = OrderController.getOrderItems( 25 | testOrder.Id 26 | ); 27 | System.assertEquals(orderItems.size(), 1); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productListItem/productListItem.js: -------------------------------------------------------------------------------- 1 | import { LightningElement, api } from 'lwc'; 2 | import { NavigationMixin } from 'lightning/navigation'; 3 | import PRODUCT_OBJECT from '@salesforce/schema/Product__c'; 4 | 5 | /** 6 | * A presentation component to display a Product__c sObject. The provided 7 | * Product__c data must contain all fields used by this component. 8 | */ 9 | export default class ProductListItem extends NavigationMixin(LightningElement) { 10 | @api product; 11 | 12 | /** View Details Handler to navigates to the record page */ 13 | handleViewDetailsClick() { 14 | this[NavigationMixin.Navigate]({ 15 | type: 'standard__recordPage', 16 | attributes: { 17 | recordId: this.product.Id, 18 | objectApiName: PRODUCT_OBJECT.objectApiName, 19 | actionName: 'view' 20 | } 21 | }); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/contentassets/ebikeslogo.asset-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | false 4 | en_US 5 | ebikeslogo 6 | E-Bikes 7 | 8 | 9 | VIEWER 10 | E-Bikes 11 | 12 | 13 | INFERRED 14 | true 15 | sfdc_asset_company_assets 16 | 17 | 18 | 19 | 20 | 1 21 | ebikes-logo.png 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/nuts/vivek-project/sfdx-source/packaged/main/objects/Workshop__c/fields/Workbook__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Workbook__c 4 | The workbook that will be used by this workshop. 5 | false 6 | The workbook that will be used by this workshop. 7 | 8 | Workbook__c 9 | Workshops 10 | Workshops 11 | 0 12 | true 13 | false 14 | false 15 | MasterDetail 16 | false 17 | 18 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/errorPanel/errorPanel.js: -------------------------------------------------------------------------------- 1 | import { LightningElement, api } from 'lwc'; 2 | import { reduceErrors } from 'c/ldsUtils'; 3 | import noDataIllustration from './templates/noDataIllustration.html'; 4 | import inlineMessage from './templates/inlineMessage.html'; 5 | 6 | export default class ErrorPanel extends LightningElement { 7 | /** Single or array of LDS errors */ 8 | @api errors; 9 | /** Generic / user-friendly message */ 10 | @api friendlyMessage = 'Error retrieving data'; 11 | /** Type of error message **/ 12 | @api type; 13 | 14 | viewDetails = false; 15 | 16 | get errorMessages() { 17 | return reduceErrors(this.errors); 18 | } 19 | 20 | handleShowDetailsClick() { 21 | this.viewDetails = !this.viewDetails; 22 | } 23 | 24 | render() { 25 | if (this.type === 'inlineMessage') return inlineMessage; 26 | return noDataIllustration; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Material__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Material__c 4 | false 5 | 6 | false 7 | false 8 | Picklist 9 | 10 | true 11 | 12 | false 13 | 14 | Aluminum 15 | false 16 | 17 | 18 | 19 | Carbon 20 | false 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Category__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Category__c 4 | false 5 | 6 | false 7 | false 8 | Picklist 9 | 10 | true 11 | 12 | false 13 | 14 | Mountain 15 | false 16 | 17 | 18 | 19 | Commuter 20 | false 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/paginator/paginator.js: -------------------------------------------------------------------------------- 1 | import { LightningElement, api } from 'lwc'; 2 | 3 | export default class Paginator extends LightningElement { 4 | /** The current page number. */ 5 | @api pageNumber; 6 | 7 | /** The number of items on a page. */ 8 | @api pageSize; 9 | 10 | /** The total number of items in the list. */ 11 | @api totalItemCount; 12 | 13 | handlePrevious() { 14 | this.dispatchEvent(new CustomEvent('previous')); 15 | } 16 | 17 | handleNext() { 18 | this.dispatchEvent(new CustomEvent('next')); 19 | } 20 | 21 | get currentPageNumber() { 22 | return this.totalItemCount === 0 ? 0 : this.pageNumber; 23 | } 24 | 25 | get isFirstPage() { 26 | return this.pageNumber === 1; 27 | } 28 | 29 | get isLastPage() { 30 | return this.pageNumber >= this.totalPages; 31 | } 32 | 33 | get totalPages() { 34 | return Math.ceil(this.totalItemCount / this.pageSize); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /test/nuts/repros/dupclasses/README.md: -------------------------------------------------------------------------------- 1 | # Test for duplicate classes using force:source:push:beta 2 | 3 | To run: 4 | 5 | sfdx force:source:beta:push -f 6 | 7 | Actual Output: 8 | 9 | *** Pushing with SOAP API v53.0 *** 10 | (node:21453) Warning: The SFDX_MDAPI_TEMP_DIR environment variable is set, which may degrade performance 11 | SOURCE PROGRESS | ████████████████████████████████████████ | 1/1 Components 12 | 13 | === Pushed Source 14 | STATE FULL NAME TYPE PROJECT PATH 15 | ─────── ───────── ───────── ─────────────────────── 16 | Changed Hello ApexClass pkg1/Hello.cls 17 | Changed Hello ApexClass pkg1/Hello.cls-meta.xml 18 | Changed Hello ApexClass pkg2/Hello.cls 19 | Changed Hello ApexClass pkg2/Hello.cls-meta.xml 20 | 21 | Hello.cls from pkg2 is deployed to the org. 22 | 23 | Expected Output: 24 | 25 | Hello.cls from pkg1 is deployed because it is second in MPD order in sfdx-project.json. Tested on fdx-cli/7.125.0 darwin-x64 node-v12.22.7. 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/Bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | --- 5 | 6 | 9 | 10 | 13 | 14 | ### Summary 15 | 16 | _Short summary of what is going on or to provide context_. 17 | 18 | ### Steps To Reproduce: 19 | 20 | 1. This is step 1. 21 | 1. This is step 2. All steps should start with '1.' 22 | 23 | ### Expected result 24 | 25 | _Describe what should have happened_. 26 | 27 | ### Actual result 28 | 29 | _Describe what actually happened instead_. 30 | 31 | ### Additional information 32 | 33 | _Feel free to attach a screenshot_. 34 | 35 | **VS Code Version**: 36 | 37 | **SFDX CLI Version**: 38 | 39 | **OS and version**: 40 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/heroDetails/heroDetails.css: -------------------------------------------------------------------------------- 1 | :host { 2 | position: absolute; 3 | text-align: center; 4 | } 5 | 6 | h1, 7 | p { 8 | color: var(--lwc-colorTextButtonBrand, white); 9 | font-family: 'KlavikaWebRegularCond', 'Klavika', Helvetica; 10 | margin-bottom: 10px; 11 | font-weight: normal; 12 | letter-spacing: 0.14em; 13 | line-height: 1; 14 | font-size: 1.5rem; 15 | margin: 0.5em 0 0.74em; 16 | padding: 0; 17 | text-transform: uppercase; 18 | } 19 | 20 | h1 { 21 | letter-spacing: 0.03em; 22 | line-height: 0.88; 23 | margin: 0; 24 | font-size: 3rem; 25 | font-weight: bold; 26 | } 27 | 28 | a { 29 | text-align: center; 30 | padding: 4rem; 31 | padding-top: 0.5rem; 32 | padding-bottom: 0.5rem; 33 | border-radius: 10px; 34 | border: none; 35 | font-size: 1rem; 36 | font-weight: bold; 37 | text-transform: uppercase; 38 | } 39 | 40 | button:hover { 41 | background-position: right center; 42 | color: white; 43 | } 44 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/heroDetails/heroDetails.js: -------------------------------------------------------------------------------- 1 | import { LightningElement, api, wire } from 'lwc'; 2 | import getRecordInfo from '@salesforce/apex/ProductRecordInfoController.getRecordInfo'; 3 | 4 | /** 5 | * Details component that is on top of the video. 6 | */ 7 | export default class HeroDetails extends LightningElement { 8 | @api title = 'Hero Details'; // Default title to comply with accessibility 9 | @api slogan; 10 | @api recordName; 11 | 12 | recordInfoData; 13 | hrefUrl; 14 | 15 | @wire(getRecordInfo, { productOrFamilyName: '$recordName' }) 16 | recordInfo({ error, data }) { 17 | this.recordInfoData = { error, data }; 18 | // Temporary workaround so that clicking on button navigates every time 19 | if (!error && data) { 20 | if (data[1] === 'Product__c') { 21 | this.hrefUrl = `product/${data[0]}`; 22 | } else { 23 | this.hrefUrl = `product-family/${data[0]}`; 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /.github/workflows/onRelease.yml: -------------------------------------------------------------------------------- 1 | name: publish 2 | on: 3 | release: 4 | # both release and prereleases 5 | types: [published] 6 | # support manual release in case something goes wrong and needs to be repeated or tested 7 | workflow_dispatch: 8 | inputs: 9 | tag: 10 | description: github tag that needs to publish 11 | type: string 12 | required: true 13 | jobs: 14 | getDistTag: 15 | outputs: 16 | tag: ${{ steps.distTag.outputs.tag }} 17 | runs-on: ubuntu-latest 18 | steps: 19 | - uses: actions/checkout@v4 20 | with: 21 | ref: ${{ github.event.release.tag_name || inputs.tag }} 22 | - uses: salesforcecli/github-workflows/.github/actions/getPreReleaseTag@main 23 | id: distTag 24 | npm: 25 | uses: salesforcecli/github-workflows/.github/workflows/npmPublish.yml@main 26 | needs: [getDistTag] 27 | with: 28 | tag: ${{ needs.getDistTag.outputs.tag || 'latest' }} 29 | githubTag: ${{ github.event.release.tag_name || inputs.tag }} 30 | 31 | secrets: inherit 32 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025, Salesforce, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | export { SourceTracking, SourceTrackingOptions } from './sourceTracking'; 18 | export { 19 | RemoteSyncInput, 20 | ChangeOptionType, 21 | ChangeOptions, 22 | LocalUpdateOptions, 23 | ChangeResult, 24 | StatusOutputRow, 25 | ConflictResponse, 26 | SourceConflictError, 27 | SourceMemberPollingEvent, 28 | } from './shared/types'; 29 | export { getKeyFromObject, deleteCustomLabels } from './shared/functions'; 30 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/aura/pageTemplate_2_7_3/pageTemplate_2_7_3.cmp: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | {!v.left} 14 | 15 | 20 | {!v.center} 21 | 22 | 23 | {!v.right} 24 | 25 | 26 |
27 |
28 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productTile/productTile.html: -------------------------------------------------------------------------------- 1 | 27 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.github/ISSUE_TEMPLATE/Bug_Report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve this sample application. 4 | --- 5 | 6 | 20 | 21 | ### Summary 22 | 23 | _Short summary of what is going on or to provide context_. 24 | 25 | ### Steps To Reproduce: 26 | 27 | 1. This is step 1. 28 | 1. This is step 2. All steps should start with '1.' 29 | 30 | ### Expected result 31 | 32 | _Describe what should have happened_. 33 | 34 | ### Actual result 35 | 36 | _Describe what actually happened instead_. 37 | 38 | ### Additional information 39 | 40 | _Feel free to attach a screenshot or code snippets_. 41 | -------------------------------------------------------------------------------- /.github/workflows/notify-slack-on-pr-open.yml: -------------------------------------------------------------------------------- 1 | name: Pull Request Slack Notification 2 | 3 | on: 4 | pull_request: 5 | types: [opened, reopened] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Notify Slack on PR open 12 | env: 13 | WEBHOOK_URL: ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }} 14 | PULL_REQUEST_AUTHOR_ICON_URL: ${{ github.event.pull_request.user.avatar_url }} 15 | PULL_REQUEST_AUTHOR_NAME: ${{ github.event.pull_request.user.login }} 16 | PULL_REQUEST_AUTHOR_PROFILE_URL: ${{ github.event.pull_request.user.html_url }} 17 | PULL_REQUEST_BASE_BRANCH_NAME: ${{ github.event.pull_request.base.ref }} 18 | PULL_REQUEST_COMPARE_BRANCH_NAME: ${{ github.event.pull_request.head.ref }} 19 | PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} 20 | PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.name }} 21 | PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }} 22 | PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} 23 | uses: salesforcecli/github-workflows/.github/actions/prNotification@main 24 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Level__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Level__c 4 | false 5 | 6 | false 7 | false 8 | Picklist 9 | 10 | true 11 | 12 | false 13 | 14 | Beginner 15 | false 16 | 17 | 18 | 19 | Enthusiast 20 | false 21 | 22 | 23 | 24 | Racer 25 | false 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/similarProducts/similarProducts.html: -------------------------------------------------------------------------------- 1 | 26 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/.github/ISSUE_TEMPLATE/Feature_Request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | --- 5 | 6 | 20 | 21 | **What is missing from the application? Please describe.** 22 | A clear and concise description of what the problem is. Ex. I'd like to see an implementation of [...] 23 | 24 | **Describe the solution you'd like** 25 | A clear and concise description of what you want to happen. 26 | 27 | **Describe alternatives you've considered** 28 | A clear and concise description of any alternative solutions or features you've considered. 29 | 30 | **Additional context** 31 | Add any other context or screenshots about the feature request here. 32 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product_Family__c/fields/Category__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Category__c 4 | false 5 | 6 | false 7 | false 8 | Picklist 9 | 10 | true 11 | 12 | false 13 | 14 | Commuter 15 | false 16 | 17 | 18 | 19 | Hybrid 20 | false 21 | 22 | 23 | 24 | Mountain 25 | false 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/classes/ProductRecordInfoController.cls: -------------------------------------------------------------------------------- 1 | public with sharing class ProductRecordInfoController { 2 | @AuraEnabled(Cacheable=true) 3 | public static List getRecordInfo(String productOrFamilyName) { 4 | List recordInfo = new List(); 5 | 6 | List cProductList = [ 7 | SELECT ID 8 | FROM Product__c 9 | WHERE NAME = :productOrFamilyName 10 | WITH SECURITY_ENFORCED 11 | ]; 12 | if (cProductList.size() > 0) { 13 | recordInfo.add(cProductList[0].ID); 14 | recordInfo.add('Product__c'); 15 | return recordInfo; 16 | } 17 | 18 | List cProductFamilyList = [ 19 | SELECT ID 20 | FROM Product_Family__c 21 | WHERE NAME = :productOrFamilyName 22 | WITH SECURITY_ENFORCED 23 | ]; 24 | if (cProductFamilyList.size() > 0) { 25 | recordInfo.add(cProductFamilyList[0].ID); 26 | recordInfo.add('Product_Family__c'); 27 | return recordInfo; 28 | } 29 | return null; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible Node.js debug attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "attach", 10 | "name": "Attach to Remote", 11 | "address": "localhost", 12 | "port": 9229, 13 | "skipFiles": ["/**/*.js"] 14 | }, 15 | { 16 | "type": "node", 17 | "request": "launch", 18 | "name": "Launch exports", 19 | "preLaunchTask": "compile", 20 | "program": "${workspaceRoot}/lib/exports.js", 21 | "sourceMaps": true, 22 | "outFiles": ["${workspaceRoot}/out/**/*.js"] 23 | }, 24 | { 25 | "type": "node", 26 | "request": "launch", 27 | "name": "Debug Unit Tests", 28 | "program": "${workspaceRoot}/node_modules/.bin/_mocha", 29 | "preLaunchTask": "compile", 30 | "args": ["--timeout", "999999", "lib/test/unit/**/*.js"], 31 | "sourceMaps": true, 32 | "outFiles": ["${workspaceRoot}/lib/**/*.js"] 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /src/shared/local/types.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025, Salesforce, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | export type DetectionFileInfo = Readonly<{ filename: string; hash: string; basename: string }>; 18 | export type DetectionFileInfoWithType = Readonly< 19 | DetectionFileInfo & { type: string; parentFullName: string; parentType: string } 20 | >; 21 | export type StringMap = Map; 22 | export type AddAndDeleteMaps = { addedMap: StringMap; deletedMap: StringMap }; // https://isomorphic-git.org/docs/en/statusMatrix#docsNav 23 | 24 | export type StatusRow = [file: string, head: number, workdir: number, stage: number]; 25 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productTile/productTile.js: -------------------------------------------------------------------------------- 1 | import { LightningElement, api } from 'lwc'; 2 | 3 | /** 4 | * A presentation component to display a Product__c sObject. The provided 5 | * Product__c data must contain all fields used by this component. 6 | */ 7 | export default class ProductTile extends LightningElement { 8 | /** Whether the tile is draggable. */ 9 | @api draggable; 10 | 11 | _product; 12 | /** Product__c to display. */ 13 | @api 14 | get product() { 15 | return this._product; 16 | } 17 | set product(value) { 18 | this._product = value; 19 | this.pictureUrl = value.Picture_URL__c; 20 | this.name = value.Name; 21 | this.msrp = value.MSRP__c; 22 | } 23 | 24 | /** Product__c field values to display. */ 25 | pictureUrl; 26 | name; 27 | msrp; 28 | 29 | handleClick() { 30 | const selectedEvent = new CustomEvent('selected', { 31 | detail: this.product.Id 32 | }); 33 | this.dispatchEvent(selectedEvent); 34 | } 35 | 36 | handleDragStart(event) { 37 | event.dataTransfer.setData('product', JSON.stringify(this.product)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/paginator/paginator.html: -------------------------------------------------------------------------------- 1 | 29 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/test/jest-mocks/lightning/messageService.js: -------------------------------------------------------------------------------- 1 | /** 2 | * For the original lightning/messageService (LMS) stub that comes by default with 3 | * @salesforce/sfdx-lwc-jest, see: 4 | * https://github.com/salesforce/sfdx-lwc-jest/blob/main/src/lightning-stubs/messageService/messageService.js 5 | */ 6 | 7 | export const APPLICATION_SCOPE = Symbol('APPLICATION_SCOPE'); 8 | export const createMessageChannel = jest.fn(); 9 | export const createMessageContext = jest.fn(); 10 | export const MessageContext = jest.fn(); 11 | export const releaseMessageContext = jest.fn(); 12 | export const unsubscribe = jest.fn(); 13 | 14 | // LMS stub implementation that lets you test a single message handler on a single channel 15 | var _messageChannel = null; 16 | var _messageHandler = null; 17 | 18 | export const publish = jest.fn((messageContext, messageChannel, message) => { 19 | if (_messageHandler && _messageChannel === messageChannel) { 20 | _messageHandler(message); 21 | } 22 | }); 23 | 24 | export const subscribe = jest.fn( 25 | (messageContext, messageChannel, messageHandler) => { 26 | _messageChannel = messageChannel; 27 | _messageHandler = messageHandler; 28 | } 29 | ); 30 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productListItem/productListItem.html: -------------------------------------------------------------------------------- 1 | 32 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/similarProducts/similarProducts.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | true 5 | Similar Products 6 | 7 | lightning__RecordPage 8 | lightningCommunity__Page 9 | lightningCommunity__Default 10 | 11 | 12 | 13 | 14 | Product__c 15 | 16 | 17 | 18 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/unit/shared/functions.test.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025, Salesforce, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | import { expect } from 'chai'; 18 | import { ensureRelative } from '../../../src/shared/functions'; 19 | 20 | describe('ensureRelative', () => { 21 | it('should handle relative paths', () => { 22 | expect(ensureRelative('/foo/bar')('baz')).to.equal('baz'); 23 | }); 24 | 25 | it('should return the relative path', () => { 26 | expect(ensureRelative('/foo/bar')('/foo/bar/baz')).to.equal('baz'); 27 | }); 28 | 29 | it('should handle paths above the project directory', () => { 30 | expect(ensureRelative('/')('/baz')).to.equal('baz'); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/test/jest-mocks/lightning/navigation.js: -------------------------------------------------------------------------------- 1 | /** 2 | * For the original lightning/navigation mock that comes by default with 3 | * @salesforce/sfdx-lwc-jest, see: 4 | * https://github.com/salesforce/sfdx-lwc-jest/blob/main/src/lightning-mocks/navigation/navigation.js 5 | */ 6 | export const CurrentPageReference = jest.fn(); 7 | 8 | let _pageReference, _replace; 9 | 10 | const Navigate = Symbol('Navigate'); 11 | const GenerateUrl = Symbol('GenerateUrl'); 12 | export const NavigationMixin = (Base) => { 13 | return class extends Base { 14 | [Navigate](pageReference, replace) { 15 | _pageReference = pageReference; 16 | _replace = replace; 17 | } 18 | [GenerateUrl](pageReference) {} 19 | }; 20 | }; 21 | NavigationMixin.Navigate = Navigate; 22 | NavigationMixin.GenerateUrl = GenerateUrl; 23 | 24 | /* 25 | * Tests do not have access to the internals of this mixin used by the 26 | * component under test so save a reference to the arguments the Navigate method is 27 | * invoked with and provide access with this function. 28 | */ 29 | export const getNavigateCalledWith = () => { 30 | return { 31 | pageReference: _pageReference, 32 | replace: _replace 33 | }; 34 | }; 35 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/placeholder/__tests__/placeholder.test.js: -------------------------------------------------------------------------------- 1 | import { createElement } from 'lwc'; 2 | import Placeholder from 'c/placeholder'; 3 | 4 | describe('c-placeholder', () => { 5 | afterEach(() => { 6 | // The jsdom instance is shared across test cases in a single file so reset the DOM 7 | while (document.body.firstChild) { 8 | document.body.removeChild(document.body.firstChild); 9 | } 10 | }); 11 | 12 | it('sets img url to be bike_assets resource', () => { 13 | const element = createElement('c-placeholder', { 14 | is: Placeholder 15 | }); 16 | document.body.appendChild(element); 17 | const img = element.shadowRoot.querySelector('img'); 18 | // By default @salesforce/sfdx-lwc-jest resolves the 19 | // @salesforce/resourceUrl/bike_assets import to "bike_assets" 20 | expect(img.src).toMatch(/\/bike_assets\//); 21 | }); 22 | 23 | it('is accessible', () => { 24 | const element = createElement('c-placeholder', { 25 | is: Placeholder 26 | }); 27 | 28 | document.body.appendChild(element); 29 | 30 | return Promise.resolve().then(() => expect(element).toBeAccessible()); 31 | }); 32 | }); 33 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/similarProducts/similarProducts.js: -------------------------------------------------------------------------------- 1 | import { LightningElement, api, wire } from 'lwc'; 2 | import { getRecord } from 'lightning/uiRecordApi'; 3 | import getSimilarProducts from '@salesforce/apex/ProductController.getSimilarProducts'; 4 | import PRODUCT_FAMILY_FIELD from '@salesforce/schema/Product__c.Product_Family__c'; 5 | 6 | const fields = [PRODUCT_FAMILY_FIELD]; 7 | 8 | export default class SimilarProducts extends LightningElement { 9 | @api recordId; 10 | @api familyId; 11 | 12 | // Track changes to the Product_Family__c field that could be made in other components. 13 | // If Product_Family__c is updated in another component, getSimilarProducts 14 | // is automatically re-invoked with the new this.familyId parameter 15 | @wire(getRecord, { recordId: '$recordId', fields }) 16 | product; 17 | 18 | @wire(getSimilarProducts, { 19 | productId: '$recordId', 20 | familyId: '$product.data.fields.Product_Family__c.value' 21 | }) 22 | similarProducts; 23 | 24 | get errors() { 25 | const errors = [this.product.error, this.similarProducts.error].filter( 26 | (error) => error 27 | ); 28 | return errors.length ? errors : undefined; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/flexipages/Product_Explorer.flexipage-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | productFilter 7 | 8 | 9 | left 10 | Region 11 | 12 | 13 | 14 | 15 | productTileList 16 | 17 | 18 | center 19 | Region 20 | 21 | 22 | 23 | 24 | productCard 25 | 26 | 27 | right 28 | Region 29 | 30 | Product Explorer 31 | 34 | AppPage 35 | 36 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/brandingSets/jepson.json: -------------------------------------------------------------------------------- 1 | { 2 | "definitionName": "jepson:branding-jepson", 3 | "id": "26ab9e87-e30e-419f-b5b6-e054218fcee7", 4 | "label": "Jepson", 5 | "type": "brandingSet", 6 | "values": { 7 | "ActionColor": "rgb(57, 75, 133)", 8 | "BorderColor": "#D4D4D4", 9 | "CardBackgroundColor": "rgba(255, 255, 255, 0)", 10 | "CompanyLogo": "/file-asset/ebikeslogo?v=1&height=300&width=300", 11 | "DetailTextColor": "rgba(0, 0, 0, 0.6)", 12 | "ErrorFontColor": "#ff9e9e", 13 | "HeaderFonts": "Montserrat", 14 | "LinkColor": "#111111", 15 | "LoginBackgroundColor": "#F4F4F4", 16 | "LoginBackgroundImage": "../../../../sfsites/picasso/core/external/salesforceIdentity/images/background.jpg?v=1", 17 | "OverlayTextColor": "rgb(255, 255, 255)", 18 | "PageBackgroundColor": "#FFFFFF", 19 | "PrimaryFont": "Lato", 20 | "TextColor": "rgb(0, 0, 0)", 21 | "TextTransformStyle": "none", 22 | "_ActionColorDarker": "#2a3761", 23 | "_ActionColorTrans": "rgba(57, 75, 133, 0.9)", 24 | "_HoverColor": "rgba(57, 75, 133, 0.05)", 25 | "_LinkColorDarker": "#000000", 26 | "_OverlayTextColorShadow": "#000" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/applications/EBikes.app-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #C23335 5 | logo 6 | 1 7 | false 8 | 9 | 10 | View 11 | Action override created by Lightning App Builder on activation. Added manually because this isn't registered by force:source:pull. 13 | Account_Record_Page 14 | Large 15 | false 16 | Flexipage 17 | Account 18 | 19 | Large 20 | 21 | Standard 22 | standard-home 23 | Product_Explorer 24 | standard-Account 25 | standard-Contact 26 | Product__c 27 | Order__c 28 | Product_Family__c 29 | Lightning 30 | 31 | -------------------------------------------------------------------------------- /.github/workflows/create-github-release.yml: -------------------------------------------------------------------------------- 1 | name: create-github-release 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | - prerelease/** 8 | tags-ignore: 9 | - "*" 10 | workflow_dispatch: 11 | inputs: 12 | prerelease: 13 | type: string 14 | description: "Name to use for the prerelease: beta, dev, etc. NOTE: If this is already set in the package.json, it does not need to be passed in here." 15 | 16 | jobs: 17 | release: 18 | uses: salesforcecli/github-workflows/.github/workflows/create-github-release.yml@main 19 | secrets: inherit 20 | with: 21 | prerelease: ${{ inputs.prerelease }} 22 | # If this is a push event, we want to skip the release if there are no semantic commits 23 | # However, if this is a manual release (workflow_dispatch), then we want to disable skip-on-empty 24 | # This helps recover from forgetting to add semantic commits ('fix:', 'feat:', etc.) 25 | skip-on-empty: ${{ github.event_name == 'push' }} 26 | # docs: 27 | # # Most repos won't use this 28 | # # Depends on the 'release' job to avoid git collisions, not for any functionality reason 29 | # needs: release 30 | # secrets: inherit 31 | # if: ${{ github.ref_name == 'main' }} 32 | # uses: salesforcecli/github-workflows/.github/workflows/publishTypedoc.yml@main 33 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Seat_Color__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Seat_Color__c 4 | false 5 | 6 | false 7 | false 8 | Picklist 9 | 10 | true 11 | 12 | false 13 | 14 | white 15 | false 16 | 17 | 18 | 19 | red 20 | false 21 | 22 | 23 | 24 | blue 25 | false 26 | 27 | 28 | 29 | green 30 | false 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Frame_Color__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Frame_Color__c 4 | false 5 | 6 | false 7 | false 8 | Picklist 9 | 10 | true 11 | 12 | false 13 | 14 | white 15 | false 16 | 17 | 18 | 19 | red 20 | false 21 | 22 | 23 | 24 | blue 25 | false 26 | 27 | 28 | 29 | green 30 | false 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Handlebar_Color__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Handlebar_Color__c 4 | false 5 | 6 | false 7 | false 8 | Picklist 9 | 10 | true 11 | 12 | false 13 | 14 | white 15 | false 16 | 17 | 18 | 19 | red 20 | false 21 | 22 | 23 | 24 | blue 25 | false 26 | 27 | 28 | 29 | green 30 | false 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Product__c/fields/Waterbottle_Color__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Waterbottle_Color__c 4 | false 5 | 6 | false 7 | false 8 | Picklist 9 | 10 | true 11 | 12 | false 13 | 14 | white 15 | false 16 | 17 | 18 | 19 | red 20 | false 21 | 22 | 23 | 24 | blue 25 | false 26 | 27 | 28 | 29 | green 30 | false 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/data/Accounts.json: -------------------------------------------------------------------------------- 1 | { 2 | "records": [ 3 | { 4 | "attributes": { 5 | "type": "Account", 6 | "referenceId": "AccountRef1" 7 | }, 8 | "Name": "Wheelworks", 9 | "BillingStreet": "480 Trapelo Road", 10 | "BillingCity": "Belmont", 11 | "BillingState": "MA", 12 | "BillingPostalCode": "02478", 13 | "BillingCountry": "USA" 14 | }, 15 | { 16 | "attributes": { 17 | "type": "Account", 18 | "referenceId": "AccountRef2" 19 | }, 20 | "Name": "Northern Trail Cycling", 21 | "BillingStreet": "415 Mission St", 22 | "BillingCity": "San Francisco", 23 | "BillingState": "CA", 24 | "BillingPostalCode": "94105", 25 | "BillingCountry": "USA" 26 | }, 27 | { 28 | "attributes": { 29 | "type": "Account", 30 | "referenceId": "AccountRef3" 31 | }, 32 | "Name": "Trailblazers", 33 | "BillingStreet": "1095 Avenue of the Americas", 34 | "BillingCity": "New York", 35 | "BillingState": "NY", 36 | "BillingPostalCode": "10036", 37 | "BillingCountry": "USA" 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/views/createRecord.json: -------------------------------------------------------------------------------- 1 | { 2 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 3 | "componentName": "siteforce:sldsOneColLayout", 4 | "id": "0832e8af-7900-4144-84cf-0d09812e25a9", 5 | "label": "Create Record", 6 | "regions": [ 7 | { 8 | "id": "53c5c8bc-234a-43cc-8a20-83f69edf50e4", 9 | "regionName": "header", 10 | "type": "region" 11 | }, 12 | { 13 | "components": [ 14 | { 15 | "componentAttributes": { 16 | "actionApiName": "{!actionApiName}" 17 | }, 18 | "componentName": "forceCommunity:createRecordForm", 19 | "id": "e87f211d-b03d-46ea-acf1-767764c1be3e", 20 | "renderPriority": "NEUTRAL", 21 | "renditionMap": {}, 22 | "type": "component" 23 | } 24 | ], 25 | "id": "54d81048-9d07-42a0-85c1-db92bc3a33ea", 26 | "regionName": "content", 27 | "type": "region" 28 | }, 29 | { 30 | "id": "d6468f2f-fc9d-41b7-9aa3-87869dabdcca", 31 | "regionName": "footer", 32 | "type": "region" 33 | } 34 | ], 35 | "themeLayoutType": "Inner", 36 | "type": "view", 37 | "viewType": "createrecord" 38 | } 39 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/bin/install-scratch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) 3 | cd $SCRIPT_PATH/.. 4 | 5 | # Set parameters 6 | ORG_ALIAS="ebikes" 7 | 8 | echo "" 9 | echo "Installing E-Bikes scratch org ($ORG_ALIAS)" 10 | echo "" 11 | 12 | # Install script 13 | echo "Cleaning previous scratch org..." 14 | sfdx force:org:delete -p -u $ORG_ALIAS &> /dev/null 15 | echo "" 16 | 17 | echo "Creating scratch org..." && \ 18 | sfdx force:org:create -s -f config/project-scratch-def.json -d 30 -a $ORG_ALIAS && \ 19 | echo "" && \ 20 | 21 | echo "Pushing source..." && \ 22 | sfdx force:source:push && \ 23 | echo "" && \ 24 | 25 | echo "Assigning permission sets..." && \ 26 | sfdx force:user:permset:assign -n ebikes && \ 27 | echo "" && \ 28 | 29 | echo "Importing sample data..." && \ 30 | sfdx force:data:tree:import -p data/sample-data-plan.json && \ 31 | echo "" && \ 32 | 33 | echo "Sleeping 30s for Community deployment" && \ 34 | sleep 30 && \ 35 | echo "" && \ 36 | 37 | echo "Publishing Community" && \ 38 | sfdx force:community:publish -n E-Bikes && \ 39 | echo "" && \ 40 | 41 | echo "Opening org..." && \ 42 | sfdx force:org:open -p lightning/n/Product_Explorer && \ 43 | echo "" 44 | 45 | EXIT_CODE="$?" 46 | echo "" 47 | 48 | # Check exit code 49 | echo "" 50 | if [ "$EXIT_CODE" -eq 0 ]; then 51 | echo "Installation completed." 52 | else 53 | echo "Installation failed." 54 | fi 55 | exit $EXIT_CODE 56 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/ldsUtils/ldsUtils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Reduces one or more LDS errors into a string[] of error messages. 3 | * @param {FetchResponse|FetchResponse[]} errors 4 | * @return {String[]} Error messages 5 | */ 6 | export function reduceErrors(errors) { 7 | if (!Array.isArray(errors)) { 8 | errors = [errors]; 9 | } 10 | 11 | return ( 12 | errors 13 | // Remove null/undefined items 14 | .filter((error) => !!error) 15 | // Extract an error message 16 | .map((error) => { 17 | // UI API read errors 18 | if (Array.isArray(error.body)) { 19 | return error.body.map((e) => e.message); 20 | } 21 | // UI API DML, Apex and network errors 22 | else if (error.body && typeof error.body.message === 'string') { 23 | return error.body.message; 24 | } 25 | // JS errors 26 | else if (typeof error.message === 'string') { 27 | return error.message; 28 | } 29 | // Unknown error shape so try HTTP status text 30 | return error.statusText; 31 | }) 32 | // Flatten 33 | .reduce((prev, curr) => prev.concat(curr), []) 34 | // Remove empty strings 35 | .filter((message) => !!message) 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/data/Product_Family__cs.json: -------------------------------------------------------------------------------- 1 | { 2 | "records": [ 3 | { 4 | "attributes": { 5 | "type": "Product_Family__c", 6 | "referenceId": "DynamoRef" 7 | }, 8 | "Name": "Dynamo", 9 | "Description__c": "Performance and reliability. The best choice for hobbyists and enthusiasts.", 10 | "Category__c": "Mountain" 11 | }, 12 | { 13 | "attributes": { 14 | "type": "Product_Family__c", 15 | "referenceId": "FuseRef" 16 | }, 17 | "Name": "Fuse", 18 | "Description__c": "Commute and off-road? The Fuse bikes do it all!", 19 | "Category__c": "Hybrid" 20 | }, 21 | { 22 | "attributes": { 23 | "type": "Product_Family__c", 24 | "referenceId": "ElectraRef" 25 | }, 26 | "Name": "Electra", 27 | "Description__c": "Top of the line commuter bikes that can handle long and challenging commutes.", 28 | "Category__c": "Commuter" 29 | }, 30 | { 31 | "attributes": { 32 | "type": "Product_Family__c", 33 | "referenceId": "VoltRef" 34 | }, 35 | "Name": "Volt", 36 | "Description__c": "Fun and Foldable electric bicycles.", 37 | "Category__c": "Commuter" 38 | } 39 | ] 40 | } 41 | -------------------------------------------------------------------------------- /src/shared/local/functions.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025, Salesforce, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import * as path from 'node:path'; 17 | import * as os from 'node:os'; 18 | import { StatusRow } from './types'; 19 | export const IS_WINDOWS = os.type() === 'Windows_NT'; // array members for status results 20 | 21 | // filenames were normalized when read from isogit 22 | export const toFilenames = (rows: StatusRow[]): string[] => rows.map((row) => row[FILE]); 23 | export const isDeleted = (status: StatusRow): boolean => status[WORKDIR] === 0; 24 | export const isAdded = (status: StatusRow): boolean => status[HEAD] === 0 && status[WORKDIR] === 2; 25 | export const ensurePosix = (filepath: string): string => filepath.split(path.sep).join(path.posix.sep); 26 | 27 | // We don't use STAGE (StatusRow[3]). Changes are added and committed in one step 28 | export const FILE = 0; 29 | export const HEAD = 1; 30 | export const WORKDIR = 2; 31 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/createCase/createCase.js: -------------------------------------------------------------------------------- 1 | import { LightningElement } from 'lwc'; 2 | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; 3 | 4 | import CASE_OBJECT from '@salesforce/schema/Case'; 5 | import SUBJECT from '@salesforce/schema/Case.Subject'; 6 | import DESCRIPTION from '@salesforce/schema/Case.Description'; 7 | import PRODUCT from '@salesforce/schema/Case.Product__c'; 8 | import PRIORITY from '@salesforce/schema/Case.Priority'; 9 | import CASE_CATEGORY from '@salesforce/schema/Case.Case_Category__c'; 10 | import REASON from '@salesforce/schema/Case.Reason'; 11 | 12 | const TITLE_SUCCESS = 'Case Created!'; 13 | const MESSAGE_SUCCESS = 'You have successfully created a Case'; 14 | 15 | export default class CreateCase extends LightningElement { 16 | caseObject = CASE_OBJECT; 17 | subjectField = SUBJECT; 18 | productField = PRODUCT; 19 | descriptionField = DESCRIPTION; 20 | priorityField = PRIORITY; 21 | reasonField = REASON; 22 | categoryField = CASE_CATEGORY; 23 | 24 | handleCaseCreated() { 25 | // Fire event for Toast to appear that Order was created 26 | const evt = new ShowToastEvent({ 27 | title: TITLE_SUCCESS, 28 | message: MESSAGE_SUCCESS, 29 | variant: 'success' 30 | }); 31 | this.dispatchEvent(evt); 32 | 33 | const refreshEvt = new CustomEvent('refresh'); 34 | // Fire the custom event 35 | this.dispatchEvent(refreshEvt); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/navigationMenus/Default_Navigation.navigationMenu-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | E-Bikes 4 | Network 5 | 6 | 7 | 8 | 1 9 | true 10 | /product-explorer 11 | InternalLink 12 | 13 | 14 | All_Product_Families 15 | 16 | 2 17 | true 18 | Product_Family__c 19 | SalesforceObject 20 | 21 | 22 | 23 | 3 24 | true 25 | /create-case 26 | InternalLink 27 | 28 | 29 | My_Cases 30 | 31 | 4 32 | true 33 | Case 34 | SalesforceObject 35 | 36 | 37 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/views/serviceNotAvailable.json: -------------------------------------------------------------------------------- 1 | { 2 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 3 | "componentName": "siteforce:sldsOneColLayout", 4 | "id": "051e5cc7-26ba-4366-a9f6-a0067e0d96aa", 5 | "label": "Service Not Available", 6 | "regions": [ 7 | { 8 | "components": [ 9 | { 10 | "componentAttributes": { 11 | "richTextValue": "

Looks like the site is temporarily unavailable


Please try again in a bit.

" 12 | }, 13 | "componentName": "forceCommunity:htmlBlock", 14 | "id": "227f6ef1-f307-416e-a04f-d20f3f756f4a", 15 | "renderPriority": "NEUTRAL", 16 | "renditionMap": {}, 17 | "type": "component" 18 | } 19 | ], 20 | "id": "681f110c-987f-4bb7-b8e9-902dc2115cf9", 21 | "regionName": "content", 22 | "type": "region" 23 | } 24 | ], 25 | "themeLayoutType": "ServiceNotAvailable", 26 | "type": "view", 27 | "viewType": "service-not-available" 28 | } 29 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/bin/install-scratch.bat: -------------------------------------------------------------------------------- 1 | @echo OFF 2 | 3 | rem Set parameters 4 | set ORG_ALIAS=ebikes 5 | 6 | @echo: 7 | echo Installing E-Bikes scratch org (%ORG_ALIAS%) 8 | @echo: 9 | 10 | rem Install script 11 | echo Cleaning previous scratch org... 12 | cmd.exe /c sfdx force:org:delete -p -u %ORG_ALIAS% 2>NUL 13 | @echo: 14 | 15 | echo Creating scratch org... 16 | cmd.exe /c sfdx force:org:create -s -f config/project-scratch-def.json -d 30 -a %ORG_ALIAS% 17 | call :checkForError 18 | @echo: 19 | 20 | echo Pushing source... 21 | cmd.exe /c sfdx force:source:push 22 | call :checkForError 23 | @echo: 24 | 25 | echo Assigning permission sets... 26 | cmd.exe /c sfdx force:user:permset:assign -n ebikes 27 | call :checkForError 28 | @echo: 29 | cd %CD%/.. 30 | 31 | echo Importing sample data... 32 | cmd.exe /c sfdx force:data:tree:import -p data/sample-data-plan.json 33 | call :checkForError 34 | @echo: 35 | 36 | echo Sleeping 30s for Community deployment... 37 | timeout /T 30 /NOBREAK 38 | @echo: 39 | 40 | echo Publishing Community... 41 | cmd.exe /c sfdx force:community:publish -n E-Bikes 42 | call :checkForError 43 | @echo: 44 | 45 | rem Report install success if no error 46 | @echo: 47 | if ["%errorlevel%"]==["0"] ( 48 | echo Installation completed. 49 | @echo: 50 | cmd.exe /c sfdx force:org:open -p lightning/n/Product_Explorer 51 | ) 52 | 53 | :: ======== FN ====== 54 | GOTO :EOF 55 | 56 | rem Display error if the install has failed 57 | :checkForError 58 | if NOT ["%errorlevel%"]==["0"] ( 59 | echo Installation failed. 60 | exit /b %errorlevel% 61 | ) -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/layouts/CaseClose-Close Case Layout.layout-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | false 5 | false 6 | true 7 | 8 | 9 | 10 | Required 11 | Status 12 | 13 | 14 | Required 15 | Reason 16 | 17 | 18 | Edit 19 | Comments 20 | 21 | 22 | Edit 23 | Product__c 24 | 25 | 26 | Edit 27 | Case_Category__c 28 | 29 | 30 | 31 | 32 | false 33 | false 34 | false 35 | false 36 | true 37 | false 38 | 39 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/objects/Case/fields/Case_Category__c.field-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Case_Category__c 4 | false 5 | 6 | false 7 | false 8 | false 9 | false 10 | Picklist 11 | 12 | true 13 | 14 | false 15 | 16 | Mechanical 17 | false 18 | 19 | 20 | 21 | Electrical 22 | false 23 | 24 | 25 | 26 | Electronic 27 | false 28 | 29 | 30 | 31 | Structural 32 | false 33 | 34 | 35 | 36 | Other 37 | false 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/productTileList/productTileList.js-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 52.0 4 | true 5 | Product Tile List 6 | 7 | lightning__AppPage 8 | lightning__RecordPage 9 | lightning__HomePage 10 | lightningCommunity__Page 11 | lightningCommunity__Default 12 | 13 | 14 | 15 | 20 | 25 | 26 | Order__c 27 | 28 | 29 | 30 | 35 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/orderBuilder/__tests__/data/getOrderItems.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Id": "a003B000004fG1VQAU", 4 | "Qty_S__c": 1, 5 | "Qty_M__c": 1, 6 | "Qty_L__c": 1, 7 | "Price__c": 4200, 8 | "Product__c": "a033B00000381hNQAQ", 9 | "Product__r": { 10 | "Name": "DYNAMO X1", 11 | "MSRP__c": 7000, 12 | "Picture_URL__c": "https://s3-us-west-1.amazonaws.com/sfdc-demo/ebikes/dynamox1.jpg", 13 | "Id": "a033B00000381hNQAQ", 14 | "$serId$": 343 15 | }, 16 | "$serId$": 342 17 | }, 18 | { 19 | "Id": "a003B000004fG1aQAE", 20 | "Qty_S__c": 1, 21 | "Qty_M__c": 1, 22 | "Qty_L__c": 1, 23 | "Price__c": 4320, 24 | "Product__c": "a033B00000381hOQAQ", 25 | "Product__r": { 26 | "Name": "DYNAMO X2", 27 | "MSRP__c": 7200, 28 | "Picture_URL__c": "https://s3-us-west-1.amazonaws.com/sfdc-demo/ebikes/dynamox2.jpg", 29 | "Id": "a033B00000381hOQAQ", 30 | "$serId$": 345 31 | }, 32 | "$serId$": 344 33 | }, 34 | { 35 | "Id": "a003B000004fG1fQAE", 36 | "Qty_S__c": 1, 37 | "Qty_M__c": 1, 38 | "Qty_L__c": 1, 39 | "Price__c": 4440, 40 | "Product__c": "a033B00000381hPQAQ", 41 | "Product__r": { 42 | "Name": "DYNAMO X3", 43 | "MSRP__c": 7400, 44 | "Picture_URL__c": "https://s3-us-west-1.amazonaws.com/sfdc-demo/ebikes/dynamox3.jpg", 45 | "Id": "a033B00000381hPQAQ", 46 | "$serId$": 347 47 | }, 48 | "$serId$": 346 49 | } 50 | ] 51 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/sites/E_Bikes.site-meta.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | true 4 | false 5 | false 6 | false 7 | false 8 | true 9 | false 10 | CommunitiesLogin 11 | BandwidthExceeded 12 | true 13 | SameOriginOnly 14 | true 15 | true 16 | FileNotFound 17 | Exception 18 | InMaintenance 19 | CommunitiesLanding 20 | E-Bikes 21 | true 23 | CommunitiesSelfReg 24 | test-yypfaowt42yo@example.com 25 | test-yypfaowt42yo@example.com 27 | ChatterNetwork 28 | efficiency-connect-1801-dev--1701a0bb7eb 29 | ebikes 30 | 31 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: tests 2 | on: 3 | push: 4 | branches-ignore: [main] 5 | workflow_dispatch: 6 | 7 | jobs: 8 | yarn-lockfile-check: 9 | uses: salesforcecli/github-workflows/.github/workflows/lockFileCheck.yml@main 10 | # Since the Windows unit tests take much longer, we run the linux unit tests first and then run the windows unit tests in parallel with NUTs 11 | 12 | linux-unit-tests: 13 | needs: yarn-lockfile-check 14 | uses: salesforcecli/github-workflows/.github/workflows/unitTestsLinux.yml@main 15 | windows-unit-tests: 16 | needs: linux-unit-tests 17 | uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main 18 | nuts: 19 | needs: linux-unit-tests 20 | uses: salesforcecli/github-workflows/.github/workflows/nut.yml@main 21 | secrets: inherit 22 | strategy: 23 | matrix: 24 | os: [ubuntu-latest, windows-latest] 25 | fail-fast: false 26 | with: 27 | os: ${{ matrix.os }} 28 | 29 | xNuts-pdr: 30 | needs: linux-unit-tests 31 | uses: salesforcecli/github-workflows/.github/workflows/externalNut.yml@main 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | os: ['ubuntu-latest', 'windows-latest'] 36 | command: 37 | - 'yarn test:nuts:tracking' 38 | - 'yarn test:nuts:deb' 39 | with: 40 | packageName: '@salesforce/source-tracking' 41 | externalProjectGitUrl: 'https://github.com/salesforcecli/plugin-deploy-retrieve' 42 | command: ${{matrix.command}} 43 | os: ${{matrix.os}} 44 | preSwapCommands: 'yarn upgrade @salesforce/source-deploy-retrieve@latest; npx yarn-deduplicate; yarn install' 45 | useCache: false 46 | secrets: inherit 47 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/views/relatedRecordList.json: -------------------------------------------------------------------------------- 1 | { 2 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 3 | "componentName": "siteforce:sldsOneColLayout", 4 | "id": "612a81a7-50e3-46bf-b5cd-bf7bfd2ba62a", 5 | "label": "Related Record List", 6 | "regions": [ 7 | { 8 | "id": "65fead60-f447-4d5f-b546-3b5b457b4125", 9 | "regionName": "header", 10 | "type": "region" 11 | }, 12 | { 13 | "components": [ 14 | { 15 | "componentAttributes": { 16 | "customTitle": "", 17 | "parentRecordId": "{!recordId}", 18 | "relatedListName": "{!relationshipApiName}", 19 | "showBreadCrumbs": true, 20 | "showCustomTitle": false, 21 | "showManualRefreshButton": true, 22 | "showRowNumbers": true 23 | }, 24 | "componentName": "forceCommunity:relatedList", 25 | "id": "7e51ce5f-3d40-4f23-863b-aae5d22eee26", 26 | "renderPriority": "NEUTRAL", 27 | "renditionMap": {}, 28 | "type": "component" 29 | } 30 | ], 31 | "id": "d5a118bb-471a-445d-8e74-2129b8768fce", 32 | "regionName": "content", 33 | "type": "region" 34 | }, 35 | { 36 | "id": "adb3f539-cf4d-426b-a265-a8232ef0e66e", 37 | "regionName": "footer", 38 | "type": "region" 39 | } 40 | ], 41 | "themeLayoutType": "Inner", 42 | "type": "view", 43 | "viewType": "relatedlist" 44 | } 45 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/views/productRelatedList.json: -------------------------------------------------------------------------------- 1 | { 2 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 3 | "componentName": "siteforce:sldsOneColLayout", 4 | "id": "e264ab42-0382-4aa8-bb39-56df8e6f0aaa", 5 | "label": "Product Related List", 6 | "regions": [ 7 | { 8 | "id": "dfb9df45-f0a2-4bc7-a99f-a6a75631abf8", 9 | "regionName": "header", 10 | "type": "region" 11 | }, 12 | { 13 | "components": [ 14 | { 15 | "componentAttributes": { 16 | "customTitle": "", 17 | "parentRecordId": "{!recordId}", 18 | "relatedListName": "{!relationshipApiName}", 19 | "showBreadCrumbs": true, 20 | "showCustomTitle": false, 21 | "showManualRefreshButton": true, 22 | "showRowNumbers": true 23 | }, 24 | "componentName": "forceCommunity:relatedList", 25 | "id": "a2102f60-1bbc-4b4a-a0a0-14adba5d7beb", 26 | "renderPriority": "NEUTRAL", 27 | "renditionMap": {}, 28 | "type": "component" 29 | } 30 | ], 31 | "id": "9194e2cf-9c2e-40ba-bc16-b55e3b189b78", 32 | "regionName": "content", 33 | "type": "region" 34 | }, 35 | { 36 | "id": "7a4fb906-7737-4573-8a29-896adf61336d", 37 | "regionName": "footer", 38 | "type": "region" 39 | } 40 | ], 41 | "themeLayoutType": "Inner", 42 | "type": "view", 43 | "viewType": "relatedlist-a03" 44 | } 45 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/experiences/E_Bikes1/views/productFamilyRelatedList.json: -------------------------------------------------------------------------------- 1 | { 2 | "appPageId": "591ae89d-97d7-4f5d-b93f-ce618e5d48f1", 3 | "componentName": "siteforce:sldsOneColLayout", 4 | "id": "eb60ff2f-bca3-4cc7-befe-74a5cc28d67f", 5 | "label": "Product Family Related List", 6 | "regions": [ 7 | { 8 | "id": "e2525dfe-a877-4e1e-856d-057f885f9801", 9 | "regionName": "header", 10 | "type": "region" 11 | }, 12 | { 13 | "components": [ 14 | { 15 | "componentAttributes": { 16 | "customTitle": "", 17 | "parentRecordId": "{!recordId}", 18 | "relatedListName": "{!relationshipApiName}", 19 | "showBreadCrumbs": true, 20 | "showCustomTitle": false, 21 | "showManualRefreshButton": true, 22 | "showRowNumbers": true 23 | }, 24 | "componentName": "forceCommunity:relatedList", 25 | "id": "547f6ec6-4fbc-49e5-b87e-3b89e8db2525", 26 | "renderPriority": "NEUTRAL", 27 | "renditionMap": {}, 28 | "type": "component" 29 | } 30 | ], 31 | "id": "61d84bb8-6943-4585-a1b8-be02be8b72ac", 32 | "regionName": "content", 33 | "type": "region" 34 | }, 35 | { 36 | "id": "5021e296-247c-4759-93aa-aaf5b15f7284", 37 | "regionName": "footer", 38 | "type": "region" 39 | } 40 | ], 41 | "themeLayoutType": "Inner", 42 | "type": "view", 43 | "viewType": "relatedlist-a02" 44 | } 45 | -------------------------------------------------------------------------------- /src/shared/guards.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025, Salesforce, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import { FileResponse, ComponentStatus, FileResponseSuccess } from '@salesforce/source-deploy-retrieve'; 17 | import { ChangeResult } from './types'; 18 | import { ChangeResultWithNameAndType } from './types'; 19 | 20 | export const isSdrSuccess = (fileResponse: FileResponse): fileResponse is FileResponseSuccess => 21 | fileResponse.state !== ComponentStatus.Failed; 22 | 23 | export const FileResponseIsDeleted = (fileResponse: FileResponse): boolean => 24 | fileResponse.state === ComponentStatus.Deleted; 25 | 26 | export const FileResponseIsNotDeleted = (fileResponse: FileResponse): boolean => 27 | fileResponse.state !== ComponentStatus.Deleted; 28 | 29 | export const FileResponseHasPath = ( 30 | fileResponse: FileResponseSuccess 31 | ): fileResponse is FileResponseSuccess & Required> => 32 | fileResponse.filePath !== undefined; 33 | 34 | export const isChangeResultWithNameAndType = (cr?: ChangeResult): cr is ChangeResultWithNameAndType => 35 | typeof cr === 'object' && typeof cr.name === 'string' && typeof cr.type === 'string'; 36 | 37 | export const isDefined = (x: T | undefined): x is T => x !== undefined; 38 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/hero/hero.js: -------------------------------------------------------------------------------- 1 | import { LightningElement, api } from 'lwc'; 2 | import IMAGE_URL from '@salesforce/resourceUrl/bike_assets'; 3 | 4 | const VIDEO = 'Video'; 5 | const IMAGE = 'Image'; 6 | 7 | /** 8 | * A Hero component that can display a Video or Image. 9 | */ 10 | export default class Hero extends LightningElement { 11 | @api title; 12 | @api slogan; 13 | @api buttonText; 14 | @api heroDetailsPosition; 15 | @api resourceUrl; 16 | @api imgOrVideo; 17 | @api internalResource; 18 | @api overlay; 19 | @api opacity; 20 | @api buttonClickProductOrFamilyName; 21 | 22 | get resUrl() { 23 | if (this.isImg) { 24 | if (this.internalResource) { 25 | return IMAGE_URL + this.resourceUrl; 26 | } 27 | } 28 | return this.resourceUrl; 29 | } 30 | 31 | get isVideo() { 32 | return this.imgOrVideo === VIDEO; 33 | } 34 | 35 | get isImg() { 36 | return this.imgOrVideo === IMAGE; 37 | } 38 | 39 | get isOverlay() { 40 | return this.overlay === 'true'; 41 | } 42 | 43 | // Apply CSS Class depending upon what position to put the hero text block 44 | get heroDetailsPositionClass() { 45 | if (this.heroDetailsPosition === 'left') { 46 | return 'c-hero-center-left'; 47 | } else if (this.heroDetailsPosition === 'right') { 48 | return 'c-hero-center-right'; 49 | } 50 | 51 | return 'c-hero-center-default'; 52 | } 53 | 54 | renderedCallback() { 55 | // Update the overlay with the opacity configured by the admin in builder 56 | const overlay = this.template.querySelector('div'); 57 | if (overlay) { 58 | overlay.style.opacity = parseInt(this.opacity, 10) / 10; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/orderBuilder/orderBuilder.html: -------------------------------------------------------------------------------- 1 | 43 | -------------------------------------------------------------------------------- /.github/workflows/failureNotifications.yml: -------------------------------------------------------------------------------- 1 | name: failureNotifications 2 | on: 3 | workflow_run: 4 | workflows: 5 | - publish 6 | - create-github-release 7 | types: 8 | - completed 9 | jobs: 10 | failure-notify: 11 | runs-on: ubuntu-latest 12 | if: ${{ github.event.workflow_run.conclusion == 'failure' }} 13 | steps: 14 | - name: Announce Failure 15 | id: slack 16 | uses: slackapi/slack-github-action@v1.26.0 17 | env: 18 | # for non-CLI-team-owned plugins, you can send this anywhere you like 19 | SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }} 20 | SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK 21 | with: 22 | # Payload can be visually tested here: https://app.slack.com/block-kit-builder/T01GST6QY0G#%7B%22blocks%22:%5B%5D%7D 23 | # Only copy over the "blocks" array to the Block Kit Builder 24 | payload: | 25 | { 26 | "text": "Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }}", 27 | "blocks": [ 28 | { 29 | "type": "header", 30 | "text": { 31 | "type": "plain_text", 32 | "text": ":bh-alert: Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }} :bh-alert:" 33 | } 34 | }, 35 | { 36 | "type": "section", 37 | "text": { 38 | "type": "mrkdwn", 39 | "text": "*Repo:* ${{ github.event.workflow_run.repository.html_url }}\n*Workflow name:* `${{ github.event.workflow_run.name }}`\n*Job url:* ${{ github.event.workflow_run.html_url }}" 40 | } 41 | } 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/similarProducts/__tests__/data/similarProducts.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Id": "a033B00000381hVQAQ", 4 | "Name": "VOLT X1", 5 | "MSRP__c": 1200, 6 | "Description__c": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", 7 | "Category__c": "Commuter", 8 | "Level__c": "Beginner", 9 | "Picture_URL__c": "https://s3-us-west-1.amazonaws.com/sfdc-demo/ebikes/voltx1.jpg", 10 | "Material__c": "Aluminum", 11 | "$serId$": 1602 12 | }, 13 | { 14 | "Id": "a033B00000381hWQAQ", 15 | "Name": "VOLT X2", 16 | "MSRP__c": 1400, 17 | "Description__c": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", 18 | "Category__c": "Commuter", 19 | "Level__c": "Beginner", 20 | "Picture_URL__c": "https://s3-us-west-1.amazonaws.com/sfdc-demo/ebikes/voltx2.jpg", 21 | "Material__c": "Aluminum", 22 | "$serId$": 1603 23 | }, 24 | { 25 | "Id": "a033B00000381hXQAQ", 26 | "Name": "VOLT X3", 27 | "MSRP__c": 1800, 28 | "Description__c": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", 29 | "Category__c": "Commuter", 30 | "Level__c": "Beginner", 31 | "Picture_URL__c": "https://s3-us-west-1.amazonaws.com/sfdc-demo/ebikes/voltx3.jpg", 32 | "Material__c": "Aluminum", 33 | "$serId$": 1604 34 | } 35 | ] 36 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/orderItemTile/orderItemTile.js: -------------------------------------------------------------------------------- 1 | import { LightningElement, api } from 'lwc'; 2 | 3 | /** 4 | * Displays an Order_Item__c SObject. Note that this component does not use schema imports and uses dynamic 5 | * references to the schema instead. For example, orderItem.Price__c (see template). The dynamic approach is 6 | * less verbose but does not provide referential integrity. The schema imports approach is more verbose but 7 | * enforces referential integrity: 1) The existence of the fields you reference is checked at compile time. 8 | * 2) Fields that are statically imported in a component cannot be deleted in the object model. 9 | */ 10 | export default class OrderItemTile extends LightningElement { 11 | /** Order_Item__c SObject to display. */ 12 | @api orderItem; 13 | 14 | /** Whether the component has unsaved changes. */ 15 | isModified = false; 16 | 17 | /** Mutated/unsaved Order_Item__c values. */ 18 | form = {}; 19 | 20 | /** Handles form input. */ 21 | handleFormChange(evt) { 22 | this.isModified = true; 23 | const field = evt.target.dataset.fieldName; 24 | let value = parseInt(evt.detail.value.trim(), 10); 25 | if (!Number.isInteger(value)) { 26 | value = 0; 27 | } 28 | this.form[field] = value; 29 | } 30 | 31 | /** Fires event to update the Order_Item__c SObject. */ 32 | 33 | saveOrderItem() { 34 | const event = new CustomEvent('orderitemchange', { 35 | detail: Object.assign({}, { Id: this.orderItem.Id }, this.form) 36 | }); 37 | this.dispatchEvent(event); 38 | this.isModified = false; 39 | } 40 | 41 | /** Fires event to delete the Order_Item__c SObject. */ 42 | deleteOrderItem() { 43 | const event = new CustomEvent('orderitemdelete', { 44 | detail: { id: this.orderItem.Id } 45 | }); 46 | this.dispatchEvent(event); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/force-app/main/default/lwc/accountMap/accountMap.js: -------------------------------------------------------------------------------- 1 | import { LightningElement, api, wire } from 'lwc'; 2 | import { getRecord, getFieldValue } from 'lightning/uiRecordApi'; 3 | 4 | import BILLING_CITY from '@salesforce/schema/Account.BillingCity'; 5 | import BILLING_COUNTRY from '@salesforce/schema/Account.BillingCountry'; 6 | import BILLING_POSTAL_CODE from '@salesforce/schema/Account.BillingPostalCode'; 7 | import BILLING_STATE from '@salesforce/schema/Account.BillingState'; 8 | import BILLING_STREET from '@salesforce/schema/Account.BillingStreet'; 9 | 10 | const fields = [ 11 | BILLING_CITY, 12 | BILLING_COUNTRY, 13 | BILLING_POSTAL_CODE, 14 | BILLING_STATE, 15 | BILLING_STREET 16 | ]; 17 | 18 | export default class PropertyMap extends LightningElement { 19 | @api recordId; 20 | 21 | zoomLevel = 14; 22 | markers = []; 23 | error; 24 | 25 | @wire(getRecord, { recordId: '$recordId', fields }) 26 | wiredRecord({ error, data }) { 27 | if (data) { 28 | this.markers = []; 29 | this.error = undefined; 30 | const street = getFieldValue(data, BILLING_STREET); 31 | if (street) { 32 | this.markers = [ 33 | { 34 | location: { 35 | City: getFieldValue(data, BILLING_CITY), 36 | Country: getFieldValue(data, BILLING_COUNTRY), 37 | PostalCode: getFieldValue( 38 | data, 39 | BILLING_POSTAL_CODE 40 | ), 41 | State: getFieldValue(data, BILLING_STATE), 42 | Street: street 43 | } 44 | } 45 | ]; 46 | } 47 | } else if (error) { 48 | this.markers = []; 49 | this.error = error; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /DEVELOPING.md: -------------------------------------------------------------------------------- 1 | ## Pre-requisites 2 | 3 | 1. We typically use the active NodeJS LTS. If you need to work with multiple versions of Node, you 4 | might consider using [nvm](https://github.com/creationix/nvm). 5 | 1. This repository uses [yarn](https://yarnpkg.com/) to manage node dependencies. Please install yarn globally using `npm install --global yarn`. 6 | 7 | ## Typical workflow 8 | 9 | You would only do this once after you cloned the repository. 10 | 11 | 1. Clone this repository from git. 12 | 1. `cd` into `source-tracking`. 13 | 1. We develop using feature brances off `main` and release from the `main` branch. At 14 | this point, you should do initiate a `git checkout -t origin/main`. 15 | 1. `yarn` to bring in all the top-level dependencies. 16 | 1. Open the project in your editor of choice. 17 | 18 | ###### When you are ready to commit 19 | 20 | 1. We enforce commit message format. We recommend using [commitizen](https://github.com/commitizen/cz-cli) by installing it with `yarn global add commitizen` then commit using `git cz` which will prompt you questions to format the commit message. 21 | 1. Before commit and push, husky will run several hooks to ensure the message and that everything lints and compiles properly. 22 | 23 | ## List of Useful commands 24 | 25 | ### `yarn compile` 26 | 27 | This compiles the typescript to javascript. 28 | 29 | ### `yarn clean` 30 | 31 | This cleans all generated files and directories. Run `yarn clean-all` to also clean up the node_module directories. 32 | 33 | ### `yarn test` 34 | 35 | This tests the typescript using ts-node. 36 | 37 | ### `yarn lint` 38 | 39 | This lints all the typescript. If there are no errors/warnings 40 | from eslint, then you get clean output. 41 | 42 | ## `yarn test:nuts:local` 43 | 44 | real tests on real local fs, including some scale and perf tests. 45 | 46 | ## `npx knip` 47 | 48 | makes sure that you're not introducing unnecessary exports or leaving dead code 49 | 50 | unused exports might be used for tests but not by other code 51 | -------------------------------------------------------------------------------- /test/nuts/local/customLabelsMetadataKeyTranslation.nut.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2025, Salesforce, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import path from 'node:path'; 17 | import { TestSession } from '@salesforce/cli-plugins-testkit'; 18 | import { expect } from 'chai'; 19 | import { ComponentStatus, RegistryAccess } from '@salesforce/source-deploy-retrieve'; 20 | import { getMetadataKeyFromFileResponse } from '../../../src/shared/metadataKeys'; 21 | 22 | const registry = new RegistryAccess(); 23 | const getKeys = getMetadataKeyFromFileResponse(registry); 24 | 25 | // this is a NUT to avoid fs-mocking the CustomLabels file that SDR is going to read to getChildren 26 | describe('end-to-end-test for custom labels', () => { 27 | let session: TestSession; 28 | 29 | before(async () => { 30 | session = await TestSession.create({ 31 | project: { 32 | sourceDir: path.join('test', 'nuts', 'repros', 'duplabels'), 33 | }, 34 | devhubAuthStrategy: 'NONE', 35 | }); 36 | }); 37 | 38 | after(async () => { 39 | await session?.clean(); 40 | }); 41 | 42 | it('translates labels to label[]', () => { 43 | const testResponse = { 44 | filePath: path.join(session.project.dir, 'pkg1', 'Test1.labels-meta.xml'), 45 | type: 'CustomLabels', 46 | state: ComponentStatus.Created, 47 | fullName: 'Test1', 48 | }; 49 | expect(getKeys(testResponse)).to.deep.equal(['CustomLabel###Label1']); 50 | }); 51 | }); 52 | -------------------------------------------------------------------------------- /test/nuts/ebikes-lwc/CONTRIBUTION.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | 1. Familiarize yourself with the codebase. 4 | 1. Create a new issue before starting your project so that we can keep track of 5 | what you are trying to add/fix. That way, we can also offer suggestions or 6 | let you know if there is already an effort in progress. We will let you know when you're good to go to start. 7 | 1. Fork this repository. 8 | 1. The [README](README.md) has details on how to set up your environment. 9 | 1. Create a _topic_ branch in your fork based on the correct branch (usually the **main** branch. Note, this step is recommended but technically not required if contributing using a fork. 10 | 1. Edit the code in your fork. 11 | 1. Sign CLA (see [CLA](#cla) below) 12 | 1. Send us a pull request when you are done. We'll review your code, suggest any 13 | needed changes, and merge it in. 14 | 15 | ### CLA 16 | 17 | External contributors will be required to sign a Contributor's License 18 | Agreement. You can do so by going to https://cla.salesforce.com/sign-cla. 19 | 20 | ## Branches 21 | 22 | - We work in `main`. 23 | - Our released (aka. _production_) branch is `main`. 24 | - Our work happens in _topic_ branches (feature and/or bug-fix). 25 | - feature as well as bug-fix branches are based on `main` 26 | - branches _should_ be kept up-to-date using `rebase` 27 | - see below for further merge instructions 28 | 29 | ### Merging between branches 30 | 31 | - We try to limit merge commits as much as possible. 32 | 33 | - _Topic_ branches are: 34 | 35 | 1. based on `main` and will be 36 | 1. squash-merged into `main`. 37 | 38 | ## Pull Requests 39 | 40 | - Develop features and bug fixes in _topic_ branches. 41 | - _Topic_ branches can live in forks (external contributors) or within this repository (committers). 42 | \*\* When creating _topic_ branches in this repository please prefix with `/`. 43 | 44 | ### Merging Pull Requests 45 | 46 | - Pull request merging is restricted to squash & merge only. 47 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | 1. The [DEVELOPING](DEVELOPING.md) doc has details on how to set up your environment. 4 | 1. Create a new issue before starting your project so that we can keep track of 5 | what you are trying to add/fix. That way, we can also offer suggestions or 6 | let you know if there is already an effort in progress. 7 | 1. Fork this repository. 8 | 1. Create a _topic_ branch in your fork based on the main branch. Note, this step is recommended but technically not required if contributing using a fork. 9 | 1. Edit the code in your fork. 10 | 1. Write appropriate tests for your changes. Try to achieve at least 95% code coverage on any new code. No pull request will be accepted without unit tests. 11 | 1. Sign CLA (see [CLA](#cla) below). 12 | 1. Send us a pull request when you are done. We'll review your code, suggest any 13 | needed changes, and merge it in. 14 | 15 | ### CLA 16 | 17 | External contributors will be required to sign a Contributor's License 18 | Agreement. You can do so by going to https://cla.salesforce.com/sign-cla. 19 | 20 | ## Branches 21 | 22 | - We work in branches off of `main`. 23 | - Our released (aka. _production_) branch is `main`. 24 | - Our work happens in _topic_ branches (feature and/or bug-fix). 25 | - feature as well as bug-fix branches are based on `main` 26 | - branches _should_ be kept up-to-date using `rebase` 27 | - [commit messages are enforced](DEVELOPING.md#When-you-are-ready-to-commit) 28 | - see below for further merge instructions 29 | 30 | ### Releasing 31 | 32 | - A new version of this library will be published upon merging PRs to `main`, with the version number increment based on commitizen. 33 | 34 | ## Pull Requests 35 | 36 | - Develop features and bug fixes in _topic_ branches. 37 | - _Topic_ branches can live in forks (external contributors) or within this repository (committers). 38 | \*\* When creating _topic_ branches in this repository please prefix with `/`. 39 | 40 | ### Merging Pull Requests 41 | 42 | - Pull request merging is restricted to squash & merge only. 43 | --------------------------------------------------------------------------------