xml-disassembler 1.3.8 → 1.3.9
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 +7 -0
- package/README.md +0 -2
- package/disassemble.log +95 -95
- package/dist/index.cjs +86 -28
- 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 +88 -30
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +89 -32
- package/dist/index.umd.js.map +1 -1
- package/dist/typings/service/disassembleXMLFileHandler.d.ts +1 -1
- package/dist/typings/service/getConcurrencyThreshold.d.ts +1 -0
- package/package.json +1 -1
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
|
+
## [1.3.9](https://github.com/mcarvin8/xml-disassembler/compare/v1.3.8...v1.3.9) (2025-01-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add parallel processing to handlers ([75ff605](https://github.com/mcarvin8/xml-disassembler/commit/75ff60586265f851d7ee3cd692f78ebe5e45ac77))
|
|
14
|
+
|
|
8
15
|
## [1.3.8](https://github.com/mcarvin8/xml-disassembler/compare/v1.3.7...v1.3.8) (2025-01-10)
|
|
9
16
|
|
|
10
17
|
|
package/README.md
CHANGED
|
@@ -189,8 +189,6 @@ The XML parser, which uses the `fast-xml-parser` package, is configured to retai
|
|
|
189
189
|
|
|
190
190
|
By default, the package will not print any debugging statements to the console. Any error or debugging statements will be added to a log file, `disassemble.log`, created in the same directory you are running this package in. This file will be created when running the package in all cases, even if there are no errors.
|
|
191
191
|
|
|
192
|
-
**NOTE**: The logging package used, `log4js`, requires `fs-extra` to be installed in your project as a dependency (`npm install --save fs-extra`).
|
|
193
|
-
|
|
194
192
|
The logger's default state is to only log errors to `disassemble.log`. Check this file for ERROR statements that will look like:
|
|
195
193
|
|
|
196
194
|
```
|
package/disassemble.log
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
[2025-01-
|
|
2
|
-
[2025-01-
|
|
3
|
-
[2025-01-
|
|
4
|
-
[2025-01-
|
|
5
|
-
[2025-01-
|
|
6
|
-
[2025-01-
|
|
7
|
-
[2025-01-
|
|
8
|
-
[2025-01-
|
|
9
|
-
[2025-01-
|
|
10
|
-
[2025-01-
|
|
11
|
-
[2025-01-
|
|
12
|
-
[2025-01-
|
|
13
|
-
[2025-01-
|
|
14
|
-
[2025-01-
|
|
15
|
-
[2025-01-
|
|
16
|
-
[2025-01-
|
|
17
|
-
[2025-01-
|
|
18
|
-
[2025-01-
|
|
19
|
-
[2025-01-
|
|
20
|
-
[2025-01-
|
|
21
|
-
[2025-01-
|
|
22
|
-
[2025-01-
|
|
23
|
-
[2025-01-
|
|
24
|
-
[2025-01-
|
|
25
|
-
[2025-01-
|
|
26
|
-
[2025-01-
|
|
27
|
-
[2025-01-
|
|
28
|
-
[2025-01-
|
|
29
|
-
[2025-01-
|
|
30
|
-
[2025-01-
|
|
31
|
-
[2025-01-
|
|
32
|
-
[2025-01-
|
|
33
|
-
[2025-01-
|
|
34
|
-
[2025-01-
|
|
35
|
-
[2025-01-
|
|
36
|
-
[2025-01-
|
|
37
|
-
[2025-01-
|
|
38
|
-
[2025-01-
|
|
39
|
-
[2025-01-
|
|
40
|
-
[2025-01-
|
|
41
|
-
[2025-01-
|
|
42
|
-
[2025-01-
|
|
43
|
-
[2025-01-
|
|
44
|
-
[2025-01-
|
|
45
|
-
[2025-01-
|
|
46
|
-
[2025-01-
|
|
47
|
-
[2025-01-
|
|
48
|
-
[2025-01-
|
|
49
|
-
[2025-01-
|
|
50
|
-
[2025-01-
|
|
51
|
-
[2025-01-
|
|
52
|
-
[2025-01-
|
|
53
|
-
[2025-01-
|
|
54
|
-
[2025-01-
|
|
55
|
-
[2025-01-
|
|
56
|
-
[2025-01-
|
|
57
|
-
[2025-01-
|
|
58
|
-
[2025-01-
|
|
59
|
-
[2025-01-
|
|
60
|
-
[2025-01-
|
|
61
|
-
[2025-01-
|
|
62
|
-
[2025-01-
|
|
63
|
-
[2025-01-
|
|
64
|
-
[2025-01-
|
|
65
|
-
[2025-01-
|
|
66
|
-
[2025-01-
|
|
67
|
-
[2025-01-
|
|
68
|
-
[2025-01-
|
|
69
|
-
[2025-01-
|
|
70
|
-
[2025-01-
|
|
71
|
-
[2025-01-
|
|
72
|
-
[2025-01-
|
|
73
|
-
[2025-01-
|
|
74
|
-
[2025-01-
|
|
75
|
-
[2025-01-
|
|
76
|
-
[2025-01-
|
|
77
|
-
[2025-01-
|
|
78
|
-
[2025-01-
|
|
79
|
-
[2025-01-
|
|
80
|
-
[2025-01-
|
|
81
|
-
[2025-01-
|
|
82
|
-
[2025-01-
|
|
83
|
-
[2025-01-
|
|
84
|
-
[2025-01-
|
|
85
|
-
[2025-01-
|
|
86
|
-
[2025-01-
|
|
87
|
-
[2025-01-
|
|
88
|
-
[2025-01-
|
|
89
|
-
[2025-01-
|
|
90
|
-
[2025-01-
|
|
91
|
-
[2025-01-
|
|
92
|
-
[2025-01-
|
|
93
|
-
[2025-01-
|
|
94
|
-
[2025-01-
|
|
95
|
-
[2025-01-
|
|
1
|
+
[2025-01-21T16:47:02.878] [DEBUG] default - Parsing file to disassemble: mock/general/HR_Admin.permissionset-meta.xml
|
|
2
|
+
[2025-01-21T16:47:02.897] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/classAccesses/Send_Email_Confirmation.classAccesses-meta.xml
|
|
3
|
+
[2025-01-21T16:47:02.898] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/fieldPermissions/Job_Request__c.Salary__c.fieldPermissions-meta.xml
|
|
4
|
+
[2025-01-21T16:47:02.899] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/objectPermissions/Job_Request__c.objectPermissions-meta.xml
|
|
5
|
+
[2025-01-21T16:47:02.900] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/applicationVisibilities/JobApps__Recruiting.applicationVisibilities-meta.xml
|
|
6
|
+
[2025-01-21T16:47:02.901] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/pageAccesses/Job_Request_Web_Form.pageAccesses-meta.xml
|
|
7
|
+
[2025-01-21T16:47:02.901] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/recordTypeVisibilities/Recruiting.DevManager.recordTypeVisibilities-meta.xml
|
|
8
|
+
[2025-01-21T16:47:02.902] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/tabSettings/Job_Request__c.tabSettings-meta.xml
|
|
9
|
+
[2025-01-21T16:47:02.903] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/userPermissions/APIEnabled.userPermissions-meta.xml
|
|
10
|
+
[2025-01-21T16:47:02.904] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/HR_Admin.permissionset-meta.xml
|
|
11
|
+
[2025-01-21T16:47:02.906] [DEBUG] default - Parsing directory to reassemble: mock/general/HR_Admin
|
|
12
|
+
[2025-01-21T16:47:02.921] [DEBUG] default - Created reassembled file: mock/general/HR_Admin.permissionset-meta.xml
|
|
13
|
+
[2025-01-21T16:47:02.922] [DEBUG] default - Parsing file to disassemble: mock/attributes/notes.xml
|
|
14
|
+
[2025-01-21T16:47:02.924] [DEBUG] default - Created disassembled file: mock/attributes/notes/nest/103c6c8b.nest-meta.xml
|
|
15
|
+
[2025-01-21T16:47:02.924] [DEBUG] default - Created disassembled file: mock/attributes/notes/nest/f876f2be.nest-meta.xml
|
|
16
|
+
[2025-01-21T16:47:02.925] [DEBUG] default - Parsing directory to reassemble: mock/attributes/notes
|
|
17
|
+
[2025-01-21T16:47:02.927] [DEBUG] default - Created reassembled file: mock/attributes/notes.xml
|
|
18
|
+
[2025-01-21T16:47:02.928] [DEBUG] default - Parsing file to disassemble: mock/cdata/VidLand_US.marketingappextension-meta.xml
|
|
19
|
+
[2025-01-21T16:47:02.929] [DEBUG] default - Created disassembled file: mock/cdata/VidLand_US/marketingAppExtActions/register_user.marketingAppExtActions-meta.xml
|
|
20
|
+
[2025-01-21T16:47:02.930] [DEBUG] default - Created disassembled file: mock/cdata/VidLand_US/VidLand_US.marketingappextension-meta.xml
|
|
21
|
+
[2025-01-21T16:47:02.931] [DEBUG] default - Parsing directory to reassemble: mock/cdata/VidLand_US
|
|
22
|
+
[2025-01-21T16:47:02.933] [DEBUG] default - Created reassembled file: mock/cdata/VidLand_US.xml
|
|
23
|
+
[2025-01-21T16:47:02.934] [DEBUG] default - Parsing file to disassemble: mock/comments/Numbers-fr.globalValueSetTranslation-meta.xml
|
|
24
|
+
[2025-01-21T16:47:02.935] [DEBUG] default - Created disassembled file: mock/comments/Numbers-fr/valueTranslation/d7dd1420.valueTranslation-meta.xml
|
|
25
|
+
[2025-01-21T16:47:02.936] [DEBUG] default - Created disassembled file: mock/comments/Numbers-fr/valueTranslation/30e8b6d2.valueTranslation-meta.xml
|
|
26
|
+
[2025-01-21T16:47:02.936] [DEBUG] default - Created disassembled file: mock/comments/Numbers-fr/valueTranslation/d8852ede.valueTranslation-meta.xml
|
|
27
|
+
[2025-01-21T16:47:02.937] [DEBUG] default - Parsing directory to reassemble: mock/comments/Numbers-fr
|
|
28
|
+
[2025-01-21T16:47:02.938] [DEBUG] default - Created reassembled file: mock/comments/Numbers-fr.globalValueSetTranslation-meta.xml
|
|
29
|
+
[2025-01-21T16:47:02.939] [DEBUG] default - Parsing file to disassemble: mock/deeply-nested-unique-id-element/Get_Info.flow-meta.xml
|
|
30
|
+
[2025-01-21T16:47:02.945] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/actionCalls/Get_Info.actionCalls-meta.xml
|
|
31
|
+
[2025-01-21T16:47:02.946] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/decisions/Update_If_Existing.decisions-meta.xml
|
|
32
|
+
[2025-01-21T16:47:02.946] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/dynamicChoiceSets/accounts.dynamicChoiceSets-meta.xml
|
|
33
|
+
[2025-01-21T16:47:02.946] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/assignments/Set_Contact_ID.assignments-meta.xml
|
|
34
|
+
[2025-01-21T16:47:02.946] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/actionCalls/Post_to_Contact_s_Feed.actionCalls-meta.xml
|
|
35
|
+
[2025-01-21T16:47:02.947] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/decisions/Update_or_Create.decisions-meta.xml
|
|
36
|
+
[2025-01-21T16:47:02.948] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/formulas/created_or_updated.formulas-meta.xml
|
|
37
|
+
[2025-01-21T16:47:02.948] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/processMetadataValues/BuilderType.processMetadataValues-meta.xml
|
|
38
|
+
[2025-01-21T16:47:02.948] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/recordCreates/Create_Contact.recordCreates-meta.xml
|
|
39
|
+
[2025-01-21T16:47:02.948] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/recordLookups/Find_a_Match.recordLookups-meta.xml
|
|
40
|
+
[2025-01-21T16:47:02.948] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/processMetadataValues/CanvasMode.processMetadataValues-meta.xml
|
|
41
|
+
[2025-01-21T16:47:02.948] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/processMetadataValues/OriginBuilderType.processMetadataValues-meta.xml
|
|
42
|
+
[2025-01-21T16:47:02.949] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/recordUpdates/Update_Contact.recordUpdates-meta.xml
|
|
43
|
+
[2025-01-21T16:47:02.949] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/screens/Confirm.screens-meta.xml
|
|
44
|
+
[2025-01-21T16:47:02.950] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/textTemplates/chatterMessage.textTemplates-meta.xml
|
|
45
|
+
[2025-01-21T16:47:02.950] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/screens/Contact_Info.screens-meta.xml
|
|
46
|
+
[2025-01-21T16:47:02.950] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/start/Contact_Info.start-meta.xml
|
|
47
|
+
[2025-01-21T16:47:02.950] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/variables/ComplexObjectExample.variables-meta.xml
|
|
48
|
+
[2025-01-21T16:47:02.950] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/variables/contact.variables-meta.xml
|
|
49
|
+
[2025-01-21T16:47:02.950] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/variables/updateExisting.variables-meta.xml
|
|
50
|
+
[2025-01-21T16:47:02.950] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/variables/existingId.variables-meta.xml
|
|
51
|
+
[2025-01-21T16:47:02.951] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/Get_Info.flow-meta.xml
|
|
52
|
+
[2025-01-21T16:47:02.952] [DEBUG] default - Parsing directory to reassemble: mock/deeply-nested-unique-id-element/Get_Info
|
|
53
|
+
[2025-01-21T16:47:02.968] [DEBUG] default - Created reassembled file: mock/deeply-nested-unique-id-element/Get_Info.flow-meta.xml
|
|
54
|
+
[2025-01-21T16:47:02.970] [DEBUG] default - Parsing file to disassemble: mock/array-of-leafs/Dreamhouse.app-meta.xml
|
|
55
|
+
[2025-01-21T16:47:02.973] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/39049d21.actionOverrides-meta.xml
|
|
56
|
+
[2025-01-21T16:47:02.973] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/brand/c9db422b.brand-meta.xml
|
|
57
|
+
[2025-01-21T16:47:02.973] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/735c1659.actionOverrides-meta.xml
|
|
58
|
+
[2025-01-21T16:47:02.973] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/b04e9f9b.actionOverrides-meta.xml
|
|
59
|
+
[2025-01-21T16:47:02.973] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/c8cc7a99.actionOverrides-meta.xml
|
|
60
|
+
[2025-01-21T16:47:02.974] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/Dreamhouse.app-meta.xml
|
|
61
|
+
[2025-01-21T16:47:02.975] [DEBUG] default - Parsing directory to reassemble: mock/array-of-leafs/Dreamhouse
|
|
62
|
+
[2025-01-21T16:47:02.979] [DEBUG] default - Created reassembled file: mock/array-of-leafs/Dreamhouse.app-meta.xml
|
|
63
|
+
[2025-01-21T16:47:02.980] [DEBUG] default - Parsing file to disassemble: mock/array-of-leafs/Dreamhouse.app-meta.xml
|
|
64
|
+
[2025-01-21T16:47:02.985] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/39049d21.actionOverrides-meta.xml
|
|
65
|
+
[2025-01-21T16:47:02.985] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/brand/c9db422b.brand-meta.xml
|
|
66
|
+
[2025-01-21T16:47:02.985] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/735c1659.actionOverrides-meta.xml
|
|
67
|
+
[2025-01-21T16:47:02.985] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/b04e9f9b.actionOverrides-meta.xml
|
|
68
|
+
[2025-01-21T16:47:02.985] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/c8cc7a99.actionOverrides-meta.xml
|
|
69
|
+
[2025-01-21T16:47:02.985] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/Dreamhouse.app-meta.xml
|
|
70
|
+
[2025-01-21T16:47:02.986] [DEBUG] default - Parsing directory to reassemble: mock/array-of-leafs/Dreamhouse
|
|
71
|
+
[2025-01-21T16:47:02.988] [DEBUG] default - Created reassembled file: mock/array-of-leafs/Dreamhouse.app-meta.xml
|
|
72
|
+
[2025-01-21T16:47:02.990] [DEBUG] default - Parsing file to disassemble: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin.permissionset-meta.xml
|
|
73
|
+
[2025-01-21T16:47:02.991] [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-01-21T16:47:02.992] [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-01-21T16:47:02.992] [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-01-21T16:47:02.992] [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-01-21T16:47:02.992] [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-01-21T16:47:02.992] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/tabSettings/Job_Request__c.tabSettings-meta.xml
|
|
79
|
+
[2025-01-21T16:47:02.992] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/recordTypeVisibilities/Recruiting.DevManager.recordTypeVisibilities-meta.xml
|
|
80
|
+
[2025-01-21T16:47:02.993] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/userPermissions/APIEnabled.userPermissions-meta.xml
|
|
81
|
+
[2025-01-21T16:47:02.993] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/HR_Admin.permissionset-meta.xml
|
|
82
|
+
[2025-01-21T16:47:02.994] [DEBUG] default - Parsing directory to reassemble: mock/no-namespace/HR_Admin
|
|
83
|
+
[2025-01-21T16:47:02.997] [DEBUG] default - Created reassembled file: mock/no-namespace/HR_Admin.permissionset-meta.xml
|
|
84
|
+
[2025-01-21T16:47:02.998] [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-01-21T16:47:02.999] [ERROR] default - The provided path to reassemble is not a directory: mock/no-namespace/HR_Admin/HR_Admin.permissionset-meta.xml
|
|
86
|
+
[2025-01-21T16:47:03.000] [DEBUG] default - Parsing file to disassemble: mock/no-root-element/Assessment_Bot.bot-meta.xml
|
|
87
|
+
[2025-01-21T16:47:03.000] [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-01-21T16:47:03.001] [DEBUG] default - Parsing directory to reassemble: mock/no-root-element/Assessment_Bot
|
|
89
|
+
[2025-01-21T16:47:03.001] [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-01-21T16:47:03.002] [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-01-21T16:47:03.002] [ERROR] default - No files under mock/no-root-element/Assessment_Bot were parsed successfully. A reassembled XML file was not created.
|
|
92
|
+
[2025-01-21T16:47:03.003] [DEBUG] default - Parsing file to disassemble: mock/no-nested-elements/HR_Admin.xml
|
|
93
|
+
[2025-01-21T16:47:03.003] [ERROR] default - The XML file mock/no-nested-elements/HR_Admin.xml only has leaf elements. This file will not be disassembled.
|
|
94
|
+
[2025-01-21T16:47:03.004] [WARN] default - File ignored by .xmldisassemblerignore: mock/ignore/HR_Admin.permissionset-meta.xml
|
|
95
|
+
[2025-01-21T16:47:03.006] [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,6 +8,7 @@ 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');
|
|
11
12
|
|
|
12
13
|
/******************************************************************************
|
|
13
14
|
Copyright (c) Microsoft Corporation.
|
|
@@ -126,36 +127,60 @@ function processFilesForRootElement(xmlParsed) {
|
|
|
126
127
|
});
|
|
127
128
|
}
|
|
128
129
|
|
|
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
|
+
|
|
129
137
|
class ReassembleXMLFileHandler {
|
|
130
138
|
processFilesInDirectory(dirPath) {
|
|
131
139
|
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
-
const combinedXmlContents = [];
|
|
133
|
-
let rootResult = undefined;
|
|
134
140
|
const files = yield promises.readdir(dirPath);
|
|
135
141
|
files.sort((fileA, fileB) => {
|
|
136
142
|
const fullNameA = fileA.split(".")[0].toLowerCase();
|
|
137
143
|
const fullNameB = fileB.split(".")[0].toLowerCase();
|
|
138
144
|
return fullNameA.localeCompare(fullNameB);
|
|
139
145
|
});
|
|
140
|
-
|
|
146
|
+
const combinedXmlContents = [];
|
|
147
|
+
let rootResult = undefined;
|
|
148
|
+
const concurrencyLimit = getConcurrencyThreshold();
|
|
149
|
+
const activePromises = [];
|
|
150
|
+
let currentIndex = 0;
|
|
151
|
+
const processFile = (file, index) => __awaiter(this, void 0, void 0, function* () {
|
|
141
152
|
const filePath = posix.join(dirPath, file);
|
|
142
153
|
const fileStat = yield promises.stat(filePath);
|
|
143
154
|
if (fileStat.isFile() && filePath.endsWith(".xml")) {
|
|
144
155
|
const xmlParsed = yield parseXML(filePath);
|
|
145
156
|
if (xmlParsed === undefined)
|
|
146
|
-
|
|
157
|
+
return;
|
|
147
158
|
const rootResultFromFile = yield processFilesForRootElement(xmlParsed);
|
|
148
159
|
rootResult = rootResultFromFile;
|
|
149
160
|
const combinedXmlString = buildXMLString(xmlParsed);
|
|
150
|
-
combinedXmlContents
|
|
161
|
+
combinedXmlContents[index] = combinedXmlString;
|
|
151
162
|
}
|
|
152
163
|
else if (fileStat.isDirectory()) {
|
|
153
164
|
const [subCombinedXmlContents, subRootResult] = yield this.processFilesInDirectory(filePath);
|
|
154
|
-
combinedXmlContents.push(...subCombinedXmlContents);
|
|
155
165
|
rootResult = subRootResult;
|
|
166
|
+
combinedXmlContents[index] = subCombinedXmlContents.join("");
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
while (currentIndex < files.length || activePromises.length > 0) {
|
|
170
|
+
if (currentIndex < files.length &&
|
|
171
|
+
activePromises.length < concurrencyLimit) {
|
|
172
|
+
const index = currentIndex++;
|
|
173
|
+
const file = files[index];
|
|
174
|
+
const promise = processFile(file, index).finally(() => {
|
|
175
|
+
activePromises.splice(activePromises.indexOf(promise), 1);
|
|
176
|
+
});
|
|
177
|
+
activePromises.push(promise);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
yield Promise.race(activePromises);
|
|
156
181
|
}
|
|
157
182
|
}
|
|
158
|
-
return [combinedXmlContents, rootResult];
|
|
183
|
+
return [combinedXmlContents.filter(Boolean), rootResult];
|
|
159
184
|
});
|
|
160
185
|
}
|
|
161
186
|
reassemble(xmlAttributes) {
|
|
@@ -276,10 +301,14 @@ function buildDisassembledFiles(filePath, disassembledPath, uniqueIdElements, ba
|
|
|
276
301
|
let leafContent = "";
|
|
277
302
|
let leafCount = 0;
|
|
278
303
|
let hasNestedElements = false;
|
|
279
|
-
|
|
304
|
+
const childKeys = Object.keys(rootElement).filter((key) => !key.startsWith("@"));
|
|
305
|
+
const concurrencyLimit = getConcurrencyThreshold();
|
|
306
|
+
const activePromises = [];
|
|
307
|
+
let currentIndex = 0;
|
|
308
|
+
const processChildKey = (key) => __awaiter(this, void 0, void 0, function* () {
|
|
280
309
|
if (Array.isArray(rootElement[key])) {
|
|
281
|
-
|
|
282
|
-
const [updatedLeafContent, updatedLeafCount, updatedHasNestedElements] = yield processElement({
|
|
310
|
+
yield Promise.all(rootElement[key].map((element) => __awaiter(this, void 0, void 0, function* () {
|
|
311
|
+
const [updatedLeafContent, updatedLeafCount, updatedHasNestedElements,] = yield processElement({
|
|
283
312
|
element,
|
|
284
313
|
disassembledPath,
|
|
285
314
|
uniqueIdElements,
|
|
@@ -287,14 +316,14 @@ function buildDisassembledFiles(filePath, disassembledPath, uniqueIdElements, ba
|
|
|
287
316
|
rootElementHeader,
|
|
288
317
|
key,
|
|
289
318
|
indent,
|
|
290
|
-
leafContent,
|
|
291
|
-
leafCount,
|
|
292
|
-
hasNestedElements,
|
|
319
|
+
leafContent: "",
|
|
320
|
+
leafCount: 0,
|
|
321
|
+
hasNestedElements: false,
|
|
293
322
|
});
|
|
294
|
-
leafContent
|
|
295
|
-
leafCount
|
|
296
|
-
hasNestedElements = updatedHasNestedElements;
|
|
297
|
-
}
|
|
323
|
+
leafContent += updatedLeafContent;
|
|
324
|
+
leafCount += updatedLeafCount;
|
|
325
|
+
hasNestedElements = hasNestedElements || updatedHasNestedElements;
|
|
326
|
+
})));
|
|
298
327
|
}
|
|
299
328
|
else {
|
|
300
329
|
const [updatedLeafContent, updatedLeafCount, updatedHasNestedElements] = yield processElement({
|
|
@@ -305,13 +334,26 @@ function buildDisassembledFiles(filePath, disassembledPath, uniqueIdElements, ba
|
|
|
305
334
|
rootElementHeader,
|
|
306
335
|
key,
|
|
307
336
|
indent,
|
|
308
|
-
leafContent,
|
|
309
|
-
leafCount,
|
|
310
|
-
hasNestedElements,
|
|
337
|
+
leafContent: "",
|
|
338
|
+
leafCount: 0,
|
|
339
|
+
hasNestedElements: false,
|
|
311
340
|
});
|
|
312
|
-
leafContent
|
|
313
|
-
leafCount
|
|
314
|
-
hasNestedElements = updatedHasNestedElements;
|
|
341
|
+
leafContent += updatedLeafContent;
|
|
342
|
+
leafCount += updatedLeafCount;
|
|
343
|
+
hasNestedElements = hasNestedElements || updatedHasNestedElements;
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
while (currentIndex < childKeys.length || activePromises.length > 0) {
|
|
347
|
+
if (currentIndex < childKeys.length &&
|
|
348
|
+
activePromises.length < concurrencyLimit) {
|
|
349
|
+
const key = childKeys[currentIndex++];
|
|
350
|
+
const promise = processChildKey(key).finally(() => {
|
|
351
|
+
activePromises.splice(activePromises.indexOf(promise), 1);
|
|
352
|
+
});
|
|
353
|
+
activePromises.push(promise);
|
|
354
|
+
}
|
|
355
|
+
else {
|
|
356
|
+
yield Promise.race(activePromises);
|
|
315
357
|
}
|
|
316
358
|
}
|
|
317
359
|
if (!hasNestedElements) {
|
|
@@ -322,7 +364,7 @@ function buildDisassembledFiles(filePath, disassembledPath, uniqueIdElements, ba
|
|
|
322
364
|
yield buildLeafFile(leafContent, disassembledPath, baseName, rootElementName, rootElementHeader);
|
|
323
365
|
}
|
|
324
366
|
if (postPurge) {
|
|
325
|
-
promises.unlink(filePath);
|
|
367
|
+
yield promises.unlink(filePath);
|
|
326
368
|
}
|
|
327
369
|
});
|
|
328
370
|
}
|
|
@@ -362,7 +404,10 @@ class DisassembleXMLFileHandler {
|
|
|
362
404
|
}
|
|
363
405
|
else if (fileStat.isDirectory()) {
|
|
364
406
|
const subFiles = yield promises.readdir(filePath);
|
|
365
|
-
|
|
407
|
+
const concurrencyLimit = getConcurrencyThreshold();
|
|
408
|
+
const activePromises = [];
|
|
409
|
+
let currentIndex = 0;
|
|
410
|
+
const processSubFile = (subFile) => __awaiter(this, void 0, void 0, function* () {
|
|
366
411
|
const subFilePath = node_path.join(filePath, subFile);
|
|
367
412
|
const relativeSubFilePath = this.posixPath(node_path.relative(process.cwd(), subFilePath));
|
|
368
413
|
if (subFilePath.endsWith(".xml") &&
|
|
@@ -378,6 +423,19 @@ class DisassembleXMLFileHandler {
|
|
|
378
423
|
else if (this.ign.ignores(relativeSubFilePath)) {
|
|
379
424
|
logger.warn(`File ignored by ${ignorePath}: ${subFilePath}`);
|
|
380
425
|
}
|
|
426
|
+
});
|
|
427
|
+
while (currentIndex < subFiles.length || activePromises.length > 0) {
|
|
428
|
+
if (currentIndex < subFiles.length &&
|
|
429
|
+
activePromises.length < concurrencyLimit) {
|
|
430
|
+
const subFile = subFiles[currentIndex++];
|
|
431
|
+
const promise = processSubFile(subFile).finally(() => {
|
|
432
|
+
activePromises.splice(activePromises.indexOf(promise), 1);
|
|
433
|
+
});
|
|
434
|
+
activePromises.push(promise);
|
|
435
|
+
}
|
|
436
|
+
else {
|
|
437
|
+
yield Promise.race(activePromises);
|
|
438
|
+
}
|
|
381
439
|
}
|
|
382
440
|
}
|
|
383
441
|
});
|
|
@@ -388,10 +446,10 @@ class DisassembleXMLFileHandler {
|
|
|
388
446
|
logger.debug(`Parsing file to disassemble: ${filePath}`);
|
|
389
447
|
const fullName = node_path.basename(filePath, node_path.extname(filePath));
|
|
390
448
|
const baseName = fullName.split(".")[0];
|
|
391
|
-
let outputPath;
|
|
392
|
-
|
|
393
|
-
if (prePurge && node_fs.existsSync(outputPath))
|
|
449
|
+
let outputPath = node_path.join(dirPath, baseName);
|
|
450
|
+
if (prePurge && node_fs.existsSync(outputPath)) {
|
|
394
451
|
yield promises.rm(outputPath, { recursive: true });
|
|
452
|
+
}
|
|
395
453
|
yield buildDisassembledFiles(filePath, outputPath, uniqueIdElements, fullName, INDENT, postPurge);
|
|
396
454
|
});
|
|
397
455
|
}
|