sf-decomposer 5.10.3 → 5.10.4
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
CHANGED
|
@@ -5,6 +5,13 @@
|
|
|
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.10.4](https://github.com/mcarvin8/sf-decomposer/compare/v5.10.3...v5.10.4) (2025-05-13)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* remove extra declaration delete function ([#275](https://github.com/mcarvin8/sf-decomposer/issues/275)) ([2bd1398](https://github.com/mcarvin8/sf-decomposer/commit/2bd139837672036ec8341f09c208da353f6e32ec))
|
|
14
|
+
|
|
8
15
|
## [5.10.3](https://github.com/mcarvin8/sf-decomposer/compare/v5.10.2...v5.10.3) (2025-05-13)
|
|
9
16
|
|
|
10
17
|
|
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
import { readdir, writeFile, stat } from 'node:fs/promises';
|
|
4
4
|
import { join } from 'node:path';
|
|
5
5
|
import { parseXML, buildXMLString } from 'xml-disassembler';
|
|
6
|
-
function stripXmlDeclarationFromString(xml) {
|
|
7
|
-
return xml.replace(/<\?xml.*?\?>\s*/g, '').trim();
|
|
8
|
-
}
|
|
9
6
|
export async function wrapAllFilesWithLoyaltyRoot(folderPath) {
|
|
10
7
|
const files = await readdir(folderPath);
|
|
11
8
|
for (const file of files) {
|
|
@@ -22,6 +19,10 @@ export async function wrapAllFilesWithLoyaltyRoot(folderPath) {
|
|
|
22
19
|
// Already wrapped
|
|
23
20
|
continue;
|
|
24
21
|
}
|
|
22
|
+
// Remove '?xml' declaration if it exists
|
|
23
|
+
const rootKey = Object.keys(parsed).find(k => k !== '?xml');
|
|
24
|
+
if (!rootKey)
|
|
25
|
+
continue;
|
|
25
26
|
const wrapped = {
|
|
26
27
|
'?xml': {
|
|
27
28
|
'@_version': '1.0',
|
|
@@ -29,12 +30,11 @@ export async function wrapAllFilesWithLoyaltyRoot(folderPath) {
|
|
|
29
30
|
},
|
|
30
31
|
LoyaltyProgramSetup: {
|
|
31
32
|
'@_xmlns': 'http://soap.sforce.com/2006/04/metadata',
|
|
32
|
-
|
|
33
|
+
[rootKey]: parsed[rootKey],
|
|
33
34
|
},
|
|
34
35
|
};
|
|
35
36
|
const xmlString = buildXMLString(wrapped);
|
|
36
|
-
|
|
37
|
-
await writeFile(xmlPath, cleanXmlString, 'utf-8');
|
|
37
|
+
await writeFile(xmlPath, xmlString, 'utf-8');
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
//# sourceMappingURL=wrapAllFilesWithLoyaltyRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapAllFilesWithLoyaltyRoot.js","sourceRoot":"","sources":["../../../src/service/recompose/wrapAllFilesWithLoyaltyRoot.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,qCAAqC;AACrC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAc,MAAM,kBAAkB,CAAC;AAExE,
|
|
1
|
+
{"version":3,"file":"wrapAllFilesWithLoyaltyRoot.js","sourceRoot":"","sources":["../../../src/service/recompose/wrapAllFilesWithLoyaltyRoot.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,qCAAqC;AACrC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAc,MAAM,kBAAkB,CAAC;AAExE,MAAM,CAAC,KAAK,UAAU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"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.10.
|
|
4
|
+
"version": "5.10.4",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@oclif/core": "^4",
|
|
7
7
|
"@salesforce/core": "^8.10.3",
|