diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 250593b98..6c9016d6b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,17 +1,17 @@ version: 2 updates: - - package-ecosystem: "npm" - directory: "/" + - package-ecosystem: 'npm' + directory: '/' schedule: - interval: "monthly" + interval: 'monthly' labels: - - "dependencies" + - 'dependencies' open-pull-requests-limit: 100 pull-request-branch-name: - separator: "-" + separator: '-' ignore: - - dependency-name: "typescript" - - dependency-name: "sinon" - - dependency-name: "string-ansi" - - dependency-name: "*" - update-types: ["version-update:semver-major"] + - dependency-name: 'typescript' + - dependency-name: 'sinon' + - dependency-name: 'string-ansi' + - dependency-name: '*' + update-types: ['version-update:semver-major'] diff --git a/.github/workflows/slackprnotification.yml b/.github/workflows/slackprnotification.yml index 7ea079635..581359cbc 100644 --- a/.github/workflows/slackprnotification.yml +++ b/.github/workflows/slackprnotification.yml @@ -8,16 +8,16 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Notify slack pr open - env: - WEBHOOK_URL : ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }} - PULL_REQUEST_AUTHOR_ICON_URL : ${{ github.event.pull_request.user.avatar_url }} - PULL_REQUEST_AUTHOR_NAME : ${{ github.event.pull_request.user.login }} - PULL_REQUEST_AUTHOR_PROFILE_URL: ${{ github.event.pull_request.user.html_url }} - PULL_REQUEST_BASE_BRANCH_NAME : ${{ github.event.pull_request.base.ref }} - PULL_REQUEST_COMPARE_BRANCH_NAME : ${{ github.event.pull_request.head.ref }} - PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }} - PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.name }} - PULL_REQUEST_TITLE : ${{ github.event.pull_request.title }} - PULL_REQUEST_URL : ${{ github.event.pull_request.html_url }} - uses: salesforcecli/pr-notification-action@main + - name: Notify slack pr open + env: + WEBHOOK_URL: ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }} + PULL_REQUEST_AUTHOR_ICON_URL: ${{ github.event.pull_request.user.avatar_url }} + PULL_REQUEST_AUTHOR_NAME: ${{ github.event.pull_request.user.login }} + PULL_REQUEST_AUTHOR_PROFILE_URL: ${{ github.event.pull_request.user.html_url }} + PULL_REQUEST_BASE_BRANCH_NAME: ${{ github.event.pull_request.base.ref }} + PULL_REQUEST_COMPARE_BRANCH_NAME: ${{ github.event.pull_request.head.ref }} + PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} + PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.name }} + PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }} + PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} + uses: salesforcecli/pr-notification-action@main diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c2b840b6..3e49c3c2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,79 +6,69 @@ All notable changes to this project will be documented in this file. See [standa ## [1.1.0](https://github.com/salesforcecli/plugin-source/compare/v1.0.16...v1.1.0) (2021-09-24) - ### Features -* source:delete ([#199](https://github.com/salesforcecli/plugin-source/issues/199)) ([4c443c8](https://github.com/salesforcecli/plugin-source/commit/4c443c818c64829e0043932fb6fc4c0823207ebd)) - +- source:delete ([#199](https://github.com/salesforcecli/plugin-source/issues/199)) ([4c443c8](https://github.com/salesforcecli/plugin-source/commit/4c443c818c64829e0043932fb6fc4c0823207ebd)) ### Bug Fixes -* find server errors and display them with FileResponse errors ([#210](https://github.com/salesforcecli/plugin-source/issues/210)) ([99df1ca](https://github.com/salesforcecli/plugin-source/commit/99df1ca41e83eba15646545f94c1e2ff713a6da9)) +- find server errors and display them with FileResponse errors ([#210](https://github.com/salesforcecli/plugin-source/issues/210)) ([99df1ca](https://github.com/salesforcecli/plugin-source/commit/99df1ca41e83eba15646545f94c1e2ff713a6da9)) ### [1.0.16](https://github.com/salesforcecli/plugin-source/compare/v1.0.15...v1.0.16) (2021-09-10) ### [1.0.15](https://github.com/salesforcecli/plugin-source/compare/v1.0.14...v1.0.15) (2021-09-09) - ### Bug Fixes -* bump SDR to 4.4.1 ([#207](https://github.com/salesforcecli/plugin-source/issues/207)) ([d80ddf3](https://github.com/salesforcecli/plugin-source/commit/d80ddf30b7aa63129ffcbb40785c3873bc8c8f6d)) +- bump SDR to 4.4.1 ([#207](https://github.com/salesforcecli/plugin-source/issues/207)) ([d80ddf3](https://github.com/salesforcecli/plugin-source/commit/d80ddf30b7aa63129ffcbb40785c3873bc8c8f6d)) ### [1.0.14](https://github.com/salesforcecli/plugin-source/compare/v1.0.13...v1.0.14) (2021-09-09) - ### Bug Fixes -* release with new SDR version ([e803bc8](https://github.com/salesforcecli/plugin-source/commit/e803bc84f8a498bd6cea1f7c363fb5482b45e034)) +- release with new SDR version ([e803bc8](https://github.com/salesforcecli/plugin-source/commit/e803bc84f8a498bd6cea1f7c363fb5482b45e034)) ### [1.0.13](https://github.com/salesforcecli/plugin-source/compare/v1.0.12...v1.0.13) (2021-09-08) ### [1.0.12](https://github.com/salesforcecli/plugin-source/compare/v1.0.11...v1.0.12) (2021-08-26) - ### Bug Fixes -* force a release that updates SDR dependency ([b08ef1f](https://github.com/salesforcecli/plugin-source/commit/b08ef1f21d673353d483921a907d945f74584340)) +- force a release that updates SDR dependency ([b08ef1f](https://github.com/salesforcecli/plugin-source/commit/b08ef1f21d673353d483921a907d945f74584340)) ### [1.0.11](https://github.com/salesforcecli/plugin-source/compare/v1.0.10...v1.0.11) (2021-08-26) - ### Bug Fixes -* trim metadata type, and name to prevent unnecessary errors ([#179](https://github.com/salesforcecli/plugin-source/issues/179)) ([2011caa](https://github.com/salesforcecli/plugin-source/commit/2011caae414c9c4ac6e51e9d3a1da50513d3dc77)) +- trim metadata type, and name to prevent unnecessary errors ([#179](https://github.com/salesforcecli/plugin-source/issues/179)) ([2011caa](https://github.com/salesforcecli/plugin-source/commit/2011caae414c9c4ac6e51e9d3a1da50513d3dc77)) ### [1.0.10](https://github.com/salesforcecli/plugin-source/compare/v1.0.9...v1.0.10) (2021-08-20) - ### Bug Fixes -* wildcard metadata retrieves will now fetch source not in the project ([#177](https://github.com/salesforcecli/plugin-source/issues/177)) ([3e542c3](https://github.com/salesforcecli/plugin-source/commit/3e542c39bf9b6591c6afd4696809ea28e4b98678)) +- wildcard metadata retrieves will now fetch source not in the project ([#177](https://github.com/salesforcecli/plugin-source/issues/177)) ([3e542c3](https://github.com/salesforcecli/plugin-source/commit/3e542c39bf9b6591c6afd4696809ea28e4b98678)) ### [1.0.9](https://github.com/salesforcecli/plugin-source/compare/v1.0.7...v1.0.9) (2021-08-12) - ### Bug Fixes -* update command long descriptions ([#174](https://github.com/salesforcecli/plugin-source/issues/174)) ([12f1301](https://github.com/salesforcecli/plugin-source/commit/12f1301bc387f3d7ddcb5f6393bbcf20d038eb1c)) +- update command long descriptions ([#174](https://github.com/salesforcecli/plugin-source/issues/174)) ([12f1301](https://github.com/salesforcecli/plugin-source/commit/12f1301bc387f3d7ddcb5f6393bbcf20d038eb1c)) ### [1.0.7](https://github.com/salesforcecli/plugin-source/compare/v1.0.6...v1.0.7) (2021-08-05) - ### Bug Fixes -* bump SDR to 4.0.2 ([#169](https://github.com/salesforcecli/plugin-source/issues/169)) ([f750a3b](https://github.com/salesforcecli/plugin-source/commit/f750a3b9e841a9f6fe22e65093cb58886db69d93)) +- bump SDR to 4.0.2 ([#169](https://github.com/salesforcecli/plugin-source/issues/169)) ([f750a3b](https://github.com/salesforcecli/plugin-source/commit/f750a3b9e841a9f6fe22e65093cb58886db69d93)) ### [1.0.6](https://github.com/salesforcecli/plugin-source/compare/v1.0.5...v1.0.6) (2021-07-30) ### [1.0.5](https://github.com/salesforcecli/plugin-source/compare/v1.0.3...v1.0.5) (2021-07-29) - ### Bug Fixes -* add verbose test detail when deploying with tests ([#151](https://github.com/salesforcecli/plugin-source/issues/151)) ([1485c0e](https://github.com/salesforcecli/plugin-source/commit/1485c0e47cba4faf22f0420a561f8986e229ada0)) -* bump to 1.0.5 ([#160](https://github.com/salesforcecli/plugin-source/issues/160)) ([b0716cf](https://github.com/salesforcecli/plugin-source/commit/b0716cf0096727137ecfaa1e9e687278d0a046fd)) -* missing metadata type error matches toolbelt ([#155](https://github.com/salesforcecli/plugin-source/issues/155)) ([45ec6d0](https://github.com/salesforcecli/plugin-source/commit/45ec6d069b7d50642daccb3214e6ae8d0bdb6db1)) +- add verbose test detail when deploying with tests ([#151](https://github.com/salesforcecli/plugin-source/issues/151)) ([1485c0e](https://github.com/salesforcecli/plugin-source/commit/1485c0e47cba4faf22f0420a561f8986e229ada0)) +- bump to 1.0.5 ([#160](https://github.com/salesforcecli/plugin-source/issues/160)) ([b0716cf](https://github.com/salesforcecli/plugin-source/commit/b0716cf0096727137ecfaa1e9e687278d0a046fd)) +- missing metadata type error matches toolbelt ([#155](https://github.com/salesforcecli/plugin-source/issues/155)) ([45ec6d0](https://github.com/salesforcecli/plugin-source/commit/45ec6d069b7d50642daccb3214e6ae8d0bdb6db1)) ### [1.0.3](https://github.com/salesforcecli/plugin-source/compare/v1.0.2...v1.0.3) (2021-07-28) diff --git a/README.md b/README.md index 256c95431..8b85f1a20 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ sfdx plugins # Usage + ```sh-session $ npm install -g @salesforce/plugin-source $ sfdx COMMAND @@ -86,27 +87,29 @@ USAGE $ sfdx COMMAND ... ``` + # Commands -* [`sfdx force:source:convert [-r ] [-d ] [-n ] [-p | -x | -m ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourceconvert--r-directory--d-directory--n-string--p-array---x-string---m-array---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -* [`sfdx `](#sfdx-) -* [`sfdx force:source:deploy [--soapdeploy] [-w ] [-q | -x | -m | -p | -c | -l NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg | -r | -o | -g] [-u ] [--apiversion ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourcedeploy---soapdeploy--w-minutes--q-id---x-filepath---m-array---p-array---c---l-notestrunrunspecifiedtestsrunlocaltestsrunalltestsinorg---r-array---o---g--u-string---apiversion-string---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -* [`sfdx force:source:deploy:cancel [-w ] [-i ] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourcedeploycancel--w-minutes--i-id--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -* [`sfdx force:source:deploy:report [-w ] [-i ] [-u ] [--apiversion ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourcedeployreport--w-minutes--i-id--u-string---apiversion-string---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -* [`sfdx force:source:manifest:create [-m | -p ] [-n | -t pre|post|destroy|package] [-o ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourcemanifestcreate--m-array---p-array--n-string---t-prepostdestroypackage--o-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -* [`sfdx force:source:open -f [-r] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourceopen--f-filepath--r--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) -* [`sfdx force:source:retrieve [-p | -x | -m ] [-w ] [-n ] [-u ] [-a ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourceretrieve--p-array---x-filepath---m-array--w-minutes--n-array--u-string--a-string---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) + +- [`sfdx force:source:convert [-r ] [-d ] [-n ] [-p | -x | -m ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourceconvert--r-directory--d-directory--n-string--p-array---x-string---m-array---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) +- [`sfdx `](#sfdx-) +- [`sfdx force:source:deploy [--soapdeploy] [-w ] [-q | -x | -m | -p | -c | -l NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg | -r | -o | -g] [-u ] [--apiversion ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourcedeploy---soapdeploy--w-minutes--q-id---x-filepath---m-array---p-array---c---l-notestrunrunspecifiedtestsrunlocaltestsrunalltestsinorg---r-array---o---g--u-string---apiversion-string---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) +- [`sfdx force:source:deploy:cancel [-w ] [-i ] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourcedeploycancel--w-minutes--i-id--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) +- [`sfdx force:source:deploy:report [-w ] [-i ] [-u ] [--apiversion ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourcedeployreport--w-minutes--i-id--u-string---apiversion-string---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) +- [`sfdx force:source:manifest:create [-m | -p ] [-n | -t pre|post|destroy|package] [-o ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourcemanifestcreate--m-array---p-array--n-string---t-prepostdestroypackage--o-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) +- [`sfdx force:source:open -f [-r] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourceopen--f-filepath--r--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) +- [`sfdx force:source:retrieve [-p | -x | -m ] [-w ] [-n ] [-u ] [-a ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]`](#sfdx-forcesourceretrieve--p-array---x-filepath---m-array--w-minutes--n-array--u-string--a-string---verbose---json---loglevel-tracedebuginfowarnerrorfataltracedebuginfowarnerrorfatal) ## `sfdx force:source:convert [-r ] [-d ] [-n ] [-p | -x | -m ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]` -convert source into Metadata API format +convert source into Metadata API format ``` -convert source into Metadata API format - Converts source-formatted files into metadata that you can deploy using Metadata API. +convert source into Metadata API format + Converts source-formatted files into metadata that you can deploy using Metadata API. To convert source-formatted files into the metadata format, so that you can deploy them using Metadata API, run "sfdx force:source:convert". Then deploy the metadata using "sfdx force:mdapi:deploy". @@ -115,7 +118,7 @@ To convert Metadata API–formatted files into the source format, run "sfdx forc To specify a package name that includes spaces, enclose the name in single quotes. USAGE - $ sfdx force:source:convert [-r ] [-d ] [-n ] [-p | -x | -m ] + $ sfdx force:source:convert [-r ] [-d ] [-n ] [-p | -x | -m ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -145,7 +148,7 @@ OPTIONS this command invocation DESCRIPTION - Converts source-formatted files into metadata that you can deploy using Metadata API. + Converts source-formatted files into metadata that you can deploy using Metadata API. To convert source-formatted files into the metadata format, so that you can deploy them using Metadata API, run "sfdx force:source:convert". Then deploy the metadata using "sfdx force:mdapi:deploy". @@ -162,10 +165,10 @@ _See code: [src/commands/force/source/convert.ts](https://github.com/salesforcec ## `sfdx ` -delete source from your project and from a non-source-tracked org +delete source from your project and from a non-source-tracked org ``` -delete source from your project and from a non-source-tracked org +delete source from your project and from a non-source-tracked org Use this command to delete components from orgs that don’t have source tracking. To remove deleted items from scratch orgs, which have change tracking, use "sfdx force:source:push". @@ -235,8 +238,8 @@ If the comma-separated list you’re supplying contains spaces, enclose the enti USAGE - $ sfdx force:source:deploy [--soapdeploy] [-w ] [-q | -x | -m | -p | -c | -l - NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg | -r | -o | -g] [-u ] [--apiversion + $ sfdx force:source:deploy [--soapdeploy] [-w ] [-q | -x | -m | -p | -c | -l + NoTestRun|RunSpecifiedTests|RunLocalTests|RunAllTestsInOrg | -r | -o | -g] [-u ] [--apiversion ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -291,20 +294,20 @@ DESCRIPTION To take advantage of change tracking with scratch orgs, use "sfdx force:source:push". To deploy metadata that’s in metadata format, use "sfdx force:mdapi:deploy". - The source you deploy overwrites the corresponding metadata in your org. This command does not attempt to merge your + The source you deploy overwrites the corresponding metadata in your org. This command does not attempt to merge your source with the versions in your org. - To run the command asynchronously, set --wait to 0, which immediately returns the job ID. This way, you can continue + To run the command asynchronously, set --wait to 0, which immediately returns the job ID. This way, you can continue to use the CLI. To check the status of the job, use force:source:deploy:report. - If the comma-separated list you’re supplying contains spaces, enclose the entire comma-separated list in one set of + If the comma-separated list you’re supplying contains spaces, enclose the entire comma-separated list in one set of double quotes. On Windows, if the list contains commas, also enclose the entire list in one set of double quotes. EXAMPLES To deploy the source files in a directory: $ sfdx force:source:deploy -p path/to/source - To deploy a specific Apex class and the objects whose source is in a directory: + To deploy a specific Apex class and the objects whose source is in a directory: $ sfdx force:source:deploy -p "path/to/apex/classes/MyClass.cls,path/to/source/objects" To deploy source files in a comma-separated list that contains spaces: $ sfdx force:source:deploy -p "path/to/objects/MyCustomObject/fields/MyField.field-meta.xml, path/to/apex/classes" @@ -340,7 +343,7 @@ To run the command asynchronously, set --wait to 0, which immediately returns th To check the status of the job, use force:source:deploy:report. USAGE - $ sfdx force:source:deploy:cancel [-w ] [-i ] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx force:source:deploy:cancel [-w ] [-i ] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -363,10 +366,10 @@ OPTIONS this command invocation DESCRIPTION - Use this command to cancel a specified asynchronous source deployment. You can also specify a wait time (in minutes) + Use this command to cancel a specified asynchronous source deployment. You can also specify a wait time (in minutes) to check for updates to the canceled deploy status. - To run the command asynchronously, set --wait to 0, which immediately returns the job ID. This way, you can continue + To run the command asynchronously, set --wait to 0, which immediately returns the job ID. This way, you can continue to use the CLI. To check the status of the job, use force:source:deploy:report. @@ -385,14 +388,14 @@ _See code: [src/commands/force/source/deploy/cancel.ts](https://github.com/sales ## `sfdx force:source:deploy:report [-w ] [-i ] [-u ] [--apiversion ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]` -check the status of a metadata deployment +check the status of a metadata deployment ``` -check the status of a metadata deployment +check the status of a metadata deployment Specify the job ID for the deploy you want to check. You can also specify a wait time (minutes) to check for updates to the deploy status. USAGE - $ sfdx force:source:deploy:report [-w ] [-i ] [-u ] [--apiversion ] [--verbose] [--json] + $ sfdx force:source:deploy:report [-w ] [-i ] [-u ] [--apiversion ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -417,7 +420,7 @@ OPTIONS --verbose verbose output of deploy result DESCRIPTION - Specify the job ID for the deploy you want to check. You can also specify a wait time (minutes) to check for updates + Specify the job ID for the deploy you want to check. You can also specify a wait time (minutes) to check for updates to the deploy status. EXAMPLES @@ -435,10 +438,10 @@ _See code: [src/commands/force/source/deploy/report.ts](https://github.com/sales ## `sfdx force:source:manifest:create [-m | -p ] [-n | -t pre|post|destroy|package] [-o ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]` -create a project manifest that lists the metadata components you want to deploy or retrieve +create a project manifest that lists the metadata components you want to deploy or retrieve ``` -create a project manifest that lists the metadata components you want to deploy or retrieve +create a project manifest that lists the metadata components you want to deploy or retrieve Create a manifest from a list of metadata components (--metadata) or from one or more local directories that contain source files (--sourcepath). You can specify either of these parameters, not both. Use --manifesttype to specify the type of manifest you want to create. The resulting manifest files have specific names, such as the standard package.xml or destructiveChanges.xml to delete metadata. Valid values for this parameter, and their respective file names, are: @@ -448,14 +451,14 @@ Use --manifesttype to specify the type of manifest you want to create. The resul post : destructiveChangesPost.xml destroy : destructiveChanges.xml -See https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_deleting_files.htm for information about these destructive manifest files. +See https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_deleting_files.htm for information about these destructive manifest files. Use --manifestname to specify a custom name for the generated manifest if the pre-defined ones don’t suit your needs. You can specify either --manifesttype or --manifestname, but not both. USAGE - $ sfdx force:source:manifest:create [-m | -p ] [-n | -t pre|post|destroy|package] [-o - ] [--apiversion ] [--json] [--loglevel + $ sfdx force:source:manifest:create [-m | -p ] [-n | -t pre|post|destroy|package] [-o + ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -486,11 +489,11 @@ OPTIONS this command invocation DESCRIPTION - Create a manifest from a list of metadata components (--metadata) or from one or more local directories that contain + Create a manifest from a list of metadata components (--metadata) or from one or more local directories that contain source files (--sourcepath). You can specify either of these parameters, not both. - Use --manifesttype to specify the type of manifest you want to create. The resulting manifest files have specific - names, such as the standard package.xml or destructiveChanges.xml to delete metadata. Valid values for this parameter, + Use --manifesttype to specify the type of manifest you want to create. The resulting manifest files have specific + names, such as the standard package.xml or destructiveChanges.xml to delete metadata. Valid values for this parameter, and their respective file names, are: package : package.xml (default) @@ -498,10 +501,10 @@ DESCRIPTION post : destructiveChangesPost.xml destroy : destructiveChanges.xml - See https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_deleting_files.htm for - information about these destructive manifest files. + See https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_deleting_files.htm for + information about these destructive manifest files. - Use --manifestname to specify a custom name for the generated manifest if the pre-defined ones don’t suit your needs. + Use --manifestname to specify a custom name for the generated manifest if the pre-defined ones don’t suit your needs. You can specify either --manifesttype or --manifestname, but not both. EXAMPLES @@ -525,7 +528,7 @@ If no browser-based editor is available for the selected file, this command open To generate a URL for the browser-based editor but not open the editor, use --urlonly. USAGE - $ sfdx force:source:open -f [-r] [-u ] [--apiversion ] [--json] [--loglevel + $ sfdx force:source:open -f [-r] [-u ] [--apiversion ] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -546,8 +549,8 @@ OPTIONS this command invocation DESCRIPTION - Opens the specified Lightning Page in Lightning App Builder. Lightning Page files have the suffix .flexipage-meta.xml, - and are stored in the flexipages directory. If you specify a different type of file, this command opens your org’s + Opens the specified Lightning Page in Lightning App Builder. Lightning Page files have the suffix .flexipage-meta.xml, + and are stored in the flexipages directory. If you specify a different type of file, this command opens your org’s home page. The file opens in your default browser. @@ -564,10 +567,10 @@ _See code: [src/commands/force/source/open.ts](https://github.com/salesforcecli/ ## `sfdx force:source:retrieve [-p | -x | -m ] [-w ] [-n ] [-u ] [-a ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]` -retrieve source from an org +retrieve source from an org ``` -retrieve source from an org +retrieve source from an org Use this command to retrieve source (metadata that’s in source format) from an org. To take advantage of change tracking with scratch orgs, use "sfdx force:source:pull". To retrieve metadata that’s in metadata format, use "sfdx force:mdapi:retrieve". @@ -577,7 +580,7 @@ The source you retrieve overwrites the corresponding source files in your local If the comma-separated list you’re supplying contains spaces, enclose the entire comma-separated list in one set of double quotes. On Windows, if the list contains commas, also enclose it in one set of double quotes. USAGE - $ sfdx force:source:retrieve [-p | -x | -m ] [-w ] [-n ] [-u ] [-a + $ sfdx force:source:retrieve [-p | -x | -m ] [-w ] [-n ] [-u ] [-a ] [--verbose] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] OPTIONS @@ -614,10 +617,10 @@ DESCRIPTION To take advantage of change tracking with scratch orgs, use "sfdx force:source:pull". To retrieve metadata that’s in metadata format, use "sfdx force:mdapi:retrieve". - The source you retrieve overwrites the corresponding source files in your local project. This command does not attempt + The source you retrieve overwrites the corresponding source files in your local project. This command does not attempt to merge the source from your org with your local source files. - If the comma-separated list you’re supplying contains spaces, enclose the entire comma-separated list in one set of + If the comma-separated list you’re supplying contains spaces, enclose the entire comma-separated list in one set of double quotes. On Windows, if the list contains commas, also enclose it in one set of double quotes. EXAMPLES @@ -626,7 +629,7 @@ EXAMPLES To retrieve a specific Apex class and the objects whose source is in a directory: $ sfdx force:source:retrieve -p "path/to/apex/classes/MyClass.cls,path/to/source/objects" To retrieve source files in a comma-separated list that contains spaces: - $ sfdx force:source:retrieve -p "path/to/objects/MyCustomObject/fields/MyField.field-meta.xml, + $ sfdx force:source:retrieve -p "path/to/objects/MyCustomObject/fields/MyField.field-meta.xml, path/to/apex/classes To retrieve all Apex classes: $ sfdx force:source:retrieve -m ApexClass @@ -641,7 +644,7 @@ EXAMPLES To retrieve metadata from a package or multiple packages: $ sfdx force:source:retrieve -n MyPackageName $ sfdx force:source:retrieve -n "Package1, PackageName With Spaces, Package3" - To retrieve all metadata from a package and specific components that aren’t in the package, specify both -n | + To retrieve all metadata from a package and specific components that aren’t in the package, specify both -n | --packagenames and one other scoping parameter: $ sfdx force:source:retrieve -n MyPackageName -p path/to/apex/classes $ sfdx force:source:retrieve -n MyPackageName -m ApexClass:MyApexClass @@ -649,4 +652,5 @@ EXAMPLES ``` _See code: [src/commands/force/source/retrieve.ts](https://github.com/salesforcecli/plugin-source/blob/v1.1.0/src/commands/force/source/retrieve.ts)_ + diff --git a/package.json b/package.json index 788dae8a2..7cf1bf409 100644 --- a/package.json +++ b/package.json @@ -135,6 +135,7 @@ "test:nuts:folders": "nyc mocha \"test/nuts/folderTypes.nut.ts\" --slow 3000 --timeout 600000", "test:nuts:manifest:create": "nyc mocha \"test/nuts/create.nut.ts\" --slow 3000 --timeout 600000 --parallel --retries 0", "test:nuts:retrieve": "PLUGIN_SOURCE_SEED_FILTER=\"retrieve\" ts-node ./test/nuts/generateNuts.ts && nyc mocha \"**/*.nut.ts\" --slow 3000 --timeout 600000 --parallel --retries 0", + "test:nuts:territory2": "nyc mocha \"test/nuts/territory2.nut.ts\" --slow 3000 --timeout 600000 --retries 0", "version": "oclif-dev readme" }, "husky": { diff --git a/test/nuts/territory2.nut.ts b/test/nuts/territory2.nut.ts new file mode 100644 index 000000000..a4e27bf7d --- /dev/null +++ b/test/nuts/territory2.nut.ts @@ -0,0 +1,288 @@ +/* + * Copyright (c) 2020, salesforce.com, inc. + * All rights reserved. + * Licensed under the BSD 3-Clause license. + * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause + */ +import * as fs from 'fs'; +import * as path from 'path'; +import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; +import { expect } from 'chai'; +import { DeployCommandResult } from '../../src/formatters/deployResultFormatter'; +import { RetrieveCommandResult } from '../../src/formatters/retrieveResultFormatter'; + +describe('territories', () => { + let session: TestSession; + let projectPath; + let modelPath; + + before(async () => { + session = await TestSession.create({ + project: { + // special thanks to Scott Wells for this sample project + sourceDir: path.join(process.cwd(), 'test', 'nuts', 'territoryProject'), + }, + setupCommands: [ + 'sfdx force:org:create -f config/project-scratch-def.json --setdefaultusername --wait 10 --durationdays 1', + ], + }); + projectPath = path.join(session.project.dir, 'force-app', 'main', 'default'); + modelPath = path.join(projectPath, 'territory2Models', 'SCW_Territory_Model'); + }); + + after(async () => { + await session?.clean(); + }); + + describe('manifest', () => { + after(async () => { + await fs.promises.unlink(path.join(session.project.dir, 'package.xml')); + }); + + it('can generate manifest for territory types', async () => { + execCmd('force:source:manifest:create -p force-app --json', { ensureExitCode: 0 }); + expect(fs.existsSync(path.join(session.project.dir, 'package.xml'))).to.be.true; + }); + + it('deploy', () => { + const deployResults = execCmd('force:source:deploy -x package.xml --json', { + ensureExitCode: 0, + }).jsonOutput.result; + expect(deployResults.deployedSource.length).to.equal(8); + }); + + it('retrieve without local metadata', async () => { + // delete and recreate an empty dir + await fs.promises.rmdir(path.join(session.project.dir, 'force-app'), { recursive: true }); + await fs.promises.mkdir(path.join(session.project.dir, 'force-app')); + const retrieveResults = execCmd('force:source:retrieve -x package.xml --json', { + ensureExitCode: 0, + }).jsonOutput.result; + expect(retrieveResults.inboundFiles).to.have.length(8); + }); + }); + + describe('metadata', () => { + describe('deploy', () => { + it('can deploy all metadata items', async () => { + execCmd('force:source:deploy -m Territory2,Territory2Model,Territory2Rule,Territory2Type --json', { + ensureExitCode: 0, + }); + }); + + describe('individual type deploys', () => { + it('can deploy Territory2Model', async () => { + execCmd('force:source:deploy -m Territory2Model --json', { + ensureExitCode: 0, + }); + }); + + it('can deploy Territory2Rule', async () => { + execCmd('force:source:deploy -m Territory2Rule --json', { + ensureExitCode: 0, + }); + }); + + it('can deploy Territory2Type', async () => { + execCmd('force:source:deploy -m Territory2Type --json', { + ensureExitCode: 0, + }); + }); + + it('can deploy Territory2', async () => { + execCmd('force:source:deploy -m Territory2 --json', { + ensureExitCode: 0, + }); + }); + }); + + describe('individual metadata item deploys', () => { + it('can deploy Territory2Model', async () => { + execCmd('force:source:deploy -m Territory2Model:SCW_Territory_Model --json', { + ensureExitCode: 0, + }); + }); + + it('can deploy Territory2Rule', async () => { + execCmd('force:source:deploy -m Territory2Rule:SCW_Territory_Model.Fishing_Stores --json', { + ensureExitCode: 0, + }); + }); + + it('can deploy Territory2', async () => { + execCmd('force:source:deploy -m Territory2:SCW_Territory_Model.Austin --json', { + ensureExitCode: 0, + }); + }); + }); + }); + + describe('retrieve', () => { + it('can retrieve all metadata items', async () => { + execCmd('force:source:retrieve -m Territory2,Territory2Model,Territory2Rule,Territory2Type --json', { + ensureExitCode: 0, + }); + }); + + describe('individual type retrieves', () => { + it('can retrieve Territory2Model', async () => { + execCmd('force:source:retrieve -m Territory2Model --json', { + ensureExitCode: 0, + }); + }); + + it('can retrieve Territory2Rule', async () => { + execCmd('force:source:retrieve -m Territory2Rule --json', { + ensureExitCode: 0, + }); + }); + + it('can retrieve Territory2Type', async () => { + execCmd('force:source:retrieve -m Territory2Type --json', { + ensureExitCode: 0, + }); + }); + + it('can retrieve Territory2', async () => { + execCmd('force:source:retrieve -m Territory2 --json', { + ensureExitCode: 0, + }); + }); + }); + + describe('individual metadata item deploys', () => { + it('can deploy Territory2Model', async () => { + execCmd('force:source:deploy -m Territory2Model:SCW_Territory_Model --json', { + ensureExitCode: 0, + }); + }); + + it('can deploy Territory2Rule', async () => { + execCmd('force:source:deploy -m Territory2Rule:SCW_Territory_Model.Fishing_Stores --json', { + ensureExitCode: 0, + }); + }); + + it('can deploy Territory2', async () => { + execCmd('force:source:deploy -m Territory2:SCW_Territory_Model.Austin --json', { + ensureExitCode: 0, + }); + }); + }); + }); + }); + + describe('sourcepath', () => { + describe('deploy', () => { + it('can deploy the whole project', async () => { + execCmd('force:source:deploy -p force-app --json', { + ensureExitCode: 0, + }); + }); + + describe('individual type deploys', () => { + it('can deploy Territory2Rule', async () => { + execCmd(`force:source:deploy -p ${path.join(modelPath, 'rules')} --json`, { + ensureExitCode: 0, + }); + }); + + it('can deploy Territory2Type', async () => { + execCmd(`force:source:deploy -p ${path.join(projectPath, 'territory2Types')} --json`, { + ensureExitCode: 0, + }); + }); + + it('can deploy Territory2', async () => { + execCmd(`force:source:deploy -p ${path.join(modelPath, 'territories')} --json`, { + ensureExitCode: 0, + }); + }); + }); + + describe('individual metadata item deploys', () => { + it('can deploy Territory2Model', async () => { + execCmd('force:source:deploy -m Territory2Model:SCW_Territory_Model --json', { + ensureExitCode: 0, + }); + }); + + it('can deploy Territory2Rule', async () => { + execCmd( + `force:source:deploy -p ${path.join(modelPath, 'rules', 'Fishing_Stores.territory2Rule-meta.xml')} --json`, + { + ensureExitCode: 0, + } + ); + }); + + it('can deploy Territory2', async () => { + execCmd( + `force:source:deploy -p ${path.join(modelPath, 'territories', 'Austin.territory2-meta.xml')} --json`, + { + ensureExitCode: 0, + } + ); + }); + }); + }); + + describe('retrieve', () => { + it('can retrieve the whole project', async () => { + execCmd('force:source:retrieve -p force-app --json', { + ensureExitCode: 0, + }); + }); + + describe('individual type retrieves', () => { + it('can retrieve Territory2Rule', async () => { + execCmd(`force:source:retrieve -p ${path.join(modelPath, 'rules')} --json`, { + ensureExitCode: 0, + }); + }); + + it('can retrieve Territory2Type', async () => { + execCmd(`force:source:retrieve -p ${path.join(projectPath, 'territory2Types')} --json`, { + ensureExitCode: 0, + }); + }); + + it('can retrieve Territory2', async () => { + execCmd(`force:source:retrieve -p ${path.join(modelPath, 'territories')} --json`, { + ensureExitCode: 0, + }); + }); + }); + + describe('individual metadata item retrieves', () => { + it('can retrieve Territory2Model', async () => { + execCmd('force:source:retrieve -m Territory2Model:SCW_Territory_Model --json', { + ensureExitCode: 0, + }); + }); + + it('can retrieve Territory2Rule', async () => { + execCmd( + `force:source:retrieve -p ${path.join( + modelPath, + 'rules', + 'Fishing_Stores.territory2Rule-meta.xml' + )} --json`, + { + ensureExitCode: 0, + } + ); + }); + + it('can retrieve Territory2', async () => { + execCmd( + `force:source:retrieve -p ${path.join(modelPath, 'territories', 'Austin.territory2-meta.xml')} --json`, + { + ensureExitCode: 0, + } + ); + }); + }); + }); + }); +}); diff --git a/test/nuts/territoryProject/.eslintignore b/test/nuts/territoryProject/.eslintignore new file mode 100644 index 000000000..5f7b681a3 --- /dev/null +++ b/test/nuts/territoryProject/.eslintignore @@ -0,0 +1,16 @@ +**/lwc/**/*.css +**/lwc/**/*.html +**/lwc/**/*.json +**/lwc/**/*.svg +**/lwc/**/*.xml +**/aura/**/*.auradoc +**/aura/**/*.cmp +**/aura/**/*.css +**/aura/**/*.design +**/aura/**/*.evt +**/aura/**/*.json +**/aura/**/*.svg +**/aura/**/*.tokens +**/aura/**/*.xml +**/aura/**/*.app +.sfdx diff --git a/test/nuts/territoryProject/.forceignore b/test/nuts/territoryProject/.forceignore new file mode 100755 index 000000000..7b5b5a71f --- /dev/null +++ b/test/nuts/territoryProject/.forceignore @@ -0,0 +1,12 @@ +# List files or directories below to ignore them when running force:source:push, force:source:pull, and force:source:status +# More information: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm +# + +package.xml + +# LWC configuration files +**/jsconfig.json +**/.eslintrc.json + +# LWC Jest +**/__tests__/** \ No newline at end of file diff --git a/test/nuts/territoryProject/.gitignore b/test/nuts/territoryProject/.gitignore new file mode 100644 index 000000000..eecf1a578 --- /dev/null +++ b/test/nuts/territoryProject/.gitignore @@ -0,0 +1,38 @@ +# This file is used for Git repositories to specify intentionally untracked files that Git should ignore. +# If you are not using git, you can delete this file. For more information see: https://git-scm.com/docs/gitignore +# For useful gitignore templates see: https://github.com/github/gitignore + +# Salesforce cache +.sfdx/ +.localdevserver/ + +# LWC VSCode autocomplete +**/lwc/jsconfig.json + +# LWC Jest coverage reports +coverage/ + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Dependency directories +node_modules/ + +# Eslint cache +.eslintcache + +# MacOS system files +.DS_Store + +# Windows system files +Thumbs.db +ehthumbs.db +[Dd]esktop.ini +$RECYCLE.BIN/ + +# Local environment variables +.env \ No newline at end of file diff --git a/test/nuts/territoryProject/.prettierignore b/test/nuts/territoryProject/.prettierignore new file mode 100755 index 000000000..f3720b237 --- /dev/null +++ b/test/nuts/territoryProject/.prettierignore @@ -0,0 +1,10 @@ +# List files or directories below to ignore them when running prettier +# More information: https://prettier.io/docs/en/ignore.html +# + +**/staticresources/** +.localdevserver +.sfdx +.vscode + +coverage/ \ No newline at end of file diff --git a/test/nuts/territoryProject/.vscode/extensions.json b/test/nuts/territoryProject/.vscode/extensions.json new file mode 100644 index 000000000..7e6cb105e --- /dev/null +++ b/test/nuts/territoryProject/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + "recommendations": [ + "salesforce.salesforcedx-vscode", + "redhat.vscode-xml", + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "financialforce.lana" + ] +} diff --git a/test/nuts/territoryProject/.vscode/launch.json b/test/nuts/territoryProject/.vscode/launch.json new file mode 100644 index 000000000..e07e39173 --- /dev/null +++ b/test/nuts/territoryProject/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Launch Apex Replay Debugger", + "type": "apex-replay", + "request": "launch", + "logFile": "${command:AskForLogFileName}", + "stopOnEntry": true, + "trace": true + } + ] +} diff --git a/test/nuts/territoryProject/.vscode/settings.json b/test/nuts/territoryProject/.vscode/settings.json new file mode 100644 index 000000000..76decfbdf --- /dev/null +++ b/test/nuts/territoryProject/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "search.exclude": { + "**/node_modules": true, + "**/bower_components": true, + "**/.sfdx": true + } +} diff --git a/test/nuts/territoryProject/README.md b/test/nuts/territoryProject/README.md new file mode 100644 index 000000000..afcda4a66 --- /dev/null +++ b/test/nuts/territoryProject/README.md @@ -0,0 +1,18 @@ +# Salesforce DX Project: Next Steps + +Now that you’ve created a Salesforce DX project, what’s next? Here are some documentation resources to get you started. + +## How Do You Plan to Deploy Your Changes? + +Do you want to deploy a set of changes, or create a self-contained application? Choose a [development model](https://developer.salesforce.com/tools/vscode/en/user-guide/development-models). + +## Configure Your Salesforce DX Project + +The `sfdx-project.json` file contains useful configuration information for your project. See [Salesforce DX Project Configuration](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm) in the _Salesforce DX Developer Guide_ for details about this file. + +## Read All About It + +- [Salesforce Extensions Documentation](https://developer.salesforce.com/tools/vscode/) +- [Salesforce CLI Setup Guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_intro.htm) +- [Salesforce DX Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_intro.htm) +- [Salesforce CLI Command Reference](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference.htm) diff --git a/test/nuts/territoryProject/config/project-scratch-def.json b/test/nuts/territoryProject/config/project-scratch-def.json new file mode 100644 index 000000000..5890d21a5 --- /dev/null +++ b/test/nuts/territoryProject/config/project-scratch-def.json @@ -0,0 +1,17 @@ +{ + "orgName": "shane.mclaughlin company", + "adminEmail": "sfdx@mailinator.com", + "edition": "Developer", + "features": ["EnableSetPasswordInApi"], + "settings": { + "lightningExperienceSettings": { + "enableS1DesktopEnabled": true + }, + "mobileSettings": { + "enableS1EncryptedStoragePref2": false + }, + "territory2Settings": { + "enableTerritoryManagement2": true + } + } +} diff --git a/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/SCW_Territory_Model.territory2Model-meta.xml b/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/SCW_Territory_Model.territory2Model-meta.xml new file mode 100644 index 000000000..48454fc8a --- /dev/null +++ b/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/SCW_Territory_Model.territory2Model-meta.xml @@ -0,0 +1,4 @@ + + + SCW Territory Model + diff --git a/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/rules/Fishing_Stores.territory2Rule-meta.xml b/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/rules/Fishing_Stores.territory2Rule-meta.xml new file mode 100644 index 000000000..1dd169de4 --- /dev/null +++ b/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/rules/Fishing_Stores.territory2Rule-meta.xml @@ -0,0 +1,11 @@ + + + true + Fishing Stores + Account + + Account.Name + startsWith + Cabela + + diff --git a/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/territories/Austin.territory2-meta.xml b/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/territories/Austin.territory2-meta.xml new file mode 100644 index 000000000..0ea011c09 --- /dev/null +++ b/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/territories/Austin.territory2-meta.xml @@ -0,0 +1,10 @@ + + + Edit + Edit + Edit + Austin + Edit + Texas + City + diff --git a/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/territories/Texas.territory2-meta.xml b/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/territories/Texas.territory2-meta.xml new file mode 100644 index 000000000..c9249c5a2 --- /dev/null +++ b/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/territories/Texas.territory2-meta.xml @@ -0,0 +1,10 @@ + + + Edit + Edit + Edit + Texas + Edit + USA + State + diff --git a/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/territories/USA.territory2-meta.xml b/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/territories/USA.territory2-meta.xml new file mode 100644 index 000000000..070a12cd7 --- /dev/null +++ b/test/nuts/territoryProject/force-app/main/default/territory2Models/SCW_Territory_Model/territories/USA.territory2-meta.xml @@ -0,0 +1,13 @@ + + + Edit + Edit + Edit + USA + Edit + + true + Fishing_Stores + + Country + diff --git a/test/nuts/territoryProject/force-app/main/default/territory2Types/City.territory2Type-meta.xml b/test/nuts/territoryProject/force-app/main/default/territory2Types/City.territory2Type-meta.xml new file mode 100644 index 000000000..dd2f21b91 --- /dev/null +++ b/test/nuts/territoryProject/force-app/main/default/territory2Types/City.territory2Type-meta.xml @@ -0,0 +1,5 @@ + + + City + 10 + diff --git a/test/nuts/territoryProject/force-app/main/default/territory2Types/Country.territory2Type-meta.xml b/test/nuts/territoryProject/force-app/main/default/territory2Types/Country.territory2Type-meta.xml new file mode 100644 index 000000000..59b4eefc1 --- /dev/null +++ b/test/nuts/territoryProject/force-app/main/default/territory2Types/Country.territory2Type-meta.xml @@ -0,0 +1,5 @@ + + + Country + 1 + diff --git a/test/nuts/territoryProject/force-app/main/default/territory2Types/State.territory2Type-meta.xml b/test/nuts/territoryProject/force-app/main/default/territory2Types/State.territory2Type-meta.xml new file mode 100644 index 000000000..1f60be3ce --- /dev/null +++ b/test/nuts/territoryProject/force-app/main/default/territory2Types/State.territory2Type-meta.xml @@ -0,0 +1,5 @@ + + + State + 5 + diff --git a/test/nuts/territoryProject/package.json b/test/nuts/territoryProject/package.json new file mode 100644 index 000000000..fc87be51a --- /dev/null +++ b/test/nuts/territoryProject/package.json @@ -0,0 +1,44 @@ +{ + "name": "salesforce-app", + "private": true, + "version": "1.0.0", + "description": "Salesforce App", + "scripts": { + "lint": "npm run lint:lwc && npm run lint:aura", + "lint:aura": "eslint **/aura/**", + "lint:lwc": "eslint **/lwc/**", + "test": "npm run test:unit", + "test:unit": "sfdx-lwc-jest", + "test:unit:watch": "sfdx-lwc-jest --watch", + "test:unit:debug": "sfdx-lwc-jest --debug", + "test:unit:coverage": "sfdx-lwc-jest --coverage", + "prettier": "prettier --write \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"", + "prettier:verify": "prettier --list-different \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"", + "postinstall": "husky install", + "precommit": "lint-staged" + }, + "devDependencies": { + "@lwc/eslint-plugin-lwc": "^1.0.1", + "@prettier/plugin-xml": "^0.13.1", + "@salesforce/eslint-config-lwc": "^2.0.0", + "@salesforce/eslint-plugin-aura": "^2.0.0", + "@salesforce/eslint-plugin-lightning": "^0.1.1", + "@salesforce/sfdx-lwc-jest": "^0.13.0", + "eslint": "^7.29.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-jest": "^24.3.6", + "husky": "^6.0.0", + "lint-staged": "^11.0.0", + "prettier": "^2.3.1", + "prettier-plugin-apex": "^1.9.1" + }, + "lint-staged": { + "**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}": [ + "prettier --write" + ], + "**/{aura,lwc}/**": [ + "eslint" + ] + } +} diff --git a/test/nuts/territoryProject/sfdx-project.json b/test/nuts/territoryProject/sfdx-project.json new file mode 100644 index 000000000..b35c4ed95 --- /dev/null +++ b/test/nuts/territoryProject/sfdx-project.json @@ -0,0 +1,12 @@ +{ + "packageDirectories": [ + { + "path": "force-app", + "default": true + } + ], + "name": "territoryProject", + "namespace": "", + "sfdcLoginUrl": "https://login.salesforce.com", + "sourceApiVersion": "52.0" +}