一款 Salesforce DX 插件,具有多种功能,旨在改进开发和运营工作流程
This project is currently being deprecated. Some of the existing functionality is already migrated to sfpowerscripts and rest of them will be available as standalone libraries / sfp-cli in a short span. Stay tuned!
Check issues for details and timeline. Thanks everyone for the support!
A Salesforce DX Plugin with multiple functionalities aimed at improving development and operational workflows
To install the stable version from the release branch, use the following command
$ sfdx plugins:install sfpowerkit
If you need to install automatically the plugin, via a CI process or Dockerfile, use the following line:
$ echo 'y' | sfdx plugins:install sfpowerkit
Beta versions are the latest versions that are in being reviewed/ undergoing testing etc and built from the master branch and can be downloaded using the following command
$ sfdx plugins:install sfpowerkit@beta
To review a pull request (for contributors/reviewers), the best option is to clone the repository, checkout to the particular branch and utilize the following command from the project directory
$ sfdx plugins:link
sfpowerkit:source:pmdsfpowerkit:source:profile:retrievesfpowerkit:source:profile:reconcilesfpowerkit:source:profile:mergesfpowerkit:source:customlabel:createsfpowerkit:source:customlabel:reconcilesfpowerkit:source:customlabel:buildmanifestsfpowerkit:source:apextest:listsfpowerkit:source:apextestsuite:convertsfpowerkit:source:picklist:generatepatchsfpowerkit:project:diffsfpowerkit:project:orgdiffsfpowerkit:project:manifest:diffsfpowerkit:project:manifest:mergesfpowerkit:project:datamodel:diff [BETA]sfpowerkit:org:connectedapp:createsfpowerkit:org:connectedapp:retrievesfpowerkit:org:duplicaterule:deactivatesfpowerkit:org:duplicaterule:activatesfpowerkit:org:matchingrule:deactivatesfpowerkit:org:matchingrule:activatesfpowerkit:org:trigger:deactivatesfpowerkit:org:trigger:activatesfpowerkit:org:healthchecksfpowerkit:org:cleartestresultsfpowerkit:org:orgcoveragesfpowerkit:org:profile:diffsfpowerkit:org:sandbox:createsfpowerkit:org:sandbox:infosfpowerkit:org:sandbox:refreshsfpowerkit:org:scratchorg:usagesfpowerkit:org:scratchorg:deletesfpowerkit:org:relaxiprangesfpowerkit:auth:loginThese commands manipulate the metadata configuration/code locally or during the packaging process.
sfpowerkit:source:pmdThis command is a wrapper around PMD ( downloads PMD for the first time) with some predefined defaults, such as ruleset, output format, output file. The command is to be run from the project directory
…
See code: src\commands\sfpowerkit\source\pmd.ts
sfpowerkit:source:profile:retrieveRetrieve profiles from the salesforce org with all its associated permissions. Common use case for this command is to migrate profile changes from a integration environment to other higher environments [overcomes SFDX CLI Profile retrieve issue where it doesnt fetch the full profile unless the entire metadata is present in source], or retrieving profiles from production to lower environments for testing.
…
See code: src\commands\sfpowerkit\source\profile\retrieve.ts
sfpowerkit:source:profile:reconcileThis command is used in the lower environments such as ScratchOrgs , Development / System Testing Sandboxes, where a retrieved profile from production has to be cleaned up only for the metadata that is contained in the environment or base it only as per the metadata that is contained in the packaging directory.
Please read more about the command especially for ignoring user permissions here
…
See code: src\commands\sfpowerkit\source\profile\reconcile.ts
sfpowerkit:source:profile:mergeThis command is used in the lower environments such as ScratchOrgs , Development / System Testing Sandboxes, inorder to apply the changes made in the environment to retrieved profile, so that it can be deployed to the higher environments
…
See code: src\commands\sfpowerkit\profile\merge.ts
sfpowerkit:source:customlabel:createCustom Labels are org wide, hence when the metadata is pulled down from scratch org, the entire custom label metadata file is pulled down in a package repo. This results in often packaging failures, when developers forget to clean the customlabels only to contain what the package needs, as unlocked package does not support duplicate items.The custom labels has to be then cleaned up per package.
This command is a helper command to create customlabel with pacakage names prepended for easy reconcilation.
…
sfpowerkit:source:customlabel:reconcileCustom Labels are org wide, hence when the metadata is pulled down from scratch org, the entire custom label metadata file is pulled down in a package repo. This results in often packaging failures, when developers forget to clean the customlabels only to contain what the package needs, as unlocked package does not support duplicate items.The custom labels has to be then cleaned up per package.
This command reconcile the updated custom labels to include only the labels that have the API name starting with package name (packagename_ ) or created using the custom label create command
…
sfpowerkit:source:customlabel:buildmanifestThis Command is used to build package.xml with all customlabels as members rather than wildcard *. sfdx force:source:convert creates a package.xml with customlabels wildcard, this command helps to update the package.xml with list of label names.
…
sfpowerkit:source:apextest:listThis command helps to get list of all apex text classes located in source path
…
sfpowerkit:source:apextestsuite:convertConverts an apex test suite to its consituent apex classes as a single line separated by commas, so that it can be used along with metadata validate only deployment
USAGE
$ sfdx sfpowerkit:source:apextestsuite:convert -n [--json] [--loglevel trace|debug|info|warn|error|fatal]
OPTIONS
-n, --name=name (required) the name of the apextestsuite (the file name minus the apex test suite)
--json format output as json
--loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this command invocation
EXAMPLE
$ sfdx sfpowerkit:source:apextestsuite:convert -n MyApexTestSuite
"ABC2,ABC1Test"
sfpowerkit:source:picklist:generatepatchSearch picklist fields inside project and create a static resource file with picklist fields, used to solve the picklist upgrade issue in dx unlock package https://trailblazer.salesforce.com/issues_view?id=a1p3A0000003Uk2QAE
…
sfpowerkit:project:diffGenerate a delta 'changeset' between two diff commits so that the incremental changes can be deployed to the target org.To be used for an org based deployment when the size of the metadata is large that the project cannot not be deployed in a single attempt.
This command works with a source format based repository only. Utilize the command during a transition phase where an org is transformed to a modular architecture composing of multiple projects.
…
sfpowerkit:project:orgdiffCompare source files of a project against the salesforce org and display differences. The command also add diff conflict markers in changed files to let the developer accept or reject changes manually using a git merge tool. The idea behind this command is used to track changes done on an unlocked package or a modular repo against the changes done in a higher environment. This command is not yet ready to work on a single repo against the whole metadata in the org
…
sfpowerkit:project:manifest:diffGenerate a diff between two manifest files. This command is used to useful to generate a report on what is the difference between two org's.
…
sfpowerkit:project:manifest:mergeMerge multiple package.xml into single collective package.xml
…
sfpowerkit:project:datamodel:diff [BETA]Provides an audit history of the metadata change between two commit ID's for data model ( CustomFields, RecordTypes, BusinessProcess)
…
Various helper commands in aiding with Salesforce DX Unlocked Package Development
sfpowerkit:package:dependencies:installInstall unlocked package dependencies of a package
…
_See code: [src\com
暂无开放 Issues,或尚未同步最近议题。