@itwin/ecschema-editing 4.8.0-dev.9 → 4.9.0-dev.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/CHANGELOG.md +36 -1
- package/lib/cjs/Differencing/Errors.js.map +1 -1
- package/lib/cjs/Differencing/SchemaConflicts.d.ts +2 -0
- package/lib/cjs/Differencing/SchemaConflicts.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaConflicts.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts +1 -0
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js +25 -11
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDifference.js.map +1 -1
- package/lib/cjs/Differencing/Utils.d.ts +11 -1
- package/lib/cjs/Differencing/Utils.d.ts.map +1 -1
- package/lib/cjs/Differencing/Utils.js +21 -1
- package/lib/cjs/Differencing/Utils.js.map +1 -1
- package/lib/cjs/Editing/Constants.js.map +1 -1
- package/lib/cjs/Editing/CustomAttributes.d.ts +1 -1
- package/lib/cjs/Editing/CustomAttributes.d.ts.map +1 -1
- package/lib/cjs/Editing/CustomAttributes.js +2 -2
- package/lib/cjs/Editing/CustomAttributes.js.map +1 -1
- package/lib/cjs/Editing/ECClasses.d.ts +0 -7
- package/lib/cjs/Editing/ECClasses.d.ts.map +1 -1
- package/lib/cjs/Editing/ECClasses.js +0 -27
- package/lib/cjs/Editing/ECClasses.js.map +1 -1
- package/lib/cjs/Editing/Editor.d.ts +12 -1
- package/lib/cjs/Editing/Editor.d.ts.map +1 -1
- package/lib/cjs/Editing/Editor.js +24 -2
- package/lib/cjs/Editing/Editor.js.map +1 -1
- package/lib/cjs/Editing/Entities.js.map +1 -1
- package/lib/cjs/Editing/Enumerations.js.map +1 -1
- package/lib/cjs/Editing/Exception.js.map +1 -1
- package/lib/cjs/Editing/Formats.js.map +1 -1
- package/lib/cjs/Editing/InvertedUnits.js.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
- package/lib/cjs/Editing/Mixins.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableArrayProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableCAClass.d.ts +1 -1
- package/lib/cjs/Editing/Mutable/MutableCAClass.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableCAClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableConstant.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEntityClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEnumeration.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableFormat.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableInvertedUnit.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableMixin.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableNavigationProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableRelationshipClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableSchema.d.ts +2 -0
- package/lib/cjs/Editing/Mutable/MutableSchema.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableSchema.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableSchemaItem.d.ts +1 -0
- package/lib/cjs/Editing/Mutable/MutableSchemaItem.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableSchemaItem.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableStructProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnit.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.js.map +1 -1
- package/lib/cjs/Editing/Phenomena.js.map +1 -1
- package/lib/cjs/Editing/Properties.js.map +1 -1
- package/lib/cjs/Editing/PropertyCategories.js.map +1 -1
- package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
- package/lib/cjs/Editing/SchemaItems.d.ts +7 -0
- package/lib/cjs/Editing/SchemaItems.d.ts.map +1 -1
- package/lib/cjs/Editing/SchemaItems.js +27 -0
- package/lib/cjs/Editing/SchemaItems.js.map +1 -1
- package/lib/cjs/Editing/Structs.js.map +1 -1
- package/lib/cjs/Editing/UnitSystems.js.map +1 -1
- package/lib/cjs/Editing/Units.js.map +1 -1
- package/lib/cjs/Merging/CAClassMerger.js +2 -2
- package/lib/cjs/Merging/CAClassMerger.js.map +1 -1
- package/lib/cjs/Merging/ClassMerger.js.map +1 -1
- package/lib/cjs/Merging/ConstantMerger.js.map +1 -1
- package/lib/cjs/Merging/CustomAttributeMerger.js.map +1 -1
- package/lib/cjs/Merging/Edits/RenameEditHandler.d.ts +14 -0
- package/lib/cjs/Merging/Edits/RenameEditHandler.d.ts.map +1 -0
- package/lib/cjs/Merging/Edits/RenameEditHandler.js +344 -0
- package/lib/cjs/Merging/Edits/RenameEditHandler.js.map +1 -0
- package/lib/cjs/Merging/Edits/SchemaEdits.d.ts +78 -0
- package/lib/cjs/Merging/Edits/SchemaEdits.d.ts.map +1 -0
- package/lib/cjs/Merging/Edits/SchemaEdits.js +111 -0
- package/lib/cjs/Merging/Edits/SchemaEdits.js.map +1 -0
- package/lib/cjs/Merging/Edits/SkipEditHandler.d.ts +14 -0
- package/lib/cjs/Merging/Edits/SkipEditHandler.d.ts.map +1 -0
- package/lib/cjs/Merging/Edits/SkipEditHandler.js +60 -0
- package/lib/cjs/Merging/Edits/SkipEditHandler.js.map +1 -0
- package/lib/cjs/Merging/EntityClassMerger.js.map +1 -1
- package/lib/cjs/Merging/EnumerationMerger.js.map +1 -1
- package/lib/cjs/Merging/KindOfQuantityMerger.js.map +1 -1
- package/lib/cjs/Merging/MixinMerger.js.map +1 -1
- package/lib/cjs/Merging/PhenomenonMerger.js.map +1 -1
- package/lib/cjs/Merging/PropertyCategoryMerger.js.map +1 -1
- package/lib/cjs/Merging/PropertyMerger.js.map +1 -1
- package/lib/cjs/Merging/RelationshipClassMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaItemMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaMerger.d.ts +9 -12
- package/lib/cjs/Merging/SchemaMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaMerger.js +40 -37
- package/lib/cjs/Merging/SchemaMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaReferenceMerger.js.map +1 -1
- package/lib/cjs/Merging/UnitSystemMerger.js.map +1 -1
- package/lib/cjs/Validation/Diagnostic.js.map +1 -1
- package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/ECRules.js.map +1 -1
- package/lib/cjs/Validation/LoggingDiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/RuleSuppressionSet.js.map +1 -1
- package/lib/cjs/Validation/Rules.js.map +1 -1
- package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareDiagnostics.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareReporter.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareResultDelegate.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareVisitor.d.ts.map +1 -1
- package/lib/cjs/Validation/SchemaCompareVisitor.js +26 -19
- package/lib/cjs/Validation/SchemaCompareVisitor.js.map +1 -1
- package/lib/cjs/Validation/SchemaComparer.d.ts +30 -30
- package/lib/cjs/Validation/SchemaComparer.d.ts.map +1 -1
- package/lib/cjs/Validation/SchemaComparer.js +45 -45
- package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidater.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
- package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
- package/lib/cjs/ecschema-editing.d.ts +1 -0
- package/lib/cjs/ecschema-editing.d.ts.map +1 -1
- package/lib/cjs/ecschema-editing.js +1 -0
- package/lib/cjs/ecschema-editing.js.map +1 -1
- package/package.json +9 -9
- package/public/locales/en/ECSchemaEditing.json +26 -26
|
@@ -99,15 +99,17 @@ class SchemaComparer {
|
|
|
99
99
|
}
|
|
100
100
|
if (this._compareDirection === SchemaCompareDirection.Backward)
|
|
101
101
|
return;
|
|
102
|
-
if (schemaItemA.description !== schemaItemB.description)
|
|
103
|
-
promises.push(this._reporter.reportSchemaItemDelta(schemaItemA, "description", schemaItemA.description, schemaItemB.description, this._compareDirection));
|
|
104
|
-
if (!labelsMatch(schemaItemA.label, schemaItemB.label))
|
|
105
|
-
promises.push(this._reporter.reportSchemaItemDelta(schemaItemA, "label", schemaItemA.label, schemaItemB.label, this._compareDirection));
|
|
106
102
|
if (schemaItemA.schemaItemType !== schemaItemB.schemaItemType) {
|
|
107
103
|
const aType = schemaItemA.schemaItemType;
|
|
108
104
|
const bType = schemaItemB.schemaItemType;
|
|
109
105
|
promises.push(this._reporter.reportSchemaItemDelta(schemaItemA, "schemaItemType", aType, bType, this._compareDirection));
|
|
106
|
+
await Promise.all(promises);
|
|
107
|
+
return;
|
|
110
108
|
}
|
|
109
|
+
if (schemaItemA.description !== schemaItemB.description)
|
|
110
|
+
promises.push(this._reporter.reportSchemaItemDelta(schemaItemA, "description", schemaItemA.description, schemaItemB.description, this._compareDirection));
|
|
111
|
+
if (!labelsMatch(schemaItemA.label, schemaItemB.label))
|
|
112
|
+
promises.push(this._reporter.reportSchemaItemDelta(schemaItemA, "label", schemaItemA.label, schemaItemB.label, this._compareDirection));
|
|
111
113
|
await Promise.all(promises);
|
|
112
114
|
}
|
|
113
115
|
/**
|
|
@@ -116,7 +118,7 @@ class SchemaComparer {
|
|
|
116
118
|
* @param classB The second ECClass.
|
|
117
119
|
*/
|
|
118
120
|
async compareClasses(classA, classB) {
|
|
119
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
121
|
+
if (this._compareDirection === SchemaCompareDirection.Backward)
|
|
120
122
|
return;
|
|
121
123
|
const promises = [];
|
|
122
124
|
if (classA.modifier !== classB.modifier) {
|
|
@@ -152,6 +154,13 @@ class SchemaComparer {
|
|
|
152
154
|
}
|
|
153
155
|
if (this._compareDirection === SchemaCompareDirection.Backward)
|
|
154
156
|
return;
|
|
157
|
+
const propertyTypeA = (0, ecschema_metadata_1.propertyTypeToString)(propertyA.propertyType);
|
|
158
|
+
const propertyTypeB = (0, ecschema_metadata_1.propertyTypeToString)(propertyB.propertyType);
|
|
159
|
+
if (propertyTypeA !== propertyTypeB) {
|
|
160
|
+
promises.push(this._reporter.reportPropertyDelta(propertyA, "type", propertyTypeA, propertyTypeB, this._compareDirection));
|
|
161
|
+
await Promise.all(promises);
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
155
164
|
if (!labelsMatch(propertyA.label, propertyB.label))
|
|
156
165
|
promises.push(this._reporter.reportPropertyDelta(propertyA, "label", propertyA.label, propertyB.label, this._compareDirection));
|
|
157
166
|
if (propertyA.description !== propertyB.description)
|
|
@@ -188,11 +197,9 @@ class SchemaComparer {
|
|
|
188
197
|
*/
|
|
189
198
|
async compareEntityClasses(entityA, entityB) {
|
|
190
199
|
const promises = [];
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
promises.push(this._reporter.reportEntityMixinMissing(entityA, await mixinA, this._compareDirection));
|
|
195
|
-
}
|
|
200
|
+
for (const mixinA of entityA.mixins) {
|
|
201
|
+
if (-1 === entityB.mixins.findIndex((mixinB) => this.areItemsSameByName(mixinA, mixinB, entityA.schema.name, entityB.schema.name)))
|
|
202
|
+
promises.push(this._reporter.reportEntityMixinMissing(entityA, await mixinA, this._compareDirection));
|
|
196
203
|
}
|
|
197
204
|
await Promise.all(promises);
|
|
198
205
|
}
|
|
@@ -202,7 +209,7 @@ class SchemaComparer {
|
|
|
202
209
|
* @param mixinB
|
|
203
210
|
*/
|
|
204
211
|
async compareMixins(mixinA, mixinB) {
|
|
205
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
212
|
+
if (this._compareDirection === SchemaCompareDirection.Backward)
|
|
206
213
|
return;
|
|
207
214
|
if (mixinA.appliesTo || mixinB.appliesTo) {
|
|
208
215
|
const appliesToA = mixinA.appliesTo?.fullName;
|
|
@@ -220,7 +227,7 @@ class SchemaComparer {
|
|
|
220
227
|
* @param relationshipB
|
|
221
228
|
*/
|
|
222
229
|
async compareRelationshipClasses(relationshipA, relationshipB) {
|
|
223
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
230
|
+
if (this._compareDirection === SchemaCompareDirection.Backward)
|
|
224
231
|
return;
|
|
225
232
|
const promises = [];
|
|
226
233
|
if (relationshipA.strength !== relationshipB.strength) {
|
|
@@ -242,13 +249,13 @@ class SchemaComparer {
|
|
|
242
249
|
*/
|
|
243
250
|
async compareRelationshipConstraints(constraintA, constraintB) {
|
|
244
251
|
const promises = [];
|
|
245
|
-
if (
|
|
252
|
+
if (constraintA.constraintClasses) {
|
|
246
253
|
for (const classA of constraintA.constraintClasses) {
|
|
247
254
|
if (!constraintB.constraintClasses || -1 === constraintB.constraintClasses.findIndex((classB) => this.areItemsSameByName(classA, classB, constraintA.schema.name, constraintB.schema.name)))
|
|
248
255
|
promises.push(this._reporter.reportRelationshipConstraintClassMissing(constraintA, await classA, this._compareDirection));
|
|
249
256
|
}
|
|
250
257
|
}
|
|
251
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
258
|
+
if (this._compareDirection === SchemaCompareDirection.Backward) {
|
|
252
259
|
await Promise.all(promises);
|
|
253
260
|
return;
|
|
254
261
|
}
|
|
@@ -280,11 +287,11 @@ class SchemaComparer {
|
|
|
280
287
|
* @param customAttributeClassB
|
|
281
288
|
*/
|
|
282
289
|
async compareCustomAttributeClasses(customAttributeClassA, customAttributeClassB) {
|
|
283
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
290
|
+
if (this._compareDirection === SchemaCompareDirection.Backward)
|
|
284
291
|
return;
|
|
285
|
-
if (customAttributeClassA.
|
|
286
|
-
const typeA = (0, ecschema_metadata_1.containerTypeToString)(customAttributeClassA.
|
|
287
|
-
const typeB = (0, ecschema_metadata_1.containerTypeToString)(customAttributeClassB.
|
|
292
|
+
if (customAttributeClassA.appliesTo !== customAttributeClassB.appliesTo) {
|
|
293
|
+
const typeA = (0, ecschema_metadata_1.containerTypeToString)(customAttributeClassA.appliesTo);
|
|
294
|
+
const typeB = (0, ecschema_metadata_1.containerTypeToString)(customAttributeClassB.appliesTo);
|
|
288
295
|
await this._reporter.reportCustomAttributeClassDelta(customAttributeClassA, "appliesTo", typeA, typeB, this._compareDirection);
|
|
289
296
|
}
|
|
290
297
|
}
|
|
@@ -295,7 +302,7 @@ class SchemaComparer {
|
|
|
295
302
|
*/
|
|
296
303
|
async compareCustomAttributeContainers(containerA, containerB) {
|
|
297
304
|
const promises = [];
|
|
298
|
-
if (
|
|
305
|
+
if (containerA.customAttributes) {
|
|
299
306
|
for (const ca of containerA.customAttributes) {
|
|
300
307
|
if (!containerB.customAttributes || !this.containerHasClass(ca[1], containerA, containerB))
|
|
301
308
|
promises.push(this._reporter.reportCustomAttributeInstanceClassMissing(containerA, ca[1], this._compareDirection));
|
|
@@ -310,18 +317,16 @@ class SchemaComparer {
|
|
|
310
317
|
*/
|
|
311
318
|
async compareEnumerations(enumA, enumB) {
|
|
312
319
|
const promises = [];
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
promises.push(this.compareEnumerators(enumeratorA, enumeratorB, enumA, enumB));
|
|
321
|
-
}
|
|
320
|
+
for (const enumeratorA of enumA.enumerators) {
|
|
321
|
+
const enumeratorB = enumB.enumerators.find((e) => e.name === enumeratorA.name);
|
|
322
|
+
if (!enumeratorB) {
|
|
323
|
+
promises.push(this._reporter.reportEnumeratorMissing(enumA, enumeratorA, this._compareDirection));
|
|
324
|
+
}
|
|
325
|
+
else if (this._compareDirection === SchemaCompareDirection.Forward) {
|
|
326
|
+
promises.push(this.compareEnumerators(enumeratorA, enumeratorB, enumA, enumB));
|
|
322
327
|
}
|
|
323
328
|
}
|
|
324
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
329
|
+
if (this._compareDirection === SchemaCompareDirection.Backward) {
|
|
325
330
|
await Promise.all(promises);
|
|
326
331
|
return;
|
|
327
332
|
}
|
|
@@ -341,13 +346,13 @@ class SchemaComparer {
|
|
|
341
346
|
*/
|
|
342
347
|
async compareKindOfQuantities(koqA, koqB) {
|
|
343
348
|
const promises = [];
|
|
344
|
-
if (
|
|
349
|
+
if (koqA.presentationFormats) {
|
|
345
350
|
for (const unitA of koqA.presentationFormats) {
|
|
346
351
|
if (-1 === koqB.presentationFormats.findIndex((unitB) => this.areOverrideFormatsSameByName(unitA, unitB, koqA.schema.name, koqB.schema.name)))
|
|
347
352
|
promises.push(this._reporter.reportPresentationUnitMissing(koqA, unitA, this._compareDirection));
|
|
348
353
|
}
|
|
349
354
|
}
|
|
350
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
355
|
+
if (this._compareDirection === SchemaCompareDirection.Backward) {
|
|
351
356
|
await Promise.all(promises);
|
|
352
357
|
return;
|
|
353
358
|
}
|
|
@@ -371,7 +376,7 @@ class SchemaComparer {
|
|
|
371
376
|
* @param categoryB
|
|
372
377
|
*/
|
|
373
378
|
async comparePropertyCategories(categoryA, categoryB) {
|
|
374
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
379
|
+
if (this._compareDirection === SchemaCompareDirection.Backward)
|
|
375
380
|
return;
|
|
376
381
|
if (categoryA.priority !== categoryB.priority)
|
|
377
382
|
await this._reporter.reportPropertyCategoryDelta(categoryA, "priority", categoryA.priority, categoryB.priority, this._compareDirection);
|
|
@@ -384,7 +389,7 @@ class SchemaComparer {
|
|
|
384
389
|
async compareFormats(formatA, formatB) {
|
|
385
390
|
const promises = [];
|
|
386
391
|
promises.push(this.compareFormatUnits(formatA, formatB));
|
|
387
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
392
|
+
if (this._compareDirection === SchemaCompareDirection.Backward) {
|
|
388
393
|
await Promise.all(promises);
|
|
389
394
|
return;
|
|
390
395
|
}
|
|
@@ -436,7 +441,7 @@ class SchemaComparer {
|
|
|
436
441
|
* @param unitB
|
|
437
442
|
*/
|
|
438
443
|
async compareUnits(unitA, unitB) {
|
|
439
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
444
|
+
if (this._compareDirection === SchemaCompareDirection.Backward)
|
|
440
445
|
return;
|
|
441
446
|
const promises = [];
|
|
442
447
|
if (unitA.phenomenon || unitB.phenomenon) {
|
|
@@ -473,7 +478,7 @@ class SchemaComparer {
|
|
|
473
478
|
* @param invertedUnitB
|
|
474
479
|
*/
|
|
475
480
|
async compareInvertedUnits(invertedUnitA, invertedUnitB) {
|
|
476
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
481
|
+
if (this._compareDirection === SchemaCompareDirection.Backward)
|
|
477
482
|
return;
|
|
478
483
|
const promises = [];
|
|
479
484
|
if (invertedUnitA.invertsUnit || invertedUnitB.invertsUnit) {
|
|
@@ -502,7 +507,7 @@ class SchemaComparer {
|
|
|
502
507
|
* @param phenomenonB
|
|
503
508
|
*/
|
|
504
509
|
async comparePhenomenons(phenomenonA, phenomenonB) {
|
|
505
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
510
|
+
if (this._compareDirection === SchemaCompareDirection.Backward)
|
|
506
511
|
return;
|
|
507
512
|
if (phenomenonA.definition !== phenomenonB.definition)
|
|
508
513
|
await this._reporter.reportPhenomenonDelta(phenomenonA, "definition", phenomenonA.definition, phenomenonB.definition, this._compareDirection);
|
|
@@ -513,7 +518,7 @@ class SchemaComparer {
|
|
|
513
518
|
* @param constantB
|
|
514
519
|
*/
|
|
515
520
|
async compareConstants(constantA, constantB) {
|
|
516
|
-
if (this._compareDirection === SchemaCompareDirection.Backward
|
|
521
|
+
if (this._compareDirection === SchemaCompareDirection.Backward)
|
|
517
522
|
return;
|
|
518
523
|
const promises = [];
|
|
519
524
|
if (constantA.phenomenon || constantB.phenomenon) {
|
|
@@ -535,11 +540,6 @@ class SchemaComparer {
|
|
|
535
540
|
}
|
|
536
541
|
async comparePropertyType(propertyA, propertyB) {
|
|
537
542
|
const promises = [];
|
|
538
|
-
const propertyTypeA = (0, ecschema_metadata_1.propertyTypeToString)(propertyA.propertyType);
|
|
539
|
-
const propertyTypeB = (0, ecschema_metadata_1.propertyTypeToString)(propertyB.propertyType);
|
|
540
|
-
if (propertyTypeA !== propertyTypeB) {
|
|
541
|
-
promises.push(this._reporter.reportPropertyDelta(propertyA, "type", propertyTypeA, propertyTypeB, this._compareDirection));
|
|
542
|
-
}
|
|
543
543
|
if (propertyA.isArray()) {
|
|
544
544
|
const minOccursB = propertyB.isArray() ? propertyB.minOccurs : undefined;
|
|
545
545
|
if (propertyA.minOccurs !== minOccursB) {
|
|
@@ -638,7 +638,7 @@ class SchemaComparer {
|
|
|
638
638
|
await Promise.all(promises);
|
|
639
639
|
}
|
|
640
640
|
async compareFormatUnits(formatA, formatB) {
|
|
641
|
-
if (!formatA.units
|
|
641
|
+
if (!formatA.units)
|
|
642
642
|
return;
|
|
643
643
|
const promises = [];
|
|
644
644
|
for (const unitA of formatA.units) {
|
|
@@ -679,8 +679,8 @@ class SchemaComparer {
|
|
|
679
679
|
* @returns true if both names are the same and they come from their respective top level schema.
|
|
680
680
|
*/
|
|
681
681
|
areItemsSameByName(itemKeyA, itemKeyB, topLevelSchemaNameA, topLevelSchemaNameB) {
|
|
682
|
-
const nameA = itemKeyA ? itemKeyA.name : undefined;
|
|
683
|
-
const nameB = itemKeyB ? itemKeyB.name : undefined;
|
|
682
|
+
const nameA = itemKeyA ? itemKeyA.name.toUpperCase() : undefined;
|
|
683
|
+
const nameB = itemKeyB ? itemKeyB.name.toUpperCase() : undefined;
|
|
684
684
|
const schemaNameA = itemKeyA
|
|
685
685
|
? ecschema_metadata_1.SchemaItem.isSchemaItem(itemKeyA)
|
|
686
686
|
? itemKeyA.schema.name
|