@itwin/ecschema-editing 4.5.0-dev.9 → 4.6.0-dev.1
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.
- package/CHANGELOG.md +51 -1
- package/LICENSE.md +1 -1
- package/lib/cjs/Differencing/SchemaConflicts.d.ts +76 -0
- package/lib/cjs/Differencing/SchemaConflicts.d.ts.map +1 -0
- package/lib/cjs/Differencing/SchemaConflicts.js +56 -0
- package/lib/cjs/Differencing/SchemaConflicts.js.map +1 -0
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts +43 -0
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -0
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js +501 -0
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js.map +1 -0
- package/lib/cjs/Differencing/SchemaDifference.d.ts +150 -0
- package/lib/cjs/Differencing/SchemaDifference.d.ts.map +1 -0
- package/lib/cjs/Differencing/SchemaDifference.js +54 -0
- package/lib/cjs/Differencing/SchemaDifference.js.map +1 -0
- package/lib/cjs/Editing/Constants.js.map +1 -1
- package/lib/cjs/Editing/CustomAttributes.js.map +1 -1
- package/lib/cjs/Editing/ECClasses.d.ts +9 -2
- package/lib/cjs/Editing/ECClasses.d.ts.map +1 -1
- package/lib/cjs/Editing/ECClasses.js +25 -0
- package/lib/cjs/Editing/ECClasses.js.map +1 -1
- package/lib/cjs/Editing/Editor.js.map +1 -1
- package/lib/cjs/Editing/Entities.d.ts +8 -2
- package/lib/cjs/Editing/Entities.d.ts.map +1 -1
- package/lib/cjs/Editing/Entities.js +29 -6
- package/lib/cjs/Editing/Entities.js.map +1 -1
- package/lib/cjs/Editing/Enumerations.js.map +1 -1
- package/lib/cjs/Editing/Formats.js.map +1 -1
- package/lib/cjs/Editing/InvertedUnits.js.map +1 -1
- package/lib/cjs/Editing/KindOfQuantities.js.map +1 -1
- package/lib/cjs/Editing/Mixins.d.ts +7 -1
- package/lib/cjs/Editing/Mixins.d.ts.map +1 -1
- package/lib/cjs/Editing/Mixins.js +15 -0
- package/lib/cjs/Editing/Mixins.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableArrayProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableCAClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableConstant.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEntityClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEnumeration.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableFormat.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableInvertedUnit.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableMixin.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePrimitiveOrEnumProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableProperty.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableRelationshipClass.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableSchema.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnit.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.js.map +1 -1
- package/lib/cjs/Editing/Phenomena.js.map +1 -1
- package/lib/cjs/Editing/PropertyCategories.js.map +1 -1
- package/lib/cjs/Editing/RelationshipClasses.d.ts +7 -1
- package/lib/cjs/Editing/RelationshipClasses.d.ts.map +1 -1
- package/lib/cjs/Editing/RelationshipClasses.js +20 -1
- package/lib/cjs/Editing/RelationshipClasses.js.map +1 -1
- package/lib/cjs/Editing/SchemaItems.js.map +1 -1
- package/lib/cjs/Editing/Structs.js.map +1 -1
- package/lib/cjs/Editing/UnitSystems.js.map +1 -1
- package/lib/cjs/Editing/Units.js.map +1 -1
- package/lib/cjs/Merging/CAClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/CAClassMerger.js +1 -5
- package/lib/cjs/Merging/CAClassMerger.js.map +1 -1
- package/lib/cjs/Merging/ClassMerger.d.ts +4 -3
- package/lib/cjs/Merging/ClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/ClassMerger.js +57 -49
- package/lib/cjs/Merging/ClassMerger.js.map +1 -1
- package/lib/cjs/Merging/ConstantMerger.js.map +1 -1
- package/lib/cjs/Merging/CustomAttributeMerger.js.map +1 -1
- package/lib/cjs/Merging/EntityClassMerger.d.ts +3 -2
- package/lib/cjs/Merging/EntityClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/EntityClassMerger.js +22 -7
- package/lib/cjs/Merging/EntityClassMerger.js.map +1 -1
- package/lib/cjs/Merging/EnumerationMerger.js.map +1 -1
- package/lib/cjs/Merging/KindOfQuantityMerger.js.map +1 -1
- package/lib/cjs/Merging/MixinMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/MixinMerger.js +1 -5
- package/lib/cjs/Merging/MixinMerger.js.map +1 -1
- package/lib/cjs/Merging/PropertyMerger.d.ts +21 -0
- package/lib/cjs/Merging/PropertyMerger.d.ts.map +1 -0
- package/lib/cjs/Merging/PropertyMerger.js +315 -0
- package/lib/cjs/Merging/PropertyMerger.js.map +1 -0
- package/lib/cjs/Merging/RelationshipClassMerger.d.ts +15 -0
- package/lib/cjs/Merging/RelationshipClassMerger.d.ts.map +1 -0
- package/lib/cjs/Merging/RelationshipClassMerger.js +132 -0
- package/lib/cjs/Merging/RelationshipClassMerger.js.map +1 -0
- package/lib/cjs/Merging/SchemaItemFactory.js.map +1 -1
- package/lib/cjs/Merging/SchemaItemMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaMerger.js +7 -3
- package/lib/cjs/Merging/SchemaMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaReferenceMerger.js.map +1 -1
- package/lib/cjs/Merging/StructClassMerger.js.map +1 -1
- package/lib/cjs/Validation/Diagnostic.js.map +1 -1
- package/lib/cjs/Validation/DiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/ECRules.js.map +1 -1
- package/lib/cjs/Validation/LoggingDiagnosticReporter.js.map +1 -1
- package/lib/cjs/Validation/RuleSuppressionSet.js.map +1 -1
- package/lib/cjs/Validation/Rules.js.map +1 -1
- package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareDiagnostics.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareReporter.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareResultDelegate.js.map +1 -1
- package/lib/cjs/Validation/SchemaCompareVisitor.js.map +1 -1
- package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidater.js.map +1 -1
- package/lib/cjs/Validation/SchemaValidationVisitor.js.map +1 -1
- package/lib/cjs/Validation/SchemaWalker.js.map +1 -1
- package/lib/cjs/ecschema-editing.d.ts +4 -0
- package/lib/cjs/ecschema-editing.d.ts.map +1 -1
- package/lib/cjs/ecschema-editing.js +4 -0
- package/lib/cjs/ecschema-editing.js.map +1 -1
- package/package.json +10 -10
- package/public/locales/en/ECSchemaEditing.json +26 -26
- package/lib/cjs/Merging/AnyPropertyMerger.d.ts +0 -15
- package/lib/cjs/Merging/AnyPropertyMerger.d.ts.map +0 -1
- package/lib/cjs/Merging/AnyPropertyMerger.js +0 -71
- package/lib/cjs/Merging/AnyPropertyMerger.js.map +0 -1
- package/lib/cjs/Merging/ArrayPropertyMerger.d.ts +0 -32
- package/lib/cjs/Merging/ArrayPropertyMerger.d.ts.map +0 -1
- package/lib/cjs/Merging/ArrayPropertyMerger.js +0 -143
- package/lib/cjs/Merging/ArrayPropertyMerger.js.map +0 -1
- package/lib/cjs/Merging/ClassPropertyMerger.d.ts +0 -16
- package/lib/cjs/Merging/ClassPropertyMerger.d.ts.map +0 -1
- package/lib/cjs/Merging/ClassPropertyMerger.js +0 -90
- package/lib/cjs/Merging/ClassPropertyMerger.js.map +0 -1
- package/lib/cjs/Merging/PrimitiveOrEnumPropertyMerger.d.ts +0 -24
- package/lib/cjs/Merging/PrimitiveOrEnumPropertyMerger.d.ts.map +0 -1
- package/lib/cjs/Merging/PrimitiveOrEnumPropertyMerger.js +0 -106
- package/lib/cjs/Merging/PrimitiveOrEnumPropertyMerger.js.map +0 -1
- package/lib/cjs/Merging/StructPropertyMerger.d.ts +0 -11
- package/lib/cjs/Merging/StructPropertyMerger.d.ts.map +0 -1
- package/lib/cjs/Merging/StructPropertyMerger.js +0 -47
- package/lib/cjs/Merging/StructPropertyMerger.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
# Change Log - @itwin/ecschema-editing
|
|
2
2
|
|
|
3
|
-
This log was last generated on Mon,
|
|
3
|
+
This log was last generated on Mon, 25 Mar 2024 22:24:35 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 4.4.8
|
|
6
|
+
Mon, 25 Mar 2024 22:22:26 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 4.4.7
|
|
11
|
+
Fri, 15 Mar 2024 19:15:14 GMT
|
|
12
|
+
|
|
13
|
+
_Version update only_
|
|
14
|
+
|
|
15
|
+
## 4.4.6
|
|
16
|
+
Fri, 08 Mar 2024 15:57:11 GMT
|
|
17
|
+
|
|
18
|
+
_Version update only_
|
|
19
|
+
|
|
20
|
+
## 4.4.5
|
|
21
|
+
Tue, 05 Mar 2024 20:37:18 GMT
|
|
22
|
+
|
|
23
|
+
_Version update only_
|
|
24
|
+
|
|
25
|
+
## 4.4.4
|
|
26
|
+
Fri, 01 Mar 2024 18:21:01 GMT
|
|
27
|
+
|
|
28
|
+
_Version update only_
|
|
29
|
+
|
|
30
|
+
## 4.4.3
|
|
31
|
+
Fri, 23 Feb 2024 21:26:07 GMT
|
|
32
|
+
|
|
33
|
+
_Version update only_
|
|
34
|
+
|
|
35
|
+
## 4.4.2
|
|
36
|
+
Fri, 16 Feb 2024 14:22:01 GMT
|
|
37
|
+
|
|
38
|
+
_Version update only_
|
|
39
|
+
|
|
40
|
+
## 4.4.1
|
|
41
|
+
Fri, 16 Feb 2024 14:17:48 GMT
|
|
42
|
+
|
|
43
|
+
_Version update only_
|
|
4
44
|
|
|
5
45
|
## 4.4.0
|
|
6
46
|
Mon, 12 Feb 2024 18:15:58 GMT
|
|
@@ -18,6 +58,16 @@ Mon, 12 Feb 2024 18:15:58 GMT
|
|
|
18
58
|
- Added Merge function to merge CustomAttributes
|
|
19
59
|
- Added kind of quantity merging
|
|
20
60
|
|
|
61
|
+
## 4.3.5
|
|
62
|
+
Mon, 25 Mar 2024 16:54:37 GMT
|
|
63
|
+
|
|
64
|
+
_Version update only_
|
|
65
|
+
|
|
66
|
+
## 4.3.4
|
|
67
|
+
Fri, 22 Mar 2024 13:30:31 GMT
|
|
68
|
+
|
|
69
|
+
_Version update only_
|
|
70
|
+
|
|
21
71
|
## 4.3.3
|
|
22
72
|
Wed, 03 Jan 2024 19:28:38 GMT
|
|
23
73
|
|
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MIT License
|
|
2
2
|
|
|
3
|
-
Copyright © 2017-
|
|
3
|
+
Copyright © 2017-2024 Bentley Systems, Incorporated. All rights reserved.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Differencing
|
|
3
|
+
*/
|
|
4
|
+
import type { SchemaType } from "./SchemaDifference";
|
|
5
|
+
/**
|
|
6
|
+
* The unique conflicts codes for Schema differencing.
|
|
7
|
+
*
|
|
8
|
+
* To provide meaning to code values, with anticipation
|
|
9
|
+
* of future rules for all current EC Types, the following
|
|
10
|
+
* value ranges should be used:
|
|
11
|
+
*
|
|
12
|
+
* - Schema: 000-099
|
|
13
|
+
* - Class: 100-199
|
|
14
|
+
* - Constant: 200-299
|
|
15
|
+
* - CustomAttribute 300-399
|
|
16
|
+
* - CustomAttributeClass: 400-499
|
|
17
|
+
* - CustomAttributeContainer: 500-599
|
|
18
|
+
* - EntityClass: 600-699
|
|
19
|
+
* - Enumeration: 700-799
|
|
20
|
+
* - Format: 800-899
|
|
21
|
+
* - InvertedUnit: 900-999
|
|
22
|
+
* - KindOfQuantity: 1000-1099
|
|
23
|
+
* - Mixin: 1100-1199
|
|
24
|
+
* - Phenomenon: 1200-1299
|
|
25
|
+
* - Property: 1300-1399
|
|
26
|
+
* - PropertyCategory: 1400-1499
|
|
27
|
+
* - RelationshipClass: 1500-1599
|
|
28
|
+
* - RelationshipConstraint: 1600-1699
|
|
29
|
+
* - StructClass: 1700-1799
|
|
30
|
+
* - Unit: 1800-1899
|
|
31
|
+
* - UnitSystem: 1900-1999
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare enum ConflictCode {
|
|
36
|
+
ConflictingItemName = "C-001",
|
|
37
|
+
ConflictingReferenceAlias = "C-002",
|
|
38
|
+
ConflictingBaseClass = "C-100",
|
|
39
|
+
RemovingBaseClass = "C-101",
|
|
40
|
+
SealedBaseClass = "C-102",
|
|
41
|
+
ConflictingEnumerationType = "C-700",
|
|
42
|
+
ConflictingEnumeratorValue = "C-701",
|
|
43
|
+
MixinAppliedMustDeriveFromConstraint = "C-1100",
|
|
44
|
+
ConflictingPropertyName = "C-1300",
|
|
45
|
+
AbstractConstraintMustNarrowBaseConstraints = "C-1500",
|
|
46
|
+
DerivedConstraintsMustNarrowBaseConstraints = "C-1501",
|
|
47
|
+
ConstraintClassesDeriveFromAbstractConstraint = "C-1502"
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Defines the interface for a conflict during Schema Differencing. Conflicts were discovered
|
|
51
|
+
* while comparing the changed elements. Conflicts in the whole schema context are not found
|
|
52
|
+
* on that level.
|
|
53
|
+
*
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
export interface SchemaDifferenceConflict {
|
|
57
|
+
/**
|
|
58
|
+
* The name of the schema type which is "Schema" for a conflict on the schema, on schema items
|
|
59
|
+
* or objects that are related to schema items (properties, relationship constraints) it is the
|
|
60
|
+
* name of the related schema item.
|
|
61
|
+
*/
|
|
62
|
+
readonly schemaType: SchemaType;
|
|
63
|
+
/** The name of the schema item the conflict appears on. */
|
|
64
|
+
readonly itemName?: string;
|
|
65
|
+
/** Optional path what on the item was conflicting. */
|
|
66
|
+
readonly path?: string;
|
|
67
|
+
/** The unique conflicting code. */
|
|
68
|
+
readonly code: ConflictCode;
|
|
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
|
+
//# 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,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,oBAAY,YAAY;IAEtB,mBAAmB,UAAU;IAC7B,yBAAyB,UAAU;IAEnC,oBAAoB,UAAU;IAC9B,iBAAiB,UAAU;IAC3B,eAAe,UAAU;IAEzB,0BAA0B,UAAU;IACpC,0BAA0B,UAAU;IAEpC,oCAAoC,WAAW;IAE/C,uBAAuB,WAAW;IAElC,2CAA2C,WAAW;IACtD,2CAA2C,WAAW;IACtD,6CAA6C,WAAW;CACzD;AAED;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAEhC,2DAA2D;IAC3D,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAE3B,sDAAsD;IACtD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB,mCAAmC;IACnC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAE5B,qCAAqC;IACrC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B,sCAAsC;IACtC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAEzB,sCAAsC;IACtC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module Differencing
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.ConflictCode = void 0;
|
|
11
|
+
/**
|
|
12
|
+
* The unique conflicts codes for Schema differencing.
|
|
13
|
+
*
|
|
14
|
+
* To provide meaning to code values, with anticipation
|
|
15
|
+
* of future rules for all current EC Types, the following
|
|
16
|
+
* value ranges should be used:
|
|
17
|
+
*
|
|
18
|
+
* - Schema: 000-099
|
|
19
|
+
* - Class: 100-199
|
|
20
|
+
* - Constant: 200-299
|
|
21
|
+
* - CustomAttribute 300-399
|
|
22
|
+
* - CustomAttributeClass: 400-499
|
|
23
|
+
* - CustomAttributeContainer: 500-599
|
|
24
|
+
* - EntityClass: 600-699
|
|
25
|
+
* - Enumeration: 700-799
|
|
26
|
+
* - Format: 800-899
|
|
27
|
+
* - InvertedUnit: 900-999
|
|
28
|
+
* - KindOfQuantity: 1000-1099
|
|
29
|
+
* - Mixin: 1100-1199
|
|
30
|
+
* - Phenomenon: 1200-1299
|
|
31
|
+
* - Property: 1300-1399
|
|
32
|
+
* - PropertyCategory: 1400-1499
|
|
33
|
+
* - RelationshipClass: 1500-1599
|
|
34
|
+
* - RelationshipConstraint: 1600-1699
|
|
35
|
+
* - StructClass: 1700-1799
|
|
36
|
+
* - Unit: 1800-1899
|
|
37
|
+
* - UnitSystem: 1900-1999
|
|
38
|
+
*
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
var ConflictCode;
|
|
42
|
+
(function (ConflictCode) {
|
|
43
|
+
ConflictCode["ConflictingItemName"] = "C-001";
|
|
44
|
+
ConflictCode["ConflictingReferenceAlias"] = "C-002";
|
|
45
|
+
ConflictCode["ConflictingBaseClass"] = "C-100";
|
|
46
|
+
ConflictCode["RemovingBaseClass"] = "C-101";
|
|
47
|
+
ConflictCode["SealedBaseClass"] = "C-102";
|
|
48
|
+
ConflictCode["ConflictingEnumerationType"] = "C-700";
|
|
49
|
+
ConflictCode["ConflictingEnumeratorValue"] = "C-701";
|
|
50
|
+
ConflictCode["MixinAppliedMustDeriveFromConstraint"] = "C-1100";
|
|
51
|
+
ConflictCode["ConflictingPropertyName"] = "C-1300";
|
|
52
|
+
ConflictCode["AbstractConstraintMustNarrowBaseConstraints"] = "C-1500";
|
|
53
|
+
ConflictCode["DerivedConstraintsMustNarrowBaseConstraints"] = "C-1501";
|
|
54
|
+
ConflictCode["ConstraintClassesDeriveFromAbstractConstraint"] = "C-1502";
|
|
55
|
+
})(ConflictCode = exports.ConflictCode || (exports.ConflictCode = {}));
|
|
56
|
+
//# 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;;;AAIH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,IAAY,YAmBX;AAnBD,WAAY,YAAY;IAEtB,6CAA6B,CAAA;IAC7B,mDAAmC,CAAA;IAEnC,8CAA8B,CAAA;IAC9B,2CAA2B,CAAA;IAC3B,yCAAyB,CAAA;IAEzB,oDAAoC,CAAA;IACpC,oDAAoC,CAAA;IAEpC,+DAA+C,CAAA;IAE/C,kDAAkC,CAAA;IAElC,sEAAsD,CAAA;IACtD,sEAAsD,CAAA;IACtD,wEAAwD,CAAA;AAC1D,CAAC,EAnBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAmBvB","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 { 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 * @internal\n */\nexport enum ConflictCode {\n\n ConflictingItemName = \"C-001\",\n ConflictingReferenceAlias = \"C-002\",\n\n ConflictingBaseClass = \"C-100\",\n RemovingBaseClass = \"C-101\",\n SealedBaseClass = \"C-102\",\n\n ConflictingEnumerationType = \"C-700\",\n ConflictingEnumeratorValue = \"C-701\",\n\n MixinAppliedMustDeriveFromConstraint = \"C-1100\",\n\n ConflictingPropertyName = \"C-1300\",\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 *\n * @internal\n */\nexport interface SchemaDifferenceConflict {\n /**\n * The name of the schema type which is \"Schema\" for a conflict on the schema, on schema items\n * or objects that are related to schema items (properties, relationship constraints) it is the\n * name of the related schema item.\n */\n readonly schemaType: SchemaType;\n\n /** The name of the schema item the conflict appears on. */\n readonly itemName?: string;\n\n /** Optional path what on the item was conflicting. */\n readonly path?: string;\n\n /** The unique conflicting code. */\n readonly code: ConflictCode;\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"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Differencing
|
|
3
|
+
*/
|
|
4
|
+
import type { AnyDiagnostic } from "../Validation/Diagnostic";
|
|
5
|
+
import { SchemaDifferences } 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
|
+
private readonly _differenceReport;
|
|
14
|
+
constructor(differenceReport: SchemaDifferences);
|
|
15
|
+
private addEntry;
|
|
16
|
+
private lookupEntry;
|
|
17
|
+
private addConflict;
|
|
18
|
+
/**
|
|
19
|
+
* Visitor function to process the schema change diagnostic object.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
visit(diagnostic: AnyDiagnostic): void;
|
|
23
|
+
private visitChangedSchemaProperties;
|
|
24
|
+
private visitMissingSchemaItem;
|
|
25
|
+
private visitChangedSchemaItem;
|
|
26
|
+
private visitChangedEnumeration;
|
|
27
|
+
private visitMissingEnumerator;
|
|
28
|
+
private lookupEnumeratorEntry;
|
|
29
|
+
private visitChangedEnumerator;
|
|
30
|
+
private validateEnumerator;
|
|
31
|
+
private visitMissingProperty;
|
|
32
|
+
private visitChangedProperty;
|
|
33
|
+
private validatePropertyChange;
|
|
34
|
+
private visitMissingBaseClass;
|
|
35
|
+
private validateBaseClassChange;
|
|
36
|
+
private visitMissingMixinOnClass;
|
|
37
|
+
private validateMixin;
|
|
38
|
+
private visitMissingRelationshipConstraintClass;
|
|
39
|
+
private visitChangedRelationshipConstraint;
|
|
40
|
+
private visitSchemaReference;
|
|
41
|
+
private visitMissingCustomAttributeInstance;
|
|
42
|
+
}
|
|
43
|
+
//# 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;AAM9D,OAAO,EAKL,iBAAiB,EAQlB,MAAM,oBAAoB,CAAC;AA0B5B;;;;;GAKG;AACH,qBAAa,uBAAuB;IAElC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;gBAE1C,gBAAgB,EAAE,iBAAiB;IAI/C,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,WAAW;IAInB;;;OAGG;IACI,KAAK,CAAC,UAAU,EAAE,aAAa;IA6DtC,OAAO,CAAC,4BAA4B;IA+BpC,OAAO,CAAC,sBAAsB;IAU9B,OAAO,CAAC,sBAAsB;IAmC9B,OAAO,CAAC,uBAAuB;IAqB/B,OAAO,CAAC,sBAAsB;IAgB9B,OAAO,CAAC,qBAAqB;IAU7B,OAAO,CAAC,sBAAsB;IAgC9B,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,oBAAoB;IAe5B,OAAO,CAAC,oBAAoB;IA2B5B,OAAO,CAAC,sBAAsB;IAgB9B,OAAO,CAAC,qBAAqB;IAwB7B,OAAO,CAAC,uBAAuB;IA0C/B,OAAO,CAAC,wBAAwB;IAyBhC,OAAO,CAAC,aAAa;IAiBrB,OAAO,CAAC,uCAAuC;IAuB/C,OAAO,CAAC,kCAAkC;IAyB1C,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,mCAAmC;CAe5C"}
|