
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
cs-package-xml
Advanced tools
npm install cs-package-xml -g
change directories to you project directory, which contains your src folder and run
cs-package-xml
or, the long version...
cs-package-xml -D "./src" -n "Package Name" -v "40.0" -m -c -i "InstallScriptHandler"
Options:
-D, --dir The path to the source directory containing your SFDC
files and metadata. Your package.xml file will end up
here. [string] [required] [default: "./src"]
-v, --version The Saleforce API Version you wish to target with this
package. [string]
-n, --name The name of the package. [string]
-i, --installScript The name the install handler class [string]
-m, --managed Include Managed Package Fields. [boolean] [default: false]
-c, --clean Clean the Metadata files [boolean] [default: false]
-C, --clean-config Clean the Metadata files from a provided configuration
file [string] [default: ""]
-h Show help [boolean]
The Clean Metadata option is available as of version 2.1 This option will clean out boilerplate metadata that can sometimes cause problems with deploying between different orgs. Also, if some metadata is not valid, visible, or enabled, then it shouldn't go in the package, hence we need to clean up the metadata.
Below is the standard configuration for cleaning files. When using the "clean" option, this is the configuration that will be used.
But we all know you will probably want a custom clean config. In that case, copy the config below and customize it.
The selectors you see are simple xml path selectors. The xmlns
namespace is required on element selectors, so if you create a custom configuration, be sure to include that on any element selectors.
For tips on how to write selectors, you can go to w3c at http://www.w3schools.com/xml/xml_syntax.asp
All options are optional, so you probably don't need to inlcude the namespace option unless you're doing something very unexpected
{
"selectors": [
"./xmlns:packageVersions",
"./xmlns:applicationVisibilities[xmlns:visible = 'false']",
"./xmlns:classAccesses[xmlns:enabled = 'false']",
"./xmlns:fieldPermissions[xmlns:editable = 'false' and xmlns:readable = 'false']",
"./xmlns:objectPermissions[xmlns:allowCreate = 'false' and xmlns:allowDelete = 'false' and xmlns:allowEdit = 'false' and xmlns:allowRead = 'false' and xmlns:modifyAllRecords = 'false' and xmlns:viewAllRecords = 'false']",
"./xmlns:pageAccesses[xmlns:enabled = 'false']",
"./xmlns:userPermissions[xmlns:enabled = 'false']",
"./xmlns:recordTypeVisibilities[xmlns:visible = 'false']",
"./xmlns:tabSettings[xmlns:visibility = 'None']"
],
"extensions": [
"-meta.xml",
".profile",
".permissionset"
],
"namespace": "http://soap.sforce.com/2006/04/metadata"
}
FAQs
Build a Salesforce Package.xml file from a src directory
The npm package cs-package-xml receives a total of 0 weekly downloads. As such, cs-package-xml popularity was classified as not popular.
We found that cs-package-xml demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.