@itwin/ecschema-editing 5.0.0-dev.7 → 5.0.0-dev.72

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 (196) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/lib/cjs/Differencing/Errors.js +6 -0
  3. package/lib/cjs/Differencing/Errors.js.map +1 -1
  4. package/lib/cjs/Differencing/SchemaConflicts.d.ts +3 -1
  5. package/lib/cjs/Differencing/SchemaConflicts.d.ts.map +1 -1
  6. package/lib/cjs/Differencing/SchemaConflicts.js +2 -0
  7. package/lib/cjs/Differencing/SchemaConflicts.js.map +1 -1
  8. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts +4 -3
  9. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -1
  10. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js +57 -11
  11. package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js.map +1 -1
  12. package/lib/cjs/Differencing/SchemaDifference.d.ts +33 -4
  13. package/lib/cjs/Differencing/SchemaDifference.d.ts.map +1 -1
  14. package/lib/cjs/Differencing/SchemaDifference.js +55 -5
  15. package/lib/cjs/Differencing/SchemaDifference.js.map +1 -1
  16. package/lib/cjs/Differencing/SchemaDifferenceValidator.d.ts +2 -1
  17. package/lib/cjs/Differencing/SchemaDifferenceValidator.d.ts.map +1 -1
  18. package/lib/cjs/Differencing/SchemaDifferenceValidator.js +78 -19
  19. package/lib/cjs/Differencing/SchemaDifferenceValidator.js.map +1 -1
  20. package/lib/cjs/Differencing/SchemaDifferenceVisitor.d.ts.map +1 -1
  21. package/lib/cjs/Differencing/SchemaDifferenceVisitor.js +5 -0
  22. package/lib/cjs/Differencing/SchemaDifferenceVisitor.js.map +1 -1
  23. package/lib/cjs/Editing/Constants.d.ts +2 -1
  24. package/lib/cjs/Editing/Constants.d.ts.map +1 -1
  25. package/lib/cjs/Editing/Constants.js +4 -1
  26. package/lib/cjs/Editing/Constants.js.map +1 -1
  27. package/lib/cjs/Editing/CustomAttributes.d.ts +2 -1
  28. package/lib/cjs/Editing/CustomAttributes.d.ts.map +1 -1
  29. package/lib/cjs/Editing/CustomAttributes.js +3 -0
  30. package/lib/cjs/Editing/CustomAttributes.js.map +1 -1
  31. package/lib/cjs/Editing/ECClasses.d.ts +6 -0
  32. package/lib/cjs/Editing/ECClasses.d.ts.map +1 -1
  33. package/lib/cjs/Editing/ECClasses.js +48 -35
  34. package/lib/cjs/Editing/ECClasses.js.map +1 -1
  35. package/lib/cjs/Editing/Editor.d.ts +2 -2
  36. package/lib/cjs/Editing/Editor.d.ts.map +1 -1
  37. package/lib/cjs/Editing/Editor.js +32 -21
  38. package/lib/cjs/Editing/Editor.js.map +1 -1
  39. package/lib/cjs/Editing/Entities.d.ts +2 -1
  40. package/lib/cjs/Editing/Entities.d.ts.map +1 -1
  41. package/lib/cjs/Editing/Entities.js +18 -14
  42. package/lib/cjs/Editing/Entities.js.map +1 -1
  43. package/lib/cjs/Editing/Enumerations.d.ts +2 -1
  44. package/lib/cjs/Editing/Enumerations.d.ts.map +1 -1
  45. package/lib/cjs/Editing/Enumerations.js +6 -3
  46. package/lib/cjs/Editing/Enumerations.js.map +1 -1
  47. package/lib/cjs/Editing/Exception.js +35 -6
  48. package/lib/cjs/Editing/Exception.js.map +1 -1
  49. package/lib/cjs/Editing/Formats.d.ts +2 -1
  50. package/lib/cjs/Editing/Formats.d.ts.map +1 -1
  51. package/lib/cjs/Editing/Formats.js +5 -1
  52. package/lib/cjs/Editing/Formats.js.map +1 -1
  53. package/lib/cjs/Editing/InvertedUnits.d.ts +2 -1
  54. package/lib/cjs/Editing/InvertedUnits.d.ts.map +1 -1
  55. package/lib/cjs/Editing/InvertedUnits.js +10 -6
  56. package/lib/cjs/Editing/InvertedUnits.js.map +1 -1
  57. package/lib/cjs/Editing/KindOfQuantities.d.ts +2 -1
  58. package/lib/cjs/Editing/KindOfQuantities.d.ts.map +1 -1
  59. package/lib/cjs/Editing/KindOfQuantities.js +11 -7
  60. package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
  61. package/lib/cjs/Editing/Mixins.d.ts +2 -1
  62. package/lib/cjs/Editing/Mixins.d.ts.map +1 -1
  63. package/lib/cjs/Editing/Mixins.js +13 -9
  64. package/lib/cjs/Editing/Mixins.js.map +1 -1
  65. package/lib/cjs/Editing/Mutable/MutableClass.d.ts +2 -1
  66. package/lib/cjs/Editing/Mutable/MutableClass.d.ts.map +1 -1
  67. package/lib/cjs/Editing/Mutable/MutableClass.js.map +1 -1
  68. package/lib/cjs/Editing/Mutable/MutableFormat.d.ts +8 -1
  69. package/lib/cjs/Editing/Mutable/MutableFormat.d.ts.map +1 -1
  70. package/lib/cjs/Editing/Mutable/MutableFormat.js.map +1 -1
  71. package/lib/cjs/Editing/Phenomena.d.ts +2 -1
  72. package/lib/cjs/Editing/Phenomena.d.ts.map +1 -1
  73. package/lib/cjs/Editing/Phenomena.js +3 -0
  74. package/lib/cjs/Editing/Phenomena.js.map +1 -1
  75. package/lib/cjs/Editing/Properties.d.ts +2 -2
  76. package/lib/cjs/Editing/Properties.d.ts.map +1 -1
  77. package/lib/cjs/Editing/Properties.js +6 -4
  78. package/lib/cjs/Editing/Properties.js.map +1 -1
  79. package/lib/cjs/Editing/PropertyCategories.d.ts +2 -1
  80. package/lib/cjs/Editing/PropertyCategories.d.ts.map +1 -1
  81. package/lib/cjs/Editing/PropertyCategories.js +5 -1
  82. package/lib/cjs/Editing/PropertyCategories.js.map +1 -1
  83. package/lib/cjs/Editing/RelationshipClasses.d.ts +1 -0
  84. package/lib/cjs/Editing/RelationshipClasses.d.ts.map +1 -1
  85. package/lib/cjs/Editing/RelationshipClasses.js +17 -10
  86. package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
  87. package/lib/cjs/Editing/SchemaItems.d.ts +2 -2
  88. package/lib/cjs/Editing/SchemaItems.d.ts.map +1 -1
  89. package/lib/cjs/Editing/SchemaItems.js +8 -11
  90. package/lib/cjs/Editing/SchemaItems.js.map +1 -1
  91. package/lib/cjs/Editing/Structs.d.ts +2 -1
  92. package/lib/cjs/Editing/Structs.d.ts.map +1 -1
  93. package/lib/cjs/Editing/Structs.js +3 -0
  94. package/lib/cjs/Editing/Structs.js.map +1 -1
  95. package/lib/cjs/Editing/UnitSystems.d.ts +2 -1
  96. package/lib/cjs/Editing/UnitSystems.d.ts.map +1 -1
  97. package/lib/cjs/Editing/UnitSystems.js +3 -0
  98. package/lib/cjs/Editing/UnitSystems.js.map +1 -1
  99. package/lib/cjs/Editing/Units.d.ts +2 -1
  100. package/lib/cjs/Editing/Units.d.ts.map +1 -1
  101. package/lib/cjs/Editing/Units.js +5 -2
  102. package/lib/cjs/Editing/Units.js.map +1 -1
  103. package/lib/cjs/Merging/ConstantMerger.js +4 -4
  104. package/lib/cjs/Merging/ConstantMerger.js.map +1 -1
  105. package/lib/cjs/Merging/CustomAttributeMerger.d.ts.map +1 -1
  106. package/lib/cjs/Merging/CustomAttributeMerger.js +7 -6
  107. package/lib/cjs/Merging/CustomAttributeMerger.js.map +1 -1
  108. package/lib/cjs/Merging/Edits/NameMapping.d.ts +22 -0
  109. package/lib/cjs/Merging/Edits/NameMapping.d.ts.map +1 -0
  110. package/lib/cjs/Merging/Edits/NameMapping.js +54 -0
  111. package/lib/cjs/Merging/Edits/NameMapping.js.map +1 -0
  112. package/lib/cjs/Merging/Edits/RenameEditHandler.d.ts +1 -1
  113. package/lib/cjs/Merging/Edits/RenameEditHandler.d.ts.map +1 -1
  114. package/lib/cjs/Merging/Edits/RenameEditHandler.js +1 -260
  115. package/lib/cjs/Merging/Edits/RenameEditHandler.js.map +1 -1
  116. package/lib/cjs/Merging/Edits/SchemaEdits.d.ts +9 -6
  117. package/lib/cjs/Merging/Edits/SchemaEdits.d.ts.map +1 -1
  118. package/lib/cjs/Merging/Edits/SchemaEdits.js +19 -14
  119. package/lib/cjs/Merging/Edits/SchemaEdits.js.map +1 -1
  120. package/lib/cjs/Merging/EntityClassMerger.js +1 -2
  121. package/lib/cjs/Merging/EntityClassMerger.js.map +1 -1
  122. package/lib/cjs/Merging/EnumerationMerger.js +1 -1
  123. package/lib/cjs/Merging/EnumerationMerger.js.map +1 -1
  124. package/lib/cjs/Merging/EnumeratorMerger.d.ts.map +1 -1
  125. package/lib/cjs/Merging/EnumeratorMerger.js +2 -2
  126. package/lib/cjs/Merging/EnumeratorMerger.js.map +1 -1
  127. package/lib/cjs/Merging/FormatMerger.d.ts +24 -0
  128. package/lib/cjs/Merging/FormatMerger.d.ts.map +1 -0
  129. package/lib/cjs/Merging/FormatMerger.js +143 -0
  130. package/lib/cjs/Merging/FormatMerger.js.map +1 -0
  131. package/lib/cjs/Merging/InvertedUnitMerger.d.ts +14 -0
  132. package/lib/cjs/Merging/InvertedUnitMerger.d.ts.map +1 -0
  133. package/lib/cjs/Merging/InvertedUnitMerger.js +45 -0
  134. package/lib/cjs/Merging/InvertedUnitMerger.js.map +1 -0
  135. package/lib/cjs/Merging/KindOfQuantityMerger.d.ts +1 -1
  136. package/lib/cjs/Merging/KindOfQuantityMerger.d.ts.map +1 -1
  137. package/lib/cjs/Merging/KindOfQuantityMerger.js +4 -5
  138. package/lib/cjs/Merging/KindOfQuantityMerger.js.map +1 -1
  139. package/lib/cjs/Merging/MixinMerger.js +1 -1
  140. package/lib/cjs/Merging/MixinMerger.js.map +1 -1
  141. package/lib/cjs/Merging/PhenomenonMerger.js +1 -1
  142. package/lib/cjs/Merging/PhenomenonMerger.js.map +1 -1
  143. package/lib/cjs/Merging/PropertyMerger.js +28 -26
  144. package/lib/cjs/Merging/PropertyMerger.js.map +1 -1
  145. package/lib/cjs/Merging/RelationshipClassMerger.d.ts.map +1 -1
  146. package/lib/cjs/Merging/RelationshipClassMerger.js +4 -4
  147. package/lib/cjs/Merging/RelationshipClassMerger.js.map +1 -1
  148. package/lib/cjs/Merging/SchemaMerger.d.ts +5 -3
  149. package/lib/cjs/Merging/SchemaMerger.d.ts.map +1 -1
  150. package/lib/cjs/Merging/SchemaMerger.js +40 -5
  151. package/lib/cjs/Merging/SchemaMerger.js.map +1 -1
  152. package/lib/cjs/Merging/SchemaMergingVisitor.d.ts +14 -8
  153. package/lib/cjs/Merging/SchemaMergingVisitor.d.ts.map +1 -1
  154. package/lib/cjs/Merging/SchemaMergingVisitor.js +42 -17
  155. package/lib/cjs/Merging/SchemaMergingVisitor.js.map +1 -1
  156. package/lib/cjs/Merging/SchemaMergingWalker.d.ts.map +1 -1
  157. package/lib/cjs/Merging/SchemaMergingWalker.js +2 -0
  158. package/lib/cjs/Merging/SchemaMergingWalker.js.map +1 -1
  159. package/lib/cjs/Merging/UnitMerger.d.ts +14 -0
  160. package/lib/cjs/Merging/UnitMerger.d.ts.map +1 -0
  161. package/lib/cjs/Merging/UnitMerger.js +62 -0
  162. package/lib/cjs/Merging/UnitMerger.js.map +1 -0
  163. package/lib/cjs/Merging/Utils.d.ts +11 -0
  164. package/lib/cjs/Merging/Utils.d.ts.map +1 -1
  165. package/lib/cjs/Merging/Utils.js +23 -3
  166. package/lib/cjs/Merging/Utils.js.map +1 -1
  167. package/lib/cjs/Validation/Diagnostic.js +18 -16
  168. package/lib/cjs/Validation/Diagnostic.js.map +1 -1
  169. package/lib/cjs/Validation/DiagnosticReporter.js +3 -0
  170. package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
  171. package/lib/cjs/Validation/ECRules.js +1 -1
  172. package/lib/cjs/Validation/ECRules.js.map +1 -1
  173. package/lib/cjs/Validation/SchemaChanges.js +39 -69
  174. package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
  175. package/lib/cjs/Validation/SchemaCompareDiagnostics.d.ts +2 -2
  176. package/lib/cjs/Validation/SchemaCompareDiagnostics.js.map +1 -1
  177. package/lib/cjs/Validation/SchemaCompareResultDelegate.d.ts +1 -1
  178. package/lib/cjs/Validation/SchemaCompareResultDelegate.d.ts.map +1 -1
  179. package/lib/cjs/Validation/SchemaCompareResultDelegate.js +4 -1
  180. package/lib/cjs/Validation/SchemaCompareResultDelegate.js.map +1 -1
  181. package/lib/cjs/Validation/SchemaCompareVisitor.d.ts.map +1 -1
  182. package/lib/cjs/Validation/SchemaCompareVisitor.js +23 -23
  183. package/lib/cjs/Validation/SchemaCompareVisitor.js.map +1 -1
  184. package/lib/cjs/Validation/SchemaComparer.d.ts +22 -1
  185. package/lib/cjs/Validation/SchemaComparer.d.ts.map +1 -1
  186. package/lib/cjs/Validation/SchemaComparer.js +30 -5
  187. package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
  188. package/lib/cjs/Validation/SchemaValidater.js +1 -4
  189. package/lib/cjs/Validation/SchemaValidater.js.map +1 -1
  190. package/lib/cjs/Validation/SchemaValidationVisitor.js +3 -4
  191. package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
  192. package/lib/cjs/Validation/SchemaWalker.d.ts +1 -1
  193. package/lib/cjs/Validation/SchemaWalker.d.ts.map +1 -1
  194. package/lib/cjs/Validation/SchemaWalker.js +4 -0
  195. package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
  196. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,6 +1,36 @@
