xml-disassembler 1.3.8 → 1.3.10
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 +15 -0
- package/README.md +0 -2
- package/disassemble.log +95 -95
- package/dist/index.cjs +114 -69
- 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 +113 -70
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +117 -73
- package/dist/index.umd.js.map +1 -1
- package/dist/typings/index.d.ts +2 -0
- package/dist/typings/service/disassembleXMLFileHandler.d.ts +1 -1
- package/dist/typings/service/getConcurrencyThreshold.d.ts +1 -0
- package/dist/typings/service/withConcurrencyLimit.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@
|
|
|
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.10](https://github.com/mcarvin8/xml-disassembler/compare/v1.3.9...v1.3.10) (2025-01-21)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* export get concurrency threshold ([1cb7cae](https://github.com/mcarvin8/xml-disassembler/commit/1cb7cae42db6d7cf6b4cd0169745805808e20658))
|
|
14
|
+
* use concurrency limit function ([a8e53b8](https://github.com/mcarvin8/xml-disassembler/commit/a8e53b88b503a61c7b284f56f87521949aa3d687))
|
|
15
|
+
|
|
16
|
+
## [1.3.9](https://github.com/mcarvin8/xml-disassembler/compare/v1.3.8...v1.3.9) (2025-01-21)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* add parallel processing to handlers ([75ff605](https://github.com/mcarvin8/xml-disassembler/commit/75ff60586265f851d7ee3cd692f78ebe5e45ac77))
|
|
22
|
+
|
|
8
23
|
## [1.3.8](https://github.com/mcarvin8/xml-disassembler/compare/v1.3.7...v1.3.8) (2025-01-10)
|
|
9
24
|
|
|
10
25
|
|
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-21T18:01:32.572] [DEBUG] default - Parsing file to disassemble: mock/general/HR_Admin.permissionset-meta.xml
|
|
2
|
+
[2025-01-21T18:01:32.588] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/applicationVisibilities/JobApps__Recruiting.applicationVisibilities-meta.xml
|
|
3
|
+
[2025-01-21T18:01:32.589] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/classAccesses/Send_Email_Confirmation.classAccesses-meta.xml
|
|
4
|
+
[2025-01-21T18:01:32.590] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/fieldPermissions/Job_Request__c.Salary__c.fieldPermissions-meta.xml
|
|
5
|
+
[2025-01-21T18:01:32.590] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/objectPermissions/Job_Request__c.objectPermissions-meta.xml
|
|
6
|
+
[2025-01-21T18:01:32.592] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/pageAccesses/Job_Request_Web_Form.pageAccesses-meta.xml
|
|
7
|
+
[2025-01-21T18:01:32.592] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/recordTypeVisibilities/Recruiting.DevManager.recordTypeVisibilities-meta.xml
|
|
8
|
+
[2025-01-21T18:01:32.593] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/tabSettings/Job_Request__c.tabSettings-meta.xml
|
|
9
|
+
[2025-01-21T18:01:32.593] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/userPermissions/APIEnabled.userPermissions-meta.xml
|
|
10
|
+
[2025-01-21T18:01:32.595] [DEBUG] default - Created disassembled file: mock/general/HR_Admin/HR_Admin.permissionset-meta.xml
|
|
11
|
+
[2025-01-21T18:01:32.600] [DEBUG] default - Parsing directory to reassemble: mock/general/HR_Admin
|
|
12
|
+
[2025-01-21T18:01:32.633] [DEBUG] default - Created reassembled file: mock/general/HR_Admin.permissionset-meta.xml
|
|
13
|
+
[2025-01-21T18:01:32.637] [DEBUG] default - Parsing file to disassemble: mock/attributes/notes.xml
|
|
14
|
+
[2025-01-21T18:01:32.640] [DEBUG] default - Created disassembled file: mock/attributes/notes/nest/103c6c8b.nest-meta.xml
|
|
15
|
+
[2025-01-21T18:01:32.640] [DEBUG] default - Created disassembled file: mock/attributes/notes/nest/f876f2be.nest-meta.xml
|
|
16
|
+
[2025-01-21T18:01:32.642] [DEBUG] default - Parsing directory to reassemble: mock/attributes/notes
|
|
17
|
+
[2025-01-21T18:01:32.644] [DEBUG] default - Created reassembled file: mock/attributes/notes.xml
|
|
18
|
+
[2025-01-21T18:01:32.645] [DEBUG] default - Parsing file to disassemble: mock/cdata/VidLand_US.marketingappextension-meta.xml
|
|
19
|
+
[2025-01-21T18:01:32.647] [DEBUG] default - Created disassembled file: mock/cdata/VidLand_US/marketingAppExtActions/register_user.marketingAppExtActions-meta.xml
|
|
20
|
+
[2025-01-21T18:01:32.647] [DEBUG] default - Created disassembled file: mock/cdata/VidLand_US/VidLand_US.marketingappextension-meta.xml
|
|
21
|
+
[2025-01-21T18:01:32.648] [DEBUG] default - Parsing directory to reassemble: mock/cdata/VidLand_US
|
|
22
|
+
[2025-01-21T18:01:32.650] [DEBUG] default - Created reassembled file: mock/cdata/VidLand_US.xml
|
|
23
|
+
[2025-01-21T18:01:32.651] [DEBUG] default - Parsing file to disassemble: mock/comments/Numbers-fr.globalValueSetTranslation-meta.xml
|
|
24
|
+
[2025-01-21T18:01:32.653] [DEBUG] default - Created disassembled file: mock/comments/Numbers-fr/valueTranslation/30e8b6d2.valueTranslation-meta.xml
|
|
25
|
+
[2025-01-21T18:01:32.653] [DEBUG] default - Created disassembled file: mock/comments/Numbers-fr/valueTranslation/d7dd1420.valueTranslation-meta.xml
|
|
26
|
+
[2025-01-21T18:01:32.653] [DEBUG] default - Created disassembled file: mock/comments/Numbers-fr/valueTranslation/d8852ede.valueTranslation-meta.xml
|
|
27
|
+
[2025-01-21T18:01:32.654] [DEBUG] default - Parsing directory to reassemble: mock/comments/Numbers-fr
|
|
28
|
+
[2025-01-21T18:01:32.655] [DEBUG] default - Created reassembled file: mock/comments/Numbers-fr.globalValueSetTranslation-meta.xml
|
|
29
|
+
[2025-01-21T18:01:32.657] [DEBUG] default - Parsing file to disassemble: mock/deeply-nested-unique-id-element/Get_Info.flow-meta.xml
|
|
30
|
+
[2025-01-21T18:01:32.664] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/actionCalls/Get_Info.actionCalls-meta.xml
|
|
31
|
+
[2025-01-21T18:01:32.664] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/decisions/Update_If_Existing.decisions-meta.xml
|
|
32
|
+
[2025-01-21T18:01:32.664] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/dynamicChoiceSets/accounts.dynamicChoiceSets-meta.xml
|
|
33
|
+
[2025-01-21T18:01:32.664] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/assignments/Set_Contact_ID.assignments-meta.xml
|
|
34
|
+
[2025-01-21T18:01:32.665] [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-21T18:01:32.665] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/decisions/Update_or_Create.decisions-meta.xml
|
|
36
|
+
[2025-01-21T18:01:32.666] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/formulas/created_or_updated.formulas-meta.xml
|
|
37
|
+
[2025-01-21T18:01:32.666] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/processMetadataValues/BuilderType.processMetadataValues-meta.xml
|
|
38
|
+
[2025-01-21T18:01:32.666] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/recordCreates/Create_Contact.recordCreates-meta.xml
|
|
39
|
+
[2025-01-21T18:01:32.667] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/recordLookups/Find_a_Match.recordLookups-meta.xml
|
|
40
|
+
[2025-01-21T18:01:32.667] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/processMetadataValues/CanvasMode.processMetadataValues-meta.xml
|
|
41
|
+
[2025-01-21T18:01:32.667] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/processMetadataValues/OriginBuilderType.processMetadataValues-meta.xml
|
|
42
|
+
[2025-01-21T18:01:32.668] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/recordUpdates/Update_Contact.recordUpdates-meta.xml
|
|
43
|
+
[2025-01-21T18:01:32.668] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/screens/Confirm.screens-meta.xml
|
|
44
|
+
[2025-01-21T18:01:32.668] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/start/Contact_Info.start-meta.xml
|
|
45
|
+
[2025-01-21T18:01:32.668] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/textTemplates/chatterMessage.textTemplates-meta.xml
|
|
46
|
+
[2025-01-21T18:01:32.669] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/screens/Contact_Info.screens-meta.xml
|
|
47
|
+
[2025-01-21T18:01:32.669] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/variables/ComplexObjectExample.variables-meta.xml
|
|
48
|
+
[2025-01-21T18:01:32.669] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/variables/contact.variables-meta.xml
|
|
49
|
+
[2025-01-21T18:01:32.669] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/variables/existingId.variables-meta.xml
|
|
50
|
+
[2025-01-21T18:01:32.669] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/variables/updateExisting.variables-meta.xml
|
|
51
|
+
[2025-01-21T18:01:32.670] [DEBUG] default - Created disassembled file: mock/deeply-nested-unique-id-element/Get_Info/Get_Info.flow-meta.xml
|
|
52
|
+
[2025-01-21T18:01:32.671] [DEBUG] default - Parsing directory to reassemble: mock/deeply-nested-unique-id-element/Get_Info
|
|
53
|
+
[2025-01-21T18:01:32.688] [DEBUG] default - Created reassembled file: mock/deeply-nested-unique-id-element/Get_Info.flow-meta.xml
|
|
54
|
+
[2025-01-21T18:01:32.690] [DEBUG] default - Parsing file to disassemble: mock/array-of-leafs/Dreamhouse.app-meta.xml
|
|
55
|
+
[2025-01-21T18:01:32.693] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/39049d21.actionOverrides-meta.xml
|
|
56
|
+
[2025-01-21T18:01:32.694] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/brand/c9db422b.brand-meta.xml
|
|
57
|
+
[2025-01-21T18:01:32.694] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/c8cc7a99.actionOverrides-meta.xml
|
|
58
|
+
[2025-01-21T18:01:32.694] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/b04e9f9b.actionOverrides-meta.xml
|
|
59
|
+
[2025-01-21T18:01:32.694] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/735c1659.actionOverrides-meta.xml
|
|
60
|
+
[2025-01-21T18:01:32.694] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/Dreamhouse.app-meta.xml
|
|
61
|
+
[2025-01-21T18:01:32.696] [DEBUG] default - Parsing directory to reassemble: mock/array-of-leafs/Dreamhouse
|
|
62
|
+
[2025-01-21T18:01:32.700] [DEBUG] default - Created reassembled file: mock/array-of-leafs/Dreamhouse.app-meta.xml
|
|
63
|
+
[2025-01-21T18:01:32.701] [DEBUG] default - Parsing file to disassemble: mock/array-of-leafs/Dreamhouse.app-meta.xml
|
|
64
|
+
[2025-01-21T18:01:32.707] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/735c1659.actionOverrides-meta.xml
|
|
65
|
+
[2025-01-21T18:01:32.707] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/brand/c9db422b.brand-meta.xml
|
|
66
|
+
[2025-01-21T18:01:32.707] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/c8cc7a99.actionOverrides-meta.xml
|
|
67
|
+
[2025-01-21T18:01:32.707] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/39049d21.actionOverrides-meta.xml
|
|
68
|
+
[2025-01-21T18:01:32.707] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/actionOverrides/b04e9f9b.actionOverrides-meta.xml
|
|
69
|
+
[2025-01-21T18:01:32.707] [DEBUG] default - Created disassembled file: mock/array-of-leafs/Dreamhouse/Dreamhouse.app-meta.xml
|
|
70
|
+
[2025-01-21T18:01:32.708] [DEBUG] default - Parsing directory to reassemble: mock/array-of-leafs/Dreamhouse
|
|
71
|
+
[2025-01-21T18:01:32.712] [DEBUG] default - Created reassembled file: mock/array-of-leafs/Dreamhouse.app-meta.xml
|
|
72
|
+
[2025-01-21T18:01:32.715] [DEBUG] default - Parsing file to disassemble: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin.permissionset-meta.xml
|
|
73
|
+
[2025-01-21T18:01:32.716] [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-21T18:01:32.716] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/objectPermissions/Job_Request__c.objectPermissions-meta.xml
|
|
75
|
+
[2025-01-21T18:01:32.716] [DEBUG] default - Created disassembled file: /home/runner/work/xml-disassembler/xml-disassembler/mock/no-namespace/HR_Admin/classAccesses/Send_Email_Confirmation.classAccesses-meta.xml
|
|
76
|
+
[2025-01-21T18:01:32.717] [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
|
|
77
|
+
[2025-01-21T18:01:32.717] [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-21T18:01:32.717] [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-01-21T18:01:32.717] [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-01-21T18:01:32.717] [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-21T18:01:32.718] [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-21T18:01:32.718] [DEBUG] default - Parsing directory to reassemble: mock/no-namespace/HR_Admin
|
|
83
|
+
[2025-01-21T18:01:32.722] [DEBUG] default - Created reassembled file: mock/no-namespace/HR_Admin.permissionset-meta.xml
|
|
84
|
+
[2025-01-21T18:01:32.723] [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-21T18:01:32.724] [ERROR] default - The provided path to reassemble is not a directory: mock/no-namespace/HR_Admin/HR_Admin.permissionset-meta.xml
|
|
86
|
+
[2025-01-21T18:01:32.725] [DEBUG] default - Parsing file to disassemble: mock/no-root-element/Assessment_Bot.bot-meta.xml
|
|
87
|
+
[2025-01-21T18:01:32.725] [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-21T18:01:32.726] [DEBUG] default - Parsing directory to reassemble: mock/no-root-element/Assessment_Bot
|
|
89
|
+
[2025-01-21T18:01:32.727] [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-21T18:01:32.727] [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-21T18:01:32.727] [ERROR] default - No files under mock/no-root-element/Assessment_Bot were parsed successfully. A reassembled XML file was not created.
|
|
92
|
+
[2025-01-21T18:01:32.728] [DEBUG] default - Parsing file to disassemble: mock/no-nested-elements/HR_Admin.xml
|
|
93
|
+
[2025-01-21T18:01:32.728] [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-21T18:01:32.729] [WARN] default - File ignored by .xmldisassemblerignore: mock/ignore/HR_Admin.permissionset-meta.xml
|
|
95
|
+
[2025-01-21T18:01:32.730] [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,69 @@ 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
|
+
|
|
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
|
+
|
|
129
159
|
class ReassembleXMLFileHandler {
|
|
130
160
|
processFilesInDirectory(dirPath) {
|
|
131
161
|
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
-
const combinedXmlContents = [];
|
|
133
|
-
let rootResult = undefined;
|
|
134
162
|
const files = yield promises.readdir(dirPath);
|
|
135
163
|
files.sort((fileA, fileB) => {
|
|
136
164
|
const fullNameA = fileA.split(".")[0].toLowerCase();
|
|
137
165
|
const fullNameB = fileB.split(".")[0].toLowerCase();
|
|
138
166
|
return fullNameA.localeCompare(fullNameB);
|
|
139
167
|
});
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
168
|
+
const combinedXmlContents = [];
|
|
169
|
+
let rootResult = undefined;
|
|
170
|
+
const concurrencyLimit = getConcurrencyThreshold();
|
|
171
|
+
const tasks = files.map((file, index) => {
|
|
172
|
+
return () => __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
const filePath = posix.join(dirPath, file);
|
|
174
|
+
const fileStat = yield promises.stat(filePath);
|
|
175
|
+
if (fileStat.isFile() && filePath.endsWith(".xml")) {
|
|
176
|
+
const xmlParsed = yield parseXML(filePath);
|
|
177
|
+
if (xmlParsed === undefined)
|
|
178
|
+
return;
|
|
179
|
+
const rootResultFromFile = yield processFilesForRootElement(xmlParsed);
|
|
180
|
+
rootResult = rootResultFromFile;
|
|
181
|
+
const combinedXmlString = buildXMLString(xmlParsed);
|
|
182
|
+
combinedXmlContents[index] = combinedXmlString;
|
|
183
|
+
}
|
|
184
|
+
else if (fileStat.isDirectory()) {
|
|
185
|
+
const [subCombinedXmlContents, subRootResult] = yield this.processFilesInDirectory(filePath);
|
|
186
|
+
rootResult = subRootResult;
|
|
187
|
+
combinedXmlContents[index] = subCombinedXmlContents.join("");
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
yield withConcurrencyLimit(tasks, concurrencyLimit);
|
|
192
|
+
return [combinedXmlContents.filter(Boolean), rootResult];
|
|
159
193
|
});
|
|
160
194
|
}
|
|
161
195
|
reassemble(xmlAttributes) {
|
|
@@ -276,44 +310,49 @@ function buildDisassembledFiles(filePath, disassembledPath, uniqueIdElements, ba
|
|
|
276
310
|
let leafContent = "";
|
|
277
311
|
let leafCount = 0;
|
|
278
312
|
let hasNestedElements = false;
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
313
|
+
const childKeys = Object.keys(rootElement).filter((key) => !key.startsWith("@"));
|
|
314
|
+
const concurrencyLimit = getConcurrencyThreshold();
|
|
315
|
+
const tasks = childKeys.map((key) => {
|
|
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 {
|
|
282
337
|
const [updatedLeafContent, updatedLeafCount, updatedHasNestedElements] = yield processElement({
|
|
283
|
-
element,
|
|
338
|
+
element: rootElement[key],
|
|
284
339
|
disassembledPath,
|
|
285
340
|
uniqueIdElements,
|
|
286
341
|
rootElementName,
|
|
287
342
|
rootElementHeader,
|
|
288
343
|
key,
|
|
289
344
|
indent,
|
|
290
|
-
leafContent,
|
|
291
|
-
leafCount,
|
|
292
|
-
hasNestedElements,
|
|
345
|
+
leafContent: "",
|
|
346
|
+
leafCount: 0,
|
|
347
|
+
hasNestedElements: false,
|
|
293
348
|
});
|
|
294
|
-
leafContent
|
|
295
|
-
leafCount
|
|
296
|
-
hasNestedElements = updatedHasNestedElements;
|
|
349
|
+
leafContent += updatedLeafContent;
|
|
350
|
+
leafCount += updatedLeafCount;
|
|
351
|
+
hasNestedElements = hasNestedElements || updatedHasNestedElements;
|
|
297
352
|
}
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
|
|
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
|
-
}
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
yield withConcurrencyLimit(tasks, concurrencyLimit);
|
|
317
356
|
if (!hasNestedElements) {
|
|
318
357
|
logger.error(`The XML file ${filePath} only has leaf elements. This file will not be disassembled.`);
|
|
319
358
|
return;
|
|
@@ -322,7 +361,7 @@ function buildDisassembledFiles(filePath, disassembledPath, uniqueIdElements, ba
|
|
|
322
361
|
yield buildLeafFile(leafContent, disassembledPath, baseName, rootElementName, rootElementHeader);
|
|
323
362
|
}
|
|
324
363
|
if (postPurge) {
|
|
325
|
-
promises.unlink(filePath);
|
|
364
|
+
yield promises.unlink(filePath);
|
|
326
365
|
}
|
|
327
366
|
});
|
|
328
367
|
}
|
|
@@ -362,23 +401,27 @@ class DisassembleXMLFileHandler {
|
|
|
362
401
|
}
|
|
363
402
|
else if (fileStat.isDirectory()) {
|
|
364
403
|
const subFiles = yield promises.readdir(filePath);
|
|
365
|
-
|
|
404
|
+
const concurrencyLimit = getConcurrencyThreshold();
|
|
405
|
+
const tasks = subFiles.map((subFile) => {
|
|
366
406
|
const subFilePath = node_path.join(filePath, subFile);
|
|
367
407
|
const relativeSubFilePath = this.posixPath(node_path.relative(process.cwd(), subFilePath));
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
408
|
+
return () => __awaiter(this, void 0, void 0, function* () {
|
|
409
|
+
if (subFilePath.endsWith(".xml") &&
|
|
410
|
+
!this.ign.ignores(relativeSubFilePath)) {
|
|
411
|
+
yield this.processFile({
|
|
412
|
+
dirPath: filePath,
|
|
413
|
+
filePath: subFilePath,
|
|
414
|
+
uniqueIdElements,
|
|
415
|
+
prePurge,
|
|
416
|
+
postPurge,
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
else if (this.ign.ignores(relativeSubFilePath)) {
|
|
420
|
+
logger.warn(`File ignored by ${ignorePath}: ${subFilePath}`);
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
});
|
|
424
|
+
yield withConcurrencyLimit(tasks, concurrencyLimit);
|
|
382
425
|
}
|
|
383
426
|
});
|
|
384
427
|
}
|
|
@@ -388,10 +431,10 @@ class DisassembleXMLFileHandler {
|
|
|
388
431
|
logger.debug(`Parsing file to disassemble: ${filePath}`);
|
|
389
432
|
const fullName = node_path.basename(filePath, node_path.extname(filePath));
|
|
390
433
|
const baseName = fullName.split(".")[0];
|
|
391
|
-
let outputPath;
|
|
392
|
-
|
|
393
|
-
if (prePurge && node_fs.existsSync(outputPath))
|
|
434
|
+
let outputPath = node_path.join(dirPath, baseName);
|
|
435
|
+
if (prePurge && node_fs.existsSync(outputPath)) {
|
|
394
436
|
yield promises.rm(outputPath, { recursive: true });
|
|
437
|
+
}
|
|
395
438
|
yield buildDisassembledFiles(filePath, outputPath, uniqueIdElements, fullName, INDENT, postPurge);
|
|
396
439
|
});
|
|
397
440
|
}
|
|
@@ -412,7 +455,9 @@ log4js.configure({
|
|
|
412
455
|
exports.DisassembleXMLFileHandler = DisassembleXMLFileHandler;
|
|
413
456
|
exports.ReassembleXMLFileHandler = ReassembleXMLFileHandler;
|
|
414
457
|
exports.buildXMLString = buildXMLString;
|
|
458
|
+
exports.getConcurrencyThreshold = getConcurrencyThreshold;
|
|
415
459
|
exports.logger = logger;
|
|
416
460
|
exports.parseXML = parseXML;
|
|
417
461
|
exports.setLogLevel = setLogLevel;
|
|
462
|
+
exports.withConcurrencyLimit = withConcurrencyLimit;
|
|
418
463
|
//# sourceMappingURL=index.cjs.map
|