Skip to content

hardis:project:clean:filter-xml-content

Description

Filter content of metadatas (XML) in order to be able to deploy only part of them on an org (See Example configuration)

When you perform deployments from one org to another, the features activated in the target org may not fit the content of the sfdx/metadata files extracted from the source org.

You may need to filter some elements in the XML files, for example in the Profiles

This script requires a filter-config.json file

Parameters

Name Type Description Default Required Options
configfile
-c
option Config JSON file path
debug boolean debug
flags-dir option undefined
inputfolder
-i
option Input folder (default: "." )
json boolean Format output as json.
outputfolder
-f
option Output folder (default: parentFolder + _xml_content_filtered)
websocket option websocket

Examples

sf hardis:project:clean:filter-xml-content -i "./mdapi_output"
sf hardis:project:clean:filter-xml-content -i "retrieveUnpackaged"