1
1
  # Change Log - @itwin/ecschema-editing
2
2
 
3
- This log was last generated on Thu, 14 Nov 2024 18:13:56 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 18 Feb 2025 17:30:07 GMT and should not be manually modified.
4
+
5
+ ## 4.10.7
6
+ Tue, 18 Feb 2025 17:27:03 GMT
7
+
8
+ _Version update only_
9
+
10
+ ## 4.10.6
11
+ Fri, 24 Jan 2025 08:02:40 GMT
12
+
13
+ _Version update only_
14
+
15
+ ## 4.10.5
16
+ Tue, 21 Jan 2025 21:56:45 GMT
17
+
18
+ _Version update only_
19
+
20
+ ## 4.10.4
21
+ Mon, 13 Jan 2025 14:06:43 GMT
22
+
23
+ _Version update only_
24
+
25
+ ## 4.10.3
26
+ Mon, 06 Jan 2025 14:00:13 GMT
27
+
28
+ _Version update only_
29
+
30
+ ## 4.10.2
31
+ Thu, 21 Nov 2024 15:22:20 GMT
32
+
33
+ _Version update only_
4
34
 
5
35
  ## 4.10.1
6
36
  Thu, 14 Nov 2024 18:11:00 GMT
@@ -13,6 +13,12 @@ exports.SchemaConflictsError = void 0;
13
13
  * @alpha
14
14
  */
