1.0.2 • Published 6 years ago
sfdx_metadatas_filtering v1.0.2
sfdx_metadatas_filtering
#WARNING
No longer maintained , moved to https://github.com/nvuillam/sfdx-essentials
#PLUGIN
Filter metadatas folder with your own package.xml file
This can help if you need to deploy only part of the result of sfdx force:source:convert into a org, by filtering the result (usually in mdapi_output_dir) to keep only the items referenced in your own package.xml file
WARNING: This version does not support all the metadata types yet, please contribute if you are in a hurry :)
INSTALLATION
sfdx plugins:install sfdx_metadatas_filtering
- Windows users: sfdx plugin generator is bugged on windows (hardcode call of linux rm instruction) , so you may use Git Bash to run this code ( at least while it installs the plugin dependencies )
COMMANDS
metadatafilter:execute
Allows to filter metadatas folder generated by sfdx force:source:convert , using your own package.xml file
USAGE
$ sfdx metadatafilter:execute OPTIONS
OPTIONS
-i, --inputfolder=inputfolder Input folder (default: "." )
-o, --outputfolder=outputfolder Output folder (default: filteredMetadatas)
-p, --packagexml=packagexml package.xml file path
DESCRIPTION
Package.xml types currently managed:
- ApexClass
- ApexComponent
- ApexPage
- ApexTrigger
- AuraDefinitionBundle
- BusinessProcess
- ContentAsset
- CustomApplication
- CustomField
- CustomLabel
- CustomMetadata
- CustomObject
- CustomObjectTranslation
- CustomTab
- Document
- EmailTemplate
- EscalationRules
- FlexiPage
- GlobalValueSet
- GlobalValueSetTranslation
- HomePageLayout
- ListView
- Layout
- NamedCredential
- PermissionSet
- Profile
- QuickAction
- RecordType
- RemoteSiteSetting
- Report
- StandardValueSet
- StaticResource
- Translations
- WebLink
- Workflow
EXAMPLES
$ sfdx metadatafilter:execute -p myPackage.xml
$ sfdx metadatafilter:execute -i md_api_output_dir -p myPackage.xml -o md_api_filtered_output_dir
$ sfdx force:source:convert -d tmp/deployDemoQuali/
$ sfdx metadatafilter:execute -i tmp/deployDemoQuali/ -p myPackage.xml -o tmp/deployDemoQualiFiltered/
$ sfdx force:mdapi:deploy -d tmp/deployDemoQualiFiltered/ -w 60 -u DemoQuali
See code: src/commands/metadatafilter/execute.ts