@itwin/ecschema-editing 4.2.0-dev.9 → 4.2.0

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 (100) hide show
  1. package/CHANGELOG.md +66 -1
  2. package/lib/cjs/Editing/Constants.js.map +1 -1
  3. package/lib/cjs/Editing/CustomAttributes.js.map +1 -1
  4. package/lib/cjs/Editing/ECClasses.js.map +1 -1
  5. package/lib/cjs/Editing/Editor.js.map +1 -1
  6. package/lib/cjs/Editing/Entities.js.map +1 -1
  7. package/lib/cjs/Editing/Enumerations.js.map +1 -1
  8. package/lib/cjs/Editing/Formats.js.map +1 -1
  9. package/lib/cjs/Editing/InvertedUnits.js.map +1 -1
  10. package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
  11. package/lib/cjs/Editing/Mixins.js.map +1 -1
  12. package/lib/cjs/Editing/Mutable/MutableCAClass.js.map +1 -1
  13. package/lib/cjs/Editing/Mutable/MutableClass.js.map +1 -1
  14. package/lib/cjs/Editing/Mutable/MutableConstant.js.map +1 -1
  15. package/lib/cjs/Editing/Mutable/MutableEntityClass.js.map +1 -1
  16. package/lib/cjs/Editing/Mutable/MutableEnumeration.js.map +1 -1
  17. package/lib/cjs/Editing/Mutable/MutableFormat.js.map +1 -1
  18. package/lib/cjs/Editing/Mutable/MutableInvertedUnit.js.map +1 -1
  19. package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js.map +1 -1
  20. package/lib/cjs/Editing/Mutable/MutableMixin.js.map +1 -1
  21. package/lib/cjs/Editing/Mutable/MutablePhenomenon.js.map +1 -1
  22. package/lib/cjs/Editing/Mutable/MutableProperty.js.map +1 -1
  23. package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js.map +1 -1
  24. package/lib/cjs/Editing/Mutable/MutableRelationshipClass.js.map +1 -1
  25. package/lib/cjs/Editing/Mutable/MutableSchema.js.map +1 -1
  26. package/lib/cjs/Editing/Mutable/MutableUnit.js.map +1 -1
  27. package/lib/cjs/Editing/Mutable/MutableUnitSystem.js.map +1 -1
  28. package/lib/cjs/Editing/Phenomena.js.map +1 -1
  29. package/lib/cjs/Editing/PropertyCategories.js.map +1 -1
  30. package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
  31. package/lib/cjs/Editing/Structs.js.map +1 -1
  32. package/lib/cjs/Editing/UnitSystems.js.map +1 -1
  33. package/lib/cjs/Editing/Units.js.map +1 -1
  34. package/lib/cjs/Merging/CAClassMerger.d.ts +7 -0
  35. package/lib/cjs/Merging/CAClassMerger.d.ts.map +1 -0
  36. package/lib/cjs/Merging/CAClassMerger.js +28 -0
  37. package/lib/cjs/Merging/CAClassMerger.js.map +1 -0
  38. package/lib/cjs/Merging/ClassMerger.d.ts +7 -0
  39. package/lib/cjs/Merging/ClassMerger.d.ts.map +1 -0
  40. package/lib/cjs/Merging/ClassMerger.js +59 -0
  41. package/lib/cjs/Merging/ClassMerger.js.map +1 -0
  42. package/lib/cjs/Merging/ConstantMerger.d.ts +12 -0
  43. package/lib/cjs/Merging/ConstantMerger.d.ts.map +1 -0
  44. package/lib/cjs/Merging/ConstantMerger.js +56 -0
  45. package/lib/cjs/Merging/ConstantMerger.js.map +1 -0
  46. package/lib/cjs/Merging/EnumerationMerger.d.ts +12 -0
  47. package/lib/cjs/Merging/EnumerationMerger.d.ts.map +1 -0
  48. package/lib/cjs/Merging/EnumerationMerger.js +83 -0
  49. package/lib/cjs/Merging/EnumerationMerger.js.map +1 -0
  50. package/lib/cjs/Merging/PhenomenonMerger.d.ts +7 -0
  51. package/lib/cjs/Merging/PhenomenonMerger.d.ts.map +1 -0
  52. package/lib/cjs/Merging/PhenomenonMerger.js +16 -0
  53. package/lib/cjs/Merging/PhenomenonMerger.js.map +1 -0
  54. package/lib/cjs/Merging/PropertyCategoryMerger.d.ts +7 -0
  55. package/lib/cjs/Merging/PropertyCategoryMerger.d.ts.map +1 -0
  56. package/lib/cjs/Merging/PropertyCategoryMerger.js +16 -0
  57. package/lib/cjs/Merging/PropertyCategoryMerger.js.map +1 -0
  58. package/lib/cjs/Merging/SchemaItemFactory.d.ts +8 -0
  59. package/lib/cjs/Merging/SchemaItemFactory.d.ts.map +1 -0
  60. package/lib/cjs/Merging/SchemaItemFactory.js +38 -0
  61. package/lib/cjs/Merging/SchemaItemFactory.js.map +1 -0
  62. package/lib/cjs/Merging/SchemaItemMerger.d.ts +31 -0
  63. package/lib/cjs/Merging/SchemaItemMerger.d.ts.map +1 -0
  64. package/lib/cjs/Merging/SchemaItemMerger.js +90 -0
  65. package/lib/cjs/Merging/SchemaItemMerger.js.map +1 -0
  66. package/lib/cjs/Merging/SchemaMerger.d.ts +36 -0
  67. package/lib/cjs/Merging/SchemaMerger.d.ts.map +1 -0
  68. package/lib/cjs/Merging/SchemaMerger.js +94 -0
  69. package/lib/cjs/Merging/SchemaMerger.js.map +1 -0
  70. package/lib/cjs/Merging/SchemaReferenceMerger.d.ts +10 -0
  71. package/lib/cjs/Merging/SchemaReferenceMerger.d.ts.map +1 -0
  72. package/lib/cjs/Merging/SchemaReferenceMerger.js +55 -0
  73. package/lib/cjs/Merging/SchemaReferenceMerger.js.map +1 -0
  74. package/lib/cjs/Validation/Diagnostic.js.map +1 -1
  75. package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
  76. package/lib/cjs/Validation/ECRules.js.map +1 -1
  77. package/lib/cjs/Validation/LoggingDiagnosticReporter.js.map +1 -1
  78. package/lib/cjs/Validation/RuleSuppressionSet.js.map +1 -1
  79. package/lib/cjs/Validation/Rules.js.map +1 -1
  80. package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
  81. package/lib/cjs/Validation/SchemaCompareDiagnostics.js.map +1 -1
  82. package/lib/cjs/Validation/SchemaCompareReporter.js.map +1 -1
  83. package/lib/cjs/Validation/SchemaCompareResultDelegate.js.map +1 -1
  84. package/lib/cjs/Validation/SchemaCompareVisitor.d.ts +4 -2
  85. package/lib/cjs/Validation/SchemaCompareVisitor.d.ts.map +1 -1
  86. package/lib/cjs/Validation/SchemaCompareVisitor.js +23 -19
  87. package/lib/cjs/Validation/SchemaCompareVisitor.js.map +1 -1
  88. package/lib/cjs/Validation/SchemaComparer.d.ts +9 -1
  89. package/lib/cjs/Validation/SchemaComparer.d.ts.map +1 -1
  90. package/lib/cjs/Validation/SchemaComparer.js +4 -3
  91. package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
  92. package/lib/cjs/Validation/SchemaValidater.js.map +1 -1
  93. package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
  94. package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
  95. package/lib/cjs/ecschema-editing.d.ts +5 -0
  96. package/lib/cjs/ecschema-editing.d.ts.map +1 -1
  97. package/lib/cjs/ecschema-editing.js +7 -1
  98. package/lib/cjs/ecschema-editing.js.map +1 -1
  99. package/package.json +10 -10
  100. package/public/locales/en/ECSchemaEditing.json +26 -26
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaWalker.js","sourceRoot":"","sources":["../../../src/Validation/SchemaWalker.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,gEAEkC;AAElC;;;;GAIG;AACH,MAAa,YAAY;IAOvB;;;OAGG;IACH,YAAY,OAA2B;QACrC,IAAI,CAAC,cAAc,GAAG,IAAI,6CAAyB,CAAC,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,cAAc,CAAmB,MAAS;QACrD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAEtB,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC9C,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAElD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;YACxC,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACtC,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,KAAK,CAAC,kBAAkB,CAAC,UAAsB;QACrD,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAEtD,IAAI,2BAAO,CAAC,SAAS,CAAC,UAAU,CAAC;YAC/B,MAAM,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;IAEO,KAAK,CAAC,aAAa,CAAC,OAAgB;QAC1C,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE;gBACzC,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;aACrD;SACF;QAED,IAAI,OAAO,CAAC,cAAc,KAAK,kCAAc,CAAC,iBAAiB,EAAE;YAC/D,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAE,OAA6B,CAAC,MAAM,CAAC,CAAC;YACjF,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAE,OAA6B,CAAC,MAAM,CAAC,CAAC;SAClF;IACH,CAAC;CACF;AAjDD,oCAiDC","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\nimport { ECClass, ISchemaPartVisitor, RelationshipClass, Schema, SchemaItem,\n SchemaItemType, SchemaPartVisitorDelegate,\n} from \"@itwin/ecschema-metadata\";\n\n/**\n * The purpose of this class is to traverse a given schema, allowing clients to hook into\n * the traversal process via Visitors to allow for custom processing of the schema elements.\n * @internal\n */\nexport class SchemaWalker {\n private _visitorHelper: SchemaPartVisitorDelegate;\n\n // This is a cache of the schema we are traversing. The schema also exists within the _context but in order\n // to not have to go back to the context every time we use this cache.\n private _schema?: Schema;\n\n /**\n * Initializes a new SchemaWalker instance.\n * @param visitor An ISchemaWalkerVisitor implementation whose methods will be called during schema traversal.\n */\n constructor(visitor: ISchemaPartVisitor) {\n this._visitorHelper = new SchemaPartVisitorDelegate(visitor);\n }\n\n /**\n * Traverses the given Schema, calling ISchemaWalkerVisitor methods along the way.\n * @param schema The Schema to traverse.\n */\n public async traverseSchema<T extends Schema>(schema: T): Promise<T> {\n this._schema = schema;\n\n await this._visitorHelper.visitSchema(schema);\n await this._visitorHelper.visitSchemaPart(schema);\n\n for (const item of this._schema.getItems())\n await this.traverseSchemaItem(item);\n return schema;\n }\n\n private async traverseSchemaItem(schemaItem: SchemaItem): Promise<void> {\n await this._visitorHelper.visitSchemaPart(schemaItem);\n\n if (ECClass.isECClass(schemaItem))\n await this.traverseClass(schemaItem);\n }\n\n private async traverseClass(ecClass: ECClass): Promise<void> {\n if (ecClass.properties) {\n for (const property of ecClass.properties) {\n await this._visitorHelper.visitSchemaPart(property);\n }\n }\n\n if (ecClass.schemaItemType === SchemaItemType.RelationshipClass) {\n await this._visitorHelper.visitSchemaPart((ecClass as RelationshipClass).source);\n await this._visitorHelper.visitSchemaPart((ecClass as RelationshipClass).target);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"SchemaWalker.js","sourceRoot":"","sources":["../../../src/Validation/SchemaWalker.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,gEAEkC;AAElC;;;;GAIG;AACH,MAAa,YAAY;IAOvB;;;OAGG;IACH,YAAY,OAA2B;QACrC,IAAI,CAAC,cAAc,GAAG,IAAI,6CAAyB,CAAC,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,cAAc,CAAmB,MAAS;QACrD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAEtB,MAAM,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAC9C,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAElD,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;YACxC,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QACtC,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,KAAK,CAAC,kBAAkB,CAAC,UAAsB;QACrD,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAEtD,IAAI,2BAAO,CAAC,SAAS,CAAC,UAAU,CAAC;YAC/B,MAAM,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;IAEO,KAAK,CAAC,aAAa,CAAC,OAAgB;QAC1C,IAAI,OAAO,CAAC,UAAU,EAAE;YACtB,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE;gBACzC,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;aACrD;SACF;QAED,IAAI,OAAO,CAAC,cAAc,KAAK,kCAAc,CAAC,iBAAiB,EAAE;YAC/D,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAE,OAA6B,CAAC,MAAM,CAAC,CAAC;YACjF,MAAM,IAAI,CAAC,cAAc,CAAC,eAAe,CAAE,OAA6B,CAAC,MAAM,CAAC,CAAC;SAClF;IACH,CAAC;CACF;AAjDD,oCAiDC","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\r\nimport { ECClass, ISchemaPartVisitor, RelationshipClass, Schema, SchemaItem,\r\n SchemaItemType, SchemaPartVisitorDelegate,\r\n} from \"@itwin/ecschema-metadata\";\r\n\r\n/**\r\n * The purpose of this class is to traverse a given schema, allowing clients to hook into\r\n * the traversal process via Visitors to allow for custom processing of the schema elements.\r\n * @internal\r\n */\r\nexport class SchemaWalker {\r\n private _visitorHelper: SchemaPartVisitorDelegate;\r\n\r\n // This is a cache of the schema we are traversing. The schema also exists within the _context but in order\r\n // to not have to go back to the context every time we use this cache.\r\n private _schema?: Schema;\r\n\r\n /**\r\n * Initializes a new SchemaWalker instance.\r\n * @param visitor An ISchemaWalkerVisitor implementation whose methods will be called during schema traversal.\r\n */\r\n constructor(visitor: ISchemaPartVisitor) {\r\n this._visitorHelper = new SchemaPartVisitorDelegate(visitor);\r\n }\r\n\r\n /**\r\n * Traverses the given Schema, calling ISchemaWalkerVisitor methods along the way.\r\n * @param schema The Schema to traverse.\r\n */\r\n public async traverseSchema<T extends Schema>(schema: T): Promise<T> {\r\n this._schema = schema;\r\n\r\n await this._visitorHelper.visitSchema(schema);\r\n await this._visitorHelper.visitSchemaPart(schema);\r\n\r\n for (const item of this._schema.getItems())\r\n await this.traverseSchemaItem(item);\r\n return schema;\r\n }\r\n\r\n private async traverseSchemaItem(schemaItem: SchemaItem): Promise<void> {\r\n await this._visitorHelper.visitSchemaPart(schemaItem);\r\n\r\n if (ECClass.isECClass(schemaItem))\r\n await this.traverseClass(schemaItem);\r\n }\r\n\r\n private async traverseClass(ecClass: ECClass): Promise<void> {\r\n if (ecClass.properties) {\r\n for (const property of ecClass.properties) {\r\n await this._visitorHelper.visitSchemaPart(property);\r\n }\r\n }\r\n\r\n if (ecClass.schemaItemType === SchemaItemType.RelationshipClass) {\r\n await this._visitorHelper.visitSchemaPart((ecClass as RelationshipClass).source);\r\n await this._visitorHelper.visitSchemaPart((ecClass as RelationshipClass).target);\r\n }\r\n }\r\n}\r\n"]}
@@ -12,6 +12,7 @@ export * from "./Validation/SchemaCompareReporter";
12
12
  export * from "./Editing/Editor";
