@itwin/ecschema-editing 5.0.0-dev.90 → 5.0.0-dev.92

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 (363) hide show
  1. package/lib/cjs/Validation/DiagnosticReporter.js +1 -1
  2. package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
  3. package/lib/esm/Differencing/Errors.d.ts +19 -0
  4. package/lib/esm/Differencing/Errors.d.ts.map +1 -0
  5. package/lib/esm/Differencing/Errors.js +26 -0
  6. package/lib/esm/Differencing/Errors.js.map +1 -0
  7. package/lib/esm/Differencing/SchemaConflicts.d.ts +84 -0
  8. package/lib/esm/Differencing/SchemaConflicts.d.ts.map +1 -0
  9. package/lib/esm/Differencing/SchemaConflicts.js +60 -0
  10. package/lib/esm/Differencing/SchemaConflicts.js.map +1 -0
  11. package/lib/esm/Differencing/SchemaDiagnosticVisitor.d.ts +41 -0
  12. package/lib/esm/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -0
  13. package/lib/esm/Differencing/SchemaDiagnosticVisitor.js +443 -0
  14. package/lib/esm/Differencing/SchemaDiagnosticVisitor.js.map +1 -0
  15. package/lib/esm/Differencing/SchemaDifference.d.ts +357 -0
  16. package/lib/esm/Differencing/SchemaDifference.d.ts.map +1 -0
  17. package/lib/esm/Differencing/SchemaDifference.js +106 -0
  18. package/lib/esm/Differencing/SchemaDifference.js.map +1 -0
  19. package/lib/esm/Differencing/SchemaDifferenceValidator.d.ts +18 -0
  20. package/lib/esm/Differencing/SchemaDifferenceValidator.d.ts.map +1 -0
  21. package/lib/esm/Differencing/SchemaDifferenceValidator.js +521 -0
  22. package/lib/esm/Differencing/SchemaDifferenceValidator.js.map +1 -0
  23. package/lib/esm/Differencing/SchemaDifferenceVisitor.d.ts +32 -0
  24. package/lib/esm/Differencing/SchemaDifferenceVisitor.d.ts.map +1 -0
  25. package/lib/esm/Differencing/SchemaDifferenceVisitor.js +88 -0
  26. package/lib/esm/Differencing/SchemaDifferenceVisitor.js.map +1 -0
  27. package/lib/esm/Differencing/Utils.d.ts +110 -0
  28. package/lib/esm/Differencing/Utils.d.ts.map +1 -0
  29. package/lib/esm/Differencing/Utils.js +161 -0
  30. package/lib/esm/Differencing/Utils.js.map +1 -0
  31. package/lib/esm/Editing/Constants.d.ts +22 -0
  32. package/lib/esm/Editing/Constants.d.ts.map +1 -0
  33. package/lib/esm/Editing/Constants.js +55 -0
  34. package/lib/esm/Editing/Constants.js.map +1 -0
  35. package/lib/esm/Editing/CustomAttributes.d.ts +22 -0
  36. package/lib/esm/Editing/CustomAttributes.d.ts.map +1 -0
  37. package/lib/esm/Editing/CustomAttributes.js +49 -0
  38. package/lib/esm/Editing/CustomAttributes.js.map +1 -0
  39. package/lib/esm/Editing/ECClasses.d.ts +86 -0
  40. package/lib/esm/Editing/ECClasses.d.ts.map +1 -0
  41. package/lib/esm/Editing/ECClasses.js +294 -0
  42. package/lib/esm/Editing/ECClasses.js.map +1 -0
  43. package/lib/esm/Editing/Editor.d.ts +117 -0
  44. package/lib/esm/Editing/Editor.d.ts.map +1 -0
  45. package/lib/esm/Editing/Editor.js +264 -0
  46. package/lib/esm/Editing/Editor.js.map +1 -0
  47. package/lib/esm/Editing/Entities.d.ts +38 -0
  48. package/lib/esm/Editing/Entities.d.ts.map +1 -0
  49. package/lib/esm/Editing/Entities.js +126 -0
  50. package/lib/esm/Editing/Entities.js.map +1 -0
  51. package/lib/esm/Editing/Enumerations.d.ts +25 -0
  52. package/lib/esm/Editing/Enumerations.d.ts.map +1 -0
  53. package/lib/esm/Editing/Enumerations.js +90 -0
  54. package/lib/esm/Editing/Enumerations.js.map +1 -0
  55. package/lib/esm/Editing/Exception.d.ts +358 -0
  56. package/lib/esm/Editing/Exception.d.ts.map +1 -0
  57. package/lib/esm/Editing/Exception.js +471 -0
  58. package/lib/esm/Editing/Exception.js.map +1 -0
  59. package/lib/esm/Editing/Formats.d.ts +23 -0
  60. package/lib/esm/Editing/Formats.d.ts.map +1 -0
  61. package/lib/esm/Editing/Formats.js +62 -0
  62. package/lib/esm/Editing/Formats.js.map +1 -0
  63. package/lib/esm/Editing/InvertedUnits.d.ts +19 -0
  64. package/lib/esm/Editing/InvertedUnits.d.ts.map +1 -0
  65. package/lib/esm/Editing/InvertedUnits.js +68 -0
  66. package/lib/esm/Editing/InvertedUnits.js.map +1 -0
  67. package/lib/esm/Editing/KindOfQuantities.d.ts +30 -0
  68. package/lib/esm/Editing/KindOfQuantities.d.ts.map +1 -0
  69. package/lib/esm/Editing/KindOfQuantities.js +92 -0
  70. package/lib/esm/Editing/KindOfQuantities.js.map +1 -0
  71. package/lib/esm/Editing/Mixins.d.ts +35 -0
  72. package/lib/esm/Editing/Mixins.d.ts.map +1 -0
  73. package/lib/esm/Editing/Mixins.js +90 -0
  74. package/lib/esm/Editing/Mixins.js.map +1 -0
  75. package/lib/esm/Editing/Mutable/MutableArrayProperty.d.ts +10 -0
  76. package/lib/esm/Editing/Mutable/MutableArrayProperty.d.ts.map +1 -0
  77. package/lib/esm/Editing/Mutable/MutableArrayProperty.js +12 -0
  78. package/lib/esm/Editing/Mutable/MutableArrayProperty.js.map +1 -0
  79. package/lib/esm/Editing/Mutable/MutableCAClass.d.ts +10 -0
  80. package/lib/esm/Editing/Mutable/MutableCAClass.d.ts.map +1 -0
  81. package/lib/esm/Editing/Mutable/MutableCAClass.js +12 -0
  82. package/lib/esm/Editing/Mutable/MutableCAClass.js.map +1 -0
  83. package/lib/esm/Editing/Mutable/MutableClass.d.ts +39 -0
  84. package/lib/esm/Editing/Mutable/MutableClass.d.ts.map +1 -0
  85. package/lib/esm/Editing/Mutable/MutableClass.js +18 -0
  86. package/lib/esm/Editing/Mutable/MutableClass.js.map +1 -0
  87. package/lib/esm/Editing/Mutable/MutableConstant.d.ts +14 -0
  88. package/lib/esm/Editing/Mutable/MutableConstant.d.ts.map +1 -0
  89. package/lib/esm/Editing/Mutable/MutableConstant.js +12 -0
  90. package/lib/esm/Editing/Mutable/MutableConstant.js.map +1 -0
  91. package/lib/esm/Editing/Mutable/MutableEntityClass.d.ts +12 -0
  92. package/lib/esm/Editing/Mutable/MutableEntityClass.d.ts.map +1 -0
  93. package/lib/esm/Editing/Mutable/MutableEntityClass.js +12 -0
  94. package/lib/esm/Editing/Mutable/MutableEntityClass.js.map +1 -0
  95. package/lib/esm/Editing/Mutable/MutableEnumeration.d.ts +11 -0
  96. package/lib/esm/Editing/Mutable/MutableEnumeration.d.ts.map +1 -0
  97. package/lib/esm/Editing/Mutable/MutableEnumeration.js +11 -0
  98. package/lib/esm/Editing/Mutable/MutableEnumeration.js.map +1 -0
  99. package/lib/esm/Editing/Mutable/MutableFormat.d.ts +26 -0
  100. package/lib/esm/Editing/Mutable/MutableFormat.d.ts.map +1 -0
  101. package/lib/esm/Editing/Mutable/MutableFormat.js +12 -0
  102. package/lib/esm/Editing/Mutable/MutableFormat.js.map +1 -0
  103. package/lib/esm/Editing/Mutable/MutableInvertedUnit.d.ts +11 -0
  104. package/lib/esm/Editing/Mutable/MutableInvertedUnit.d.ts.map +1 -0
  105. package/lib/esm/Editing/Mutable/MutableInvertedUnit.js +12 -0
  106. package/lib/esm/Editing/Mutable/MutableInvertedUnit.js.map +1 -0
  107. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.d.ts +14 -0
  108. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.d.ts.map +1 -0
  109. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.js +12 -0
  110. package/lib/esm/Editing/Mutable/MutableKindOfQuantity.js.map +1 -0
  111. package/lib/esm/Editing/Mutable/MutableMixin.d.ts +12 -0
  112. package/lib/esm/Editing/Mutable/MutableMixin.d.ts.map +1 -0
  113. package/lib/esm/Editing/Mutable/MutableMixin.js +12 -0
  114. package/lib/esm/Editing/Mutable/MutableMixin.js.map +1 -0
  115. package/lib/esm/Editing/Mutable/MutableNavigationProperty.d.ts +8 -0
  116. package/lib/esm/Editing/Mutable/MutableNavigationProperty.d.ts.map +1 -0
  117. package/lib/esm/Editing/Mutable/MutableNavigationProperty.js +12 -0
  118. package/lib/esm/Editing/Mutable/MutableNavigationProperty.js.map +1 -0
  119. package/lib/esm/Editing/Mutable/MutablePhenomenon.d.ts +11 -0
  120. package/lib/esm/Editing/Mutable/MutablePhenomenon.d.ts.map +1 -0
  121. package/lib/esm/Editing/Mutable/MutablePhenomenon.js +12 -0
  122. package/lib/esm/Editing/Mutable/MutablePhenomenon.js.map +1 -0
  123. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.d.ts +13 -0
  124. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.d.ts.map +1 -0
  125. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.js +12 -0
  126. package/lib/esm/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -0
  127. package/lib/esm/Editing/Mutable/MutableProperty.d.ts +16 -0
  128. package/lib/esm/Editing/Mutable/MutableProperty.d.ts.map +1 -0
  129. package/lib/esm/Editing/Mutable/MutableProperty.js +12 -0
  130. package/lib/esm/Editing/Mutable/MutableProperty.js.map +1 -0
  131. package/lib/esm/Editing/Mutable/MutablePropertyCategory.d.ts +11 -0
  132. package/lib/esm/Editing/Mutable/MutablePropertyCategory.d.ts.map +1 -0
  133. package/lib/esm/Editing/Mutable/MutablePropertyCategory.js +12 -0
  134. package/lib/esm/Editing/Mutable/MutablePropertyCategory.js.map +1 -0
  135. package/lib/esm/Editing/Mutable/MutableRelationshipClass.d.ts +30 -0
  136. package/lib/esm/Editing/Mutable/MutableRelationshipClass.d.ts.map +1 -0
  137. package/lib/esm/Editing/Mutable/MutableRelationshipClass.js +20 -0
  138. package/lib/esm/Editing/Mutable/MutableRelationshipClass.js.map +1 -0
  139. package/lib/esm/Editing/Mutable/MutableSchema.d.ts +51 -0
  140. package/lib/esm/Editing/Mutable/MutableSchema.d.ts.map +1 -0
  141. package/lib/esm/Editing/Mutable/MutableSchema.js +14 -0
  142. package/lib/esm/Editing/Mutable/MutableSchema.js.map +1 -0
  143. package/lib/esm/Editing/Mutable/MutableSchemaItem.d.ts +11 -0
  144. package/lib/esm/Editing/Mutable/MutableSchemaItem.d.ts.map +1 -0
  145. package/lib/esm/Editing/Mutable/MutableSchemaItem.js +12 -0
  146. package/lib/esm/Editing/Mutable/MutableSchemaItem.js.map +1 -0
  147. package/lib/esm/Editing/Mutable/MutableStructProperty.d.ts +8 -0
  148. package/lib/esm/Editing/Mutable/MutableStructProperty.d.ts.map +1 -0
  149. package/lib/esm/Editing/Mutable/MutableStructProperty.js +12 -0
  150. package/lib/esm/Editing/Mutable/MutableStructProperty.js.map +1 -0
  151. package/lib/esm/Editing/Mutable/MutableUnit.d.ts +12 -0
  152. package/lib/esm/Editing/Mutable/MutableUnit.d.ts.map +1 -0
  153. package/lib/esm/Editing/Mutable/MutableUnit.js +12 -0
  154. package/lib/esm/Editing/Mutable/MutableUnit.js.map +1 -0
  155. package/lib/esm/Editing/Mutable/MutableUnitSystem.d.ts +10 -0
  156. package/lib/esm/Editing/Mutable/MutableUnitSystem.d.ts.map +1 -0
  157. package/lib/esm/Editing/Mutable/MutableUnitSystem.js +12 -0
  158. package/lib/esm/Editing/Mutable/MutableUnitSystem.js.map +1 -0
  159. package/lib/esm/Editing/Phenomena.d.ts +17 -0
  160. package/lib/esm/Editing/Phenomena.d.ts.map +1 -0
  161. package/lib/esm/Editing/Phenomena.js +44 -0
  162. package/lib/esm/Editing/Phenomena.js.map +1 -0
  163. package/lib/esm/Editing/Properties.d.ts +206 -0
  164. package/lib/esm/Editing/Properties.d.ts.map +1 -0
  165. package/lib/esm/Editing/Properties.js +415 -0
  166. package/lib/esm/Editing/Properties.js.map +1 -0
  167. package/lib/esm/Editing/PropertyCategories.d.ts +18 -0
  168. package/lib/esm/Editing/PropertyCategories.d.ts.map +1 -0
  169. package/lib/esm/Editing/PropertyCategories.js +54 -0
  170. package/lib/esm/Editing/PropertyCategories.js.map +1 -0
  171. package/lib/esm/Editing/RelationshipClasses.d.ts +69 -0
  172. package/lib/esm/Editing/RelationshipClasses.d.ts.map +1 -0
  173. package/lib/esm/Editing/RelationshipClasses.js +236 -0
  174. package/lib/esm/Editing/RelationshipClasses.js.map +1 -0
  175. package/lib/esm/Editing/SchemaItems.d.ts +42 -0
  176. package/lib/esm/Editing/SchemaItems.d.ts.map +1 -0
  177. package/lib/esm/Editing/SchemaItems.js +104 -0
  178. package/lib/esm/Editing/SchemaItems.js.map +1 -0
  179. package/lib/esm/Editing/Structs.d.ts +21 -0
  180. package/lib/esm/Editing/Structs.d.ts.map +1 -0
  181. package/lib/esm/Editing/Structs.js +47 -0
  182. package/lib/esm/Editing/Structs.js.map +1 -0
  183. package/lib/esm/Editing/UnitSystems.d.ts +17 -0
  184. package/lib/esm/Editing/UnitSystems.d.ts.map +1 -0
  185. package/lib/esm/Editing/UnitSystems.js +43 -0
  186. package/lib/esm/Editing/UnitSystems.js.map +1 -0
  187. package/lib/esm/Editing/Units.d.ts +17 -0
  188. package/lib/esm/Editing/Units.d.ts.map +1 -0
  189. package/lib/esm/Editing/Units.js +49 -0
  190. package/lib/esm/Editing/Units.js.map +1 -0
  191. package/lib/esm/Merging/ClassMerger.d.ts +9 -0
  192. package/lib/esm/Merging/ClassMerger.d.ts.map +1 -0
  193. package/lib/esm/Merging/ClassMerger.js +66 -0
  194. package/lib/esm/Merging/ClassMerger.js.map +1 -0
  195. package/lib/esm/Merging/ConstantMerger.d.ts +14 -0
  196. package/lib/esm/Merging/ConstantMerger.d.ts.map +1 -0
  197. package/lib/esm/Merging/ConstantMerger.js +64 -0
  198. package/lib/esm/Merging/ConstantMerger.js.map +1 -0
  199. package/lib/esm/Merging/CustomAttributeClassMerger.d.ts +14 -0
  200. package/lib/esm/Merging/CustomAttributeClassMerger.d.ts.map +1 -0
  201. package/lib/esm/Merging/CustomAttributeClassMerger.js +36 -0
  202. package/lib/esm/Merging/CustomAttributeClassMerger.js.map +1 -0
  203. package/lib/esm/Merging/CustomAttributeMerger.d.ts +19 -0
  204. package/lib/esm/Merging/CustomAttributeMerger.d.ts.map +1 -0
  205. package/lib/esm/Merging/CustomAttributeMerger.js +66 -0
  206. package/lib/esm/Merging/CustomAttributeMerger.js.map +1 -0
  207. package/lib/esm/Merging/Edits/NameMapping.d.ts +22 -0
  208. package/lib/esm/Merging/Edits/NameMapping.d.ts.map +1 -0
  209. package/lib/esm/Merging/Edits/NameMapping.js +49 -0
  210. package/lib/esm/Merging/Edits/NameMapping.js.map +1 -0
  211. package/lib/esm/Merging/Edits/RenameEditHandler.d.ts +14 -0
  212. package/lib/esm/Merging/Edits/RenameEditHandler.d.ts.map +1 -0
  213. package/lib/esm/Merging/Edits/RenameEditHandler.js +62 -0
  214. package/lib/esm/Merging/Edits/RenameEditHandler.js.map +1 -0
  215. package/lib/esm/Merging/Edits/SchemaEdits.d.ts +81 -0
  216. package/lib/esm/Merging/Edits/SchemaEdits.d.ts.map +1 -0
  217. package/lib/esm/Merging/Edits/SchemaEdits.js +112 -0
  218. package/lib/esm/Merging/Edits/SchemaEdits.js.map +1 -0
  219. package/lib/esm/Merging/Edits/SkipEditHandler.d.ts +14 -0
  220. package/lib/esm/Merging/Edits/SkipEditHandler.d.ts.map +1 -0
  221. package/lib/esm/Merging/Edits/SkipEditHandler.js +60 -0
  222. package/lib/esm/Merging/Edits/SkipEditHandler.js.map +1 -0
  223. package/lib/esm/Merging/EntityClassMerger.d.ts +19 -0
  224. package/lib/esm/Merging/EntityClassMerger.d.ts.map +1 -0
  225. package/lib/esm/Merging/EntityClassMerger.js +39 -0
  226. package/lib/esm/Merging/EntityClassMerger.js.map +1 -0
  227. package/lib/esm/Merging/EnumerationMerger.d.ts +14 -0
  228. package/lib/esm/Merging/EnumerationMerger.d.ts.map +1 -0
  229. package/lib/esm/Merging/EnumerationMerger.js +48 -0
  230. package/lib/esm/Merging/EnumerationMerger.js.map +1 -0
  231. package/lib/esm/Merging/EnumeratorMerger.d.ts +14 -0
  232. package/lib/esm/Merging/EnumeratorMerger.d.ts.map +1 -0
  233. package/lib/esm/Merging/EnumeratorMerger.js +36 -0
  234. package/lib/esm/Merging/EnumeratorMerger.js.map +1 -0
  235. package/lib/esm/Merging/FormatMerger.d.ts +24 -0
  236. package/lib/esm/Merging/FormatMerger.d.ts.map +1 -0
  237. package/lib/esm/Merging/FormatMerger.js +137 -0
  238. package/lib/esm/Merging/FormatMerger.js.map +1 -0
  239. package/lib/esm/Merging/InvertedUnitMerger.d.ts +14 -0
  240. package/lib/esm/Merging/InvertedUnitMerger.d.ts.map +1 -0
  241. package/lib/esm/Merging/InvertedUnitMerger.js +41 -0
  242. package/lib/esm/Merging/InvertedUnitMerger.js.map +1 -0
  243. package/lib/esm/Merging/KindOfQuantityMerger.d.ts +19 -0
  244. package/lib/esm/Merging/KindOfQuantityMerger.d.ts.map +1 -0
  245. package/lib/esm/Merging/KindOfQuantityMerger.js +89 -0
  246. package/lib/esm/Merging/KindOfQuantityMerger.js.map +1 -0
  247. package/lib/esm/Merging/MixinMerger.d.ts +14 -0
  248. package/lib/esm/Merging/MixinMerger.d.ts.map +1 -0
  249. package/lib/esm/Merging/MixinMerger.js +33 -0
  250. package/lib/esm/Merging/MixinMerger.js.map +1 -0
  251. package/lib/esm/Merging/PhenomenonMerger.d.ts +14 -0
  252. package/lib/esm/Merging/PhenomenonMerger.d.ts.map +1 -0
  253. package/lib/esm/Merging/PhenomenonMerger.js +36 -0
  254. package/lib/esm/Merging/PhenomenonMerger.js.map +1 -0
  255. package/lib/esm/Merging/PropertyCategoryMerger.d.ts +14 -0
  256. package/lib/esm/Merging/PropertyCategoryMerger.d.ts.map +1 -0
  257. package/lib/esm/Merging/PropertyCategoryMerger.js +31 -0
  258. package/lib/esm/Merging/PropertyCategoryMerger.js.map +1 -0
  259. package/lib/esm/Merging/PropertyMerger.d.ts +12 -0
  260. package/lib/esm/Merging/PropertyMerger.d.ts.map +1 -0
  261. package/lib/esm/Merging/PropertyMerger.js +228 -0
  262. package/lib/esm/Merging/PropertyMerger.js.map +1 -0
  263. package/lib/esm/Merging/RelationshipClassMerger.d.ts +27 -0
  264. package/lib/esm/Merging/RelationshipClassMerger.d.ts.map +1 -0
  265. package/lib/esm/Merging/RelationshipClassMerger.js +136 -0
  266. package/lib/esm/Merging/RelationshipClassMerger.js.map +1 -0
  267. package/lib/esm/Merging/SchemaMerger.d.ts +49 -0
  268. package/lib/esm/Merging/SchemaMerger.d.ts.map +1 -0
  269. package/lib/esm/Merging/SchemaMerger.js +117 -0
  270. package/lib/esm/Merging/SchemaMerger.js.map +1 -0
  271. package/lib/esm/Merging/SchemaMergingVisitor.d.ts +149 -0
  272. package/lib/esm/Merging/SchemaMergingVisitor.d.ts.map +1 -0
  273. package/lib/esm/Merging/SchemaMergingVisitor.js +339 -0
  274. package/lib/esm/Merging/SchemaMergingVisitor.js.map +1 -0
  275. package/lib/esm/Merging/SchemaMergingWalker.d.ts +19 -0
  276. package/lib/esm/Merging/SchemaMergingWalker.d.ts.map +1 -0
  277. package/lib/esm/Merging/SchemaMergingWalker.js +61 -0
  278. package/lib/esm/Merging/SchemaMergingWalker.js.map +1 -0
  279. package/lib/esm/Merging/SchemaReferenceMerger.d.ts +13 -0
  280. package/lib/esm/Merging/SchemaReferenceMerger.d.ts.map +1 -0
  281. package/lib/esm/Merging/SchemaReferenceMerger.js +57 -0
  282. package/lib/esm/Merging/SchemaReferenceMerger.js.map +1 -0
  283. package/lib/esm/Merging/StructClassMerger.d.ts +14 -0
  284. package/lib/esm/Merging/StructClassMerger.d.ts.map +1 -0
  285. package/lib/esm/Merging/StructClassMerger.js +20 -0
  286. package/lib/esm/Merging/StructClassMerger.js.map +1 -0
  287. package/lib/esm/Merging/UnitMerger.d.ts +14 -0
  288. package/lib/esm/Merging/UnitMerger.d.ts.map +1 -0
  289. package/lib/esm/Merging/UnitMerger.js +58 -0
  290. package/lib/esm/Merging/UnitMerger.js.map +1 -0
  291. package/lib/esm/Merging/UnitSystemMerger.d.ts +14 -0
  292. package/lib/esm/Merging/UnitSystemMerger.d.ts.map +1 -0
  293. package/lib/esm/Merging/UnitSystemMerger.js +24 -0
  294. package/lib/esm/Merging/UnitSystemMerger.js.map +1 -0
  295. package/lib/esm/Merging/Utils.d.ts +34 -0
  296. package/lib/esm/Merging/Utils.d.ts.map +1 -0
  297. package/lib/esm/Merging/Utils.js +90 -0
  298. package/lib/esm/Merging/Utils.js.map +1 -0
  299. package/lib/esm/Validation/Diagnostic.d.ts +322 -0
  300. package/lib/esm/Validation/Diagnostic.d.ts.map +1 -0
  301. package/lib/esm/Validation/Diagnostic.js +295 -0
  302. package/lib/esm/Validation/Diagnostic.js.map +1 -0
  303. package/lib/esm/Validation/DiagnosticReporter.d.ts +97 -0
  304. package/lib/esm/Validation/DiagnosticReporter.d.ts.map +1 -0
  305. package/lib/esm/Validation/DiagnosticReporter.js +105 -0
  306. package/lib/esm/Validation/DiagnosticReporter.js.map +1 -0
  307. package/lib/esm/Validation/ECRules.d.ts +454 -0
  308. package/lib/esm/Validation/ECRules.d.ts.map +1 -0
  309. package/lib/esm/Validation/ECRules.js +578 -0
  310. package/lib/esm/Validation/ECRules.js.map +1 -0
  311. package/lib/esm/Validation/LoggingDiagnosticReporter.d.ts +14 -0
  312. package/lib/esm/Validation/LoggingDiagnosticReporter.d.ts.map +1 -0
  313. package/lib/esm/Validation/LoggingDiagnosticReporter.js +37 -0
  314. package/lib/esm/Validation/LoggingDiagnosticReporter.js.map +1 -0
  315. package/lib/esm/Validation/RuleSuppressionSet.d.ts +60 -0
  316. package/lib/esm/Validation/RuleSuppressionSet.d.ts.map +1 -0
  317. package/lib/esm/Validation/RuleSuppressionSet.js +9 -0
  318. package/lib/esm/Validation/RuleSuppressionSet.js.map +1 -0
  319. package/lib/esm/Validation/Rules.d.ts +65 -0
  320. package/lib/esm/Validation/Rules.d.ts.map +1 -0
  321. package/lib/esm/Validation/Rules.js +9 -0
  322. package/lib/esm/Validation/Rules.js.map +1 -0
  323. package/lib/esm/Validation/SchemaChanges.d.ts +640 -0
  324. package/lib/esm/Validation/SchemaChanges.d.ts.map +1 -0
  325. package/lib/esm/Validation/SchemaChanges.js +1141 -0
  326. package/lib/esm/Validation/SchemaChanges.js.map +1 -0
  327. package/lib/esm/Validation/SchemaCompareDiagnostics.d.ts +423 -0
  328. package/lib/esm/Validation/SchemaCompareDiagnostics.d.ts.map +1 -0
  329. package/lib/esm/Validation/SchemaCompareDiagnostics.js +109 -0
  330. package/lib/esm/Validation/SchemaCompareDiagnostics.js.map +1 -0
  331. package/lib/esm/Validation/SchemaCompareReporter.d.ts +12 -0
  332. package/lib/esm/Validation/SchemaCompareReporter.d.ts.map +1 -0
  333. package/lib/esm/Validation/SchemaCompareReporter.js +9 -0
  334. package/lib/esm/Validation/SchemaCompareReporter.js.map +1 -0
  335. package/lib/esm/Validation/SchemaCompareResultDelegate.d.ts +237 -0
  336. package/lib/esm/Validation/SchemaCompareResultDelegate.d.ts.map +1 -0
  337. package/lib/esm/Validation/SchemaCompareResultDelegate.js +346 -0
  338. package/lib/esm/Validation/SchemaCompareResultDelegate.js.map +1 -0
  339. package/lib/esm/Validation/SchemaCompareVisitor.d.ts +120 -0
  340. package/lib/esm/Validation/SchemaCompareVisitor.d.ts.map +1 -0
  341. package/lib/esm/Validation/SchemaCompareVisitor.js +222 -0
  342. package/lib/esm/Validation/SchemaCompareVisitor.js.map +1 -0
  343. package/lib/esm/Validation/SchemaComparer.d.ts +211 -0
  344. package/lib/esm/Validation/SchemaComparer.d.ts.map +1 -0
  345. package/lib/esm/Validation/SchemaComparer.js +770 -0
  346. package/lib/esm/Validation/SchemaComparer.js.map +1 -0
  347. package/lib/esm/Validation/SchemaValidater.d.ts +20 -0
  348. package/lib/esm/Validation/SchemaValidater.d.ts.map +1 -0
  349. package/lib/esm/Validation/SchemaValidater.js +55 -0
  350. package/lib/esm/Validation/SchemaValidater.js.map +1 -0
  351. package/lib/esm/Validation/SchemaValidationVisitor.d.ts +171 -0
  352. package/lib/esm/Validation/SchemaValidationVisitor.d.ts.map +1 -0
  353. package/lib/esm/Validation/SchemaValidationVisitor.js +488 -0
  354. package/lib/esm/Validation/SchemaValidationVisitor.js.map +1 -0
  355. package/lib/esm/Validation/SchemaWalker.d.ts +23 -0
  356. package/lib/esm/Validation/SchemaWalker.d.ts.map +1 -0
  357. package/lib/esm/Validation/SchemaWalker.js +50 -0
  358. package/lib/esm/Validation/SchemaWalker.js.map +1 -0
  359. package/lib/esm/ecschema-editing.d.ts +49 -0
  360. package/lib/esm/ecschema-editing.d.ts.map +1 -0
  361. package/lib/esm/ecschema-editing.js +52 -0
  362. package/lib/esm/ecschema-editing.js.map +1 -0
  363. package/package.json +12 -10
