sf-decomposer 5.4.5 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/README.md +19 -29
- package/lib/commands/decomposer/recompose.d.ts +0 -1
- package/lib/commands/decomposer/recompose.js +2 -11
- package/lib/commands/decomposer/recompose.js.map +1 -1
- package/lib/hooks/prerun.js +0 -3
- package/lib/hooks/prerun.js.map +1 -1
- package/lib/service/decomposeFileHandler.js +2 -16
- package/lib/service/decomposeFileHandler.js.map +1 -1
- package/lib/service/recomposeFileHandler.d.ts +1 -1
- package/lib/service/recomposeFileHandler.js +10 -25
- package/lib/service/recomposeFileHandler.js.map +1 -1
- package/messages/decomposer.recompose.md +1 -6
- package/oclif.lock +13 -37
- package/oclif.manifest.json +2 -19
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,25 @@
|
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## [5.5.0](https://github.com/mcarvin8/sf-decomposer/compare/v5.4.6...v5.5.0) (2025-04-11)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* remove format flag on recompose ([7caea40](https://github.com/mcarvin8/sf-decomposer/commit/7caea40a1964a07c5595f0813d0a30f63f6717ae))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **deps:** bump @salesforce/source-deploy-retrieve ([9c8e11f](https://github.com/mcarvin8/sf-decomposer/commit/9c8e11fb38cc307b22d1af37d7e7bfb058aab65b))
|
|
19
|
+
|
|
20
|
+
## [5.4.6](https://github.com/mcarvin8/sf-decomposer/compare/v5.4.5...v5.4.6) (2025-04-02)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* upgrade xml-disassemblers ([7198cc1](https://github.com/mcarvin8/sf-decomposer/commit/7198cc1ebd8026a75add6224f37fff41563f3c77))
|
|
26
|
+
|
|
8
27
|
## [5.4.5](https://github.com/mcarvin8/sf-decomposer/compare/v5.4.4...v5.4.5) (2025-04-01)
|
|
9
28
|
|
|
10
29
|
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<summary>Table of Contents</summary>
|
|
8
8
|
|
|
9
9
|
- [Quick Start](#quick-start)
|
|
10
|
-
- [Why Choose `sf-decomposer
|
|
10
|
+
- [Why Choose `sf-decomposer`?](#why-choose-sf-decomposer)
|
|
11
11
|
- [Commands](#commands)
|
|
12
12
|
- [`sf decomposer decompose`](#sf-decomposer-decompose)
|
|
13
13
|
- [`sf decomposer recompose`](#sf-decomposer-recompose)
|
|
@@ -56,24 +56,24 @@ sf decomposer recompose -m "flow" -m "labels"
|
|
|
56
56
|
|
|
57
57
|
6. Deploy recomposed metadata
|
|
58
58
|
|
|
59
|
-
## Why Choose `sf-decomposer
|
|
59
|
+
## Why Choose `sf-decomposer`?
|
|
60
60
|
|
|
61
|
-
Salesforce's built-in decomposition has limitations. `sf-decomposer` offers more control, flexibility, and versioning benefits for Admins and Developers.
|
|
61
|
+
Salesforce's built-in decomposition has limitations. `sf-decomposer` offers more control, flexibility, and versioning benefits for Admins and Developers.
|
|
62
62
|
|
|
63
|
-
### Key Advantages
|
|
63
|
+
### Key Advantages
|
|
64
64
|
|
|
65
|
-
- **Supports More Metadata** – Works with most Metadata API types, unlike Salesforce’s limited decomposition.
|
|
66
|
-
- **Selective Decomposition** – Decompose only what you need, avoiding Salesforce’s all-or-nothing approach.
|
|
67
|
-
- See [.sfdecomposerignore](#.sfdecomposerignore)
|
|
68
|
-
- **Fully Decomposes Metadata** – Ensures complete decomposition for types that Salesforce only partially decomposes (e.g., `decomposePermissionSetBeta2`).
|
|
69
|
-
- **Consistent Sorting** – Keeps elements in a predictable order to reduce unnecessary version control noise.
|
|
70
|
-
- **Multiple Output Formats** – Supports XML, JSON, JSON5, and YAML for greater flexibility.
|
|
71
|
-
- **CI/CD Integration** – Hooks enable seamless decomposition and recomposition in automated workflows.
|
|
72
|
-
- **Improved Version Control** – Smaller, structured files make pull requests easier to review and reduce merge conflicts.
|
|
65
|
+
- **Supports More Metadata** – Works with most Metadata API types, unlike Salesforce’s limited decomposition.
|
|
66
|
+
- **Selective Decomposition** – Decompose only what you need, avoiding Salesforce’s all-or-nothing approach.
|
|
67
|
+
- See [.sfdecomposerignore](#.sfdecomposerignore)
|
|
68
|
+
- **Fully Decomposes Metadata** – Ensures complete decomposition for types that Salesforce only partially decomposes (e.g., `decomposePermissionSetBeta2`).
|
|
69
|
+
- **Consistent Sorting** – Keeps elements in a predictable order to reduce unnecessary version control noise.
|
|
70
|
+
- **Multiple Output Formats** – Supports XML, JSON, JSON5, and YAML for greater flexibility.
|
|
71
|
+
- **CI/CD Integration** – Hooks enable seamless decomposition and recomposition in automated workflows.
|
|
72
|
+
- **Improved Version Control** – Smaller, structured files make pull requests easier to review and reduce merge conflicts.
|
|
73
73
|
|
|
74
|
-
### How It Helps Salesforce Teams
|
|
74
|
+
### How It Helps Salesforce Teams
|
|
75
75
|
|
|
76
|
-
- **Better Peer Reviews** – More readable diffs for large metadata in GitHub and other CI/CD platforms.
|
|
76
|
+
- **Better Peer Reviews** – More readable diffs for large metadata in GitHub and other CI/CD platforms.
|
|
77
77
|
- **Safer Deployments** – Ensures only intended changes are deployed, improving release quality.
|
|
78
78
|
|
|
79
79
|
## Commands
|
|
@@ -95,7 +95,6 @@ FLAGS
|
|
|
95
95
|
-m, --metadata-type=<value> The metadata suffix to process, such as 'flow', 'labels', etc.
|
|
96
96
|
Can be declared multiple times.
|
|
97
97
|
-f, --format=<value> The file type for the decomposed files.
|
|
98
|
-
Must match what format you provide for recompose.
|
|
99
98
|
Options: ['xml', 'yaml', 'json', 'json5']
|
|
100
99
|
[default: 'xml']
|
|
101
100
|
-i, --ignore-package-directory=<value> Package directory to ignore.
|
|
@@ -132,15 +131,11 @@ Recompose decomposed files into deployment-compatible files.
|
|
|
132
131
|
|
|
133
132
|
```
|
|
134
133
|
USAGE
|
|
135
|
-
$ sf decomposer recompose -m <value> -
|
|
134
|
+
$ sf decomposer recompose -m <value> -i <value> [--postpurge --debug --json]
|
|
136
135
|
|
|
137
136
|
FLAGS
|
|
138
137
|
-m, --metadata-type=<value> The metadata suffix to process, such as 'flow', 'labels', etc.
|
|
139
138
|
Can be declared multiple times.
|
|
140
|
-
-f, --format=<value> The file format for the decomposed files.
|
|
141
|
-
Must match what format you provide for decompose.
|
|
142
|
-
Options: ['xml', 'yaml', 'json', 'json5']
|
|
143
|
-
[default: 'xml']
|
|
144
139
|
-i, --ignore-package-directory=<value> Package directory to ignore.
|
|
145
140
|
Should be as they appear in the "sfdx-project.json".
|
|
146
141
|
Can be declared multiple times.
|
|
@@ -155,11 +150,7 @@ GLOBAL FLAGS
|
|
|
155
150
|
EXAMPLES
|
|
156
151
|
Recompose all flows:
|
|
157
152
|
|
|
158
|
-
$ sf decomposer recompose -m "flow"
|
|
159
|
-
|
|
160
|
-
Recompose all decomposed flows and custom labels YAMLs into XMLs
|
|
161
|
-
|
|
162
|
-
$ sf decomposer recompose -m "flow" -m "labels" -f "yaml" --postpurge --debug
|
|
153
|
+
$ sf decomposer recompose -m "flow" --postpurge --debug
|
|
163
154
|
|
|
164
155
|
Recompose flows except for those in the "force-app" package directory.
|
|
165
156
|
|
|
@@ -301,10 +292,9 @@ If you encounter any bugs or would like to request features, please create an [i
|
|
|
301
292
|
|
|
302
293
|
## Built With
|
|
303
294
|
|
|
304
|
-
- [`xml-disassembler`](https://github.com/mcarvin8/xml-disassembler)
|
|
305
|
-
- [`
|
|
306
|
-
- [
|
|
307
|
-
- [`xml2json5-disassembler`](https://github.com/mcarvin8/xml2json5-disassembler)
|
|
295
|
+
- [`xml-disassembler`](https://github.com/mcarvin8/xml-disassembler) - Disassembles XML files into smaller files and reassembles the XML
|
|
296
|
+
- [`fs-extra`](https://github.com/jprichardson/node-fs-extra) - Node.js: extra methods for the fs object like copy(), remove(), mkdirs()
|
|
297
|
+
- [`@salesforce/source-deploy-retrieve`](https://github.com/forcedotcom/source-deploy-retrieve) - JavaScript toolkit for working with Salesforce metadata
|
|
308
298
|
|
|
309
299
|
## Contributing
|
|
310
300
|
|
|
@@ -8,7 +8,6 @@ export default class DecomposerRecompose extends SfCommand<DecomposerResult> {
|
|
|
8
8
|
'metadata-type': import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
postpurge: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
10
|
debug: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
11
|
-
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
11
|
'ignore-package-directory': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
12
|
};
|
|
14
13
|
run(): Promise<DecomposerResult>;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* eslint-disable no-await-in-loop */
|
|
3
3
|
import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
|
|
4
4
|
import { Messages } from '@salesforce/core';
|
|
5
|
-
import { LOG_FILE
|
|
5
|
+
import { LOG_FILE } from '../../helpers/constants.js';
|
|
6
6
|
import { recomposeFileHandler } from '../../service/recomposeFileHandler.js';
|
|
7
7
|
import { getRegistryValuesBySuffix } from '../../metadata/getRegistryValuesBySuffix.js';
|
|
8
8
|
import { readOriginalLogFile, checkLogForErrors } from '../../service/checkLogforErrors.js';
|
|
@@ -29,14 +29,6 @@ export default class DecomposerRecompose extends SfCommand {
|
|
|
29
29
|
required: false,
|
|
30
30
|
default: false,
|
|
31
31
|
}),
|
|
32
|
-
format: Flags.string({
|
|
33
|
-
summary: messages.getMessage('flags.format.summary'),
|
|
34
|
-
char: 'f',
|
|
35
|
-
required: true,
|
|
36
|
-
multiple: false,
|
|
37
|
-
default: 'xml',
|
|
38
|
-
options: DECOMPOSED_FILE_TYPES,
|
|
39
|
-
}),
|
|
40
32
|
'ignore-package-directory': Flags.directory({
|
|
41
33
|
summary: messages.getMessage('flags.ignore-package-directory.summary'),
|
|
42
34
|
char: 'i',
|
|
@@ -49,12 +41,11 @@ export default class DecomposerRecompose extends SfCommand {
|
|
|
49
41
|
const metadataTypes = flags['metadata-type'];
|
|
50
42
|
const postpurge = flags['postpurge'];
|
|
51
43
|
const debug = flags['debug'];
|
|
52
|
-
const format = flags['format'];
|
|
53
44
|
const ignoreDirs = flags['ignore-package-directory'];
|
|
54
45
|
for (const metadataType of metadataTypes) {
|
|
55
46
|
const { metaAttributes } = await getRegistryValuesBySuffix(metadataType, 'recompose', ignoreDirs);
|
|
56
47
|
const currentLogFile = await readOriginalLogFile(LOG_FILE);
|
|
57
|
-
await recomposeFileHandler(metaAttributes, postpurge, debug
|
|
48
|
+
await recomposeFileHandler(metaAttributes, postpurge, debug);
|
|
58
49
|
const recomposeErrors = await checkLogForErrors(LOG_FILE, currentLogFile);
|
|
59
50
|
if (recomposeErrors.length > 0) {
|
|
60
51
|
recomposeErrors.forEach((error) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recompose.js","sourceRoot":"","sources":["../../../src/commands/decomposer/recompose.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,qCAAqC;AAErC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"recompose.js","sourceRoot":"","sources":["../../../src/commands/decomposer/recompose.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,qCAAqC;AAErC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,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AC;IACJ,CAAC"}
|
package/lib/hooks/prerun.js
CHANGED
|
@@ -22,7 +22,6 @@ export const prerun = async function (options) {
|
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
const metadataTypes = configFile.metadataSuffixes || '.';
|
|
25
|
-
const format = configFile.decomposedFormat || 'xml';
|
|
26
25
|
const postpurge = configFile.postPurge || false;
|
|
27
26
|
const ignorePackageDirs = configFile.ignorePackageDirectories || '';
|
|
28
27
|
if (metadataTypes.trim() === '.') {
|
|
@@ -43,8 +42,6 @@ export const prerun = async function (options) {
|
|
|
43
42
|
commandArgs.push(sanitizedDir);
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
|
-
commandArgs.push('--format');
|
|
47
|
-
commandArgs.push(format);
|
|
48
45
|
if (postpurge) {
|
|
49
46
|
commandArgs.push('--postpurge');
|
|
50
47
|
}
|
package/lib/hooks/prerun.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prerun.js","sourceRoot":"","sources":["../../src/hooks/prerun.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAAO,mBAAmB,MAAM,qCAAqC,CAAC;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,CAAC,MAAM,MAAM,GAAmB,KAAK,WAAW,OAAO;IAC3D,IAAI,CAAC,CAAC,yBAAyB,EAAE,sBAAsB,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE,CAAC;QACtF,OAAO;IACT,CAAC;IAED,IAAI,UAAsB,CAAC;IAC3B,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,WAAW,EAAE,CAAC;IACzC,IAAI,CAAC,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ClC,CAAC;IACD,MAAM,mBAAmB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAC7C,CAAC,CAAC"}
|
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
import { resolve, relative, join } from 'node:path';
|
|
4
4
|
import { readdir, stat, rm, rename } from 'node:fs/promises';
|
|
5
5
|
import { DisassembleXMLFileHandler, setLogLevel } from 'xml-disassembler';
|
|
6
|
-
import { XmlToYamlDisassembler } from 'xml2yaml-disassembler';
|
|
7
|
-
import { XmlToJsonDisassembler } from 'xml2json-disassembler';
|
|
8
|
-
import { XmlToJson5Disassembler } from 'xml2json5-disassembler';
|
|
9
6
|
import { CUSTOM_LABELS_FILE, WORKFLOW_SUFFIX_MAPPING } from '../helpers/constants.js';
|
|
10
7
|
import { moveFiles } from './moveFiles.js';
|
|
11
8
|
export async function decomposeFileHandler(metaAttributes, prepurge, postpurge, debug, format, ignorePath) {
|
|
@@ -35,25 +32,14 @@ export async function decomposeFileHandler(metaAttributes, prepurge, postpurge,
|
|
|
35
32
|
}
|
|
36
33
|
}
|
|
37
34
|
async function disassembleHandler(filePath, uniqueIdElements, prePurge, postPurge, format, ignorePath) {
|
|
38
|
-
|
|
39
|
-
if (format === 'yaml') {
|
|
40
|
-
handler = new XmlToYamlDisassembler();
|
|
41
|
-
}
|
|
42
|
-
else if (format === 'json') {
|
|
43
|
-
handler = new XmlToJsonDisassembler();
|
|
44
|
-
}
|
|
45
|
-
else if (format === 'json5') {
|
|
46
|
-
handler = new XmlToJson5Disassembler();
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
handler = new DisassembleXMLFileHandler();
|
|
50
|
-
}
|
|
35
|
+
const handler = new DisassembleXMLFileHandler();
|
|
51
36
|
await handler.disassemble({
|
|
52
37
|
filePath,
|
|
53
38
|
uniqueIdElements,
|
|
54
39
|
prePurge,
|
|
55
40
|
postPurge,
|
|
56
41
|
ignorePath,
|
|
42
|
+
format,
|
|
57
43
|
});
|
|
58
44
|
}
|
|
59
45
|
async function prePurgeLabels(metadataPath) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decomposeFileHandler.js","sourceRoot":"","sources":["../../src/service/decomposeFileHandler.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,qCAAqC;AACrC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"decomposeFileHandler.js","sourceRoot":"","sources":["../../src/service/decomposeFileHandler.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,qCAAqC;AACrC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE1E,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,cAMC,EACD,QAAiB,EACjB,SAAkB,EAClB,KAAc,EACd,MAAc,EACd,UAAkB;IAElB,MAAM,EAAE,aAAa,EAAE,UAAU,EAAE,mBAAmB,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAG,cAAc,CAAC;IACxG,IAAI,KAAK;QAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAEhC,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,IAAI,mBAAmB,IAAI,UAAU,EAAE,CAAC;YAC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4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { ReassembleXMLFileHandler, setLogLevel } from 'xml-disassembler';
|
|
6
|
-
import { YamlToXmlReassembler } from 'xml2yaml-disassembler';
|
|
7
|
-
import { JsonToXmlReassembler } from 'xml2json-disassembler';
|
|
8
|
-
import { Json5ToXmlReassembler } from 'xml2json5-disassembler';
|
|
9
6
|
import { CUSTOM_LABELS_FILE } from '../helpers/constants.js';
|
|
10
7
|
import { renameBotVersionFile } from './renameBotVersionFiles.js';
|
|
11
8
|
import { moveFiles } from './moveFiles.js';
|
|
12
|
-
export async function recomposeFileHandler(metaAttributes, postpurge, debug
|
|
9
|
+
export async function recomposeFileHandler(metaAttributes, postpurge, debug) {
|
|
13
10
|
const { metaSuffix, strictDirectoryName, folderType, metadataPaths } = metaAttributes;
|
|
14
11
|
if (debug)
|
|
15
12
|
setLogLevel('debug');
|
|
16
13
|
for (const metadataPath of metadataPaths) {
|
|
17
14
|
if (metaSuffix === 'labels') {
|
|
18
|
-
await reassembleLabels(metadataPath, metaSuffix, postpurge
|
|
15
|
+
await reassembleLabels(metadataPath, metaSuffix, postpurge);
|
|
19
16
|
}
|
|
20
17
|
else {
|
|
21
18
|
let recurse = false;
|
|
22
19
|
if (strictDirectoryName || folderType)
|
|
23
20
|
recurse = true;
|
|
24
|
-
await reassembleDirectories(metadataPath, metaSuffix, recurse, postpurge
|
|
21
|
+
await reassembleDirectories(metadataPath, metaSuffix, recurse, postpurge);
|
|
25
22
|
}
|
|
26
23
|
if (metaSuffix === 'bot')
|
|
27
24
|
await renameBotVersionFile(metadataPath);
|
|
28
25
|
}
|
|
29
26
|
}
|
|
30
|
-
async function reassembleHandler(filePath, fileExtension, postPurge
|
|
31
|
-
|
|
32
|
-
if (format === 'yaml') {
|
|
33
|
-
handler = new YamlToXmlReassembler();
|
|
34
|
-
}
|
|
35
|
-
else if (format === 'json') {
|
|
36
|
-
handler = new JsonToXmlReassembler();
|
|
37
|
-
}
|
|
38
|
-
else if (format === 'json5') {
|
|
39
|
-
handler = new Json5ToXmlReassembler();
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
handler = new ReassembleXMLFileHandler();
|
|
43
|
-
}
|
|
27
|
+
async function reassembleHandler(filePath, fileExtension, postPurge) {
|
|
28
|
+
const handler = new ReassembleXMLFileHandler();
|
|
44
29
|
await handler.reassemble({
|
|
45
30
|
filePath,
|
|
46
31
|
fileExtension,
|
|
47
32
|
postPurge,
|
|
48
33
|
});
|
|
49
34
|
}
|
|
50
|
-
async function reassembleLabels(metadataPath, metaSuffix, postpurge
|
|
35
|
+
async function reassembleLabels(metadataPath, metaSuffix, postpurge) {
|
|
51
36
|
let sourceDirectory = metadataPath;
|
|
52
37
|
let destinationDirectory = join(metadataPath, 'CustomLabels', 'labels');
|
|
53
38
|
await moveFiles(sourceDirectory, destinationDirectory, (fileName) => fileName !== CUSTOM_LABELS_FILE);
|
|
54
39
|
// do not use postpurge flag due to file moving
|
|
55
|
-
await reassembleHandler(join(metadataPath, 'CustomLabels'), `${metaSuffix}-meta.xml`, false
|
|
40
|
+
await reassembleHandler(join(metadataPath, 'CustomLabels'), `${metaSuffix}-meta.xml`, false);
|
|
56
41
|
sourceDirectory = join(metadataPath, 'CustomLabels', 'labels');
|
|
57
42
|
destinationDirectory = metadataPath;
|
|
58
43
|
await moveFiles(sourceDirectory, destinationDirectory, () => true);
|
|
@@ -70,16 +55,16 @@ async function deleteFilesInDirectory(directory) {
|
|
|
70
55
|
}
|
|
71
56
|
}
|
|
72
57
|
}
|
|
73
|
-
async function reassembleDirectories(metadataPath, metaSuffix, recurse, postpurge
|
|
58
|
+
async function reassembleDirectories(metadataPath, metaSuffix, recurse, postpurge) {
|
|
74
59
|
const subdirectories = (await readdir(metadataPath)).map((file) => join(metadataPath, file));
|
|
75
60
|
for (const subdirectory of subdirectories) {
|
|
76
61
|
const subDirStat = await stat(subdirectory);
|
|
77
62
|
if (subDirStat.isDirectory() && recurse) {
|
|
78
63
|
// recursively call this function and set recurse to false
|
|
79
|
-
await reassembleDirectories(subdirectory, metaSuffix, false, postpurge
|
|
64
|
+
await reassembleDirectories(subdirectory, metaSuffix, false, postpurge);
|
|
80
65
|
}
|
|
81
66
|
else if (subDirStat.isDirectory()) {
|
|
82
|
-
await reassembleHandler(subdirectory, `${metaSuffix}-meta.xml`, postpurge
|
|
67
|
+
await reassembleHandler(subdirectory, `${metaSuffix}-meta.xml`, postpurge);
|
|
83
68
|
}
|
|
84
69
|
}
|
|
85
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recomposeFileHandler.js","sourceRoot":"","sources":["../../src/service/recomposeFileHandler.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,qCAAqC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"recomposeFileHandler.js","sourceRoot":"","sources":["../../src/service/recomposeFileHandler.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,qCAAqC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,cAKC,EACD,SAAkB,EAClB,KAAc;IAEd,MAAM,EAAE,UAAU,EAAE,mBAAmB,EAAE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MAAM,qBAAqB,CAAC,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAC1E,CAAC;aAAM,IAAI,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC;YACpC,MAAM,iBAAiB,CAAC,YAAY,EAAE,GAAG,UAAU,WAAW,EAAE,SAAS,CAAC,CAAC;QAC7E,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -10,8 +10,7 @@ You should run this before you deploy decomposed metadata to an org.
|
|
|
10
10
|
|
|
11
11
|
# examples
|
|
12
12
|
|
|
13
|
-
- `sf decomposer recompose -m "flow"
|
|
14
|
-
- `sf decomposer recompose -m "flow" -m "labels" -f "xml" --postpurge --debug`
|
|
13
|
+
- `sf decomposer recompose -m "flow" --postpurge --debug`
|
|
15
14
|
- `sf decomposer recompose -m "flow" -i "force-app"`
|
|
16
15
|
|
|
17
16
|
# flags.metadata-type.summary
|
|
@@ -26,10 +25,6 @@ Purge the decomposed files after recomposing them.
|
|
|
26
25
|
|
|
27
26
|
Debug to a log file.
|
|
28
27
|
|
|
29
|
-
# flags.format.summary
|
|
30
|
-
|
|
31
|
-
File format for the decomposed files.
|
|
32
|
-
|
|
33
28
|
# flags.ignore-package-directory.summary
|
|
34
29
|
|
|
35
30
|
Ignore a package directory.
|
package/oclif.lock
CHANGED
|
@@ -1572,10 +1572,10 @@
|
|
|
1572
1572
|
string-width "^7.2.0"
|
|
1573
1573
|
terminal-link "^3.0.0"
|
|
1574
1574
|
|
|
1575
|
-
"@salesforce/source-deploy-retrieve@^12.
|
|
1576
|
-
version "12.
|
|
1577
|
-
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.
|
|
1578
|
-
integrity sha512-
|
|
1575
|
+
"@salesforce/source-deploy-retrieve@^12.19.0":
|
|
1576
|
+
version "12.19.0"
|
|
1577
|
+
resolved "https://registry.yarnpkg.com/@salesforce/source-deploy-retrieve/-/source-deploy-retrieve-12.19.0.tgz#bd7edd9d8ad7e1784f8e6685ebc939603e6fe8a1"
|
|
1578
|
+
integrity sha512-gaLC+0J7Lr52jBN5ZiGwoVTDqh0xCwfnYo1l9E6uTeFmgc0wRu2vL9XBvO5cJGjWLu/OKCSyJHyv5zi+NjmfyA==
|
|
1579
1579
|
dependencies:
|
|
1580
1580
|
"@salesforce/core" "^8.8.7"
|
|
1581
1581
|
"@salesforce/kit" "^3.2.3"
|
|
@@ -1591,7 +1591,7 @@
|
|
|
1591
1591
|
mime "2.6.0"
|
|
1592
1592
|
minimatch "^9.0.5"
|
|
1593
1593
|
proxy-agent "^6.4.0"
|
|
1594
|
-
yaml "^2.7.
|
|
1594
|
+
yaml "^2.7.1"
|
|
1595
1595
|
|
|
1596
1596
|
"@salesforce/ts-types@^2.0.10", "@salesforce/ts-types@^2.0.12":
|
|
1597
1597
|
version "2.0.12"
|
|
@@ -7701,7 +7701,7 @@ tsconfig-paths@^3.15.0:
|
|
|
7701
7701
|
minimist "^1.2.6"
|
|
7702
7702
|
strip-bom "^3.0.0"
|
|
7703
7703
|
|
|
7704
|
-
tslib@^2.0.1, tslib@^2.0.3, tslib@^2.5.0, tslib@^2.6.2
|
|
7704
|
+
tslib@^2.0.1, tslib@^2.0.3, tslib@^2.5.0, tslib@^2.6.2:
|
|
7705
7705
|
version "2.8.1"
|
|
7706
7706
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f"
|
|
7707
7707
|
integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==
|
|
@@ -8108,15 +8108,17 @@ write-file-atomic@^3.0.0:
|
|
|
8108
8108
|
signal-exit "^3.0.2"
|
|
8109
8109
|
typedarray-to-buffer "^3.1.5"
|
|
8110
8110
|
|
|
8111
|
-
xml-disassembler@^1.
|
|
8112
|
-
version "1.
|
|
8113
|
-
resolved "https://registry.yarnpkg.com/xml-disassembler/-/xml-disassembler-1.
|
|
8114
|
-
integrity sha512-
|
|
8111
|
+
xml-disassembler@^1.5.0:
|
|
8112
|
+
version "1.5.0"
|
|
8113
|
+
resolved "https://registry.yarnpkg.com/xml-disassembler/-/xml-disassembler-1.5.0.tgz#9940934c87c1923c2b05c896b120a5259e7acf82"
|
|
8114
|
+
integrity sha512-Pb1KcNIMaL4LXRfcOsbAyYlcy1PnQj2aqnuf2opGVJPYHzaQspy69j7FXyQ4U6BvqgeyfgMxbWMzD70HqiCDiA==
|
|
8115
8115
|
dependencies:
|
|
8116
8116
|
fast-xml-parser "^5.0.9"
|
|
8117
8117
|
ignore "^7.0.3"
|
|
8118
|
+
json5 "^2.2.3"
|
|
8118
8119
|
log4js "^6.9.1"
|
|
8119
8120
|
tslib "^2.6.2"
|
|
8121
|
+
yaml "^2.7.1"
|
|
8120
8122
|
|
|
8121
8123
|
xml2js@^0.6.2:
|
|
8122
8124
|
version "0.6.2"
|
|
@@ -8126,32 +8128,6 @@ xml2js@^0.6.2:
|
|
|
8126
8128
|
sax ">=0.6.0"
|
|
8127
8129
|
xmlbuilder "~11.0.0"
|
|
8128
8130
|
|
|
8129
|
-
xml2json-disassembler@^1.1.14:
|
|
8130
|
-
version "1.1.14"
|
|
8131
|
-
resolved "https://registry.yarnpkg.com/xml2json-disassembler/-/xml2json-disassembler-1.1.14.tgz#d6cbdd6ce8f6f2599294d8aecc70180d28761b4c"
|
|
8132
|
-
integrity sha512-X+UyuqrJHOQFROlLTLe5RtN6Z0Xy/6GhKSclDrQgzpkT2dKSTnILb1KQhcfkEtMLj1IppKtoH7f3ol9wweonDQ==
|
|
8133
|
-
dependencies:
|
|
8134
|
-
tslib "^2.6.2"
|
|
8135
|
-
xml-disassembler "^1.3.15"
|
|
8136
|
-
|
|
8137
|
-
xml2json5-disassembler@^1.0.2:
|
|
8138
|
-
version "1.0.2"
|
|
8139
|
-
resolved "https://registry.yarnpkg.com/xml2json5-disassembler/-/xml2json5-disassembler-1.0.2.tgz#f29dc4df46c6a4cd60a58121a8b0615ada23bb28"
|
|
8140
|
-
integrity sha512-/O7Evf0XQR+FxrT6dNZFz8CdClkyV25mLRAT1BJn2AFIjZ/glN+Psa9y6QK3J1n98tiIqD28dLSeKrcAYDjNnQ==
|
|
8141
|
-
dependencies:
|
|
8142
|
-
json5 "^2.2.3"
|
|
8143
|
-
tslib "^2.8.1"
|
|
8144
|
-
xml-disassembler "^1.3.15"
|
|
8145
|
-
|
|
8146
|
-
xml2yaml-disassembler@^1.1.15:
|
|
8147
|
-
version "1.1.15"
|
|
8148
|
-
resolved "https://registry.yarnpkg.com/xml2yaml-disassembler/-/xml2yaml-disassembler-1.1.15.tgz#f5172223b56930bc1dc6dbc6eb9c505688edc5cb"
|
|
8149
|
-
integrity sha512-ZKtjK9YJdw/RRkTJDtqlXA8gCbeUeqXiVoXHqAX9KseTwKF0U9bZQt+sYFH663uLXlC2TNV7LtMxoqa3Qfa4zA==
|
|
8150
|
-
dependencies:
|
|
8151
|
-
tslib "^2.6.2"
|
|
8152
|
-
xml-disassembler "^1.3.15"
|
|
8153
|
-
yaml "^2.7.1"
|
|
8154
|
-
|
|
8155
8131
|
xmlbuilder@~11.0.0:
|
|
8156
8132
|
version "11.0.1"
|
|
8157
8133
|
resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz"
|
|
@@ -8182,7 +8158,7 @@ yallist@^4.0.0:
|
|
|
8182
8158
|
resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz"
|
|
8183
8159
|
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
|
|
8184
8160
|
|
|
8185
|
-
yaml@^2.4.5, yaml@^2.7.
|
|
8161
|
+
yaml@^2.4.5, yaml@^2.7.1:
|
|
8186
8162
|
version "2.7.1"
|
|
8187
8163
|
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.7.1.tgz#44a247d1b88523855679ac7fa7cda6ed7e135cf6"
|
|
8188
8164
|
integrity sha512-10ULxpnOCQXxJvBgxsn9ptjq6uviG/htZKk9veJGhlqn3w/DxQ631zFF+nlQXLwmImeS5amR2dl2U8sg6U9jsQ==
|
package/oclif.manifest.json
CHANGED
|
@@ -108,8 +108,7 @@
|
|
|
108
108
|
"args": {},
|
|
109
109
|
"description": "Recompose the decomposed files into deployment-compatible metadata files.\n\nYou should run this before you deploy decomposed metadata to an org.",
|
|
110
110
|
"examples": [
|
|
111
|
-
"`sf decomposer recompose -m \"flow\"
|
|
112
|
-
"`sf decomposer recompose -m \"flow\" -m \"labels\" -f \"xml\" --postpurge --debug`",
|
|
111
|
+
"`sf decomposer recompose -m \"flow\" --postpurge --debug`",
|
|
113
112
|
"`sf decomposer recompose -m \"flow\" -i \"force-app\"`"
|
|
114
113
|
],
|
|
115
114
|
"flags": {
|
|
@@ -151,22 +150,6 @@
|
|
|
151
150
|
"allowNo": false,
|
|
152
151
|
"type": "boolean"
|
|
153
152
|
},
|
|
154
|
-
"format": {
|
|
155
|
-
"char": "f",
|
|
156
|
-
"name": "format",
|
|
157
|
-
"required": true,
|
|
158
|
-
"summary": "File format for the decomposed files.",
|
|
159
|
-
"default": "xml",
|
|
160
|
-
"hasDynamicHelp": false,
|
|
161
|
-
"multiple": false,
|
|
162
|
-
"options": [
|
|
163
|
-
"xml",
|
|
164
|
-
"json",
|
|
165
|
-
"yaml",
|
|
166
|
-
"json5"
|
|
167
|
-
],
|
|
168
|
-
"type": "option"
|
|
169
|
-
},
|
|
170
153
|
"ignore-package-directory": {
|
|
171
154
|
"char": "i",
|
|
172
155
|
"name": "ignore-package-directory",
|
|
@@ -200,5 +183,5 @@
|
|
|
200
183
|
]
|
|
201
184
|
}
|
|
202
185
|
},
|
|
203
|
-
"version": "5.
|
|
186
|
+
"version": "5.5.0"
|
|
204
187
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sf-decomposer",
|
|
3
3
|
"description": "Break down large Salesforce metadata files into smaller, more manageable files for version control and then recreate deployment-compatible files.",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.5.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@oclif/core": "^4",
|
|
7
7
|
"@salesforce/core": "^8.2.1",
|
|
8
8
|
"@salesforce/sf-plugins-core": "^11.2.1",
|
|
9
|
-
"@salesforce/source-deploy-retrieve": "^12.
|
|
9
|
+
"@salesforce/source-deploy-retrieve": "^12.19.0",
|
|
10
10
|
"fs-extra": "^11.3.0",
|
|
11
|
-
"xml-disassembler": "^1.
|
|
12
|
-
"xml2json-disassembler": "^1.1.14",
|
|
13
|
-
"xml2json5-disassembler": "^1.0.2",
|
|
14
|
-
"xml2yaml-disassembler": "^1.1.15"
|
|
11
|
+
"xml-disassembler": "^1.5.0"
|
|
15
12
|
},
|
|
16
13
|
"devDependencies": {
|
|
17
14
|
"@commitlint/cli": "^19.8.0",
|