13
13
  export { ISuppressionRule, IRuleSuppressionSet, IRuleSuppressionMap } from "./Validation/RuleSuppressionSet";
14
14
  export { SchemaValidater } from "./Validation/SchemaValidater";
15
+ export { SchemaMerger } from "./Merging/SchemaMerger";
15
16
  /** @docs-package-description
16
17
  * The ecschema-editing package contains classes for validating, and editing ECSchemas that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).
17
18
  */
@@ -31,4 +32,8 @@ export { SchemaValidater } from "./Validation/SchemaValidater";
31
32
  * @docs-group-description Comparison
32
33
  * Set of classes to enable comparison of ECSchemas.
33
34
  */
35
+ /**
36
+ * @docs-group-description Merging
37
+ * Set of classes used to merge schemas.
38
+ */
34
39
  //# sourceMappingURL=ecschema-editing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ecschema-editing.d.ts","sourceRoot":"","sources":["../../src/ecschema-editing.ts"],"names":[],"mappings":"AAKA,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC/E,cAAc,wCAAwC,CAAC;AACvD,cAAc,oBAAoB,CAAC;AACnC,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
1
+ {"version":3,"file":"ecschema-editing.d.ts","sourceRoot":"","sources":["../../src/ecschema-editing.ts"],"names":[],"mappings":"AAKA,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC/E,cAAc,wCAAwC,CAAC;AACvD,cAAc,oBAAoB,CAAC;AACnC,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG"}
@@ -18,7 +18,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
18
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
19
  };
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.SchemaValidater = exports.ECRuleSet = exports.Diagnostics = exports.DiagnosticCodes = void 0;
21
+ exports.SchemaMerger = exports.SchemaValidater = exports.ECRuleSet = exports.Diagnostics = exports.DiagnosticCodes = void 0;
22
22
  __exportStar(require("./Validation/Diagnostic"), exports);
