xml-disassembler 1.11.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/CONTRIBUTING.md +41 -17
  3. package/README.md +109 -102
  4. package/dist/index.cjs +17 -711
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.min.cjs +1 -1
  7. package/dist/index.min.cjs.map +1 -1
  8. package/dist/index.min.mjs +1 -1
  9. package/dist/index.min.mjs.map +1 -1
  10. package/dist/index.mjs +18 -708
  11. package/dist/index.mjs.map +1 -1
  12. package/package.json +11 -22
  13. package/xml-disassembler-crate/README.md +90 -0
  14. package/xml-disassembler-crate/index.node +0 -0
  15. package/xml-disassembler-crate/package-lock.json +13 -0
  16. package/xml-disassembler-crate/package.json +22 -0
  17. package/disassemble.log +0 -452
  18. package/dist/index.min.umd.js +0 -2
  19. package/dist/index.min.umd.js.map +0 -1
  20. package/dist/index.umd.js +0 -768
  21. package/dist/index.umd.js.map +0 -1
  22. package/dist/typings/builders/buildDisassembledFile.d.ts +0 -2
  23. package/dist/typings/builders/buildDisassembledFiles.d.ts +0 -2
  24. package/dist/typings/builders/buildXMLString.d.ts +0 -2
  25. package/dist/typings/builders/extractRootAttributes.d.ts +0 -2
  26. package/dist/typings/builders/mergeXmlElements.d.ts +0 -2
  27. package/dist/typings/constants/constants.d.ts +0 -27
  28. package/dist/typings/handlers/disassembleXMLFileHandler.d.ts +0 -28
  29. package/dist/typings/handlers/reassembleXMLFileHandler.d.ts +0 -13
  30. package/dist/typings/index.d.ts +0 -8
  31. package/dist/typings/parsers/parseElement.d.ts +0 -4
  32. package/dist/typings/parsers/parseToXmlObject.d.ts +0 -1
  33. package/dist/typings/parsers/parseUniqueIdElements.d.ts +0 -2
  34. package/dist/typings/parsers/parseXML.d.ts +0 -2
  35. package/dist/typings/parsers/stripWhitespace.d.ts +0 -1
  36. package/dist/typings/transformers/getTransformer.d.ts +0 -2
  37. package/dist/typings/transformers/transformers.d.ts +0 -6
  38. package/dist/typings/types/types.d.ts +0 -60
  39. package/dist/typings/utils/asyncQueue.d.ts +0 -10
  40. package/dist/typings/utils/objectPool.d.ts +0 -15
  41. package/samples/array-of-leafs/Dreamhouse.app-meta.xml +0 -60
  42. package/samples/attributes/notes.xml +0 -14
  43. package/samples/cdata/VidLand_US.marketingappextension-meta.xml +0 -51
  44. package/samples/comments/Numbers-fr.globalValueSetTranslation-meta.xml +0 -17
  45. package/samples/deeply-nested-unique-id-element/Get_Info.flow-meta.xml +0 -343
  46. package/samples/general/HR_Admin.permissionset-meta.xml +0 -42
  47. package/samples/ignore/HR_Admin.permissionset-meta.xml +0 -44
  48. package/samples/no-namespace/HR_Admin.permissionset-meta.xml +0 -44
  49. package/samples/no-nested-elements/HR_Admin.xml +0 -6
  50. package/samples/no-root-element/Assessment_Bot/Assessment_Bot.bot-meta.xml +0 -6
  51. package/samples/no-root-element/Assessment_Bot/botMlDomain/419e0199.botMlDomain-meta.xml +0 -7
  52. package/samples/no-root-element/Assessment_Bot.bot-meta.xml +0 -10
