@itwin/ecschema-editing 4.8.0-dev.9 → 4.9.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (130) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/lib/cjs/Differencing/Errors.js.map +1 -1
  3. package/lib/cjs/Differencing/SchemaConflicts.d.ts +2 -0
  4. package/lib/cjs/Differencing/SchemaConflicts.d.ts.map +1 -1
  5. package/lib/cjs/Differencing/SchemaConflicts.js.map +1 -1
  6. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts +1 -0
  7. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -1
  8. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js +25 -11
  9. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js.map +1 -1
  10. package/lib/cjs/Differencing/SchemaDifference.js.map +1 -1
  11. package/lib/cjs/Differencing/Utils.d.ts +11 -1
  12. package/lib/cjs/Differencing/Utils.d.ts.map +1 -1
  13. package/lib/cjs/Differencing/Utils.js +21 -1
  14. package/lib/cjs/Differencing/Utils.js.map +1 -1
  15. package/lib/cjs/Editing/Constants.js.map +1 -1
  16. package/lib/cjs/Editing/CustomAttributes.d.ts +1 -1
  17. package/lib/cjs/Editing/CustomAttributes.d.ts.map +1 -1
  18. package/lib/cjs/Editing/CustomAttributes.js +2 -2
  19. package/lib/cjs/Editing/CustomAttributes.js.map +1 -1
  20. package/lib/cjs/Editing/ECClasses.d.ts +0 -7
  21. package/lib/cjs/Editing/ECClasses.d.ts.map +1 -1
  22. package/lib/cjs/Editing/ECClasses.js +0 -27
  23. package/lib/cjs/Editing/ECClasses.js.map +1 -1
  24. package/lib/cjs/Editing/Editor.d.ts +12 -1
  25. package/lib/cjs/Editing/Editor.d.ts.map +1 -1
  26. package/lib/cjs/Editing/Editor.js +24 -2
  27. package/lib/cjs/Editing/Editor.js.map +1 -1
  28. package/lib/cjs/Editing/Entities.js.map +1 -1
  29. package/lib/cjs/Editing/Enumerations.js.map +1 -1
  30. package/lib/cjs/Editing/Exception.js.map +1 -1
  31. package/lib/cjs/Editing/Formats.js.map +1 -1
  32. package/lib/cjs/Editing/InvertedUnits.js.map +1 -1
  33. package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
  34. package/lib/cjs/Editing/Mixins.js.map +1 -1
  35. package/lib/cjs/Editing/Mutable/MutableArrayProperty.js.map +1 -1
  36. package/lib/cjs/Editing/Mutable/MutableCAClass.d.ts +1 -1
  37. package/lib/cjs/Editing/Mutable/MutableCAClass.d.ts.map +1 -1
  38. package/lib/cjs/Editing/Mutable/MutableCAClass.js.map +1 -1
  39. package/lib/cjs/Editing/Mutable/MutableClass.js.map +1 -1
  40. package/lib/cjs/Editing/Mutable/MutableConstant.js.map +1 -1
  41. package/lib/cjs/Editing/Mutable/MutableEntityClass.js.map +1 -1
  42. package/lib/cjs/Editing/Mutable/MutableEnumeration.js.map +1 -1
  43. package/lib/cjs/Editing/Mutable/MutableFormat.js.map +1 -1
  44. package/lib/cjs/Editing/Mutable/MutableInvertedUnit.js.map +1 -1
  45. package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js.map +1 -1
  46. package/lib/cjs/Editing/Mutable/MutableMixin.js.map +1 -1
  47. package/lib/cjs/Editing/Mutable/MutableNavigationProperty.js.map +1 -1
  48. package/lib/cjs/Editing/Mutable/MutablePhenomenon.js.map +1 -1
  49. package/lib/cjs/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -1
  50. package/lib/cjs/Editing/Mutable/MutableProperty.js.map +1 -1
  51. package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js.map +1 -1
  52. package/lib/cjs/Editing/Mutable/MutableRelationshipClass.js.map +1 -1
  53. package/lib/cjs/Editing/Mutable/MutableSchema.d.ts +2 -0
  54. package/lib/cjs/Editing/Mutable/MutableSchema.d.ts.map +1 -1
  55. package/lib/cjs/Editing/Mutable/MutableSchema.js.map +1 -1
  56. package/lib/cjs/Editing/Mutable/MutableSchemaItem.d.ts +1 -0
  57. package/lib/cjs/Editing/Mutable/MutableSchemaItem.d.ts.map +1 -1
  58. package/lib/cjs/Editing/Mutable/MutableSchemaItem.js.map +1 -1
  59. package/lib/cjs/Editing/Mutable/MutableStructProperty.js.map +1 -1
  60. package/lib/cjs/Editing/Mutable/MutableUnit.js.map +1 -1
  61. package/lib/cjs/Editing/Mutable/MutableUnitSystem.js.map +1 -1
  62. package/lib/cjs/Editing/Phenomena.js.map +1 -1
  63. package/lib/cjs/Editing/Properties.js.map +1 -1
  64. package/lib/cjs/Editing/PropertyCategories.js.map +1 -1
  65. package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
  66. package/lib/cjs/Editing/SchemaItems.d.ts +7 -0
  67. package/lib/cjs/Editing/SchemaItems.d.ts.map +1 -1
  68. package/lib/cjs/Editing/SchemaItems.js +27 -0
  69. package/lib/cjs/Editing/SchemaItems.js.map +1 -1
  70. package/lib/cjs/Editing/Structs.js.map +1 -1
  71. package/lib/cjs/Editing/UnitSystems.js.map +1 -1
  72. package/lib/cjs/Editing/Units.js.map +1 -1
  73. package/lib/cjs/Merging/CAClassMerger.js +2 -2
  74. package/lib/cjs/Merging/CAClassMerger.js.map +1 -1
  75. package/lib/cjs/Merging/ClassMerger.js.map +1 -1
  76. package/lib/cjs/Merging/ConstantMerger.js.map +1 -1
  77. package/lib/cjs/Merging/CustomAttributeMerger.js.map +1 -1
  78. package/lib/cjs/Merging/Edits/RenameEditHandler.d.ts +14 -0
  79. package/lib/cjs/Merging/Edits/RenameEditHandler.d.ts.map +1 -0
  80. package/lib/cjs/Merging/Edits/RenameEditHandler.js +344 -0
  81. package/lib/cjs/Merging/Edits/RenameEditHandler.js.map +1 -0
  82. package/lib/cjs/Merging/Edits/SchemaEdits.d.ts +78 -0
  83. package/lib/cjs/Merging/Edits/SchemaEdits.d.ts.map +1 -0
  84. package/lib/cjs/Merging/Edits/SchemaEdits.js +111 -0
  85. package/lib/cjs/Merging/Edits/SchemaEdits.js.map +1 -0
  86. package/lib/cjs/Merging/Edits/SkipEditHandler.d.ts +14 -0
  87. package/lib/cjs/Merging/Edits/SkipEditHandler.d.ts.map +1 -0
  88. package/lib/cjs/Merging/Edits/SkipEditHandler.js +60 -0
  89. package/lib/cjs/Merging/Edits/SkipEditHandler.js.map +1 -0
  90. package/lib/cjs/Merging/EntityClassMerger.js.map +1 -1
  91. package/lib/cjs/Merging/EnumerationMerger.js.map +1 -1
  92. package/lib/cjs/Merging/KindOfQuantityMerger.js.map +1 -1
  93. package/lib/cjs/Merging/MixinMerger.js.map +1 -1
  94. package/lib/cjs/Merging/PhenomenonMerger.js.map +1 -1
  95. package/lib/cjs/Merging/PropertyCategoryMerger.js.map +1 -1
  96. package/lib/cjs/Merging/PropertyMerger.js.map +1 -1
  97. package/lib/cjs/Merging/RelationshipClassMerger.js.map +1 -1
  98. package/lib/cjs/Merging/SchemaItemMerger.js.map +1 -1
  99. package/lib/cjs/Merging/SchemaMerger.d.ts +9 -12
  100. package/lib/cjs/Merging/SchemaMerger.d.ts.map +1 -1
  101. package/lib/cjs/Merging/SchemaMerger.js +40 -37
  102. package/lib/cjs/Merging/SchemaMerger.js.map +1 -1
  103. package/lib/cjs/Merging/SchemaReferenceMerger.js.map +1 -1
  104. package/lib/cjs/Merging/UnitSystemMerger.js.map +1 -1
  105. package/lib/cjs/Validation/Diagnostic.js.map +1 -1
  106. package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
  107. package/lib/cjs/Validation/ECRules.js.map +1 -1
  108. package/lib/cjs/Validation/LoggingDiagnosticReporter.js.map +1 -1
  109. package/lib/cjs/Validation/RuleSuppressionSet.js.map +1 -1
  110. package/lib/cjs/Validation/Rules.js.map +1 -1
  111. package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
  112. package/lib/cjs/Validation/SchemaCompareDiagnostics.js.map +1 -1
  113. package/lib/cjs/Validation/SchemaCompareReporter.js.map +1 -1
  114. package/lib/cjs/Validation/SchemaCompareResultDelegate.js.map +1 -1
  115. package/lib/cjs/Validation/SchemaCompareVisitor.d.ts.map +1 -1
  116. package/lib/cjs/Validation/SchemaCompareVisitor.js +26 -19
  117. package/lib/cjs/Validation/SchemaCompareVisitor.js.map +1 -1
  118. package/lib/cjs/Validation/SchemaComparer.d.ts +30 -30
  119. package/lib/cjs/Validation/SchemaComparer.d.ts.map +1 -1
  120. package/lib/cjs/Validation/SchemaComparer.js +45 -45
  121. package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
  122. package/lib/cjs/Validation/SchemaValidater.js.map +1 -1
  123. package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
  124. package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
  125. package/lib/cjs/ecschema-editing.d.ts +1 -0
  126. package/lib/cjs/ecschema-editing.d.ts.map +1 -1
  127. package/lib/cjs/ecschema-editing.js +1 -0
  128. package/lib/cjs/ecschema-editing.js.map +1 -1
  129. package/package.json +9 -9
  130. package/public/locales/en/ECSchemaEditing.json +26 -26
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaCompareResultDelegate.js","sourceRoot":"","sources":["../../../src/Validation/SchemaCompareResultDelegate.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAQH,mDAAgD;AAChD,yEAAsE;AAItE;;;GAGG;AACH,MAAa,2BAA2B;IAKtC;;;OAGG;IACH,YAAY,OAAe,EAAE,OAAe,EAAE,GAAG,SAAmC;QAClF,IAAI,CAAC,sBAAsB,GAAG,SAAS,CAAC;QACxC,IAAI,CAAC,eAAe,GAAG,IAAI,6BAAa,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,eAAe,GAAG,IAAI,6BAAa,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAED,IAAW,qBAAqB;QAC9B,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACrC,CAAC;IAED;;OAEG;IACI,eAAe;QACpB,IAAI,CAAC,qBAAqB,C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;YACtD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAC/C,OAAO;QACT,CAAC;QACD,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;YACtD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAC/C,OAAO;QACT,CAAC;IACH,CAAC;CACF;AA5WD,kEA4WC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Comparison\n */\n\nimport { AnyClass, AnyEnumerator, AnyProperty, Constant, CustomAttribute,\n CustomAttributeClass, CustomAttributeContainerProps, EntityClass, Enumeration, Format, InvertedUnit, KindOfQuantity,\n Mixin, OverrideFormat, Phenomenon, PropertyCategory, RelationshipClass, RelationshipConstraint,\n Schema, SchemaItem, Unit,\n} from \"@itwin/ecschema-metadata\";\nimport { AnyDiagnostic } from \"./Diagnostic\";\nimport { SchemaChanges } from \"./SchemaChanges\";\nimport { SchemaCompareDiagnostics } from \"./SchemaCompareDiagnostics\";\nimport { SchemaCompareDirection } from \"./SchemaComparer\";\nimport { ISchemaCompareReporter } from \"./SchemaCompareReporter\";\n\n/**\n * Used by the [[SchemaComparer]] to report differences found during schema comparison.\n * @internal\n */\nexport class SchemaCompareResultDelegate {\n private _schemaChangeReporters: ISchemaCompareReporter[];\n private _schemaAChanges: SchemaChanges;\n private _schemaBChanges: SchemaChanges;\n\n /**\n * Initializes a new SchemaCompareResultDelegate instance.\n * @param reporters The [[ISchemaCompareReporter]] objects to use to report schema differences.\n */\n constructor(schemaA: Schema, schemaB: Schema, ...reporters: ISchemaCompareReporter[]) {\n this._schemaChangeReporters = reporters;\n this._schemaAChanges = new SchemaChanges(schemaA);\n this._schemaBChanges = new SchemaChanges(schemaB);\n }\n\n public get schemaChangeReporters(): ISchemaCompareReporter[] {\n return this._schemaChangeReporters;\n }\n\n /**\n * Called by the SchemaComparer when the comparison is complete.\n */\n public compareComplete() {\n this.schemaChangeReporters.forEach((r) => r.report(this._schemaAChanges));\n if (this._schemaBChanges)\n this.schemaChangeReporters.forEach((r) => r.report(this._schemaBChanges));\n }\n\n /**\n * Reports differences between Schema properties.\n * @param schemaA The first Schema supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first Schema.\n * @param valueB The value from the second Schema.\n */\n public async reportSchemaDelta(schemaA: Schema, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.SchemaDelta(schemaA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences in the schema reference collection of two schemas.\n * @param schemaA The first Schema supplied for comparison.\n * @param referenceSchema The missing schema reference.\n */\n public async reportSchemaReferenceMissing(schemaA: Schema, referenceSchema: Schema, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.SchemaReferenceMissing(schemaA, [referenceSchema]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences in the schema reference collection of two schemas where the reference version differs.\n * @param schemaA The first Schema supplied for comparison.\n * @param referenceSchema The missing schema reference.\n */\n public async reportSchemaReferenceDelta(schemaA: Schema, referenceSchema: Schema, versionA: string, versionB: string, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.SchemaReferenceDelta(schemaA, [referenceSchema, versionA, versionB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports that a given SchemaItem could not be found in the second Schema.\n * @param schemaItemA The SchemaItem from the first Schema.\n */\n public async reportSchemaItemMissing(schemaItemA: SchemaItem, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.SchemaItemMissing(schemaItemA, []);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between SchemaItem properties.\n * @param schemaItemA The first SchemaItem supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first SchemaItem.\n * @param valueB The value from the second SchemaItem.\n */\n public async reportSchemaItemDelta(schemaItemA: SchemaItem, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.SchemaItemDelta(schemaItemA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between ECClass properties.\n * @param classA The first ECClass supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first ECClass.\n * @param valueB The value from the second ECClass.\n */\n public async reportClassDelta(classA: AnyClass, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.ClassDelta(classA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences of the base class defined between two ECClass objects.\n * @param classA The first ECClass supplied for comparison.\n * @param baseClassA The base class of the first ECClass.\n * @param baseClassB The base class of the second ECClass.\n */\n public async reportBaseClassDelta(classA: AnyClass, baseClassA: AnyClass | undefined, baseClassB: AnyClass | undefined, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.BaseClassDelta(classA, [baseClassA, baseClassB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between ECProperty properties.\n * @param propertyA The first ECProperty supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first ECProperty.\n * @param valueB The value from the second ECProperty.\n */\n public async reportPropertyDelta(propertyA: AnyProperty, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.PropertyDelta(propertyA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports that an ECProperty found in the first ECClass could not be found in the second.\n * @param propertyA The ECProperty supplied for comparison.\n */\n public async reportPropertyMissing(propertyA: AnyProperty, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.PropertyMissing(propertyA, []);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports that a Mixin found in the first EntityClass could not be found in the second.\n * @param entityClassA The first EntityClass that is missing the Mixin.\n * @param mixinA The Mixin from the first EntityClass.\n */\n public async reportEntityMixinMissing(entityClassA: EntityClass, mixinA: Mixin, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.EntityMixinMissing(entityClassA, [mixinA]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between Mixin properties.\n * @param mixinA The first Mixin supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first Mixin.\n * @param valueB The value from the second Mixin.\n */\n public async reportMixinDelta(mixinA: Mixin, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.MixinDelta(mixinA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between RelationshipClass properties.\n * @param relationshipClassA The first RelationshipClass supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first RelationshipClass.\n * @param valueB The value from the second RelationshipClass.\n */\n public async reportRelationshipClassDelta(relationshipClassA: RelationshipClass, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.RelationshipDelta(relationshipClassA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between RelationshipConstraint properties.\n * @param constraintA The first RelationshipConstraint supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first RelationshipConstraint.\n * @param valueB The value from the second RelationshipConstraint.\n */\n public async reportRelationshipConstraintDelta(constraintA: RelationshipConstraint, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.RelationshipConstraintDelta(constraintA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports that a constraint class found in the first RelationshipConstraint could not be found in the second.\n * @param constraintA The first RelationshipConstraint that is missing the class constraint.\n * @param constraintClass The constraint ECClass from the first RelationshipConstraint.\n */\n public async reportRelationshipConstraintClassMissing(constraintA: RelationshipConstraint, constraintClass: EntityClass | Mixin | RelationshipClass, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.RelationshipConstraintClassMissing(constraintA, [constraintClass]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between CustomAttributeClass properties.\n * @param customAttributeA The first CustomAttributeClass supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first CustomAttributeClass.\n * @param valueB The value from the second CustomAttributeClass.\n */\n public async reportCustomAttributeClassDelta(customAttributeA: CustomAttributeClass, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.CustomAttributeClassDelta(customAttributeA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports that a CustomAttribute instance found in the first CustomAttribute container could not be found in the second.\n * @param customAttributeContainerA The first CustomAttribute container that is missing the CustomAttribute instance.\n * @param customAttribute The CustomAttribute missing.\n */\n public async reportCustomAttributeInstanceClassMissing(customAttributeContainerA: CustomAttributeContainerProps, customAttribute: CustomAttribute, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.CustomAttributeInstanceClassMissing(customAttributeContainerA, [customAttribute]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between Enumeration properties.\n * @param enumerationA The first Enumeration supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first Enumeration.\n * @param valueB The value from the second Enumeration.\n */\n public async reportEnumerationDelta(enumerationA: Enumeration, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.EnumerationDelta(enumerationA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports that a enumerator found in the first Enumeration could not be found in the second.\n * @param enumerationA The first Enumeration that is missing the enumerator.\n * @param enumerator The enumerator missing from the second schema.\n */\n public async reportEnumeratorMissing(enumerationA: Enumeration, enumerator: AnyEnumerator, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.EnumeratorMissing(enumerationA, [enumerator]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between enumerator properties within a given Enumeration.\n * @param enumerationA The first Enumeration supplied for comparison.\n * @param enumerator The enumerator containing differing property values.\n * @param propertyName The name of the property.\n * @param valueA The value from the first enumerator.\n * @param valueB The value from the second enumerator.\n */\n public async reportEnumeratorDelta(enumerationA: Enumeration, enumerator: AnyEnumerator, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.EnumeratorDelta(enumerationA, [enumerator, propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between KindOfQuantity properties.\n * @param koqA The first KindOfQuantity supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first KindOfQuantity.\n * @param valueB The value from the second KindOfQuantity.\n */\n public async reportKoqDelta(koqA: KindOfQuantity, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.KoqDelta(koqA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports that a presentation unit found in the first KindOfQuantity could not be found in the second.\n * @param koqA The first KindOfQuantity that is missing the presentation unit.\n * @param unit The Format or OverrideFormat presentation unit missing from the second schema.\n */\n public async reportPresentationUnitMissing(koqA: KindOfQuantity, unit: Format | OverrideFormat, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.PresentationUnitMissing(koqA, [unit]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between PropertyCategory properties.\n * @param categoryA The first PropertyCategory supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first PropertyCategory.\n * @param valueB The value from the second PropertyCategory.\n */\n public async reportPropertyCategoryDelta(categoryA: PropertyCategory, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.PropertyCategoryDelta(categoryA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between Format properties.\n * @param formatA The first Format supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first Format.\n * @param valueB The value from the second Format.\n */\n public async reportFormatDelta(formatA: Format, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.FormatDelta(formatA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports that a unit found in the first Format could not be found in the second.\n * @param formatA The first Format that is missing the unit.\n * @param unit The Unit or InvertedUnit missing from the second schema.\n */\n public async reportFormatUnitMissing(formatA: Format, unit: Unit | InvertedUnit, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.FormatUnitMissing(formatA, [unit]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between overridden labels within the Units of a given Format.\n * @param formatA The first Format supplied for comparison.\n * @param unit The Unit or InvertedUnit with differing label overrides.\n * @param labelA The value from the first label.\n * @param labelB The value from the second label.\n */\n public async reportUnitLabelOverrideDelta(formatA: Format, unit: Unit | InvertedUnit, labelA: string | undefined, labelB: string | undefined, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.UnitLabelOverrideDelta(formatA, [unit, labelA, labelB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between Unit properties.\n * @param unitA The first Unit supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first Unit.\n * @param valueB The value from the second Unit.\n */\n public async reportUnitDelta(unitA: Unit, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.UnitDelta(unitA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between InvertedUnit properties.\n * @param invertedUnitA The first InvertedUnit supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first InvertedUnit.\n * @param valueB The value from the second InvertedUnit.\n */\n public async reportInvertedUnitDelta(invertedUnitA: InvertedUnit, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.InvertedUnitDelta(invertedUnitA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between Phenomenon properties.\n * @param phenomenonA The first Phenomenon supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first Phenomenon.\n * @param valueB The value from the second Phenomenon.\n */\n public async reportPhenomenonDelta(phenomenonA: Phenomenon, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.PhenomenonDelta(phenomenonA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n /**\n * Reports differences between Constant properties.\n * @param constantA The first Constant supplied for comparison.\n * @param propertyName The name of the property.\n * @param valueA The value from the first Constant.\n * @param valueB The value from the second Constant.\n */\n public async reportConstantDelta(constantA: Constant, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\n const diag = new SchemaCompareDiagnostics.ConstantDelta(constantA, [propertyName, valueA, valueB]);\n await this.reportDiagnostic(diag);\n }\n\n private async reportDiagnostic(diagnostic: AnyDiagnostic): Promise<void> {\n if (this._schemaAChanges.schema === diagnostic.schema) {\n this._schemaAChanges.addDiagnostic(diagnostic);\n return;\n }\n if (this._schemaBChanges.schema === diagnostic.schema) {\n this._schemaBChanges.addDiagnostic(diagnostic);\n return;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"SchemaCompareResultDelegate.js","sourceRoot":"","sources":["../../../src/Validation/SchemaCompareResultDelegate.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAQH,mDAAgD;AAChD,yEAAsE;AAItE;;;GAGG;AACH,MAAa,2BAA2B;IAKtC;;;OAGG;IACH,YAAY,OAAe,EAAE,OAAe,EAAE,GAAG,SAAmC;QAClF,IAAI,CAAC,sBAAsB,GAAG,SAAS,CAAC;QACxC,IAAI,CAAC,eAAe,GAAG,IAAI,6BAAa,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,eAAe,GAAG,IAAI,6BAAa,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAED,IAAW,qBAAqB;QAC9B,OAAO,IAAI,CAAC,sBAAsB,CAAC;IACrC,CAAC;IAED;;OAEG;IACI,eAAe;QACpB,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;QAC1E,IAAI,IAAI,CAAC,eAAe;YACtB,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,iBAAiB,CAAC,OAAe,EAAE,YAAoB,EAAE,MAAW,EAAE,MAAW,EAAE,iBAAyC;QACvI,MAAM,IAAI,GAAG,IAAI,mDAAwB,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QAC/F,MAAM,IAAI,CAAC,gBA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CAAC,qBAAqB,CAAC,WAAuB,EAAE,YAAoB,EAAE,MAAW,EAAE,MAAW,EAAE,iBAAyC;QACnJ,MAAM,IAAI,GAAG,IAAI,mDAAwB,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACvG,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,mBAAmB,CAAC,SAAmB,EAAE,YAAoB,EAAE,MAAW,EAAE,MAAW,EAAE,iBAAyC;QAC7I,MAAM,IAAI,GAAG,IAAI,mDAAwB,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;QACnG,MAAM,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAAC,UAAyB;QACtD,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;YACtD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAC/C,OAAO;QACT,CAAC;QACD,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;YACtD,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;YAC/C,OAAO;QACT,CAAC;IACH,CAAC;CACF;AA5WD,kEA4WC","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, AnyEnumerator, AnyProperty, Constant, CustomAttribute,\r\n CustomAttributeClass, CustomAttributeContainerProps, EntityClass, Enumeration, Format, InvertedUnit, KindOfQuantity,\r\n Mixin, OverrideFormat, Phenomenon, PropertyCategory, RelationshipClass, RelationshipConstraint,\r\n Schema, SchemaItem, Unit,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport { AnyDiagnostic } from \"./Diagnostic\";\r\nimport { SchemaChanges } from \"./SchemaChanges\";\r\nimport { SchemaCompareDiagnostics } from \"./SchemaCompareDiagnostics\";\r\nimport { SchemaCompareDirection } from \"./SchemaComparer\";\r\nimport { ISchemaCompareReporter } from \"./SchemaCompareReporter\";\r\n\r\n/**\r\n * Used by the [[SchemaComparer]] to report differences found during schema comparison.\r\n * @internal\r\n */\r\nexport class SchemaCompareResultDelegate {\r\n private _schemaChangeReporters: ISchemaCompareReporter[];\r\n private _schemaAChanges: SchemaChanges;\r\n private _schemaBChanges: SchemaChanges;\r\n\r\n /**\r\n * Initializes a new SchemaCompareResultDelegate instance.\r\n * @param reporters The [[ISchemaCompareReporter]] objects to use to report schema differences.\r\n */\r\n constructor(schemaA: Schema, schemaB: Schema, ...reporters: ISchemaCompareReporter[]) {\r\n this._schemaChangeReporters = reporters;\r\n this._schemaAChanges = new SchemaChanges(schemaA);\r\n this._schemaBChanges = new SchemaChanges(schemaB);\r\n }\r\n\r\n public get schemaChangeReporters(): ISchemaCompareReporter[] {\r\n return this._schemaChangeReporters;\r\n }\r\n\r\n /**\r\n * Called by the SchemaComparer when the comparison is complete.\r\n */\r\n public compareComplete() {\r\n this.schemaChangeReporters.forEach((r) => r.report(this._schemaAChanges));\r\n if (this._schemaBChanges)\r\n this.schemaChangeReporters.forEach((r) => r.report(this._schemaBChanges));\r\n }\r\n\r\n /**\r\n * Reports differences between Schema properties.\r\n * @param schemaA The first Schema supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first Schema.\r\n * @param valueB The value from the second Schema.\r\n */\r\n public async reportSchemaDelta(schemaA: Schema, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.SchemaDelta(schemaA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences in the schema reference collection of two schemas.\r\n * @param schemaA The first Schema supplied for comparison.\r\n * @param referenceSchema The missing schema reference.\r\n */\r\n public async reportSchemaReferenceMissing(schemaA: Schema, referenceSchema: Schema, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.SchemaReferenceMissing(schemaA, [referenceSchema]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences in the schema reference collection of two schemas where the reference version differs.\r\n * @param schemaA The first Schema supplied for comparison.\r\n * @param referenceSchema The missing schema reference.\r\n */\r\n public async reportSchemaReferenceDelta(schemaA: Schema, referenceSchema: Schema, versionA: string, versionB: string, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.SchemaReferenceDelta(schemaA, [referenceSchema, versionA, versionB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports that a given SchemaItem could not be found in the second Schema.\r\n * @param schemaItemA The SchemaItem from the first Schema.\r\n */\r\n public async reportSchemaItemMissing(schemaItemA: SchemaItem, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.SchemaItemMissing(schemaItemA, []);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between SchemaItem properties.\r\n * @param schemaItemA The first SchemaItem supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first SchemaItem.\r\n * @param valueB The value from the second SchemaItem.\r\n */\r\n public async reportSchemaItemDelta(schemaItemA: SchemaItem, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.SchemaItemDelta(schemaItemA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between ECClass properties.\r\n * @param classA The first ECClass supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first ECClass.\r\n * @param valueB The value from the second ECClass.\r\n */\r\n public async reportClassDelta(classA: AnyClass, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.ClassDelta(classA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences of the base class defined between two ECClass objects.\r\n * @param classA The first ECClass supplied for comparison.\r\n * @param baseClassA The base class of the first ECClass.\r\n * @param baseClassB The base class of the second ECClass.\r\n */\r\n public async reportBaseClassDelta(classA: AnyClass, baseClassA: AnyClass | undefined, baseClassB: AnyClass | undefined, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.BaseClassDelta(classA, [baseClassA, baseClassB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between ECProperty properties.\r\n * @param propertyA The first ECProperty supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first ECProperty.\r\n * @param valueB The value from the second ECProperty.\r\n */\r\n public async reportPropertyDelta(propertyA: AnyProperty, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.PropertyDelta(propertyA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports that an ECProperty found in the first ECClass could not be found in the second.\r\n * @param propertyA The ECProperty supplied for comparison.\r\n */\r\n public async reportPropertyMissing(propertyA: AnyProperty, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.PropertyMissing(propertyA, []);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports that a Mixin found in the first EntityClass could not be found in the second.\r\n * @param entityClassA The first EntityClass that is missing the Mixin.\r\n * @param mixinA The Mixin from the first EntityClass.\r\n */\r\n public async reportEntityMixinMissing(entityClassA: EntityClass, mixinA: Mixin, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.EntityMixinMissing(entityClassA, [mixinA]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between Mixin properties.\r\n * @param mixinA The first Mixin supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first Mixin.\r\n * @param valueB The value from the second Mixin.\r\n */\r\n public async reportMixinDelta(mixinA: Mixin, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.MixinDelta(mixinA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between RelationshipClass properties.\r\n * @param relationshipClassA The first RelationshipClass supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first RelationshipClass.\r\n * @param valueB The value from the second RelationshipClass.\r\n */\r\n public async reportRelationshipClassDelta(relationshipClassA: RelationshipClass, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.RelationshipDelta(relationshipClassA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between RelationshipConstraint properties.\r\n * @param constraintA The first RelationshipConstraint supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first RelationshipConstraint.\r\n * @param valueB The value from the second RelationshipConstraint.\r\n */\r\n public async reportRelationshipConstraintDelta(constraintA: RelationshipConstraint, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.RelationshipConstraintDelta(constraintA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports that a constraint class found in the first RelationshipConstraint could not be found in the second.\r\n * @param constraintA The first RelationshipConstraint that is missing the class constraint.\r\n * @param constraintClass The constraint ECClass from the first RelationshipConstraint.\r\n */\r\n public async reportRelationshipConstraintClassMissing(constraintA: RelationshipConstraint, constraintClass: EntityClass | Mixin | RelationshipClass, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.RelationshipConstraintClassMissing(constraintA, [constraintClass]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between CustomAttributeClass properties.\r\n * @param customAttributeA The first CustomAttributeClass supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first CustomAttributeClass.\r\n * @param valueB The value from the second CustomAttributeClass.\r\n */\r\n public async reportCustomAttributeClassDelta(customAttributeA: CustomAttributeClass, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.CustomAttributeClassDelta(customAttributeA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports that a CustomAttribute instance found in the first CustomAttribute container could not be found in the second.\r\n * @param customAttributeContainerA The first CustomAttribute container that is missing the CustomAttribute instance.\r\n * @param customAttribute The CustomAttribute missing.\r\n */\r\n public async reportCustomAttributeInstanceClassMissing(customAttributeContainerA: CustomAttributeContainerProps, customAttribute: CustomAttribute, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.CustomAttributeInstanceClassMissing(customAttributeContainerA, [customAttribute]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between Enumeration properties.\r\n * @param enumerationA The first Enumeration supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first Enumeration.\r\n * @param valueB The value from the second Enumeration.\r\n */\r\n public async reportEnumerationDelta(enumerationA: Enumeration, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.EnumerationDelta(enumerationA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports that a enumerator found in the first Enumeration could not be found in the second.\r\n * @param enumerationA The first Enumeration that is missing the enumerator.\r\n * @param enumerator The enumerator missing from the second schema.\r\n */\r\n public async reportEnumeratorMissing(enumerationA: Enumeration, enumerator: AnyEnumerator, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.EnumeratorMissing(enumerationA, [enumerator]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between enumerator properties within a given Enumeration.\r\n * @param enumerationA The first Enumeration supplied for comparison.\r\n * @param enumerator The enumerator containing differing property values.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first enumerator.\r\n * @param valueB The value from the second enumerator.\r\n */\r\n public async reportEnumeratorDelta(enumerationA: Enumeration, enumerator: AnyEnumerator, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.EnumeratorDelta(enumerationA, [enumerator, propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between KindOfQuantity properties.\r\n * @param koqA The first KindOfQuantity supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first KindOfQuantity.\r\n * @param valueB The value from the second KindOfQuantity.\r\n */\r\n public async reportKoqDelta(koqA: KindOfQuantity, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.KoqDelta(koqA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports that a presentation unit found in the first KindOfQuantity could not be found in the second.\r\n * @param koqA The first KindOfQuantity that is missing the presentation unit.\r\n * @param unit The Format or OverrideFormat presentation unit missing from the second schema.\r\n */\r\n public async reportPresentationUnitMissing(koqA: KindOfQuantity, unit: Format | OverrideFormat, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.PresentationUnitMissing(koqA, [unit]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between PropertyCategory properties.\r\n * @param categoryA The first PropertyCategory supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first PropertyCategory.\r\n * @param valueB The value from the second PropertyCategory.\r\n */\r\n public async reportPropertyCategoryDelta(categoryA: PropertyCategory, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.PropertyCategoryDelta(categoryA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between Format properties.\r\n * @param formatA The first Format supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first Format.\r\n * @param valueB The value from the second Format.\r\n */\r\n public async reportFormatDelta(formatA: Format, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.FormatDelta(formatA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports that a unit found in the first Format could not be found in the second.\r\n * @param formatA The first Format that is missing the unit.\r\n * @param unit The Unit or InvertedUnit missing from the second schema.\r\n */\r\n public async reportFormatUnitMissing(formatA: Format, unit: Unit | InvertedUnit, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.FormatUnitMissing(formatA, [unit]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between overridden labels within the Units of a given Format.\r\n * @param formatA The first Format supplied for comparison.\r\n * @param unit The Unit or InvertedUnit with differing label overrides.\r\n * @param labelA The value from the first label.\r\n * @param labelB The value from the second label.\r\n */\r\n public async reportUnitLabelOverrideDelta(formatA: Format, unit: Unit | InvertedUnit, labelA: string | undefined, labelB: string | undefined, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.UnitLabelOverrideDelta(formatA, [unit, labelA, labelB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between Unit properties.\r\n * @param unitA The first Unit supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first Unit.\r\n * @param valueB The value from the second Unit.\r\n */\r\n public async reportUnitDelta(unitA: Unit, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.UnitDelta(unitA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between InvertedUnit properties.\r\n * @param invertedUnitA The first InvertedUnit supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first InvertedUnit.\r\n * @param valueB The value from the second InvertedUnit.\r\n */\r\n public async reportInvertedUnitDelta(invertedUnitA: InvertedUnit, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.InvertedUnitDelta(invertedUnitA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between Phenomenon properties.\r\n * @param phenomenonA The first Phenomenon supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first Phenomenon.\r\n * @param valueB The value from the second Phenomenon.\r\n */\r\n public async reportPhenomenonDelta(phenomenonA: Phenomenon, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.PhenomenonDelta(phenomenonA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n /**\r\n * Reports differences between Constant properties.\r\n * @param constantA The first Constant supplied for comparison.\r\n * @param propertyName The name of the property.\r\n * @param valueA The value from the first Constant.\r\n * @param valueB The value from the second Constant.\r\n */\r\n public async reportConstantDelta(constantA: Constant, propertyName: string, valueA: any, valueB: any, _compareDirection: SchemaCompareDirection): Promise<void> {\r\n const diag = new SchemaCompareDiagnostics.ConstantDelta(constantA, [propertyName, valueA, valueB]);\r\n await this.reportDiagnostic(diag);\r\n }\r\n\r\n private async reportDiagnostic(diagnostic: AnyDiagnostic): Promise<void> {\r\n if (this._schemaAChanges.schema === diagnostic.schema) {\r\n this._schemaAChanges.addDiagnostic(diagnostic);\r\n return;\r\n }\r\n if (this._schemaBChanges.schema === diagnostic.schema) {\r\n this._schemaBChanges.addDiagnostic(diagnostic);\r\n return;\r\n }\r\n }\r\n}\r\n"]}
@@ -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;;;OA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B.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;;;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,CAAC,CAAC;IACpE,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,UAAU,CAAC,MAAgB;QACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAW,MAAM,CAAC,IAAI,CAAC,CAAC;QACrE,IAAI,CAAC,eAAe,CAAC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,aAAa,CAAC,SAAsB;QAC/C,IAAI,SAAkC,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AC;YAC9B,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACpD,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,iBAAiB,CAAC,aAA2B;QACxD,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAe,aAAa,CAAC,IAAI,CAAC,CAAC;QACvF,IAAI,CAAC,aAAa,IAAI,aAAa,CAAC,cAAc,KAAK,kCAAc,CAAC,YAAY;YAChF,IAAI,CAAC,eAAe,CAAC,oBAAoB,CAAC,aAAa,EAAE,aAAa,CAAC,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":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Comparison\n */\n\nimport { AnyClass, AnyProperty, Constant, CustomAttributeClass, CustomAttributeContainerProps,\n ECClass, EntityClass, Enumeration, Format, InvertedUnit, ISchemaPartVisitor, KindOfQuantity, Mixin,\n Phenomenon, Property, PropertyCategory, RelationshipClass, RelationshipConstraint, Schema, SchemaItem,\n SchemaItemType, StructClass, Unit, UnitSystem,\n} from \"@itwin/ecschema-metadata\";\nimport { ISchemaComparer } from \"./SchemaComparer\";\n\n/**\n * An ISchemaPartVisitor interface implementation that is used to compare to Schemas.\n * @internal\n */\nexport class SchemaCompareVisitor implements ISchemaPartVisitor {\n private _schemaB: Schema;\n private _schemaComparer: ISchemaComparer;\n\n /**\n * Initializes a new SchemaCompareVisitor instance.\n * @param schemaComparer The [[SchemaComparer]] to use to compare each item of the schema.\n * @param schemaToCompare The second or 'B' schema to compare against the schema being traversed (Schema A).\n */\n constructor(schemaComparer: ISchemaComparer, schemaToCompare: Schema) {\n this._schemaComparer = schemaComparer;\n this._schemaB = schemaToCompare;\n }\n\n /**\n * Called before schema traversal.\n * @param schema a Schema object.\n */\n public async visitFullSchema(schemaA: Schema) {\n this._schemaComparer.compareSchemaProps(schemaA, this._schemaB);\n }\n\n /**\n * Called for each [[SchemaItem]] instance found during schema traversal.\n * @param schemaItem a SchemaItem object.\n */\n public async visitSchemaItem(schemaItemA: SchemaItem) {\n const schemaItemB = await this._schemaB.lookupItem(schemaItemA.name);\n this._schemaComparer.compareSchemaItems(schemaItemA, schemaItemB);\n }\n\n /**\n * Called for each [[AnyClass]] instance found during schema traversal.\n * @param ecClass an ECClass object.\n */\n public async visitClass(classA: AnyClass): Promise<void> {\n const classB = await this._schemaB.lookupItem<AnyClass>(classA.name);\n this._schemaComparer.compareClasses(classA, classB);\n }\n\n /**\n * Called for each [[AnyProperty]] instance of an ECClass.\n * @param property an AnyProperty object.\n */\n public async visitProperty(propertyA: AnyProperty): Promise<void> {\n let propertyB: AnyProperty | undefined;\n\n const classB = await this._schemaB.lookupItem<ECClass>(propertyA.class.name);\n if (classB && ECClass.isECClass(classB)) {\n propertyB = await classB.getProperty(propertyA.name) as AnyProperty;\n this._schemaComparer.compareProperties(propertyA, propertyB);\n }\n }\n\n /**\n * Called for each [[EntityClass]] instance found during schema traversal.\n * @param entityClass an EntityClass object.\n */\n public async visitEntityClass(entityA: EntityClass): Promise<void> {\n const entityB = await this._schemaB.lookupItem<EntityClass>(entityA.name);\n this._schemaComparer.compareEntityClasses(entityA, entityB);\n }\n\n /**\n * Called for each [[StructClass]] instance found during schema traversal.\n * @param structClass a StructClass object.\n */\n public async visitStructClass(_structA: StructClass): Promise<void> {\n // No comparison to make specifically on StructClasses\n }\n\n /**\n * Called for each [[Mixin]] instance found during schema traversal.\n * @param mixin a Mixin object.\n */\n public async visitMixin(mixinA: Mixin): Promise<void> {\n const mixinB = await this._schemaB.lookupItem<Mixin>(mixinA.name);\n if (!mixinB || mixinB.schemaItemType === SchemaItemType.Mixin)\n this._schemaComparer.compareMixins(mixinA, mixinB);\n }\n\n /**\n * Called for each [[RelationshipClass]] instance found during schema traversal.\n * @param relationshipClass a RelationshipClass object.\n */\n public async visitRelationshipClass(relationshipA: RelationshipClass): Promise<void> {\n const relationshipB = await this._schemaB.lookupItem<RelationshipClass>(relationshipA.name);\n if (!relationshipB || relationshipB.schemaItemType === SchemaItemType.RelationshipClass)\n this._schemaComparer.compareRelationshipClasses(relationshipA, relationshipB);\n }\n\n /**\n * Called for each [[RelationshipConstraint]] of each RelationshipClass found during schema traversal.\n * @param relationshipConstraint a RelationshipConstraint object.\n */\n public async visitRelationshipConstraint(constraintA: RelationshipConstraint): Promise<void> {\n let constraintB: RelationshipConstraint | undefined;\n const relationshipB = await this._schemaB.lookupItem<RelationshipClass>(constraintA.relationshipClass.name);\n if (relationshipB && relationshipB.schemaItemType === SchemaItemType.RelationshipClass)\n constraintB = constraintA.isSource ? relationshipB.source : relationshipB.target;\n this._schemaComparer.compareRelationshipConstraints(constraintA, constraintB);\n }\n\n /**\n * Called for each [[CustomAttributeClass]] instance found during schema traversal.\n * @param customAttributeClass a CustomAttributeClass object.\n */\n public async visitCustomAttributeClass(customAttributeA: CustomAttributeClass): Promise<void> {\n const customAttributeB = await this._schemaB.lookupItem<CustomAttributeClass>(customAttributeA.name);\n if (!customAttributeB || customAttributeB.schemaItemType === SchemaItemType.CustomAttributeClass)\n this._schemaComparer.compareCustomAttributeClasses(customAttributeA, customAttributeB);\n }\n\n /**\n * Called for each [[CustomAttribute]] container in the schema.\n * @param customAttributeContainer a [[CustomAttributeContainerProps]] object.\n */\n public async visitCustomAttributeContainer(containerA: CustomAttributeContainerProps): Promise<void> {\n const nameParts = containerA.fullName.split(\".\");\n const shortName = nameParts.length === 1 ? nameParts[0] : nameParts[1];\n let containerB: CustomAttributeContainerProps | undefined;\n\n if (Schema.isSchema(containerA)) {\n containerB = this._schemaB;\n } else if (ECClass.isECClass(containerA)) {\n containerB = await this._schemaB.lookupItem(containerA.name);\n } else if (Property.isProperty(containerA)) {\n const parent = await this._schemaB.lookupItem<ECClass>(containerA.class.name);\n containerB = parent && ECClass.isECClass(parent) ? await parent.getProperty(shortName) : undefined;\n } else if (RelationshipConstraint.isRelationshipConstraint(containerA)) {\n const parent = await this._schemaB.lookupItem<RelationshipClass>(containerA.relationshipClass.name);\n containerB = parent ? containerA.isSource ? parent.source : parent.target : undefined;\n }\n\n this._schemaComparer.compareCustomAttributeContainers(containerA, containerB);\n }\n\n /**\n * Called for each [[Enumeration]] instance found during schema traversal.\n * @param enumeration an Enumeration object.\n */\n public async visitEnumeration(enumA: Enumeration) {\n const enumB = await this._schemaB.lookupItem<Enumeration>(enumA.name);\n if (!enumB || enumB.schemaItemType === SchemaItemType.Enumeration)\n this._schemaComparer.compareEnumerations(enumA, enumB);\n }\n\n /**\n * Called for each [[KindOfQuantity]] instance found during schema traversal.\n * @param koq a KindOfQuantity object.\n */\n public async visitKindOfQuantity(koqA: KindOfQuantity) {\n const koqB = await this._schemaB.lookupItem<KindOfQuantity>(koqA.name);\n if (!koqB || koqB.schemaItemType === SchemaItemType.KindOfQuantity)\n this._schemaComparer.compareKindOfQuantities(koqA, koqB);\n }\n\n /**\n * Called for each [[PropertyCategory]] instance found during schema traversal.\n * @param category a PropertyCategory object.\n */\n public async visitPropertyCategory(categoryA: PropertyCategory) {\n const categoryB = await this._schemaB.lookupItem<PropertyCategory>(categoryA.name);\n if (!categoryB || categoryB.schemaItemType === SchemaItemType.PropertyCategory)\n this._schemaComparer.comparePropertyCategories(categoryA, categoryB);\n }\n\n /**\n * Called for each [[Format]] instance found during schema traversal.\n * @param format a Format object.\n */\n public async visitFormat(formatA: Format): Promise<void> {\n const formatB = await this._schemaB.lookupItem<Format>(formatA.name);\n if (!formatB || formatB.schemaItemType === SchemaItemType.Format)\n this._schemaComparer.compareFormats(formatA, formatB);\n }\n\n /**\n * Called for each [[Unit]] instance found during schema traversal.\n * @param unit a Unit object.\n */\n public async visitUnit(unitA: Unit): Promise<void> {\n const unitB = await this._schemaB.lookupItem<Unit>(unitA.name);\n if (!unitB || Unit.isUnit(unitB))\n this._schemaComparer.compareUnits(unitA, unitB);\n }\n\n /**\n * Called for each [[InvertedUnit]] instance found during schema traversal.\n * @param invertedUnit an InvertedUnit object.\n */\n public async visitInvertedUnit(invertedUnitA: InvertedUnit): Promise<void> {\n const invertedUnitB = await this._schemaB.lookupItem<InvertedUnit>(invertedUnitA.name);\n if (!invertedUnitB || invertedUnitB.schemaItemType === SchemaItemType.InvertedUnit)\n this._schemaComparer.compareInvertedUnits(invertedUnitA, invertedUnitB);\n }\n\n /**\n * Called for each [[UnitSystem]] instance found during schema traversal.\n * @param unitSystem a UnitSystem object.\n */\n public async visitUnitSystem(_unitSystemA: UnitSystem): Promise<void> {\n // No comparison to make specifically on unitSystem\n }\n\n /**\n * Called for each [[Phenomenon]] instance found during schema traversal.\n * @param phenomena a Phenomenon object.\n */\n public async visitPhenomenon(phenomenonA: Phenomenon): Promise<void> {\n const phenomenonB = await this._schemaB.lookupItem<Phenomenon>(phenomenonA.name);\n if (!phenomenonB || phenomenonB.schemaItemType === SchemaItemType.Phenomenon)\n this._schemaComparer.comparePhenomenons(phenomenonA, phenomenonB);\n }\n\n /**\n * Called for each [[Constant]] instance found during schema traversal.\n * @param constant a Constant object.\n */\n public async visitConstant(constantA: Constant): Promise<void> {\n const constantB = await this._schemaB.lookupItem<Constant>(constantA.name);\n if (!constantB || constantB.schemaItemType === SchemaItemType.Constant)\n this._schemaComparer.compareConstants(constantA, constantB);\n }\n}\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,CAAC,CAAC;IACpE,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,UAAU,CAAC,MAAgB;QACtC,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAW,MAAM,CAAC,IAAI,CAAC,CAAC;QACrE,IAAI,MAAM,IAAI,MAAM,CAAC,cA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G;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,kBAAkB,CAAC,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC;IACvF,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC;IACrE,iBAAiB,CAAC,SAAS,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