@itwin/ecschema-editing 4.8.0-dev.34 → 4.8.0-dev.36

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.
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaCompareVisitor.d.ts","sourceRoot":"","sources":["../../../src/Validation/SchemaCompareVisitor.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,oBAAoB,EAAE,6BAA6B,EAClF,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,KAAK,EAClG,UAAU,EAAY,gBAAgB,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,EAAE,UAAU,EACrF,WAAW,EAAE,IAAI,EAAE,UAAU,EAC9C,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;GAGG;AACH,qBAAa,oBAAqB,YAAW,kBAAkB;IAC7D,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,eAAe,CAAkB;IAEzC;;;;OAIG;gBACS,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM;IAKpE;;;OAGG;IACU,eAAe,CAAC,OAAO,EAAE,MAAM;IAI5C;;;OAGG;IACU,eAAe,CAAC,WAAW,EAAE,UAAU;IAKpD;;;OAGG;IACU,UAAU,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxD;;;OAGG;IACU,aAAa,CAAC,SAAS,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAUjE;;;OAGG;IACU,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAKlE;;;OAGG;IACU,gBAAgB,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAInE;;;OAG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,OAAO,CAAC,IAAI,CAAC;IAM7F;;;OAGG;IACU,6BAA6B,CAAC,UAAU,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBpG;;;OAGG;IACU,gBAAgB,CAAC,KAAK,EAAE,WAAW;IAMhD;;;OAGG;IACU,mBAAmB,CAAC,IAAI,EAAE,cAAc;IAMrD;;;OAGG;IACU,qBAAqB,CAAC,SAAS,EAAE,gBAAgB;IAM9D;;;OAGG;IACU,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxD;;;OAGG;IACU,SAAS,CAAC,KAAK,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAMlD;;;OAGG;IACU,iBAAiB,CAAC,aAAa,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAM1E;;;OAGG;IACU,eAAe,CAAC,YAAY,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrE;;;OAGG;IACU,eAAe,CAAC,WAAW,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAMpE;;;OAGG;IACU,aAAa,CAAC,SAAS,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAK/D"}
@@ -44,7 +44,8 @@ class SchemaCompareVisitor {
44
44
  */
45
45
  async visitClass(classA) {
46
46
  const classB = await this._schemaB.lookupItem(classA.name);
47
- this._schemaComparer.compareClasses(classA, classB);
47
+ if (classB && classA.schemaItemType === classB.schemaItemType)
48
+ this._schemaComparer.compareClasses(classA, classB);
48
49
  }
49
50
  /**
50
51
  * Called for each [[AnyProperty]] instance of an ECClass.
@@ -53,7 +54,7 @@ class SchemaCompareVisitor {
53
54
  async visitProperty(propertyA) {
54
55
  let propertyB;
55
56
  const classB = await this._schemaB.lookupItem(propertyA.class.name);
56
- if (classB && ecschema_metadata_1.ECClass.isECClass(classB)) {
57
+ if (classB && propertyA.class.schemaItemType === classB.schemaItemType) {
57
58
  propertyB = await classB.getProperty(propertyA.name);
58
59
  this._schemaComparer.compareProperties(propertyA, propertyB);
59
60
  }
@@ -64,7 +65,8 @@ class SchemaCompareVisitor {
64
65
  */
65
66
  async visitEntityClass(entityA) {
66
67
  const entityB = await this._schemaB.lookupItem(entityA.name);
67
- this._schemaComparer.compareEntityClasses(entityA, entityB);
68
+ if (entityB && entityB.schemaItemType === ecschema_metadata_1.SchemaItemType.EntityClass)
69
+ this._schemaComparer.compareEntityClasses(entityA, entityB);
68
70
  }
69
71
  /**
70
72
  * Called for each [[StructClass]] instance found during schema traversal.
@@ -79,7 +81,7 @@ class SchemaCompareVisitor {
79
81
  */
80
82
  async visitMixin(mixinA) {
81
83
  const mixinB = await this._schemaB.lookupItem(mixinA.name);
82
- if (!mixinB || mixinB.schemaItemType === ecschema_metadata_1.SchemaItemType.Mixin)
84
+ if (mixinB && mixinB.schemaItemType === ecschema_metadata_1.SchemaItemType.Mixin)
83
85
  this._schemaComparer.compareMixins(mixinA, mixinB);
84
86
  }
85
87
  /**
@@ -88,7 +90,7 @@ class SchemaCompareVisitor {
88
90
  */
89
91
  async visitRelationshipClass(relationshipA) {
90
92
  const relationshipB = await this._schemaB.lookupItem(relationshipA.name);
91
- if (!relationshipB || relationshipB.schemaItemType === ecschema_metadata_1.SchemaItemType.RelationshipClass)
93
+ if (relationshipB && relationshipB.schemaItemType === ecschema_metadata_1.SchemaItemType.RelationshipClass)
92
94
  this._schemaComparer.compareRelationshipClasses(relationshipA, relationshipB);
93
95
  }
94
96
  /**
@@ -98,9 +100,12 @@ class SchemaCompareVisitor {
98
100
  async visitRelationshipConstraint(constraintA) {
99
101
  let constraintB;
100
102
  const relationshipB = await this._schemaB.lookupItem(constraintA.relationshipClass.name);
101
- if (relationshipB && relationshipB.schemaItemType === ecschema_metadata_1.SchemaItemType.RelationshipClass)
103
+ if (relationshipB && relationshipB.schemaItemType === ecschema_metadata_1.SchemaItemType.RelationshipClass) {
102
104
  constraintB = constraintA.isSource ? relationshipB.source : relationshipB.target;
103
- this._schemaComparer.compareRelationshipConstraints(constraintA, constraintB);
105
+ if (constraintB) {
106
+ this._schemaComparer.compareRelationshipConstraints(constraintA, constraintB);
107
+ }
108
+ }
104
109
  }
105
110
  /**
106
111
  * Called for each [[CustomAttributeClass]] instance found during schema traversal.
@@ -108,7 +113,7 @@ class SchemaCompareVisitor {
108
113
  */
109
114
  async visitCustomAttributeClass(customAttributeA) {
110
115
  const customAttributeB = await this._schemaB.lookupItem(customAttributeA.name);
111
- if (!customAttributeB || customAttributeB.schemaItemType === ecschema_metadata_1.SchemaItemType.CustomAttributeClass)
116
+ if (customAttributeB && customAttributeB.schemaItemType === ecschema_metadata_1.SchemaItemType.CustomAttributeClass)
112
117
  this._schemaComparer.compareCustomAttributeClasses(customAttributeA, customAttributeB);
113
118
  }
114
119
  /**
@@ -123,17 +128,19 @@ class SchemaCompareVisitor {
123
128
  containerB = this._schemaB;
124
129
  }
125
130
  else if (ecschema_metadata_1.ECClass.isECClass(containerA)) {
126
- containerB = await this._schemaB.lookupItem(containerA.name);
131
+ const parent = await this._schemaB.lookupItem(containerA.name);
132
+ containerB = parent && parent.schemaItemType === containerA.schemaItemType ? parent : undefined;
127
133
  }
128
134
  else if (ecschema_metadata_1.Property.isProperty(containerA)) {
129
135
  const parent = await this._schemaB.lookupItem(containerA.class.name);
130
- containerB = parent && ecschema_metadata_1.ECClass.isECClass(parent) ? await parent.getProperty(shortName) : undefined;
136
+ containerB = parent && parent.schemaItemType === containerA.class.schemaItemType ? await parent.getProperty(shortName) : undefined;
131
137
  }
132
138
  else if (ecschema_metadata_1.RelationshipConstraint.isRelationshipConstraint(containerA)) {
133
139
  const parent = await this._schemaB.lookupItem(containerA.relationshipClass.name);
134
140
  containerB = parent ? containerA.isSource ? parent.source : parent.target : undefined;
135
141
  }
136
- this._schemaComparer.compareCustomAttributeContainers(containerA, containerB);
142
+ if (containerB)
143
+ this._schemaComparer.compareCustomAttributeContainers(containerA, containerB);
137
144
  }
138
145
  /**
139
146
  * Called for each [[Enumeration]] instance found during schema traversal.
@@ -141,7 +148,7 @@ class SchemaCompareVisitor {
141
148
  */
142
149
  async visitEnumeration(enumA) {
143
150
  const enumB = await this._schemaB.lookupItem(enumA.name);
144
- if (!enumB || enumB.schemaItemType === ecschema_metadata_1.SchemaItemType.Enumeration)
151
+ if (enumB && enumB.schemaItemType === ecschema_metadata_1.SchemaItemType.Enumeration)
145
152
  this._schemaComparer.compareEnumerations(enumA, enumB);
146
153
  }
147
154
  /**
@@ -150,7 +157,7 @@ class SchemaCompareVisitor {
150
157
  */
151
158
  async visitKindOfQuantity(koqA) {
152
159
  const koqB = await this._schemaB.lookupItem(koqA.name);
153
- if (!koqB || koqB.schemaItemType === ecschema_metadata_1.SchemaItemType.KindOfQuantity)
160
+ if (koqB && koqB.schemaItemType === ecschema_metadata_1.SchemaItemType.KindOfQuantity)
154
161
  this._schemaComparer.compareKindOfQuantities(koqA, koqB);
155
162
  }
156
163
  /**
@@ -159,7 +166,7 @@ class SchemaCompareVisitor {
159
166
  */
160
167
  async visitPropertyCategory(categoryA) {
161
168
  const categoryB = await this._schemaB.lookupItem(categoryA.name);
162
- if (!categoryB || categoryB.schemaItemType === ecschema_metadata_1.SchemaItemType.PropertyCategory)
169
+ if (categoryB && categoryB.schemaItemType === ecschema_metadata_1.SchemaItemType.PropertyCategory)
163
170
  this._schemaComparer.comparePropertyCategories(categoryA, categoryB);
164
171
  }
165
172
  /**
@@ -168,7 +175,7 @@ class SchemaCompareVisitor {
168
175
  */
169
176
  async visitFormat(formatA) {
170
177
  const formatB = await this._schemaB.lookupItem(formatA.name);
171
- if (!formatB || formatB.schemaItemType === ecschema_metadata_1.SchemaItemType.Format)
178
+ if (formatB && formatB.schemaItemType === ecschema_metadata_1.SchemaItemType.Format)
172
179
  this._schemaComparer.compareFormats(formatA, formatB);
173
180
  }
174
181
  /**
@@ -177,7 +184,7 @@ class SchemaCompareVisitor {
177
184
  */
178
185
  async visitUnit(unitA) {
179
186
  const unitB = await this._schemaB.lookupItem(unitA.name);
180
- if (!unitB || ecschema_metadata_1.Unit.isUnit(unitB))
187
+ if (unitB && ecschema_metadata_1.Unit.isUnit(unitB))
181
188
  this._schemaComparer.compareUnits(unitA, unitB);
182
189
  }
183
190
  /**
@@ -186,7 +193,7 @@ class SchemaCompareVisitor {
186
193
  */
187
194
  async visitInvertedUnit(invertedUnitA) {
188
195
  const invertedUnitB = await this._schemaB.lookupItem(invertedUnitA.name);
189
- if (!invertedUnitB || invertedUnitB.schemaItemType === ecschema_metadata_1.SchemaItemType.InvertedUnit)
196
+ if (invertedUnitB && invertedUnitB.schemaItemType === ecschema_metadata_1.SchemaItemType.InvertedUnit)
190
197
  this._schemaComparer.compareInvertedUnits(invertedUnitA, invertedUnitB);
191
198
  }
192
199
  /**
@@ -202,7 +209,7 @@ class SchemaCompareVisitor {
202
209
  */
203
210
  async visitPhenomenon(phenomenonA) {
204
211
  const phenomenonB = await this._schemaB.lookupItem(phenomenonA.name);
205
- if (!phenomenonB || phenomenonB.schemaItemType === ecschema_metadata_1.SchemaItemType.Phenomenon)
212
+ if (phenomenonB && phenomenonB.schemaItemType === ecschema_metadata_1.SchemaItemType.Phenomenon)
206
213
  this._schemaComparer.comparePhenomenons(phenomenonA, phenomenonB);
207
214
  }
208
215
  /**
@@ -211,7 +218,7 @@ class SchemaCompareVisitor {
211
218
  */
212
219
  async visitConstant(constantA) {
213
220
  const constantB = await this._schemaB.lookupItem(constantA.name);
214
- if (!constantB || constantB.schemaItemType === ecschema_metadata_1.SchemaItemType.Constant)
221
+ if (constantB && constantB.schemaItemType === ecschema_metadata_1.SchemaItemType.Constant)
215
222
  this._schemaComparer.compareConstants(constantA, constantB);
216
223
  }
217
224
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaCompareVisitor.js","sourceRoot":"","sources":["../../../src/Validation/SchemaCompareVisitor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAIkC;AAGlC;;;GA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CAAC;IAC5E,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,eAAe,CAAC,YAAwB;QACnD,mDAAmD;IACrD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,eAAe,CAAC,WAAuB;QAClD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAa,WAAW,CAAC,IAAI,CAAC,CAAC;QACjF,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,cAAc,KAAK,kCAAc,CAAC,UAAU;YAC1E,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,aAAa,CAAC,SAAmB;QAC5C,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAW,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3E,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,cAAc,KAAK,kCAAc,CAAC,QAAQ;YACpE,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAChE,CAAC;CACF;AAhOD,oDAgOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Comparison\r\n */\r\n\r\nimport { AnyClass, AnyProperty, Constant, CustomAttributeClass, CustomAttributeContainerProps,\r\n ECClass, EntityClass, Enumeration, Format, InvertedUnit, ISchemaPartVisitor, KindOfQuantity, Mixin,\r\n Phenomenon, Property, PropertyCategory, RelationshipClass, RelationshipConstraint, Schema, SchemaItem,\r\n SchemaItemType, StructClass, Unit, UnitSystem,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport { ISchemaComparer } from \"./SchemaComparer\";\r\n\r\n/**\r\n * An ISchemaPartVisitor interface implementation that is used to compare to Schemas.\r\n * @internal\r\n */\r\nexport class SchemaCompareVisitor implements ISchemaPartVisitor {\r\n private _schemaB: Schema;\r\n private _schemaComparer: ISchemaComparer;\r\n\r\n /**\r\n * Initializes a new SchemaCompareVisitor instance.\r\n * @param schemaComparer The [[SchemaComparer]] to use to compare each item of the schema.\r\n * @param schemaToCompare The second or 'B' schema to compare against the schema being traversed (Schema A).\r\n */\r\n constructor(schemaComparer: ISchemaComparer, schemaToCompare: Schema) {\r\n this._schemaComparer = schemaComparer;\r\n this._schemaB = schemaToCompare;\r\n }\r\n\r\n /**\r\n * Called before schema traversal.\r\n * @param schema a Schema object.\r\n */\r\n public async visitFullSchema(schemaA: Schema) {\r\n this._schemaComparer.compareSchemaProps(schemaA, this._schemaB);\r\n }\r\n\r\n /**\r\n * Called for each [[SchemaItem]] instance found during schema traversal.\r\n * @param schemaItem a SchemaItem object.\r\n */\r\n public async visitSchemaItem(schemaItemA: SchemaItem) {\r\n const schemaItemB = await this._schemaB.lookupItem(schemaItemA.name);\r\n this._schemaComparer.compareSchemaItems(schemaItemA, schemaItemB);\r\n }\r\n\r\n /**\r\n * Called for each [[AnyClass]] instance found during schema traversal.\r\n * @param ecClass an ECClass object.\r\n */\r\n public async visitClass(classA: AnyClass): Promise<void> {\r\n const classB = await this._schemaB.lookupItem<AnyClass>(classA.name);\r\n this._schemaComparer.compareClasses(classA, classB);\r\n }\r\n\r\n /**\r\n * Called for each [[AnyProperty]] instance of an ECClass.\r\n * @param property an AnyProperty object.\r\n */\r\n public async visitProperty(propertyA: AnyProperty): Promise<void> {\r\n let propertyB: AnyProperty | undefined;\r\n\r\n const classB = await this._schemaB.lookupItem<ECClass>(propertyA.class.name);\r\n if (classB && ECClass.isECClass(classB)) {\r\n propertyB = await classB.getProperty(propertyA.name) as AnyProperty;\r\n this._schemaComparer.compareProperties(propertyA, propertyB);\r\n }\r\n }\r\n\r\n /**\r\n * Called for each [[EntityClass]] instance found during schema traversal.\r\n * @param entityClass an EntityClass object.\r\n */\r\n public async visitEntityClass(entityA: EntityClass): Promise<void> {\r\n const entityB = await this._schemaB.lookupItem<EntityClass>(entityA.name);\r\n this._schemaComparer.compareEntityClasses(entityA, entityB);\r\n }\r\n\r\n /**\r\n * Called for each [[StructClass]] instance found during schema traversal.\r\n * @param structClass a StructClass object.\r\n */\r\n public async visitStructClass(_structA: StructClass): Promise<void> {\r\n // No comparison to make specifically on StructClasses\r\n }\r\n\r\n /**\r\n * Called for each [[Mixin]] instance found during schema traversal.\r\n * @param mixin a Mixin object.\r\n */\r\n public async visitMixin(mixinA: Mixin): Promise<void> {\r\n const mixinB = await this._schemaB.lookupItem<Mixin>(mixinA.name);\r\n if (!mixinB || mixinB.schemaItemType === SchemaItemType.Mixin)\r\n this._schemaComparer.compareMixins(mixinA, mixinB);\r\n }\r\n\r\n /**\r\n * Called for each [[RelationshipClass]] instance found during schema traversal.\r\n * @param relationshipClass a RelationshipClass object.\r\n */\r\n public async visitRelationshipClass(relationshipA: RelationshipClass): Promise<void> {\r\n const relationshipB = await this._schemaB.lookupItem<RelationshipClass>(relationshipA.name);\r\n if (!relationshipB || relationshipB.schemaItemType === SchemaItemType.RelationshipClass)\r\n this._schemaComparer.compareRelationshipClasses(relationshipA, relationshipB);\r\n }\r\n\r\n /**\r\n * Called for each [[RelationshipConstraint]] of each RelationshipClass found during schema traversal.\r\n * @param relationshipConstraint a RelationshipConstraint object.\r\n */\r\n public async visitRelationshipConstraint(constraintA: RelationshipConstraint): Promise<void> {\r\n let constraintB: RelationshipConstraint | undefined;\r\n const relationshipB = await this._schemaB.lookupItem<RelationshipClass>(constraintA.relationshipClass.name);\r\n if (relationshipB && relationshipB.schemaItemType === SchemaItemType.RelationshipClass)\r\n constraintB = constraintA.isSource ? relationshipB.source : relationshipB.target;\r\n this._schemaComparer.compareRelationshipConstraints(constraintA, constraintB);\r\n }\r\n\r\n /**\r\n * Called for each [[CustomAttributeClass]] instance found during schema traversal.\r\n * @param customAttributeClass a CustomAttributeClass object.\r\n */\r\n public async visitCustomAttributeClass(customAttributeA: CustomAttributeClass): Promise<void> {\r\n const customAttributeB = await this._schemaB.lookupItem<CustomAttributeClass>(customAttributeA.name);\r\n if (!customAttributeB || customAttributeB.schemaItemType === SchemaItemType.CustomAttributeClass)\r\n this._schemaComparer.compareCustomAttributeClasses(customAttributeA, customAttributeB);\r\n }\r\n\r\n /**\r\n * Called for each [[CustomAttribute]] container in the schema.\r\n * @param customAttributeContainer a [[CustomAttributeContainerProps]] object.\r\n */\r\n public async visitCustomAttributeContainer(containerA: CustomAttributeContainerProps): Promise<void> {\r\n const nameParts = containerA.fullName.split(\".\");\r\n const shortName = nameParts.length === 1 ? nameParts[0] : nameParts[1];\r\n let containerB: CustomAttributeContainerProps | undefined;\r\n\r\n if (Schema.isSchema(containerA)) {\r\n containerB = this._schemaB;\r\n } else if (ECClass.isECClass(containerA)) {\r\n containerB = await this._schemaB.lookupItem(containerA.name);\r\n } else if (Property.isProperty(containerA)) {\r\n const parent = await this._schemaB.lookupItem<ECClass>(containerA.class.name);\r\n containerB = parent && ECClass.isECClass(parent) ? await parent.getProperty(shortName) : undefined;\r\n } else if (RelationshipConstraint.isRelationshipConstraint(containerA)) {\r\n const parent = await this._schemaB.lookupItem<RelationshipClass>(containerA.relationshipClass.name);\r\n containerB = parent ? containerA.isSource ? parent.source : parent.target : undefined;\r\n }\r\n\r\n this._schemaComparer.compareCustomAttributeContainers(containerA, containerB);\r\n }\r\n\r\n /**\r\n * Called for each [[Enumeration]] instance found during schema traversal.\r\n * @param enumeration an Enumeration object.\r\n */\r\n public async visitEnumeration(enumA: Enumeration) {\r\n const enumB = await this._schemaB.lookupItem<Enumeration>(enumA.name);\r\n if (!enumB || enumB.schemaItemType === SchemaItemType.Enumeration)\r\n this._schemaComparer.compareEnumerations(enumA, enumB);\r\n }\r\n\r\n /**\r\n * Called for each [[KindOfQuantity]] instance found during schema traversal.\r\n * @param koq a KindOfQuantity object.\r\n */\r\n public async visitKindOfQuantity(koqA: KindOfQuantity) {\r\n const koqB = await this._schemaB.lookupItem<KindOfQuantity>(koqA.name);\r\n if (!koqB || koqB.schemaItemType === SchemaItemType.KindOfQuantity)\r\n this._schemaComparer.compareKindOfQuantities(koqA, koqB);\r\n }\r\n\r\n /**\r\n * Called for each [[PropertyCategory]] instance found during schema traversal.\r\n * @param category a PropertyCategory object.\r\n */\r\n public async visitPropertyCategory(categoryA: PropertyCategory) {\r\n const categoryB = await this._schemaB.lookupItem<PropertyCategory>(categoryA.name);\r\n if (!categoryB || categoryB.schemaItemType === SchemaItemType.PropertyCategory)\r\n this._schemaComparer.comparePropertyCategories(categoryA, categoryB);\r\n }\r\n\r\n /**\r\n * Called for each [[Format]] instance found during schema traversal.\r\n * @param format a Format object.\r\n */\r\n public async visitFormat(formatA: Format): Promise<void> {\r\n const formatB = await this._schemaB.lookupItem<Format>(formatA.name);\r\n if (!formatB || formatB.schemaItemType === SchemaItemType.Format)\r\n this._schemaComparer.compareFormats(formatA, formatB);\r\n }\r\n\r\n /**\r\n * Called for each [[Unit]] instance found during schema traversal.\r\n * @param unit a Unit object.\r\n */\r\n public async visitUnit(unitA: Unit): Promise<void> {\r\n const unitB = await this._schemaB.lookupItem<Unit>(unitA.name);\r\n if (!unitB || Unit.isUnit(unitB))\r\n this._schemaComparer.compareUnits(unitA, unitB);\r\n }\r\n\r\n /**\r\n * Called for each [[InvertedUnit]] instance found during schema traversal.\r\n * @param invertedUnit an InvertedUnit object.\r\n */\r\n public async visitInvertedUnit(invertedUnitA: InvertedUnit): Promise<void> {\r\n const invertedUnitB = await this._schemaB.lookupItem<InvertedUnit>(invertedUnitA.name);\r\n if (!invertedUnitB || invertedUnitB.schemaItemType === SchemaItemType.InvertedUnit)\r\n this._schemaComparer.compareInvertedUnits(invertedUnitA, invertedUnitB);\r\n }\r\n\r\n /**\r\n * Called for each [[UnitSystem]] instance found during schema traversal.\r\n * @param unitSystem a UnitSystem object.\r\n */\r\n public async visitUnitSystem(_unitSystemA: UnitSystem): Promise<void> {\r\n // No comparison to make specifically on unitSystem\r\n }\r\n\r\n /**\r\n * Called for each [[Phenomenon]] instance found during schema traversal.\r\n * @param phenomena a Phenomenon object.\r\n */\r\n public async visitPhenomenon(phenomenonA: Phenomenon): Promise<void> {\r\n const phenomenonB = await this._schemaB.lookupItem<Phenomenon>(phenomenonA.name);\r\n if (!phenomenonB || phenomenonB.schemaItemType === SchemaItemType.Phenomenon)\r\n this._schemaComparer.comparePhenomenons(phenomenonA, phenomenonB);\r\n }\r\n\r\n /**\r\n * Called for each [[Constant]] instance found during schema traversal.\r\n * @param constant a Constant object.\r\n */\r\n public async visitConstant(constantA: Constant): Promise<void> {\r\n const constantB = await this._schemaB.lookupItem<Constant>(constantA.name);\r\n if (!constantB || constantB.schemaItemType === SchemaItemType.Constant)\r\n this._schemaComparer.compareConstants(constantA, constantB);\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"SchemaCompareVisitor.js","sourceRoot":"","sources":["../../../src/Validation/SchemaCompareVisitor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAIkC;AAGlC;;;GAGG;AACH,MAAa,oBAAoB;IAI/B;;;;OAIG;IACH,YAAY,cAA+B,EAAE,eAAuB;QAClE,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,eAAe,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,eAAe,CAAC,OAAe;QAC1C,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IAClE,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,eAAe,CAAC,WAAuB;QAClD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACrE,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,WAAW,EAAE,WAAW,CA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UAAU,CAAa,WAAW,CAAC,IAAI,CAAC,CAAC;QACjF,IAAI,WAAW,IAAI,WAAW,CAAC,cAAc,KAAK,kCAAc,CAAC,UAAU;YACzE,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,aAAa,CAAC,SAAmB;QAC5C,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAW,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3E,IAAI,SAAS,IAAI,SAAS,CAAC,cAAc,KAAK,kCAAc,CAAC,QAAQ;YACnE,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAChE,CAAC;CACF;AAvOD,oDAuOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Comparison\r\n */\r\n\r\nimport { AnyClass, AnyProperty, Constant, CustomAttributeClass, CustomAttributeContainerProps,\r\n ECClass, EntityClass, Enumeration, Format, InvertedUnit, ISchemaPartVisitor, KindOfQuantity, Mixin,\r\n Phenomenon, Property, PropertyCategory, RelationshipClass, RelationshipConstraint, Schema, SchemaItem,\r\n SchemaItemType, StructClass, Unit, UnitSystem,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport { ISchemaComparer } from \"./SchemaComparer\";\r\n\r\n/**\r\n * An ISchemaPartVisitor interface implementation that is used to compare to Schemas.\r\n * @internal\r\n */\r\nexport class SchemaCompareVisitor implements ISchemaPartVisitor {\r\n private _schemaB: Schema;\r\n private _schemaComparer: ISchemaComparer;\r\n\r\n /**\r\n * Initializes a new SchemaCompareVisitor instance.\r\n * @param schemaComparer The [[SchemaComparer]] to use to compare each item of the schema.\r\n * @param schemaToCompare The second or 'B' schema to compare against the schema being traversed (Schema A).\r\n */\r\n constructor(schemaComparer: ISchemaComparer, schemaToCompare: Schema) {\r\n this._schemaComparer = schemaComparer;\r\n this._schemaB = schemaToCompare;\r\n }\r\n\r\n /**\r\n * Called before schema traversal.\r\n * @param schema a Schema object.\r\n */\r\n public async visitFullSchema(schemaA: Schema) {\r\n this._schemaComparer.compareSchemaProps(schemaA, this._schemaB);\r\n }\r\n\r\n /**\r\n * Called for each [[SchemaItem]] instance found during schema traversal.\r\n * @param schemaItem a SchemaItem object.\r\n */\r\n public async visitSchemaItem(schemaItemA: SchemaItem) {\r\n const schemaItemB = await this._schemaB.lookupItem(schemaItemA.name);\r\n this._schemaComparer.compareSchemaItems(schemaItemA, schemaItemB);\r\n }\r\n\r\n /**\r\n * Called for each [[AnyClass]] instance found during schema traversal.\r\n * @param ecClass an ECClass object.\r\n */\r\n public async visitClass(classA: AnyClass): Promise<void> {\r\n const classB = await this._schemaB.lookupItem<AnyClass>(classA.name);\r\n if (classB && classA.schemaItemType === classB.schemaItemType)\r\n this._schemaComparer.compareClasses(classA, classB);\r\n }\r\n\r\n /**\r\n * Called for each [[AnyProperty]] instance of an ECClass.\r\n * @param property an AnyProperty object.\r\n */\r\n public async visitProperty(propertyA: AnyProperty): Promise<void> {\r\n let propertyB: AnyProperty | undefined;\r\n\r\n const classB = await this._schemaB.lookupItem<ECClass>(propertyA.class.name);\r\n if (classB && propertyA.class.schemaItemType === classB.schemaItemType){\r\n propertyB = await classB.getProperty(propertyA.name) as AnyProperty;\r\n this._schemaComparer.compareProperties(propertyA, propertyB);\r\n }\r\n }\r\n\r\n /**\r\n * Called for each [[EntityClass]] instance found during schema traversal.\r\n * @param entityClass an EntityClass object.\r\n */\r\n public async visitEntityClass(entityA: EntityClass): Promise<void> {\r\n const entityB = await this._schemaB.lookupItem<EntityClass>(entityA.name);\r\n if (entityB && entityB.schemaItemType === SchemaItemType.EntityClass)\r\n this._schemaComparer.compareEntityClasses(entityA, entityB);\r\n }\r\n\r\n /**\r\n * Called for each [[StructClass]] instance found during schema traversal.\r\n * @param structClass a StructClass object.\r\n */\r\n public async visitStructClass(_structA: StructClass): Promise<void> {\r\n // No comparison to make specifically on StructClasses\r\n }\r\n\r\n /**\r\n * Called for each [[Mixin]] instance found during schema traversal.\r\n * @param mixin a Mixin object.\r\n */\r\n public async visitMixin(mixinA: Mixin): Promise<void> {\r\n const mixinB = await this._schemaB.lookupItem<Mixin>(mixinA.name);\r\n if (mixinB && mixinB.schemaItemType === SchemaItemType.Mixin)\r\n this._schemaComparer.compareMixins(mixinA, mixinB);\r\n }\r\n\r\n /**\r\n * Called for each [[RelationshipClass]] instance found during schema traversal.\r\n * @param relationshipClass a RelationshipClass object.\r\n */\r\n public async visitRelationshipClass(relationshipA: RelationshipClass): Promise<void> {\r\n const relationshipB = await this._schemaB.lookupItem<RelationshipClass>(relationshipA.name);\r\n if (relationshipB && relationshipB.schemaItemType === SchemaItemType.RelationshipClass)\r\n this._schemaComparer.compareRelationshipClasses(relationshipA, relationshipB);\r\n }\r\n\r\n /**\r\n * Called for each [[RelationshipConstraint]] of each RelationshipClass found during schema traversal.\r\n * @param relationshipConstraint a RelationshipConstraint object.\r\n */\r\n public async visitRelationshipConstraint(constraintA: RelationshipConstraint): Promise<void> {\r\n let constraintB: RelationshipConstraint | undefined;\r\n const relationshipB = await this._schemaB.lookupItem<RelationshipClass>(constraintA.relationshipClass.name);\r\n if (relationshipB && relationshipB.schemaItemType === SchemaItemType.RelationshipClass) {\r\n constraintB = constraintA.isSource ? relationshipB.source : relationshipB.target;\r\n if (constraintB) {\r\n this._schemaComparer.compareRelationshipConstraints(constraintA, constraintB);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Called for each [[CustomAttributeClass]] instance found during schema traversal.\r\n * @param customAttributeClass a CustomAttributeClass object.\r\n */\r\n public async visitCustomAttributeClass(customAttributeA: CustomAttributeClass): Promise<void> {\r\n const customAttributeB = await this._schemaB.lookupItem<CustomAttributeClass>(customAttributeA.name);\r\n if (customAttributeB && customAttributeB.schemaItemType === SchemaItemType.CustomAttributeClass)\r\n this._schemaComparer.compareCustomAttributeClasses(customAttributeA, customAttributeB);\r\n }\r\n\r\n /**\r\n * Called for each [[CustomAttribute]] container in the schema.\r\n * @param customAttributeContainer a [[CustomAttributeContainerProps]] object.\r\n */\r\n public async visitCustomAttributeContainer(containerA: CustomAttributeContainerProps): Promise<void> {\r\n const nameParts = containerA.fullName.split(\".\");\r\n const shortName = nameParts.length === 1 ? nameParts[0] : nameParts[1];\r\n let containerB: CustomAttributeContainerProps | undefined;\r\n\r\n if (Schema.isSchema(containerA)) {\r\n containerB = this._schemaB;\r\n } else if (ECClass.isECClass(containerA)) {\r\n const parent = await this._schemaB.lookupItem<ECClass>(containerA.name);\r\n containerB = parent && parent.schemaItemType === containerA.schemaItemType ? parent : undefined;\r\n } else if (Property.isProperty(containerA)) {\r\n const parent = await this._schemaB.lookupItem<ECClass>(containerA.class.name);\r\n containerB = parent && parent.schemaItemType === containerA.class.schemaItemType ? await parent.getProperty(shortName) : undefined;\r\n } else if (RelationshipConstraint.isRelationshipConstraint(containerA)) {\r\n const parent = await this._schemaB.lookupItem<RelationshipClass>(containerA.relationshipClass.name);\r\n containerB = parent ? containerA.isSource ? parent.source : parent.target : undefined;\r\n }\r\n\r\n if (containerB)\r\n this._schemaComparer.compareCustomAttributeContainers(containerA, containerB);\r\n }\r\n\r\n /**\r\n * Called for each [[Enumeration]] instance found during schema traversal.\r\n * @param enumeration an Enumeration object.\r\n */\r\n public async visitEnumeration(enumA: Enumeration) {\r\n const enumB = await this._schemaB.lookupItem<Enumeration>(enumA.name);\r\n if (enumB && enumB.schemaItemType === SchemaItemType.Enumeration)\r\n this._schemaComparer.compareEnumerations(enumA, enumB);\r\n }\r\n\r\n /**\r\n * Called for each [[KindOfQuantity]] instance found during schema traversal.\r\n * @param koq a KindOfQuantity object.\r\n */\r\n public async visitKindOfQuantity(koqA: KindOfQuantity) {\r\n const koqB = await this._schemaB.lookupItem<KindOfQuantity>(koqA.name);\r\n if (koqB && koqB.schemaItemType === SchemaItemType.KindOfQuantity)\r\n this._schemaComparer.compareKindOfQuantities(koqA, koqB);\r\n }\r\n\r\n /**\r\n * Called for each [[PropertyCategory]] instance found during schema traversal.\r\n * @param category a PropertyCategory object.\r\n */\r\n public async visitPropertyCategory(categoryA: PropertyCategory) {\r\n const categoryB = await this._schemaB.lookupItem<PropertyCategory>(categoryA.name);\r\n if (categoryB && categoryB.schemaItemType === SchemaItemType.PropertyCategory)\r\n this._schemaComparer.comparePropertyCategories(categoryA, categoryB);\r\n }\r\n\r\n /**\r\n * Called for each [[Format]] instance found during schema traversal.\r\n * @param format a Format object.\r\n */\r\n public async visitFormat(formatA: Format): Promise<void> {\r\n const formatB = await this._schemaB.lookupItem<Format>(formatA.name);\r\n if (formatB && formatB.schemaItemType === SchemaItemType.Format)\r\n this._schemaComparer.compareFormats(formatA, formatB);\r\n }\r\n\r\n /**\r\n * Called for each [[Unit]] instance found during schema traversal.\r\n * @param unit a Unit object.\r\n */\r\n public async visitUnit(unitA: Unit): Promise<void> {\r\n const unitB = await this._schemaB.lookupItem<Unit>(unitA.name);\r\n if (unitB && Unit.isUnit(unitB))\r\n this._schemaComparer.compareUnits(unitA, unitB);\r\n }\r\n\r\n /**\r\n * Called for each [[InvertedUnit]] instance found during schema traversal.\r\n * @param invertedUnit an InvertedUnit object.\r\n */\r\n public async visitInvertedUnit(invertedUnitA: InvertedUnit): Promise<void> {\r\n const invertedUnitB = await this._schemaB.lookupItem<InvertedUnit>(invertedUnitA.name);\r\n if (invertedUnitB && invertedUnitB.schemaItemType === SchemaItemType.InvertedUnit)\r\n this._schemaComparer.compareInvertedUnits(invertedUnitA, invertedUnitB);\r\n }\r\n\r\n /**\r\n * Called for each [[UnitSystem]] instance found during schema traversal.\r\n * @param unitSystem a UnitSystem object.\r\n */\r\n public async visitUnitSystem(_unitSystemA: UnitSystem): Promise<void> {\r\n // No comparison to make specifically on unitSystem\r\n }\r\n\r\n /**\r\n * Called for each [[Phenomenon]] instance found during schema traversal.\r\n * @param phenomena a Phenomenon object.\r\n */\r\n public async visitPhenomenon(phenomenonA: Phenomenon): Promise<void> {\r\n const phenomenonB = await this._schemaB.lookupItem<Phenomenon>(phenomenonA.name);\r\n if (phenomenonB && phenomenonB.schemaItemType === SchemaItemType.Phenomenon)\r\n this._schemaComparer.comparePhenomenons(phenomenonA, phenomenonB);\r\n }\r\n\r\n /**\r\n * Called for each [[Constant]] instance found during schema traversal.\r\n * @param constant a Constant object.\r\n */\r\n public async visitConstant(constantA: Constant): Promise<void> {\r\n const constantB = await this._schemaB.lookupItem<Constant>(constantA.name);\r\n if (constantB && constantB.schemaItemType === SchemaItemType.Constant)\r\n this._schemaComparer.compareConstants(constantA, constantB);\r\n }\r\n}\r\n"]}
@@ -20,22 +20,22 @@ export interface ISchemaComparer {
20
20
  compareSchemas(schemaA: Schema, schemaB: Schema): void;
21
21
  compareSchemaProps(schemaA: Schema, schemaB: Schema): void;
22
22
  compareSchemaItems(schemaItemA: SchemaItem, schemaItemB: SchemaItem | undefined): void;
23
- compareClasses(classA: AnyClass, classB: AnyClass | undefined): void;
23
+ compareClasses(classA: AnyClass, classB: AnyClass): void;
24
24
  compareProperties(propertyA: AnyProperty, propertyB: AnyProperty | undefined): void;
25
- compareEntityClasses(entityA: EntityClass, entityB: EntityClass | undefined): void;
26
- compareMixins(mixinA: Mixin, mixinB: Mixin | undefined): void;
27
- compareRelationshipClasses(relationshipClassA: RelationshipClass, relationshipClassB: RelationshipClass | undefined): void;
28
- compareRelationshipConstraints(relationshipConstraintA: RelationshipConstraint, relationshipConstraintB: RelationshipConstraint | undefined): void;
29
- compareCustomAttributeClasses(customAttributeClassA: CustomAttributeClass, customAttributeClassB: CustomAttributeClass | undefined): void;
30
- compareCustomAttributeContainers(containerA: CustomAttributeContainerProps, containerB: CustomAttributeContainerProps | undefined): void;
31
- compareEnumerations(enumA: Enumeration, enumB: Enumeration | undefined): void;
32
- compareKindOfQuantities(koqA: KindOfQuantity, koqB: KindOfQuantity | undefined): void;
33
- comparePropertyCategories(categoryA: PropertyCategory, categoryB: PropertyCategory | undefined): void;
34
- compareFormats(formatA: Format, formatB: Format | undefined): void;
35
- compareUnits(unitA: Unit, unitB: Unit | undefined): void;
36
- compareInvertedUnits(invertedUnitA: InvertedUnit, invertedUnitB: InvertedUnit | undefined): void;
37
- comparePhenomenons(phenomenonA: Phenomenon, phenomenonB: Phenomenon | undefined): void;
38
- compareConstants(constantA: Constant, constantB: Constant | undefined): void;
25
+ compareEntityClasses(entityA: EntityClass, entityB: EntityClass): void;
26
+ compareMixins(mixinA: Mixin, mixinB: Mixin): void;
27
+ compareRelationshipClasses(relationshipClassA: RelationshipClass, relationshipClassB: RelationshipClass): void;
28
+ compareRelationshipConstraints(relationshipConstraintA: RelationshipConstraint, relationshipConstraintB: RelationshipConstraint): void;
29
+ compareCustomAttributeClasses(customAttributeClassA: CustomAttributeClass, customAttributeClassB: CustomAttributeClass): void;
30
+ compareCustomAttributeContainers(containerA: CustomAttributeContainerProps, containerB: CustomAttributeContainerProps): void;
31
+ compareEnumerations(enumA: Enumeration, enumB: Enumeration): void;
32
+ compareKindOfQuantities(koqA: KindOfQuantity, koqB: KindOfQuantity): void;
33
+ comparePropertyCategories(categoryA: PropertyCategory, categoryB: PropertyCategory): void;
34
+ compareFormats(formatA: Format, formatB: Format): void;
35
+ compareUnits(unitA: Unit, unitB: Unit): void;
36
+ compareInvertedUnits(invertedUnitA: InvertedUnit, invertedUnitB: InvertedUnit): void;
37
+ comparePhenomenons(phenomenonA: Phenomenon, phenomenonB: Phenomenon): void;
38
+ compareConstants(constantA: Constant, constantB: Constant): void;
39
39
  }
40
40
  /**
41
41
  * Compares EC Schemas and reports differences using the [[IDiagnosticReporter]] objects
@@ -74,7 +74,7 @@ export declare class SchemaComparer {
74
74
  * @param classA The first ECClass.
75
75
  * @param classB The second ECClass.
76
76
  */
77
- compareClasses(classA: AnyClass, classB: AnyClass | undefined): Promise<void>;
77
+ compareClasses(classA: AnyClass, classB: AnyClass): Promise<void>;
78
78
  /**
79
79
  * Compares two ECProperties to identify differences between property values.
80
80
  * @param propertyA The first ECProperty.
@@ -86,85 +86,85 @@ export declare class SchemaComparer {
86
86
  * @param entityA
87
87
  * @param entityB
88
88
  */
89
- compareEntityClasses(entityA: EntityClass, entityB: EntityClass | undefined): Promise<void>;
89
+ compareEntityClasses(entityA: EntityClass, entityB: EntityClass): Promise<void>;
90
90
  /**
91
91
  * Compares two Mixin objects to identify differences between property values.
92
92
  * @param mixinA
93
93
  * @param mixinB
94
94
  */
95
- compareMixins(mixinA: Mixin, mixinB: Mixin | undefined): Promise<void>;
95
+ compareMixins(mixinA: Mixin, mixinB: Mixin): Promise<void>;
96
96
  /**
97
97
  * Compares two RelationshipClass objects to identify differences between property values.
98
98
  * @param relationshipA
99
99
  * @param relationshipB
100
100
  */
101
- compareRelationshipClasses(relationshipA: RelationshipClass, relationshipB: RelationshipClass | undefined): Promise<void>;
101
+ compareRelationshipClasses(relationshipA: RelationshipClass, relationshipB: RelationshipClass): Promise<void>;
102
102
  /**
103
103
  * Compares two RelationshipConstraint objects to identify differences between property values.
104
104
  * @param relationshipConstraintA
105
105
  * @param relationshipConstraintB
106
106
  */
107
- compareRelationshipConstraints(constraintA: RelationshipConstraint, constraintB: RelationshipConstraint | undefined): Promise<void>;
107
+ compareRelationshipConstraints(constraintA: RelationshipConstraint, constraintB: RelationshipConstraint): Promise<void>;
108
108
  /**
109
109
  * Compares two CustomAttributeClass objects to identify differences between property values.
110
110
  * @param customAttributeClassA
111
111
  * @param customAttributeClassB
112
112
  */
113
- compareCustomAttributeClasses(customAttributeClassA: CustomAttributeClass, customAttributeClassB: CustomAttributeClass | undefined): Promise<void>;
113
+ compareCustomAttributeClasses(customAttributeClassA: CustomAttributeClass, customAttributeClassB: CustomAttributeClass): Promise<void>;
114
114
  /**
115
115
  * Compares two CustomAttributeContainerProps objects to identify differences between property values.
116
116
  * @param containerA
117
117
  * @param containerB
118
118
  */
119
- compareCustomAttributeContainers(containerA: CustomAttributeContainerProps, containerB: CustomAttributeContainerProps | undefined): Promise<void>;
119
+ compareCustomAttributeContainers(containerA: CustomAttributeContainerProps, containerB: CustomAttributeContainerProps): Promise<void>;
120
120
  /**
121
121
  * Compares two Enumeration objects to identify differences between property values.
122
122
  * @param enumA
123
123
  * @param enumB
124
124
  */
125
- compareEnumerations(enumA: Enumeration, enumB: Enumeration | undefined): Promise<void>;
125
+ compareEnumerations(enumA: Enumeration, enumB: Enumeration): Promise<void>;
126
126
  /**
127
127
  * Compares two KindOfQuantity objects to identify differences between property values.
128
128
  * @param koqA
129
129
  * @param koqB
130
130
  */
131
- compareKindOfQuantities(koqA: KindOfQuantity, koqB: KindOfQuantity | undefined): Promise<void>;
131
+ compareKindOfQuantities(koqA: KindOfQuantity, koqB: KindOfQuantity): Promise<void>;
132
132
  /**
133
133
  * Compares two PropertyCategory objects to identify differences between property values.
134
134
  * @param categoryA
135
135
  * @param categoryB
136
136
  */
137
- comparePropertyCategories(categoryA: PropertyCategory, categoryB: PropertyCategory | undefined): Promise<void>;
137
+ comparePropertyCategories(categoryA: PropertyCategory, categoryB: PropertyCategory): Promise<void>;
138
138
  /**
139
139
  * Compares two Format objects to identify differences between property values.
140
140
  * @param formatA
141
141
  * @param formatB
142
142
  */
143
- compareFormats(formatA: Format, formatB: Format | undefined): Promise<void>;
143
+ compareFormats(formatA: Format, formatB: Format): Promise<void>;
144
144
  /**
145
145
  * Compares two Unit objects to identify differences between property values.
146
146
  * @param unitA
147
147
  * @param unitB
148
148
  */
149
- compareUnits(unitA: Unit, unitB: Unit | undefined): Promise<void>;
149
+ compareUnits(unitA: Unit, unitB: Unit): Promise<void>;
150
150
  /**
151
151
  * Compares two InvertedUnit objects to identify differences between property values.
152
152
  * @param invertedUnitA
153
153
  * @param invertedUnitB
154
154
  */
155
- compareInvertedUnits(invertedUnitA: InvertedUnit, invertedUnitB: InvertedUnit | undefined): Promise<void>;
155
+ compareInvertedUnits(invertedUnitA: InvertedUnit, invertedUnitB: InvertedUnit): Promise<void>;
156
156
  /**
157
157
  * Compares two Phenomenon objects to identify differences between property values.
158
158
  * @param phenomenonA
159
159
  * @param phenomenonB
160
160
  */
161
- comparePhenomenons(phenomenonA: Phenomenon, phenomenonB: Phenomenon | undefined): Promise<void>;
161
+ comparePhenomenons(phenomenonA: Phenomenon, phenomenonB: Phenomenon): Promise<void>;
162
162
  /**
163
163
  * Compares two Constant objects to identify differences between property values.
164
164
  * @param constantA
165
165
  * @param constantB
166
166
  */
167
- compareConstants(constantA: Constant, constantB: Constant | undefined): Promise<void>;
167
+ compareConstants(constantA: Constant, constantB: Constant): Promise<void>;
168
168
  private comparePropertyType;
169
169
  private compareEnumerators;
170
170
  private compareFormatUnits;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaComparer.d.ts","sourceRoot":"","sources":["../../../src/Validation/SchemaComparer.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACL,QAAQ,EAAiB,WAAW,EAAyB,QAAQ,EAA0C,oBAAoB,EACnI,6BAA6B,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,KAAK,EAAkB,UAAU,EACzG,gBAAgB,EAAwB,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,EAChH,UAAU,EAA8D,IAAI,EAC7E,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAKjE;;;;GAIG;AACH,oBAAY,sBAAsB;IAChC,OAAO,IAAI;IACX,QAAQ,IAAI;CACb;AACD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvD,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3D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AAS,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;YA4BxE,mBAAmB;YAsGnB,kBAAkB;YAgBlB,kBAAkB;IA0BhC,OAAO,CAAC,4BAA4B;IAqBpC;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IAwB1B;;;;;;OAMG;IACH,OAAO,CAAC,iBAAiB;CAuB1B"}
@@ -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 || !classB)
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
- if (entityB) {
192
- for (const mixinA of entityA.mixins) {
193
- if (-1 === entityB.mixins.findIndex((mixinB) => this.areItemsSameByName(mixinA, mixinB, entityA.schema.name, entityB.schema.name)))
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 || !mixinB)
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 || !relationshipB)
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 (constraintB && constraintA.constraintClasses) {
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 || !constraintB) {
258
+ if (this._compareDirection === SchemaCompareDirection.Backward) {
252
259
  await Promise.all(promises);
253
260
  return;
254
261
  }
@@ -280,7 +287,7 @@ class SchemaComparer {
280
287
  * @param customAttributeClassB
281
288
  */
282
289
  async compareCustomAttributeClasses(customAttributeClassA, customAttributeClassB) {
283
- if (this._compareDirection === SchemaCompareDirection.Backward || !customAttributeClassB)
290
+ if (this._compareDirection === SchemaCompareDirection.Backward)
284
291
  return;
285
292
  if (customAttributeClassA.appliesTo !== customAttributeClassB.appliesTo) {
286
293
  const typeA = (0, ecschema_metadata_1.containerTypeToString)(customAttributeClassA.appliesTo);
@@ -295,7 +302,7 @@ class SchemaComparer {
295
302
  */
296
303
  async compareCustomAttributeContainers(containerA, containerB) {
297
304
  const promises = [];
298
- if (containerB && containerA.customAttributes) {
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
- if (enumB) {
314
- for (const enumeratorA of enumA.enumerators) {
315
- const enumeratorB = enumB.enumerators.find((e) => e.name === enumeratorA.name);
316
- if (!enumeratorB) {
317
- promises.push(this._reporter.reportEnumeratorMissing(enumA, enumeratorA, this._compareDirection));
318
- }
319
- else if (this._compareDirection === SchemaCompareDirection.Forward) {
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 || !enumB) {
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 (koqB && koqA.presentationFormats) {
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 || !koqB) {
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 || !categoryB)
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 || !formatB) {
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 || !unitB)
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 || !invertedUnitB)
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 || !phenomenonB)
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 || !constantB)
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 || !formatB)
641
+ if (!formatA.units)
642
642
  return;
643
643
  const promises = [];
644
644
  for (const unitA of formatA.units) {
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaComparer.js","sourceRoot":"","sources":["../../../src/Validation/SchemaComparer.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAKkC;AAClC,wDAA+H;AAE/H,+EAA4E;AAC5E,iEAA8D;AAC9D,iDAA8C;AAE9C;;;;GAIG;AACH,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,yEAAW,CAAA;IACX,2EAAY,CAAA;AACd,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC;AA2BD,SAAS,WAAW,CAAC,MAAe,EAAE,MAAe;IACnD,MAAM,GAAG,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC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ACf,CAAC;CACF;AA/0BD,wCA+0BC;AAED;;;;;GAKG;AACH,SAAS,UAAU,CAAC,CAAU,EAAE,CAAU;IACxC,IAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QACxC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACvD,OAAO,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACL,CAAC;IACD,IAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9B,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnC,OAAO,WAAW,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC,YAAY,EAAE,EAAE;YACrF,OAAO,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Comparison\r\n */\r\n\r\nimport {\r\n AnyClass, AnyEnumerator, AnyProperty, classModifierToString, Constant, containerTypeToString, CustomAttribute, CustomAttributeClass,\r\n CustomAttributeContainerProps, EntityClass, Enumeration, Format, InvertedUnit, KindOfQuantity, Mixin, OverrideFormat, Phenomenon,\r\n primitiveTypeToString, PropertyCategory, propertyTypeToString, RelationshipClass, RelationshipConstraint, Schema,\r\n SchemaItem, SchemaItemKey, strengthDirectionToString, strengthToString, Unit,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport { formatTraitsToArray, formatTypeToString, scientificTypeToString, showSignOptionToString } from \"@itwin/core-quantity\";\r\nimport { ISchemaCompareReporter } from \"./SchemaCompareReporter\";\r\nimport { SchemaCompareResultDelegate } from \"./SchemaCompareResultDelegate\";\r\nimport { SchemaCompareVisitor } from \"./SchemaCompareVisitor\";\r\nimport { SchemaWalker } from \"./SchemaWalker\";\r\n\r\n/**\r\n * Enum that identifies if Schema A is being iterated (Forward) or\r\n * Schema B is being iterated (Backward);\r\n * @alpha\r\n */\r\nexport enum SchemaCompareDirection {\r\n Forward = 0,\r\n Backward = 1,\r\n}\r\n/**\r\n * Interface for comparing EC Schemas.\r\n * @alpha\r\n */\r\nexport interface ISchemaComparer {\r\n compareSchemas(schemaA: Schema, schemaB: Schema): void;\r\n compareSchemaProps(schemaA: Schema, schemaB: Schema): void;\r\n compareSchemaItems(schemaItemA: SchemaItem, schemaItemB: SchemaItem | undefined): void;\r\n compareClasses(classA: AnyClass, classB: AnyClass | undefined): void;\r\n compareProperties(propertyA: AnyProperty, propertyB: AnyProperty | undefined): void;\r\n compareEntityClasses(entityA: EntityClass, entityB: EntityClass | undefined): void;\r\n compareMixins(mixinA: Mixin, mixinB: Mixin | undefined): void;\r\n compareRelationshipClasses(relationshipClassA: RelationshipClass, relationshipClassB: RelationshipClass | undefined): void;\r\n compareRelationshipConstraints(relationshipConstraintA: RelationshipConstraint, relationshipConstraintB: RelationshipConstraint | undefined): void;\r\n compareCustomAttributeClasses(customAttributeClassA: CustomAttributeClass, customAttributeClassB: CustomAttributeClass | undefined): void;\r\n compareCustomAttributeContainers(containerA: CustomAttributeContainerProps, containerB: CustomAttributeContainerProps | undefined): void;\r\n compareEnumerations(enumA: Enumeration, enumB: Enumeration | undefined): void;\r\n compareKindOfQuantities(koqA: KindOfQuantity, koqB: KindOfQuantity | undefined): void;\r\n comparePropertyCategories(categoryA: PropertyCategory, categoryB: PropertyCategory | undefined): void;\r\n compareFormats(formatA: Format, formatB: Format | undefined): void;\r\n compareUnits(unitA: Unit, unitB: Unit | undefined): void;\r\n compareInvertedUnits(invertedUnitA: InvertedUnit, invertedUnitB: InvertedUnit | undefined): void;\r\n comparePhenomenons(phenomenonA: Phenomenon, phenomenonB: Phenomenon | undefined): void;\r\n compareConstants(constantA: Constant, constantB: Constant | undefined): void;\r\n}\r\n\r\nfunction labelsMatch(label1?: string, label2?: string) {\r\n label1 = label1 === undefined ? \"\" : label1;\r\n label2 = label2 === undefined ? \"\" : label2;\r\n return label1 === label2;\r\n}\r\n\r\n/**\r\n * Compares EC Schemas and reports differences using the [[IDiagnosticReporter]] objects\r\n * specified.\r\n * @alpha\r\n */\r\nexport class SchemaComparer {\r\n private _compareDirection: SchemaCompareDirection;\r\n private _reporter!: SchemaCompareResultDelegate;\r\n private _reporters: ISchemaCompareReporter[];\r\n\r\n /**\r\n * Initializes a new SchemaComparer instance.\r\n * @param reporters The [[IDiagnosticReporter]] object(s) to use to report the results.\r\n */\r\n constructor(...reporters: ISchemaCompareReporter[]) {\r\n this._compareDirection = SchemaCompareDirection.Forward;\r\n this._reporters = reporters;\r\n }\r\n\r\n /**\r\n * Compares two schemas to identify differences.\r\n * @param schemaA The first Schema.\r\n * @param schemaB The second Schema.\r\n */\r\n public async compareSchemas(schemaA: Schema, schemaB: Schema) {\r\n this._reporter = new SchemaCompareResultDelegate(schemaA, schemaB, ...this._reporters);\r\n let visitor = new SchemaCompareVisitor(this, schemaB);\r\n let walker = new SchemaWalker(visitor);\r\n await walker.traverseSchema(schemaA);\r\n\r\n this._compareDirection = SchemaCompareDirection.Backward;\r\n\r\n visitor = new SchemaCompareVisitor(this, schemaA);\r\n walker = new SchemaWalker(visitor);\r\n await walker.traverseSchema(schemaB);\r\n\r\n this._compareDirection = SchemaCompareDirection.Forward;\r\n this._reporter.compareComplete();\r\n }\r\n\r\n /**\r\n * Compares two schemas to identify differences between property values.\r\n * @param schemaA The first Schema.\r\n * @param schemaB The second Schema.\r\n */\r\n public async compareSchemaProps(schemaA: Schema, schemaB: Schema): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n for (const ref of schemaA.references) {\r\n const refB = await schemaB.getReference(ref.fullName);\r\n if (!refB)\r\n promises.push(this._reporter.reportSchemaReferenceMissing(schemaA, ref, this._compareDirection));\r\n else if (!refB.schemaKey.matches(ref.schemaKey))\r\n promises.push(this._reporter.reportSchemaReferenceDelta(schemaA, ref, ref.schemaKey.version.toString(), refB.schemaKey.version.toString(), this._compareDirection));\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n if (schemaA.schemaKey.toString() !== schemaB.schemaKey.toString())\r\n promises.push(this._reporter.reportSchemaDelta(schemaA, \"schemaKey\", schemaA.schemaKey.toString(), schemaB.schemaKey.toString(), this._compareDirection));\r\n\r\n if (schemaA.alias !== schemaB.alias)\r\n promises.push(this._reporter.reportSchemaDelta(schemaA, \"alias\", schemaA.alias, schemaB.alias, this._compareDirection));\r\n\r\n if (schemaA.description !== schemaB.description)\r\n promises.push(this._reporter.reportSchemaDelta(schemaA, \"description\", schemaA.description, schemaB.description, this._compareDirection));\r\n\r\n if (schemaA.label !== schemaB.label)\r\n promises.push(this._reporter.reportSchemaDelta(schemaA, \"label\", schemaA.label, schemaB.label, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two SchemaItems to identify differences between property values.\r\n * @param schemaItemA The first SchemaItem.\r\n * @param schemaItemB The second SchemaItem.\r\n */\r\n public async compareSchemaItems(schemaItemA: SchemaItem, schemaItemB: SchemaItem | undefined): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n if (!schemaItemB) {\r\n promises.push(this._reporter.reportSchemaItemMissing(schemaItemA, this._compareDirection));\r\n await Promise.all(promises);\r\n return;\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n if (schemaItemA.description !== schemaItemB.description)\r\n promises.push(this._reporter.reportSchemaItemDelta(schemaItemA, \"description\", schemaItemA.description, schemaItemB.description, this._compareDirection));\r\n\r\n if (!labelsMatch(schemaItemA.label, schemaItemB.label))\r\n promises.push(this._reporter.reportSchemaItemDelta(schemaItemA, \"label\", schemaItemA.label, schemaItemB.label, this._compareDirection));\r\n\r\n if (schemaItemA.schemaItemType !== schemaItemB.schemaItemType) {\r\n const aType = schemaItemA.schemaItemType;\r\n const bType = schemaItemB.schemaItemType;\r\n promises.push(this._reporter.reportSchemaItemDelta(schemaItemA, \"schemaItemType\", aType, bType, this._compareDirection));\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two ECClasses to identify differences between property values.\r\n * @param classA The first ECClass.\r\n * @param classB The second ECClass.\r\n */\r\n public async compareClasses(classA: AnyClass, classB: AnyClass | undefined): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !classB)\r\n return;\r\n\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (classA.modifier !== classB.modifier) {\r\n const aMod = classModifierToString(classA.modifier);\r\n const bMod = classModifierToString(classB.modifier);\r\n promises.push(this._reporter.reportClassDelta(classA, \"modifier\", aMod, bMod, this._compareDirection));\r\n }\r\n\r\n if (classA.baseClass || classB.baseClass) {\r\n const fullNameA = classA.baseClass?.fullName;\r\n const fullNameB = classB.baseClass?.fullName;\r\n\r\n if (fullNameA !== fullNameB) {\r\n const areSameByName = this.areItemsSameByName(classA.baseClass, classB.baseClass, classA.schema.name, classB.schema.name);\r\n if (!areSameByName) {\r\n const baseA = await classA.baseClass as AnyClass;\r\n const baseB = await classB.baseClass as AnyClass;\r\n promises.push(this._reporter.reportBaseClassDelta(classA, baseA, baseB, this._compareDirection));\r\n }\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two ECProperties to identify differences between property values.\r\n * @param propertyA The first ECProperty.\r\n * @param propertyB The second ECProperty.\r\n */\r\n public async compareProperties(propertyA: AnyProperty, propertyB: AnyProperty | undefined): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (!propertyB) {\r\n promises.push(this._reporter.reportPropertyMissing(propertyA, this._compareDirection));\r\n await Promise.all(promises);\r\n return;\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n if (!labelsMatch(propertyA.label, propertyB.label))\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"label\", propertyA.label, propertyB.label, this._compareDirection));\r\n\r\n if (propertyA.description !== propertyB.description)\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"description\", propertyA.description, propertyB.description, this._compareDirection));\r\n\r\n if (propertyA.isReadOnly !== propertyB.isReadOnly)\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"isReadOnly\", propertyA.isReadOnly, propertyB.isReadOnly, this._compareDirection));\r\n\r\n if (propertyA.priority !== propertyB.priority)\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"priority\", propertyA.priority, propertyB.priority, this._compareDirection));\r\n\r\n if (propertyA.category || propertyB.category) {\r\n const catKeyA = propertyA.category?.fullName;\r\n const catKeyB = propertyB.category?.fullName;\r\n if (catKeyA !== catKeyB) {\r\n const areSameByName = this.areItemsSameByName(propertyA.category, propertyB.category, propertyA.schema.name, propertyB.schema.name);\r\n if (!areSameByName)\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"category\", catKeyA, catKeyB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (propertyA.kindOfQuantity || propertyB.kindOfQuantity) {\r\n const koqKeyA = propertyA.kindOfQuantity?.fullName;\r\n const koqKeyB = propertyB.kindOfQuantity?.fullName;\r\n if (koqKeyA !== koqKeyB) {\r\n const areSameByName = this.areItemsSameByName(propertyA.kindOfQuantity, propertyB.kindOfQuantity, propertyA.schema.name, propertyB.schema.name);\r\n if (!areSameByName)\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"kindOfQuantity\", koqKeyA, koqKeyB, this._compareDirection));\r\n }\r\n }\r\n\r\n promises.push(this.comparePropertyType(propertyA, propertyB));\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two EntityClass objects to identify differences between property values.\r\n * @param entityA\r\n * @param entityB\r\n */\r\n public async compareEntityClasses(entityA: EntityClass, entityB: EntityClass | undefined): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n if (entityB) {\r\n for (const mixinA of entityA.mixins) {\r\n if (-1 === entityB.mixins.findIndex((mixinB) => this.areItemsSameByName(mixinA, mixinB, entityA.schema.name, entityB.schema.name)))\r\n promises.push(this._reporter.reportEntityMixinMissing(entityA, await mixinA, this._compareDirection));\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two Mixin objects to identify differences between property values.\r\n * @param mixinA\r\n * @param mixinB\r\n */\r\n public async compareMixins(mixinA: Mixin, mixinB: Mixin | undefined): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !mixinB)\r\n return;\r\n\r\n if (mixinA.appliesTo || mixinB.appliesTo) {\r\n const appliesToA = mixinA.appliesTo?.fullName;\r\n const appliesToB = mixinB.appliesTo?.fullName;\r\n if (appliesToA !== appliesToB) {\r\n const areSameByName = this.areItemsSameByName(mixinA.appliesTo, mixinB.appliesTo, mixinA.schema.name, mixinB.schema.name);\r\n if (!areSameByName)\r\n await this._reporter.reportMixinDelta(mixinA, \"appliesTo\", appliesToA, appliesToB, this._compareDirection);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Compares two RelationshipClass objects to identify differences between property values.\r\n * @param relationshipA\r\n * @param relationshipB\r\n */\r\n public async compareRelationshipClasses(relationshipA: RelationshipClass, relationshipB: RelationshipClass | undefined): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !relationshipB)\r\n return;\r\n\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (relationshipA.strength !== relationshipB.strength) {\r\n const strengthAString = strengthToString(relationshipA.strength);\r\n const strengthBString = strengthToString(relationshipB.strength);\r\n promises.push(this._reporter.reportRelationshipClassDelta(relationshipA, \"strength\", strengthAString, strengthBString, this._compareDirection));\r\n }\r\n\r\n if (relationshipA.strengthDirection !== relationshipB.strengthDirection) {\r\n const directionAString = strengthDirectionToString(relationshipA.strengthDirection);\r\n const directionBString = strengthDirectionToString(relationshipB.strengthDirection);\r\n promises.push(this._reporter.reportRelationshipClassDelta(relationshipA, \"strengthDirection\", directionAString, directionBString, this._compareDirection));\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two RelationshipConstraint objects to identify differences between property values.\r\n * @param relationshipConstraintA\r\n * @param relationshipConstraintB\r\n */\r\n public async compareRelationshipConstraints(constraintA: RelationshipConstraint, constraintB: RelationshipConstraint | undefined): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (constraintB && constraintA.constraintClasses) {\r\n for (const classA of constraintA.constraintClasses) {\r\n if (!constraintB.constraintClasses || -1 === constraintB.constraintClasses.findIndex((classB) =>\r\n this.areItemsSameByName(classA, classB, constraintA.schema.name, constraintB.schema.name)))\r\n promises.push(this._reporter.reportRelationshipConstraintClassMissing(constraintA, await classA, this._compareDirection));\r\n }\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !constraintB) {\r\n await Promise.all(promises);\r\n return;\r\n }\r\n\r\n if (constraintA.multiplicity || constraintB.multiplicity) {\r\n const multiplicityA = constraintA.multiplicity.toString();\r\n const multiplicityB = constraintB.multiplicity.toString();\r\n if (multiplicityA !== multiplicityB)\r\n promises.push(this._reporter.reportRelationshipConstraintDelta(constraintA, \"multiplicity\", multiplicityA, multiplicityB, this._compareDirection));\r\n }\r\n\r\n if (constraintA.roleLabel !== constraintB.roleLabel)\r\n promises.push(this._reporter.reportRelationshipConstraintDelta(constraintA, \"roleLabel\", constraintA.roleLabel, constraintB.roleLabel, this._compareDirection));\r\n\r\n if (constraintA.polymorphic !== constraintB.polymorphic)\r\n promises.push(this._reporter.reportRelationshipConstraintDelta(constraintA, \"polymorphic\", constraintA.polymorphic, constraintB.polymorphic, this._compareDirection));\r\n\r\n if (constraintA.abstractConstraint || constraintB.abstractConstraint) {\r\n const abstractA = constraintA.abstractConstraint?.fullName;\r\n const abstractB = constraintB.abstractConstraint?.fullName;\r\n if (abstractA !== abstractB) {\r\n const areSameByName = this.areItemsSameByName(constraintA.abstractConstraint, constraintB.abstractConstraint, constraintA.schema.name, constraintB.schema.name);\r\n if (!areSameByName) {\r\n promises.push(this._reporter.reportRelationshipConstraintDelta(constraintA, \"abstractConstraint\", abstractA, abstractB, this._compareDirection));\r\n }\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two CustomAttributeClass objects to identify differences between property values.\r\n * @param customAttributeClassA\r\n * @param customAttributeClassB\r\n */\r\n public async compareCustomAttributeClasses(customAttributeClassA: CustomAttributeClass, customAttributeClassB: CustomAttributeClass | undefined): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !customAttributeClassB)\r\n return;\r\n\r\n if (customAttributeClassA.appliesTo !== customAttributeClassB.appliesTo) {\r\n const typeA = containerTypeToString(customAttributeClassA.appliesTo);\r\n const typeB = containerTypeToString(customAttributeClassB.appliesTo);\r\n await this._reporter.reportCustomAttributeClassDelta(customAttributeClassA, \"appliesTo\", typeA, typeB, this._compareDirection);\r\n }\r\n }\r\n\r\n /**\r\n * Compares two CustomAttributeContainerProps objects to identify differences between property values.\r\n * @param containerA\r\n * @param containerB\r\n */\r\n public async compareCustomAttributeContainers(containerA: CustomAttributeContainerProps, containerB: CustomAttributeContainerProps | undefined): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (containerB && containerA.customAttributes) {\r\n for (const ca of containerA.customAttributes) {\r\n if (!containerB.customAttributes || !this.containerHasClass(ca[1], containerA, containerB))\r\n promises.push(this._reporter.reportCustomAttributeInstanceClassMissing(containerA, ca[1], this._compareDirection));\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two Enumeration objects to identify differences between property values.\r\n * @param enumA\r\n * @param enumB\r\n */\r\n public async compareEnumerations(enumA: Enumeration, enumB: Enumeration | undefined): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (enumB) {\r\n for (const enumeratorA of enumA.enumerators) {\r\n const enumeratorB = enumB.enumerators.find((e) => e.name === enumeratorA.name);\r\n if (!enumeratorB) {\r\n promises.push(this._reporter.reportEnumeratorMissing(enumA, enumeratorA, this._compareDirection));\r\n } else if (this._compareDirection === SchemaCompareDirection.Forward) {\r\n promises.push(this.compareEnumerators(enumeratorA, enumeratorB, enumA, enumB));\r\n }\r\n }\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !enumB) {\r\n await Promise.all(promises);\r\n return;\r\n }\r\n if (enumA.type !== enumB.type) {\r\n const typeAString = enumA.type ? primitiveTypeToString(enumA.type) : undefined;\r\n const typeBString = enumB.type ? primitiveTypeToString(enumB.type) : undefined;\r\n promises.push(this._reporter.reportEnumerationDelta(enumA, \"type\", typeAString, typeBString, this._compareDirection));\r\n }\r\n\r\n if (enumA.isStrict !== enumB.isStrict)\r\n promises.push(this._reporter.reportEnumerationDelta(enumA, \"isStrict\", enumA.isStrict, enumB.isStrict, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two KindOfQuantity objects to identify differences between property values.\r\n * @param koqA\r\n * @param koqB\r\n */\r\n public async compareKindOfQuantities(koqA: KindOfQuantity, koqB: KindOfQuantity | undefined): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (koqB && koqA.presentationFormats) {\r\n for (const unitA of koqA.presentationFormats) {\r\n if (-1 === koqB.presentationFormats.findIndex((unitB) => this.areOverrideFormatsSameByName(unitA, unitB, koqA.schema.name, koqB.schema.name)))\r\n promises.push(this._reporter.reportPresentationUnitMissing(koqA, unitA, this._compareDirection));\r\n }\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !koqB) {\r\n await Promise.all(promises);\r\n return;\r\n }\r\n\r\n if (koqA.relativeError !== koqB.relativeError) {\r\n promises.push(this._reporter.reportKoqDelta(koqA, \"relativeError\", koqA.relativeError, koqB.relativeError, this._compareDirection));\r\n }\r\n\r\n if (koqA.persistenceUnit || koqB.persistenceUnit) {\r\n const unitNameA = koqA.persistenceUnit?.fullName;\r\n const unitNameB = koqB.persistenceUnit?.fullName;\r\n if (unitNameA !== unitNameB) {\r\n const eqByName = this.areItemsSameByName(koqA.persistenceUnit, koqB.persistenceUnit, koqA.schema.name, koqB.schema.name);\r\n if (!eqByName)\r\n promises.push(this._reporter.reportKoqDelta(koqA, \"persistenceUnit\", unitNameA, unitNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two PropertyCategory objects to identify differences between property values.\r\n * @param categoryA\r\n * @param categoryB\r\n */\r\n public async comparePropertyCategories(categoryA: PropertyCategory, categoryB: PropertyCategory | undefined): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !categoryB)\r\n return;\r\n\r\n if (categoryA.priority !== categoryB.priority)\r\n await this._reporter.reportPropertyCategoryDelta(categoryA, \"priority\", categoryA.priority, categoryB.priority, this._compareDirection);\r\n }\r\n\r\n /**\r\n * Compares two Format objects to identify differences between property values.\r\n * @param formatA\r\n * @param formatB\r\n */\r\n public async compareFormats(formatA: Format, formatB: Format | undefined): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n promises.push(this.compareFormatUnits(formatA, formatB));\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !formatB) {\r\n await Promise.all(promises);\r\n return;\r\n }\r\n\r\n if (formatA.roundFactor !== formatB.roundFactor)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"roundFactor\", formatA.roundFactor, formatB.roundFactor, this._compareDirection));\r\n\r\n if (formatA.type !== formatB.type) {\r\n const typeAString = formatTypeToString(formatA.type);\r\n const typeBString = formatTypeToString(formatB.type);\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"type\", typeAString, typeBString, this._compareDirection));\r\n }\r\n\r\n if (formatA.precision !== formatB.precision)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"precision\", formatA.precision, formatB.precision, this._compareDirection));\r\n\r\n if (formatA.minWidth !== formatB.minWidth)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"minWidth\", formatA.minWidth, formatB.minWidth, this._compareDirection));\r\n\r\n if (formatA.scientificType !== formatB.scientificType) {\r\n const typeAString = formatA.scientificType !== undefined ? scientificTypeToString(formatA.scientificType) : undefined;\r\n const typeBString = formatB.scientificType !== undefined ? scientificTypeToString(formatB.scientificType) : undefined;\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"scientificType\", typeAString, typeBString, this._compareDirection));\r\n }\r\n\r\n if (formatA.showSignOption !== formatB.showSignOption) {\r\n const optionA = showSignOptionToString(formatA.showSignOption);\r\n const optionB = showSignOptionToString(formatB.showSignOption);\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"showSignOption\", optionA, optionB, this._compareDirection));\r\n }\r\n\r\n if (formatA.decimalSeparator !== formatB.decimalSeparator)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"decimalSeparator\", formatA.decimalSeparator, formatB.decimalSeparator, this._compareDirection));\r\n\r\n if (formatA.thousandSeparator !== formatB.thousandSeparator)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"thousandSeparator\", formatA.thousandSeparator, formatB.thousandSeparator, this._compareDirection));\r\n\r\n if (formatA.uomSeparator !== formatB.uomSeparator)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"uomSeparator\", formatA.uomSeparator, formatB.uomSeparator, this._compareDirection));\r\n\r\n if (formatA.stationSeparator !== formatB.stationSeparator)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"stationSeparator\", formatA.stationSeparator, formatB.stationSeparator, this._compareDirection));\r\n\r\n if (formatA.stationOffsetSize !== formatB.stationOffsetSize)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"stationOffsetSize\", formatA.stationOffsetSize, formatB.stationOffsetSize, this._compareDirection));\r\n\r\n if (formatA.formatTraits !== formatB.formatTraits) {\r\n const traitsA = formatTraitsToArray(formatA.formatTraits);\r\n const traitsB = formatTraitsToArray(formatB.formatTraits);\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"formatTraits\", traitsA.toString(), traitsB.toString(), this._compareDirection));\r\n }\r\n\r\n if (formatA.spacer !== formatB.spacer)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"spacer\", formatA.spacer, formatB.spacer, this._compareDirection));\r\n\r\n if (formatA.includeZero !== formatB.includeZero)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"includeZero\", formatA.includeZero, formatB.includeZero, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two Unit objects to identify differences between property values.\r\n * @param unitA\r\n * @param unitB\r\n */\r\n public async compareUnits(unitA: Unit, unitB: Unit | undefined): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !unitB)\r\n return;\r\n\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (unitA.phenomenon || unitB.phenomenon) {\r\n const fullNameA = unitA.phenomenon?.fullName;\r\n const fullNameB = unitB.phenomenon?.fullName;\r\n if (fullNameA !== fullNameB) {\r\n const eqByName = this.areItemsSameByName(unitA.phenomenon, unitB.phenomenon, unitA.schema.name, unitB.schema.name);\r\n if (!eqByName)\r\n promises.push(this._reporter.reportUnitDelta(unitA, \"phenomenon\", fullNameA, fullNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (unitA.unitSystem || unitB.unitSystem) {\r\n const fullNameA = unitA.unitSystem?.fullName;\r\n const fullNameB = unitB.unitSystem?.fullName;\r\n if (fullNameA !== fullNameB) {\r\n const eqByName = this.areItemsSameByName(unitA.unitSystem, unitB.unitSystem, unitA.schema.name, unitB.schema.name);\r\n if (!eqByName)\r\n promises.push(this._reporter.reportUnitDelta(unitA, \"unitSystem\", fullNameA, fullNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (unitA.definition !== unitB.definition)\r\n promises.push(this._reporter.reportUnitDelta(unitA, \"definition\", unitA.definition, unitB.definition, this._compareDirection));\r\n\r\n if (unitA.numerator !== unitB.numerator)\r\n promises.push(this._reporter.reportUnitDelta(unitA, \"numerator\", unitA.numerator, unitB.numerator, this._compareDirection));\r\n\r\n if (unitA.denominator !== unitB.denominator)\r\n promises.push(this._reporter.reportUnitDelta(unitA, \"denominator\", unitA.denominator, unitB.denominator, this._compareDirection));\r\n\r\n if (unitA.offset !== unitB.offset)\r\n promises.push(this._reporter.reportUnitDelta(unitA, \"offset\", unitA.offset, unitB.offset, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two InvertedUnit objects to identify differences between property values.\r\n * @param invertedUnitA\r\n * @param invertedUnitB\r\n */\r\n public async compareInvertedUnits(invertedUnitA: InvertedUnit, invertedUnitB: InvertedUnit | undefined): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !invertedUnitB)\r\n return;\r\n\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (invertedUnitA.invertsUnit || invertedUnitB.invertsUnit) {\r\n const fullNameA = invertedUnitA.invertsUnit?.fullName;\r\n const fullNameB = invertedUnitB.invertsUnit?.fullName;\r\n if (fullNameA !== fullNameB) {\r\n const eqByName = this.areItemsSameByName(invertedUnitA.invertsUnit, invertedUnitB.invertsUnit, invertedUnitA.schema.name, invertedUnitB.schema.name);\r\n if (!eqByName)\r\n promises.push(this._reporter.reportInvertedUnitDelta(invertedUnitA, \"invertsUnit\", fullNameA, fullNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (invertedUnitA.unitSystem || invertedUnitB.unitSystem) {\r\n const fullNameA = invertedUnitA.unitSystem?.fullName;\r\n const fullNameB = invertedUnitB.unitSystem?.fullName;\r\n if (fullNameA !== fullNameB) {\r\n const eqByName = this.areItemsSameByName(invertedUnitA.unitSystem, invertedUnitB.unitSystem, invertedUnitA.schema.name, invertedUnitB.schema.name);\r\n if (!eqByName)\r\n promises.push(this._reporter.reportInvertedUnitDelta(invertedUnitA, \"unitSystem\", fullNameA, fullNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two Phenomenon objects to identify differences between property values.\r\n * @param phenomenonA\r\n * @param phenomenonB\r\n */\r\n public async comparePhenomenons(phenomenonA: Phenomenon, phenomenonB: Phenomenon | undefined): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !phenomenonB)\r\n return;\r\n\r\n if (phenomenonA.definition !== phenomenonB.definition)\r\n await this._reporter.reportPhenomenonDelta(phenomenonA, \"definition\", phenomenonA.definition, phenomenonB.definition, this._compareDirection);\r\n }\r\n\r\n /**\r\n * Compares two Constant objects to identify differences between property values.\r\n * @param constantA\r\n * @param constantB\r\n */\r\n public async compareConstants(constantA: Constant, constantB: Constant | undefined): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward || !constantB)\r\n return;\r\n\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (constantA.phenomenon || constantB.phenomenon) {\r\n const fullNameA = constantA.phenomenon?.fullName;\r\n const fullNameB = constantB.phenomenon?.fullName;\r\n if (fullNameA !== fullNameB) {\r\n const eqByName = this.areItemsSameByName(constantA.phenomenon, constantB.phenomenon, constantA.schema.name, constantB.schema.name);\r\n if (!eqByName)\r\n promises.push(this._reporter.reportConstantDelta(constantA, \"phenomenon\", fullNameA, fullNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (constantA.definition !== constantB.definition)\r\n promises.push(this._reporter.reportConstantDelta(constantA, \"definition\", constantA.definition, constantB.definition, this._compareDirection));\r\n\r\n if (constantA.numerator !== constantB.numerator)\r\n promises.push(this._reporter.reportConstantDelta(constantA, \"numerator\", constantA.numerator, constantB.numerator, this._compareDirection));\r\n\r\n if (constantA.denominator !== constantB.denominator)\r\n promises.push(this._reporter.reportConstantDelta(constantA, \"denominator\", constantA.denominator, constantB.denominator, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n private async comparePropertyType(propertyA: AnyProperty, propertyB: AnyProperty): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n const propertyTypeA = propertyTypeToString(propertyA.propertyType);\r\n const propertyTypeB = propertyTypeToString(propertyB.propertyType);\r\n if (propertyTypeA !== propertyTypeB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"type\", propertyTypeA, propertyTypeB, this._compareDirection));\r\n }\r\n\r\n if (propertyA.isArray()) {\r\n const minOccursB = propertyB.isArray() ? propertyB.minOccurs : undefined;\r\n if (propertyA.minOccurs !== minOccursB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"minOccurs\", propertyA.minOccurs, minOccursB, this._compareDirection));\r\n }\r\n\r\n const maxOccursB = propertyB.isArray() ? propertyB.maxOccurs : undefined;\r\n if (propertyA.maxOccurs !== maxOccursB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"maxOccurs\", propertyA.maxOccurs, maxOccursB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (propertyA.isEnumeration()) {\r\n const enumerationB = propertyB.isEnumeration() ? propertyB.enumeration : undefined;\r\n if (propertyA.enumeration || enumerationB) {\r\n const enumA = propertyA.enumeration?.fullName;\r\n const enumB = enumerationB?.fullName;\r\n if (enumA !== enumB) {\r\n const areSameByName = this.areItemsSameByName(propertyA.enumeration, enumerationB, propertyA.schema.name, propertyB.schema.name);\r\n if (!areSameByName) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"enumeration\", enumA, enumB, this._compareDirection));\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (propertyA.isNavigation()) {\r\n const strengthDirectionB = propertyB.isNavigation() ? propertyB.direction : undefined;\r\n if (propertyA.direction !== strengthDirectionB) {\r\n const dirA = strengthDirectionToString(propertyA.direction);\r\n const dirB = strengthDirectionB !== undefined ? strengthDirectionToString(strengthDirectionB) : undefined;\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"direction\", dirA, dirB, this._compareDirection));\r\n }\r\n\r\n if (propertyA.relationshipClass) { // eslint-disable-line @typescript-eslint/no-misused-promises\r\n const relationshipClassB = propertyB.isNavigation() ? propertyB.relationshipClass : undefined;\r\n const relA = propertyA.relationshipClass.fullName;\r\n const relB = relationshipClassB ? relationshipClassB.fullName : undefined;\r\n if (relA !== relB){\r\n const areSameByName = this.areItemsSameByName(propertyA.relationshipClass, relationshipClassB, propertyA.schema.name, propertyB.schema.name);\r\n if(!areSameByName)\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"relationshipClass\", relA, relB, this._compareDirection));\r\n }\r\n }\r\n }\r\n\r\n if (propertyA.isPrimitive()) {\r\n const primitiveTypeB = propertyB.isPrimitive() ? propertyB.primitiveType : undefined;\r\n if (propertyA.primitiveType !== primitiveTypeB) {\r\n const aType = primitiveTypeToString(propertyA.primitiveType);\r\n const bType = primitiveTypeB !== undefined ? primitiveTypeToString(primitiveTypeB) : undefined;\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"primitiveType\", aType, bType, this._compareDirection));\r\n }\r\n\r\n const minLengthB = propertyB.isPrimitive() ? propertyB.minLength : undefined;\r\n if (propertyA.minLength !== minLengthB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"minLength\", propertyA.minLength, minLengthB, this._compareDirection));\r\n }\r\n\r\n // valid for primitive and enumeration properties\r\n const maxLengthB = propertyB.isPrimitive() ? propertyB.maxLength : undefined;\r\n if (propertyA.maxLength !== maxLengthB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"maxLength\", propertyA.maxLength, maxLengthB, this._compareDirection));\r\n }\r\n\r\n const minValueB = propertyB.isPrimitive() ? propertyB.minValue : undefined;\r\n if (propertyA.minValue !== minValueB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"minValue\", propertyA.minValue, minValueB, this._compareDirection));\r\n }\r\n\r\n const maxValueB = propertyB.isPrimitive() ? propertyB.maxValue : undefined;\r\n if (propertyA.maxValue !== maxValueB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"maxValue\", propertyA.maxValue, maxValueB, this._compareDirection));\r\n }\r\n\r\n const extendedTypeNameB = propertyB.isPrimitive() ? propertyB.extendedTypeName : undefined;\r\n if (propertyA.extendedTypeName !== extendedTypeNameB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"extendedTypeName\", propertyA.extendedTypeName, extendedTypeNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (propertyA.isStruct()) {\r\n const structA = propertyA.structClass;\r\n const structB = propertyB.isStruct() ? propertyB.structClass : undefined;\r\n if (structA || structB) {\r\n const structNameA = structA.fullName;\r\n const structNameB = structB?.fullName;\r\n if (structNameA !== structNameB) {\r\n const areSameByName = this.areItemsSameByName(structA.key, structB?.key, propertyA.schema.name, propertyB.schema.name);\r\n if (!areSameByName) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"structClass\", structNameA, structNameB, this._compareDirection));\r\n }\r\n }\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n private async compareEnumerators(enumeratorA: AnyEnumerator, enumeratorB: AnyEnumerator, enumA: Enumeration, enumB: Enumeration): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (enumeratorA.description !== enumeratorB.description)\r\n promises.push(this._reporter.reportEnumeratorDelta(enumA, enumeratorA, \"description\", enumeratorA.description, enumeratorB.description, this._compareDirection));\r\n\r\n if (!labelsMatch(enumeratorA.label, enumeratorB.label))\r\n promises.push(this._reporter.reportEnumeratorDelta(enumA, enumeratorA, \"label\", enumeratorA.label, enumeratorB.label, this._compareDirection));\r\n\r\n // No need to compare values if the type is different (which will be reported separately)\r\n if (enumA.type === enumB.type && enumeratorA.value !== enumeratorB.value)\r\n promises.push(this._reporter.reportEnumeratorDelta(enumA, enumeratorA, \"value\", enumeratorA.value, enumeratorB.value, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n private async compareFormatUnits(formatA: Format, formatB: Format | undefined): Promise<void> {\r\n if (!formatA.units || !formatB)\r\n return;\r\n\r\n const promises: Array<Promise<void>> = [];\r\n\r\n for (const unitA of formatA.units) {\r\n const unitB = formatB.units ? formatB.units.find((u) => this.areItemsSameByName(unitA[0], u[0], formatA.schema.name, formatB.schema.name)) : undefined;\r\n if (!unitB) {\r\n promises.push(this._reporter.reportFormatUnitMissing(formatA, unitA[0], this._compareDirection));\r\n continue;\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n continue;\r\n\r\n if (unitA[1] !== unitB[1]) {\r\n const labelA = unitA[1];\r\n const labelB = unitB[1];\r\n promises.push(this._reporter.reportUnitLabelOverrideDelta(formatA, unitB[0], labelA, labelB, this._compareDirection));\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n private areOverrideFormatsSameByName(\r\n itemKeyA: Format | OverrideFormat,\r\n itemKeyB: Format | OverrideFormat,\r\n topLevelSchemaNameA: string,\r\n topLevelSchemaNameB: string | undefined ): boolean {\r\n\r\n if (itemKeyA.units) {\r\n for (const unitA of itemKeyA.units) {\r\n if (!itemKeyB.units\r\n || -1 === itemKeyB.units.findIndex((unitB) => this.areItemsSameByName(unitA[0], unitB[0], topLevelSchemaNameA, topLevelSchemaNameB)\r\n && unitA[1] === unitB[1]))\r\n return false;\r\n }\r\n }\r\n\r\n const itemA = OverrideFormat.isOverrideFormat(itemKeyA) ? itemKeyA.parent : itemKeyA;\r\n const itemB = OverrideFormat.isOverrideFormat(itemKeyB) ? itemKeyB.parent : itemKeyB;\r\n\r\n return itemKeyA.precision === itemKeyB.precision && this.areItemsSameByName(itemA, itemB, topLevelSchemaNameA, topLevelSchemaNameB);\r\n }\r\n\r\n /**\r\n * Compares two item keys.\r\n * @param itemKeyA item key A to compare to.\r\n * @param itemKeyB item key B to compare to.\r\n * @param topLevelSchemaNameA top level schema name in which the item A exists.\r\n * @param topLevelSchemaNameB top level schema name in which the item B exists.\r\n * @returns true if both names are the same and they come from their respective top level schema.\r\n */\r\n private areItemsSameByName(\r\n itemKeyA: Readonly<SchemaItemKey> | SchemaItem | undefined,\r\n itemKeyB: Readonly<SchemaItemKey> | SchemaItem | undefined,\r\n topLevelSchemaNameA: string,\r\n topLevelSchemaNameB: string | undefined ): boolean {\r\n\r\n const nameA = itemKeyA ? itemKeyA.name.toUpperCase() : undefined;\r\n const nameB = itemKeyB ? itemKeyB.name.toUpperCase() : undefined;\r\n\r\n const schemaNameA = itemKeyA\r\n ? SchemaItem.isSchemaItem(itemKeyA)\r\n ? itemKeyA.schema.name\r\n : itemKeyA.schemaName\r\n : undefined;\r\n\r\n const schemaNameB = itemKeyB\r\n ? SchemaItem.isSchemaItem(itemKeyB)\r\n ? itemKeyB.schema.name\r\n : itemKeyB.schemaName\r\n : undefined;\r\n\r\n return (nameA === nameB && schemaNameA === topLevelSchemaNameA && schemaNameB === topLevelSchemaNameB) || (nameA === nameB && schemaNameA === schemaNameB);\r\n }\r\n\r\n /**\r\n * Looks for same classA in containerB using key.\r\n * @param classNameA name of the class to look for in containerB.\r\n * @param containerA container which classNameA belongs to.\r\n * @param containerB container in which to look for classNameA.\r\n * @returns true if a same classA is in containerB, otherwise false.\r\n */\r\n private containerHasClass(attributeA: CustomAttribute, containerA: CustomAttributeContainerProps, containerB: CustomAttributeContainerProps): boolean {\r\n if (containerB && containerB.customAttributes) {\r\n for (const [_className, attributeB] of containerB.customAttributes) {\r\n const classItemKeyA = containerA.schema.getSchemaItemKey(attributeA.className);\r\n const classItemKeyB = containerB.schema.getSchemaItemKey(attributeB.className);\r\n\r\n if (this.areItemsSameByName(classItemKeyA, classItemKeyB, containerA.schema.name, containerB.schema.name)) {\r\n return Object.keys(attributeA).every((propertyName) => {\r\n const valueA = attributeA[propertyName];\r\n const valueB = attributeB[propertyName];\r\n\r\n // If propertyName is class name, they don't need to be compared as this has been done\r\n // in the areItemsSameByName function.\r\n if(propertyName === \"className\")\r\n return true;\r\n\r\n return deepEquals(valueA, valueB);\r\n });\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Compares two values on their deep equality.\r\n * @param a left side to compare\r\n * @param b right side to compare\r\n * @returns true if they are deeply equal, otherwise false.\r\n */\r\nfunction deepEquals(a: unknown, b: unknown): boolean {\r\n if(Array.isArray(a) && Array.isArray(b)) {\r\n return a.length === b.length && a.every((value, index) => {\r\n return deepEquals(value, b[index]);\r\n });\r\n }\r\n if(isObject(a) && isObject(b)) {\r\n const propertiesA = Object.keys(a);\r\n const propertiesB = Object.keys(b);\r\n return propertiesA.length === propertiesB.length && propertiesA.every((propertyName) => {\r\n return deepEquals(a[propertyName], b[propertyName]);\r\n });\r\n }\r\n return a === b;\r\n}\r\n\r\nfunction isObject(value: unknown): value is { [property: string]: unknown } {\r\n return typeof value === \"object\";\r\n}\r\n"]}
1
+ {"version":3,"file":"SchemaComparer.js","sourceRoot":"","sources":["../../../src/Validation/SchemaComparer.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,gEAKkC;AAClC,wDAA+H;AAE/H,+EAA4E;AAC5E,iEAA8D;AAC9D,iDAA8C;AAE9C;;;;GAIG;AACH,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,yEAAW,CAAA;IACX,2EAAY,CAAA;AACd,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC;AA2BD,SAAS,WAAW,CAAC,MAAe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AO,CAAC,CAAC,CAAC,EAAE,CAAC;QACxC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;YACvD,OAAO,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;IACL,CAAC;IACD,IAAG,QAAQ,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9B,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnC,OAAO,WAAW,CAAC,MAAM,KAAK,WAAW,CAAC,MAAM,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC,YAAY,EAAE,EAAE;YACrF,OAAO,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Comparison\r\n */\r\n\r\nimport {\r\n AnyClass, AnyEnumerator, AnyProperty, classModifierToString, Constant, containerTypeToString, CustomAttribute, CustomAttributeClass,\r\n CustomAttributeContainerProps, EntityClass, Enumeration, Format, InvertedUnit, KindOfQuantity, Mixin, OverrideFormat, Phenomenon,\r\n primitiveTypeToString, PropertyCategory, propertyTypeToString, RelationshipClass, RelationshipConstraint, Schema,\r\n SchemaItem, SchemaItemKey, strengthDirectionToString, strengthToString, Unit,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport { formatTraitsToArray, formatTypeToString, scientificTypeToString, showSignOptionToString } from \"@itwin/core-quantity\";\r\nimport { ISchemaCompareReporter } from \"./SchemaCompareReporter\";\r\nimport { SchemaCompareResultDelegate } from \"./SchemaCompareResultDelegate\";\r\nimport { SchemaCompareVisitor } from \"./SchemaCompareVisitor\";\r\nimport { SchemaWalker } from \"./SchemaWalker\";\r\n\r\n/**\r\n * Enum that identifies if Schema A is being iterated (Forward) or\r\n * Schema B is being iterated (Backward);\r\n * @alpha\r\n */\r\nexport enum SchemaCompareDirection {\r\n Forward = 0,\r\n Backward = 1,\r\n}\r\n/**\r\n * Interface for comparing EC Schemas.\r\n * @alpha\r\n */\r\nexport interface ISchemaComparer {\r\n compareSchemas(schemaA: Schema, schemaB: Schema): void;\r\n compareSchemaProps(schemaA: Schema, schemaB: Schema): void;\r\n compareSchemaItems(schemaItemA: SchemaItem, schemaItemB: SchemaItem | undefined): void;\r\n compareClasses(classA: AnyClass, classB: AnyClass): void;\r\n compareProperties(propertyA: AnyProperty, propertyB: AnyProperty | undefined): void;\r\n compareEntityClasses(entityA: EntityClass, entityB: EntityClass): void;\r\n compareMixins(mixinA: Mixin, mixinB: Mixin): void;\r\n compareRelationshipClasses(relationshipClassA: RelationshipClass, relationshipClassB: RelationshipClass): void;\r\n compareRelationshipConstraints(relationshipConstraintA: RelationshipConstraint, relationshipConstraintB: RelationshipConstraint): void;\r\n compareCustomAttributeClasses(customAttributeClassA: CustomAttributeClass, customAttributeClassB: CustomAttributeClass): void;\r\n compareCustomAttributeContainers(containerA: CustomAttributeContainerProps, containerB: CustomAttributeContainerProps): void;\r\n compareEnumerations(enumA: Enumeration, enumB: Enumeration): void;\r\n compareKindOfQuantities(koqA: KindOfQuantity, koqB: KindOfQuantity): void;\r\n comparePropertyCategories(categoryA: PropertyCategory, categoryB: PropertyCategory): void;\r\n compareFormats(formatA: Format, formatB: Format): void;\r\n compareUnits(unitA: Unit, unitB: Unit): void;\r\n compareInvertedUnits(invertedUnitA: InvertedUnit, invertedUnitB: InvertedUnit): void;\r\n comparePhenomenons(phenomenonA: Phenomenon, phenomenonB: Phenomenon): void;\r\n compareConstants(constantA: Constant, constantB: Constant): void;\r\n}\r\n\r\nfunction labelsMatch(label1?: string, label2?: string) {\r\n label1 = label1 === undefined ? \"\" : label1;\r\n label2 = label2 === undefined ? \"\" : label2;\r\n return label1 === label2;\r\n}\r\n\r\n/**\r\n * Compares EC Schemas and reports differences using the [[IDiagnosticReporter]] objects\r\n * specified.\r\n * @alpha\r\n */\r\nexport class SchemaComparer {\r\n private _compareDirection: SchemaCompareDirection;\r\n private _reporter!: SchemaCompareResultDelegate;\r\n private _reporters: ISchemaCompareReporter[];\r\n\r\n /**\r\n * Initializes a new SchemaComparer instance.\r\n * @param reporters The [[IDiagnosticReporter]] object(s) to use to report the results.\r\n */\r\n constructor(...reporters: ISchemaCompareReporter[]) {\r\n this._compareDirection = SchemaCompareDirection.Forward;\r\n this._reporters = reporters;\r\n }\r\n\r\n /**\r\n * Compares two schemas to identify differences.\r\n * @param schemaA The first Schema.\r\n * @param schemaB The second Schema.\r\n */\r\n public async compareSchemas(schemaA: Schema, schemaB: Schema) {\r\n this._reporter = new SchemaCompareResultDelegate(schemaA, schemaB, ...this._reporters);\r\n let visitor = new SchemaCompareVisitor(this, schemaB);\r\n let walker = new SchemaWalker(visitor);\r\n await walker.traverseSchema(schemaA);\r\n\r\n this._compareDirection = SchemaCompareDirection.Backward;\r\n\r\n visitor = new SchemaCompareVisitor(this, schemaA);\r\n walker = new SchemaWalker(visitor);\r\n await walker.traverseSchema(schemaB);\r\n\r\n this._compareDirection = SchemaCompareDirection.Forward;\r\n this._reporter.compareComplete();\r\n }\r\n\r\n /**\r\n * Compares two schemas to identify differences between property values.\r\n * @param schemaA The first Schema.\r\n * @param schemaB The second Schema.\r\n */\r\n public async compareSchemaProps(schemaA: Schema, schemaB: Schema): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n for (const ref of schemaA.references) {\r\n const refB = await schemaB.getReference(ref.fullName);\r\n if (!refB)\r\n promises.push(this._reporter.reportSchemaReferenceMissing(schemaA, ref, this._compareDirection));\r\n else if (!refB.schemaKey.matches(ref.schemaKey))\r\n promises.push(this._reporter.reportSchemaReferenceDelta(schemaA, ref, ref.schemaKey.version.toString(), refB.schemaKey.version.toString(), this._compareDirection));\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n if (schemaA.schemaKey.toString() !== schemaB.schemaKey.toString())\r\n promises.push(this._reporter.reportSchemaDelta(schemaA, \"schemaKey\", schemaA.schemaKey.toString(), schemaB.schemaKey.toString(), this._compareDirection));\r\n\r\n if (schemaA.alias !== schemaB.alias)\r\n promises.push(this._reporter.reportSchemaDelta(schemaA, \"alias\", schemaA.alias, schemaB.alias, this._compareDirection));\r\n\r\n if (schemaA.description !== schemaB.description)\r\n promises.push(this._reporter.reportSchemaDelta(schemaA, \"description\", schemaA.description, schemaB.description, this._compareDirection));\r\n\r\n if (schemaA.label !== schemaB.label)\r\n promises.push(this._reporter.reportSchemaDelta(schemaA, \"label\", schemaA.label, schemaB.label, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two SchemaItems to identify differences between property values.\r\n * @param schemaItemA The first SchemaItem.\r\n * @param schemaItemB The second SchemaItem.\r\n */\r\n public async compareSchemaItems(schemaItemA: SchemaItem, schemaItemB: SchemaItem | undefined): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n if (!schemaItemB) {\r\n promises.push(this._reporter.reportSchemaItemMissing(schemaItemA, this._compareDirection));\r\n await Promise.all(promises);\r\n return;\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n if (schemaItemA.schemaItemType !== schemaItemB.schemaItemType) {\r\n const aType = schemaItemA.schemaItemType;\r\n const bType = schemaItemB.schemaItemType;\r\n promises.push(this._reporter.reportSchemaItemDelta(schemaItemA, \"schemaItemType\", aType, bType, this._compareDirection));\r\n await Promise.all(promises);\r\n return;\r\n }\r\n\r\n if (schemaItemA.description !== schemaItemB.description)\r\n promises.push(this._reporter.reportSchemaItemDelta(schemaItemA, \"description\", schemaItemA.description, schemaItemB.description, this._compareDirection));\r\n\r\n if (!labelsMatch(schemaItemA.label, schemaItemB.label))\r\n promises.push(this._reporter.reportSchemaItemDelta(schemaItemA, \"label\", schemaItemA.label, schemaItemB.label, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two ECClasses to identify differences between property values.\r\n * @param classA The first ECClass.\r\n * @param classB The second ECClass.\r\n */\r\n public async compareClasses(classA: AnyClass, classB: AnyClass): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (classA.modifier !== classB.modifier) {\r\n const aMod = classModifierToString(classA.modifier);\r\n const bMod = classModifierToString(classB.modifier);\r\n promises.push(this._reporter.reportClassDelta(classA, \"modifier\", aMod, bMod, this._compareDirection));\r\n }\r\n\r\n if (classA.baseClass || classB.baseClass) {\r\n const fullNameA = classA.baseClass?.fullName;\r\n const fullNameB = classB.baseClass?.fullName;\r\n\r\n if (fullNameA !== fullNameB) {\r\n const areSameByName = this.areItemsSameByName(classA.baseClass, classB.baseClass, classA.schema.name, classB.schema.name);\r\n if (!areSameByName) {\r\n const baseA = await classA.baseClass as AnyClass;\r\n const baseB = await classB.baseClass as AnyClass;\r\n promises.push(this._reporter.reportBaseClassDelta(classA, baseA, baseB, this._compareDirection));\r\n }\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two ECProperties to identify differences between property values.\r\n * @param propertyA The first ECProperty.\r\n * @param propertyB The second ECProperty.\r\n */\r\n public async compareProperties(propertyA: AnyProperty, propertyB: AnyProperty | undefined): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (!propertyB) {\r\n promises.push(this._reporter.reportPropertyMissing(propertyA, this._compareDirection));\r\n await Promise.all(promises);\r\n return;\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n const propertyTypeA = propertyTypeToString(propertyA.propertyType);\r\n const propertyTypeB = propertyTypeToString(propertyB.propertyType);\r\n if (propertyTypeA !== propertyTypeB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"type\", propertyTypeA, propertyTypeB, this._compareDirection));\r\n await Promise.all(promises);\r\n return;\r\n }\r\n\r\n if (!labelsMatch(propertyA.label, propertyB.label))\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"label\", propertyA.label, propertyB.label, this._compareDirection));\r\n\r\n if (propertyA.description !== propertyB.description)\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"description\", propertyA.description, propertyB.description, this._compareDirection));\r\n\r\n if (propertyA.isReadOnly !== propertyB.isReadOnly)\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"isReadOnly\", propertyA.isReadOnly, propertyB.isReadOnly, this._compareDirection));\r\n\r\n if (propertyA.priority !== propertyB.priority)\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"priority\", propertyA.priority, propertyB.priority, this._compareDirection));\r\n\r\n if (propertyA.category || propertyB.category) {\r\n const catKeyA = propertyA.category?.fullName;\r\n const catKeyB = propertyB.category?.fullName;\r\n if (catKeyA !== catKeyB) {\r\n const areSameByName = this.areItemsSameByName(propertyA.category, propertyB.category, propertyA.schema.name, propertyB.schema.name);\r\n if (!areSameByName)\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"category\", catKeyA, catKeyB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (propertyA.kindOfQuantity || propertyB.kindOfQuantity) {\r\n const koqKeyA = propertyA.kindOfQuantity?.fullName;\r\n const koqKeyB = propertyB.kindOfQuantity?.fullName;\r\n if (koqKeyA !== koqKeyB) {\r\n const areSameByName = this.areItemsSameByName(propertyA.kindOfQuantity, propertyB.kindOfQuantity, propertyA.schema.name, propertyB.schema.name);\r\n if (!areSameByName)\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"kindOfQuantity\", koqKeyA, koqKeyB, this._compareDirection));\r\n }\r\n }\r\n\r\n promises.push(this.comparePropertyType(propertyA, propertyB));\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two EntityClass objects to identify differences between property values.\r\n * @param entityA\r\n * @param entityB\r\n */\r\n public async compareEntityClasses(entityA: EntityClass, entityB: EntityClass): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n for (const mixinA of entityA.mixins) {\r\n if (-1 === entityB.mixins.findIndex((mixinB) => this.areItemsSameByName(mixinA, mixinB, entityA.schema.name, entityB.schema.name)))\r\n promises.push(this._reporter.reportEntityMixinMissing(entityA, await mixinA, this._compareDirection));\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two Mixin objects to identify differences between property values.\r\n * @param mixinA\r\n * @param mixinB\r\n */\r\n public async compareMixins(mixinA: Mixin, mixinB: Mixin): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n if (mixinA.appliesTo || mixinB.appliesTo) {\r\n const appliesToA = mixinA.appliesTo?.fullName;\r\n const appliesToB = mixinB.appliesTo?.fullName;\r\n if (appliesToA !== appliesToB) {\r\n const areSameByName = this.areItemsSameByName(mixinA.appliesTo, mixinB.appliesTo, mixinA.schema.name, mixinB.schema.name);\r\n if (!areSameByName)\r\n await this._reporter.reportMixinDelta(mixinA, \"appliesTo\", appliesToA, appliesToB, this._compareDirection);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Compares two RelationshipClass objects to identify differences between property values.\r\n * @param relationshipA\r\n * @param relationshipB\r\n */\r\n public async compareRelationshipClasses(relationshipA: RelationshipClass, relationshipB: RelationshipClass): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (relationshipA.strength !== relationshipB.strength) {\r\n const strengthAString = strengthToString(relationshipA.strength);\r\n const strengthBString = strengthToString(relationshipB.strength);\r\n promises.push(this._reporter.reportRelationshipClassDelta(relationshipA, \"strength\", strengthAString, strengthBString, this._compareDirection));\r\n }\r\n\r\n if (relationshipA.strengthDirection !== relationshipB.strengthDirection) {\r\n const directionAString = strengthDirectionToString(relationshipA.strengthDirection);\r\n const directionBString = strengthDirectionToString(relationshipB.strengthDirection);\r\n promises.push(this._reporter.reportRelationshipClassDelta(relationshipA, \"strengthDirection\", directionAString, directionBString, this._compareDirection));\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two RelationshipConstraint objects to identify differences between property values.\r\n * @param relationshipConstraintA\r\n * @param relationshipConstraintB\r\n */\r\n public async compareRelationshipConstraints(constraintA: RelationshipConstraint, constraintB: RelationshipConstraint): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (constraintA.constraintClasses) {\r\n for (const classA of constraintA.constraintClasses) {\r\n if (!constraintB.constraintClasses || -1 === constraintB.constraintClasses.findIndex((classB) =>\r\n this.areItemsSameByName(classA, classB, constraintA.schema.name, constraintB.schema.name)))\r\n promises.push(this._reporter.reportRelationshipConstraintClassMissing(constraintA, await classA, this._compareDirection));\r\n }\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward) {\r\n await Promise.all(promises);\r\n return;\r\n }\r\n\r\n if (constraintA.multiplicity || constraintB.multiplicity) {\r\n const multiplicityA = constraintA.multiplicity.toString();\r\n const multiplicityB = constraintB.multiplicity.toString();\r\n if (multiplicityA !== multiplicityB)\r\n promises.push(this._reporter.reportRelationshipConstraintDelta(constraintA, \"multiplicity\", multiplicityA, multiplicityB, this._compareDirection));\r\n }\r\n\r\n if (constraintA.roleLabel !== constraintB.roleLabel)\r\n promises.push(this._reporter.reportRelationshipConstraintDelta(constraintA, \"roleLabel\", constraintA.roleLabel, constraintB.roleLabel, this._compareDirection));\r\n\r\n if (constraintA.polymorphic !== constraintB.polymorphic)\r\n promises.push(this._reporter.reportRelationshipConstraintDelta(constraintA, \"polymorphic\", constraintA.polymorphic, constraintB.polymorphic, this._compareDirection));\r\n\r\n if (constraintA.abstractConstraint || constraintB.abstractConstraint) {\r\n const abstractA = constraintA.abstractConstraint?.fullName;\r\n const abstractB = constraintB.abstractConstraint?.fullName;\r\n if (abstractA !== abstractB) {\r\n const areSameByName = this.areItemsSameByName(constraintA.abstractConstraint, constraintB.abstractConstraint, constraintA.schema.name, constraintB.schema.name);\r\n if (!areSameByName) {\r\n promises.push(this._reporter.reportRelationshipConstraintDelta(constraintA, \"abstractConstraint\", abstractA, abstractB, this._compareDirection));\r\n }\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two CustomAttributeClass objects to identify differences between property values.\r\n * @param customAttributeClassA\r\n * @param customAttributeClassB\r\n */\r\n public async compareCustomAttributeClasses(customAttributeClassA: CustomAttributeClass, customAttributeClassB: CustomAttributeClass): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n if (customAttributeClassA.appliesTo !== customAttributeClassB.appliesTo) {\r\n const typeA = containerTypeToString(customAttributeClassA.appliesTo);\r\n const typeB = containerTypeToString(customAttributeClassB.appliesTo);\r\n await this._reporter.reportCustomAttributeClassDelta(customAttributeClassA, \"appliesTo\", typeA, typeB, this._compareDirection);\r\n }\r\n }\r\n\r\n /**\r\n * Compares two CustomAttributeContainerProps objects to identify differences between property values.\r\n * @param containerA\r\n * @param containerB\r\n */\r\n public async compareCustomAttributeContainers(containerA: CustomAttributeContainerProps, containerB: CustomAttributeContainerProps): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (containerA.customAttributes) {\r\n for (const ca of containerA.customAttributes) {\r\n if (!containerB.customAttributes || !this.containerHasClass(ca[1], containerA, containerB))\r\n promises.push(this._reporter.reportCustomAttributeInstanceClassMissing(containerA, ca[1], this._compareDirection));\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two Enumeration objects to identify differences between property values.\r\n * @param enumA\r\n * @param enumB\r\n */\r\n public async compareEnumerations(enumA: Enumeration, enumB: Enumeration): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n for (const enumeratorA of enumA.enumerators) {\r\n const enumeratorB = enumB.enumerators.find((e) => e.name === enumeratorA.name);\r\n if (!enumeratorB) {\r\n promises.push(this._reporter.reportEnumeratorMissing(enumA, enumeratorA, this._compareDirection));\r\n } else if (this._compareDirection === SchemaCompareDirection.Forward) {\r\n promises.push(this.compareEnumerators(enumeratorA, enumeratorB, enumA, enumB));\r\n }\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward) {\r\n await Promise.all(promises);\r\n return;\r\n }\r\n if (enumA.type !== enumB.type) {\r\n const typeAString = enumA.type ? primitiveTypeToString(enumA.type) : undefined;\r\n const typeBString = enumB.type ? primitiveTypeToString(enumB.type) : undefined;\r\n promises.push(this._reporter.reportEnumerationDelta(enumA, \"type\", typeAString, typeBString, this._compareDirection));\r\n }\r\n\r\n if (enumA.isStrict !== enumB.isStrict)\r\n promises.push(this._reporter.reportEnumerationDelta(enumA, \"isStrict\", enumA.isStrict, enumB.isStrict, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two KindOfQuantity objects to identify differences between property values.\r\n * @param koqA\r\n * @param koqB\r\n */\r\n public async compareKindOfQuantities(koqA: KindOfQuantity, koqB: KindOfQuantity): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (koqA.presentationFormats) {\r\n for (const unitA of koqA.presentationFormats) {\r\n if (-1 === koqB.presentationFormats.findIndex((unitB) => this.areOverrideFormatsSameByName(unitA, unitB, koqA.schema.name, koqB.schema.name)))\r\n promises.push(this._reporter.reportPresentationUnitMissing(koqA, unitA, this._compareDirection));\r\n }\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward) {\r\n await Promise.all(promises);\r\n return;\r\n }\r\n\r\n if (koqA.relativeError !== koqB.relativeError) {\r\n promises.push(this._reporter.reportKoqDelta(koqA, \"relativeError\", koqA.relativeError, koqB.relativeError, this._compareDirection));\r\n }\r\n\r\n if (koqA.persistenceUnit || koqB.persistenceUnit) {\r\n const unitNameA = koqA.persistenceUnit?.fullName;\r\n const unitNameB = koqB.persistenceUnit?.fullName;\r\n if (unitNameA !== unitNameB) {\r\n const eqByName = this.areItemsSameByName(koqA.persistenceUnit, koqB.persistenceUnit, koqA.schema.name, koqB.schema.name);\r\n if (!eqByName)\r\n promises.push(this._reporter.reportKoqDelta(koqA, \"persistenceUnit\", unitNameA, unitNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two PropertyCategory objects to identify differences between property values.\r\n * @param categoryA\r\n * @param categoryB\r\n */\r\n public async comparePropertyCategories(categoryA: PropertyCategory, categoryB: PropertyCategory): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n if (categoryA.priority !== categoryB.priority)\r\n await this._reporter.reportPropertyCategoryDelta(categoryA, \"priority\", categoryA.priority, categoryB.priority, this._compareDirection);\r\n }\r\n\r\n /**\r\n * Compares two Format objects to identify differences between property values.\r\n * @param formatA\r\n * @param formatB\r\n */\r\n public async compareFormats(formatA: Format, formatB: Format): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n promises.push(this.compareFormatUnits(formatA, formatB));\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward) {\r\n await Promise.all(promises);\r\n return;\r\n }\r\n\r\n if (formatA.roundFactor !== formatB.roundFactor)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"roundFactor\", formatA.roundFactor, formatB.roundFactor, this._compareDirection));\r\n\r\n if (formatA.type !== formatB.type) {\r\n const typeAString = formatTypeToString(formatA.type);\r\n const typeBString = formatTypeToString(formatB.type);\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"type\", typeAString, typeBString, this._compareDirection));\r\n }\r\n\r\n if (formatA.precision !== formatB.precision)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"precision\", formatA.precision, formatB.precision, this._compareDirection));\r\n\r\n if (formatA.minWidth !== formatB.minWidth)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"minWidth\", formatA.minWidth, formatB.minWidth, this._compareDirection));\r\n\r\n if (formatA.scientificType !== formatB.scientificType) {\r\n const typeAString = formatA.scientificType !== undefined ? scientificTypeToString(formatA.scientificType) : undefined;\r\n const typeBString = formatB.scientificType !== undefined ? scientificTypeToString(formatB.scientificType) : undefined;\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"scientificType\", typeAString, typeBString, this._compareDirection));\r\n }\r\n\r\n if (formatA.showSignOption !== formatB.showSignOption) {\r\n const optionA = showSignOptionToString(formatA.showSignOption);\r\n const optionB = showSignOptionToString(formatB.showSignOption);\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"showSignOption\", optionA, optionB, this._compareDirection));\r\n }\r\n\r\n if (formatA.decimalSeparator !== formatB.decimalSeparator)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"decimalSeparator\", formatA.decimalSeparator, formatB.decimalSeparator, this._compareDirection));\r\n\r\n if (formatA.thousandSeparator !== formatB.thousandSeparator)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"thousandSeparator\", formatA.thousandSeparator, formatB.thousandSeparator, this._compareDirection));\r\n\r\n if (formatA.uomSeparator !== formatB.uomSeparator)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"uomSeparator\", formatA.uomSeparator, formatB.uomSeparator, this._compareDirection));\r\n\r\n if (formatA.stationSeparator !== formatB.stationSeparator)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"stationSeparator\", formatA.stationSeparator, formatB.stationSeparator, this._compareDirection));\r\n\r\n if (formatA.stationOffsetSize !== formatB.stationOffsetSize)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"stationOffsetSize\", formatA.stationOffsetSize, formatB.stationOffsetSize, this._compareDirection));\r\n\r\n if (formatA.formatTraits !== formatB.formatTraits) {\r\n const traitsA = formatTraitsToArray(formatA.formatTraits);\r\n const traitsB = formatTraitsToArray(formatB.formatTraits);\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"formatTraits\", traitsA.toString(), traitsB.toString(), this._compareDirection));\r\n }\r\n\r\n if (formatA.spacer !== formatB.spacer)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"spacer\", formatA.spacer, formatB.spacer, this._compareDirection));\r\n\r\n if (formatA.includeZero !== formatB.includeZero)\r\n promises.push(this._reporter.reportFormatDelta(formatA, \"includeZero\", formatA.includeZero, formatB.includeZero, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two Unit objects to identify differences between property values.\r\n * @param unitA\r\n * @param unitB\r\n */\r\n public async compareUnits(unitA: Unit, unitB: Unit): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (unitA.phenomenon || unitB.phenomenon) {\r\n const fullNameA = unitA.phenomenon?.fullName;\r\n const fullNameB = unitB.phenomenon?.fullName;\r\n if (fullNameA !== fullNameB) {\r\n const eqByName = this.areItemsSameByName(unitA.phenomenon, unitB.phenomenon, unitA.schema.name, unitB.schema.name);\r\n if (!eqByName)\r\n promises.push(this._reporter.reportUnitDelta(unitA, \"phenomenon\", fullNameA, fullNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (unitA.unitSystem || unitB.unitSystem) {\r\n const fullNameA = unitA.unitSystem?.fullName;\r\n const fullNameB = unitB.unitSystem?.fullName;\r\n if (fullNameA !== fullNameB) {\r\n const eqByName = this.areItemsSameByName(unitA.unitSystem, unitB.unitSystem, unitA.schema.name, unitB.schema.name);\r\n if (!eqByName)\r\n promises.push(this._reporter.reportUnitDelta(unitA, \"unitSystem\", fullNameA, fullNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (unitA.definition !== unitB.definition)\r\n promises.push(this._reporter.reportUnitDelta(unitA, \"definition\", unitA.definition, unitB.definition, this._compareDirection));\r\n\r\n if (unitA.numerator !== unitB.numerator)\r\n promises.push(this._reporter.reportUnitDelta(unitA, \"numerator\", unitA.numerator, unitB.numerator, this._compareDirection));\r\n\r\n if (unitA.denominator !== unitB.denominator)\r\n promises.push(this._reporter.reportUnitDelta(unitA, \"denominator\", unitA.denominator, unitB.denominator, this._compareDirection));\r\n\r\n if (unitA.offset !== unitB.offset)\r\n promises.push(this._reporter.reportUnitDelta(unitA, \"offset\", unitA.offset, unitB.offset, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two InvertedUnit objects to identify differences between property values.\r\n * @param invertedUnitA\r\n * @param invertedUnitB\r\n */\r\n public async compareInvertedUnits(invertedUnitA: InvertedUnit, invertedUnitB: InvertedUnit): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (invertedUnitA.invertsUnit || invertedUnitB.invertsUnit) {\r\n const fullNameA = invertedUnitA.invertsUnit?.fullName;\r\n const fullNameB = invertedUnitB.invertsUnit?.fullName;\r\n if (fullNameA !== fullNameB) {\r\n const eqByName = this.areItemsSameByName(invertedUnitA.invertsUnit, invertedUnitB.invertsUnit, invertedUnitA.schema.name, invertedUnitB.schema.name);\r\n if (!eqByName)\r\n promises.push(this._reporter.reportInvertedUnitDelta(invertedUnitA, \"invertsUnit\", fullNameA, fullNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (invertedUnitA.unitSystem || invertedUnitB.unitSystem) {\r\n const fullNameA = invertedUnitA.unitSystem?.fullName;\r\n const fullNameB = invertedUnitB.unitSystem?.fullName;\r\n if (fullNameA !== fullNameB) {\r\n const eqByName = this.areItemsSameByName(invertedUnitA.unitSystem, invertedUnitB.unitSystem, invertedUnitA.schema.name, invertedUnitB.schema.name);\r\n if (!eqByName)\r\n promises.push(this._reporter.reportInvertedUnitDelta(invertedUnitA, \"unitSystem\", fullNameA, fullNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n /**\r\n * Compares two Phenomenon objects to identify differences between property values.\r\n * @param phenomenonA\r\n * @param phenomenonB\r\n */\r\n public async comparePhenomenons(phenomenonA: Phenomenon, phenomenonB: Phenomenon): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n if (phenomenonA.definition !== phenomenonB.definition)\r\n await this._reporter.reportPhenomenonDelta(phenomenonA, \"definition\", phenomenonA.definition, phenomenonB.definition, this._compareDirection);\r\n }\r\n\r\n /**\r\n * Compares two Constant objects to identify differences between property values.\r\n * @param constantA\r\n * @param constantB\r\n */\r\n public async compareConstants(constantA: Constant, constantB: Constant): Promise<void> {\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n return;\r\n\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (constantA.phenomenon || constantB.phenomenon) {\r\n const fullNameA = constantA.phenomenon?.fullName;\r\n const fullNameB = constantB.phenomenon?.fullName;\r\n if (fullNameA !== fullNameB) {\r\n const eqByName = this.areItemsSameByName(constantA.phenomenon, constantB.phenomenon, constantA.schema.name, constantB.schema.name);\r\n if (!eqByName)\r\n promises.push(this._reporter.reportConstantDelta(constantA, \"phenomenon\", fullNameA, fullNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (constantA.definition !== constantB.definition)\r\n promises.push(this._reporter.reportConstantDelta(constantA, \"definition\", constantA.definition, constantB.definition, this._compareDirection));\r\n\r\n if (constantA.numerator !== constantB.numerator)\r\n promises.push(this._reporter.reportConstantDelta(constantA, \"numerator\", constantA.numerator, constantB.numerator, this._compareDirection));\r\n\r\n if (constantA.denominator !== constantB.denominator)\r\n promises.push(this._reporter.reportConstantDelta(constantA, \"denominator\", constantA.denominator, constantB.denominator, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n private async comparePropertyType(propertyA: AnyProperty, propertyB: AnyProperty): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (propertyA.isArray()) {\r\n const minOccursB = propertyB.isArray() ? propertyB.minOccurs : undefined;\r\n if (propertyA.minOccurs !== minOccursB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"minOccurs\", propertyA.minOccurs, minOccursB, this._compareDirection));\r\n }\r\n\r\n const maxOccursB = propertyB.isArray() ? propertyB.maxOccurs : undefined;\r\n if (propertyA.maxOccurs !== maxOccursB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"maxOccurs\", propertyA.maxOccurs, maxOccursB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (propertyA.isEnumeration()) {\r\n const enumerationB = propertyB.isEnumeration() ? propertyB.enumeration : undefined;\r\n if (propertyA.enumeration || enumerationB) {\r\n const enumA = propertyA.enumeration?.fullName;\r\n const enumB = enumerationB?.fullName;\r\n if (enumA !== enumB) {\r\n const areSameByName = this.areItemsSameByName(propertyA.enumeration, enumerationB, propertyA.schema.name, propertyB.schema.name);\r\n if (!areSameByName) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"enumeration\", enumA, enumB, this._compareDirection));\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (propertyA.isNavigation()) {\r\n const strengthDirectionB = propertyB.isNavigation() ? propertyB.direction : undefined;\r\n if (propertyA.direction !== strengthDirectionB) {\r\n const dirA = strengthDirectionToString(propertyA.direction);\r\n const dirB = strengthDirectionB !== undefined ? strengthDirectionToString(strengthDirectionB) : undefined;\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"direction\", dirA, dirB, this._compareDirection));\r\n }\r\n\r\n if (propertyA.relationshipClass) { // eslint-disable-line @typescript-eslint/no-misused-promises\r\n const relationshipClassB = propertyB.isNavigation() ? propertyB.relationshipClass : undefined;\r\n const relA = propertyA.relationshipClass.fullName;\r\n const relB = relationshipClassB ? relationshipClassB.fullName : undefined;\r\n if (relA !== relB){\r\n const areSameByName = this.areItemsSameByName(propertyA.relationshipClass, relationshipClassB, propertyA.schema.name, propertyB.schema.name);\r\n if(!areSameByName)\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"relationshipClass\", relA, relB, this._compareDirection));\r\n }\r\n }\r\n }\r\n\r\n if (propertyA.isPrimitive()) {\r\n const primitiveTypeB = propertyB.isPrimitive() ? propertyB.primitiveType : undefined;\r\n if (propertyA.primitiveType !== primitiveTypeB) {\r\n const aType = primitiveTypeToString(propertyA.primitiveType);\r\n const bType = primitiveTypeB !== undefined ? primitiveTypeToString(primitiveTypeB) : undefined;\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"primitiveType\", aType, bType, this._compareDirection));\r\n }\r\n\r\n const minLengthB = propertyB.isPrimitive() ? propertyB.minLength : undefined;\r\n if (propertyA.minLength !== minLengthB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"minLength\", propertyA.minLength, minLengthB, this._compareDirection));\r\n }\r\n\r\n // valid for primitive and enumeration properties\r\n const maxLengthB = propertyB.isPrimitive() ? propertyB.maxLength : undefined;\r\n if (propertyA.maxLength !== maxLengthB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"maxLength\", propertyA.maxLength, maxLengthB, this._compareDirection));\r\n }\r\n\r\n const minValueB = propertyB.isPrimitive() ? propertyB.minValue : undefined;\r\n if (propertyA.minValue !== minValueB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"minValue\", propertyA.minValue, minValueB, this._compareDirection));\r\n }\r\n\r\n const maxValueB = propertyB.isPrimitive() ? propertyB.maxValue : undefined;\r\n if (propertyA.maxValue !== maxValueB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"maxValue\", propertyA.maxValue, maxValueB, this._compareDirection));\r\n }\r\n\r\n const extendedTypeNameB = propertyB.isPrimitive() ? propertyB.extendedTypeName : undefined;\r\n if (propertyA.extendedTypeName !== extendedTypeNameB) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"extendedTypeName\", propertyA.extendedTypeName, extendedTypeNameB, this._compareDirection));\r\n }\r\n }\r\n\r\n if (propertyA.isStruct()) {\r\n const structA = propertyA.structClass;\r\n const structB = propertyB.isStruct() ? propertyB.structClass : undefined;\r\n if (structA || structB) {\r\n const structNameA = structA.fullName;\r\n const structNameB = structB?.fullName;\r\n if (structNameA !== structNameB) {\r\n const areSameByName = this.areItemsSameByName(structA.key, structB?.key, propertyA.schema.name, propertyB.schema.name);\r\n if (!areSameByName) {\r\n promises.push(this._reporter.reportPropertyDelta(propertyA, \"structClass\", structNameA, structNameB, this._compareDirection));\r\n }\r\n }\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n private async compareEnumerators(enumeratorA: AnyEnumerator, enumeratorB: AnyEnumerator, enumA: Enumeration, enumB: Enumeration): Promise<void> {\r\n const promises: Array<Promise<void>> = [];\r\n\r\n if (enumeratorA.description !== enumeratorB.description)\r\n promises.push(this._reporter.reportEnumeratorDelta(enumA, enumeratorA, \"description\", enumeratorA.description, enumeratorB.description, this._compareDirection));\r\n\r\n if (!labelsMatch(enumeratorA.label, enumeratorB.label))\r\n promises.push(this._reporter.reportEnumeratorDelta(enumA, enumeratorA, \"label\", enumeratorA.label, enumeratorB.label, this._compareDirection));\r\n\r\n // No need to compare values if the type is different (which will be reported separately)\r\n if (enumA.type === enumB.type && enumeratorA.value !== enumeratorB.value)\r\n promises.push(this._reporter.reportEnumeratorDelta(enumA, enumeratorA, \"value\", enumeratorA.value, enumeratorB.value, this._compareDirection));\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n private async compareFormatUnits(formatA: Format, formatB: Format): Promise<void> {\r\n if (!formatA.units)\r\n return;\r\n\r\n const promises: Array<Promise<void>> = [];\r\n\r\n for (const unitA of formatA.units) {\r\n const unitB = formatB.units ? formatB.units.find((u) => this.areItemsSameByName(unitA[0], u[0], formatA.schema.name, formatB.schema.name)) : undefined;\r\n if (!unitB) {\r\n promises.push(this._reporter.reportFormatUnitMissing(formatA, unitA[0], this._compareDirection));\r\n continue;\r\n }\r\n\r\n if (this._compareDirection === SchemaCompareDirection.Backward)\r\n continue;\r\n\r\n if (unitA[1] !== unitB[1]) {\r\n const labelA = unitA[1];\r\n const labelB = unitB[1];\r\n promises.push(this._reporter.reportUnitLabelOverrideDelta(formatA, unitB[0], labelA, labelB, this._compareDirection));\r\n }\r\n }\r\n\r\n await Promise.all(promises);\r\n }\r\n\r\n private areOverrideFormatsSameByName(\r\n itemKeyA: Format | OverrideFormat,\r\n itemKeyB: Format | OverrideFormat,\r\n topLevelSchemaNameA: string,\r\n topLevelSchemaNameB: string | undefined ): boolean {\r\n\r\n if (itemKeyA.units) {\r\n for (const unitA of itemKeyA.units) {\r\n if (!itemKeyB.units\r\n || -1 === itemKeyB.units.findIndex((unitB) => this.areItemsSameByName(unitA[0], unitB[0], topLevelSchemaNameA, topLevelSchemaNameB)\r\n && unitA[1] === unitB[1]))\r\n return false;\r\n }\r\n }\r\n\r\n const itemA = OverrideFormat.isOverrideFormat(itemKeyA) ? itemKeyA.parent : itemKeyA;\r\n const itemB = OverrideFormat.isOverrideFormat(itemKeyB) ? itemKeyB.parent : itemKeyB;\r\n\r\n return itemKeyA.precision === itemKeyB.precision && this.areItemsSameByName(itemA, itemB, topLevelSchemaNameA, topLevelSchemaNameB);\r\n }\r\n\r\n /**\r\n * Compares two item keys.\r\n * @param itemKeyA item key A to compare to.\r\n * @param itemKeyB item key B to compare to.\r\n * @param topLevelSchemaNameA top level schema name in which the item A exists.\r\n * @param topLevelSchemaNameB top level schema name in which the item B exists.\r\n * @returns true if both names are the same and they come from their respective top level schema.\r\n */\r\n private areItemsSameByName(\r\n itemKeyA: Readonly<SchemaItemKey> | SchemaItem | undefined,\r\n itemKeyB: Readonly<SchemaItemKey> | SchemaItem | undefined,\r\n topLevelSchemaNameA: string,\r\n topLevelSchemaNameB: string | undefined ): boolean {\r\n\r\n const nameA = itemKeyA ? itemKeyA.name.toUpperCase() : undefined;\r\n const nameB = itemKeyB ? itemKeyB.name.toUpperCase() : undefined;\r\n\r\n const schemaNameA = itemKeyA\r\n ? SchemaItem.isSchemaItem(itemKeyA)\r\n ? itemKeyA.schema.name\r\n : itemKeyA.schemaName\r\n : undefined;\r\n\r\n const schemaNameB = itemKeyB\r\n ? SchemaItem.isSchemaItem(itemKeyB)\r\n ? itemKeyB.schema.name\r\n : itemKeyB.schemaName\r\n : undefined;\r\n\r\n return (nameA === nameB && schemaNameA === topLevelSchemaNameA && schemaNameB === topLevelSchemaNameB) || (nameA === nameB && schemaNameA === schemaNameB);\r\n }\r\n\r\n /**\r\n * Looks for same classA in containerB using key.\r\n * @param classNameA name of the class to look for in containerB.\r\n * @param containerA container which classNameA belongs to.\r\n * @param containerB container in which to look for classNameA.\r\n * @returns true if a same classA is in containerB, otherwise false.\r\n */\r\n private containerHasClass(attributeA: CustomAttribute, containerA: CustomAttributeContainerProps, containerB: CustomAttributeContainerProps): boolean {\r\n if (containerB && containerB.customAttributes) {\r\n for (const [_className, attributeB] of containerB.customAttributes) {\r\n const classItemKeyA = containerA.schema.getSchemaItemKey(attributeA.className);\r\n const classItemKeyB = containerB.schema.getSchemaItemKey(attributeB.className);\r\n\r\n if (this.areItemsSameByName(classItemKeyA, classItemKeyB, containerA.schema.name, containerB.schema.name)) {\r\n return Object.keys(attributeA).every((propertyName) => {\r\n const valueA = attributeA[propertyName];\r\n const valueB = attributeB[propertyName];\r\n\r\n // If propertyName is class name, they don't need to be compared as this has been done\r\n // in the areItemsSameByName function.\r\n if(propertyName === \"className\")\r\n return true;\r\n\r\n return deepEquals(valueA, valueB);\r\n });\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Compares two values on their deep equality.\r\n * @param a left side to compare\r\n * @param b right side to compare\r\n * @returns true if they are deeply equal, otherwise false.\r\n */\r\nfunction deepEquals(a: unknown, b: unknown): boolean {\r\n if(Array.isArray(a) && Array.isArray(b)) {\r\n return a.length === b.length && a.every((value, index) => {\r\n return deepEquals(value, b[index]);\r\n });\r\n }\r\n if(isObject(a) && isObject(b)) {\r\n const propertiesA = Object.keys(a);\r\n const propertiesB = Object.keys(b);\r\n return propertiesA.length === propertiesB.length && propertiesA.every((propertyName) => {\r\n return deepEquals(a[propertyName], b[propertyName]);\r\n });\r\n }\r\n return a === b;\r\n}\r\n\r\nfunction isObject(value: unknown): value is { [property: string]: unknown } {\r\n return typeof value === \"object\";\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/ecschema-editing",
3
- "version": "4.8.0-dev.34",
3
+ "version": "4.8.0-dev.36",
4
4
  "description": "ECSchema editing and validation API",
5
5
  "license": "MIT",
6
6
  "main": "lib/cjs/ecschema-editing.js",
@@ -42,16 +42,16 @@
42
42
  "rimraf": "^3.0.2",
43
43
  "sinon": "^17.0.1",
44
44
  "typescript": "~5.3.3",
45
- "@itwin/core-bentley": "4.8.0-dev.34",
46
- "@itwin/build-tools": "4.8.0-dev.34",
47
- "@itwin/core-common": "4.8.0-dev.34",
48
- "@itwin/core-quantity": "4.8.0-dev.34",
49
- "@itwin/ecschema-metadata": "4.8.0-dev.34"
45
+ "@itwin/build-tools": "4.8.0-dev.36",
46
+ "@itwin/core-bentley": "4.8.0-dev.36",
47
+ "@itwin/core-quantity": "4.8.0-dev.36",
48
+ "@itwin/ecschema-metadata": "4.8.0-dev.36",
49
+ "@itwin/core-common": "4.8.0-dev.36"
50
50
  },
51
51
  "peerDependencies": {
52
- "@itwin/core-bentley": "^4.8.0-dev.34",
53
- "@itwin/core-quantity": "^4.8.0-dev.34",
54
- "@itwin/ecschema-metadata": "^4.8.0-dev.34"
52
+ "@itwin/core-bentley": "^4.8.0-dev.36",
53
+ "@itwin/core-quantity": "^4.8.0-dev.36",
54
+ "@itwin/ecschema-metadata": "^4.8.0-dev.36"
55
55
  },
56
56
  "nyc": {
57
57
  "extends": "./node_modules/@itwin/build-tools/.nycrc"