23
23
  __exportStar(require("./Validation/DiagnosticReporter"), exports);
24
24
  /* eslint-disable-next-line deprecation/deprecation */
@@ -37,6 +37,8 @@ __exportStar(require("./Validation/SchemaCompareReporter"), exports);
37
37
  __exportStar(require("./Editing/Editor"), exports);
38
38
  var SchemaValidater_1 = require("./Validation/SchemaValidater");
39
39
  Object.defineProperty(exports, "SchemaValidater", { enumerable: true, get: function () { return SchemaValidater_1.SchemaValidater; } });
40
+ var SchemaMerger_1 = require("./Merging/SchemaMerger");
41
+ Object.defineProperty(exports, "SchemaMerger", { enumerable: true, get: function () { return SchemaMerger_1.SchemaMerger; } });
40
42
  /** @docs-package-description
41
43
  * The ecschema-editing package contains classes for validating, and editing ECSchemas that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).
42
44
  */
@@ -56,4 +58,8 @@ Object.defineProperty(exports, "SchemaValidater", { enumerable: true, get: funct
56
58
  * @docs-group-description Comparison
57
59
  * Set of classes to enable comparison of ECSchemas.
58
60
  */
61
+ /**
62
+ * @docs-group-description Merging
63
+ * Set of classes used to merge schemas.
64
+ */
59
65
  //# sourceMappingURL=ecschema-editing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ecschema-editing.js","sourceRoot":"","sources":["../../src/ecschema-editing.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;AAE/F,0DAAwC;AACxC,kEAAgD;AAChD,sDAAsD;AACtD,gDAA+E;AAAtE,0GAAA,eAAe,OAAA;AAAE,sGAAA,WAAW,OAAA;AAAE,oGAAA,SAAS,OAAA;AAChD,yEAAuD;AACvD,qDAAmC;AACnC,uEAAqD;AACrD,4DAA0C;AAC1C,wEAAsD;AACtD,6DAA2C;AAC3C,8DAA4C;AAC5C,qEAAmD;AACnD,mDAAiC;AAEjC,gEAA+D;AAAtD,kHAAA,eAAe,OAAA;AAExB;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\nexport * from \"./Validation/Diagnostic\";\nexport * from \"./Validation/DiagnosticReporter\";\n/* eslint-disable-next-line deprecation/deprecation */\nexport { DiagnosticCodes, Diagnostics, ECRuleSet } from \"./Validation/ECRules\";\nexport * from \"./Validation/LoggingDiagnosticReporter\";\nexport * from \"./Validation/Rules\";\nexport * from \"./Validation/SchemaValidationVisitor\";\nexport * from \"./Validation/SchemaWalker\";\nexport * from \"./Validation/SchemaCompareDiagnostics\";\nexport * from \"./Validation/SchemaChanges\";\nexport * from \"./Validation/SchemaComparer\";\nexport * from \"./Validation/SchemaCompareReporter\";\nexport * from \"./Editing/Editor\";\nexport { ISuppressionRule, IRuleSuppressionSet, IRuleSuppressionMap } from \"./Validation/RuleSuppressionSet\";\nexport { SchemaValidater } from \"./Validation/SchemaValidater\";\n\n/** @docs-package-description\n * The ecschema-editing package contains classes for validating, and editing ECSchemas that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Editing\n * Set of classes used to perform editing of ECSchemas.\n */\n/**\n * @docs-group-description Diagnostic\n * Set of classes to categorize and manage ECSchema validation results.\n */\n/**\n * @docs-group-description Validation\n * Set of classes used to perform validation on ECSchemas.\n */\n/**\n * @docs-group-description Comparison\n * Set of classes to enable comparison of ECSchemas.\n */\n"]}
1
+ {"version":3,"file":"ecschema-editing.js","sourceRoot":"","sources":["../../src/ecschema-editing.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;;AAE/F,0DAAwC;AACxC,kEAAgD;AAChD,sDAAsD;AACtD,gDAA+E;AAAtE,0GAAA,eAAe,OAAA;AAAE,sGAAA,WAAW,OAAA;AAAE,oGAAA,SAAS,OAAA;AAChD,yEAAuD;AACvD,qDAAmC;AACnC,uEAAqD;AACrD,4DAA0C;AAC1C,wEAAsD;AACtD,6DAA2C;AAC3C,8DAA4C;AAC5C,qEAAmD;AACnD,mDAAiC;AAEjC,gEAA+D;AAAtD,kHAAA,eAAe,OAAA;AACxB,uDAAsD;AAA7C,4GAAA,YAAY,OAAA;AAErB;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\r\nexport * from \"./Validation/Diagnostic\";\r\nexport * from \"./Validation/DiagnosticReporter\";\r\n/* eslint-disable-next-line deprecation/deprecation */\r\nexport { DiagnosticCodes, Diagnostics, ECRuleSet } from \"./Validation/ECRules\";\r\nexport * from \"./Validation/LoggingDiagnosticReporter\";\r\nexport * from \"./Validation/Rules\";\r\nexport * from \"./Validation/SchemaValidationVisitor\";\r\nexport * from \"./Validation/SchemaWalker\";\r\nexport * from \"./Validation/SchemaCompareDiagnostics\";\r\nexport * from \"./Validation/SchemaChanges\";\r\nexport * from \"./Validation/SchemaComparer\";\r\nexport * from \"./Validation/SchemaCompareReporter\";\r\nexport * from \"./Editing/Editor\";\r\nexport { ISuppressionRule, IRuleSuppressionSet, IRuleSuppressionMap } from \"./Validation/RuleSuppressionSet\";\r\nexport { SchemaValidater } from \"./Validation/SchemaValidater\";\r\nexport { SchemaMerger } from \"./Merging/SchemaMerger\";\r\n\r\n/** @docs-package-description\r\n * The ecschema-editing package contains classes for validating, and editing ECSchemas that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Editing\r\n * Set of classes used to perform editing of ECSchemas.\r\n */\r\n/**\r\n * @docs-group-description Diagnostic\r\n * Set of classes to categorize and manage ECSchema validation results.\r\n */\r\n/**\r\n * @docs-group-description Validation\r\n * Set of classes used to perform validation on ECSchemas.\r\n */\r\n/**\r\n * @docs-group-description Comparison\r\n * Set of classes to enable comparison of ECSchemas.\r\n */\r\n/**\r\n * @docs-group-description Merging\r\n * Set of classes used to merge schemas.\r\n */\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/ecschema-editing",
3
- "version": "4.2.0-dev.9",
3
+ "version": "4.2.0",
4
4
  "description": "ECSchema editing and validation API",
5
5
  "license": "MIT",
6
6
  "main": "lib/cjs/ecschema-editing.js",
@@ -33,7 +33,7 @@
33
33
  "@types/sinon": "^10.0.15",
34
34
  "@xmldom/xmldom": "~0.8.5",
35
35
  "benchmark": "^2.1.4",
36
- "chai": "^4.1.2",
36
+ "chai": "^4.3.10",
37
37
  "chai-as-promised": "^7",
38
38
  "cpx2": "^3.0.0",
39
39
  "eslint": "^8.44.0",
@@ -42,16 +42,16 @@
42
42
  "rimraf": "^3.0.2",
43
43
  "sinon": "^15.0.4",
44
44
  "typescript": "~5.0.2",
45
- "@itwin/build-tools": "4.2.0-dev.9",
46
- "@itwin/core-quantity": "4.2.0-dev.9",
47
- "@itwin/core-common": "4.2.0-dev.9",
48
- "@itwin/core-bentley": "4.2.0-dev.9",
49
- "@itwin/ecschema-metadata": "4.2.0-dev.9"
45
+ "@itwin/build-tools": "4.2.0",
46
+ "@itwin/core-common": "4.2.0",
47
+ "@itwin/ecschema-metadata": "4.2.0",
48
+ "@itwin/core-bentley": "4.2.0",
49
+ "@itwin/core-quantity": "4.2.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@itwin/core-bentley": "^4.2.0-dev.9",
53
- "@itwin/core-quantity": "^4.2.0-dev.9",
54
- "@itwin/ecschema-metadata": "^4.2.0-dev.9"
52
+ "@itwin/core-bentley": "^4.2.0",
53
+ "@itwin/core-quantity": "^4.2.0",
54
+ "@itwin/ecschema-metadata": "^4.2.0"
55
55
  },
56
56
  "nyc": {
57
57
  "extends": "./node_modules/@itwin/build-tools/.nycrc"
@@ -1,27 +1,27 @@
1
- {
2
- "Diagnostics": {
3
- "ECObjects-1": "Referenced schema '{1}' of schema '{0}' is a supplemental schema. Supplemental schemas are not allowed to be referenced.",
4
- "ECObjects-2": "Schema '{0}' has multiple schema references ({2}, {3}) with the same alias '{1}', which is not allowed.",
5
- "ECObjects-3": "Schema '{0}' has reference cycles: {1}",
6
- "ECObjects-100": "Class '{0}' cannot derive from sealed base class '{1}'.",
7
- "ECObjects-101": "Class '{0}' cannot derive from base class '{1}' of type '{2}'.",
8
- "ECObjects-102": "Abstract Class '{0}' cannot derive from base class '{1}' because it is not an abstract class.",
9
- "ECObjects-500": "The CustomAttribute container '{0}' has a CustomAttribute with the class '{1}' which is not a concrete class.",
10
- "ECObjects-501": "The CustomAttribute container '{0}' has a CustomAttribute with the class '{1}' whose schema is not referenced by the container's Schema.",
11
- "ECObjects-502": "The CustomAttribute container '{0}' has a CustomAttribute with the class '{1}' which cannot be found.",
12
- "ECObjects-700": "Enumeration '{0}' has invalid primitive type.",
13
- "ECObjects-1100": "Mixin '{0}' cannot be applied to the class '{1}' because it does not satisfy the applies to constraint '{2}'.",
14
- "ECObjects-1300": "The ECProperty '{0}.{1}' has a base property '{2}.{1}' with a value type of {3} which is incompatible with the value type of {4}.",
15
- "ECObjects-1301": "The ECProperty '{0}.{1}' has a base property '{2}.{1}' with a type of {3} which is incompatible with the type of {4}.",
16
- "ECObjects-1302": "The ECProperty '{0}.{1}' has a base property '{2}.{1}' with KindOfQuantity '{3}' with persistence unit '{4}' which is not the same as the persistence unit '{5}' of the provided KindOfQuantity '{6}'.",
17
- "ECObjects-1303": "The referenced relationship '{1}', used in NavigationProperty '{0}' is not the root relationship.",
18
- "ECObjects-1304": "NavigationProperty '{0}' uses the relationship '{1}' that cannot be traversed in the '{2}' direction due to a max multiplicity greater than 1.",
19
- "ECObjects-1305": "The NavigationProperty '{0}', using the relationship '{1}', points to a RelationshipClass, which is not allowed. NavigationProperties must point to an EntityClass or Mixin.",
20
- "ECObjects-1306": "The class '{0}' of NavigationProperty '{1}' is not supported by the {3} constraint of the referenced relationship '{2}'.",
21
- "ECObjects-1500": "The abstract constraint class '{0}' on the {1}-Constraint of '{2}' is not supported by the base class constraint in '{3}'.",
22
- "ECObjects-1501": "The constraint class '{0}' on the {1}-Constraint of '{2}' is not supported by the base class constraint in '{3}'.",
23
- "ECObjects-1502": "The constraint class '{0}' on the {1}-Constraint of '{2}' is not derived from the abstract constraint class '{3}'.",
24
- "ECObjects-1600": "The {0}-Constraint of '{1}' does not contain any constraint classes.",
25
- "ECObjects-1601": "The {0}-Constraint of '{1}' has multiple constraint classes which requires an abstract constraint to be defined."
26
- }
1
+ {
2
+ "Diagnostics": {
3
+ "ECObjects-1": "Referenced schema '{1}' of schema '{0}' is a supplemental schema. Supplemental schemas are not allowed to be referenced.",
4
+ "ECObjects-2": "Schema '{0}' has multiple schema references ({2}, {3}) with the same alias '{1}', which is not allowed.",
5
+ "ECObjects-3": "Schema '{0}' has reference cycles: {1}",
6
+ "ECObjects-100": "Class '{0}' cannot derive from sealed base class '{1}'.",
7
+ "ECObjects-101": "Class '{0}' cannot derive from base class '{1}' of type '{2}'.",
8
+ "ECObjects-102": "Abstract Class '{0}' cannot derive from base class '{1}' because it is not an abstract class.",
9
+ "ECObjects-500": "The CustomAttribute container '{0}' has a CustomAttribute with the class '{1}' which is not a concrete class.",
10
+ "ECObjects-501": "The CustomAttribute container '{0}' has a CustomAttribute with the class '{1}' whose schema is not referenced by the container's Schema.",
11
+ "ECObjects-502": "The CustomAttribute container '{0}' has a CustomAttribute with the class '{1}' which cannot be found.",
12
+ "ECObjects-700": "Enumeration '{0}' has invalid primitive type.",
13
+ "ECObjects-1100": "Mixin '{0}' cannot be applied to the class '{1}' because it does not satisfy the applies to constraint '{2}'.",
14
+ "ECObjects-1300": "The ECProperty '{0}.{1}' has a base property '{2}.{1}' with a value type of {3} which is incompatible with the value type of {4}.",
15
+ "ECObjects-1301": "The ECProperty '{0}.{1}' has a base property '{2}.{1}' with a type of {3} which is incompatible with the type of {4}.",
16
+ "ECObjects-1302": "The ECProperty '{0}.{1}' has a base property '{2}.{1}' with KindOfQuantity '{3}' with persistence unit '{4}' which is not the same as the persistence unit '{5}' of the provided KindOfQuantity '{6}'.",
17
+ "ECObjects-1303": "The referenced relationship '{1}', used in NavigationProperty '{0}' is not the root relationship.",
18
+ "ECObjects-1304": "NavigationProperty '{0}' uses the relationship '{1}' that cannot be traversed in the '{2}' direction due to a max multiplicity greater than 1.",
19
+ "ECObjects-1305": "The NavigationProperty '{0}', using the relationship '{1}', points to a RelationshipClass, which is not allowed. NavigationProperties must point to an EntityClass or Mixin.",
20
+ "ECObjects-1306": "The class '{0}' of NavigationProperty '{1}' is not supported by the {3} constraint of the referenced relationship '{2}'.",
21
+ "ECObjects-1500": "The abstract constraint class '{0}' on the {1}-Constraint of '{2}' is not supported by the base class constraint in '{3}'.",
22
+ "ECObjects-1501": "The constraint class '{0}' on the {1}-Constraint of '{2}' is not supported by the base class constraint in '{3}'.",
23
+ "ECObjects-1502": "The constraint class '{0}' on the {1}-Constraint of '{2}' is not derived from the abstract constraint class '{3}'.",
24
+ "ECObjects-1600": "The {0}-Constraint of '{1}' does not contain any constraint classes.",
25
+ "ECObjects-1601": "The {0}-Constraint of '{1}' has multiple constraint classes which requires an abstract constraint to be defined."
26
+ }
27
27
  }