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
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { XMLParser } from 'fast-xml-parser';
|
|
2
|
+
const ALWAYS_ARRAY = new Set([
|
|
3
|
+
'selectionEntry', 'selectionEntryGroup', 'entryLink',
|
|
4
|
+
'constraint', 'profile', 'characteristic', 'characteristicType',
|
|
5
|
+
'cost', 'costType', 'profileType',
|
|
6
|
+
'rule', 'categoryLink', 'categoryEntry',
|
|
7
|
+
'infoLink', 'modifier', 'condition', 'conditionGroup', 'repeat',
|
|
8
|
+
'forceEntry', 'catalogueLink', 'modifierGroup',
|
|
9
|
+
]);
|
|
10
|
+
const xmlParser = new XMLParser({
|
|
11
|
+
ignoreAttributes: false,
|
|
12
|
+
attributeNamePrefix: '@_',
|
|
13
|
+
textNodeName: '#text',
|
|
14
|
+
isArray: (name) => ALWAYS_ARRAY.has(name),
|
|
15
|
+
parseAttributeValue: true,
|
|
16
|
+
});
|
|
17
|
+
// ---- helpers ----
|
|
18
|
+
function arr(v) {
|
|
19
|
+
if (!v)
|
|
20
|
+
return [];
|
|
21
|
+
if (Array.isArray(v))
|
|
22
|
+
return v;
|
|
23
|
+
return [v];
|
|
24
|
+
}
|
|
25
|
+
function bool(v) {
|
|
26
|
+
return v === true || v === 'true';
|
|
27
|
+
}
|
|
28
|
+
// ---- primitive node parsers ----
|
|
29
|
+
function parseConstraint(n) {
|
|
30
|
+
return {
|
|
31
|
+
id: String(n['@_id'] ?? ''),
|
|
32
|
+
type: n['@_type'] === 'min' ? 'min' : 'max',
|
|
33
|
+
value: Number(n['@_value'] ?? 0),
|
|
34
|
+
scope: String(n['@_scope'] ?? ''),
|
|
35
|
+
field: String(n['@_field'] ?? 'selections'),
|
|
36
|
+
shared: bool(n['@_shared']),
|
|
37
|
+
includeChildSelections: bool(n['@_includeChildSelections']),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function parseCost(n) {
|
|
41
|
+
return {
|
|
42
|
+
name: String(n['@_name'] ?? ''),
|
|
43
|
+
typeId: String(n['@_typeId'] ?? ''),
|
|
44
|
+
value: Number(n['@_value'] ?? 0),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function parseCharacteristic(n) {
|
|
48
|
+
const raw = n['#text'];
|
|
49
|
+
return {
|
|
50
|
+
name: String(n['@_name'] ?? ''),
|
|
51
|
+
typeId: String(n['@_typeId'] ?? ''),
|
|
52
|
+
value: raw != null ? String(raw) : '',
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
function parseProfile(n) {
|
|
56
|
+
return {
|
|
57
|
+
id: String(n['@_id'] ?? ''),
|
|
58
|
+
name: String(n['@_name'] ?? ''),
|
|
59
|
+
hidden: bool(n['@_hidden']),
|
|
60
|
+
typeId: String(n['@_typeId'] ?? ''),
|
|
61
|
+
typeName: String(n['@_typeName'] ?? ''),
|
|
62
|
+
characteristics: arr(n.characteristics?.characteristic).map(parseCharacteristic),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function parseRule(n) {
|
|
66
|
+
return {
|
|
67
|
+
id: String(n['@_id'] ?? ''),
|
|
68
|
+
name: String(n['@_name'] ?? ''),
|
|
69
|
+
hidden: bool(n['@_hidden']),
|
|
70
|
+
description: n.description != null ? String(n.description) : '',
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function parseInfoLink(n) {
|
|
74
|
+
return {
|
|
75
|
+
id: String(n['@_id'] ?? ''),
|
|
76
|
+
name: String(n['@_name'] ?? ''),
|
|
77
|
+
hidden: bool(n['@_hidden']),
|
|
78
|
+
targetId: String(n['@_targetId'] ?? ''),
|
|
79
|
+
type: String(n['@_type'] ?? ''),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function parseCategoryLink(n) {
|
|
83
|
+
return {
|
|
84
|
+
id: String(n['@_id'] ?? ''),
|
|
85
|
+
targetId: String(n['@_targetId'] ?? ''),
|
|
86
|
+
primary: bool(n['@_primary']),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function parseCondition(n) {
|
|
90
|
+
const out = {
|
|
91
|
+
type: String(n['@_type'] ?? ''),
|
|
92
|
+
value: Number(n['@_value'] ?? 0),
|
|
93
|
+
field: String(n['@_field'] ?? ''),
|
|
94
|
+
scope: String(n['@_scope'] ?? ''),
|
|
95
|
+
};
|
|
96
|
+
if (n['@_childId'] != null)
|
|
97
|
+
out.childId = String(n['@_childId']);
|
|
98
|
+
if (n['@_shared'] != null)
|
|
99
|
+
out.shared = bool(n['@_shared']);
|
|
100
|
+
if (n['@_includeChildSelections'] != null)
|
|
101
|
+
out.includeChildSelections = bool(n['@_includeChildSelections']);
|
|
102
|
+
if (n['@_percentValue'] != null)
|
|
103
|
+
out.percentValue = bool(n['@_percentValue']);
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
106
|
+
function parseConditionGroup(n) {
|
|
107
|
+
return {
|
|
108
|
+
type: String(n['@_type'] ?? ''),
|
|
109
|
+
conditions: arr(n.conditions?.condition).map(parseCondition),
|
|
110
|
+
conditionGroups: arr(n.conditionGroups?.conditionGroup).map(parseConditionGroup),
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function parseRepeat(n) {
|
|
114
|
+
const out = {
|
|
115
|
+
value: Number(n['@_value'] ?? 0),
|
|
116
|
+
repeats: Number(n['@_repeats'] ?? 0),
|
|
117
|
+
field: String(n['@_field'] ?? ''),
|
|
118
|
+
scope: String(n['@_scope'] ?? ''),
|
|
119
|
+
};
|
|
120
|
+
if (n['@_childId'] != null)
|
|
121
|
+
out.childId = String(n['@_childId']);
|
|
122
|
+
if (n['@_shared'] != null)
|
|
123
|
+
out.shared = bool(n['@_shared']);
|
|
124
|
+
if (n['@_includeChildSelections'] != null)
|
|
125
|
+
out.includeChildSelections = bool(n['@_includeChildSelections']);
|
|
126
|
+
if (n['@_roundUp'] != null)
|
|
127
|
+
out.roundUp = bool(n['@_roundUp']);
|
|
128
|
+
return out;
|
|
129
|
+
}
|
|
130
|
+
function parseModifier(n) {
|
|
131
|
+
return {
|
|
132
|
+
type: String(n['@_type'] ?? ''),
|
|
133
|
+
field: String(n['@_field'] ?? ''),
|
|
134
|
+
value: n['@_value'] ?? '',
|
|
135
|
+
conditions: arr(n.conditions?.condition).map(parseCondition),
|
|
136
|
+
conditionGroups: arr(n.conditionGroups?.conditionGroup).map(parseConditionGroup),
|
|
137
|
+
repeats: arr(n.repeats?.repeat).map(parseRepeat),
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function parseModifierGroup(n) {
|
|
141
|
+
return {
|
|
142
|
+
type: String(n['@_type'] ?? 'and'),
|
|
143
|
+
modifiers: arr(n.modifiers?.modifier).map(parseModifier),
|
|
144
|
+
conditions: arr(n.conditions?.condition).map(parseCondition),
|
|
145
|
+
conditionGroups: arr(n.conditionGroups?.conditionGroup).map(parseConditionGroup),
|
|
146
|
+
modifierGroups: arr(n.modifierGroups?.modifierGroup).map(parseModifierGroup),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
// ---- structural node parsers (mutually recursive) ----
|
|
150
|
+
function parseSelectionEntry(n) {
|
|
151
|
+
const mg = arr(n.modifierGroups?.modifierGroup).map(parseModifierGroup);
|
|
152
|
+
return {
|
|
153
|
+
id: String(n['@_id'] ?? ''),
|
|
154
|
+
name: String(n['@_name'] ?? ''),
|
|
155
|
+
hidden: bool(n['@_hidden']),
|
|
156
|
+
collective: bool(n['@_collective']),
|
|
157
|
+
import: bool(n['@_import']),
|
|
158
|
+
type: (n['@_type'] ?? 'upgrade'),
|
|
159
|
+
...(n['@_defaultAmount'] != null ? { defaultAmount: Number(n['@_defaultAmount']) } : {}),
|
|
160
|
+
constraints: arr(n.constraints?.constraint).map(parseConstraint),
|
|
161
|
+
profiles: arr(n.profiles?.profile).map(parseProfile),
|
|
162
|
+
rules: arr(n.rules?.rule).map(parseRule),
|
|
163
|
+
infoLinks: arr(n.infoLinks?.infoLink).map(parseInfoLink),
|
|
164
|
+
categoryLinks: arr(n.categoryLinks?.categoryLink).map(parseCategoryLink),
|
|
165
|
+
costs: arr(n.costs?.cost).map(parseCost),
|
|
166
|
+
modifiers: arr(n.modifiers?.modifier).map(parseModifier),
|
|
167
|
+
...(mg.length > 0 ? { modifierGroups: mg } : {}),
|
|
168
|
+
selectionEntries: arr(n.selectionEntries?.selectionEntry).map(parseSelectionEntry),
|
|
169
|
+
selectionEntryGroups: arr(n.selectionEntryGroups?.selectionEntryGroup).map(parseSelectionEntryGroup),
|
|
170
|
+
entryLinks: arr(n.entryLinks?.entryLink).map(parseEntryLink),
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
function parseSelectionEntryGroup(n) {
|
|
174
|
+
const mg = arr(n.modifierGroups?.modifierGroup).map(parseModifierGroup);
|
|
175
|
+
return {
|
|
176
|
+
id: String(n['@_id'] ?? ''),
|
|
177
|
+
name: String(n['@_name'] ?? ''),
|
|
178
|
+
hidden: bool(n['@_hidden']),
|
|
179
|
+
collective: bool(n['@_collective']),
|
|
180
|
+
import: bool(n['@_import']),
|
|
181
|
+
...(n['@_defaultSelectionEntryId'] != null
|
|
182
|
+
? { defaultSelectionEntryId: String(n['@_defaultSelectionEntryId']) }
|
|
183
|
+
: {}),
|
|
184
|
+
constraints: arr(n.constraints?.constraint).map(parseConstraint),
|
|
185
|
+
modifiers: arr(n.modifiers?.modifier).map(parseModifier),
|
|
186
|
+
...(mg.length > 0 ? { modifierGroups: mg } : {}),
|
|
187
|
+
selectionEntries: arr(n.selectionEntries?.selectionEntry).map(parseSelectionEntry),
|
|
188
|
+
selectionEntryGroups: arr(n.selectionEntryGroups?.selectionEntryGroup).map(parseSelectionEntryGroup),
|
|
189
|
+
entryLinks: arr(n.entryLinks?.entryLink).map(parseEntryLink),
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function parseEntryLink(n) {
|
|
193
|
+
const mg = arr(n.modifierGroups?.modifierGroup).map(parseModifierGroup);
|
|
194
|
+
return {
|
|
195
|
+
id: String(n['@_id'] ?? ''),
|
|
196
|
+
name: String(n['@_name'] ?? ''),
|
|
197
|
+
hidden: bool(n['@_hidden']),
|
|
198
|
+
collective: bool(n['@_collective']),
|
|
199
|
+
import: bool(n['@_import']),
|
|
200
|
+
flatten: bool(n['@_flatten']),
|
|
201
|
+
targetId: String(n['@_targetId'] ?? ''),
|
|
202
|
+
type: String(n['@_type'] ?? ''),
|
|
203
|
+
...(n['@_defaultAmount'] != null ? { defaultAmount: Number(n['@_defaultAmount']) } : {}),
|
|
204
|
+
...(n.comment != null ? { comment: String(n.comment).trim() } : {}),
|
|
205
|
+
constraints: arr(n.constraints?.constraint).map(parseConstraint),
|
|
206
|
+
costs: arr(n.costs?.cost).map(parseCost),
|
|
207
|
+
modifiers: arr(n.modifiers?.modifier).map(parseModifier),
|
|
208
|
+
...(mg.length > 0 ? { modifierGroups: mg } : {}),
|
|
209
|
+
profiles: arr(n.profiles?.profile).map(parseProfile),
|
|
210
|
+
infoLinks: arr(n.infoLinks?.infoLink).map(parseInfoLink),
|
|
211
|
+
categoryLinks: arr(n.categoryLinks?.categoryLink).map(parseCategoryLink),
|
|
212
|
+
selectionEntries: arr(n.selectionEntries?.selectionEntry).map(parseSelectionEntry),
|
|
213
|
+
selectionEntryGroups: arr(n.selectionEntryGroups?.selectionEntryGroup).map(parseSelectionEntryGroup),
|
|
214
|
+
entryLinks: arr(n.entryLinks?.entryLink).map(parseEntryLink),
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
// ---- force entry parsers ----
|
|
218
|
+
function parseForceCategoryLink(n) {
|
|
219
|
+
return {
|
|
220
|
+
id: String(n['@_id'] ?? ''),
|
|
221
|
+
targetId: String(n['@_targetId'] ?? ''),
|
|
222
|
+
primary: bool(n['@_primary']),
|
|
223
|
+
hidden: bool(n['@_hidden']),
|
|
224
|
+
constraints: arr(n.constraints?.constraint).map(parseConstraint),
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
function parseForceEntry(n) {
|
|
228
|
+
return {
|
|
229
|
+
id: String(n['@_id'] ?? ''),
|
|
230
|
+
name: String(n['@_name'] ?? ''),
|
|
231
|
+
hidden: bool(n['@_hidden']),
|
|
232
|
+
constraints: arr(n.constraints?.constraint).map(parseConstraint),
|
|
233
|
+
categoryLinks: arr(n.categoryLinks?.categoryLink).map(parseForceCategoryLink),
|
|
234
|
+
rules: arr(n.rules?.rule).map(parseRule),
|
|
235
|
+
modifiers: arr(n.modifiers?.modifier).map(parseModifier),
|
|
236
|
+
forceEntries: arr(n.forceEntries?.forceEntry).map(parseForceEntry),
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
// ---- catalogue link parser ----
|
|
240
|
+
function parseCatalogueLink(n) {
|
|
241
|
+
return {
|
|
242
|
+
id: String(n['@_id'] ?? ''),
|
|
243
|
+
name: String(n['@_name'] ?? ''),
|
|
244
|
+
targetId: String(n['@_targetId'] ?? ''),
|
|
245
|
+
type: String(n['@_type'] ?? ''),
|
|
246
|
+
importRootEntries: bool(n['@_importRootEntries']),
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
// ---- catalogue root ----
|
|
250
|
+
function parseCatalogueRoot(r) {
|
|
251
|
+
return {
|
|
252
|
+
costTypes: arr(r.costTypes?.costType).map((n) => ({
|
|
253
|
+
id: String(n['@_id'] ?? ''),
|
|
254
|
+
name: String(n['@_name'] ?? ''),
|
|
255
|
+
defaultCostLimit: Number(n['@_defaultCostLimit'] ?? -1),
|
|
256
|
+
})),
|
|
257
|
+
profileTypes: arr(r.profileTypes?.profileType).map((n) => ({
|
|
258
|
+
id: String(n['@_id'] ?? ''),
|
|
259
|
+
name: String(n['@_name'] ?? ''),
|
|
260
|
+
characteristicTypes: arr(n.characteristicTypes?.characteristicType).map((c) => ({
|
|
261
|
+
id: String(c['@_id'] ?? ''),
|
|
262
|
+
name: String(c['@_name'] ?? ''),
|
|
263
|
+
})),
|
|
264
|
+
})),
|
|
265
|
+
categoryEntries: arr(r.categoryEntries?.categoryEntry).map((n) => ({
|
|
266
|
+
id: String(n['@_id'] ?? ''),
|
|
267
|
+
name: String(n['@_name'] ?? ''),
|
|
268
|
+
hidden: bool(n['@_hidden']),
|
|
269
|
+
})),
|
|
270
|
+
rules: arr(r.rules?.rule).map(parseRule),
|
|
271
|
+
sharedRules: arr(r.sharedRules?.rule).map(parseRule),
|
|
272
|
+
sharedProfiles: arr(r.sharedProfiles?.profile).map(parseProfile),
|
|
273
|
+
selectionEntries: arr(r.selectionEntries?.selectionEntry).map(parseSelectionEntry),
|
|
274
|
+
sharedSelectionEntries: arr(r.sharedSelectionEntries?.selectionEntry).map(parseSelectionEntry),
|
|
275
|
+
sharedSelectionEntryGroups: arr(r.sharedSelectionEntryGroups?.selectionEntryGroup).map(parseSelectionEntryGroup),
|
|
276
|
+
entryLinks: arr(r.entryLinks?.entryLink).map(parseEntryLink),
|
|
277
|
+
forceEntries: arr(r.forceEntries?.forceEntry).map(parseForceEntry),
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
// ---- public entry ----
|
|
281
|
+
export function parseFile(filename, xml) {
|
|
282
|
+
const doc = xmlParser.parse(xml);
|
|
283
|
+
const isGst = 'gameSystem' in doc;
|
|
284
|
+
const root = isGst ? doc.gameSystem : doc.catalogue;
|
|
285
|
+
const kind = isGst ? 'gameSystem' : 'catalogue';
|
|
286
|
+
return {
|
|
287
|
+
filename,
|
|
288
|
+
kind,
|
|
289
|
+
id: String(root['@_id'] ?? ''),
|
|
290
|
+
name: String(root['@_name'] ?? ''),
|
|
291
|
+
...(root['@_gameSystemId'] != null ? { gameSystemId: String(root['@_gameSystemId']) } : {}),
|
|
292
|
+
catalogueLinks: arr(root.catalogueLinks?.catalogueLink).map(parseCatalogueLink),
|
|
293
|
+
root: parseCatalogueRoot(root),
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
//# sourceMappingURL=xml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml.js","sourceRoot":"","sources":["../../src/parse/xml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAa3C,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC3B,gBAAgB,EAAE,qBAAqB,EAAE,WAAW;IACpD,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,oBAAoB;IAC/D,MAAM,EAAE,UAAU,EAAE,aAAa;IACjC,MAAM,EAAE,cAAc,EAAE,eAAe;IACvC,UAAU,EAAE,UAAU,EAAE,WAAW,EAAE,gBAAgB,EAAE,QAAQ;IAC/D,YAAY,EAAE,eAAe,EAAE,eAAe;CAC/C,CAAC,CAAA;AAEF,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC;IAC9B,gBAAgB,EAAE,KAAK;IACvB,mBAAmB,EAAE,IAAI;IACzB,YAAY,EAAE,OAAO;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;IACzC,mBAAmB,EAAE,IAAI;CAC1B,CAAC,CAAA;AAEF,oBAAoB;AAEpB,SAAS,GAAG,CAAI,CAAU;IACxB,IAAI,CAAC,CAAC;QAAE,OAAO,EAAE,CAAA;IACjB,IAAI,KAAK,CAAC,O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C,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3F,cAAc,EAAE,GAAG,CAAM,IAAI,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC,GAAG,CAAC,kBAAkB,CAAC;QACpF,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC;KAC/B,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Ir } from '../ir/types';
|
|
2
|
+
/**
|
|
3
|
+
* IR -> downstream projection.
|
|
4
|
+
*
|
|
5
|
+
* Projects the faithful IR into the flattened, ready-to-consume shape the downstream application
|
|
6
|
+
* needs. ALL domain interpretation lives here; the IR and parser stay domain-agnostic. The concrete
|
|
7
|
+
* projector and its reference data are supplied locally and are never committed to this repo (see
|
|
8
|
+
* README) -- this repo ships the framework, not any specific data model.
|
|
9
|
+
*
|
|
10
|
+
* "Superset" is the contract: the projection MUST reproduce every field the reference output carries
|
|
11
|
+
* (so the existing consumer keeps working unchanged), and MAY add fields the current consumer lacks.
|
|
12
|
+
* The golden-diff harness asserts the reproduction half; new fields are additive and ignored.
|
|
13
|
+
*
|
|
14
|
+
* STUB. Supply a local implementation that imports your projector modules. The local file is
|
|
15
|
+
* gitignored so it never reaches this public repo. See CLAUDE.md for the hygiene rule.
|
|
16
|
+
*/
|
|
17
|
+
export declare function projectCatalogue(_ir: Ir): Record<string, unknown>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IR -> downstream projection.
|
|
3
|
+
*
|
|
4
|
+
* Projects the faithful IR into the flattened, ready-to-consume shape the downstream application
|
|
5
|
+
* needs. ALL domain interpretation lives here; the IR and parser stay domain-agnostic. The concrete
|
|
6
|
+
* projector and its reference data are supplied locally and are never committed to this repo (see
|
|
7
|
+
* README) -- this repo ships the framework, not any specific data model.
|
|
8
|
+
*
|
|
9
|
+
* "Superset" is the contract: the projection MUST reproduce every field the reference output carries
|
|
10
|
+
* (so the existing consumer keeps working unchanged), and MAY add fields the current consumer lacks.
|
|
11
|
+
* The golden-diff harness asserts the reproduction half; new fields are additive and ignored.
|
|
12
|
+
*
|
|
13
|
+
* STUB. Supply a local implementation that imports your projector modules. The local file is
|
|
14
|
+
* gitignored so it never reaches this public repo. See CLAUDE.md for the hygiene rule.
|
|
15
|
+
*/
|
|
16
|
+
export function projectCatalogue(_ir) {
|
|
17
|
+
return {};
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=catalogue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalogue.js","sourceRoot":"","sources":["../../src/project/catalogue.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAO;IACtC,OAAO,EAAE,CAAA;AACX,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,43 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bsdata-parser",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"description": "Faithful BSData .gst/.cat XML parser: parses game-data source files into a typed IR and exposes a golden-diff harness for validating a downstream projection.",
|
|
7
|
-
"keywords": ["bsdata", "battlescribe", "parser", "xml", "game-data"],
|
|
8
6
|
"repository": {
|
|
9
7
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/aodhan-dev/bsdata-parser.git"
|
|
8
|
+
"url": "git+https://github.com/aodhan-dev/bsdata-parser.git"
|
|
11
9
|
},
|
|
12
10
|
"main": "./dist/index.js",
|
|
13
11
|
"types": "./dist/index.d.ts",
|
|
14
|
-
"exports": {
|
|
15
|
-
".": {
|
|
16
|
-
"import": "./dist/index.js",
|
|
17
|
-
"types": "./dist/index.d.ts"
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
12
|
"files": [
|
|
21
13
|
"dist"
|
|
22
14
|
],
|
|
23
15
|
"scripts": {
|
|
24
|
-
"
|
|
25
|
-
"prepublishOnly": "git diff --quiet HEAD -- src/project/catalogue.ts || (echo 'ERROR: catalogue.ts has local changes (skip-worktree). Publish via the CI publish workflow on a version tag, not locally.' && exit 1)",
|
|
16
|
+
"typecheck": "tsc -p tsconfig.build.json --noEmit",
|
|
26
17
|
"test": "vitest run",
|
|
27
|
-
"
|
|
28
|
-
"typecheck": "tsc --noEmit"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
31
|
-
"@types/node": "^20.19.41",
|
|
32
|
-
"tsup": "^8.5.1",
|
|
33
|
-
"tsx": "^4.0.0",
|
|
34
|
-
"typescript": "^5.3.0",
|
|
35
|
-
"vitest": "^1.6.1"
|
|
18
|
+
"build": "tsc -p tsconfig.build.json"
|
|
36
19
|
},
|
|
37
20
|
"dependencies": {
|
|
38
21
|
"fast-xml-parser": "^4.5.6"
|
|
39
22
|
},
|
|
40
|
-
"
|
|
41
|
-
"
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"typescript": "^5.3.0",
|
|
25
|
+
"@types/node": "^20.19.41",
|
|
26
|
+
"vitest": "^1.6.1"
|
|
42
27
|
}
|
|
43
28
|
}
|