15
15
  class SchemaConflictsError extends Error {
16
+ /** Gets an array of conflicts between two schemas. */
17
+ conflicts;
18
+ /** Gets the name of the source schema. */
19
+ sourceSchema;
20
+ /** Gets the name of the target schema. */
21
+ targetSchema;
16
22
  constructor(message, conflicts, sourceSchema, targetSchema) {
17
23
  super(message);
18
24
  this.sourceSchema = sourceSchema;
@@ -1 +1 @@
1
- {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../../src/Differencing/Errors.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH;;;GAGG;AACH,MAAa,oBAAqB,SAAQ,KAAK;IAQ7C,YAAY,OAAe,EAAE,SAAwC,EAAE,YAAuB,EAAE,YAAuB;QACrH,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CACF;AAfD,oDAeC","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 Differencing\r\n */\r\n\r\nimport type { SchemaKey } from \"@itwin/ecschema-metadata\";\r\nimport type { AnySchemaDifferenceConflict } from \"./SchemaConflicts\";\r\n\r\n/**\r\n * Error class that contains conflicts when differencing two schemas.\r\n * @alpha\r\n */\r\nexport class SchemaConflictsError extends Error {\r\n /** Gets an array of conflicts between two schemas. */\r\n public readonly conflicts: ReadonlyArray<AnySchemaDifferenceConflict>;\r\n /** Gets the name of the source schema. */\r\n public readonly sourceSchema: SchemaKey;\r\n /** Gets the name of the target schema. */\r\n public readonly targetSchema: SchemaKey;\r\n\r\n constructor(message: string, conflicts: AnySchemaDifferenceConflict[], sourceSchema: SchemaKey, targetSchema: SchemaKey) {\r\n super(message);\r\n\r\n this.sourceSchema = sourceSchema;\r\n this.targetSchema = targetSchema;\r\n this.conflicts = conflicts;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../../src/Differencing/Errors.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH;;;GAGG;AACH,MAAa,oBAAqB,SAAQ,KAAK;IAC7C,sDAAsD;IACtC,SAAS,CAA6C;IACtE,0CAA0C;IAC1B,YAAY,CAAY;IACxC,0CAA0C;IAC1B,YAAY,CAAY;IAExC,YAAY,OAAe,EAAE,SAAwC,EAAE,YAAuB,EAAE,YAAuB;QACrH,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;CACF;AAfD,oDAeC","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 Differencing\r\n */\r\n\r\nimport type { SchemaKey } from \"@itwin/ecschema-metadata\";\r\nimport type { AnySchemaDifferenceConflict } from \"./SchemaConflicts\";\r\n\r\n/**\r\n * Error class that contains conflicts when differencing two schemas.\r\n * @alpha\r\n */\r\nexport class SchemaConflictsError extends Error {\r\n /** Gets an array of conflicts between two schemas. */\r\n public readonly conflicts: ReadonlyArray<AnySchemaDifferenceConflict>;\r\n /** Gets the name of the source schema. */\r\n public readonly sourceSchema: SchemaKey;\r\n /** Gets the name of the target schema. */\r\n public readonly targetSchema: SchemaKey;\r\n\r\n constructor(message: string, conflicts: AnySchemaDifferenceConflict[], sourceSchema: SchemaKey, targetSchema: SchemaKey) {\r\n super(message);\r\n\r\n this.sourceSchema = sourceSchema;\r\n this.targetSchema = targetSchema;\r\n this.conflicts = conflicts;\r\n }\r\n}\r\n"]}
@@ -43,6 +43,8 @@ export declare enum ConflictCode {
43
43
  ConflictingClassModifier = "C-103",
44
44
  ConflictingEnumerationType = "C-700",
45
45
  ConflictingEnumeratorValue = "C-701",
46
+ ConflictingFormatUnit = "C-800",
47
+ ConflictingFormatUnitPhenomenon = "C-801",
46
48
  ConflictingPersistenceUnit = "C-1010",
47
49
  MixinAppliedMustDeriveFromConstraint = "C-1100",
48
50
  ConflictingPropertyName = "C-1300",
@@ -77,6 +79,6 @@ type EcClassTypes = SchemaItemType.CustomAttributeClass | SchemaItemType.EntityC
77
79
  * Union of all supported schema differencing conflict types.
78
80
  * @alpha
79
81
  */
80
- export type AnySchemaDifferenceConflict = SchemaDifferenceConflict<ConflictCode.ConflictingItemName, SchemaItemType> | SchemaDifferenceConflict<ConflictCode.ConflictingReferenceAlias, SchemaOtherTypes.SchemaReference> | SchemaDifferenceConflict<ConflictCode.ConflictingReferenceVersion, SchemaOtherTypes.SchemaReference> | SchemaDifferenceConflict<ConflictCode.ConflictingBaseClass, EcClassTypes> | SchemaDifferenceConflict<ConflictCode.RemovingBaseClass, EcClassTypes> | SchemaDifferenceConflict<ConflictCode.SealedBaseClass, EcClassTypes> | SchemaDifferenceConflict<ConflictCode.ConflictingClassModifier, EcClassTypes> | SchemaDifferenceConflict<ConflictCode.ConflictingEnumerationType, SchemaItemType.Enumeration> | SchemaDifferenceConflict<ConflictCode.ConflictingEnumeratorValue, SchemaOtherTypes.Enumerator> | SchemaDifferenceConflict<ConflictCode.ConflictingPersistenceUnit, SchemaItemType.KindOfQuantity> | SchemaDifferenceConflict<ConflictCode.MixinAppliedMustDeriveFromConstraint, SchemaOtherTypes.EntityClassMixin> | SchemaDifferenceConflict<ConflictCode.ConflictingPropertyName, SchemaOtherTypes.Property> | SchemaDifferenceConflict<ConflictCode.ConflictingPropertyKindOfQuantity, SchemaOtherTypes.Property> | SchemaDifferenceConflict<ConflictCode.ConflictingPropertyKindOfQuantityUnit, SchemaOtherTypes.Property> | SchemaDifferenceConflict<ConflictCode.AbstractConstraintMustNarrowBaseConstraints, SchemaOtherTypes.RelationshipConstraint> | SchemaDifferenceConflict<ConflictCode.DerivedConstraintsMustNarrowBaseConstraints, SchemaOtherTypes.RelationshipConstraint> | SchemaDifferenceConflict<ConflictCode.ConstraintClassesDeriveFromAbstractConstraint, SchemaOtherTypes.RelationshipConstraint>;
82
+ export type AnySchemaDifferenceConflict = SchemaDifferenceConflict<ConflictCode.ConflictingItemName, SchemaItemType> | SchemaDifferenceConflict<ConflictCode.ConflictingReferenceAlias, SchemaOtherTypes.SchemaReference> | SchemaDifferenceConflict<ConflictCode.ConflictingReferenceVersion, SchemaOtherTypes.SchemaReference> | SchemaDifferenceConflict<ConflictCode.ConflictingBaseClass, EcClassTypes> | SchemaDifferenceConflict<ConflictCode.RemovingBaseClass, EcClassTypes> | SchemaDifferenceConflict<ConflictCode.SealedBaseClass, EcClassTypes> | SchemaDifferenceConflict<ConflictCode.ConflictingClassModifier, EcClassTypes> | SchemaDifferenceConflict<ConflictCode.ConflictingEnumerationType, SchemaItemType.Enumeration> | SchemaDifferenceConflict<ConflictCode.ConflictingEnumeratorValue, SchemaOtherTypes.Enumerator> | SchemaDifferenceConflict<ConflictCode.ConflictingPersistenceUnit, SchemaItemType.KindOfQuantity> | SchemaDifferenceConflict<ConflictCode.MixinAppliedMustDeriveFromConstraint, SchemaOtherTypes.EntityClassMixin> | SchemaDifferenceConflict<ConflictCode.ConflictingPropertyName, SchemaOtherTypes.Property> | SchemaDifferenceConflict<ConflictCode.ConflictingPropertyKindOfQuantity, SchemaOtherTypes.Property> | SchemaDifferenceConflict<ConflictCode.ConflictingPropertyKindOfQuantityUnit, SchemaOtherTypes.Property> | SchemaDifferenceConflict<ConflictCode.ConflictingFormatUnit, SchemaOtherTypes.FormatUnit> | SchemaDifferenceConflict<ConflictCode.ConflictingFormatUnitPhenomenon, SchemaOtherTypes.FormatUnit> | SchemaDifferenceConflict<ConflictCode.AbstractConstraintMustNarrowBaseConstraints, SchemaOtherTypes.RelationshipConstraint> | SchemaDifferenceConflict<ConflictCode.DerivedConstraintsMustNarrowBaseConstraints, SchemaOtherTypes.RelationshipConstraint> | SchemaDifferenceConflict<ConflictCode.ConstraintClassesDeriveFromAbstractConstraint, SchemaOtherTypes.RelationshipConstraint>;
81
83
  export {};
82
84
  //# sourceMappingURL=SchemaConflicts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaConflicts.d.ts","sourceRoot":"","sources":["../../../src/Differencing/SchemaConflicts.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE5F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,oBAAY,YAAY;IAEtB,mBAAmB,UAAU;IAC7B,yBAAyB,UAAU;IACnC,2BAA2B,UAAU;IAErC,oBAAoB,UAAU;IAC9B,iBAAiB,UAAU;IAC3B,eAAe,UAAU;IACzB,wBAAwB,UAAU;IAElC,0BAA0B,UAAU;IACpC,0BAA0B,UAAU;IAEpC,0BAA0B,WAAW;IACrC,oCAAoC,WAAW;IAE/C,uBAAuB,WAAW;IAClC,iCAAiC,WAAW;IAC5C,qCAAqC,WAAW;IAEhD,2CAA2C,WAAW;IACtD,2CAA2C,WAAW;IACtD,6CAA6C,WAAW;CACzD;AAED;;;;GAIG;AACH,UAAU,wBAAwB,CAAC,KAAK,SAAS,YAAY,EAAE,KAAK,S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,CAAC,GAC7F,wBAAwB,CAAC,YAAY,CAAC,0BAA0B,EAAE,gBAAgB,CAAC,UAAU,CAAC,GAC9F,wBAAwB,CAAC,YAAY,CAAC,0BAA0B,EAAE,cAAc,CAAC,cAAc,CAAC,GAChG,wBAAwB,CAAC,YAAY,CAAC,oCAAoC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,GAC9G,wBAAwB,CAAC,YAAY,CAAC,uBAAuB,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GACzF,wBAAwB,CAAC,YAAY,CAAC,iCAAiC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GACnG,wBAAwB,CAAC,YAAY,CAAC,qCAAqC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,GACvG,wBAAwB,CAAC,YAAY,CAAC,qBAAqB,EAAE,gBAAgB,CAAC,UAAU,CAAC,GACzF,wBAAwB,CAAC,YAAY,CAAC,+BAA+B,EAAE,gBAAgB,CAAC,UAAU,CAAC,GACnG,wBAAwB,CAAC,YAAY,CAAC,2CAA2C,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,GAC3H,wBAAwB,CAAC,YAAY,CAAC,2CAA2C,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,GAC3H,wBAAwB,CAAC,YAAY,CAAC,6CAA6C,EAAE,gBAAgB,CAAC,sBAAsB,CAAC,CAC9H"}
@@ -49,6 +49,8 @@ var ConflictCode;
49
49
  ConflictCode["ConflictingClassModifier"] = "C-103";
50
50
  ConflictCode["ConflictingEnumerationType"] = "C-700";
51
51
  ConflictCode["ConflictingEnumeratorValue"] = "C-701";
52
+ ConflictCode["ConflictingFormatUnit"] = "C-800";
53
+ ConflictCode["ConflictingFormatUnitPhenomenon"] = "C-801";
52
54
  ConflictCode["ConflictingPersistenceUnit"] = "C-1010";
53
55
  ConflictCode["MixinAppliedMustDeriveFromConstraint"] = "C-1100";
54
56
  ConflictCode["ConflictingPropertyName"] = "C-1300";
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaConflicts.js","sourceRoot":"","sources":["../../../src/Differencing/SchemaConflicts.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,IAAY,YAwBX;AAxBD,WAAY,YAAY;IAEtB,6CAA6B,CAAA;IAC7B,mDAAmC,CAAA;IACnC,qDAAqC,CAAA;IAErC,8CAA8B,CAAA;IAC9B,2CAA2B,CAAA;IAC3B,yCAAyB,CAAA;IACzB,kDAAkC,CAAA;IAElC,oDAAoC,CAAA;IACpC,oDAAoC,CAAA;IAEpC,qDAAqC,CAAA;IACrC,+DAA+C,CAAA;IAE/C,kDAAkC,CAAA;IAClC,4DAA4C,CAAA;IAC5C,gEAAgD,CAAA;IAEhD,sEAAsD,CAAA;IACtD,sEAAsD,CAAA;IACtD,wEAAwD,CAAA;AAC1D,CAAC,EAxBW,YAAY,4BAAZ,YAAY,QAwBvB","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 Differencing\r\n */\r\n\r\nimport type { SchemaItemType } from \"@itwin/ecschema-metadata\";\r\nimport type { AnySchemaDifference, SchemaOtherTypes, SchemaType } from \"./SchemaDifference\";\r\n\r\n/**\r\n * The unique conflicts codes for Schema differencing.\r\n *\r\n * To provide meaning to code values, with anticipation\r\n * of future rules for all current EC Types, the following\r\n * value ranges should be used:\r\n *\r\n * - Schema: 000-099\r\n * - Class: 100-199\r\n * - Constant: 200-299\r\n * - CustomAttribute 300-399\r\n * - CustomAttributeClass: 400-499\r\n * - CustomAttributeContainer: 500-599\r\n * - EntityClass: 600-699\r\n * - Enumeration: 700-799\r\n * - Format: 800-899\r\n * - InvertedUnit: 900-999\r\n * - KindOfQuantity: 1000-1099\r\n * - Mixin: 1100-1199\r\n * - Phenomenon: 1200-1299\r\n * - Property: 1300-1399\r\n * - PropertyCategory: 1400-1499\r\n * - RelationshipClass: 1500-1599\r\n * - RelationshipConstraint: 1600-1699\r\n * - StructClass: 1700-1799\r\n * - Unit: 1800-1899\r\n * - UnitSystem: 1900-1999\r\n *\r\n * @alpha\r\n */\r\nexport enum ConflictCode {\r\n\r\n ConflictingItemName = \"C-001\",\r\n ConflictingReferenceAlias = \"C-002\",\r\n ConflictingReferenceVersion = \"C-003\",\r\n\r\n ConflictingBaseClass = \"C-100\",\r\n RemovingBaseClass = \"C-101\",\r\n SealedBaseClass = \"C-102\",\r\n ConflictingClassModifier = \"C-103\",\r\n\r\n ConflictingEnumerationType = \"C-700\",\r\n ConflictingEnumeratorValue = \"C-701\",\r\n\r\n ConflictingPersistenceUnit = \"C-1010\",\r\n MixinAppliedMustDeriveFromConstraint = \"C-1100\",\r\n\r\n ConflictingPropertyName = \"C-1300\",\r\n ConflictingPropertyKindOfQuantity = \"C-1301\",\r\n ConflictingPropertyKindOfQuantityUnit = \"C-1302\",\r\n\r\n AbstractConstraintMustNarrowBaseConstraints = \"C-1500\",\r\n DerivedConstraintsMustNarrowBaseConstraints = \"C-1501\",\r\n ConstraintClassesDeriveFromAbstractConstraint = \"C-1502\",\r\n}\r\n\r\n/**\r\n * Defines the interface for a conflict during Schema Differencing. Conflicts were discovered\r\n * while comparing the changed elements. Conflicts in the whole schema context are not found\r\n * on that level.\r\n */\r\ninterface SchemaDifferenceConflict<TCode extends ConflictCode, TType extends SchemaType, TDifference = Extract<AnySchemaDifference, { schemaType: TType }>> {\r\n /** The associated schema difference instance */\r\n readonly difference: TDifference;\r\n\r\n /** The unique conflicting code. */\r\n readonly code: TCode;\r\n\r\n /** A description of the conflict. */\r\n readonly description: string;\r\n\r\n /** The value in the source schema. */\r\n readonly source: unknown;\r\n\r\n /** The value in the target schema. */\r\n readonly target: unknown;\r\n}\r\n\r\n/** Union type of class types */\r\ntype EcClassTypes = SchemaItemType.CustomAttributeClass | SchemaItemType.EntityClass | SchemaItemType.StructClass | SchemaItemType.Mixin | SchemaItemType.RelationshipClass;\r\n\r\n/**\r\n * Union of all supported schema differencing conflict types.\r\n * @alpha\r\n */\r\nexport type AnySchemaDifferenceConflict =\r\n SchemaDifferenceConflict<ConflictCode.ConflictingItemName, SchemaItemType> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingReferenceAlias, SchemaOtherTypes.SchemaReference> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingReferenceVersion, SchemaOtherTypes.SchemaReference> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingBaseClass, EcClassTypes> |\r\n SchemaDifferenceConflict<ConflictCode.RemovingBaseClass, EcClassTypes> |\r\n SchemaDifferenceConflict<ConflictCode.SealedBaseClass, EcClassTypes> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingClassModifier, EcClassTypes> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingEnumerationType, SchemaItemType.Enumeration> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingEnumeratorValue, SchemaOtherTypes.Enumerator> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingPersistenceUnit, SchemaItemType.KindOfQuantity> |\r\n SchemaDifferenceConflict<ConflictCode.MixinAppliedMustDeriveFromConstraint, SchemaOtherTypes.EntityClassMixin> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingPropertyName, SchemaOtherTypes.Property> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingPropertyKindOfQuantity, SchemaOtherTypes.Property> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingPropertyKindOfQuantityUnit, SchemaOtherTypes.Property> |\r\n SchemaDifferenceConflict<ConflictCode.AbstractConstraintMustNarrowBaseConstraints, SchemaOtherTypes.RelationshipConstraint> |\r\n SchemaDifferenceConflict<ConflictCode.DerivedConstraintsMustNarrowBaseConstraints, SchemaOtherTypes.RelationshipConstraint> |\r\n SchemaDifferenceConflict<ConflictCode.ConstraintClassesDeriveFromAbstractConstraint, SchemaOtherTypes.RelationshipConstraint>\r\n;\r\n"]}
1
+ {"version":3,"file":"SchemaConflicts.js","sourceRoot":"","sources":["../../../src/Differencing/SchemaConflicts.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,IAAY,YA2BX;AA3BD,WAAY,YAAY;IAEtB,6CAA6B,CAAA;IAC7B,mDAAmC,CAAA;IACnC,qDAAqC,CAAA;IAErC,8CAA8B,CAAA;IAC9B,2CAA2B,CAAA;IAC3B,yCAAyB,CAAA;IACzB,kDAAkC,CAAA;IAElC,oDAAoC,CAAA;IACpC,oDAAoC,CAAA;IAEpC,+CAA+B,CAAA;IAC/B,yDAAyC,CAAA;IAEzC,qDAAqC,CAAA;IACrC,+DAA+C,CAAA;IAE/C,kDAAkC,CAAA;IAClC,4DAA4C,CAAA;IAC5C,gEAAgD,CAAA;IAEhD,sEAAsD,CAAA;IACtD,sEAAsD,CAAA;IACtD,wEAAwD,CAAA;AAC1D,CAAC,EA3BW,YAAY,4BAAZ,YAAY,QA2BvB","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 Differencing\r\n */\r\n\r\nimport type { SchemaItemType } from \"@itwin/ecschema-metadata\";\r\nimport type { AnySchemaDifference, SchemaOtherTypes, SchemaType } from \"./SchemaDifference\";\r\n\r\n/**\r\n * The unique conflicts codes for Schema differencing.\r\n *\r\n * To provide meaning to code values, with anticipation\r\n * of future rules for all current EC Types, the following\r\n * value ranges should be used:\r\n *\r\n * - Schema: 000-099\r\n * - Class: 100-199\r\n * - Constant: 200-299\r\n * - CustomAttribute 300-399\r\n * - CustomAttributeClass: 400-499\r\n * - CustomAttributeContainer: 500-599\r\n * - EntityClass: 600-699\r\n * - Enumeration: 700-799\r\n * - Format: 800-899\r\n * - InvertedUnit: 900-999\r\n * - KindOfQuantity: 1000-1099\r\n * - Mixin: 1100-1199\r\n * - Phenomenon: 1200-1299\r\n * - Property: 1300-1399\r\n * - PropertyCategory: 1400-1499\r\n * - RelationshipClass: 1500-1599\r\n * - RelationshipConstraint: 1600-1699\r\n * - StructClass: 1700-1799\r\n * - Unit: 1800-1899\r\n * - UnitSystem: 1900-1999\r\n *\r\n * @alpha\r\n */\r\nexport enum ConflictCode {\r\n\r\n ConflictingItemName = \"C-001\",\r\n ConflictingReferenceAlias = \"C-002\",\r\n ConflictingReferenceVersion = \"C-003\",\r\n\r\n ConflictingBaseClass = \"C-100\",\r\n RemovingBaseClass = \"C-101\",\r\n SealedBaseClass = \"C-102\",\r\n ConflictingClassModifier = \"C-103\",\r\n\r\n ConflictingEnumerationType = \"C-700\",\r\n ConflictingEnumeratorValue = \"C-701\",\r\n\r\n ConflictingFormatUnit = \"C-800\",\r\n ConflictingFormatUnitPhenomenon = \"C-801\",\r\n\r\n ConflictingPersistenceUnit = \"C-1010\",\r\n MixinAppliedMustDeriveFromConstraint = \"C-1100\",\r\n\r\n ConflictingPropertyName = \"C-1300\",\r\n ConflictingPropertyKindOfQuantity = \"C-1301\",\r\n ConflictingPropertyKindOfQuantityUnit = \"C-1302\",\r\n\r\n AbstractConstraintMustNarrowBaseConstraints = \"C-1500\",\r\n DerivedConstraintsMustNarrowBaseConstraints = \"C-1501\",\r\n ConstraintClassesDeriveFromAbstractConstraint = \"C-1502\",\r\n}\r\n\r\n/**\r\n * Defines the interface for a conflict during Schema Differencing. Conflicts were discovered\r\n * while comparing the changed elements. Conflicts in the whole schema context are not found\r\n * on that level.\r\n */\r\ninterface SchemaDifferenceConflict<TCode extends ConflictCode, TType extends SchemaType, TDifference = Extract<AnySchemaDifference, { schemaType: TType }>> {\r\n /** The associated schema difference instance */\r\n readonly difference: TDifference;\r\n\r\n /** The unique conflicting code. */\r\n readonly code: TCode;\r\n\r\n /** A description of the conflict. */\r\n readonly description: string;\r\n\r\n /** The value in the source schema. */\r\n readonly source: unknown;\r\n\r\n /** The value in the target schema. */\r\n readonly target: unknown;\r\n}\r\n\r\n/** Union type of class types */\r\ntype EcClassTypes = SchemaItemType.CustomAttributeClass | SchemaItemType.EntityClass | SchemaItemType.StructClass | SchemaItemType.Mixin | SchemaItemType.RelationshipClass;\r\n\r\n/**\r\n * Union of all supported schema differencing conflict types.\r\n * @alpha\r\n */\r\nexport type AnySchemaDifferenceConflict =\r\n SchemaDifferenceConflict<ConflictCode.ConflictingItemName, SchemaItemType> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingReferenceAlias, SchemaOtherTypes.SchemaReference> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingReferenceVersion, SchemaOtherTypes.SchemaReference> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingBaseClass, EcClassTypes> |\r\n SchemaDifferenceConflict<ConflictCode.RemovingBaseClass, EcClassTypes> |\r\n SchemaDifferenceConflict<ConflictCode.SealedBaseClass, EcClassTypes> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingClassModifier, EcClassTypes> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingEnumerationType, SchemaItemType.Enumeration> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingEnumeratorValue, SchemaOtherTypes.Enumerator> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingPersistenceUnit, SchemaItemType.KindOfQuantity> |\r\n SchemaDifferenceConflict<ConflictCode.MixinAppliedMustDeriveFromConstraint, SchemaOtherTypes.EntityClassMixin> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingPropertyName, SchemaOtherTypes.Property> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingPropertyKindOfQuantity, SchemaOtherTypes.Property> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingPropertyKindOfQuantityUnit, SchemaOtherTypes.Property> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingFormatUnit, SchemaOtherTypes.FormatUnit> |\r\n SchemaDifferenceConflict<ConflictCode.ConflictingFormatUnitPhenomenon, SchemaOtherTypes.FormatUnit> |\r\n SchemaDifferenceConflict<ConflictCode.AbstractConstraintMustNarrowBaseConstraints, SchemaOtherTypes.RelationshipConstraint> |\r\n SchemaDifferenceConflict<ConflictCode.DerivedConstraintsMustNarrowBaseConstraints, SchemaOtherTypes.RelationshipConstraint> |\r\n SchemaDifferenceConflict<ConflictCode.ConstraintClassesDeriveFromAbstractConstraint, SchemaOtherTypes.RelationshipConstraint>\r\n;\r\n"]}
@@ -2,7 +2,7 @@
2
2
  * @module Differencing
