bsdata-parser 0.1.0 → 0.1.2
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/README.md +37 -149
- package/dist/index.d.ts +4 -236
- package/dist/index.js +13 -301
- package/dist/index.js.map +1 -1
- package/dist/ir/types.d.ts +229 -0
- package/dist/ir/types.js +10 -0
- package/dist/ir/types.js.map +1 -0
- package/dist/parse/index.d.ts +2 -0
- package/dist/parse/index.js +12 -0
- package/dist/parse/index.js.map +1 -0
- package/dist/parse/xml.d.ts +2 -0
- package/dist/parse/xml.js +296 -0
- package/dist/parse/xml.js.map +1 -0
- package/dist/project/catalogue.d.ts +17 -0
- package/dist/project/catalogue.js +19 -0
- package/dist/project/catalogue.js.map +1 -0
- package/package.json +8 -23
package/README.md
CHANGED
|
@@ -1,167 +1,55 @@
|
|
|
1
1
|
# bsdata-parser
|
|
2
2
|
|
|
3
|
-
A faithful
|
|
3
|
+
A faithful parser for [BSData](https://github.com/BSData) XML into an intermediate representation
|
|
4
|
+
(IR), plus a golden-diff harness for validating a downstream projection of that IR against a
|
|
5
|
+
reference output.
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
+
The parser exists to replace a **lossy** flatten: a naive parser drops conditions in the source it
|
|
8
|
+
cannot statically resolve, which is the root cause of recurring "missing option" bugs in the
|
|
9
|
+
downstream consumer. The rebuild keeps those conditions in the IR and resolves them in the projection.
|
|
7
10
|
|
|
8
|
-
##
|
|
11
|
+
## Design
|
|
9
12
|
|
|
10
|
-
Naive BSData parsers flatten the XML as they go, silently dropping modifiers and conditions they cannot statically resolve. The result is recurring "missing option" bugs whenever BSData's conditional logic kicks in. This library solves that by keeping the full modifier/condition tree in the IR and leaving resolution to the projection layer.
|
|
11
|
-
|
|
12
|
-
## Architecture
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
BSData (.gst/.cat) ──parse──▶ IR (faithful tree) ──project──▶ your output
|
|
16
|
-
│
|
|
17
|
-
reference output ◀───diff───────┘
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
- **`src/parse`** - XML to IR. Mechanical transcription only: no interpretation, no flattening, no domain knowledge. Every modifier, condition, constraint, and repeat node is preserved verbatim.
|
|
21
|
-
- **`src/project`** - IR to output. All domain interpretation lives here. This layer is intentionally not included in the package - you supply it, shaped to your own output schema.
|
|
22
|
-
- **`harness/`** - golden-diff utilities. Load a reference output (oracle) and diff a candidate against it to find gaps. Auto-skips when no local data is present, so the test suite runs cleanly everywhere.
|
|
23
|
-
|
|
24
|
-
## Installation
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npm install bsdata-parser
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Usage
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
import { parseToIr } from 'bsdata-parser'
|
|
34
|
-
import type { Ir } from 'bsdata-parser'
|
|
35
|
-
|
|
36
|
-
// 1. Load your .gst/.cat files however you like (fs, fetch, etc.)
|
|
37
|
-
const files: Record<string, string> = {
|
|
38
|
-
'my-game.gst': '<gameSystem ...>...</gameSystem>',
|
|
39
|
-
'faction-a.cat': '<catalogue ...>...</catalogue>',
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// 2. Parse to IR - faithful, lossless, typed
|
|
43
|
-
const ir: Ir = parseToIr(files)
|
|
44
|
-
|
|
45
|
-
// 3. Project to your output schema
|
|
46
|
-
const output = myProjector(ir)
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
`parseToIr` accepts a `filename -> XML string` map and returns an `Ir` object containing the fully parsed game system and all catalogues as typed trees.
|
|
50
|
-
|
|
51
|
-
## IR shape
|
|
52
|
-
|
|
53
|
-
```typescript
|
|
54
|
-
interface Ir {
|
|
55
|
-
gameSystem: IrCatalogueFile // the .gst file
|
|
56
|
-
catalogues: IrCatalogueFile[] // all .cat files
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
interface IrCatalogueFile {
|
|
60
|
-
filename: string
|
|
61
|
-
kind: 'gameSystem' | 'catalogue'
|
|
62
|
-
id: string
|
|
63
|
-
name: string
|
|
64
|
-
gameSystemId?: string
|
|
65
|
-
catalogueLinks: IrCatalogueLink[]
|
|
66
|
-
root: IrCatalogueRoot
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
interface IrCatalogueRoot {
|
|
70
|
-
costTypes: IrCostType[]
|
|
71
|
-
profileTypes: IrProfileType[]
|
|
72
|
-
categoryEntries: IrCategoryEntry[]
|
|
73
|
-
rules: IrRule[]
|
|
74
|
-
sharedRules: IrRule[]
|
|
75
|
-
sharedProfiles: IrProfile[]
|
|
76
|
-
selectionEntries: IrSelectionEntry[]
|
|
77
|
-
sharedSelectionEntries: IrSelectionEntry[]
|
|
78
|
-
sharedSelectionEntryGroups: IrSelectionEntryGroup[]
|
|
79
|
-
entryLinks: IrEntryLink[]
|
|
80
|
-
forceEntries: IrForceEntry[]
|
|
81
|
-
}
|
|
82
13
|
```
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
## Writing a projector
|
|
87
|
-
|
|
88
|
-
A projector is a function `(ir: Ir) => YourOutputType`. It lives in your own codebase and is never part of this package:
|
|
89
|
-
|
|
90
|
-
```typescript
|
|
91
|
-
import { parseToIr } from 'bsdata-parser'
|
|
92
|
-
import type { Ir } from 'bsdata-parser'
|
|
93
|
-
|
|
94
|
-
function projectMyGame(ir: Ir): MyOutput {
|
|
95
|
-
const categories: Record<string, string> = {}
|
|
96
|
-
for (const entry of ir.gameSystem.root.categoryEntries) {
|
|
97
|
-
categories[entry.id] = entry.name
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const units = ir.catalogues.flatMap(cat =>
|
|
101
|
-
cat.root.sharedSelectionEntries
|
|
102
|
-
.filter(e => e.type === 'unit' && !e.hidden)
|
|
103
|
-
.map(e => ({ id: e.id, name: e.name, faction: cat.name }))
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
return { categories, units }
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export function buildOutput(files: Record<string, string>): MyOutput {
|
|
110
|
-
return projectMyGame(parseToIr(files))
|
|
111
|
-
}
|
|
14
|
+
BSData (.gst/.cat) ──parse──▶ IR (faithful tree) ──project──▶ output
|
|
15
|
+
│
|
|
16
|
+
reference output ◀──diff─────┘ (oracle)
|
|
112
17
|
```
|
|
113
18
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
19
|
+
- **`src/parse`** — XML → IR. Mechanical transcription, domain-agnostic, no interpretation. *(stub)*
|
|
20
|
+
- **`src/project`** — IR → output. All domain interpretation lives here. Supplied locally. *(stub)*
|
|
21
|
+
- **`src/index.ts`** — `buildCatalogue(files)`, signature-compatible with the downstream consumer
|
|
22
|
+
for incremental integration.
|
|
23
|
+
- **`harness/`** — the golden diff. `loadOracle()`/`loadBsdata()` read from a local data directory;
|
|
24
|
+
`diffCatalogues()` asserts the candidate reproduces the reference as a superset.
|
|
117
25
|
|
|
118
|
-
|
|
119
|
-
- `harness/diff.ts` - `diffCatalogues(oracle, candidate)` - counts-based diff, domain-agnostic
|
|
26
|
+
## Data (local only, never committed)
|
|
120
27
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
28
|
+
No data is bundled with this repo. The BSData source files and the reference output are third-party
|
|
29
|
+
content you assemble yourself. Point the `BSDATA_DIR` environment variable at a local directory
|
|
30
|
+
containing:
|
|
124
31
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
import { describe, it, expect } from 'vitest'
|
|
128
|
-
import { readFile, readdir } from 'node:fs/promises'
|
|
129
|
-
import { existsSync } from 'node:fs'
|
|
130
|
-
import { join } from 'node:path'
|
|
131
|
-
import { buildOutput } from './my-projector'
|
|
32
|
+
- `bsdata/` — the `.cat`/`.gst` source set (input to the parser)
|
|
33
|
+
- `catalogue.json` — a reference output (the oracle to diff against)
|
|
132
34
|
|
|
133
|
-
|
|
134
|
-
|
|
35
|
+
Everything under that directory stays outside the repo. The concrete domain projector you plug into
|
|
36
|
+
`src/project` is likewise kept local (gitignored), so nothing data- or domain-specific is published.
|
|
135
37
|
|
|
136
|
-
|
|
137
|
-
it('reproduces every oracle collection', async () => {
|
|
138
|
-
const oracle = JSON.parse(await readFile(join(dir, 'catalogue.json'), 'utf-8'))
|
|
139
|
-
const names = (await readdir(join(dir, 'bsdata'))).filter(f => f.endsWith('.cat') || f.endsWith('.gst'))
|
|
140
|
-
const files: Record<string, string> = {}
|
|
141
|
-
await Promise.all(names.map(async n => { files[n] = await readFile(join(dir, 'bsdata', n), 'utf-8') }))
|
|
142
|
-
const candidate = buildOutput(files)
|
|
143
|
-
// diff: for every key in oracle, compare collection size
|
|
144
|
-
const diffs = Object.keys(oracle).filter(k => {
|
|
145
|
-
const size = (v: unknown) => Array.isArray(v) ? v.length : v && typeof v === 'object' ? Object.keys(v as object).length : 0
|
|
146
|
-
return size(oracle[k]) !== size((candidate as Record<string, unknown>)[k])
|
|
147
|
-
})
|
|
148
|
-
expect(diffs).toEqual([])
|
|
149
|
-
})
|
|
150
|
-
})
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
## Data and domain code (never committed)
|
|
38
|
+
## Commands
|
|
154
39
|
|
|
155
|
-
|
|
40
|
+
- `npm test` — unit suite plus the golden-parity test (auto-skips unless `BSDATA_DIR` is set,
|
|
41
|
+
so it runs cleanly anywhere, including CI with no data).
|
|
42
|
+
- `npm run golden` — run the golden diff against the local reference and print the gap.
|
|
43
|
+
- `npm run build` — build a local output from the local source with the parser.
|
|
44
|
+
- `npm run typecheck` — `tsc --noEmit`.
|
|
156
45
|
|
|
157
|
-
##
|
|
46
|
+
## Status
|
|
158
47
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
| `npm test` | Unit suite + golden-parity test (auto-skips without `BSDATA_DIR`) |
|
|
162
|
-
| `npm run build` | Compile to `dist/` via tsup |
|
|
163
|
-
| `npm run typecheck` | `tsc --noEmit` |
|
|
48
|
+
Scaffold. `parseToIr`/`projectCatalogue` are stubs, so the golden-parity test is **red by design** —
|
|
49
|
+
that is the baseline the rebuild is built green against, test-first.
|
|
164
50
|
|
|
165
|
-
##
|
|
51
|
+
## Method
|
|
166
52
|
|
|
167
|
-
|
|
53
|
+
TDD against the BSData XML as the source of truth: establish the expected value from the `.cat`/`.gst`
|
|
54
|
+
before writing the assertion. The golden diff is the integration oracle; per-entity unit tests are
|
|
55
|
+
the inner loop.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,241 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BSData intermediate representation (IR).
|
|
3
|
-
*
|
|
4
|
-
* A FAITHFUL, lossless-by-intent tree mirror of the BSData .gst / .cat model.
|
|
5
|
-
* Nothing is resolved, flattened, or interpreted here. Scope strings are raw BSData
|
|
6
|
-
* values. Modifier/condition trees are opaque. All interpretation belongs in the
|
|
7
|
-
* projection (src/project).
|
|
8
|
-
*/
|
|
9
|
-
interface IrConstraint {
|
|
10
|
-
id: string;
|
|
11
|
-
type: 'min' | 'max';
|
|
12
|
-
value: number;
|
|
13
|
-
scope: string;
|
|
14
|
-
field: string;
|
|
15
|
-
shared?: boolean;
|
|
16
|
-
includeChildSelections?: boolean;
|
|
17
|
-
}
|
|
18
|
-
interface IrCharacteristic {
|
|
19
|
-
name: string;
|
|
20
|
-
typeId: string;
|
|
21
|
-
value: string;
|
|
22
|
-
}
|
|
23
|
-
interface IrProfile {
|
|
24
|
-
id: string;
|
|
25
|
-
name: string;
|
|
26
|
-
hidden: boolean;
|
|
27
|
-
typeId: string;
|
|
28
|
-
typeName: string;
|
|
29
|
-
characteristics: IrCharacteristic[];
|
|
30
|
-
}
|
|
31
|
-
interface IrCost {
|
|
32
|
-
name: string;
|
|
33
|
-
typeId: string;
|
|
34
|
-
value: number;
|
|
35
|
-
}
|
|
36
|
-
interface IrRule {
|
|
37
|
-
id: string;
|
|
38
|
-
name: string;
|
|
39
|
-
hidden: boolean;
|
|
40
|
-
description: string;
|
|
41
|
-
}
|
|
42
|
-
interface IrInfoLink {
|
|
43
|
-
id: string;
|
|
44
|
-
name: string;
|
|
45
|
-
hidden: boolean;
|
|
46
|
-
targetId: string;
|
|
47
|
-
type: string;
|
|
48
|
-
}
|
|
49
|
-
interface IrCategoryLink {
|
|
50
|
-
id: string;
|
|
51
|
-
targetId: string;
|
|
52
|
-
primary: boolean;
|
|
53
|
-
}
|
|
54
|
-
/** Verbatim condition node - not evaluated, retained for the modifier tree. */
|
|
55
|
-
interface IrCondition {
|
|
56
|
-
type: string;
|
|
57
|
-
value: number;
|
|
58
|
-
field: string;
|
|
59
|
-
scope: string;
|
|
60
|
-
childId?: string;
|
|
61
|
-
shared?: boolean;
|
|
62
|
-
includeChildSelections?: boolean;
|
|
63
|
-
percentValue?: boolean;
|
|
64
|
-
}
|
|
65
|
-
interface IrConditionGroup {
|
|
66
|
-
type: string;
|
|
67
|
-
conditions: IrCondition[];
|
|
68
|
-
conditionGroups: IrConditionGroup[];
|
|
69
|
-
}
|
|
70
|
-
/** Verbatim modifier node - not evaluated. */
|
|
71
|
-
interface IrModifier {
|
|
72
|
-
type: string;
|
|
73
|
-
field: string;
|
|
74
|
-
value: string | number;
|
|
75
|
-
conditions: IrCondition[];
|
|
76
|
-
conditionGroups: IrConditionGroup[];
|
|
77
|
-
repeats: IrRepeat[];
|
|
78
|
-
}
|
|
79
|
-
interface IrRepeat {
|
|
80
|
-
value: number;
|
|
81
|
-
repeats: number;
|
|
82
|
-
field: string;
|
|
83
|
-
scope: string;
|
|
84
|
-
childId?: string;
|
|
85
|
-
shared?: boolean;
|
|
86
|
-
includeChildSelections?: boolean;
|
|
87
|
-
roundUp?: boolean;
|
|
88
|
-
}
|
|
89
|
-
type IrEntryType = 'unit' | 'model' | 'upgrade' | 'mount';
|
|
90
|
-
interface IrSelectionEntry {
|
|
91
|
-
id: string;
|
|
92
|
-
name: string;
|
|
93
|
-
hidden: boolean;
|
|
94
|
-
collective: boolean;
|
|
95
|
-
import: boolean;
|
|
96
|
-
type: IrEntryType;
|
|
97
|
-
defaultAmount?: number;
|
|
98
|
-
constraints: IrConstraint[];
|
|
99
|
-
profiles: IrProfile[];
|
|
100
|
-
rules: IrRule[];
|
|
101
|
-
infoLinks: IrInfoLink[];
|
|
102
|
-
categoryLinks: IrCategoryLink[];
|
|
103
|
-
costs: IrCost[];
|
|
104
|
-
modifiers: IrModifier[];
|
|
105
|
-
selectionEntries: IrSelectionEntry[];
|
|
106
|
-
selectionEntryGroups: IrSelectionEntryGroup[];
|
|
107
|
-
entryLinks: IrEntryLink[];
|
|
108
|
-
}
|
|
109
|
-
interface IrSelectionEntryGroup {
|
|
110
|
-
id: string;
|
|
111
|
-
name: string;
|
|
112
|
-
hidden: boolean;
|
|
113
|
-
collective: boolean;
|
|
114
|
-
import: boolean;
|
|
115
|
-
defaultSelectionEntryId?: string;
|
|
116
|
-
constraints: IrConstraint[];
|
|
117
|
-
modifiers: IrModifier[];
|
|
118
|
-
selectionEntries: IrSelectionEntry[];
|
|
119
|
-
selectionEntryGroups: IrSelectionEntryGroup[];
|
|
120
|
-
entryLinks: IrEntryLink[];
|
|
121
|
-
}
|
|
122
|
-
interface IrEntryLink {
|
|
123
|
-
id: string;
|
|
124
|
-
name: string;
|
|
125
|
-
hidden: boolean;
|
|
126
|
-
collective: boolean;
|
|
127
|
-
import: boolean;
|
|
128
|
-
targetId: string;
|
|
129
|
-
type: string;
|
|
130
|
-
defaultAmount?: number;
|
|
131
|
-
comment?: string;
|
|
132
|
-
constraints: IrConstraint[];
|
|
133
|
-
costs: IrCost[];
|
|
134
|
-
modifiers: IrModifier[];
|
|
135
|
-
profiles: IrProfile[];
|
|
136
|
-
infoLinks: IrInfoLink[];
|
|
137
|
-
categoryLinks: IrCategoryLink[];
|
|
138
|
-
selectionEntries: IrSelectionEntry[];
|
|
139
|
-
selectionEntryGroups: IrSelectionEntryGroup[];
|
|
140
|
-
entryLinks: IrEntryLink[];
|
|
141
|
-
}
|
|
142
|
-
interface IrCategoryEntry {
|
|
143
|
-
id: string;
|
|
144
|
-
name: string;
|
|
145
|
-
hidden: boolean;
|
|
146
|
-
}
|
|
147
|
-
interface IrForceCategoryLink {
|
|
148
|
-
id: string;
|
|
149
|
-
targetId: string;
|
|
150
|
-
primary: boolean;
|
|
151
|
-
hidden: boolean;
|
|
152
|
-
constraints: IrConstraint[];
|
|
153
|
-
}
|
|
154
|
-
interface IrForceEntry {
|
|
155
|
-
id: string;
|
|
156
|
-
name: string;
|
|
157
|
-
hidden: boolean;
|
|
158
|
-
categoryLinks: IrForceCategoryLink[];
|
|
159
|
-
rules: IrRule[];
|
|
160
|
-
modifiers: IrModifier[];
|
|
161
|
-
forceEntries: IrForceEntry[];
|
|
162
|
-
}
|
|
163
|
-
interface IrCostType {
|
|
164
|
-
id: string;
|
|
165
|
-
name: string;
|
|
166
|
-
defaultCostLimit: number;
|
|
167
|
-
}
|
|
168
|
-
/** A BSData catalogueLink node: references another catalogue this one imports from. */
|
|
169
|
-
interface IrCatalogueLink {
|
|
170
|
-
id: string;
|
|
171
|
-
name: string;
|
|
172
|
-
targetId: string;
|
|
173
|
-
type: string;
|
|
174
|
-
importRootEntries: boolean;
|
|
175
|
-
}
|
|
176
|
-
interface IrProfileType {
|
|
177
|
-
id: string;
|
|
178
|
-
name: string;
|
|
179
|
-
characteristicTypes: Array<{
|
|
180
|
-
id: string;
|
|
181
|
-
name: string;
|
|
182
|
-
}>;
|
|
183
|
-
}
|
|
184
|
-
interface IrCatalogueRoot {
|
|
185
|
-
costTypes: IrCostType[];
|
|
186
|
-
profileTypes: IrProfileType[];
|
|
187
|
-
categoryEntries: IrCategoryEntry[];
|
|
188
|
-
rules: IrRule[];
|
|
189
|
-
/** Rules from the BSData <sharedRules> element: the canonical rule-definition pool. */
|
|
190
|
-
sharedRules: IrRule[];
|
|
191
|
-
/** Profiles from the BSData <sharedProfiles> element: abilities with Summary/Description characteristics. */
|
|
192
|
-
sharedProfiles: IrProfile[];
|
|
193
|
-
selectionEntries: IrSelectionEntry[];
|
|
194
|
-
sharedSelectionEntries: IrSelectionEntry[];
|
|
195
|
-
sharedSelectionEntryGroups: IrSelectionEntryGroup[];
|
|
196
|
-
entryLinks: IrEntryLink[];
|
|
197
|
-
forceEntries: IrForceEntry[];
|
|
198
|
-
}
|
|
199
|
-
/** A single parsed BSData file (game system or catalogue). */
|
|
200
|
-
interface IrCatalogueFile {
|
|
201
|
-
filename: string;
|
|
202
|
-
kind: 'gameSystem' | 'catalogue';
|
|
203
|
-
id: string;
|
|
204
|
-
name: string;
|
|
205
|
-
gameSystemId?: string;
|
|
206
|
-
catalogueLinks: IrCatalogueLink[];
|
|
207
|
-
root: IrCatalogueRoot;
|
|
208
|
-
}
|
|
209
|
-
/** The whole parsed source set: the game system plus every catalogue. */
|
|
210
|
-
interface Ir {
|
|
211
|
-
gameSystem: IrCatalogueFile;
|
|
212
|
-
catalogues: IrCatalogueFile[];
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
declare function parseToIr(files: Record<string, string>): Ir;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* IR -> downstream projection.
|
|
219
|
-
*
|
|
220
|
-
* Projects the faithful IR into the flattened, ready-to-consume shape the downstream application
|
|
221
|
-
* needs. ALL domain interpretation lives here; the IR and parser stay domain-agnostic. The concrete
|
|
222
|
-
* projector and its reference data are supplied locally and are never committed to this repo (see
|
|
223
|
-
* README) -- this repo ships the framework, not any specific data model.
|
|
224
|
-
*
|
|
225
|
-
* "Superset" is the contract: the projection MUST reproduce every field the reference output carries
|
|
226
|
-
* (so the existing consumer keeps working unchanged), and MAY add fields the current consumer lacks.
|
|
227
|
-
* The golden-diff harness asserts the reproduction half; new fields are additive and ignored.
|
|
228
|
-
*
|
|
229
|
-
* STUB. Supply a local implementation that imports your projector modules. The local file is
|
|
230
|
-
* gitignored so it never reaches this public repo. See CLAUDE.md for the hygiene rule.
|
|
231
|
-
*/
|
|
232
|
-
declare function projectCatalogue(_ir: Ir): Record<string, unknown>;
|
|
233
|
-
|
|
234
1
|
/**
|
|
235
2
|
* Public entry point. `filename -> XML` map in, projected output object out. The signature matches
|
|
236
3
|
* the downstream consumer's existing build step so this can be wired in incrementally (swap the
|
|
237
4
|
* import, keep the golden diff green) without touching the consumer.
|
|
238
5
|
*/
|
|
239
|
-
declare function buildCatalogue(files: Record<string, string>): Record<string, unknown>;
|
|
240
|
-
|
|
241
|
-
export {
|
|
6
|
+
export declare function buildCatalogue(files: Record<string, string>): Record<string, unknown>;
|
|
7
|
+
export { parseToIr } from './parse/index';
|
|
8
|
+
export { projectCatalogue } from './project/catalogue';
|
|
9
|
+
export type { Ir, IrCatalogueFile, IrModifierGroup } from './ir/types';
|