A plugin for splitting and merging Salesforce profiles.
-
Install the SDFX CLI.
-
Clone the repository:
git clone [email protected]:lodossDev/sfdx-profiles-splitter.git
-
(Yarn)Install npm modules:
yarn install
-
Link the plugin:
sfdx plugins:link .
- Install plugin:
sfdx plugins:install sfdx-profiles-splitter
$ npm install -g sfdx-profiles-splitter
$ sfdx COMMAND
running command...
$ sfdx (-v|--version|version)
sfdx-profiles-splitter/0.1.0 darwin-x64 node-v8.9.4
$ sfdx --help [COMMAND]
USAGE
$ sfdx COMMAND
...
Converts full profiles into json or xml format.
USAGE
$ sfdx metadata:profiles:convert
OPTIONS
-d, --delete Delete the profiles once converted?
-f, --format=format (required) the output format i.e. json|xml.
-i, --input=input (required) [default: force-app/main/default/profiles] the input
directory.
-o, --output=output (required) [default: force-app/main/default/profiles] the output
directory.
--json format output as json
--loglevel=(trace|debug|info|warn|error|fatal) logging level for this command invocation
EXAMPLE
sfdx metadata:profiles:convert -f json -i force-app/main/default/profiles -o force-app/main/default/test
//Converts full profiles into json or xml, !!!! does not split !!!!.
See code: src/commands/metadata/profiles/convert.ts
Merge profiles that were split.
USAGE
$ sfdx metadata:profiles:merge
OPTIONS
-d, --delete Delete the splitted profiles once merged?
-i, --input=input (required) [default: force-app/main/default/profiles] the input
directory where the splitted profiles exist.
-o, --output=output (required) [default: force-app/main/default/profiles] the output
directory to store the full profiles.
--json format output as json
--loglevel=(trace|debug|info|warn|error|fatal) logging level for this command invocation
EXAMPLE
sfdx metadata:profiles:merge -i force-app/main/default/profiles -o force-app/main/default/test
//Merges profiles located in specified input dir and copies them into the output dir.
See code: src/commands/metadata/profiles/merge.ts
Split profiles into smaller parts.
USAGE
$ sfdx metadata:profiles:split
OPTIONS
-d, --delete Delete the existing profiles once converted?
-i, --input=input (required) [default: force-app/main/default/profiles] the input
directory where the full profiles exist.
-o, --output=output (required) [default: force-app/main/default/profiles] the output
directory to store the chunked profiles.
--json format output as json
--loglevel=(trace|debug|info|warn|error|fatal) logging level for this command invocation
EXAMPLE
sfdx metadata:profiles:split -i force-app/main/default/profiles -o force-app/main/default/test
//Splits profiles located in specified input dir and copies them into the output dir.
See code: src/commands/metadata/profiles/split.ts