Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nvuillam/sfdx_metadatas_filtering

SFDX plugin to Fillter metadatas folder using your own package.xml file
https://github.com/nvuillam/sfdx_metadatas_filtering

deployment filter metadata package sfdx sfdx-plugin

Last synced: 6 days ago
JSON representation

SFDX plugin to Fillter metadatas folder using your own package.xml file

Awesome Lists containing this project

README

        

sfdx_metadatas_filtering
========================

#WARNING

No longer maintained , moved to [https://github.com/nvuillam/sfdx-essentials](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 :)

[![Version](https://img.shields.io/npm/v/sfdx_metadatas_filtering.svg)](https://npmjs.org/package/sfdx_metadatas_filtering)
[![Downloads/week](https://img.shields.io/npm/dw/sfdx_metadatas_filtering.svg)](https://npmjs.org/package/sfdx_metadatas_filtering)
[![License](https://img.shields.io/npm/l/sfdx_metadatas_filtering.svg)](https://github.com/nvuillam/sfdx_metadatas_filtering/blob/master/package.json)

# INSTALLATION

```
sfdx plugins:install sfdx_metadatas_filtering
```

- Windows users: [sfdx plugin generator](https://github.com/forcedotcom/sfdx-plugin-generate) is bugged on windows (hardcode call of linux rm instruction) , so you may use [Git Bash](https://gitforwindows.org/) 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

```

_See [conversion tables](https://github.com/nvuillam/sfdx_metadatas_filtering/blob/d1567782218fce3ba800a5e752aff45b54980585/src/commands/metadatafilter/execute.ts#L280)_

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](https://github.com/nvuillam/sfdx_metadatas_filtering/blob/master/src/commands/metadatafilter/execute.ts)_