@@ -8,7 +8,7 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.FormatDiagnosticReporter = exports.SuppressionDiagnosticReporter = void 0;
11
- const assert = require("assert"); // eslint-disable-line @typescript-eslint/no-require-imports
11
+ const assert = require("assert");
12
12
  const translationNamespace = "ECSchemaMetaData";
13
13
  const subTranslationNamespace = "Diagnostics";
14
14
  const baseTranslationKey = `${translationNamespace}:${subTranslationNamespace}`;
@@ -1 +1 @@
1
- {"version":3,"file":"DiagnosticReporter.js","sourceRoot":"","sources":["../../../src/Validation/DiagnosticReporter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAKH,iCAAkC,CAAC,4DAA4D;AAE/F,MAAM,oBAAoB,GAAG,kBAAkB,CAAC;AAChD,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAC9C,MAAM,kBAAkB,GAAG,GAAG,oBAAoB,IAAI,uBAAuB,EAAE,CAAC;AAwBhF;;;;;GAKG;AACH,MAAsB,6BAA6B;IACzC,aAAa,CAAyB;IAE9C;;;OAGG;IACH,YAAY,YAAoC;QAC9C,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC;IACpC,CAAC;IAED;;;OAGG;IACH,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;I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WAAW,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;YAC7D,iBAAiB,GAAG,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3F,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAEO,gBAAgB,CAAC,UAAyB;QAChD,IAAI,CAAC,IAAI,CAAC,YAAY;YACpB,OAAO,UAAU,CAAC,WAAW,CAAC;QAEhC,OAAO,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;IAClF,CAAC;IAEO,iBAAiB,CAAC,UAAyB;QACjD,OAAO,GAAG,kBAAkB,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC;IACpD,CAAC;IAEO,aAAa,CAAI,KAA2B,EAAE,OAAgB;QACpE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;YACvC,OAAO,MAAM,CAAC,KAAK,EAAE,OAAO,CAAU,CAAC;QAEzC,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AApED,4DAoEC","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 Diagnostic\n */\n\nimport { Localization } from \"@itwin/core-common\";\nimport { AnyDiagnostic } from \"./Diagnostic\";\n\nimport assert = require(\"assert\"); // eslint-disable-line @typescript-eslint/no-require-imports\n\nconst translationNamespace = \"ECSchemaMetaData\";\nconst subTranslationNamespace = \"Diagnostics\";\nconst baseTranslationKey = `${translationNamespace}:${subTranslationNamespace}`;\n\n/**\n * Interface used to report [[IDiagnostic]] objects created during schema validation.\n * @beta\n */\nexport interface IDiagnosticReporter {\n /**\n * A map where the key is a schema full name and the value is a collection\n * of diagnostics codes identifying which rules violations to ignore during validation.\n */\n suppressions?: Map<string, string[]>;\n\n /** The localization object to use for message translation. */\n localization?: Localization;\n\n /**\n * Handles the given [[IDiagnostic]] based on the implementation requirements for a\n * given reporter.\n * @param diagnostic The diagnostic to report.\n */\n report(diagnostic: AnyDiagnostic): void;\n}\n\n/**\n * An abstract base class for [[IDiagnosticReporter]] implementation that used the\n * provided Map to suppress certain rule violations from being reported. The Map's key\n * a schema full name, and the Map's value is a collection of rule codes to suppress.\n * @beta\n */\nexport abstract class SuppressionDiagnosticReporter implements IDiagnosticReporter {\n private _suppressions?: Map<string, string[]>;\n\n /**\n * Initializes a new SuppressionDiagnosticReporter\n * @param suppressions A Map where the key is a schema full name and the value is collection of diagnostic codes to suppress.\n */\n constructor(suppressions?: Map<string, string[]>) {\n this._suppressions = suppressions;\n }\n\n /**\n * Gets the collection of ISchemaDiagnosticSuppression objects that identify\n * rules violations to ignore during validation.\n */\n public get suppressions(): Map<string, string[]> | undefined {\n return this._suppressions;\n }\n\n /**\n * Prior to reporting the [[IDiagnostic]], the diagnostic message is formatted (with translations)\n * base on arguments contained in the diagnostic. Calls reportDiagnostic after the message is formatted.\n * @param diagnostic The diagnostic to report.\n */\n public report(diagnostic: AnyDiagnostic) {\n if (this._suppressions && this._suppressions.has(diagnostic.schema.fullName)) {\n const suppressedCodes = this._suppressions.get(diagnostic.schema.fullName);\n if (suppressedCodes!.includes(diagnostic.code))\n return;\n }\n\n this.reportInternal(diagnostic);\n }\n\n /**\n * Handles the given [[IDiagnostic]] based on the implementation requirements for a\n * given reporter.\n * @param diagnostic The diagnostic to report.\n */\n protected abstract reportInternal(diagnostic: AnyDiagnostic): void;\n}\n\n/**\n * An abstract [[SuppressionDiagnosticReporter]] implementation that formats the\n * diagnostic message with the message args. If a Localization implementation is specified,\n * the message will also be translated.\n * @beta\n */\nexport abstract class FormatDiagnosticReporter extends SuppressionDiagnosticReporter {\n /**\n * Initializes a new FormatDiagnosticReporter\n * @param suppressions A Map where the key is a schema full name and the value is collection of diagnostic codes to suppress.\n * @param localization The Localization instance to use to translate validation messages.\n */\n constructor(suppressions?: Map<string, string[]>, localization?: Localization) {\n super(suppressions);\n this.localization = localization;\n }\n\n /** The Localization object to use for message translation. If undefined, no translation will occur. */\n public localization?: Localization;\n\n /**\n * Prior to reporting the [[IDiagnostic]], the diagnostic message is formatted (with translations)\n * base on arguments contained in the diagnostic. Calls reportDiagnostic after the message is formatted.\n * @param diagnostic The diagnostic to report.\n */\n public reportInternal(diagnostic: AnyDiagnostic) {\n const message = this.formatMessage(diagnostic);\n this.reportDiagnostic(diagnostic, message);\n }\n\n /**\n * Handles the given [[IDiagnostic]] based on the implementation requirements for a\n * given reporter.\n * @param diagnostic The diagnostic to report.\n * @param messageText The formatted message.\n */\n protected abstract reportDiagnostic(diagnostic: AnyDiagnostic, messageText: string): void;\n\n /**\n * Helper method that formats string with provided arguments where the place holders\n * are in the the format '{0}', '{1}', etc.\n * @param text The text to format.\n * @param args The arguments to place in the text.\n * @param baseIndex The base index for the args, used for validation (typically 0, which is the default).\n */\n protected formatStringFromArgs(text: string, args: ArrayLike<string>, baseIndex = 0): string {\n return text.replace(/{(\\d+)}/g, (_match, index: string) => this.assertDefined(args[+index + baseIndex]));\n }\n\n private formatMessage(diagnostic: AnyDiagnostic): string {\n let translatedMessage = this.translateMessage(diagnostic);\n\n if (diagnostic.messageArgs && diagnostic.messageArgs.length > 0)\n translatedMessage = this.formatStringFromArgs(translatedMessage, diagnostic.messageArgs);\n return translatedMessage;\n }\n\n private translateMessage(diagnostic: AnyDiagnostic): string {\n if (!this.localization)\n return diagnostic.messageText;\n\n return this.localization.getLocalizedString(this.getTranslationKey(diagnostic));\n }\n\n private getTranslationKey(diagnostic: AnyDiagnostic): string {\n return `${baseTranslationKey}.${diagnostic.code}`;\n }\n\n private assertDefined<T>(value: T | null | undefined, message?: string): T {\n if (value === undefined || value === null)\n return assert(false, message) as never;\n\n return value;\n }\n}\n"]}
1
+ {"version":3,"file":"DiagnosticReporter.js","sourceRoot":"","sources":["../../../src/Validation/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,CAAC,gBAAgB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;IAUD;;;;;;OAMG;IACO,oBAAoB,CAAC,IAAY,EAAE,IAAuB,EAAE,SAAS,GAAG,CAAC;QACjF,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,KAAa,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IAC3G,CAAC;IAEO,aAAa,CAAC,UAAyB;QAC7C,IAAI,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAE1D,IAAI,UAAU,CAAC,WAAW,IAAI,UAAU,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;YAC7D,iBAAiB,GAAG,IAAI,CAAC,oBAAoB,CAAC,iBAAiB,EAAE,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3F,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAEO,gBAAgB,CAAC,UAAyB;QAChD,IAAI,CAAC,IAAI,CAAC,YAAY;YACpB,OAAO,UAAU,CAAC,WAAW,CAAC;QAEhC,OAAO,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;IAClF,CAAC;IAEO,iBAAiB,CAAC,UAAyB;QACjD,OAAO,GAAG,kBAAkB,IAAI,UAAU,CAAC,IAAI,EAAE,CAAC;IACpD,CAAC;IAEO,aAAa,CAAI,KAA2B,EAAE,OAAgB;QACpE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;YACvC,OAAO,MAAM,CAAC,KAAK,EAAE,OAAO,CAAU,CAAC;QAEzC,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AApED,4DAoEC","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 Diagnostic\n */\n\nimport { Localization } from \"@itwin/core-common\";\nimport { AnyDiagnostic } from \"./Diagnostic\";\n\nimport * as assert from \"assert\";\n\nconst translationNamespace = \"ECSchemaMetaData\";\nconst subTranslationNamespace = \"Diagnostics\";\nconst baseTranslationKey = `${translationNamespace}:${subTranslationNamespace}`;\n\n/**\n * Interface used to report [[IDiagnostic]] objects created during schema validation.\n * @beta\n */\nexport interface IDiagnosticReporter {\n /**\n * A map where the key is a schema full name and the value is a collection\n * of diagnostics codes identifying which rules violations to ignore during validation.\n */\n suppressions?: Map<string, string[]>;\n\n /** The localization object to use for message translation. */\n localization?: Localization;\n\n /**\n * Handles the given [[IDiagnostic]] based on the implementation requirements for a\n * given reporter.\n * @param diagnostic The diagnostic to report.\n */\n report(diagnostic: AnyDiagnostic): void;\n}\n\n/**\n * An abstract base class for [[IDiagnosticReporter]] implementation that used the\n * provided Map to suppress certain rule violations from being reported. The Map's key\n * a schema full name, and the Map's value is a collection of rule codes to suppress.\n * @beta\n */\nexport abstract class SuppressionDiagnosticReporter implements IDiagnosticReporter {\n private _suppressions?: Map<string, string[]>;\n\n /**\n * Initializes a new SuppressionDiagnosticReporter\n * @param suppressions A Map where the key is a schema full name and the value is collection of diagnostic codes to suppress.\n */\n constructor(suppressions?: Map<string, string[]>) {\n this._suppressions = suppressions;\n }\n\n /**\n * Gets the collection of ISchemaDiagnosticSuppression objects that identify\n * rules violations to ignore during validation.\n */\n public get suppressions(): Map<string, string[]> | undefined {\n return this._suppressions;\n }\n\n /**\n * Prior to reporting the [[IDiagnostic]], the diagnostic message is formatted (with translations)\n * base on arguments contained in the diagnostic. Calls reportDiagnostic after the message is formatted.\n * @param diagnostic The diagnostic to report.\n */\n public report(diagnostic: AnyDiagnostic) {\n if (this._suppressions && this._suppressions.has(diagnostic.schema.fullName)) {\n const suppressedCodes = this._suppressions.get(diagnostic.schema.fullName);\n if (suppressedCodes!.includes(diagnostic.code))\n return;\n }\n\n this.reportInternal(diagnostic);\n }\n\n /**\n * Handles the given [[IDiagnostic]] based on the implementation requirements for a\n * given reporter.\n * @param diagnostic The diagnostic to report.\n */\n protected abstract reportInternal(diagnostic: AnyDiagnostic): void;\n}\n\n/**\n * An abstract [[SuppressionDiagnosticReporter]] implementation that formats the\n * diagnostic message with the message args. If a Localization implementation is specified,\n * the message will also be translated.\n * @beta\n */\nexport abstract class FormatDiagnosticReporter extends SuppressionDiagnosticReporter {\n /**\n * Initializes a new FormatDiagnosticReporter\n * @param suppressions A Map where the key is a schema full name and the value is collection of diagnostic codes to suppress.\n * @param localization The Localization instance to use to translate validation messages.\n */\n constructor(suppressions?: Map<string, string[]>, localization?: Localization) {\n super(suppressions);\n this.localization = localization;\n }\n\n /** The Localization object to use for message translation. If undefined, no translation will occur. */\n public localization?: Localization;\n\n /**\n * Prior to reporting the [[IDiagnostic]], the diagnostic message is formatted (with translations)\n * base on arguments contained in the diagnostic. Calls reportDiagnostic after the message is formatted.\n * @param diagnostic The diagnostic to report.\n */\n public reportInternal(diagnostic: AnyDiagnostic) {\n const message = this.formatMessage(diagnostic);\n this.reportDiagnostic(diagnostic, message);\n }\n\n /**\n * Handles the given [[IDiagnostic]] based on the implementation requirements for a\n * given reporter.\n * @param diagnostic The diagnostic to report.\n * @param messageText The formatted message.\n */\n protected abstract reportDiagnostic(diagnostic: AnyDiagnostic, messageText: string): void;\n\n /**\n * Helper method that formats string with provided arguments where the place holders\n * are in the the format '{0}', '{1}', etc.\n * @param text The text to format.\n * @param args The arguments to place in the text.\n * @param baseIndex The base index for the args, used for validation (typically 0, which is the default).\n */\n protected formatStringFromArgs(text: string, args: ArrayLike<string>, baseIndex = 0): string {\n return text.replace(/{(\\d+)}/g, (_match, index: string) => this.assertDefined(args[+index + baseIndex]));\n }\n\n private formatMessage(diagnostic: AnyDiagnostic): string {\n let translatedMessage = this.translateMessage(diagnostic);\n\n if (diagnostic.messageArgs && diagnostic.messageArgs.length > 0)\n translatedMessage = this.formatStringFromArgs(translatedMessage, diagnostic.messageArgs);\n return translatedMessage;\n }\n\n private translateMessage(diagnostic: AnyDiagnostic): string {\n if (!this.localization)\n return diagnostic.messageText;\n\n return this.localization.getLocalizedString(this.getTranslationKey(diagnostic));\n }\n\n private getTranslationKey(diagnostic: AnyDiagnostic): string {\n return `${baseTranslationKey}.${diagnostic.code}`;\n }\n\n private assertDefined<T>(value: T | null | undefined, message?: string): T {\n if (value === undefined || value === null)\n return assert(false, message) as never;\n\n return value;\n }\n}\n"]}
@@ -0,0 +1,19 @@
1
+ /** @packageDocumentation
2
+ * @module Differencing
3
+ */
4
+ import type { SchemaKey } from "@itwin/ecschema-metadata";
5
+ import type { AnySchemaDifferenceConflict } from "./SchemaConflicts";
6
+ /**
7
+ * Error class that contains conflicts when differencing two schemas.
8
+ * @alpha
9
+ */
10
+ export declare class SchemaConflictsError extends Error {
11
+ /** Gets an array of conflicts between two schemas. */
12
+ readonly conflicts: ReadonlyArray<AnySchemaDifferenceConflict>;
13
+ /** Gets the name of the source schema. */
14
+ readonly sourceSchema: SchemaKey;
15
+ /** Gets the name of the target schema. */
16
+ readonly targetSchema: SchemaKey;
17
+ constructor(message: string, conflicts: AnySchemaDifferenceConflict[], sourceSchema: SchemaKey, targetSchema: SchemaKey);
18
+ }
19
+ //# sourceMappingURL=Errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Errors.d.ts","sourceRoot":"","sources":["../../../src/Differencing/Errors.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAErE;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,sDAAsD;IACtD,SAAgB,SAAS,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAC;IACtE,0CAA0C;IAC1C,SAAgB,YAAY,EAAE,SAAS,CAAC;IACxC,0CAA0C;IAC1C,SAAgB,YAAY,EAAE,SAAS,CAAC;gBAE5B,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,2BAA2B,EAAE,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS;CAOxH"}
@@ -0,0 +1,26 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Differencing
7
+ */
8
+ /**
9
+ * Error class that contains conflicts when differencing two schemas.
10
+ * @alpha
11
+ */
12
+ export class SchemaConflictsError extends Error {
13
+ /** Gets an array of conflicts between two schemas. */
14
+ conflicts;
15
+ /** Gets the name of the source schema. */
16
+ sourceSchema;
17
+ /** Gets the name of the target schema. */
18
+ targetSchema;
19
+ constructor(message, conflicts, sourceSchema, targetSchema) {
20
+ super(message);
21
+ this.sourceSchema = sourceSchema;
22
+ this.targetSchema = targetSchema;
23
+ this.conflicts = conflicts;
24
+ }
25
+ }
26
+ //# sourceMappingURL=Errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../../src/Differencing/Errors.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH;;;GAGG;AACH,MAAM,OAAO,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","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 Differencing\n */\n\nimport type { SchemaKey } from \"@itwin/ecschema-metadata\";\nimport type { AnySchemaDifferenceConflict } from \"./SchemaConflicts\";\n\n/**\n * Error class that contains conflicts when differencing two schemas.\n * @alpha\n */\nexport class SchemaConflictsError extends Error {\n /** Gets an array of conflicts between two schemas. */\n public readonly conflicts: ReadonlyArray<AnySchemaDifferenceConflict>;\n /** Gets the name of the source schema. */\n public readonly sourceSchema: SchemaKey;\n /** Gets the name of the target schema. */\n public readonly targetSchema: SchemaKey;\n\n constructor(message: string, conflicts: AnySchemaDifferenceConflict[], sourceSchema: SchemaKey, targetSchema: SchemaKey) {\n super(message);\n\n this.sourceSchema = sourceSchema;\n this.targetSchema = targetSchema;\n this.conflicts = conflicts;\n }\n}\n"]}
@@ -0,0 +1,84 @@
1
+ /** @packageDocumentation
2
+ * @module Differencing
3
+ */
4
+ import type { SchemaItemType } from "@itwin/ecschema-metadata";
5
+ import type { AnySchemaDifference, SchemaOtherTypes, SchemaType } from "./SchemaDifference";
6
+ /**
7
+ * The unique conflicts codes for Schema differencing.
8
+ *
9
+ * To provide meaning to code values, with anticipation
10
+ * of future rules for all current EC Types, the following
11
+ * value ranges should be used:
12
+ *
13
+ * - Schema: 000-099
14
+ * - Class: 100-199
15
+ * - Constant: 200-299
16
+ * - CustomAttribute 300-399
17
+ * - CustomAttributeClass: 400-499
18
+ * - CustomAttributeContainer: 500-599
19
+ * - EntityClass: 600-699
20
+ * - Enumeration: 700-799
21
+ * - Format: 800-899
22
+ * - InvertedUnit: 900-999
23
+ * - KindOfQuantity: 1000-1099
24
+ * - Mixin: 1100-1199
25
+ * - Phenomenon: 1200-1299
26
+ * - Property: 1300-1399
27
+ * - PropertyCategory: 1400-1499
28
+ * - RelationshipClass: 1500-1599
29
+ * - RelationshipConstraint: 1600-1699
30
+ * - StructClass: 1700-1799
31
+ * - Unit: 1800-1899
32
+ * - UnitSystem: 1900-1999
33
+ *
34
+ * @alpha
35
+ */
36
+ export declare enum ConflictCode {
37
+ ConflictingItemName = "C-001",
38
+ ConflictingReferenceAlias = "C-002",
39
+ ConflictingReferenceVersion = "C-003",
40
+ ConflictingBaseClass = "C-100",
41
+ RemovingBaseClass = "C-101",
42
+ SealedBaseClass = "C-102",
43
+ ConflictingClassModifier = "C-103",
44
+ ConflictingEnumerationType = "C-700",
45
+ ConflictingEnumeratorValue = "C-701",
46
+ ConflictingFormatUnit = "C-800",
47
+ ConflictingFormatUnitPhenomenon = "C-801",
48
+ ConflictingPersistenceUnit = "C-1010",
49
+ MixinAppliedMustDeriveFromConstraint = "C-1100",
50
+ ConflictingPropertyName = "C-1300",
51
+ ConflictingPropertyKindOfQuantity = "C-1301",
52
+ ConflictingPropertyKindOfQuantityUnit = "C-1302",
53
+ AbstractConstraintMustNarrowBaseConstraints = "C-1500",
54
+ DerivedConstraintsMustNarrowBaseConstraints = "C-1501",
55
+ ConstraintClassesDeriveFromAbstractConstraint = "C-1502"
56
+ }
57
+ /**
58
+ * Defines the interface for a conflict during Schema Differencing. Conflicts were discovered
59
+ * while comparing the changed elements. Conflicts in the whole schema context are not found
60
+ * on that level.
61
+ */
62
+ interface SchemaDifferenceConflict<TCode extends ConflictCode, TType extends SchemaType, TDifference = Extract<AnySchemaDifference, {
63
+ schemaType: TType;
64
+ }>> {
65
+ /** The associated schema difference instance */
66
+ readonly difference: TDifference;
67
+ /** The unique conflicting code. */
68
+ readonly code: TCode;
69
+ /** A description of the conflict. */
70
+ readonly description: string;
71
+ /** The value in the source schema. */
72
+ readonly source: unknown;
73
+ /** The value in the target schema. */
74
+ readonly target: unknown;
75
+ }
76
+ /** Union type of class types */
77
+ type EcClassTypes = SchemaItemType.CustomAttributeClass | SchemaItemType.EntityClass | SchemaItemType.StructClass | SchemaItemType.Mixin | SchemaItemType.RelationshipClass;
78
+ /**
79
+ * Union of all supported schema differencing conflict types.
80
+ * @alpha
81
+ */
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>;
83
+ export {};
84
+ //# sourceMappingURL=SchemaConflicts.d.ts.map
@@ -0,0 +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,qBAAqB,UAAU;IAC/B,+BAA+B,UAAU;IAEzC,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,SAAS,UAAU,EAAE,WAAW,GAAG,OAAO,CAAC,mBAAmB,EAAE;IAAE,UAAU,EAAE,KAAK,CAAA;CAAE,CAAC;IACxJ,gDAAgD;IAChD,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC;IAEjC,mCAAmC;IACnC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAErB,qCAAqC;IACrC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B,sCAAsC;IACtC,QAAQ,CA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AAgB,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"}
@@ -0,0 +1,60 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Differencing
7
+ */
8
+ /**
9
+ * The unique conflicts codes for Schema differencing.
10
+ *
11
+ * To provide meaning to code values, with anticipation
12
+ * of future rules for all current EC Types, the following
13
+ * value ranges should be used:
14
+ *
15
+ * - Schema: 000-099
16
+ * - Class: 100-199
17
+ * - Constant: 200-299
18
+ * - CustomAttribute 300-399
19
+ * - CustomAttributeClass: 400-499
20
+ * - CustomAttributeContainer: 500-599
21
+ * - EntityClass: 600-699
22
+ * - Enumeration: 700-799
23
+ * - Format: 800-899
24
+ * - InvertedUnit: 900-999
25
+ * - KindOfQuantity: 1000-1099
26
+ * - Mixin: 1100-1199
27
+ * - Phenomenon: 1200-1299
28
+ * - Property: 1300-1399
29
+ * - PropertyCategory: 1400-1499
30
+ * - RelationshipClass: 1500-1599
31
+ * - RelationshipConstraint: 1600-1699
32
+ * - StructClass: 1700-1799
33
+ * - Unit: 1800-1899
34
+ * - UnitSystem: 1900-1999
35
+ *
36
+ * @alpha
37
+ */
38
+ export var ConflictCode;
39
+ (function (ConflictCode) {
40
+ ConflictCode["ConflictingItemName"] = "C-001";
41
+ ConflictCode["ConflictingReferenceAlias"] = "C-002";
42
+ ConflictCode["ConflictingReferenceVersion"] = "C-003";
43
+ ConflictCode["ConflictingBaseClass"] = "C-100";
44
+ ConflictCode["RemovingBaseClass"] = "C-101";
45
+ ConflictCode["SealedBaseClass"] = "C-102";
46
+ ConflictCode["ConflictingClassModifier"] = "C-103";
47
+ ConflictCode["ConflictingEnumerationType"] = "C-700";
48
+ ConflictCode["ConflictingEnumeratorValue"] = "C-701";
49
+ ConflictCode["ConflictingFormatUnit"] = "C-800";
50
+ ConflictCode["ConflictingFormatUnitPhenomenon"] = "C-801";
51
+ ConflictCode["ConflictingPersistenceUnit"] = "C-1010";
52
+ ConflictCode["MixinAppliedMustDeriveFromConstraint"] = "C-1100";
53
+ ConflictCode["ConflictingPropertyName"] = "C-1300";
54
+ ConflictCode["ConflictingPropertyKindOfQuantity"] = "C-1301";
55
+ ConflictCode["ConflictingPropertyKindOfQuantityUnit"] = "C-1302";
56
+ ConflictCode["AbstractConstraintMustNarrowBaseConstraints"] = "C-1500";
57
+ ConflictCode["DerivedConstraintsMustNarrowBaseConstraints"] = "C-1501";
58
+ ConflictCode["ConstraintClassesDeriveFromAbstractConstraint"] = "C-1502";
59
+ })(ConflictCode || (ConflictCode = {}));
60
+ //# sourceMappingURL=SchemaConflicts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SchemaConflicts.js","sourceRoot":"","sources":["../../../src/Differencing/SchemaConflicts.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAKH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAN,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,KAAZ,YAAY,QA2BvB","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 Differencing\n */\n\nimport type { SchemaItemType } from \"@itwin/ecschema-metadata\";\nimport type { AnySchemaDifference, SchemaOtherTypes, SchemaType } from \"./SchemaDifference\";\n\n/**\n * The unique conflicts codes for Schema differencing.\n *\n * To provide meaning to code values, with anticipation\n * of future rules for all current EC Types, the following\n * value ranges should be used:\n *\n * - Schema: 000-099\n * - Class: 100-199\n * - Constant: 200-299\n * - CustomAttribute 300-399\n * - CustomAttributeClass: 400-499\n * - CustomAttributeContainer: 500-599\n * - EntityClass: 600-699\n * - Enumeration: 700-799\n * - Format: 800-899\n * - InvertedUnit: 900-999\n * - KindOfQuantity: 1000-1099\n * - Mixin: 1100-1199\n * - Phenomenon: 1200-1299\n * - Property: 1300-1399\n * - PropertyCategory: 1400-1499\n * - RelationshipClass: 1500-1599\n * - RelationshipConstraint: 1600-1699\n * - StructClass: 1700-1799\n * - Unit: 1800-1899\n * - UnitSystem: 1900-1999\n *\n * @alpha\n */\nexport enum ConflictCode {\n\n ConflictingItemName = \"C-001\",\n ConflictingReferenceAlias = \"C-002\",\n ConflictingReferenceVersion = \"C-003\",\n\n ConflictingBaseClass = \"C-100\",\n RemovingBaseClass = \"C-101\",\n SealedBaseClass = \"C-102\",\n ConflictingClassModifier = \"C-103\",\n\n ConflictingEnumerationType = \"C-700\",\n ConflictingEnumeratorValue = \"C-701\",\n\n ConflictingFormatUnit = \"C-800\",\n ConflictingFormatUnitPhenomenon = \"C-801\",\n\n ConflictingPersistenceUnit = \"C-1010\",\n MixinAppliedMustDeriveFromConstraint = \"C-1100\",\n\n ConflictingPropertyName = \"C-1300\",\n ConflictingPropertyKindOfQuantity = \"C-1301\",\n ConflictingPropertyKindOfQuantityUnit = \"C-1302\",\n\n AbstractConstraintMustNarrowBaseConstraints = \"C-1500\",\n DerivedConstraintsMustNarrowBaseConstraints = \"C-1501\",\n ConstraintClassesDeriveFromAbstractConstraint = \"C-1502\",\n}\n\n/**\n * Defines the interface for a conflict during Schema Differencing. Conflicts were discovered\n * while comparing the changed elements. Conflicts in the whole schema context are not found\n * on that level.\n */\ninterface SchemaDifferenceConflict<TCode extends ConflictCode, TType extends SchemaType, TDifference = Extract<AnySchemaDifference, { schemaType: TType }>> {\n /** The associated schema difference instance */\n readonly difference: TDifference;\n\n /** The unique conflicting code. */\n readonly code: TCode;\n\n /** A description of the conflict. */\n readonly description: string;\n\n /** The value in the source schema. */\n readonly source: unknown;\n\n /** The value in the target schema. */\n readonly target: unknown;\n}\n\n/** Union type of class types */\ntype EcClassTypes = SchemaItemType.CustomAttributeClass | SchemaItemType.EntityClass | SchemaItemType.StructClass | SchemaItemType.Mixin | SchemaItemType.RelationshipClass;\n\n/**\n * Union of all supported schema differencing conflict types.\n * @alpha\n */\nexport type AnySchemaDifferenceConflict =\n SchemaDifferenceConflict<ConflictCode.ConflictingItemName, SchemaItemType> |\n SchemaDifferenceConflict<ConflictCode.ConflictingReferenceAlias, SchemaOtherTypes.SchemaReference> |\n SchemaDifferenceConflict<ConflictCode.ConflictingReferenceVersion, SchemaOtherTypes.SchemaReference> |\n SchemaDifferenceConflict<ConflictCode.ConflictingBaseClass, EcClassTypes> |\n SchemaDifferenceConflict<ConflictCode.RemovingBaseClass, EcClassTypes> |\n SchemaDifferenceConflict<ConflictCode.SealedBaseClass, EcClassTypes> |\n SchemaDifferenceConflict<ConflictCode.ConflictingClassModifier, EcClassTypes> |\n SchemaDifferenceConflict<ConflictCode.ConflictingEnumerationType, SchemaItemType.Enumeration> |\n SchemaDifferenceConflict<ConflictCode.ConflictingEnumeratorValue, SchemaOtherTypes.Enumerator> |\n SchemaDifferenceConflict<ConflictCode.ConflictingPersistenceUnit, SchemaItemType.KindOfQuantity> |\n SchemaDifferenceConflict<ConflictCode.MixinAppliedMustDeriveFromConstraint, SchemaOtherTypes.EntityClassMixin> |\n SchemaDifferenceConflict<ConflictCode.ConflictingPropertyName, SchemaOtherTypes.Property> |\n SchemaDifferenceConflict<ConflictCode.ConflictingPropertyKindOfQuantity, SchemaOtherTypes.Property> |\n SchemaDifferenceConflict<ConflictCode.ConflictingPropertyKindOfQuantityUnit, SchemaOtherTypes.Property> |\n SchemaDifferenceConflict<ConflictCode.ConflictingFormatUnit, SchemaOtherTypes.FormatUnit> |\n SchemaDifferenceConflict<ConflictCode.ConflictingFormatUnitPhenomenon, SchemaOtherTypes.FormatUnit> |\n SchemaDifferenceConflict<ConflictCode.AbstractConstraintMustNarrowBaseConstraints, SchemaOtherTypes.RelationshipConstraint> |\n SchemaDifferenceConflict<ConflictCode.DerivedConstraintsMustNarrowBaseConstraints, SchemaOtherTypes.RelationshipConstraint> |\n SchemaDifferenceConflict<ConflictCode.ConstraintClassesDeriveFromAbstractConstraint, SchemaOtherTypes.RelationshipConstraint>\n;\n"]}
@@ -0,0 +1,41 @@
1
+ /** @packageDocumentation
2
+ * @module Differencing
3
+ */
4
+ import type { AnyDiagnostic } from "../Validation/Diagnostic";
5
+ import { type AnySchemaItemDifference, type AnySchemaItemPathDifference, type CustomAttributeDifference, type EntityClassMixinDifference, type FormatUnitDifference, type KindOfQuantityPresentationFormatDifference, type SchemaDifference, type SchemaReferenceDifference } from "./SchemaDifference";
6
+ /**
7
+ * The SchemaDiagnosticVisitor is a visitor implementation for diagnostic entries
8
+ * from the schema comparer api. Depending on the diagnostic code, the difference
9
+ * result is build together.
10
+ * @internal
11
+ */
12
+ export declare class SchemaDiagnosticVisitor {
13
+ readonly schemaDifferences: Array<SchemaDifference | SchemaReferenceDifference>;
14
+ readonly schemaItemDifferences: Array<AnySchemaItemDifference | EntityClassMixinDifference | KindOfQuantityPresentationFormatDifference | FormatUnitDifference>;
15
+ readonly schemaItemPathDifferences: Array<AnySchemaItemPathDifference>;
16
+ readonly customAttributeDifferences: Array<CustomAttributeDifference>;
17
+ constructor();
18
+ /**
19
+ * Visitor function to process the schema change diagnostic object.
20
+ * @internal
21
+ */
22
+ visit(diagnostic: AnyDiagnostic): number | void;
23
+ private visitChangedSchemaProperties;
24
+ private visitMissingSchemaItem;
25
+ private visitChangedSchemaItem;
26
+ private visitMissingEnumerator;
27
+ private lookupEnumeratorEntry;
28
+ private visitChangedEnumerator;
29
+ private visitMissingProperty;
30
+ private visitChangedProperty;
31
+ private visitMissingBaseClass;
32
+ private visitMissingMixinOnClass;
33
+ private visitMissingRelationshipConstraintClass;
34
+ private visitChangedRelationshipConstraint;
35
+ private visitSchemaReference;
36
+ private visitMissingCustomAttributeInstance;
37
+ private visitMissingPresentationUnit;
38
+ private visitMissingFormatUnit;
39
+ private visitChangedFormatUnitLabel;
40
+ }
41
+ //# sourceMappingURL=SchemaDiagnosticVisitor.d.ts.map
@@ -0,0 +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,oBAAoB,EACzB,KAAK,0CAA0C,EAG/C,KAAK,gBAAgB,EAErB,KAAK,yBAAyB,EAC/B,MAAM,oBAAoB,CAAC;AAE5B;;;;;GAKG;AAC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