3
3
  */
4
4
  import type { AnyDiagnostic } from "../Validation/Diagnostic";
5
- import { type AnySchemaItemDifference, type AnySchemaItemPathDifference, type CustomAttributeDifference, type EntityClassMixinDifference, type KindOfQuantityPresentationFormatDifference, type SchemaDifference, type SchemaReferenceDifference } from "./SchemaDifference";
5
+ import { type AnySchemaItemDifference, type AnySchemaItemPathDifference, type CustomAttributeDifference, type EntityClassMixinDifference, type FormatUnitDifference, type KindOfQuantityPresentationFormatDifference, type SchemaDifference, type SchemaReferenceDifference } from "./SchemaDifference";
6
6
  /**
7
7
  * The SchemaDiagnosticVisitor is a visitor implementation for diagnostic entries
8
8
  * from the schema comparer api. Depending on the diagnostic code, the difference
@@ -11,7 +11,7 @@ import { type AnySchemaItemDifference, type AnySchemaItemPathDifference, type Cu
11
11
  */
12
12
  export declare class SchemaDiagnosticVisitor {
13
13
  readonly schemaDifferences: Array<SchemaDifference | SchemaReferenceDifference>;
14
- readonly schemaItemDifferences: Array<AnySchemaItemDifference | EntityClassMixinDifference | KindOfQuantityPresentationFormatDifference>;
14
+ readonly schemaItemDifferences: Array<AnySchemaItemDifference | EntityClassMixinDifference | KindOfQuantityPresentationFormatDifference | FormatUnitDifference>;
15
15
  readonly schemaItemPathDifferences: Array<AnySchemaItemPathDifference>;
16
16
  readonly customAttributeDifferences: Array<CustomAttributeDifference>;
17
17
  constructor();
@@ -23,7 +23,6 @@ export declare class SchemaDiagnosticVisitor {
23
23
  private visitChangedSchemaProperties;
24
24
  private visitMissingSchemaItem;
25
25
  private visitChangedSchemaItem;
26
- private visitChangedEnumeration;
27
26
  private visitMissingEnumerator;
28
27
  private lookupEnumeratorEntry;
29
28
  private visitChangedEnumerator;
@@ -36,5 +35,7 @@ export declare class SchemaDiagnosticVisitor {
36
35
  private visitSchemaReference;
37
36
  private visitMissingCustomAttributeInstance;
38
37
  private visitMissingPresentationUnit;
38
+ private visitMissingFormatUnit;
39
+ private visitChangedFormatUnitLabel;
39
40
  }
40
41
  //# sourceMappingURL=SchemaDiagnosticVisitor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaDiagnosticVisitor.d.ts","sourceRoot":"","sources":["../../../src/Differencing/SchemaDiagnosticVisitor.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAO9D,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,2BAA2B,EAEhC,KAAK,yBAAyB,EAE9B,KAAK,0BAA0B,EAE/B,KAAK,0CAA0C,EAG/C,KAAK,gBAAgB,EAErB,KAAK,yBAAyB,EAC/B,MAAM,oBAAoB,CAAC;AAE5B;;;;;GAKG;AACH,qBAAa,uBAAuB;IAElC,SAAgB,iBAAiB,EAAE,KAAK,CAAC,gBAAgB,GAAG,yBAAyB,CAAC,CAAC;IACvF,SAAgB,qBAAqB,EAAE,KAAK,CAAC,uBAAuB,GAAG,0BAA0B,GAAG,0CAA0C,CAAC,CAAC;IAChJ,SAAgB,yBAAyB,EAAE,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAC9E,SAAgB,0BAA0B,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;;IAS7E;;;OAGG;IACI,KAAK,CAAC,UAAU,EAAE,aAAa;IA+DtC,OAAO,CAAC,4BAA4B;IAiCpC,OAAO,CAAC,sBAAsB;IA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,sBAAsB;IAW9B,OAAO,CAAC,sBAAsB;IAkC9B,OAAO,CAAC,sBAAsB;IAY9B,OAAO,CAAC,qBAAqB;IAU7B,OAAO,CAAC,sBAAsB;IA2B9B,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,oBAAoB;IA4B5B,OAAO,CAAC,qBAAqB;IAqB7B,OAAO,CAAC,wBAAwB;IAoBhC,OAAO,CAAC,uCAAuC;IAwB/C,OAAO,CAAC,kCAAkC;IAsC1C,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,mCAAmC;IA8C3C,OAAO,CAAC,4BAA4B;IAqBpC,OAAO,CAAC,sBAAsB;IAkC9B,OAAO,CAAC,2BAA2B;CAmBpC"}
@@ -18,6 +18,10 @@ const SchemaDifference_1 = require("./SchemaDifference");
18
18
  * @internal
19
19
  */
20
20
  class SchemaDiagnosticVisitor {
21
+ schemaDifferences;
22
+ schemaItemDifferences;
23
+ schemaItemPathDifferences;
24
+ customAttributeDifferences;
21
25
  constructor() {
22
26
  this.schemaDifferences = [];
23
27
  this.schemaItemDifferences = [];
@@ -50,9 +54,8 @@ class SchemaDiagnosticVisitor {
50
54
  case SchemaCompareDiagnostics_1.SchemaCompareCodes.PropertyCategoryDelta:
51
55
  case SchemaCompareDiagnostics_1.SchemaCompareCodes.RelationshipDelta:
52
56
  case SchemaCompareDiagnostics_1.SchemaCompareCodes.UnitDelta:
53
- return this.visitChangedSchemaItem(diagnostic);
54
57
  case SchemaCompareDiagnostics_1.SchemaCompareCodes.EnumerationDelta:
55
- return this.visitChangedEnumeration(diagnostic);
58
+ return this.visitChangedSchemaItem(diagnostic);
56
59
  case SchemaCompareDiagnostics_1.SchemaCompareCodes.EnumeratorDelta:
57
60
  return this.visitChangedEnumerator(diagnostic);
58
61
  case SchemaCompareDiagnostics_1.SchemaCompareCodes.EnumeratorMissing:
@@ -73,10 +76,10 @@ class SchemaDiagnosticVisitor {
73
76
  return this.visitMissingCustomAttributeInstance(diagnostic);
74
77
  case SchemaCompareDiagnostics_1.SchemaCompareCodes.PresentationUnitMissing:
75
78
  return this.visitMissingPresentationUnit(diagnostic);
76
- // Currently not handled...
77
79
  case SchemaCompareDiagnostics_1.SchemaCompareCodes.FormatUnitMissing:
80
+ return this.visitMissingFormatUnit(diagnostic);
78
81
  case SchemaCompareDiagnostics_1.SchemaCompareCodes.UnitLabelOverrideDelta:
79
- break;
82
+ return this.visitChangedFormatUnitLabel(diagnostic);
80
83
  }
81
84
  return;
82
85
  }
@@ -147,13 +150,6 @@ class SchemaDiagnosticVisitor {
147
150
  // needs to be handled better in future.
148
151
  modifyEntry.difference[propertyName] = sourceValue;
149
152
  }
150
- visitChangedEnumeration(diagnostic) {
151
- const enumeration = diagnostic.ecDefinition;
152
- if (this.schemaItemPathDifferences.find((entry) => entry.changeType === "add" && entry.itemName === enumeration.name)) {
153
- return;
154
- }
155
- return this.visitChangedSchemaItem(diagnostic);
156
- }
157
153
  visitMissingEnumerator(diagnostic) {
158
154
  const enumeration = diagnostic.ecDefinition;
159
155
  const [enumerator] = diagnostic.messageArgs;
@@ -389,8 +385,58 @@ class SchemaDiagnosticVisitor {
389
385
  }
390
386
  addEntry.difference.push(presentationFormat.fullName);
391
387
  }
388
+ visitMissingFormatUnit(diagnostic) {
389
+ const format = diagnostic.ecDefinition;
390
+ for (let index = this.schemaItemPathDifferences.length - 1; index >= 0; index--) {
391
+ const entry = this.schemaItemPathDifferences[index];
392
+ if (entry.changeType === "modify" && entry.schemaType === SchemaDifference_1.SchemaOtherTypes.FormatUnitLabel && entry.itemName === format.name) {
393
+ this.schemaItemPathDifferences.splice(index, 1);
394
+ }
395
+ }
396
+ let modifyEntry = this.schemaItemDifferences.find((entry) => {
397
+ return entry.changeType === "modify" && entry.schemaType === SchemaDifference_1.SchemaOtherTypes.FormatUnit
398
+ && entry.itemName === format.name;
399
+ });
400
+ if (modifyEntry === undefined && format.units) {
401
+ modifyEntry = {
402
+ changeType: "modify",
403
+ schemaType: SchemaDifference_1.SchemaOtherTypes.FormatUnit,
404
+ itemName: format.name,
405
+ difference: [],
406
+ };
407
+ for (const [unit, label] of format.units) {
408
+ modifyEntry.difference.push({
409
+ name: unit.fullName,
410
+ label,
411
+ });
412
+ }
413
+ ;
414
+ this.schemaItemDifferences.push(modifyEntry);
415
+ }
416
+ }
417
+ visitChangedFormatUnitLabel(diagnostic) {
418
+ const format = diagnostic.ecDefinition;
419
+ if (this.schemaItemDifferences.find((entry) => {
420
+ return entry.changeType === "modify"
421
+ && entry.schemaType === SchemaDifference_1.SchemaOtherTypes.FormatUnit && entry.itemName === format.name;
422
+ })) {
423
+ return;
424
+ }
425
+ const [unit, label] = diagnostic.messageArgs;
426
+ this.schemaItemPathDifferences.push({
427
+ changeType: "modify",
428
+ schemaType: SchemaDifference_1.SchemaOtherTypes.FormatUnitLabel,
429
+ itemName: format.name,
430
+ path: unit.fullName,
431
+ difference: {
432
+ label,
433
+ },
434
+ });
435
+ }
436
+ ;
392
437
  }
393
438
  exports.SchemaDiagnosticVisitor = SchemaDiagnosticVisitor;
439
+ ;
394
440
  function isPropertyTypeName(property, propertyName) {
395
441
  return (propertyName === "type") ||
396
442
  (property.isEnumeration() && propertyName === "enumeration") ||
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaDiagnosticVisitor.js","sourceRoot":"","sources":["../../../src/Differencing/SchemaDiagnosticVisitor.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,qFAA4E;AAC5E,gEAIkC;AAClC,yDAe4B;AAE5B;;;;;GAKG;AACH,MAAa,uBAAuB;IAOlC;QACE,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC;QAC5B,IAAI,CAAC,qBAAqB,GAAG,EAAE,CAAC;QAChC,IAAI,CAAC,yBAAyB,GAAG,EAAE,CAAC;QACpC,IAAI,CAAC,0BAA0B,GAAG,EAAE,CAAC;IACvC,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,UAAyB;QACpC,QAAQ,UAAU,CA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DAqbC;AAED,SAAS,kBAAkB,CAAC,QAAkB,EAAE,YAAoB;IAClE,OAAO,CAAC,YAAY,KAAK,MAAM,CAAC;QAC9B,CAAC,QAAQ,CAAC,aAAa,EAAE,IAAI,YAAY,KAAK,aAAa,CAAC;QAC5D,CAAC,QAAQ,CAAC,WAAW,EAAE,IAAI,YAAY,KAAK,eAAe,CAAC;QAC5D,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,YAAY,KAAK,aAAa,CAAC;QACvD,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,YAAY,KAAK,mBAAmB,CAAC,CAAC;AACtE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Differencing\r\n */\r\n\r\nimport type { AnyDiagnostic } from \"../Validation/Diagnostic\";\r\nimport { SchemaCompareCodes } from \"../Validation/SchemaCompareDiagnostics\";\r\nimport {\r\n AnyEnumerator, AnyPropertyProps, AnySchemaItem, CustomAttribute, ECClass,\r\n Enumeration, Format, KindOfQuantity, Mixin, OverrideFormat, Property, PropertyProps,\r\n RelationshipConstraint, RelationshipConstraintProps, Schema, SchemaItem,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport {\r\n type AnyClassItemDifference,\r\n type AnySchemaItemDifference,\r\n type AnySchemaItemPathDifference,\r\n type ClassPropertyDifference,\r\n type CustomAttributeDifference,\r\n type DifferenceType,\r\n type EntityClassMixinDifference,\r\n type EnumeratorDifference,\r\n type KindOfQuantityPresentationFormatDifference,\r\n type RelationshipConstraintClassDifference,\r\n type RelationshipConstraintDifference,\r\n type SchemaDifference,\r\n SchemaOtherTypes,\r\n type SchemaReferenceDifference,\r\n} from \"./SchemaDifference\";\r\n\r\n/**\r\n * The SchemaDiagnosticVisitor is a visitor implementation for diagnostic entries\r\n * from the schema comparer api. Depending on the diagnostic code, the difference\r\n * result is build together.\r\n * @internal\r\n */\r\nexport class SchemaDiagnosticVisitor {\r\n\r\n public readonly schemaDifferences: Array<SchemaDifference | SchemaReferenceDifference>;\r\n public readonly schemaItemDifferences: Array<AnySchemaItemDifference | EntityClassMixinDifference | KindOfQuantityPresentationFormatDifference>;\r\n public readonly schemaItemPathDifferences: Array<AnySchemaItemPathDifference>;\r\n public readonly customAttributeDifferences: Array<CustomAttributeDifference>;\r\n\r\n constructor() {\r\n this.schemaDifferences = [];\r\n this.schemaItemDifferences = [];\r\n this.schemaItemPathDifferences = [];\r\n this.customAttributeDifferences = [];\r\n }\r\n\r\n /**\r\n * Visitor function to process the schema change diagnostic object.\r\n * @internal\r\n */\r\n public visit(diagnostic: AnyDiagnostic) {\r\n switch (diagnostic.code) {\r\n case SchemaCompareCodes.SchemaDelta:\r\n return this.visitChangedSchemaProperties(diagnostic);\r\n\r\n case SchemaCompareCodes.SchemaReferenceMissing:\r\n return this.visitSchemaReference(diagnostic, \"add\");\r\n case SchemaCompareCodes.SchemaReferenceDelta:\r\n return this.visitSchemaReference(diagnostic, \"modify\");\r\n\r\n case SchemaCompareCodes.SchemaItemMissing:\r\n return this.visitMissingSchemaItem(diagnostic);\r\n\r\n case SchemaCompareCodes.SchemaItemDelta:\r\n case SchemaCompareCodes.ClassDelta:\r\n case SchemaCompareCodes.ConstantDelta:\r\n case SchemaCompareCodes.CustomAttributeClassDelta:\r\n case SchemaCompareCodes.FormatDelta:\r\n case SchemaCompareCodes.InvertedUnitDelta:\r\n case SchemaCompareCodes.KoqDelta:\r\n case SchemaCompareCodes.MixinDelta:\r\n case SchemaCompareCodes.PhenomenonDelta:\r\n case SchemaCompareCodes.PropertyCategoryDelta:\r\n case SchemaCompareCodes.RelationshipDelta:\r\n case SchemaCompareCodes.UnitDelta:\r\n return this.visitChangedSchemaItem(diagnostic);\r\n\r\n case SchemaCompareCodes.EnumerationDelta:\r\n return this.visitChangedEnumeration(diagnostic);\r\n\r\n case SchemaCompareCodes.EnumeratorDelta:\r\n return this.visitChangedEnumerator(diagnostic);\r\n case SchemaCompareCodes.EnumeratorMissing:\r\n return this.visitMissingEnumerator(diagnostic);\r\n\r\n case SchemaCompareCodes.BaseClassDelta:\r\n return this.visitMissingBaseClass(diagnostic);\r\n case SchemaCompareCodes.EntityMixinMissing:\r\n return this.visitMissingMixinOnClass(diagnostic);\r\n case SchemaCompareCodes.PropertyDelta:\r\n return this.visitChangedProperty(diagnostic);\r\n case SchemaCompareCodes.PropertyMissing:\r\n return this.visitMissingProperty(diagnostic);\r\n\r\n case SchemaCompareCodes.RelationshipConstraintClassMissing:\r\n return this.visitMissingRelationshipConstraintClass(diagnostic);\r\n case SchemaCompareCodes.RelationshipConstraintDelta:\r\n return this.visitChangedRelationshipConstraint(diagnostic);\r\n\r\n case SchemaCompareCodes.CustomAttributeInstanceClassMissing:\r\n return this.visitMissingCustomAttributeInstance(diagnostic);\r\n\r\n case SchemaCompareCodes.PresentationUnitMissing:\r\n return this.visitMissingPresentationUnit(diagnostic);\r\n\r\n // Currently not handled...\r\n case SchemaCompareCodes.FormatUnitMissing:\r\n case SchemaCompareCodes.UnitLabelOverrideDelta:\r\n break;\r\n }\r\n return;\r\n }\r\n\r\n private visitChangedSchemaProperties(diagnostic: AnyDiagnostic) {\r\n let modifyEntry = this.schemaDifferences.find((entry): entry is SchemaDifference => {\r\n return entry.changeType === \"modify\" && entry.schemaType === SchemaOtherTypes.Schema;\r\n });\r\n\r\n let hasChanges = false;\r\n let addEntry = false;\r\n if (modifyEntry === undefined) {\r\n addEntry = true;\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: SchemaOtherTypes.Schema,\r\n difference: {},\r\n };\r\n }\r\n\r\n // Only label and description are taken from the source schema. If the schema name or alias\r\n // differs, those are ignored for now.\r\n const [propertyName, propertyValue] = diagnostic.messageArgs as [string, any];\r\n if (propertyName === \"label\") {\r\n modifyEntry.difference.label = propertyValue;\r\n hasChanges = true;\r\n }\r\n if (propertyName === \"description\") {\r\n modifyEntry.difference.description = propertyValue;\r\n hasChanges = true;\r\n }\r\n\r\n if (addEntry && hasChanges) {\r\n this.schemaDifferences.push(modifyEntry);\r\n }\r\n }\r\n\r\n private visitMissingSchemaItem(diagnostic: AnyDiagnostic) {\r\n const schemaItem = diagnostic.ecDefinition as AnySchemaItem;\r\n\r\n this.schemaItemDifferences.push({\r\n changeType: \"add\",\r\n schemaType: schemaItem.schemaItemType,\r\n itemName: schemaItem.name,\r\n difference: schemaItem.toJSON(),\r\n });\r\n }\r\n\r\n private visitChangedSchemaItem(diagnostic: AnyDiagnostic) {\r\n const schemaItem = diagnostic.ecDefinition as AnySchemaItem;\r\n const [propertyName, sourceValue, _targetValue] = diagnostic.messageArgs as [string, unknown, unknown];\r\n if (propertyName === \"schemaItemType\") {\r\n // If the schema item type is different, the whole item is added as \"new\" item. The\r\n // difference validator will then figure whether there is a conflict with items of\r\n // of the same name.\r\n return this.visitMissingSchemaItem(diagnostic);\r\n }\r\n\r\n if (sourceValue === undefined) {\r\n return;\r\n }\r\n\r\n let modifyEntry = this.schemaItemDifferences.find((entry): entry is AnySchemaItemDifference => {\r\n return entry.changeType === \"modify\" && entry.itemName === schemaItem.name;\r\n });\r\n\r\n if (modifyEntry === undefined) {\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: schemaItem.schemaItemType,\r\n itemName: schemaItem.name,\r\n difference: {},\r\n } as AnySchemaItemDifference;\r\n this.schemaItemDifferences.push(modifyEntry);\r\n }\r\n\r\n // TODO: Since propertyName is type of string, the compiler complains about accepting\r\n // an unspecific string as property indexer. Casted to any as short term fix but that\r\n // needs to be handled better in future.\r\n (modifyEntry.difference as any)[propertyName] = sourceValue;\r\n }\r\n\r\n private visitChangedEnumeration(diagnostic: AnyDiagnostic) {\r\n const enumeration = diagnostic.ecDefinition as Enumeration;\r\n if (this.schemaItemPathDifferences.find((entry) => entry.changeType === \"add\" && entry.itemName === enumeration.name)) {\r\n return;\r\n }\r\n\r\n return this.visitChangedSchemaItem(diagnostic);\r\n }\r\n\r\n private visitMissingEnumerator(diagnostic: AnyDiagnostic) {\r\n const enumeration = diagnostic.ecDefinition as Enumeration;\r\n const [enumerator] = diagnostic.messageArgs as [AnyEnumerator];\r\n this.schemaItemPathDifferences.push({\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.Enumerator,\r\n itemName: enumeration.name,\r\n path: \"$enumerators\",\r\n difference: enumerator,\r\n });\r\n }\r\n\r\n private lookupEnumeratorEntry(changeType: DifferenceType, item: string, enumeratorName: string) {\r\n return this.schemaItemPathDifferences.find((change) => {\r\n return change.changeType === changeType\r\n && change.schemaType === SchemaOtherTypes.Enumerator\r\n && change.itemName === item\r\n && change.path === \"$enumerators\"\r\n && change.difference.name === enumeratorName;\r\n });\r\n }\r\n\r\n private visitChangedEnumerator(diagnostic: AnyDiagnostic) {\r\n const enumeration = diagnostic.ecDefinition as Enumeration;\r\n const [enumerator, propertyName, sourceValue] = diagnostic.messageArgs as [AnyEnumerator, keyof AnyEnumerator, any];\r\n if (this.lookupEnumeratorEntry(\"add\", enumeration.name, enumerator.name)) {\r\n return;\r\n }\r\n\r\n let modifyEntry = this.schemaItemPathDifferences.find((entry): entry is EnumeratorDifference => {\r\n return entry.changeType === \"modify\" && entry.schemaType === SchemaOtherTypes.Enumerator && entry.itemName === enumeration.name && entry.path === enumerator.name;\r\n });\r\n\r\n if (modifyEntry === undefined) {\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: SchemaOtherTypes.Enumerator,\r\n itemName: enumeration.name,\r\n path: enumerator.name,\r\n difference: {},\r\n };\r\n this.schemaItemPathDifferences.push(modifyEntry);\r\n }\r\n\r\n if (sourceValue !== undefined) {\r\n modifyEntry.difference[propertyName] = sourceValue;\r\n }\r\n }\r\n\r\n private visitMissingProperty(diagnostic: AnyDiagnostic) {\r\n const property = diagnostic.ecDefinition as Property;\r\n this.schemaItemPathDifferences.push({\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.Property,\r\n itemName: property.class.name,\r\n path: property.name,\r\n difference: property.toJSON() as AnyPropertyProps,\r\n });\r\n }\r\n\r\n private visitChangedProperty(diagnostic: AnyDiagnostic) {\r\n const property = diagnostic.ecDefinition as Property;\r\n const [propertyName, sourceValue] = diagnostic.messageArgs as [keyof PropertyProps, any, any];\r\n\r\n if (isPropertyTypeName(property, propertyName)) {\r\n return this.visitMissingProperty(diagnostic);\r\n }\r\n\r\n let modifyEntry = this.schemaItemPathDifferences.find((entry): entry is ClassPropertyDifference => {\r\n return entry.changeType === \"modify\" && entry.schemaType === SchemaOtherTypes.Property && entry.itemName === property.class.name && entry.path === property.name;\r\n });\r\n\r\n if (modifyEntry === undefined) {\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: SchemaOtherTypes.Property,\r\n itemName: property.class.name,\r\n path: property.name,\r\n difference: {},\r\n };\r\n this.schemaItemPathDifferences.push(modifyEntry);\r\n }\r\n\r\n if (propertyName !== \"name\") {\r\n modifyEntry.difference[propertyName] = sourceValue;\r\n }\r\n }\r\n\r\n private visitMissingBaseClass(diagnostic: AnyDiagnostic) {\r\n const ecClass = diagnostic.ecDefinition as ECClass;\r\n const [sourceBaseClass] = diagnostic.messageArgs as [ECClass, ECClass];\r\n\r\n let modifyEntry = this.schemaItemDifferences.find((entry): entry is AnyClassItemDifference => {\r\n return entry.changeType === \"modify\" && entry.schemaType === ecClass.schemaItemType && entry.itemName === ecClass.name;\r\n });\r\n\r\n if (modifyEntry === undefined) {\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: ecClass.schemaItemType,\r\n itemName: ecClass.name,\r\n difference: {},\r\n } as AnyClassItemDifference;\r\n this.schemaItemDifferences.push(modifyEntry);\r\n }\r\n\r\n modifyEntry.difference.baseClass = sourceBaseClass !== undefined ? sourceBaseClass.fullName : undefined;\r\n }\r\n\r\n private visitMissingMixinOnClass(diagnostic: AnyDiagnostic) {\r\n const ecClass = diagnostic.ecDefinition as ECClass;\r\n const [mixin] = diagnostic.messageArgs as [Mixin];\r\n\r\n let addEntry = this.schemaItemDifferences.find((entry): entry is EntityClassMixinDifference => {\r\n return entry.changeType === \"add\" && entry.schemaType === SchemaOtherTypes.EntityClassMixin && entry.itemName === ecClass.name;\r\n });\r\n\r\n if (addEntry === undefined) {\r\n addEntry = {\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.EntityClassMixin,\r\n itemName: ecClass.name,\r\n difference: [],\r\n };\r\n this.schemaItemDifferences.push(addEntry);\r\n }\r\n addEntry.difference.push(mixin.fullName);\r\n }\r\n\r\n private visitMissingRelationshipConstraintClass(diagnostic: AnyDiagnostic) {\r\n const constraint = diagnostic.ecDefinition as RelationshipConstraint;\r\n const className = constraint.relationshipClass.name;\r\n const constraintPath = constraint.isSource ? \"$source\" : \"$target\";\r\n\r\n let addEntry = this.schemaItemPathDifferences.find((entry): entry is RelationshipConstraintClassDifference => {\r\n return entry.changeType === \"add\" && entry.schemaType === SchemaOtherTypes.RelationshipConstraintClass, entry.itemName === className && entry.path === constraintPath;\r\n });\r\n\r\n if (!addEntry) {\r\n addEntry = {\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.RelationshipConstraintClass,\r\n itemName: className,\r\n path: constraintPath,\r\n difference: [],\r\n };\r\n this.schemaItemPathDifferences.push(addEntry);\r\n }\r\n\r\n const [constraintClass] = diagnostic.messageArgs as [ECClass];\r\n addEntry.difference.push(constraintClass.fullName);\r\n }\r\n\r\n private visitChangedRelationshipConstraint(diagnostic: AnyDiagnostic) {\r\n const constraint = diagnostic.ecDefinition as RelationshipConstraint;\r\n const className = constraint.relationshipClass.name;\r\n const constraintPath = constraint.isSource ? \"$source\" : \"$target\";\r\n if (this.schemaItemDifferences.find((entry) => entry.changeType === \"add\" && entry.itemName === className)) {\r\n return;\r\n }\r\n\r\n let modifyEntry = this.schemaItemPathDifferences.find((entry): entry is RelationshipConstraintDifference => {\r\n return entry.changeType === \"modify\" && entry.schemaType === SchemaOtherTypes.RelationshipConstraint && entry.itemName === className && entry.path === constraintPath;\r\n });\r\n\r\n if (modifyEntry === undefined) {\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: SchemaOtherTypes.RelationshipConstraint,\r\n itemName: className,\r\n path: constraintPath,\r\n difference: {},\r\n };\r\n this.schemaItemPathDifferences.push(modifyEntry);\r\n }\r\n\r\n const [propertyName, propertyValue] = diagnostic.messageArgs as [keyof RelationshipConstraintProps, any];\r\n if (propertyName === \"abstractConstraint\" && propertyValue !== undefined) {\r\n modifyEntry.difference.abstractConstraint = propertyValue;\r\n }\r\n if (propertyName === \"multiplicity\" && propertyValue !== undefined) {\r\n modifyEntry.difference.multiplicity = propertyValue;\r\n }\r\n if (propertyName === \"polymorphic\" && propertyValue !== undefined) {\r\n modifyEntry.difference.polymorphic = propertyValue;\r\n }\r\n if (propertyName === \"roleLabel\" && propertyValue !== undefined) {\r\n modifyEntry.difference.roleLabel = propertyValue;\r\n }\r\n }\r\n\r\n private visitSchemaReference(diagnostic: AnyDiagnostic, changeType: DifferenceType) {\r\n const [referencedSchema] = diagnostic.messageArgs as [Schema];\r\n this.schemaDifferences.push({\r\n changeType,\r\n schemaType: SchemaOtherTypes.SchemaReference,\r\n difference: {\r\n name: referencedSchema.name,\r\n version: referencedSchema.schemaKey.version.toString(),\r\n },\r\n });\r\n }\r\n\r\n private visitMissingCustomAttributeInstance(diagnostic: AnyDiagnostic) {\r\n const [customAttribute] = diagnostic.messageArgs as [CustomAttribute];\r\n const ecType = diagnostic.ecDefinition;\r\n if (Schema.isSchema(ecType)) {\r\n return this.customAttributeDifferences.push({\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.CustomAttributeInstance,\r\n appliedTo: \"Schema\",\r\n difference: customAttribute,\r\n });\r\n }\r\n\r\n if (SchemaItem.isSchemaItem(ecType)) {\r\n return this.customAttributeDifferences.push({\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.CustomAttributeInstance,\r\n appliedTo: \"SchemaItem\",\r\n itemName: ecType.name,\r\n difference: customAttribute,\r\n });\r\n }\r\n\r\n if (Property.isProperty(ecType)) {\r\n return this.customAttributeDifferences.push({\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.CustomAttributeInstance,\r\n appliedTo: \"Property\",\r\n itemName: ecType.class.name,\r\n path: ecType.name,\r\n difference: customAttribute,\r\n });\r\n }\r\n\r\n if (RelationshipConstraint.isRelationshipConstraint(ecType)) {\r\n return this.customAttributeDifferences.push({\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.CustomAttributeInstance,\r\n appliedTo: \"RelationshipConstraint\",\r\n itemName: ecType.relationshipClass.name,\r\n path: ecType.isSource ? \"$source\" : \"$target\",\r\n difference: customAttribute,\r\n });\r\n }\r\n return;\r\n }\r\n\r\n private visitMissingPresentationUnit(diagnostic: AnyDiagnostic) {\r\n const koq = diagnostic.ecDefinition as KindOfQuantity;\r\n const [presentationFormat] = diagnostic.messageArgs as [Format | OverrideFormat];\r\n\r\n let addEntry = this.schemaItemDifferences.find((entry): entry is KindOfQuantityPresentationFormatDifference => {\r\n return entry.changeType === \"add\" && entry.schemaType === SchemaOtherTypes.KindOfQuantityPresentationFormat\r\n && entry.itemName === koq.name;\r\n });\r\n\r\n if (addEntry === undefined) {\r\n addEntry = {\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.KindOfQuantityPresentationFormat,\r\n itemName: koq.name,\r\n difference: [],\r\n };\r\n this.schemaItemDifferences.push(addEntry);\r\n }\r\n addEntry.difference.push(presentationFormat.fullName);\r\n }\r\n}\r\n\r\nfunction isPropertyTypeName(property: Property, propertyName: string) {\r\n return (propertyName === \"type\") ||\r\n (property.isEnumeration() && propertyName === \"enumeration\") ||\r\n (property.isPrimitive() && propertyName === \"primitiveType\") ||\r\n (property.isStruct() && propertyName === \"structClass\") ||\r\n (property.isNavigation() && propertyName === \"relationshipClass\");\r\n}\r\n"]}
1
+ {"version":3,"file":"SchemaDiagnosticVisitor.js","sour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C;QAC5D,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,YAAY,KAAK,aAAa,CAAC;QACvD,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,YAAY,KAAK,mBAAmB,CAAC,CAAC;AACtE,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Differencing\r\n */\r\n\r\nimport type { AnyDiagnostic } from \"../Validation/Diagnostic\";\r\nimport { SchemaCompareCodes } from \"../Validation/SchemaCompareDiagnostics\";\r\nimport {\r\n AnyEnumerator, AnyPropertyProps, AnySchemaItem, CustomAttribute, ECClass,\r\n Enumeration, Format, InvertedUnit, KindOfQuantity, Mixin, OverrideFormat, Property, PropertyProps,\r\n RelationshipConstraint, RelationshipConstraintProps, Schema, SchemaItem, Unit,\r\n} from \"@itwin/ecschema-metadata\";\r\nimport {\r\n type AnyClassItemDifference,\r\n type AnySchemaItemDifference,\r\n type AnySchemaItemPathDifference,\r\n type ClassPropertyDifference,\r\n type CustomAttributeDifference,\r\n type DifferenceType,\r\n type EntityClassMixinDifference,\r\n type EnumeratorDifference,\r\n type FormatUnitDifference,\r\n type KindOfQuantityPresentationFormatDifference,\r\n type RelationshipConstraintClassDifference,\r\n type RelationshipConstraintDifference,\r\n type SchemaDifference,\r\n SchemaOtherTypes,\r\n type SchemaReferenceDifference,\r\n} from \"./SchemaDifference\";\r\n\r\n/**\r\n * The SchemaDiagnosticVisitor is a visitor implementation for diagnostic entries\r\n * from the schema comparer api. Depending on the diagnostic code, the difference\r\n * result is build together.\r\n * @internal\r\n */\r\nexport class SchemaDiagnosticVisitor {\r\n\r\n public readonly schemaDifferences: Array<SchemaDifference | SchemaReferenceDifference>;\r\n public readonly schemaItemDifferences: Array<AnySchemaItemDifference\r\n | EntityClassMixinDifference\r\n | KindOfQuantityPresentationFormatDifference\r\n | FormatUnitDifference>;\r\n public readonly schemaItemPathDifferences: Array<AnySchemaItemPathDifference>;\r\n public readonly customAttributeDifferences: Array<CustomAttributeDifference>;\r\n\r\n constructor() {\r\n this.schemaDifferences = [];\r\n this.schemaItemDifferences = [];\r\n this.schemaItemPathDifferences = [];\r\n this.customAttributeDifferences = [];\r\n }\r\n\r\n /**\r\n * Visitor function to process the schema change diagnostic object.\r\n * @internal\r\n */\r\n public visit(diagnostic: AnyDiagnostic) {\r\n switch (diagnostic.code) {\r\n case SchemaCompareCodes.SchemaDelta:\r\n return this.visitChangedSchemaProperties(diagnostic);\r\n\r\n case SchemaCompareCodes.SchemaReferenceMissing:\r\n return this.visitSchemaReference(diagnostic, \"add\");\r\n case SchemaCompareCodes.SchemaReferenceDelta:\r\n return this.visitSchemaReference(diagnostic, \"modify\");\r\n\r\n case SchemaCompareCodes.SchemaItemMissing:\r\n return this.visitMissingSchemaItem(diagnostic);\r\n\r\n case SchemaCompareCodes.SchemaItemDelta:\r\n case SchemaCompareCodes.ClassDelta:\r\n case SchemaCompareCodes.ConstantDelta:\r\n case SchemaCompareCodes.CustomAttributeClassDelta:\r\n case SchemaCompareCodes.FormatDelta:\r\n case SchemaCompareCodes.InvertedUnitDelta:\r\n case SchemaCompareCodes.KoqDelta:\r\n case SchemaCompareCodes.MixinDelta:\r\n case SchemaCompareCodes.PhenomenonDelta:\r\n case SchemaCompareCodes.PropertyCategoryDelta:\r\n case SchemaCompareCodes.RelationshipDelta:\r\n case SchemaCompareCodes.UnitDelta:\r\n case SchemaCompareCodes.EnumerationDelta:\r\n return this.visitChangedSchemaItem(diagnostic);\r\n\r\n case SchemaCompareCodes.EnumeratorDelta:\r\n return this.visitChangedEnumerator(diagnostic);\r\n case SchemaCompareCodes.EnumeratorMissing:\r\n return this.visitMissingEnumerator(diagnostic);\r\n\r\n case SchemaCompareCodes.BaseClassDelta:\r\n return this.visitMissingBaseClass(diagnostic);\r\n case SchemaCompareCodes.EntityMixinMissing:\r\n return this.visitMissingMixinOnClass(diagnostic);\r\n case SchemaCompareCodes.PropertyDelta:\r\n return this.visitChangedProperty(diagnostic);\r\n case SchemaCompareCodes.PropertyMissing:\r\n return this.visitMissingProperty(diagnostic);\r\n\r\n case SchemaCompareCodes.RelationshipConstraintClassMissing:\r\n return this.visitMissingRelationshipConstraintClass(diagnostic);\r\n case SchemaCompareCodes.RelationshipConstraintDelta:\r\n return this.visitChangedRelationshipConstraint(diagnostic);\r\n\r\n case SchemaCompareCodes.CustomAttributeInstanceClassMissing:\r\n return this.visitMissingCustomAttributeInstance(diagnostic);\r\n\r\n case SchemaCompareCodes.PresentationUnitMissing:\r\n return this.visitMissingPresentationUnit(diagnostic);\r\n\r\n case SchemaCompareCodes.FormatUnitMissing:\r\n return this.visitMissingFormatUnit(diagnostic);\r\n case SchemaCompareCodes.UnitLabelOverrideDelta:\r\n return this.visitChangedFormatUnitLabel(diagnostic);\r\n }\r\n return;\r\n }\r\n\r\n private visitChangedSchemaProperties(diagnostic: AnyDiagnostic) {\r\n let modifyEntry = this.schemaDifferences.find((entry): entry is SchemaDifference => {\r\n return entry.changeType === \"modify\" && entry.schemaType === SchemaOtherTypes.Schema;\r\n });\r\n\r\n let hasChanges = false;\r\n let addEntry = false;\r\n if (modifyEntry === undefined) {\r\n addEntry = true;\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: SchemaOtherTypes.Schema,\r\n difference: {},\r\n };\r\n }\r\n\r\n // Only label and description are taken from the source schema. If the schema name or alias\r\n // differs, those are ignored for now.\r\n const [propertyName, propertyValue] = diagnostic.messageArgs as [string, any];\r\n if (propertyName === \"label\") {\r\n modifyEntry.difference.label = propertyValue;\r\n hasChanges = true;\r\n }\r\n if (propertyName === \"description\") {\r\n modifyEntry.difference.description = propertyValue;\r\n hasChanges = true;\r\n }\r\n\r\n if (addEntry && hasChanges) {\r\n this.schemaDifferences.push(modifyEntry);\r\n }\r\n }\r\n\r\n private visitMissingSchemaItem(diagnostic: AnyDiagnostic) {\r\n const schemaItem = diagnostic.ecDefinition as AnySchemaItem;\r\n\r\n this.schemaItemDifferences.push({\r\n changeType: \"add\",\r\n schemaType: schemaItem.schemaItemType,\r\n itemName: schemaItem.name,\r\n difference: schemaItem.toJSON(),\r\n });\r\n }\r\n\r\n private visitChangedSchemaItem(diagnostic: AnyDiagnostic) {\r\n const schemaItem = diagnostic.ecDefinition as AnySchemaItem;\r\n const [propertyName, sourceValue, _targetValue] = diagnostic.messageArgs as [string, unknown, unknown];\r\n if (propertyName === \"schemaItemType\") {\r\n // If the schema item type is different, the whole item is added as \"new\" item. The\r\n // difference validator will then figure whether there is a conflict with items of\r\n // of the same name.\r\n return this.visitMissingSchemaItem(diagnostic);\r\n }\r\n\r\n if (sourceValue === undefined) {\r\n return;\r\n }\r\n\r\n let modifyEntry = this.schemaItemDifferences.find((entry): entry is AnySchemaItemDifference => {\r\n return entry.changeType === \"modify\" && entry.itemName === schemaItem.name;\r\n });\r\n\r\n if (modifyEntry === undefined) {\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: schemaItem.schemaItemType,\r\n itemName: schemaItem.name,\r\n difference: {},\r\n } as AnySchemaItemDifference;\r\n this.schemaItemDifferences.push(modifyEntry);\r\n }\r\n\r\n // TODO: Since propertyName is type of string, the compiler complains about accepting\r\n // an unspecific string as property indexer. Casted to any as short term fix but that\r\n // needs to be handled better in future.\r\n (modifyEntry.difference as any)[propertyName] = sourceValue;\r\n }\r\n\r\n private visitMissingEnumerator(diagnostic: AnyDiagnostic) {\r\n const enumeration = diagnostic.ecDefinition as Enumeration;\r\n const [enumerator] = diagnostic.messageArgs as [AnyEnumerator];\r\n this.schemaItemPathDifferences.push({\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.Enumerator,\r\n itemName: enumeration.name,\r\n path: \"$enumerators\",\r\n difference: enumerator,\r\n });\r\n }\r\n\r\n private lookupEnumeratorEntry(changeType: DifferenceType, item: string, enumeratorName: string) {\r\n return this.schemaItemPathDifferences.find((change) => {\r\n return change.changeType === changeType\r\n && change.schemaType === SchemaOtherTypes.Enumerator\r\n && change.itemName === item\r\n && change.path === \"$enumerators\"\r\n && change.difference.name === enumeratorName;\r\n });\r\n }\r\n\r\n private visitChangedEnumerator(diagnostic: AnyDiagnostic) {\r\n const enumeration = diagnostic.ecDefinition as Enumeration;\r\n const [enumerator, propertyName, sourceValue] = diagnostic.messageArgs as [AnyEnumerator, keyof AnyEnumerator, any];\r\n if (this.lookupEnumeratorEntry(\"add\", enumeration.name, enumerator.name)) {\r\n return;\r\n }\r\n\r\n let modifyEntry = this.schemaItemPathDifferences.find((entry): entry is EnumeratorDifference => {\r\n return entry.changeType === \"modify\" && entry.schemaType === SchemaOtherTypes.Enumerator && entry.itemName === enumeration.name && entry.path === enumerator.name;\r\n });\r\n\r\n if (modifyEntry === undefined) {\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: SchemaOtherTypes.Enumerator,\r\n itemName: enumeration.name,\r\n path: enumerator.name,\r\n difference: {},\r\n };\r\n this.schemaItemPathDifferences.push(modifyEntry);\r\n }\r\n\r\n if (sourceValue !== undefined) {\r\n modifyEntry.difference[propertyName] = sourceValue;\r\n }\r\n }\r\n\r\n private visitMissingProperty(diagnostic: AnyDiagnostic) {\r\n const property = diagnostic.ecDefinition as Property;\r\n this.schemaItemPathDifferences.push({\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.Property,\r\n itemName: property.class.name,\r\n path: property.name,\r\n difference: property.toJSON() as AnyPropertyProps,\r\n });\r\n }\r\n\r\n private visitChangedProperty(diagnostic: AnyDiagnostic) {\r\n const property = diagnostic.ecDefinition as Property;\r\n const [propertyName, sourceValue] = diagnostic.messageArgs as [keyof PropertyProps, any, any];\r\n\r\n if (isPropertyTypeName(property, propertyName)) {\r\n return this.visitMissingProperty(diagnostic);\r\n }\r\n\r\n let modifyEntry = this.schemaItemPathDifferences.find((entry): entry is ClassPropertyDifference => {\r\n return entry.changeType === \"modify\" && entry.schemaType === SchemaOtherTypes.Property && entry.itemName === property.class.name && entry.path === property.name;\r\n });\r\n\r\n if (modifyEntry === undefined) {\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: SchemaOtherTypes.Property,\r\n itemName: property.class.name,\r\n path: property.name,\r\n difference: {},\r\n };\r\n this.schemaItemPathDifferences.push(modifyEntry);\r\n }\r\n\r\n if (propertyName !== \"name\") {\r\n modifyEntry.difference[propertyName] = sourceValue;\r\n }\r\n }\r\n\r\n private visitMissingBaseClass(diagnostic: AnyDiagnostic) {\r\n const ecClass = diagnostic.ecDefinition as ECClass;\r\n const [sourceBaseClass] = diagnostic.messageArgs as [ECClass, ECClass];\r\n\r\n let modifyEntry = this.schemaItemDifferences.find((entry): entry is AnyClassItemDifference => {\r\n return entry.changeType === \"modify\" && entry.schemaType === ecClass.schemaItemType && entry.itemName === ecClass.name;\r\n });\r\n\r\n if (modifyEntry === undefined) {\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: ecClass.schemaItemType,\r\n itemName: ecClass.name,\r\n difference: {},\r\n } as AnyClassItemDifference;\r\n this.schemaItemDifferences.push(modifyEntry);\r\n }\r\n\r\n modifyEntry.difference.baseClass = sourceBaseClass !== undefined ? sourceBaseClass.fullName : undefined;\r\n }\r\n\r\n private visitMissingMixinOnClass(diagnostic: AnyDiagnostic) {\r\n const ecClass = diagnostic.ecDefinition as ECClass;\r\n const [mixin] = diagnostic.messageArgs as [Mixin];\r\n\r\n let addEntry = this.schemaItemDifferences.find((entry): entry is EntityClassMixinDifference => {\r\n return entry.changeType === \"add\" && entry.schemaType === SchemaOtherTypes.EntityClassMixin && entry.itemName === ecClass.name;\r\n });\r\n\r\n if (addEntry === undefined) {\r\n addEntry = {\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.EntityClassMixin,\r\n itemName: ecClass.name,\r\n difference: [],\r\n };\r\n this.schemaItemDifferences.push(addEntry);\r\n }\r\n addEntry.difference.push(mixin.fullName);\r\n }\r\n\r\n private visitMissingRelationshipConstraintClass(diagnostic: AnyDiagnostic) {\r\n const constraint = diagnostic.ecDefinition as RelationshipConstraint;\r\n const className = constraint.relationshipClass.name;\r\n const constraintPath = constraint.isSource ? \"$source\" : \"$target\";\r\n\r\n let addEntry = this.schemaItemPathDifferences.find((entry): entry is RelationshipConstraintClassDifference => {\r\n return entry.changeType === \"add\" && entry.schemaType === SchemaOtherTypes.RelationshipConstraintClass, entry.itemName === className && entry.path === constraintPath;\r\n });\r\n\r\n if (!addEntry) {\r\n addEntry = {\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.RelationshipConstraintClass,\r\n itemName: className,\r\n path: constraintPath,\r\n difference: [],\r\n };\r\n this.schemaItemPathDifferences.push(addEntry);\r\n }\r\n\r\n const [constraintClass] = diagnostic.messageArgs as [ECClass];\r\n addEntry.difference.push(constraintClass.fullName);\r\n }\r\n\r\n private visitChangedRelationshipConstraint(diagnostic: AnyDiagnostic) {\r\n const constraint = diagnostic.ecDefinition as RelationshipConstraint;\r\n const className = constraint.relationshipClass.name;\r\n const constraintPath = constraint.isSource ? \"$source\" : \"$target\";\r\n if (this.schemaItemDifferences.find((entry) => entry.changeType === \"add\" && entry.itemName === className)) {\r\n return;\r\n }\r\n\r\n let modifyEntry = this.schemaItemPathDifferences.find((entry): entry is RelationshipConstraintDifference => {\r\n return entry.changeType === \"modify\" && entry.schemaType === SchemaOtherTypes.RelationshipConstraint && entry.itemName === className && entry.path === constraintPath;\r\n });\r\n\r\n if (modifyEntry === undefined) {\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: SchemaOtherTypes.RelationshipConstraint,\r\n itemName: className,\r\n path: constraintPath,\r\n difference: {},\r\n };\r\n this.schemaItemPathDifferences.push(modifyEntry);\r\n }\r\n\r\n const [propertyName, propertyValue] = diagnostic.messageArgs as [keyof RelationshipConstraintProps, any];\r\n if (propertyName === \"abstractConstraint\" && propertyValue !== undefined) {\r\n modifyEntry.difference.abstractConstraint = propertyValue;\r\n }\r\n if (propertyName === \"multiplicity\" && propertyValue !== undefined) {\r\n modifyEntry.difference.multiplicity = propertyValue;\r\n }\r\n if (propertyName === \"polymorphic\" && propertyValue !== undefined) {\r\n modifyEntry.difference.polymorphic = propertyValue;\r\n }\r\n if (propertyName === \"roleLabel\" && propertyValue !== undefined) {\r\n modifyEntry.difference.roleLabel = propertyValue;\r\n }\r\n }\r\n\r\n private visitSchemaReference(diagnostic: AnyDiagnostic, changeType: DifferenceType) {\r\n const [referencedSchema] = diagnostic.messageArgs as [Schema];\r\n this.schemaDifferences.push({\r\n changeType,\r\n schemaType: SchemaOtherTypes.SchemaReference,\r\n difference: {\r\n name: referencedSchema.name,\r\n version: referencedSchema.schemaKey.version.toString(),\r\n },\r\n });\r\n }\r\n\r\n private visitMissingCustomAttributeInstance(diagnostic: AnyDiagnostic) {\r\n const [customAttribute] = diagnostic.messageArgs as [CustomAttribute];\r\n const ecType = diagnostic.ecDefinition;\r\n if (Schema.isSchema(ecType)) {\r\n return this.customAttributeDifferences.push({\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.CustomAttributeInstance,\r\n appliedTo: \"Schema\",\r\n difference: customAttribute,\r\n });\r\n }\r\n\r\n if (SchemaItem.isSchemaItem(ecType)) {\r\n return this.customAttributeDifferences.push({\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.CustomAttributeInstance,\r\n appliedTo: \"SchemaItem\",\r\n itemName: ecType.name,\r\n difference: customAttribute,\r\n });\r\n }\r\n\r\n if (Property.isProperty(ecType)) {\r\n return this.customAttributeDifferences.push({\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.CustomAttributeInstance,\r\n appliedTo: \"Property\",\r\n itemName: ecType.class.name,\r\n path: ecType.name,\r\n difference: customAttribute,\r\n });\r\n }\r\n\r\n if (RelationshipConstraint.isRelationshipConstraint(ecType)) {\r\n return this.customAttributeDifferences.push({\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.CustomAttributeInstance,\r\n appliedTo: \"RelationshipConstraint\",\r\n itemName: ecType.relationshipClass.name,\r\n path: ecType.isSource ? \"$source\" : \"$target\",\r\n difference: customAttribute,\r\n });\r\n }\r\n return;\r\n }\r\n\r\n private visitMissingPresentationUnit(diagnostic: AnyDiagnostic) {\r\n const koq = diagnostic.ecDefinition as KindOfQuantity;\r\n const [presentationFormat] = diagnostic.messageArgs as [Format | OverrideFormat];\r\n\r\n let addEntry = this.schemaItemDifferences.find((entry): entry is KindOfQuantityPresentationFormatDifference => {\r\n return entry.changeType === \"add\" && entry.schemaType === SchemaOtherTypes.KindOfQuantityPresentationFormat\r\n && entry.itemName === koq.name;\r\n });\r\n\r\n if (addEntry === undefined) {\r\n addEntry = {\r\n changeType: \"add\",\r\n schemaType: SchemaOtherTypes.KindOfQuantityPresentationFormat,\r\n itemName: koq.name,\r\n difference: [],\r\n };\r\n this.schemaItemDifferences.push(addEntry);\r\n }\r\n addEntry.difference.push(presentationFormat.fullName);\r\n }\r\n\r\n private visitMissingFormatUnit(diagnostic: AnyDiagnostic) {\r\n const format = diagnostic.ecDefinition as Format;\r\n\r\n for (let index = this.schemaItemPathDifferences.length-1; index>=0; index--) {\r\n const entry = this.schemaItemPathDifferences[index];\r\n if (entry.changeType === \"modify\" && entry.schemaType === SchemaOtherTypes.FormatUnitLabel && entry.itemName === format.name) {\r\n this.schemaItemPathDifferences.splice(index, 1);\r\n }\r\n }\r\n\r\n let modifyEntry = this.schemaItemDifferences.find((entry): entry is FormatUnitDifference => {\r\n return entry.changeType === \"modify\" && entry.schemaType === SchemaOtherTypes.FormatUnit\r\n && entry.itemName === format.name;\r\n });\r\n\r\n if (modifyEntry === undefined && format.units) {\r\n modifyEntry = {\r\n changeType: \"modify\",\r\n schemaType: SchemaOtherTypes.FormatUnit,\r\n itemName: format.name,\r\n difference: [],\r\n };\r\n\r\n for (const [unit, label] of format.units) {\r\n modifyEntry.difference.push({\r\n name: unit.fullName,\r\n label,\r\n });\r\n };\r\n\r\n this.schemaItemDifferences.push(modifyEntry);\r\n }\r\n }\r\n\r\n private visitChangedFormatUnitLabel(diagnostic: AnyDiagnostic) {\r\n const format = diagnostic.ecDefinition as Format;\r\n\r\n if (this.schemaItemDifferences.find((entry): entry is FormatUnitDifference => { return entry.changeType === \"modify\"\r\n && entry.schemaType === SchemaOtherTypes.FormatUnit && entry.itemName === format.name})) {\r\n return;\r\n }\r\n\r\n const [unit, label] = diagnostic.messageArgs as [Unit | InvertedUnit, string | undefined];\r\n this.schemaItemPathDifferences.push({\r\n changeType: \"modify\",\r\n schemaType: SchemaOtherTypes.FormatUnitLabel,\r\n itemName: format.name,\r\n path: unit.fullName,\r\n difference: {\r\n label,\r\n },\r\n });\r\n };\r\n};\r\n\r\nfunction isPropertyTypeName(property: Property, propertyName: string) {\r\n return (propertyName === \"type\") ||\r\n (property.isEnumeration() && propertyName === \"enumeration\") ||\r\n (property.isPrimitive() && propertyName === \"primitiveType\") ||\r\n (property.isStruct() && propertyName === \"structClass\") ||\r\n (property.isNavigation() && propertyName === \"relationshipClass\");\r\n}\r\n"]}
@@ -2,6 +2,7 @@
2
2
  * @module Differencing
3
3
  */
4
4
  import { AnySchemaDifferenceConflict } from "./SchemaConflicts";
5
+ import { AnySchemaEdits } from "../Merging/Edits/SchemaEdits";
5
6
  import { AnyEnumerator, AnyPropertyProps, ConstantProps, CustomAttribute, CustomAttributeClassProps, EntityClassProps, EnumerationProps, InvertedUnitProps, KindOfQuantityProps, MixinProps, PhenomenonProps, PropertyCategoryProps, RelationshipClassProps, RelationshipConstraintProps, type Schema, SchemaItemFormatProps, SchemaItemProps, SchemaItemType, SchemaItemUnitProps, SchemaReferenceProps, StructClassProps, UnitSystemProps } from "@itwin/ecschema-metadata";
6
7
  /** Utility-Type to remove possible readonly flags on the given type. */
7
8
  type PartialEditable<T> = {
@@ -33,7 +34,9 @@ export declare enum SchemaOtherTypes {
33
34
  RelationshipConstraint = "RelationshipConstraint",
34
35
  RelationshipConstraintClass = "RelationshipConstraintClass",
35
36
  EntityClassMixin = "EntityClassMixin",
36
- KindOfQuantityPresentationFormat = "KindOfQuantityPresentationFormat"
37
+ KindOfQuantityPresentationFormat = "KindOfQuantityPresentationFormat",
38
+ FormatUnit = "FormatUnit",
39
+ FormatUnitLabel = "FormatUnitLabel"
37
40
  }
38
41
  /**
39
42
  * Defines the possible values SchemaTypes that can occur in SchemaDifferences or Conflicts.
@@ -58,7 +61,7 @@ export interface SchemaDifferenceResult {
58
61
  * Union of all supported schema differencing types.
59
62
  * @alpha
60
63
  */
61
- export type AnySchemaDifference = SchemaDifference | SchemaReferenceDifference | AnySchemaItemDifference | AnySchemaItemPathDifference | EntityClassMixinDifference | CustomAttributeDifference | KindOfQuantityPresentationFormatDifference;
64
+ export type AnySchemaDifference = SchemaDifference | SchemaReferenceDifference | AnySchemaItemDifference | AnySchemaItemPathDifference | EntityClassMixinDifference | CustomAttributeDifference | KindOfQuantityPresentationFormatDifference | FormatUnitDifference;
62
65
  /**
63
66
  * Differencing entry for changes on a Schema.
64
67
  * @alpha
@@ -94,7 +97,7 @@ export type AnyClassItemDifference = EntityClassDifference | MixinClassDifferenc
94
97
  * Union of all differences that have a path pointing inside a schema item.
95
98
  * @alpha
96
99
  */
97
- export type AnySchemaItemPathDifference = RelationshipConstraintDifference | RelationshipConstraintClassDifference | CustomAttributePropertyDifference | EnumeratorDifference | ClassPropertyDifference;
100
+ export type AnySchemaItemPathDifference = RelationshipConstraintDifference | RelationshipConstraintClassDifference | CustomAttributePropertyDifference | EnumeratorDifference | ClassPropertyDifference | FormatUnitLabelDifference;
98
101
  /**
99
102
  * Internal base class for all Schema Item differencing entries.
100
103
  * @alpha
@@ -316,6 +319,32 @@ export interface KindOfQuantityPresentationFormatDifference {
316
319
  readonly itemName: string;
317
320
  readonly difference: string[];
318
321
  }
322
+ /**
323
+ * Differencing entry for changed Units on Formats.
324
+ * @alpha
325
+ */
326
+ export interface FormatUnitDifference {
327
+ readonly changeType: "modify";
328
+ readonly schemaType: SchemaOtherTypes.FormatUnit;
329
+ readonly itemName: string;
330
+ readonly difference: {
331
+ name: string;
332
+ label?: string;
333
+ }[];
334
+ }
335
+ /**
336
+ * Differencing entry for changed labels on Format Units.
337
+ * @alpha
338
+ */
339
+ export interface FormatUnitLabelDifference {
340
+ readonly changeType: "modify";
341
+ readonly schemaType: SchemaOtherTypes.FormatUnitLabel;
342
+ readonly itemName: string;
343
+ readonly path: string;
344
+ readonly difference: {
345
+ label?: string;
346
+ };
347
+ }
319
348
  /**
320
349
  * Creates a [[SchemaDifferenceResult]] for two given schemas.
321
350
  * @param targetSchema The schema the differences gets merged into.
@@ -323,6 +352,6 @@ export interface KindOfQuantityPresentationFormatDifference {
323
352
  * @returns An [[SchemaDifferenceResult]] object.
324
353
  * @alpha
325
354
  */
326
- export declare function getSchemaDifferences(targetSchema: Schema, sourceSchema: Schema): Promise<SchemaDifferenceResult>;
355
+ export declare function getSchemaDifferences(targetSchema: Schema, sourceSchema: Schema, schemaEdits?: Iterable<AnySchemaEdits>): Promise<SchemaDifferenceResult>;
327
356
  export {};
328
357
  //# sourceMappingURL=SchemaDifference.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaDifference.d.ts","sourceRoot":"","sources":["../../../src/Differencing/SchemaDifference.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAIhE,OAAO,EACL,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAC/D,yBAAyB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EACrG,UAAU,EAAE,eAAe,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,2BAA2B,EACvG,KAAK,MAAM,EAAE,qBAAqB,EAAE,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,eAAe,EAClJ,MAAM,0BAA0B,CAAC;AAGlC,wEAAwE;AACxE,KAAK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