UNPKG

sf-decomposer

Version:

Split large Salesforce metadata files into version-control-friendly pieces and rebuild deployment-ready files.

346 lines 12.6 kB
{ "commands": { "decomposer:decompose": { "aliases": [], "args": {}, "description": "Decompose large metadata files into smaller files.\n\nYou should run this after you retrieve metadata from an org.", "examples": [ "`sf decomposer decompose -m \"flow\" -f \"xml\" --prepurge --postpurge`", "`sf decomposer decompose -m \"flow\" -m \"labels\" -f \"xml\" --prepurge --postpurge`", "`sf decomposer decompose -m \"flow\" -f \"xml\" -i \"force-app\"`", "`sf decomposer decompose -x \"manifest/package.xml\" --postpurge`", "`sf decomposer decompose -x \"manifest/package.xml\" -m \"flow\"`" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "flags-dir": { "helpGroup": "GLOBAL", "name": "flags-dir", "summary": "Import flag values from a directory.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "metadata-type": { "char": "m", "name": "metadata-type", "required": false, "summary": "The metadata suffix to process, such as 'flow', 'labels', etc. Required unless --manifest is provided.", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "manifest": { "char": "x", "name": "manifest", "required": false, "summary": "Path to a package.xml manifest file. When provided, only the metadata listed in the manifest is decomposed. If --metadata-type is also provided, the intersection of the two is used.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "prepurge": { "name": "prepurge", "required": false, "summary": "Purge directories of pre-existing decomposed files.", "allowNo": false, "type": "boolean" }, "postpurge": { "name": "postpurge", "required": false, "summary": "Purge the original files after decomposing them.", "allowNo": false, "type": "boolean" }, "format": { "char": "f", "name": "format", "required": true, "summary": "File format for the decomposed files.", "default": "xml", "hasDynamicHelp": false, "multiple": false, "options": [ "xml", "json", "yaml", "json5" ], "type": "option" }, "ignore-package-directory": { "char": "i", "name": "ignore-package-directory", "required": false, "summary": "Ignore a package directory.", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "strategy": { "char": "s", "name": "strategy", "required": true, "summary": "Strategy to follow when decomposing files.", "default": "unique-id", "hasDynamicHelp": false, "multiple": false, "options": [ "unique-id", "grouped-by-tag" ], "type": "option" }, "decompose-nested-permissions": { "char": "p", "name": "decompose-nested-permissions", "required": false, "summary": "Additionally decompose object and field permissions on a permission set when strategy is set to \"grouped-by-tag\".", "allowNo": false, "type": "boolean" }, "config": { "char": "c", "name": "config", "required": false, "summary": "Load per-type and per-component overrides from .sfdecomposer.config.json in the repo root. When set, the file's \"overrides\" array is applied (format, strategy, decomposeNestedPermissions, uniqueIdElements, prePurge, postPurge per type or per individual component). Other top-level config fields are ignored when invoking the CLI directly.", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "decomposer:decompose", "pluginAlias": "sf-decomposer", "pluginName": "sf-decomposer", "pluginType": "core", "strict": true, "summary": "Decomposes the metadata files created by retrievals.", "enableJsonFlag": true, "isESM": true, "relativePath": [ "lib", "commands", "decomposer", "decompose.js" ], "aliasPermutations": [], "permutations": [ "decomposer:decompose", "decompose:decomposer" ] }, "decomposer:recompose": { "aliases": [], "args": {}, "description": "Recompose the decomposed files into deployment-compatible metadata files.\n\nYou should run this before you deploy decomposed metadata to an org.", "examples": [ "`sf decomposer recompose -m \"flow\" --postpurge`", "`sf decomposer recompose -m \"flow\" -i \"force-app\"`", "`sf decomposer recompose -x \"manifest/package.xml\" --postpurge`", "`sf decomposer recompose -x \"manifest/package.xml\" -m \"flow\"`" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "flags-dir": { "helpGroup": "GLOBAL", "name": "flags-dir", "summary": "Import flag values from a directory.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "metadata-type": { "char": "m", "name": "metadata-type", "required": false, "summary": "The metadata suffix to process, such as 'flow', 'labels', etc. Required unless --manifest is provided.", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "manifest": { "char": "x", "name": "manifest", "required": false, "summary": "Path to a package.xml manifest file. When provided, only the metadata listed in the manifest is recomposed. If --metadata-type is also provided, the intersection of the two is used.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "postpurge": { "name": "postpurge", "required": false, "summary": "Purge the decomposed files after recomposing them.", "allowNo": false, "type": "boolean" }, "ignore-package-directory": { "char": "i", "name": "ignore-package-directory", "required": false, "summary": "Ignore a package directory.", "hasDynamicHelp": false, "multiple": true, "type": "option" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "decomposer:recompose", "pluginAlias": "sf-decomposer", "pluginName": "sf-decomposer", "pluginType": "core", "strict": true, "summary": "Recomposes the files created by the `decompose` command before deployments.", "enableJsonFlag": true, "isESM": true, "relativePath": [ "lib", "commands", "decomposer", "recompose.js" ], "aliasPermutations": [], "permutations": [ "decomposer:recompose", "recompose:decomposer" ] }, "decomposer:verify": { "aliases": [], "args": {}, "description": "Copies your package directories into a temp directory under your OS's `tmpdir()`, runs decompose\nthen recompose there with the same flags and `.sfdecomposer.config.json` overrides you would use\nin production, then diffs every rebuilt parent XML against the original. Comparison is\n**structural** (sibling and attribute order are ignored, matching how Salesforce treats metadata).\nThe command never modifies your working tree.\n\nFiles where the only delta is ordering are surfaced as informational notices (\"reordered\") and do\nnot fail the run. Genuine semantic differences are reported as drift and exit non-zero, which\nmakes the command suitable as a CI gate before committing strategy, format, or override changes.", "examples": [ "`sf decomposer verify -m \"permissionset\" -f \"xml\"`", "`sf decomposer verify -m \"permissionset\" -m \"profile\" -s \"grouped-by-tag\" -p`", "`sf decomposer verify -x \"manifest/package.xml\" --config`" ], "flags": { "json": { "description": "Format output as json.", "helpGroup": "GLOBAL", "name": "json", "allowNo": false, "type": "boolean" }, "flags-dir": { "helpGroup": "GLOBAL", "name": "flags-dir", "summary": "Import flag values from a directory.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "metadata-type": { "char": "m", "name": "metadata-type", "required": false, "summary": "The metadata suffix to verify, such as 'flow', 'labels', etc. Required unless --manifest is provided.", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "manifest": { "char": "x", "name": "manifest", "required": false, "summary": "Path to a package.xml manifest file. When provided, only the metadata listed in the manifest is verified. If --metadata-type is also provided, the intersection of the two is used.", "hasDynamicHelp": false, "multiple": false, "type": "option" }, "format": { "char": "f", "name": "format", "required": true, "summary": "File format to decompose into for the round-trip check.", "default": "xml", "hasDynamicHelp": false, "multiple": false, "options": [ "xml", "json", "yaml", "json5" ], "type": "option" }, "ignore-package-directory": { "char": "i", "name": "ignore-package-directory", "required": false, "summary": "Ignore a package directory.", "hasDynamicHelp": false, "multiple": true, "type": "option" }, "strategy": { "char": "s", "name": "strategy", "required": true, "summary": "Strategy to follow when decomposing files for the round-trip check.", "default": "unique-id", "hasDynamicHelp": false, "multiple": false, "options": [ "unique-id", "grouped-by-tag" ], "type": "option" }, "decompose-nested-permissions": { "char": "p", "name": "decompose-nested-permissions", "required": false, "summary": "Additionally decompose object and field permissions on a permission set when strategy is set to \"grouped-by-tag\".", "allowNo": false, "type": "boolean" }, "config": { "char": "c", "name": "config", "required": false, "summary": "Load per-type and per-component overrides from .sfdecomposer.config.json in the repo root, the same as `decomposer decompose --config`.", "allowNo": false, "type": "boolean" } }, "hasDynamicHelp": false, "hiddenAliases": [], "id": "decomposer:verify", "pluginAlias": "sf-decomposer", "pluginName": "sf-decomposer", "pluginType": "core", "strict": true, "summary": "Round-trip verify that decompose followed by recompose preserves your metadata byte-for-byte.", "enableJsonFlag": true, "isESM": true, "relativePath": [ "lib", "commands", "decomposer", "verify.js" ], "aliasPermutations": [], "permutations": [ "decomposer:verify", "verify:decomposer" ] } }, "version": "6.26.0" }