@ifc-lite/ids 1.14.11 → 1.15.1
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/dist/audit/coherence/index.d.ts +12 -0
- package/dist/audit/coherence/index.d.ts.map +1 -0
- package/dist/audit/coherence/index.js +392 -0
- package/dist/audit/coherence/index.js.map +1 -0
- package/dist/audit/coherence/regex.d.ts +57 -0
- package/dist/audit/coherence/regex.d.ts.map +1 -0
- package/dist/audit/coherence/regex.js +111 -0
- package/dist/audit/coherence/regex.js.map +1 -0
- package/dist/audit/ifc-schema/index.d.ts +4 -0
- package/dist/audit/ifc-schema/index.d.ts.map +1 -0
- package/dist/audit/ifc-schema/index.js +637 -0
- package/dist/audit/ifc-schema/index.js.map +1 -0
- package/dist/audit/index.d.ts +37 -0
- package/dist/audit/index.d.ts.map +1 -0
- package/dist/audit/index.js +60 -0
- package/dist/audit/index.js.map +1 -0
- package/dist/audit/parser-shim.d.ts +13 -0
- package/dist/audit/parser-shim.d.ts.map +1 -0
- package/dist/audit/parser-shim.js +66 -0
- package/dist/audit/parser-shim.js.map +1 -0
- package/dist/audit/structural/index.d.ts +22 -0
- package/dist/audit/structural/index.d.ts.map +1 -0
- package/dist/audit/structural/index.js +441 -0
- package/dist/audit/structural/index.js.map +1 -0
- package/dist/audit/types.d.ts +91 -0
- package/dist/audit/types.d.ts.map +1 -0
- package/dist/audit/types.js +5 -0
- package/dist/audit/types.js.map +1 -0
- package/dist/audit/xsd/index.d.ts +13 -0
- package/dist/audit/xsd/index.d.ts.map +1 -0
- package/dist/audit/xsd/index.js +203 -0
- package/dist/audit/xsd/index.js.map +1 -0
- package/dist/bridge/classifications.d.ts +15 -0
- package/dist/bridge/classifications.d.ts.map +1 -0
- package/dist/bridge/classifications.js +114 -0
- package/dist/bridge/classifications.js.map +1 -0
- package/dist/bridge/data-accessor.d.ts +16 -0
- package/dist/bridge/data-accessor.d.ts.map +1 -0
- package/dist/bridge/data-accessor.js +205 -0
- package/dist/bridge/data-accessor.js.map +1 -0
- package/dist/bridge/data-types.d.ts +11 -0
- package/dist/bridge/data-types.d.ts.map +1 -0
- package/dist/bridge/data-types.js +47 -0
- package/dist/bridge/data-types.js.map +1 -0
- package/dist/bridge/index.d.ts +17 -0
- package/dist/bridge/index.d.ts.map +1 -0
- package/dist/bridge/index.js +20 -0
- package/dist/bridge/index.js.map +1 -0
- package/dist/bridge/materials.d.ts +11 -0
- package/dist/bridge/materials.d.ts.map +1 -0
- package/dist/bridge/materials.js +68 -0
- package/dist/bridge/materials.js.map +1 -0
- package/dist/bridge/predefined-types.d.ts +19 -0
- package/dist/bridge/predefined-types.d.ts.map +1 -0
- package/dist/bridge/predefined-types.js +84 -0
- package/dist/bridge/predefined-types.js.map +1 -0
- package/dist/bridge/properties.d.ts +20 -0
- package/dist/bridge/properties.d.ts.map +1 -0
- package/dist/bridge/properties.js +168 -0
- package/dist/bridge/properties.js.map +1 -0
- package/dist/bridge/schema-version.d.ts +10 -0
- package/dist/bridge/schema-version.d.ts.map +1 -0
- package/dist/bridge/schema-version.js +25 -0
- package/dist/bridge/schema-version.js.map +1 -0
- package/dist/bridge/units.d.ts +18 -0
- package/dist/bridge/units.d.ts.map +1 -0
- package/dist/bridge/units.js +55 -0
- package/dist/bridge/units.js.map +1 -0
- package/dist/constraints/comparators.d.ts +32 -0
- package/dist/constraints/comparators.d.ts.map +1 -0
- package/dist/constraints/comparators.js +94 -0
- package/dist/constraints/comparators.js.map +1 -0
- package/dist/constraints/index.d.ts.map +1 -1
- package/dist/constraints/index.js +68 -54
- package/dist/constraints/index.js.map +1 -1
- package/dist/constraints/xsd-cast.d.ts +20 -0
- package/dist/constraints/xsd-cast.d.ts.map +1 -0
- package/dist/constraints/xsd-cast.js +89 -0
- package/dist/constraints/xsd-cast.js.map +1 -0
- package/dist/facets/attribute-facet.d.ts.map +1 -1
- package/dist/facets/attribute-facet.js +51 -4
- package/dist/facets/attribute-facet.js.map +1 -1
- package/dist/facets/entity-facet.d.ts.map +1 -1
- package/dist/facets/entity-facet.js +55 -5
- package/dist/facets/entity-facet.js.map +1 -1
- package/dist/facets/partof-facet.d.ts.map +1 -1
- package/dist/facets/partof-facet.js +33 -3
- package/dist/facets/partof-facet.js.map +1 -1
- package/dist/facets/property-facet.d.ts.map +1 -1
- package/dist/facets/property-facet.js +119 -25
- package/dist/facets/property-facet.js.map +1 -1
- package/dist/facets/test-helpers.d.ts +7 -1
- package/dist/facets/test-helpers.d.ts.map +1 -1
- package/dist/facets/test-helpers.js +4 -0
- package/dist/facets/test-helpers.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/parser/xml-parser.d.ts.map +1 -1
- package/dist/parser/xml-parser.js +166 -64
- package/dist/parser/xml-parser.js.map +1 -1
- package/dist/translation/locales/de.d.ts +1 -0
- package/dist/translation/locales/de.d.ts.map +1 -1
- package/dist/translation/locales/de.js +1 -0
- package/dist/translation/locales/de.js.map +1 -1
- package/dist/translation/locales/en.d.ts +1 -0
- package/dist/translation/locales/en.d.ts.map +1 -1
- package/dist/translation/locales/en.js +1 -0
- package/dist/translation/locales/en.js.map +1 -1
- package/dist/translation/locales/fr.d.ts +1 -0
- package/dist/translation/locales/fr.d.ts.map +1 -1
- package/dist/translation/locales/fr.js +1 -0
- package/dist/translation/locales/fr.js.map +1 -1
- package/dist/types.d.ts +115 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/validation/validator.js +45 -3
- package/dist/validation/validator.js.map +1 -1
- package/package.json +7 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Restriction & cardinality coherence checks.
|
|
3
|
+
*
|
|
4
|
+
* Catches authoring mistakes that aren't strictly XSD violations but
|
|
5
|
+
* make a specification ill-formed in practice — empty enumerations,
|
|
6
|
+
* inverted bounds, regex patterns that don't compile, prohibited
|
|
7
|
+
* cardinality on applicability blocks, etc.
|
|
8
|
+
*/
|
|
9
|
+
import type { IDSDocument } from '../../types.js';
|
|
10
|
+
import type { IDSAuditIssue } from '../types.js';
|
|
11
|
+
export declare function runCoherenceAudit(doc: IDSDocument): IDSAuditIssue[];
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/audit/coherence/index.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAEV,WAAW,EAIZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,GAAG,aAAa,EAAE,CAMnE"}
|
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
import { compileXsdRegex } from './regex.js';
|
|
5
|
+
export function runCoherenceAudit(doc) {
|
|
6
|
+
const issues = [];
|
|
7
|
+
doc.specifications.forEach((spec, i) => {
|
|
8
|
+
auditSpec(spec, `specifications[${i}]`, issues);
|
|
9
|
+
});
|
|
10
|
+
return issues;
|
|
11
|
+
}
|
|
12
|
+
function auditSpec(spec, path, issues) {
|
|
13
|
+
// minOccurs / maxOccurs sanity. Spec parses them as numbers (or
|
|
14
|
+
// 'unbounded'); both must be >= 0 and the order must hold.
|
|
15
|
+
const min = spec.minOccurs;
|
|
16
|
+
const max = spec.maxOccurs;
|
|
17
|
+
if (min !== undefined && (!Number.isInteger(min) || min < 0)) {
|
|
18
|
+
issues.push({
|
|
19
|
+
severity: 'error',
|
|
20
|
+
code: 'E_CARDINALITY_INVALID',
|
|
21
|
+
message: `minOccurs must be a non-negative integer; got ${min}`,
|
|
22
|
+
path: `${path}.minOccurs`,
|
|
23
|
+
detail: { value: String(min) },
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (max !== undefined && max !== 'unbounded') {
|
|
27
|
+
if (!Number.isInteger(max) || max < 0) {
|
|
28
|
+
issues.push({
|
|
29
|
+
severity: 'error',
|
|
30
|
+
code: 'E_CARDINALITY_INVALID',
|
|
31
|
+
message: `maxOccurs must be a non-negative integer or "unbounded"; got ${max}`,
|
|
32
|
+
path: `${path}.maxOccurs`,
|
|
33
|
+
detail: { value: String(max) },
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
if (typeof min === 'number' &&
|
|
38
|
+
typeof max === 'number' &&
|
|
39
|
+
min > max) {
|
|
40
|
+
issues.push({
|
|
41
|
+
severity: 'error',
|
|
42
|
+
code: 'E_CARDINALITY_INVALID',
|
|
43
|
+
message: `minOccurs (${min}) is greater than maxOccurs (${max})`,
|
|
44
|
+
path: `${path}.minOccurs`,
|
|
45
|
+
detail: { min: min, max: max },
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
// Upstream IDS-Audit-tool flags `cardinality` on `<applicability>` —
|
|
49
|
+
// it's meaningless there. (Report 202)
|
|
50
|
+
if (spec.applicability.cardinality) {
|
|
51
|
+
issues.push({
|
|
52
|
+
severity: 'warning',
|
|
53
|
+
code: 'W_CARDINALITY_PROHIBITED_APPLICABILITY',
|
|
54
|
+
message: `cardinality="${spec.applicability.cardinality}" has no effect on <applicability>`,
|
|
55
|
+
path: `${path}.applicability.cardinality`,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
spec.applicability.facets.forEach((facet, fi) => {
|
|
59
|
+
auditFacetConstraints(facet, `${path}.applicability.facets[${fi}]`, issues);
|
|
60
|
+
});
|
|
61
|
+
spec.requirements.forEach((req, ri) => {
|
|
62
|
+
auditFacetConstraints(req.facet, `${path}.requirements[${ri}]`, issues);
|
|
63
|
+
auditRequirementCardinality(req, `${path}.requirements[${ri}]`, issues);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Cardinality coherence on a requirement facet (Report 202 upstream).
|
|
68
|
+
*
|
|
69
|
+
* Per upstream IDS-Audit-tool:
|
|
70
|
+
* - `cardinality="optional"` on a `<property>` requires `@dataType`.
|
|
71
|
+
* - `cardinality="prohibited"` on a `<property>` is incompatible with
|
|
72
|
+
* `@dataType` (the property must not exist at all).
|
|
73
|
+
* - `cardinality="optional"` on `<material>`, `<classification>` and
|
|
74
|
+
* `<partOf>` requires a value/system/entity to be specified — an
|
|
75
|
+
* `optional` facet without a constraint is meaningless.
|
|
76
|
+
*/
|
|
77
|
+
function auditRequirementCardinality(req, path, issues) {
|
|
78
|
+
// The XSD `conditionalCardinality` / `simpleCardinality` enums are
|
|
79
|
+
// case-sensitive lowercase: `required`, `optional`, `prohibited`. The
|
|
80
|
+
// parser preserves the raw value when it didn't match exactly so we
|
|
81
|
+
// can flag mistakes here (`Required`, `Invalid`, empty string, …)
|
|
82
|
+
// rather than silently defaulting to `required`.
|
|
83
|
+
if (req.cardinalityRaw !== undefined) {
|
|
84
|
+
issues.push({
|
|
85
|
+
severity: 'error',
|
|
86
|
+
code: 'E_CARDINALITY_INVALID',
|
|
87
|
+
message: `@cardinality="${req.cardinalityRaw}" is not a valid value; expected one of {required, optional, prohibited}`,
|
|
88
|
+
path: `${path}.cardinality`,
|
|
89
|
+
facetType: req.facet.type,
|
|
90
|
+
detail: { value: req.cardinalityRaw },
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
switch (req.facet.type) {
|
|
94
|
+
case 'property': {
|
|
95
|
+
const hasDataType = req.facet.dataType !== undefined;
|
|
96
|
+
if (req.optionality === 'optional' && !hasDataType) {
|
|
97
|
+
issues.push({
|
|
98
|
+
severity: 'error',
|
|
99
|
+
code: 'E_CARDINALITY_INVALID',
|
|
100
|
+
message: 'optional <property> requirement requires @dataType to be specified',
|
|
101
|
+
path: `${path}.cardinality`,
|
|
102
|
+
facetType: 'property',
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
if (req.optionality === 'prohibited' && hasDataType) {
|
|
106
|
+
issues.push({
|
|
107
|
+
severity: 'error',
|
|
108
|
+
code: 'E_CARDINALITY_INVALID',
|
|
109
|
+
message: 'prohibited <property> requirement is incompatible with @dataType',
|
|
110
|
+
path: `${path}.cardinality`,
|
|
111
|
+
facetType: 'property',
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
case 'material': {
|
|
117
|
+
if (req.optionality === 'optional') {
|
|
118
|
+
const hasValue = req.facet.value !== undefined && !isEmptyConstraint(req.facet.value);
|
|
119
|
+
if (!hasValue) {
|
|
120
|
+
issues.push({
|
|
121
|
+
severity: 'error',
|
|
122
|
+
code: 'E_CARDINALITY_INVALID',
|
|
123
|
+
message: 'optional <material> requirement must specify a non-empty <value> constraint',
|
|
124
|
+
path: `${path}.cardinality`,
|
|
125
|
+
facetType: 'material',
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
case 'classification': {
|
|
132
|
+
if (req.optionality === 'optional') {
|
|
133
|
+
const hasSystem = req.facet.system !== undefined &&
|
|
134
|
+
!isEmptyConstraint(req.facet.system);
|
|
135
|
+
const hasValue = req.facet.value !== undefined && !isEmptyConstraint(req.facet.value);
|
|
136
|
+
if (!hasSystem && !hasValue) {
|
|
137
|
+
issues.push({
|
|
138
|
+
severity: 'error',
|
|
139
|
+
code: 'E_CARDINALITY_INVALID',
|
|
140
|
+
message: 'optional <classification> requirement must specify <system> or <value>',
|
|
141
|
+
path: `${path}.cardinality`,
|
|
142
|
+
facetType: 'classification',
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
case 'attribute':
|
|
149
|
+
case 'entity':
|
|
150
|
+
case 'partOf':
|
|
151
|
+
// Attribute/entity/partOf carry their own intrinsic content;
|
|
152
|
+
// cardinality on them is just required/optional/prohibited.
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function isEmptyConstraint(c) {
|
|
157
|
+
switch (c.type) {
|
|
158
|
+
case 'simpleValue':
|
|
159
|
+
return c.value === '' || c.value == null;
|
|
160
|
+
case 'enumeration':
|
|
161
|
+
return c.values.length === 0;
|
|
162
|
+
case 'pattern':
|
|
163
|
+
return c.pattern === '';
|
|
164
|
+
case 'bounds':
|
|
165
|
+
return (c.minInclusive === undefined &&
|
|
166
|
+
c.maxInclusive === undefined &&
|
|
167
|
+
c.minExclusive === undefined &&
|
|
168
|
+
c.maxExclusive === undefined &&
|
|
169
|
+
c.length === undefined &&
|
|
170
|
+
c.minLength === undefined &&
|
|
171
|
+
c.maxLength === undefined);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
function auditFacetConstraints(facet, path, issues) {
|
|
175
|
+
switch (facet.type) {
|
|
176
|
+
case 'entity':
|
|
177
|
+
check(facet.name, `${path}.name`, issues, facet.type);
|
|
178
|
+
if (facet.predefinedType) {
|
|
179
|
+
check(facet.predefinedType, `${path}.predefinedType`, issues, facet.type);
|
|
180
|
+
}
|
|
181
|
+
break;
|
|
182
|
+
case 'attribute':
|
|
183
|
+
check(facet.name, `${path}.name`, issues, facet.type);
|
|
184
|
+
if (facet.value)
|
|
185
|
+
check(facet.value, `${path}.value`, issues, facet.type);
|
|
186
|
+
break;
|
|
187
|
+
case 'property':
|
|
188
|
+
check(facet.propertySet, `${path}.propertySet`, issues, facet.type);
|
|
189
|
+
check(facet.baseName, `${path}.baseName`, issues, facet.type);
|
|
190
|
+
if (facet.dataType)
|
|
191
|
+
check(facet.dataType, `${path}.dataType`, issues, facet.type);
|
|
192
|
+
if (facet.value)
|
|
193
|
+
check(facet.value, `${path}.value`, issues, facet.type);
|
|
194
|
+
break;
|
|
195
|
+
case 'classification':
|
|
196
|
+
if (facet.system)
|
|
197
|
+
check(facet.system, `${path}.system`, issues, facet.type);
|
|
198
|
+
if (facet.value)
|
|
199
|
+
check(facet.value, `${path}.value`, issues, facet.type);
|
|
200
|
+
break;
|
|
201
|
+
case 'material':
|
|
202
|
+
if (facet.value)
|
|
203
|
+
check(facet.value, `${path}.value`, issues, facet.type);
|
|
204
|
+
break;
|
|
205
|
+
case 'partOf':
|
|
206
|
+
if (facet.entity) {
|
|
207
|
+
auditFacetConstraints(facet.entity, `${path}.entity`, issues);
|
|
208
|
+
}
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
function check(c, path, issues, facetType) {
|
|
213
|
+
switch (c.type) {
|
|
214
|
+
case 'enumeration':
|
|
215
|
+
if (c.values.length === 0) {
|
|
216
|
+
issues.push({
|
|
217
|
+
severity: 'error',
|
|
218
|
+
code: 'E_RESTRICTION_EMPTY',
|
|
219
|
+
message: 'xs:enumeration must have at least one value',
|
|
220
|
+
path,
|
|
221
|
+
facetType,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
else if (c.values.some((v) => v === '' || v == null)) {
|
|
225
|
+
issues.push({
|
|
226
|
+
severity: 'warning',
|
|
227
|
+
code: 'E_RESTRICTION_EMPTY',
|
|
228
|
+
message: 'xs:enumeration has an empty entry',
|
|
229
|
+
path,
|
|
230
|
+
facetType,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
// When the restriction base is a typed primitive
|
|
234
|
+
// (`xs:double`/`xs:integer`/`xs:boolean`/…), every enumeration
|
|
235
|
+
// value must match the base's lexical space — upstream's
|
|
236
|
+
// `Report 305 BadConstraintValue`. Otherwise an `xs:double`
|
|
237
|
+
// restriction can carry strings like `"12,0"` or `"a"` that
|
|
238
|
+
// would never compare equal to a real numeric value.
|
|
239
|
+
if (c.base) {
|
|
240
|
+
for (const v of c.values) {
|
|
241
|
+
if (v == null || v === '')
|
|
242
|
+
continue;
|
|
243
|
+
if (!isValidLexicalForXsType(v, c.base)) {
|
|
244
|
+
issues.push({
|
|
245
|
+
severity: 'error',
|
|
246
|
+
code: 'E_RESTRICTION_VALUE_MISMATCH',
|
|
247
|
+
message: `xs:enumeration value "${v}" is not valid for xs:restriction @base="${c.base}"`,
|
|
248
|
+
path,
|
|
249
|
+
facetType,
|
|
250
|
+
detail: { value: v, base: c.base },
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
break;
|
|
256
|
+
case 'bounds':
|
|
257
|
+
checkBounds(c, path, issues, facetType);
|
|
258
|
+
break;
|
|
259
|
+
case 'pattern':
|
|
260
|
+
checkPattern(c.pattern, path, issues, facetType);
|
|
261
|
+
break;
|
|
262
|
+
case 'simpleValue':
|
|
263
|
+
// No coherence check beyond the XSD's required-non-empty check,
|
|
264
|
+
// which we already do in the XSD audit.
|
|
265
|
+
break;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
function checkBounds(c, path, issues, facetType) {
|
|
269
|
+
const lo = c.minInclusive ?? c.minExclusive;
|
|
270
|
+
const hi = c.maxInclusive ?? c.maxExclusive;
|
|
271
|
+
if (typeof lo === 'number' &&
|
|
272
|
+
typeof hi === 'number' &&
|
|
273
|
+
lo > hi) {
|
|
274
|
+
issues.push({
|
|
275
|
+
severity: 'error',
|
|
276
|
+
code: 'E_RESTRICTION_RANGE',
|
|
277
|
+
message: `xs:restriction bounds inverted: lower (${lo}) > upper (${hi})`,
|
|
278
|
+
path,
|
|
279
|
+
facetType,
|
|
280
|
+
detail: { min: lo, max: hi },
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
if (typeof c.minLength === 'number' &&
|
|
284
|
+
typeof c.maxLength === 'number' &&
|
|
285
|
+
c.minLength > c.maxLength) {
|
|
286
|
+
issues.push({
|
|
287
|
+
severity: 'error',
|
|
288
|
+
code: 'E_RESTRICTION_RANGE',
|
|
289
|
+
message: `xs:restriction lengths inverted: minLength (${c.minLength}) > maxLength (${c.maxLength})`,
|
|
290
|
+
path,
|
|
291
|
+
facetType,
|
|
292
|
+
detail: { min: c.minLength, max: c.maxLength },
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
if (typeof c.length === 'number' &&
|
|
296
|
+
(typeof c.minLength === 'number' || typeof c.maxLength === 'number')) {
|
|
297
|
+
issues.push({
|
|
298
|
+
severity: 'warning',
|
|
299
|
+
code: 'E_RESTRICTION_RANGE',
|
|
300
|
+
message: 'xs:length is mutually exclusive with xs:minLength/xs:maxLength',
|
|
301
|
+
path,
|
|
302
|
+
facetType,
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
const empty = c.minInclusive === undefined &&
|
|
306
|
+
c.minExclusive === undefined &&
|
|
307
|
+
c.maxInclusive === undefined &&
|
|
308
|
+
c.maxExclusive === undefined &&
|
|
309
|
+
c.length === undefined &&
|
|
310
|
+
c.minLength === undefined &&
|
|
311
|
+
c.maxLength === undefined;
|
|
312
|
+
if (empty) {
|
|
313
|
+
issues.push({
|
|
314
|
+
severity: 'error',
|
|
315
|
+
code: 'E_RESTRICTION_EMPTY',
|
|
316
|
+
message: 'xs:restriction has no min/max bounds or length facets',
|
|
317
|
+
path,
|
|
318
|
+
facetType,
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Validate `pattern` against XSD regex semantics by translating XSD-only
|
|
324
|
+
* escape codes to JS regex equivalents (cf. upstream `XmlRegex.cs`).
|
|
325
|
+
*
|
|
326
|
+
* Translation handles `\i`/`\c`/`\d`/`\w` and their negations via
|
|
327
|
+
* Unicode property escapes (compiled with the `u` flag). Char-class
|
|
328
|
+
* subtraction (`[a-z-[aeiou]]`) is XSD-only and surfaces as
|
|
329
|
+
* `W_REGEX_UNVERIFIED`. Any remaining syntactic errors are real
|
|
330
|
+
* authoring mistakes and surface as `E_RESTRICTION_EMPTY` (upstream
|
|
331
|
+
* Report 109).
|
|
332
|
+
*/
|
|
333
|
+
function checkPattern(pattern, path, issues, facetType) {
|
|
334
|
+
const result = compileXsdRegex(pattern);
|
|
335
|
+
if (result.ok)
|
|
336
|
+
return;
|
|
337
|
+
if (result.severity === 'error') {
|
|
338
|
+
issues.push({
|
|
339
|
+
severity: 'error',
|
|
340
|
+
code: pattern === '' ? 'E_RESTRICTION_EMPTY' : 'E_RESTRICTION_EMPTY',
|
|
341
|
+
message: pattern === ''
|
|
342
|
+
? 'xs:pattern @value is empty'
|
|
343
|
+
: `xs:pattern is not a valid regular expression: ${result.reason}`,
|
|
344
|
+
path,
|
|
345
|
+
facetType,
|
|
346
|
+
detail: pattern === '' ? undefined : { pattern },
|
|
347
|
+
});
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
issues.push({
|
|
351
|
+
severity: 'warning',
|
|
352
|
+
code: 'W_REGEX_UNVERIFIED',
|
|
353
|
+
message: `xs:pattern uses XSD-specific syntax not verifiable in JS: ${result.reason}`,
|
|
354
|
+
path,
|
|
355
|
+
facetType,
|
|
356
|
+
detail: { pattern },
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Validate that `value` matches the lexical space of the supplied XSD
|
|
361
|
+
* primitive base. Mirrors upstream `XsTypes.IsValid` — same regexes,
|
|
362
|
+
* just expressed in JS. Used by the enumeration coherence check to
|
|
363
|
+
* flag entries like `<xs:enumeration value="12,0"/>` under a
|
|
364
|
+
* `<xs:restriction base="xs:double">`.
|
|
365
|
+
*/
|
|
366
|
+
const XS_VALUE_REGEX = {
|
|
367
|
+
// Lifted from upstream `XmlRegex.cs` static fields.
|
|
368
|
+
'xs:integer': /^[+-]?(\d+)$/,
|
|
369
|
+
'xs:double': /^([-+]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?|NaN|\+INF|-INF)$/,
|
|
370
|
+
'xs:float': /^([-+]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?|NaN|\+INF|-INF)$/,
|
|
371
|
+
'xs:decimal': /^([-+]?[0-9]*\.?[0-9]*([eE][-+]?[0-9]+)?|NaN|\+INF|-INF)$/,
|
|
372
|
+
'xs:boolean': /^(true|false|0|1)$/,
|
|
373
|
+
'xs:date': /^\d{4}-\d{2}-\d{2}(Z|([+-]\d{2}:\d{2}))?$/,
|
|
374
|
+
'xs:dateTime': /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|([+-]\d{2}:\d{2}))?$/,
|
|
375
|
+
'xs:time': /^\d{2}:\d{2}:\d{2}(\.\d+)?(Z|([+-]\d{2}:\d{2}))?$/,
|
|
376
|
+
'xs:duration': /^[-+]?P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+S)?)?$/,
|
|
377
|
+
};
|
|
378
|
+
function isValidLexicalForXsType(value, base) {
|
|
379
|
+
const rx = XS_VALUE_REGEX[base];
|
|
380
|
+
if (!rx)
|
|
381
|
+
return true; // base we don't recognise → don't fabricate errors
|
|
382
|
+
// For doubles/floats/decimals, an empty lexeme is technically allowed
|
|
383
|
+
// by the regex but isn't a meaningful number — reject.
|
|
384
|
+
if ((base === 'xs:double' ||
|
|
385
|
+
base === 'xs:float' ||
|
|
386
|
+
base === 'xs:decimal') &&
|
|
387
|
+
!/[0-9]/.test(value)) {
|
|
388
|
+
return false;
|
|
389
|
+
}
|
|
390
|
+
return rx.test(value);
|
|
391
|
+
}
|
|
392
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/audit/coherence/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAmB/D,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,UAAU,iBAAiB,CAAC,GAAgB;IAChD,MAAM,MAAM,GAAoB,EAAE,CAAC;IACnC,GAAG,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE;QACrC,SAAS,CAAC,IAAI,EAAE,kBAA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C,KAAK,CAAC,EACpB,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translate an XSD regex pattern into JavaScript regex syntax.
|
|
3
|
+
*
|
|
4
|
+
* Ported from `IdsLib/IdsSchema/XsNodes/XmlRegex.cs` (MIT) which itself
|
|
5
|
+
* mirrors Microsoft's reference XSD facet checker. XSD regex extends
|
|
6
|
+
* the JS dialect with:
|
|
7
|
+
*
|
|
8
|
+
* - `\i` — XML name start char (letter, `_`, `:` plus a swathe of
|
|
9
|
+
* Unicode letters)
|
|
10
|
+
* - `\c` — XML name char (`\i` plus digits, `.`, `-`, U+00B7, etc.)
|
|
11
|
+
* - `\d` — Unicode digit (broader than JS `[0-9]`)
|
|
12
|
+
* - `\w` — Unicode word char (letters + digits, no `_`)
|
|
13
|
+
* - `\D`, `\C`, `\I`, `\W` — negations
|
|
14
|
+
* - char-class subtraction `[a-z-[aeiou]]` — the JS dialect doesn't
|
|
15
|
+
* support this; we fall back to a marker so the auditor can warn.
|
|
16
|
+
*
|
|
17
|
+
* The translation maps to JS Unicode property escapes (require `u` flag).
|
|
18
|
+
* `\d` and `\w` already exist in JS and map close enough that we leave
|
|
19
|
+
* them alone — same applies to `\D`/`\W`. The XML name char escapes are
|
|
20
|
+
* the only ones that genuinely need translation.
|
|
21
|
+
*/
|
|
22
|
+
interface TranslateResult {
|
|
23
|
+
/** The pattern usable with the JS `RegExp` constructor. */
|
|
24
|
+
pattern: string;
|
|
25
|
+
/** Whether translation produced a faithful JS-compatible regex. */
|
|
26
|
+
supported: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Human-readable reason when `supported === false`. Empty string when
|
|
29
|
+
* fully supported.
|
|
30
|
+
*/
|
|
31
|
+
reason: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Translate the XSD pattern. Returns the JS-compatible pattern plus a
|
|
35
|
+
* `supported` flag — when `false`, the auditor should warn rather than
|
|
36
|
+
* compile-test the result (the unsupported construct may produce
|
|
37
|
+
* spurious failures).
|
|
38
|
+
*/
|
|
39
|
+
export declare function translateXsdRegex(pattern: string): TranslateResult;
|
|
40
|
+
/**
|
|
41
|
+
* Try to compile `pattern` as XSD regex semantics. Returns:
|
|
42
|
+
* - `{ ok: true }` when the pattern is valid (after translation).
|
|
43
|
+
* - `{ ok: false, severity: 'error', reason }` for syntactic errors
|
|
44
|
+
* that JS *and* XSD agree on (e.g. unclosed `[`).
|
|
45
|
+
* - `{ ok: false, severity: 'warning', reason }` when the pattern uses
|
|
46
|
+
* XSD-only syntax we can't translate (char-class subtraction).
|
|
47
|
+
*/
|
|
48
|
+
export declare function compileXsdRegex(pattern: string): {
|
|
49
|
+
ok: true;
|
|
50
|
+
jsPattern: string;
|
|
51
|
+
} | {
|
|
52
|
+
ok: false;
|
|
53
|
+
severity: 'error' | 'warning';
|
|
54
|
+
reason: string;
|
|
55
|
+
};
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=regex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regex.d.ts","sourceRoot":"","sources":["../../../src/audit/coherence/regex.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,UAAU,eAAe;IACvB,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,CAiClE;AA2CD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,GAEb;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAkB/D"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/**
|
|
5
|
+
* Translate the XSD pattern. Returns the JS-compatible pattern plus a
|
|
6
|
+
* `supported` flag — when `false`, the auditor should warn rather than
|
|
7
|
+
* compile-test the result (the unsupported construct may produce
|
|
8
|
+
* spurious failures).
|
|
9
|
+
*/
|
|
10
|
+
export function translateXsdRegex(pattern) {
|
|
11
|
+
// Char-class subtraction is only safely expressible via lookarounds in
|
|
12
|
+
// simple cases; in general it requires set algebra. Surface it as
|
|
13
|
+
// unsupported so the auditor warns.
|
|
14
|
+
if (/\[[^\]]*-\[/.test(pattern)) {
|
|
15
|
+
return {
|
|
16
|
+
pattern,
|
|
17
|
+
supported: false,
|
|
18
|
+
reason: 'XSD character-class subtraction is not supported in JS regex',
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
let translated = '';
|
|
22
|
+
let i = 0;
|
|
23
|
+
while (i < pattern.length) {
|
|
24
|
+
const ch = pattern.charAt(i);
|
|
25
|
+
if (ch === '\\' && i + 1 < pattern.length) {
|
|
26
|
+
const next = pattern.charAt(i + 1);
|
|
27
|
+
const replacement = mapEscape(next);
|
|
28
|
+
if (replacement) {
|
|
29
|
+
translated += replacement;
|
|
30
|
+
i += 2;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
// Pass through any other escape (`\n`, `\.`, `\\`, …).
|
|
34
|
+
translated += ch + next;
|
|
35
|
+
i += 2;
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
translated += ch;
|
|
39
|
+
i++;
|
|
40
|
+
}
|
|
41
|
+
return { pattern: translated, supported: true, reason: '' };
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Map an XSD-specific escape character to its JS regex Unicode-property
|
|
45
|
+
* equivalent. Returns `undefined` when the escape is identical in both
|
|
46
|
+
* dialects (and thus needs no translation).
|
|
47
|
+
*
|
|
48
|
+
* The XML production rules these escape codes implement live in the
|
|
49
|
+
* W3C XML 1.0 spec § 2.3 (NameStartChar / NameChar) and § 2.5 (Digit /
|
|
50
|
+
* Letter). We use JS Unicode property escapes (`\p{L}`, `\p{Nd}`) which
|
|
51
|
+
* are equivalent for our purposes when the pattern is compiled with the
|
|
52
|
+
* `u` flag.
|
|
53
|
+
*/
|
|
54
|
+
function mapEscape(ch) {
|
|
55
|
+
switch (ch) {
|
|
56
|
+
case 'i':
|
|
57
|
+
// NameStartChar: letters + `_` + `:` + extended Unicode letters.
|
|
58
|
+
return '[\\p{L}_:]';
|
|
59
|
+
case 'I':
|
|
60
|
+
return '[^\\p{L}_:]';
|
|
61
|
+
case 'c':
|
|
62
|
+
// NameChar: NameStartChar + digits + `.` + `-` + U+00B7 + combining marks.
|
|
63
|
+
return '[\\p{L}\\p{Nd}_:.\\-\\u00B7\\u0300-\\u036F\\u203F-\\u2040]';
|
|
64
|
+
case 'C':
|
|
65
|
+
return '[^\\p{L}\\p{Nd}_:.\\-\\u00B7\\u0300-\\u036F\\u203F-\\u2040]';
|
|
66
|
+
case 'd':
|
|
67
|
+
// JS \d matches `[0-9]`; XSD \d matches all Unicode digits. Use
|
|
68
|
+
// \p{Nd} for full fidelity.
|
|
69
|
+
return '\\p{Nd}';
|
|
70
|
+
case 'D':
|
|
71
|
+
return '\\P{Nd}';
|
|
72
|
+
case 'w':
|
|
73
|
+
// JS \w matches `[A-Za-z0-9_]`; XSD \w matches Unicode letters +
|
|
74
|
+
// digits without underscore. Use a Unicode class that mirrors the
|
|
75
|
+
// XSD definition.
|
|
76
|
+
return '[\\p{L}\\p{Nd}]';
|
|
77
|
+
case 'W':
|
|
78
|
+
return '[^\\p{L}\\p{Nd}]';
|
|
79
|
+
default:
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Try to compile `pattern` as XSD regex semantics. Returns:
|
|
85
|
+
* - `{ ok: true }` when the pattern is valid (after translation).
|
|
86
|
+
* - `{ ok: false, severity: 'error', reason }` for syntactic errors
|
|
87
|
+
* that JS *and* XSD agree on (e.g. unclosed `[`).
|
|
88
|
+
* - `{ ok: false, severity: 'warning', reason }` when the pattern uses
|
|
89
|
+
* XSD-only syntax we can't translate (char-class subtraction).
|
|
90
|
+
*/
|
|
91
|
+
export function compileXsdRegex(pattern) {
|
|
92
|
+
if (pattern === '') {
|
|
93
|
+
return { ok: false, severity: 'error', reason: 'pattern is empty' };
|
|
94
|
+
}
|
|
95
|
+
const translated = translateXsdRegex(pattern);
|
|
96
|
+
if (!translated.supported) {
|
|
97
|
+
return { ok: false, severity: 'warning', reason: translated.reason };
|
|
98
|
+
}
|
|
99
|
+
try {
|
|
100
|
+
new RegExp(translated.pattern, 'u');
|
|
101
|
+
return { ok: true, jsPattern: translated.pattern };
|
|
102
|
+
}
|
|
103
|
+
catch (err) {
|
|
104
|
+
return {
|
|
105
|
+
ok: false,
|
|
106
|
+
severity: 'error',
|
|
107
|
+
reason: err instanceof Error ? err.message : String(err),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=regex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regex.js","sourceRoot":"","sources":["../../../src/audit/coherence/regex.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAoC/D;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,uEAAuE;IACvE,kEAAkE;IAClE,oCAAoC;IACpC,IAAI,aAAa,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QAChC,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5B,OAAO,SAAS,CAAC;QACnB,KAAK,GAAG;YACN,OAAO,SAAS,CAAC;QACnB,KAAK,GAAG;YACN,iEAAiE;YACjE,kEAAkE;YAClE,kBAAkB;YAClB,OAAO,iBAAiB,CAAC;QAC3B,KAAK,GAAG;YACN,OAAO,kBAAkB,CAAC;QAC5B;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,OAAe;IAIf,IAAI,OAAO,KAAK,EAAE,EAAE,CAAC;QACnB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;IACtE,CAAC;IACD,MAAM,UAAU,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC9C,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC;IACvE,CAAC;IACD,IAAI,CAAC;QACH,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACpC,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC,OAAO,EAAE,CAAC;IACrD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,EAAE,EAAE,KAAK;YACT,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;SACzD,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IDSDocument } from '../../types.js';
|
|
2
|
+
import type { IDSAuditIssue, IDSAuditOptions } from '../types.js';
|
|
3
|
+
export declare function runIfcSchemaAudit(doc: IDSDocument, options: Pick<IDSAuditOptions, 'ifcVersion'>): Promise<IDSAuditIssue[]>;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/audit/ifc-schema/index.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EACV,WAAW,EAKZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAElE,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,YAAY,CAAC,GAC3C,OAAO,CAAC,aAAa,EAAE,CAAC,CAwB1B"}
|