package/CHANGELOG.md CHANGED
@@ -5,6 +5,24 @@
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
+ ## [2.0.0](https://github.com/mcarvin8/xml-disassembler/compare/v1.11.5...v2.0.0) (2026-02-09)
9
+
10
+
11
+ ### ⚠ BREAKING CHANGES
12
+
13
+ *
14
+
15
+ ### Features
16
+
17
+ * embed Rust xml-disassembler via Neon addon ([#191](https://github.com/mcarvin8/xml-disassembler/issues/191)) ([af991a8](https://github.com/mcarvin8/xml-disassembler/commit/af991a84402bffad17b7832d72d56019f425d957))
18
+
19
+ ## [1.11.5](https://github.com/mcarvin8/xml-disassembler/compare/v1.11.4...v1.11.5) (2026-02-04)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * **deps:** bump fast-xml-parser from 5.3.3 to 5.3.4 ([#185](https://github.com/mcarvin8/xml-disassembler/issues/185)) ([d038294](https://github.com/mcarvin8/xml-disassembler/commit/d03829412f9128b589f0da1b83458037db7d15bb))
25
+
8
26
  ## [1.11.4](https://github.com/mcarvin8/xml-disassembler/compare/v1.11.3...v1.11.4) (2026-01-02)
9
27
 
10
28
 
package/CONTRIBUTING.md CHANGED
@@ -1,30 +1,54 @@
1
- # Contributing
1
+ # Contributing to xml-disassembler
2
2
 
3
- Contributions are welcome! If you would like to contribute, please fork the repository, make your changes, and submit a pull request.
3
+ Contributions are welcome. This guide covers how to set up the project, run checks, and submit changes.
4
4
 
5
5
  ## Requirements
6
6
 
7
- - `pnpm >= 9`
8
- - `node >= 20`
7
+ - **Node.js** 20
8
+ - **pnpm** 9
9
9
 
10
- ## Installation
10
+ ## Setup
11
11
 
12
- ### 1) Fork the repository
12
+ 1. **Fork and clone**
13
13
 
14
- ### 2) Install Dependencies
14
+ Fork the repo on GitHub, then clone your fork:
15
15
 
16
- This will install all the tools needed to contribute
16
+ ```bash
17
+ git clone https://github.com/mcarvin8/xml-disassembler.git
18
+ cd xml-disassembler
19
+ ```
17
20
 
18
- ```bash
19
- pnpm install
20
- ```
21
+ 2. **Install dependencies**
21
22
 
22
- ## Testing
23
+ ```bash
24
+ pnpm install
25
+ ```
23
26
 
24
- When developing, run the provided tests for new additions.
27
+ ## Development workflow
25
28
 
26
- ```bash
27
- pnpm test
28
- ```
29
+ 1. Create a branch for your change.
30
+ 2. Make your changes.
31
+ 3. Run tests and lint (see below).
32
+ 4. Commit. Pre-commit hooks will run Prettier via lint-staged.
33
+ 5. Push and open a pull request.
29
34
 
30
- All updates should meet the 90% code coverage threshold.
35
+ ## Scripts
36
+
37
+ | Command | Description |
38
+ | ---------------- | -------------------------- |
39
+ | `pnpm test` | Run Jest with coverage |
40
+ | `pnpm run lint` | Run ESLint |
41
+ | `pnpm format` | Format code with Prettier |
42
+ | `pnpm run build` | Build the library (Rollup) |
43
+
44
+ ## Code quality
45
+
46
+ - **Tests** – New or changed behavior should have tests. The project aims for **≥ 90% code coverage**; keep coverage at or above that.
47
+ - **Linting** – Code must pass `pnpm run lint` (ESLint).
48
+ - **Formatting** – Code is formatted with Prettier. Use `pnpm format` to fix formatting; the pre-commit hook also runs Prettier on staged files via lint-staged.
49
+
50
+ ## Submitting changes
51
+
52
+ 1. **Pull request** – Open a PR against `main`. Describe what changed and why.
53
+ 2. **Scope** – Prefer one logical change per PR (one fix or one feature).
54
+ 3. **Checks** – Ensure CI passes (tests and lint). Run `pnpm test` and `pnpm run lint` locally before pushing.
package/README.md CHANGED
@@ -1,69 +1,88 @@
1
- # `xml-disassembler`
1
+ # xml-disassembler
2
2
 
3
3
  [![NPM](https://img.shields.io/npm/v/xml-disassembler.svg?label=xml-disassembler)](https://www.npmjs.com/package/xml-disassembler)
4
4
  [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/LICENSE.md)
5
5
  [![Downloads/week](https://img.shields.io/npm/dw/xml-disassembler.svg)](https://npmjs.org/package/xml-disassembler)
6
- [![Maintainability](https://qlty.sh/badges/e226ad95-4b8d-484a-9484-25862941262d/maintainability.svg)](https://qlty.sh/gh/mcarvin8/projects/xml-disassembler) [![Code Coverage](https://qlty.sh/badges/e226ad95-4b8d-484a-9484-25862941262d/test_coverage.svg)](https://qlty.sh/gh/mcarvin8/projects/xml-disassembler)
6
+ [![Maintainability](https://qlty.sh/badges/e226ad95-4b8d-484a-9484-25862941262d/maintainability.svg)](https://qlty.sh/gh/mcarvin8/projects/xml-disassembler)
7
+ [![Code Coverage](https://qlty.sh/badges/e226ad95-4b8d-484a-9484-25862941262d/test_coverage.svg)](https://qlty.sh/gh/mcarvin8/projects/xml-disassembler)
7
8
  [![Known Vulnerabilities](https://snyk.io//test/github/mcarvin8/xml-disassembler/badge.svg?targetFile=package.json)](https://snyk.io//test/github/mcarvin8/xml-disassembler?targetFile=package.json)
8
9
 
9
- Disassemble large XML files into smaller, modular files in formats like XML, INI, JSON, JSON5, TOML, or YAML—then reassemble them as needed.
10
+ Split large XML files into smaller, version-control–friendly pieces—then reassemble them when needed. Output as XML, JSON, JSON5, or YAML.
10
11
 
11
- Designed for improved version control, cleaner diffs, and easier team collaboration when dealing with complex XML structures.
12
+ Useful for cleaner diffs, easier collaboration, and workflows like Salesforce metadata.
12
13
 
13
- ---
14
-
15
- ## Features
14
+ > **Native Rust:** Core logic is in the [xml-disassembler](https://crates.io/crates/xml-disassembler) crate; this package provides Node.js bindings via [Neon](https://neon-bindings.com).
16
15
 
17
- - **Disassemble XML Files** – Break down XML into smaller components.
18
- - **Reassemble XML** – Rebuild the original XML from disassembled parts.
19
- - **Multiple Output Formats** – Choose XML, INI, JSON, JSON5, TOML, or YAML.
20
- - **Two Disassembly Strategies** – Choose between `unique-id` (default) or `grouped-by-tag`.
21
- - **Ignore Rules** – Exclude files from processing using an ignore file.
22
- - **Logging** – Log errors and debug information using `log4js`.
23
- - **Salesforce Integration** – Supports use cases like Salesforce metadata processing.
24
-
25
- > **Note**: Reassembly guarantees element-level fidelity, but element order may vary—especially when using TOML.
16
+ ---
26
17
 
27
- <!-- TABLE OF CONTENTS -->
28
- <details>
29
- <summary>Table of Contents</summary>
18
+ ## Table of contents
30
19
 
31
- - [Background](#background)
20
+ - [Quick start](#quick-start)
21
+ - [Features](#features)
32
22
  - [Install](#install)
33
- - [Disassembling Files](#disassembling-files)
34
- - [Disassembly Strategies](#disassembly-strategies)
35
- - [unique-id (default)](#unique-id-default)
36
- - [grouped-by-tag](#grouped-by-tag)
37
- - [Reassembling Files](#reassembling-files)
38
- - [Use Case](#use-case)
39
- - [Ignore File](#ignore-file)
40
- - [XML Parser](#xml-parser)
23
+ - [Disassembling](#disassembling)
24
+ - [Disassembly strategies](#disassembly-strategies)
25
+ - [Reassembling](#reassembling)
26
+ - [Ignore file](#ignore-file)
41
27
  - [Logging](#logging)
28
+ - [Implementation](#implementation)
29
+ - [Use case](#use-case)
42
30
  - [Contributing](#contributing)
43
- - [Template & License](#template-&-license)
44
- </details>
31
+ - [License](#license)
45
32
 
46
33
  ---
47
34
 
48
- ## Background
35
+ ## Quick start
49
36
 
50
- Managing large XML files—especially those generated by tools—can be painful. `xml-disassembler` solves this by splitting them into digestible pieces, optimized for Git diffs and team workflows.
37
+ ```typescript
38
+ import {
39
+ DisassembleXMLFileHandler,
40
+ ReassembleXMLFileHandler,
41
+ } from "xml-disassembler";
42
+
43
+ // Disassemble: one XML → many small files
44
+ const disassemble = new DisassembleXMLFileHandler();
45
+ await disassemble.disassemble({
46
+ filePath: "path/to/YourFile.permissionset-meta.xml",
47
+ uniqueIdElements:
48
+ "application,apexClass,name,flow,object,recordType,tab,field",
49
+ format: "json",
50
+ strategy: "unique-id",
51
+ });
51
52
 
52
- No need for complex diffing tools—just structured directories with format-flexible files.
53
+ // Reassemble: many small files one XML
54
+ const reassemble = new ReassembleXMLFileHandler();
55
+ await reassemble.reassemble({
56
+ filePath: "path/to/YourFile",
57
+ fileExtension: "permissionset-meta.xml",
58
+ });
59
+ ```
53
60
 
54
61
  ---
55
62
 
56
- ## Install
63
+ ## Features
57
64
 
58
- Install the package using NPM:
65
+ - **Disassemble** Break XML into smaller components (by unique ID or by tag).
66
+ - **Reassemble** – Rebuild the original XML from disassembled output.
67
+ - **Multiple formats** – Output (and reassemble from) XML, JSON, JSON5, or YAML.
68
+ - **Strategies** – `unique-id` (one file per nested element) or `grouped-by-tag` (one file per tag).
69
+ - **Ignore rules** – Exclude paths via a `.xmldisassemblerignore` file (same style as `.gitignore`).
70
+ - **Logging** – Uses [env_logger](https://docs.rs/env_logger); set `RUST_LOG` for verbosity (e.g. `RUST_LOG=debug`).
71
+ - **Salesforce-friendly** – Fits metadata and similar XML-heavy workflows.
59
72
 
60
- ```
73
+ Reassembly preserves element content and structure.
74
+
75
+ ---
76
+
77
+ ## Install
78
+
79
+ ```bash
61
80
  npm install xml-disassembler
62
81
  ```
63
82
 
64
83
  ---
65
84
 
66
- ## Disassembling Files
85
+ ## Disassembling
67
86
 
68
87
  ```typescript
69
88
  import { DisassembleXMLFileHandler } from "xml-disassembler";
@@ -81,59 +100,53 @@ await handler.disassemble({
81
100
  });
82
101
  ```
83
102
 
84
- | Option | Description |
85
- | ------------------ | -------------------------------------------------------------------------------------- |
86
- | `filePath` | Path to the XML file or directory |
87
- | `uniqueIdElements` | Comma-separated list of UID elements for naming nested files |
88
- | `prePurge` | Delete previous disassembly output before running (`true` or `false`, default `false`) |
89
- | `postPurge` | Delete the original XML after disassembly (`true` or `false`, default `false`) |
90
- | `ignorePath` | Path to the ignore file (default `.xmldisassemblerignore`) |
91
- | `format` | Output format: `xml`, `ini`, `json`, `json5`, `toml`, `yaml` |
92
- | `strategy` | Disassembly strategy: `unique-id` or `grouped-by-tag` |
103
+ | Option | Description |
104
+ | ------------------ | --------------------------------------------------------------------------- |
105
+ | `filePath` | Path to the XML file or directory to disassemble. |
106
+ | `uniqueIdElements` | Comma-separated element names used to derive filenames for nested elements. |
107
+ | `prePurge` | Remove existing disassembly output before running (default: `false`). |
108
+ | `postPurge` | Remove the source XML after disassembly (default: `false`). |
109
+ | `ignorePath` | Path to the ignore file (default: `.xmldisassemblerignore`). |
110
+ | `format` | Output format: `xml`, `json`, `json5`, `yaml`. |
111
+ | `strategy` | `unique-id` or `grouped-by-tag`. |
93
112
 
94
113
  ---
95
114
 
96
- ## Disassembly Strategies
115
+ ## Disassembly strategies
97
116
 
98
117
  ### unique-id (default)
99
118
 
100
- > This is the strategy all previous versions of the `xml-disassembler` follow.
119
+ Each nested element is written to its own file, named by a unique identifier (or a SHA-256 hash if no UID is available). Leaf content stays in a file named after the original XML.
101
120
 
102
- Each nested element is written to a separate file based on its unique identifier—or a SHA-256 hash fallback. Leaf elements remain grouped in a file named after the original XML.
121
+ Best for fine-grained diffs and version control.
103
122
 
104
- > Best for detailed diffs and granular version control.
123
+ **Example layouts**
105
124
 
106
- **Example Outputs**
107
-
108
- | Format | UID Example | Hash Example |
109
- | --------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
110
- | **XML** | ![XML UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled.png)<br> | ![XML Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes.png)<br> |
111
- | **YAML** | ![YAML UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-yaml.png)<br> | ![YAML Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-yaml.png)<br> |
112
- | **JSON** | ![JSON UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-json.png)<br> | ![JSON Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-json.png)<br> |
113
- | **JSON5** | ![JSON5 UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-json5.png)<br> | ![JSON5 Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-json5.png)<br> |
114
- | **TOML** | ![TOML UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-toml.png)<br> | ![TOML Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-toml.png)<br> |
115
- | **INI** | ![INI UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-ini.png)<br> | ![INI Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-ini.png)<br> |
125
+ | Format | UID-based layout | Hash-based layout |
126
+ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
127
+ | **XML** | [![XML UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled.png) | [![XML Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes.png) |
128
+ | **YAML** | [![YAML UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-yaml.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-yaml.png) | [![YAML Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-yaml.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-yaml.png) |
129
+ | **JSON** | [![JSON UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-json.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-json.png) | [![JSON Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-json.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-json.png) |
130
+ | **JSON5** | [![JSON5 UID](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-json5.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-json5.png) | [![JSON5 Hash](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-json5.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-hashes-json5.png) |
116
131
 
117
132
  ### grouped-by-tag
118
133
 
119
- Groups all nested elements by tag into a single file. Leaf elements still go into a base file named after the original XML.
134
+ All nested elements with the same tag go into one file per tag. Leaf content stays in the base file named after the original XML.
120
135
 
121
- > Best for fewer files and easier manual inspection.
136
+ Best for fewer files and quick inspection.
122
137
 
123
- **Example Outputs**
138
+ **Example layouts**
124
139
 
125
- | Format | Grouped by Tag Example |
126
- | --------- | ----------------------------------------------------------------------------------------------------------------------------- |
127
- | **XML** | ![XML tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags.png)<br> |
128
- | **YAML** | ![YAML tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-yaml.png)<br> |
129
- | **JSON** | ![JSON tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-json.png)<br> |
130
- | **JSON5** | ![JSON5 tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-json5.png)<br> |
131
- | **TOML** | ![TOML tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-toml.png)<br> |
132
- | **INI** | ![INI tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-ini.png)<br> |
140
+ | Format | Layout |
141
+ | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
142
+ | **XML** | [![XML tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags.png) |
143
+ | **YAML** | [![YAML tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-yaml.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-yaml.png) |
144
+ | **JSON** | [![JSON tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-json.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-json.png) |
145
+ | **JSON5** | [![JSON5 tag](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-json5.png)](https://raw.githubusercontent.com/mcarvin8/xml-disassembler/main/.github/images/disassembled-tags-json5.png) |
133
146
 
134
147
  ---
135
148
 
136
- ## Reassembling Files
149
+ ## Reassembling
137
150
 
138
151
  ```typescript
139
152
  import { ReassembleXMLFileHandler } from "xml-disassembler";
@@ -146,58 +159,52 @@ await handler.reassemble({
146
159
  });
147
160
  ```
148
161
 
149
- | Option | Description |
150
- | --------------- | ------------------------------------------------------------------------------------------ |
151
- | `filePath` | Directory containing disassembled files to reassemble |
152
- | `fileExtension` | Extension for the output XML file (default: `.xml`) |
153
- | `postPurge` | Delete disassembled files after successful reassembly (`true` or `false`, default `false`) |
162
+ | Option | Description |
163
+ | --------------- | --------------------------------------------------------------------------------- |
164
+ | `filePath` | Directory that contains the disassembled files (e.g. `HR_Admin/`). |
165
+ | `fileExtension` | Suffix for the rebuilt XML file (e.g. `permissionset-meta.xml`). Default: `.xml`. |
166
+ | `postPurge` | Remove disassembled files after a successful reassembly (default: `false`). |
154
167
 
155
168
  ---
156
169
 
157
- ## Use Case
170
+ ## Ignore file
158
171
 
159
- See [`sf-decomposer`](https://github.com/mcarvin8/sf-decomposer) for a Salesforce CLI use case.
172
+ Exclude files or directories from disassembly using an ignore file (default: `.xmldisassemblerignore`). Syntax matches [node-ignore](https://github.com/kaelzhang/node-ignore) (similar to `.gitignore`).
160
173
 
161
- ---
174
+ Example:
162
175
 
163
- ## Ignore File
164
-
165
- Create an ignore file, similar to a `.gitignore`, to exclude XMLs from disassembly.
166
-
167
- > uses [`node-ignore`](https://github.com/kaelzhang/node-ignore)
176
+ ```
177
+ # Skip these paths
178
+ **/secret.xml
179
+ **/generated/
180
+ ```
168
181
 
169
182
  ---
170
183
 
171
- ## XML Parser
172
-
173
- Uses [`fast-xml-parser`](https://github.com/NaturalIntelligence/fast-xml-parser) with support for:
184
+ ## Logging
174
185
 
175
- - Character Data (CDATA): `"![CDATA["`
176
- - Comments: `"!---"`
177
- - Attributes: `"@__**"`
186
+ The Rust crate uses [env_logger](https://docs.rs/env_logger). Set `RUST_LOG` to control verbosity (e.g. `RUST_LOG=debug`).
178
187
 
179
188
  ---
180
189
 
181
- ## Logging
190
+ ## Implementation
182
191
 
183
- Logging uses [`log4js`](https://github.com/log4js-node/log4js-node). Logs are written to `disassemble.log`.
192
+ The core logic is implemented in Rust ([xml-disassembler](https://crates.io/crates/xml-disassembler)) and exposed to Node.js via [Neon](https://neon-bindings.com). Building from source requires Rust and Node.js.
184
193
 
185
- ```typescript
186
- import { setLogLevel } from "xml-disassembler";
194
+ ---
187
195
 
188
- setLogLevel("debug"); // Enables verbose logging
189
- ```
196
+ ## Use case
197
+
198
+ For a Salesforce CLI integration example, see [sf-decomposer](https://github.com/mcarvin8/sf-decomposer).
190
199
 
191
200
  ---
192
201
 
193
202
  ## Contributing
194
203
 
195
- Contributions are welcome! See [Contributing](https://github.com/mcarvin8/xml-disassembler/blob/main/CONTRIBUTING.md).
204
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for code style, PR process, and coverage expectations.
196
205
 
197
206
  ---
198
207
 
199
- ## Template & License
200
-
201
- This project is based on a template by [Allan Oricil](https://github.com/AllanOricil) and licensed under the ISC license. The original code remains under the [ISC license](https://github.com/mcarvin8/xml-disassembler/blob/main/LICENSE.isc).
208
+ ## License
202
209
 
203
- All contributions specific to the `xml-disassembler` is licensed under the [MIT license](https://github.com/mcarvin8/xml-disassembler/blob/main/LICENSE.md).
210
+ This project is based on a template by [Allan Oricil](https://github.com/AllanOricil); the original template code is under the [ISC license](LICENSE.isc). The xml-disassembler code is under the [MIT license](LICENSE.md).