xml-disassembler 1.3.10 → 1.3.12
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 +14 -0
- package/CONTRIBUTING.md +39 -0
- package/README.md +5 -1
- package/disassemble.log +95 -95
- package/dist/index.cjs +69 -114
- package/dist/index.cjs.map +1 -1
- package/dist/index.min.cjs +1 -1
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.min.umd.js +1 -1
- package/dist/index.min.umd.js.map +1 -1
- package/dist/index.mjs +70 -113
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +73 -117
- package/dist/index.umd.js.map +1 -1
- package/dist/typings/index.d.ts +0 -2
- package/dist/typings/service/disassembleXMLFileHandler.d.ts +1 -1
- package/package.json +3 -3
- package/dist/typings/service/getConcurrencyThreshold.d.ts +0 -1
- package/dist/typings/service/withConcurrencyLimit.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,20 @@
|
|
|
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
|
+
## [1.3.12](https://github.com/mcarvin8/xml-disassembler/compare/v1.3.11...v1.3.12) (2025-02-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** bump fast-xml-parser from 4.5.1 to 5.0.6 ([6309db6](https://github.com/mcarvin8/xml-disassembler/commit/6309db601cdd273ff352d147b5ab9b60c0e65bf0))
|
|
14
|
+
|
|
15
|
+
## [1.3.11](https://github.com/mcarvin8/xml-disassembler/compare/v1.3.10...v1.3.11) (2025-01-21)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* revert to 1.3.8 to remove parallel processing ([876ff0c](https://github.com/mcarvin8/xml-disassembler/commit/876ff0cd8c27060a22b26d0efdc34bf155214680))
|
|
21
|
+
|
|
8
22
|
## [1.3.10](https://github.com/mcarvin8/xml-disassembler/compare/v1.3.9...v1.3.10) (2025-01-21)
|
|
9
23
|
|
|
10
24
|
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Contributions are welcome! If you would like to contribute, please fork the repository, make your changes, and submit a pull request.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- pnpm >= 8
|
|
8
|
+
- node >= 18
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
### 1) Fork the repository
|
|
13
|
+
|
|
14
|
+
### 2) Install Dependencies
|
|
15
|
+
|
|
16
|
+
This will install all the tools needed to contribute
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pnpm install
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Testing
|
|
23
|
+
|
|
24
|
+
When developing, run the provided tests for new additions.
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pnpm test
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Extension Packages
|
|
31
|
+
|
|
32
|
+
The 2 extension packages have been developed from xml-disassembler:
|
|
33
|
+
|
|
34
|
+
- [XML2JSON Disassembler](https://github.com/mcarvin8/xml2json-disassembler): Extension package which disassembles large XML files into smaller JSON files and reassembles the original XML file when needed
|
|
35
|
+
- [XML2YAML Disassembler](https://github.com/mcarvin8/xml2yaml-disassembler): Extension package which disassembles large XML files into smaller YAML files and reassembles the original XML file when needed
|
|
36
|
+
|
|
37
|
+
Please fork and raise PRs in these repos for any features or bug fixes specific to XML2JSON or XML2YAML issues. All 3 packages are built with node and pnpm.
|
|
38
|
+
|
|
39
|
+
Ensure the 2 extensions are updated to use the latest xml-disassembler.
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/xml-disassembler) [](https://npmjs.org/package/xml-disassembler)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Disassemble XML files into smaller, more manageable files and reassemble them when needed.
|
|
6
6
|
|
|
7
7
|
<!-- TABLE OF CONTENTS -->
|
|
8
8
|
<details>
|
|
@@ -18,6 +18,7 @@ A JavaScript package to disassemble XML files into smaller, more manageable file
|
|
|
18
18
|
- [XML Parser](#xml-parser)
|
|
19
19
|
- [Logging](#logging)
|
|
20
20
|
- [Extensions](#extensions)
|
|
21
|
+
- [Contributing](#contributing)
|
|
21
22
|
- [Template](#template)
|
|
22
23
|
</details>
|
|
23
24
|
|
|
@@ -251,6 +252,9 @@ These 2 extension packages depend on XML disassembler:
|
|
|
251
252
|
- [XML2JSON Disassembler](https://github.com/mcarvin8/xml2json-disassembler): Disassemble large XML files into smaller JSON files and reassemble the original XML file when needed
|
|
252
253
|
- [XML2YAML Disassembler](https://github.com/mcarvin8/xml2yaml-disassembler): Disassemble large XML files into smaller YAML files and reassemble the original XML file when needed
|
|
253
254
|
|
|
255
|
+
## Contributing
|
|
256
|
+
|
|
257
|
+
Contributions are welcome! See [Contributing](https://github.com/mcarvin8/xml-disassembler/blob/main/CONTRIBUTING.md).
|
|
254
258
|
|
|
255
259
|
## Template
|
|
256
260
|
|
package/disassemble.log
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
[2025-
|
|
2
|
-
[2025-
|
|
3
|
-
[2025-
|
|
4
|
-
[2025-
|
|
5
|
-
[2025-
|
|
6
|
-
[2025-
|
|
7
|
-
[2025-
|
|
8
|
-
[2025-
|
|
9
|
-
[2025-
|
|
10
|
-
[2025-
|
|
11
|
-
[2025-
|
|
12
|
-
[2025-
|
|
13
|
-
[2025-
|
|
14
|
-
[2025-
|
|
15
|
-
[2025-
|
|
16
|
-
[2025-
|
|
17
|
-
[2025-
|
|
18
|
-
[2025-
|
|
19
|
-
[2025-
|
|
20
|
-
[2025-
|
|
21
|
-
[2025-
|
|
22
|
-
[2025-
|
|
23
|
-
[2025-
|
|
24
|
-
[2025-
|
|
25
|
-
[2025-
|
|
26
|
-
[2025-
|
|
27
|
-
[2025-
|
|
28
|
-
[2025-
|
|
29
|
-
[2025-
|
|
30
|
-
[2025-
|
|
31
|
-
[2025-
|
|
32
|
-
[2025-
|
|
33
|
-
[2025-
|
|
34
|
-
[2025-
|
|
35
|
-
[2025-
|
|
36
|
-
[2025-
|
|
37
|
-
[2025-
|
|
38
|
-
[2025-
|
|
39
|
-
[2025-
|
|
40
|
-
[2025-
|
|
41
|
-
[2025-
|
|
42
|
-
[2025-
|
|
43
|
-
[2025-
|
|
44
|
-
[2025-
|
|
45
|
-
[2025-
|
|
46
|
-
[2025-
|
|
47
|
-
[2025-
|
|
48
|
-
[2025-
|
|
49
|
-
[2025-
|
|
50
|
-
[2025-
|
|
51
|
-
[2025-
|
|
52
|
-
[2025-
|
|
53
|
-
[2025-
|
|
54
|
-
[2025-
|
|
55
|
-
[2025-
|
|
56
|
-
[2025-
|
|
57
|
-
[2025-
|
|
58
|
-
[2025-
|
|
59
|
-
[2025-
|
|
60
|
-
[2025-
|
|
61
|
-
[2025-
|
|
62
|
-
[2025-
|
|
63
|
-
[2025-
|
|
64
|
-
[2025-
|
|
65
|
-
[2025-
|
|
66
|
-
[2025-
|
|
67
|
-
[2025-
|
|
68
|
-
[2025-
|
|
69
|
-
[2025-
|
|
70
|
-
[2025-
|
|
71
|
-
[2025-
|
|
72
|
-
[2025-
|
|
73
|
-
[2025-
|
|
74
|
-
[2025-
|
|
75
|
-
[2025-
|
|
76
|
-
[2025-
|
|
77
|
-
[2025-
|
|
78
|
-
[2025-
|
|
79
|
-
[2025-
|
|
80
|
-
[2025-
|
|
81
|
-
[2025-
|
|
82
|
-
[2025-
|
|
83
|
-
[2025-
|
|
84
|
-
[2025-
|
|
85
|
-
[2025-
|
|
86
|
-
[2025-
|
|
87
|
-
[2025-
|
|
88
|
-
[2025-
|
|
89
|
-
[2025-
|
|
90
|
-
[2025-
|
|
91
|
-
[2025-
|
|
92
|
-
[2025-
|
|
93
|
-
[2025-
|
|
94
|
-
[2025-
|
|
95
|
-
[2025-
|
|
1
|
+
[2025-02-24T21:19:23.396] [DEBUG] default - Parsing file to disassemble: mock/general/HR_Admin.permissionset-meta.xml
|
|
2
|
+
[2025-02-24T21:19:23.404] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/applicationVisibilities/JobApps__Recruiting.applicationVisibilities-meta.xml
|
|
3
|
+
[2025-02-24T21:19:23.405] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/classAccesses/Send_Email_Confirmation.classAccesses-meta.xml
|
|
4
|
+
[2025-02-24T21:19:23.405] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/fieldPermissions/Job_Request__c.Salary__c.fieldPermissions-meta.xml
|
|
5
|
+
[2025-02-24T21:19:23.406] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/objectPermissions/Job_Request__c.objectPermissions-meta.xml
|
|
6
|
+
[2025-02-24T21:19:23.407] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/pageAccesses/Job_Request_Web_Form.pageAccesses-meta.xml
|
|
7
|
+
[2025-02-24T21:19:23.407] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/recordTypeVisibilities/Recruiting.DevManager.recordTypeVisibilities-meta.xml
|
|
8
|
+
[2025-02-24T21:19:23.408] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/tabSettings/Job_Request__c.tabSettings-meta.xml
|
|
9
|
+
[2025-02-24T21:19:23.409] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/userPermissions/APIEnabled.userPermissions-meta.xml
|
|
10
|
+
[2025-02-24T21:19:23.409] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/HR_Admin.permissionset-meta.xml
|
|
11
|
+
[2025-02-24T21:19:23.413] [DEBUG] default - Parsing directory to reassemble: mock/general/HR_Admin
|
|
12
|
+
[2025-02-24T21:19:23.428] [DEBUG] default - Created reassembled file: mock/general/HR_Admin.permissionset-meta.xml
|
|
13
|
+
[2025-02-24T21:19:23.446] [DEBUG] default - Parsing file to disassemble: mock/attributes/notes.xml
|
|
14
|
+
[2025-02-24T21:19:23.449] [DEBUG] default - Created disassembled file: mock/attributes/notes/nest/103c6c8b.nest-meta.xml
|
|
15
|
+
[2025-02-24T21:19:23.450] [DEBUG] default - Created disassembled file: mock/attributes/notes/nest/f876f2be.nest-meta.xml
|
|
16
|
+
[2025-02-24T21:19:23.452] [DEBUG] default - Parsing directory to reassemble: mock/attributes/notes
|
|
17
|
+
[2025-02-24T21:19:23.456] [DEBUG] default - Created reassembled file: mock/attributes/notes.xml
|
|
18
|
+
[2025-02-24T21:19:23.461] [DEBUG] default - Parsing file to disassemble: mock/cdata/VidLand_US.marketingappextension-meta.xml
|
|
19
|
+
[2025-02-24T21:19:23.465] [DEBUG] default - Created disassembled file: mock/cdata/VidLand_US/marketingAppExtActions/register_user.marketingAppExtActions-meta.xml
|
|
20
|
+
[2025-02-24T21:19:23.465] [DEBUG] default - Created disassembled file: mock/cdata/VidLand_US/VidLand_US.marketingappextension-meta.xml
|
|
21
|
+
[2025-02-24T21:19:23.467] [DEBUG] default - Parsing directory to reassemble: mock/cdata/VidLand_US
|
|
22
|
+
[2025-02-24T21:19:23.471] [DEBUG] default - Created reassembled file: mock/cdata/VidLand_US.xml
|
|
23
|
+
[2025-02-24T21:19:23.474] [DEBUG] default - Parsing file to disassemble: mock/comments/Numbers-fr.globalValueSetTranslation-meta.xml
|
|
24
|
+
[2025-02-24T21:19:23.477] [DEBUG] default - Created disassembled file: mock/comments/Numbers-fr/valueTranslation/30e8b6d2.valueTranslation-meta.xml
|
|
25
|
+
[2025-02-24T21:19:23.478] [DEBUG] default - Created disassembled file: mock/comments/Numbers-fr/valueTranslation/d7dd1420.valueTranslation-meta.xml
|
|
26
|
+
[2025-02-24T21:19:23.482] [DEBUG] default - Created disassembled file: mock/comments/Numbers-fr/valueTranslation/d8852ede.valueTranslation-meta.xml
|
|
27
|
+
[2025-02-24T21:19:23.484] [DEBUG] default - Parsing directory to reassemble: mock/comments/Numbers-fr
|
|
28
|
+
[2025-02-24T21:19:23.495] [DEBUG] default - Created reassembled file: mock/comments/Numbers-fr.globalValueSetTranslation-meta.xml
|
|
29
|
+
[2025-02-24T21:19:23.501] [DEBUG] default - Parsing file to disassemble: mock/deeply-nested-unique-id-element/Get_Info.flow-meta.xml
|
|
30
|
+
[2025-02-24T21:19:23.527] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/actionCalls/Get_Info.actionCalls-meta.xml
|
|
31
|
+
[2025-02-24T21:19:23.527] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/actionCalls/Post_to_Contact_s_Feed.actionCalls-meta.xml
|
|
32
|
+
[2025-02-24T21:19:23.528] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/assignments/Set_Contact_ID.assignments-meta.xml
|
|
33
|
+
[2025-02-24T21:19:23.528] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/decisions/Update_If_Existing.decisions-meta.xml
|
|
34
|
+
[2025-02-24T21:19:23.529] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/decisions/Update_or_Create.decisions-meta.xml
|
|
35
|
+
[2025-02-24T21:19:23.529] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/dynamicChoiceSets/accounts.dynamicChoiceSets-meta.xml
|
|
36
|
+
[2025-02-24T21:19:23.530] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/formulas/created_or_updated.formulas-meta.xml
|
|
37
|
+
[2025-02-24T21:19:23.531] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/processMetadataValues/BuilderType.processMetadataValues-meta.xml
|
|
38
|
+
[2025-02-24T21:19:23.531] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/processMetadataValues/CanvasMode.processMetadataValues-meta.xml
|
|
39
|
+
[2025-02-24T21:19:23.532] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/processMetadataValues/OriginBuilderType.processMetadataValues-meta.xml
|
|
40
|
+
[2025-02-24T21:19:23.532] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/recordCreates/Create_Contact.recordCreates-meta.xml
|
|
41
|
+
[2025-02-24T21:19:23.533] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/recordLookups/Find_a_Match.recordLookups-meta.xml
|
|
42
|
+
[2025-02-24T21:19:23.533] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/recordUpdates/Update_Contact.recordUpdates-meta.xml
|
|
43
|
+
[2025-02-24T21:19:23.533] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/screens/Confirm.screens-meta.xml
|
|
44
|
+
[2025-02-24T21:19:23.534] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/screens/Contact_Info.screens-meta.xml
|
|
45
|
+
[2025-02-24T21:19:23.534] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/start/Contact_Info.start-meta.xml
|
|
46
|
+
[2025-02-24T21:19:23.535] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/textTemplates/chatterMessage.textTemplates-meta.xml
|
|
47
|
+
[2025-02-24T21:19:23.535] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/variables/ComplexObjectExample.variables-meta.xml
|
|
48
|
+
[2025-02-24T21:19:23.536] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/variables/contact.variables-meta.xml
|
|
49
|
+
[2025-02-24T21:19:23.536] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/variables/existingId.variables-meta.xml
|
|
50
|
+
[2025-02-24T21:19:23.536] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/variables/updateExisting.variables-meta.xml
|
|
51
|
+
[2025-02-24T21:19:23.537] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/Get_Info.flow-meta.xml
|
|
52
|
+
[2025-02-24T21:19:23.538] [DEBUG] default - Parsing directory to reassemble: mock/deeply-nested-unique-id-element/Get_Info
|
|
53
|
+
[2025-02-24T21:19:23.555] [DEBUG] default - Created reassembled file: mock/deeply-nested-unique-id-element/Get_Info.flow-meta.xml
|
|
54
|
+
[2025-02-24T21:19:23.556] [DEBUG] default - Parsing file to disassemble: mock/array-of-leafs/Dreamhouse.app-meta.xml
|
|
55
|
+
[2025-02-24T21:19:23.558] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/39049d21.actionOverrides-meta.xml
|
|
56
|
+
[2025-02-24T21:19:23.559] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/735c1659.actionOverrides-meta.xml
|
|
57
|
+
[2025-02-24T21:19:23.559] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/b04e9f9b.actionOverrides-meta.xml
|
|
58
|
+
[2025-02-24T21:19:23.559] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/c8cc7a99.actionOverrides-meta.xml
|
|
59
|
+
[2025-02-24T21:19:23.560] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/brand/c9db422b.brand-meta.xml
|
|
60
|
+
[2025-02-24T21:19:23.560] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/Dreamhouse.app-meta.xml
|
|
61
|
+
[2025-02-24T21:19:23.561] [DEBUG] default - Parsing directory to reassemble: mock/array-of-leafs/Dreamhouse
|
|
62
|
+
[2025-02-24T21:19:23.565] [DEBUG] default - Created reassembled file: mock/array-of-leafs/Dreamhouse.app-meta.xml
|
|
63
|
+
[2025-02-24T21:19:23.566] [DEBUG] default - Parsing file to disassemble: mock/array-of-leafs/Dreamhouse.app-meta.xml
|
|
64
|
+
[2025-02-24T21:19:23.570] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/39049d21.actionOverrides-meta.xml
|
|
65
|
+
[2025-02-24T21:19:23.570] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/735c1659.actionOverrides-meta.xml
|
|
66
|
+
[2025-02-24T21:19:23.571] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/b04e9f9b.actionOverrides-meta.xml
|
|
67
|
+
[2025-02-24T21:19:23.571] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/c8cc7a99.actionOverrides-meta.xml
|
|
68
|
+
[2025-02-24T21:19:23.572] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/brand/c9db422b.brand-meta.xml
|
|
69
|
+
[2025-02-24T21:19:23.572] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/Dreamhouse.app-meta.xml
|
|
70
|
+
[2025-02-24T21:19:23.573] [DEBUG] default - Parsing directory to reassemble: mock/array-of-leafs/Dreamhouse
|
|
71
|
+
[2025-02-24T21:19:23.576] [DEBUG] default - Created reassembled file: mock/array-of-leafs/Dreamhouse.app-meta.xml
|
|
72
|
+
[2025-02-24T21:19:23.578] [DEBUG] default - Parsing file to disassemble: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin.permissionset-meta.xml
|
|
73
|
+
[2025-02-24T21:19:23.579] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/applicationVisibilities/JobApps__Recruiting.applicationVisibilities-meta.xml
|
|
74
|
+
[2025-02-24T21:19:23.580] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/classAccesses/Send_Email_Confirmation.classAccesses-meta.xml
|
|
75
|
+
[2025-02-24T21:19:23.580] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/fieldPermissions/Job_Request__c.Salary__c.fieldPermissions-meta.xml
|
|
76
|
+
[2025-02-24T21:19:23.581] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/objectPermissions/Job_Request__c.objectPermissions-meta.xml
|
|
77
|
+
[2025-02-24T21:19:23.581] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/pageAccesses/Job_Request_Web_Form.pageAccesses-meta.xml
|
|
78
|
+
[2025-02-24T21:19:23.581] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/recordTypeVisibilities/Recruiting.DevManager.recordTypeVisibilities-meta.xml
|
|
79
|
+
[2025-02-24T21:19:23.582] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/tabSettings/Job_Request__c.tabSettings-meta.xml
|
|
80
|
+
[2025-02-24T21:19:23.582] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/userPermissions/APIEnabled.userPermissions-meta.xml
|
|
81
|
+
[2025-02-24T21:19:23.583] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/HR_Admin.permissionset-meta.xml
|
|
82
|
+
[2025-02-24T21:19:23.583] [DEBUG] default - Parsing directory to reassemble: mock/no-namespace/HR_Admin
|
|
83
|
+
[2025-02-24T21:19:23.588] [DEBUG] default - Created reassembled file: mock/no-namespace/HR_Admin.permissionset-meta.xml
|
|
84
|
+
[2025-02-24T21:19:23.590] [ERROR] default - The file path provided is not an XML file: /home/runner/work/xml-disassembler/xml-disassembler/mock/not-an-xml.txt
|
|
85
|
+
[2025-02-24T21:19:23.590] [ERROR] default - The provided path to reassemble is not a directory: mock/no-namespace/HR_Admin/HR_Admin.permissionset-meta.xml
|
|
86
|
+
[2025-02-24T21:19:23.591] [DEBUG] default - Parsing file to disassemble: mock/no-root-element/Assessment_Bot.bot-meta.xml
|
|
87
|
+
[2025-02-24T21:19:23.592] [ERROR] default - mock/no-root-element/Assessment_Bot.bot-meta.xml was unabled to be parsed and will not be processed. Confirm formatting and try again.
|
|
88
|
+
[2025-02-24T21:19:23.593] [DEBUG] default - Parsing directory to reassemble: mock/no-root-element/Assessment_Bot
|
|
89
|
+
[2025-02-24T21:19:23.593] [ERROR] default - mock/no-root-element/Assessment_Bot/Assessment_Bot.bot-meta.xml was unabled to be parsed and will not be processed. Confirm formatting and try again.
|
|
90
|
+
[2025-02-24T21:19:23.594] [ERROR] default - mock/no-root-element/Assessment_Bot/botMlDomain/419e0199.botMlDomain-meta.xml was unabled to be parsed and will not be processed. Confirm formatting and try again.
|
|
91
|
+
[2025-02-24T21:19:23.594] [ERROR] default - No files under mock/no-root-element/Assessment_Bot were parsed successfully. A reassembled XML file was not created.
|
|
92
|
+
[2025-02-24T21:19:23.595] [DEBUG] default - Parsing file to disassemble: mock/no-nested-elements/HR_Admin.xml
|
|
93
|
+
[2025-02-24T21:19:23.595] [ERROR] default - The XML file mock/no-nested-elements/HR_Admin.xml only has leaf elements. This file will not be disassembled.
|
|
94
|
+
[2025-02-24T21:19:23.596] [WARN] default - File ignored by .xmldisassemblerignore: mock/ignore/HR_Admin.permissionset-meta.xml
|
|
95
|
+
[2025-02-24T21:19:23.597] [WARN] default - File ignored by .xmldisassemblerignore: /home/runner/work/xml-disassembler/xml-disassembler/mock/ignore/HR_Admin.permissionset-meta.xml
|
package/dist/index.cjs
CHANGED
|
@@ -8,7 +8,6 @@ var node_path = require('node:path');
|
|
|
8
8
|
var ignore = require('ignore');
|
|
9
9
|
var node_crypto = require('node:crypto');
|
|
10
10
|
var fastXmlParser = require('fast-xml-parser');
|
|
11
|
-
var node_os = require('node:os');
|
|
12
11
|
|
|
13
12
|
/******************************************************************************
|
|
14
13
|
Copyright (c) Microsoft Corporation.
|
|
@@ -127,69 +126,36 @@ function processFilesForRootElement(xmlParsed) {
|
|
|
127
126
|
});
|
|
128
127
|
}
|
|
129
128
|
|
|
130
|
-
function getConcurrencyThreshold() {
|
|
131
|
-
const AVAILABLE_PARALLELISM = node_os.availableParallelism
|
|
132
|
-
? node_os.availableParallelism()
|
|
133
|
-
: Infinity;
|
|
134
|
-
return Math.min(AVAILABLE_PARALLELISM, 6);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function withConcurrencyLimit(tasks, limit) {
|
|
138
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
139
|
-
if (limit <= 0) {
|
|
140
|
-
throw new Error("Concurrency limit must be greater than 0");
|
|
141
|
-
}
|
|
142
|
-
const results = [];
|
|
143
|
-
const executing = [];
|
|
144
|
-
for (const task of tasks) {
|
|
145
|
-
const p = task().then((result) => {
|
|
146
|
-
executing.splice(executing.indexOf(p), 1);
|
|
147
|
-
return result;
|
|
148
|
-
});
|
|
149
|
-
results.push(p);
|
|
150
|
-
executing.push(p);
|
|
151
|
-
if (executing.length >= limit) {
|
|
152
|
-
yield Promise.race(executing);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
return Promise.all(results);
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
|
|
159
129
|
class ReassembleXMLFileHandler {
|
|
160
130
|
processFilesInDirectory(dirPath) {
|
|
161
131
|
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
const combinedXmlContents = [];
|
|
133
|
+
let rootResult = undefined;
|
|
162
134
|
const files = yield promises.readdir(dirPath);
|
|
163
135
|
files.sort((fileA, fileB) => {
|
|
164
136
|
const fullNameA = fileA.split(".")[0].toLowerCase();
|
|
165
137
|
const fullNameB = fileB.split(".")[0].toLowerCase();
|
|
166
138
|
return fullNameA.localeCompare(fullNameB);
|
|
167
139
|
});
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
combinedXmlContents[index] = subCombinedXmlContents.join("");
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
});
|
|
191
|
-
yield withConcurrencyLimit(tasks, concurrencyLimit);
|
|
192
|
-
return [combinedXmlContents.filter(Boolean), rootResult];
|
|
140
|
+
for (const file of files) {
|
|
141
|
+
const filePath = posix.join(dirPath, file);
|
|
142
|
+
const fileStat = yield promises.stat(filePath);
|
|
143
|
+
if (fileStat.isFile() && filePath.endsWith(".xml")) {
|
|
144
|
+
const xmlParsed = yield parseXML(filePath);
|
|
145
|
+
if (xmlParsed === undefined)
|
|
146
|
+
continue;
|
|
147
|
+
const rootResultFromFile = yield processFilesForRootElement(xmlParsed);
|
|
148
|
+
rootResult = rootResultFromFile;
|
|
149
|
+
const combinedXmlString = buildXMLString(xmlParsed);
|
|
150
|
+
combinedXmlContents.push(combinedXmlString);
|
|
151
|
+
}
|
|
152
|
+
else if (fileStat.isDirectory()) {
|
|
153
|
+
const [subCombinedXmlContents, subRootResult] = yield this.processFilesInDirectory(filePath);
|
|
154
|
+
combinedXmlContents.push(...subCombinedXmlContents);
|
|
155
|
+
rootResult = subRootResult;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return [combinedXmlContents, rootResult];
|
|
193
159
|
});
|
|
194
160
|
}
|
|
195
161
|
reassemble(xmlAttributes) {
|
|
@@ -310,49 +276,44 @@ function buildDisassembledFiles(filePath, disassembledPath, uniqueIdElements, ba
|
|
|
310
276
|
let leafContent = "";
|
|
311
277
|
let leafCount = 0;
|
|
312
278
|
let hasNestedElements = false;
|
|
313
|
-
const
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
return () => __awaiter(this, void 0, void 0, function* () {
|
|
317
|
-
if (Array.isArray(rootElement[key])) {
|
|
318
|
-
yield Promise.all(rootElement[key].map((element) => __awaiter(this, void 0, void 0, function* () {
|
|
319
|
-
const [updatedLeafContent, updatedLeafCount, updatedHasNestedElements,] = yield processElement({
|
|
320
|
-
element,
|
|
321
|
-
disassembledPath,
|
|
322
|
-
uniqueIdElements,
|
|
323
|
-
rootElementName,
|
|
324
|
-
rootElementHeader,
|
|
325
|
-
key,
|
|
326
|
-
indent,
|
|
327
|
-
leafContent: "",
|
|
328
|
-
leafCount: 0,
|
|
329
|
-
hasNestedElements: false,
|
|
330
|
-
});
|
|
331
|
-
leafContent += updatedLeafContent;
|
|
332
|
-
leafCount += updatedLeafCount;
|
|
333
|
-
hasNestedElements = hasNestedElements || updatedHasNestedElements;
|
|
334
|
-
})));
|
|
335
|
-
}
|
|
336
|
-
else {
|
|
279
|
+
for (const key of Object.keys(rootElement).filter((key) => !key.startsWith("@"))) {
|
|
280
|
+
if (Array.isArray(rootElement[key])) {
|
|
281
|
+
for (const element of rootElement[key]) {
|
|
337
282
|
const [updatedLeafContent, updatedLeafCount, updatedHasNestedElements] = yield processElement({
|
|
338
|
-
element
|
|
283
|
+
element,
|
|
339
284
|
disassembledPath,
|
|
340
285
|
uniqueIdElements,
|
|
341
286
|
rootElementName,
|
|
342
287
|
rootElementHeader,
|
|
343
288
|
key,
|
|
344
289
|
indent,
|
|
345
|
-
leafContent
|
|
346
|
-
leafCount
|
|
347
|
-
hasNestedElements
|
|
290
|
+
leafContent,
|
|
291
|
+
leafCount,
|
|
292
|
+
hasNestedElements,
|
|
348
293
|
});
|
|
349
|
-
leafContent
|
|
350
|
-
leafCount
|
|
351
|
-
hasNestedElements =
|
|
294
|
+
leafContent = updatedLeafContent;
|
|
295
|
+
leafCount = updatedLeafCount;
|
|
296
|
+
hasNestedElements = updatedHasNestedElements;
|
|
352
297
|
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
const [updatedLeafContent, updatedLeafCount, updatedHasNestedElements] = yield processElement({
|
|
301
|
+
element: rootElement[key],
|
|
302
|
+
disassembledPath,
|
|
303
|
+
uniqueIdElements,
|
|
304
|
+
rootElementName,
|
|
305
|
+
rootElementHeader,
|
|
306
|
+
key,
|
|
307
|
+
indent,
|
|
308
|
+
leafContent,
|
|
309
|
+
leafCount,
|
|
310
|
+
hasNestedElements,
|
|
311
|
+
});
|
|
312
|
+
leafContent = updatedLeafContent;
|
|
313
|
+
leafCount = updatedLeafCount;
|
|
314
|
+
hasNestedElements = updatedHasNestedElements;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
356
317
|
if (!hasNestedElements) {
|
|
357
318
|
logger.error(`The XML file ${filePath} only has leaf elements. This file will not be disassembled.`);
|
|
358
319
|
return;
|
|
@@ -361,7 +322,7 @@ function buildDisassembledFiles(filePath, disassembledPath, uniqueIdElements, ba
|
|
|
361
322
|
yield buildLeafFile(leafContent, disassembledPath, baseName, rootElementName, rootElementHeader);
|
|
362
323
|
}
|
|
363
324
|
if (postPurge) {
|
|
364
|
-
|
|
325
|
+
promises.unlink(filePath);
|
|
365
326
|
}
|
|
366
327
|
});
|
|
367
328
|
}
|
|
@@ -401,27 +362,23 @@ class DisassembleXMLFileHandler {
|
|
|
401
362
|
}
|
|
402
363
|
else if (fileStat.isDirectory()) {
|
|
403
364
|
const subFiles = yield promises.readdir(filePath);
|
|
404
|
-
const
|
|
405
|
-
const tasks = subFiles.map((subFile) => {
|
|
365
|
+
for (const subFile of subFiles) {
|
|
406
366
|
const subFilePath = node_path.join(filePath, subFile);
|
|
407
367
|
const relativeSubFilePath = this.posixPath(node_path.relative(process.cwd(), subFilePath));
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
});
|
|
423
|
-
});
|
|
424
|
-
yield withConcurrencyLimit(tasks, concurrencyLimit);
|
|
368
|
+
if (subFilePath.endsWith(".xml") &&
|
|
369
|
+
!this.ign.ignores(relativeSubFilePath)) {
|
|
370
|
+
yield this.processFile({
|
|
371
|
+
dirPath: filePath,
|
|
372
|
+
filePath: subFilePath,
|
|
373
|
+
uniqueIdElements,
|
|
374
|
+
prePurge,
|
|
375
|
+
postPurge,
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
else if (this.ign.ignores(relativeSubFilePath)) {
|
|
379
|
+
logger.warn(`File ignored by ${ignorePath}: ${subFilePath}`);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
425
382
|
}
|
|
426
383
|
});
|
|
427
384
|
}
|
|
@@ -431,10 +388,10 @@ class DisassembleXMLFileHandler {
|
|
|
431
388
|
logger.debug(`Parsing file to disassemble: ${filePath}`);
|
|
432
389
|
const fullName = node_path.basename(filePath, node_path.extname(filePath));
|
|
433
390
|
const baseName = fullName.split(".")[0];
|
|
434
|
-
let outputPath
|
|
435
|
-
|
|
391
|
+
let outputPath;
|
|
392
|
+
outputPath = node_path.join(dirPath, baseName);
|
|
393
|
+
if (prePurge && node_fs.existsSync(outputPath))
|
|
436
394
|
yield promises.rm(outputPath, { recursive: true });
|
|
437
|
-
}
|
|
438
395
|
yield buildDisassembledFiles(filePath, outputPath, uniqueIdElements, fullName, INDENT, postPurge);
|
|
439
396
|
});
|
|
440
397
|
}
|
|
@@ -455,9 +412,7 @@ log4js.configure({
|
|
|
455
412
|
exports.DisassembleXMLFileHandler = DisassembleXMLFileHandler;
|
|
456
413
|
exports.ReassembleXMLFileHandler = ReassembleXMLFileHandler;
|
|
457
414
|
exports.buildXMLString = buildXMLString;
|
|
458
|
-
exports.getConcurrencyThreshold = getConcurrencyThreshold;
|
|
459
415
|
exports.logger = logger;
|
|
460
416
|
exports.parseXML = parseXML;
|
|
461
417
|
exports.setLogLevel = setLogLevel;
|
|
462
|
-
exports.withConcurrencyLimit = withConcurrencyLimit;
|
|
463
418
|
//# sourceMappingURL=index.cjs.map
|