@itwin/ecschema-editing 4.6.0-dev.1 → 4.6.0-dev.13
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 +23 -1
- package/lib/cjs/Differencing/SchemaConflicts.d.ts +2 -2
- package/lib/cjs/Differencing/SchemaConflicts.js +1 -1
- package/lib/cjs/Differencing/SchemaConflicts.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts +9 -6
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js +213 -161
- package/lib/cjs/Differencing/SchemaDiagnosticVisitor.js.map +1 -1
- package/lib/cjs/Differencing/SchemaDifference.d.ts +354 -78
- package/lib/cjs/Differencing/SchemaDifference.d.ts.map +1 -1
- package/lib/cjs/Differencing/SchemaDifference.js +184 -11
- package/lib/cjs/Differencing/SchemaDifference.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableConstant.d.ts +1 -0
- package/lib/cjs/Editing/Mutable/MutableConstant.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableConstant.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEnumeration.d.ts +1 -0
- package/lib/cjs/Editing/Mutable/MutableEnumeration.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableEnumeration.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.d.ts +2 -0
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableKindOfQuantity.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.d.ts +1 -0
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePhenomenon.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.d.ts +1 -0
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutablePropertyCategory.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableSchema.d.ts +2 -0
- package/lib/cjs/Editing/Mutable/MutableSchema.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableSchema.js.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.d.ts +1 -0
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.d.ts.map +1 -1
- package/lib/cjs/Editing/Mutable/MutableUnitSystem.js.map +1 -1
- package/lib/cjs/Merging/CAClassMerger.d.ts +4 -7
- package/lib/cjs/Merging/CAClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/CAClassMerger.js +26 -23
- package/lib/cjs/Merging/CAClassMerger.js.map +1 -1
- package/lib/cjs/Merging/ClassMerger.d.ts +10 -18
- package/lib/cjs/Merging/ClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/ClassMerger.js +148 -155
- package/lib/cjs/Merging/ClassMerger.js.map +1 -1
- package/lib/cjs/Merging/ConstantMerger.d.ts +4 -8
- package/lib/cjs/Merging/ConstantMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/ConstantMerger.js +59 -40
- package/lib/cjs/Merging/ConstantMerger.js.map +1 -1
- package/lib/cjs/Merging/CustomAttributeMerger.d.ts +16 -13
- package/lib/cjs/Merging/CustomAttributeMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/CustomAttributeMerger.js +66 -34
- package/lib/cjs/Merging/CustomAttributeMerger.js.map +1 -1
- package/lib/cjs/Merging/EntityClassMerger.d.ts +10 -7
- package/lib/cjs/Merging/EntityClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/EntityClassMerger.js +41 -29
- package/lib/cjs/Merging/EntityClassMerger.js.map +1 -1
- package/lib/cjs/Merging/EnumerationMerger.d.ts +9 -9
- package/lib/cjs/Merging/EnumerationMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/EnumerationMerger.js +77 -48
- package/lib/cjs/Merging/EnumerationMerger.js.map +1 -1
- package/lib/cjs/Merging/KindOfQuantityMerger.d.ts +4 -11
- package/lib/cjs/Merging/KindOfQuantityMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/KindOfQuantityMerger.js +57 -53
- package/lib/cjs/Merging/KindOfQuantityMerger.js.map +1 -1
- package/lib/cjs/Merging/MixinMerger.d.ts +4 -7
- package/lib/cjs/Merging/MixinMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/MixinMerger.js +24 -25
- package/lib/cjs/Merging/MixinMerger.js.map +1 -1
- package/lib/cjs/Merging/PhenomenonMerger.d.ts +8 -0
- package/lib/cjs/Merging/PhenomenonMerger.d.ts.map +1 -0
- package/lib/cjs/Merging/PhenomenonMerger.js +37 -0
- package/lib/cjs/Merging/PhenomenonMerger.js.map +1 -0
- package/lib/cjs/Merging/PropertyCategoryMerger.d.ts +8 -0
- package/lib/cjs/Merging/PropertyCategoryMerger.d.ts.map +1 -0
- package/lib/cjs/Merging/PropertyCategoryMerger.js +34 -0
- package/lib/cjs/Merging/PropertyCategoryMerger.js.map +1 -0
- package/lib/cjs/Merging/PropertyMerger.d.ts +6 -14
- package/lib/cjs/Merging/PropertyMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/PropertyMerger.js +212 -287
- package/lib/cjs/Merging/PropertyMerger.js.map +1 -1
- package/lib/cjs/Merging/RelationshipClassMerger.d.ts +16 -10
- package/lib/cjs/Merging/RelationshipClassMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/RelationshipClassMerger.js +121 -112
- package/lib/cjs/Merging/RelationshipClassMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaItemMerger.d.ts +26 -51
- package/lib/cjs/Merging/SchemaItemMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaItemMerger.js +106 -88
- package/lib/cjs/Merging/SchemaItemMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaMerger.d.ts +21 -9
- package/lib/cjs/Merging/SchemaMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaMerger.js +74 -88
- package/lib/cjs/Merging/SchemaMerger.js.map +1 -1
- package/lib/cjs/Merging/SchemaReferenceMerger.d.ts +5 -5
- package/lib/cjs/Merging/SchemaReferenceMerger.d.ts.map +1 -1
- package/lib/cjs/Merging/SchemaReferenceMerger.js +33 -15
- package/lib/cjs/Merging/SchemaReferenceMerger.js.map +1 -1
- package/lib/cjs/Merging/UnitSystemMerger.d.ts +8 -0
- package/lib/cjs/Merging/UnitSystemMerger.d.ts.map +1 -0
- package/lib/cjs/Merging/UnitSystemMerger.js +26 -0
- package/lib/cjs/Merging/UnitSystemMerger.js.map +1 -0
- package/lib/cjs/Validation/ECRules.d.ts +35 -35
- package/lib/cjs/Validation/ECRules.d.ts.map +1 -1
- package/lib/cjs/Validation/ECRules.js +1 -1
- package/lib/cjs/Validation/ECRules.js.map +1 -1
- package/lib/cjs/Validation/SchemaChanges.js +1 -1
- package/lib/cjs/Validation/SchemaChanges.js.map +1 -1
- package/lib/cjs/Validation/SchemaComparer.d.ts.map +1 -1
- package/lib/cjs/Validation/SchemaComparer.js +3 -3
- package/lib/cjs/Validation/SchemaComparer.js.map +1 -1
- package/package.json +9 -9
- package/lib/cjs/Merging/SchemaItemFactory.d.ts +0 -15
- package/lib/cjs/Merging/SchemaItemFactory.d.ts.map +0 -1
- package/lib/cjs/Merging/SchemaItemFactory.js +0 -82
- package/lib/cjs/Merging/SchemaItemFactory.js.map +0 -1
- package/lib/cjs/Merging/StructClassMerger.d.ts +0 -10
- package/lib/cjs/Merging/StructClassMerger.d.ts.map +0 -1
- package/lib/cjs/Merging/StructClassMerger.js +0 -13
- package/lib/cjs/Merging/StructClassMerger.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.mergeSchemaReferences = void 0;
|
|
3
4
|
/*---------------------------------------------------------------------------------------------
|
|
4
5
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
5
6
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -7,38 +8,55 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
8
|
const ecschema_metadata_1 = require("@itwin/ecschema-metadata");
|
|
8
9
|
/**
|
|
9
10
|
* Merges the schema references of two schemas.
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
11
|
+
* @param context current merge context
|
|
12
|
+
* @param change schema changes.
|
|
12
13
|
* @internal
|
|
13
14
|
*/
|
|
14
|
-
async function mergeSchemaReferences(
|
|
15
|
-
const targetSchema = mergeContext.targetSchema;
|
|
15
|
+
async function mergeSchemaReferences(context, change) {
|
|
16
16
|
// If the target schema does not have a reference to a schema yet, it can be added
|
|
17
17
|
// but should be checked if it's schema references have collisions with existing references.
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
await
|
|
18
|
+
if (change.changeType === "add") {
|
|
19
|
+
const referencedSchema = await locateSchema(context.editor, change.difference.name, change.difference.version);
|
|
20
|
+
await context.editor.addSchemaReference(context.targetSchemaKey, referencedSchema);
|
|
21
21
|
}
|
|
22
22
|
// If the source schema referenced a schema that is also referenced by the target
|
|
23
23
|
// schema but in a different version, it is marked as delta. Here we need to check if
|
|
24
24
|
// the source schema is compatible to the existing one. This is not be checked by the
|
|
25
25
|
// schema instance when added.
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
const existingSchema = (await targetSchema.getReference(referencedSchema.name));
|
|
26
|
+
if (change.changeType === "modify") {
|
|
27
|
+
const referencedSchema = await locateSchema(context.editor, change.difference.name, change.difference.version);
|
|
28
|
+
const existingSchema = (await context.targetSchema.getReference(referencedSchema.name));
|
|
29
29
|
const [older, latest] = compareSchemas(existingSchema, referencedSchema);
|
|
30
30
|
if (!latest.schemaKey.matches(older.schemaKey, ecschema_metadata_1.SchemaMatchType.LatestWriteCompatible)) {
|
|
31
31
|
throw new Error(`Schemas references of ${referencedSchema.name} have incompatible versions: ${older.schemaKey.version} and ${latest.schemaKey.version}`);
|
|
32
32
|
}
|
|
33
33
|
if (latest === existingSchema) {
|
|
34
|
-
|
|
34
|
+
return;
|
|
35
35
|
}
|
|
36
|
-
const index = targetSchema.references.findIndex((reference) => reference === existingSchema);
|
|
37
|
-
targetSchema.references.splice(index, 1);
|
|
38
|
-
await
|
|
36
|
+
const index = context.targetSchema.references.findIndex((reference) => reference === existingSchema);
|
|
37
|
+
context.targetSchema.references.splice(index, 1);
|
|
38
|
+
await context.editor.addSchemaReference(context.targetSchema.schemaKey, referencedSchema);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
exports.
|
|
41
|
+
exports.mergeSchemaReferences = mergeSchemaReferences;
|
|
42
|
+
/**
|
|
43
|
+
* Tries to locate the Schema in the current Context
|
|
44
|
+
* @param editor Current editor context.
|
|
45
|
+
* @param schemaName The schema name to be looked up.
|
|
46
|
+
* @param version The schemas version to beo looked up.
|
|
47
|
+
* @returns The schema found in the context.
|
|
48
|
+
*/
|
|
49
|
+
async function locateSchema(editor, schemaName, version) {
|
|
50
|
+
if (schemaName === undefined || version === undefined) {
|
|
51
|
+
throw new Error("Schema name and version must not be undefined.");
|
|
52
|
+
}
|
|
53
|
+
const schemaKey = new ecschema_metadata_1.SchemaKey(schemaName, ecschema_metadata_1.ECVersion.fromString(version));
|
|
54
|
+
const schema = await editor.schemaContext.getSchema(schemaKey, ecschema_metadata_1.SchemaMatchType.LatestWriteCompatible);
|
|
55
|
+
if (schema === undefined) {
|
|
56
|
+
throw new Error(`Referenced schema ${schemaKey.toString()} could not be found in target context`);
|
|
57
|
+
}
|
|
58
|
+
return schema;
|
|
59
|
+
}
|
|
42
60
|
/**
|
|
43
61
|
* Compares the schemas and return them in order of their versions [older, latest].
|
|
44
62
|
* @param left The first schema to be added.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaReferenceMerger.js","sourceRoot":"","sources":["../../../src/Merging/SchemaReferenceMerger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaReferenceMerger.js","sourceRoot":"","sources":["../../../src/Merging/SchemaReferenceMerger.ts"],"names":[],"mappings":";;;AAAA;;;+FAG+F;AAC/F,gEAAyF;AAKzF;;;;;GAKG;AACI,KAAK,UAAU,qBAAqB,CAAC,OAA2B,EAAE,MAAiC;IACxG,kFAAkF;IAClF,4FAA4F;IAC5F,IAAG,MAAM,CAAC,UAAU,KAAK,KAAK,EAAE;QAC9B,MAAM,gBAAgB,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC/G,MAAM,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;KACpF;IAED,iFAAiF;IACjF,qFAAqF;IACrF,qFAAqF;IACrF,8BAA8B;IAC9B,IAAG,MAAM,CAAC,UAAU,KAAK,QAAQ,EAAE;QACjC,MAAM,gBAAgB,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC/G,MAAM,cAAc,GAAI,CAAC,MAAM,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAE,CAAC;QAE1F,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,cAAc,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;QACzE,IAAG,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,EAAE,mCAAe,CAAC,qBAAqB,CAAC,EAAE;YACpF,MAAM,IAAI,KAAK,CAAC,yBAAyB,gBAAgB,CAAC,IAAI,gCAAgC,KAAK,CAAC,SAAS,CA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AAE,KAAK,CAAC;QACf,CAAC,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACpB,CAAC","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*--------------------------------------------------------------------------------------------*/\nimport { ECVersion, Schema, SchemaKey, SchemaMatchType } from \"@itwin/ecschema-metadata\";\nimport { type SchemaMergeContext } from \"./SchemaMerger\";\nimport { type SchemaReferenceDifference } from \"../Differencing/SchemaDifference\";\nimport { type SchemaContextEditor } from \"../Editing/Editor\";\n\n/**\n * Merges the schema references of two schemas.\n * @param context current merge context\n * @param change schema changes.\n * @internal\n */\nexport async function mergeSchemaReferences(context: SchemaMergeContext, change: SchemaReferenceDifference) {\n // If the target schema does not have a reference to a schema yet, it can be added\n // but should be checked if it's schema references have collisions with existing references.\n if(change.changeType === \"add\") {\n const referencedSchema = await locateSchema(context.editor, change.difference.name, change.difference.version);\n await context.editor.addSchemaReference(context.targetSchemaKey, referencedSchema);\n }\n\n // If the source schema referenced a schema that is also referenced by the target\n // schema but in a different version, it is marked as delta. Here we need to check if\n // the source schema is compatible to the existing one. This is not be checked by the\n // schema instance when added.\n if(change.changeType === \"modify\") {\n const referencedSchema = await locateSchema(context.editor, change.difference.name, change.difference.version);\n const existingSchema = (await context.targetSchema.getReference(referencedSchema.name))!;\n\n const [older, latest] = compareSchemas(existingSchema, referencedSchema);\n if(!latest.schemaKey.matches(older.schemaKey, SchemaMatchType.LatestWriteCompatible)) {\n throw new Error(`Schemas references of ${referencedSchema.name} have incompatible versions: ${older.schemaKey.version} and ${latest.schemaKey.version}`);\n }\n\n if(latest === existingSchema) {\n return;\n }\n\n const index = context.targetSchema.references.findIndex((reference) => reference === existingSchema);\n context.targetSchema.references.splice(index, 1);\n\n await context.editor.addSchemaReference(context.targetSchema.schemaKey, referencedSchema);\n }\n}\n\n/**\n * Tries to locate the Schema in the current Context\n * @param editor Current editor context.\n * @param schemaName The schema name to be looked up.\n * @param version The schemas version to beo looked up.\n * @returns The schema found in the context.\n */\nasync function locateSchema(editor: SchemaContextEditor, schemaName?: string, version?: string): Promise<Schema> {\n if(schemaName === undefined || version === undefined) {\n throw new Error(\"Schema name and version must not be undefined.\");\n }\n\n const schemaKey = new SchemaKey(schemaName, ECVersion.fromString(version));\n const schema = await editor.schemaContext.getSchema(schemaKey, SchemaMatchType.LatestWriteCompatible);\n if(schema === undefined) {\n throw new Error(`Referenced schema ${schemaKey.toString()} could not be found in target context`);\n }\n return schema;\n}\n\n/**\n * Compares the schemas and return them in order of their versions [older, latest].\n * @param left The first schema to be added.\n * @param right The second schema to be added.\n * @returns The schemas in order.\n */\nfunction compareSchemas(left: Schema, right: Schema): [Schema, Schema] {\n return left.schemaKey.compareByVersion(right.schemaKey) < 0\n ? [left, right]\n : [right, left];\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type SchemaItemMergerHandler } from "./SchemaItemMerger";
|
|
2
|
+
import { type UnitSystemDifference } from "../Differencing/SchemaDifference";
|
|
3
|
+
/**
|
|
4
|
+
* Defines a merge handler to merge UnitSystem schema items.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare const unitSystemMerger: SchemaItemMergerHandler<UnitSystemDifference>;
|
|
8
|
+
//# sourceMappingURL=UnitSystemMerger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnitSystemMerger.d.ts","sourceRoot":"","sources":["../../../src/Merging/UnitSystemMerger.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7E;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,uBAAuB,CAAC,oBAAoB,CAiB1E,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unitSystemMerger = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Defines a merge handler to merge UnitSystem schema items.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
exports.unitSystemMerger = {
|
|
9
|
+
async add(context, change) {
|
|
10
|
+
return context.editor.unitSystems.createFromProps(context.targetSchemaKey, {
|
|
11
|
+
...change.difference,
|
|
12
|
+
name: change.itemName,
|
|
13
|
+
schemaItemType: change.schemaType,
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
async modify(_context, change, itemKey, item) {
|
|
17
|
+
if (change.difference.label !== undefined) {
|
|
18
|
+
item.setDisplayLabel(change.difference.label);
|
|
19
|
+
}
|
|
20
|
+
if (change.difference.description !== undefined) {
|
|
21
|
+
item.setDescription(change.difference.description);
|
|
22
|
+
}
|
|
23
|
+
return { itemKey };
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=UnitSystemMerger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnitSystemMerger.js","sourceRoot":"","sources":["../../../src/Merging/UnitSystemMerger.ts"],"names":[],"mappings":";;;AAQA;;;GAGG;AACU,QAAA,gBAAgB,GAAkD;IAC7E,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,MAAM;QACvB,OAAO,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,eAAe,CAAC,OAAO,CAAC,eAAe,EAAE;YACzE,GAAG,MAAM,CAAC,UAAU;YACpB,IAAI,EAAE,MAAM,CAAC,QAAQ;YACrB,cAAc,EAAE,MAAM,CAAC,UAAU;SAClC,CAAC,CAAC;IACL,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,IAAuB;QAC7D,IAAG,MAAM,CAAC,UAAU,CAAC,KAAK,KAAK,SAAS,EAAE;YACxC,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;SAC/C;QACD,IAAG,MAAM,CAAC,UAAU,CAAC,WAAW,KAAK,SAAS,EAAE;YAC9C,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;SACpD;QACD,OAAO,EAAE,OAAO,EAAE,CAAC;IACrB,CAAC;CACF,CAAC","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*--------------------------------------------------------------------------------------------*/\nimport { type MutableUnitSystem } from \"../Editing/Mutable/MutableUnitSystem\";\nimport { type SchemaItemMergerHandler } from \"./SchemaItemMerger\";\nimport { type UnitSystemDifference } from \"../Differencing/SchemaDifference\";\n\n/**\n * Defines a merge handler to merge UnitSystem schema items.\n * @internal\n */\nexport const unitSystemMerger: SchemaItemMergerHandler<UnitSystemDifference> = {\n async add(context, change) {\n return context.editor.unitSystems.createFromProps(context.targetSchemaKey, {\n ...change.difference,\n name: change.itemName,\n schemaItemType: change.schemaType,\n });\n },\n async modify(_context, change, itemKey, item: MutableUnitSystem) {\n if(change.difference.label !== undefined) {\n item.setDisplayLabel(change.difference.label);\n }\n if(change.difference.description !== undefined) {\n item.setDescription(change.difference.description);\n }\n return { itemKey };\n },\n};\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module Validation
|
|
3
3
|
*/
|
|
4
4
|
import { AnyClass, AnyProperty, CustomAttribute, CustomAttributeContainerProps, EntityClass, Enumeration, RelationshipClass, RelationshipConstraint, Schema } from "@itwin/ecschema-metadata";
|
|
5
|
-
import { ClassDiagnostic, CustomAttributeContainerDiagnostic, PropertyDiagnostic, RelationshipConstraintDiagnostic, SchemaDiagnostic, SchemaItemDiagnostic } from "./Diagnostic";
|
|
5
|
+
import { ClassDiagnostic, CustomAttributeContainerDiagnostic, DiagnosticType, PropertyDiagnostic, RelationshipConstraintDiagnostic, SchemaDiagnostic, SchemaItemDiagnostic } from "./Diagnostic";
|
|
6
6
|
import { IRuleSet } from "./Rules";
|
|
7
7
|
/**
|
|
8
8
|
* The unique diagnostic codes for ECObjects rules.
|
|
@@ -62,13 +62,13 @@ export declare const Diagnostics: {
|
|
|
62
62
|
readonly code: string;
|
|
63
63
|
readonly messageText: string;
|
|
64
64
|
readonly schema: Schema;
|
|
65
|
-
readonly diagnosticType:
|
|
65
|
+
readonly diagnosticType: DiagnosticType;
|
|
66
66
|
ecDefinition: Schema;
|
|
67
67
|
messageArgs?: [string, string] | undefined;
|
|
68
68
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
69
69
|
};
|
|
70
70
|
code: string;
|
|
71
|
-
diagnosticType:
|
|
71
|
+
diagnosticType: DiagnosticType;
|
|
72
72
|
};
|
|
73
73
|
/** EC-002: Required message parameters: schema name, reference schema alias, first schema reference name, second schema reference name. */
|
|
74
74
|
SchemaRefAliasMustBeUnique: {
|
|
@@ -76,13 +76,13 @@ export declare const Diagnostics: {
|
|
|
76
76
|
readonly code: string;
|
|
77
77
|
readonly messageText: string;
|
|
78
78
|
readonly schema: Schema;
|
|
79
|
-
readonly diagnosticType:
|
|
79
|
+
readonly diagnosticType: DiagnosticType;
|
|
80
80
|
ecDefinition: Schema;
|
|
81
81
|
messageArgs?: [string, string, string, string] | undefined;
|
|
82
82
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
83
83
|
};
|
|
84
84
|
code: string;
|
|
85
|
-
diagnosticType:
|
|
85
|
+
diagnosticType: DiagnosticType;
|
|
86
86
|
};
|
|
87
87
|
/** EC-003: Required message parameters: schema name, cycle text */
|
|
88
88
|
ReferenceCyclesNotAllowed: {
|
|
@@ -90,13 +90,13 @@ export declare const Diagnostics: {
|
|
|
90
90
|
readonly code: string;
|
|
91
91
|
readonly messageText: string;
|
|
92
92
|
readonly schema: Schema;
|
|
93
|
-
readonly diagnosticType:
|
|
93
|
+
readonly diagnosticType: DiagnosticType;
|
|
94
94
|
ecDefinition: Schema;
|
|
95
95
|
messageArgs?: [string, string] | undefined;
|
|
96
96
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
97
97
|
};
|
|
98
98
|
code: string;
|
|
99
|
-
diagnosticType:
|
|
99
|
+
diagnosticType: DiagnosticType;
|
|
100
100
|
};
|
|
101
101
|
/** EC-100: Required message parameters: childClass.FullName, baseClass.FullName */
|
|
102
102
|
BaseClassIsSealed: {
|
|
@@ -104,12 +104,12 @@ export declare const Diagnostics: {
|
|
|
104
104
|
readonly code: string;
|
|
105
105
|
readonly messageText: string;
|
|
106
106
|
readonly schema: Schema;
|
|
107
|
-
readonly diagnosticType:
|
|
107
|
+
readonly diagnosticType: DiagnosticType;
|
|
108
108
|
ecDefinition: AnyClass;
|
|
109
109
|
messageArgs?: [string, string] | undefined;
|
|
110
110
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
111
111
|
};
|
|
112
|
-
diagnosticType:
|
|
112
|
+
diagnosticType: DiagnosticType;
|
|
113
113
|
};
|
|
114
114
|
/** EC-101: Required message parameters: childClass.FullName, baseClass.FullName, baseClass.schemaItemType */
|
|
115
115
|
BaseClassIsOfDifferentType: {
|
|
@@ -117,12 +117,12 @@ export declare const Diagnostics: {
|
|
|
117
117
|
readonly code: string;
|
|
118
118
|
readonly messageText: string;
|
|
119
119
|
readonly schema: Schema;
|
|
120
|
-
readonly diagnosticType:
|
|
120
|
+
readonly diagnosticType: DiagnosticType;
|
|
121
121
|
ecDefinition: AnyClass;
|
|
122
122
|
messageArgs?: [string, string, string] | undefined;
|
|
123
123
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
124
124
|
};
|
|
125
|
-
diagnosticType:
|
|
125
|
+
diagnosticType: DiagnosticType;
|
|
126
126
|
};
|
|
127
127
|
/** **DEPRECATED** EC-102: Required message parameters: childClass.FullName, baseClass.FullName */
|
|
128
128
|
AbstractClassWithNonAbstractBase: {
|
|
@@ -130,12 +130,12 @@ export declare const Diagnostics: {
|
|
|
130
130
|
readonly code: string;
|
|
131
131
|
readonly messageText: string;
|
|
132
132
|
readonly schema: Schema;
|
|
133
|
-
readonly diagnosticType:
|
|
133
|
+
readonly diagnosticType: DiagnosticType;
|
|
134
134
|
ecDefinition: AnyClass;
|
|
135
135
|
messageArgs?: [string, string] | undefined;
|
|
136
136
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
137
137
|
};
|
|
138
|
-
diagnosticType:
|
|
138
|
+
diagnosticType: DiagnosticType;
|
|
139
139
|
};
|
|
140
140
|
/** EC-500: Required message parameters: CustomAttribute container name and CustomAttributeClass name. */
|
|
141
141
|
CustomAttributeNotOfConcreteClass: {
|
|
@@ -143,7 +143,7 @@ export declare const Diagnostics: {
|
|
|
143
143
|
readonly code: string;
|
|
144
144
|
readonly messageText: string;
|
|
145
145
|
readonly schema: Schema;
|
|
146
|
-
readonly diagnosticType:
|
|
146
|
+
readonly diagnosticType: DiagnosticType;
|
|
147
147
|
ecDefinition: CustomAttributeContainerProps;
|
|
148
148
|
messageArgs?: [string, string] | undefined;
|
|
149
149
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
@@ -155,7 +155,7 @@ export declare const Diagnostics: {
|
|
|
155
155
|
readonly code: string;
|
|
156
156
|
readonly messageText: string;
|
|
157
157
|
readonly schema: Schema;
|
|
158
|
-
readonly diagnosticType:
|
|
158
|
+
readonly diagnosticType: DiagnosticType;
|
|
159
159
|
ecDefinition: CustomAttributeContainerProps;
|
|
160
160
|
messageArgs?: [string, string] | undefined;
|
|
161
161
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
@@ -167,7 +167,7 @@ export declare const Diagnostics: {
|
|
|
167
167
|
readonly code: string;
|
|
168
168
|
readonly messageText: string;
|
|
169
169
|
readonly schema: Schema;
|
|
170
|
-
readonly diagnosticType:
|
|
170
|
+
readonly diagnosticType: DiagnosticType;
|
|
171
171
|
ecDefinition: CustomAttributeContainerProps;
|
|
172
172
|
messageArgs?: [string, string] | undefined;
|
|
173
173
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
@@ -179,12 +179,12 @@ export declare const Diagnostics: {
|
|
|
179
179
|
readonly code: string;
|
|
180
180
|
readonly messageText: string;
|
|
181
181
|
readonly schema: Schema;
|
|
182
|
-
readonly diagnosticType:
|
|
182
|
+
readonly diagnosticType: DiagnosticType;
|
|
183
183
|
ecDefinition: Enumeration;
|
|
184
184
|
messageArgs?: [string] | undefined;
|
|
185
185
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
186
186
|
};
|
|
187
|
-
diagnosticType:
|
|
187
|
+
diagnosticType: DiagnosticType;
|
|
188
188
|
};
|
|
189
189
|
/** EC-1100: Required message parameters: mixin class fullName, class fullName, applies to constraint class fullName */
|
|
190
190
|
MixinAppliedToClassMustDeriveFromConstraint: {
|
|
@@ -192,12 +192,12 @@ export declare const Diagnostics: {
|
|
|
192
192
|
readonly code: string;
|
|
193
193
|
readonly messageText: string;
|
|
194
194
|
readonly schema: Schema;
|
|
195
|
-
readonly diagnosticType:
|
|
195
|
+
readonly diagnosticType: DiagnosticType;
|
|
196
196
|
ecDefinition: EntityClass;
|
|
197
197
|
messageArgs?: [string, string, string] | undefined;
|
|
198
198
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
199
199
|
};
|
|
200
|
-
diagnosticType:
|
|
200
|
+
diagnosticType: DiagnosticType;
|
|
201
201
|
};
|
|
202
202
|
/** EC-1300: Required message parameters: childClass.FullName, property name, baseClass.FullName, base value type, child value type */
|
|
203
203
|
IncompatibleValueTypePropertyOverride: {
|
|
@@ -205,7 +205,7 @@ export declare const Diagnostics: {
|
|
|
205
205
|
readonly code: string;
|
|
206
206
|
readonly messageText: string;
|
|
207
207
|
readonly schema: Schema;
|
|
208
|
-
readonly diagnosticType:
|
|
208
|
+
readonly diagnosticType: DiagnosticType;
|
|
209
209
|
ecDefinition: AnyProperty;
|
|
210
210
|
messageArgs?: [string, string, string, string, string] | undefined;
|
|
211
211
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
@@ -218,7 +218,7 @@ export declare const Diagnostics: {
|
|
|
218
218
|
readonly code: string;
|
|
219
219
|
readonly messageText: string;
|
|
220
220
|
readonly schema: Schema;
|
|
221
|
-
readonly diagnosticType:
|
|
221
|
+
readonly diagnosticType: DiagnosticType;
|
|
222
222
|
ecDefinition: AnyProperty;
|
|
223
223
|
messageArgs?: [string, string, string, string, string] | undefined;
|
|
224
224
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
@@ -231,7 +231,7 @@ export declare const Diagnostics: {
|
|
|
231
231
|
readonly code: string;
|
|
232
232
|
readonly messageText: string;
|
|
233
233
|
readonly schema: Schema;
|
|
234
|
-
readonly diagnosticType:
|
|
234
|
+
readonly diagnosticType: DiagnosticType;
|
|
235
235
|
ecDefinition: AnyProperty;
|
|
236
236
|
messageArgs?: [string, string, string, string, string, string, string] | undefined;
|
|
237
237
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
@@ -244,7 +244,7 @@ export declare const Diagnostics: {
|
|
|
244
244
|
readonly code: string;
|
|
245
245
|
readonly messageText: string;
|
|
246
246
|
readonly schema: Schema;
|
|
247
|
-
readonly diagnosticType:
|
|
247
|
+
readonly diagnosticType: DiagnosticType;
|
|
248
248
|
ecDefinition: AnyProperty;
|
|
249
249
|
messageArgs?: [string, string] | undefined;
|
|
250
250
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
@@ -257,7 +257,7 @@ export declare const Diagnostics: {
|
|
|
257
257
|
readonly code: string;
|
|
258
258
|
readonly messageText: string;
|
|
259
259
|
readonly schema: Schema;
|
|
260
|
-
readonly diagnosticType:
|
|
260
|
+
readonly diagnosticType: DiagnosticType;
|
|
261
261
|
ecDefinition: AnyProperty;
|
|
262
262
|
messageArgs?: [string, string, string] | undefined;
|
|
263
263
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
@@ -270,7 +270,7 @@ export declare const Diagnostics: {
|
|
|
270
270
|
readonly code: string;
|
|
271
271
|
readonly messageText: string;
|
|
272
272
|
readonly schema: Schema;
|
|
273
|
-
readonly diagnosticType:
|
|
273
|
+
readonly diagnosticType: DiagnosticType;
|
|
274
274
|
ecDefinition: AnyProperty;
|
|
275
275
|
messageArgs?: [string, string] | undefined;
|
|
276
276
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
@@ -283,7 +283,7 @@ export declare const Diagnostics: {
|
|
|
283
283
|
readonly code: string;
|
|
284
284
|
readonly messageText: string;
|
|
285
285
|
readonly schema: Schema;
|
|
286
|
-
readonly diagnosticType:
|
|
286
|
+
readonly diagnosticType: DiagnosticType;
|
|
287
287
|
ecDefinition: AnyProperty;
|
|
288
288
|
messageArgs?: [string, string, string, string] | undefined;
|
|
289
289
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
@@ -296,12 +296,12 @@ export declare const Diagnostics: {
|
|
|
296
296
|
readonly code: string;
|
|
297
297
|
readonly messageText: string;
|
|
298
298
|
readonly schema: Schema;
|
|
299
|
-
readonly diagnosticType:
|
|
299
|
+
readonly diagnosticType: DiagnosticType;
|
|
300
300
|
ecDefinition: RelationshipClass;
|
|
301
301
|
messageArgs?: [string, string, string, string] | undefined;
|
|
302
302
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
303
303
|
};
|
|
304
|
-
diagnosticType:
|
|
304
|
+
diagnosticType: DiagnosticType;
|
|
305
305
|
};
|
|
306
306
|
/** EC-1501: Required message parameters: constraint class name, relationship end (source/target), relationship name, base relationship name */
|
|
307
307
|
DerivedConstraintsMustNarrowBaseConstraints: {
|
|
@@ -309,12 +309,12 @@ export declare const Diagnostics: {
|
|
|
309
309
|
readonly code: string;
|
|
310
310
|
readonly messageText: string;
|
|
311
311
|
readonly schema: Schema;
|
|
312
|
-
readonly diagnosticType:
|
|
312
|
+
readonly diagnosticType: DiagnosticType;
|
|
313
313
|
ecDefinition: RelationshipClass;
|
|
314
314
|
messageArgs?: [string, string, string, string] | undefined;
|
|
315
315
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
316
316
|
};
|
|
317
|
-
diagnosticType:
|
|
317
|
+
diagnosticType: DiagnosticType;
|
|
318
318
|
};
|
|
319
319
|
/** EC-1502: Required message parameters: constraint class name, relationship end (source/target), relationship name, abstract constraint class name */
|
|
320
320
|
ConstraintClassesDeriveFromAbstractConstraint: {
|
|
@@ -322,12 +322,12 @@ export declare const Diagnostics: {
|
|
|
322
322
|
readonly code: string;
|
|
323
323
|
readonly messageText: string;
|
|
324
324
|
readonly schema: Schema;
|
|
325
|
-
readonly diagnosticType:
|
|
325
|
+
readonly diagnosticType: DiagnosticType;
|
|
326
326
|
ecDefinition: RelationshipClass;
|
|
327
327
|
messageArgs?: [string, string, string, string] | undefined;
|
|
328
328
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
329
329
|
};
|
|
330
|
-
diagnosticType:
|
|
330
|
+
diagnosticType: DiagnosticType;
|
|
331
331
|
};
|
|
332
332
|
/** EC-1600: Required message parameters: relationship end (source/target), relationship name */
|
|
333
333
|
AtLeastOneConstraintClassDefined: {
|
|
@@ -335,7 +335,7 @@ export declare const Diagnostics: {
|
|
|
335
335
|
readonly code: string;
|
|
336
336
|
readonly messageText: string;
|
|
337
337
|
readonly schema: Schema;
|
|
338
|
-
readonly diagnosticType:
|
|
338
|
+
readonly diagnosticType: DiagnosticType;
|
|
339
339
|
ecDefinition: RelationshipConstraint;
|
|
340
340
|
messageArgs?: [string, string] | undefined;
|
|
341
341
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
@@ -347,7 +347,7 @@ export declare const Diagnostics: {
|
|
|
347
347
|
readonly code: string;
|
|
348
348
|
readonly messageText: string;
|
|
349
349
|
readonly schema: Schema;
|
|
350
|
-
readonly diagnosticType:
|
|
350
|
+
readonly diagnosticType: DiagnosticType;
|
|
351
351
|
ecDefinition: RelationshipConstraint;
|
|
352
352
|
messageArgs?: [string, string] | undefined;
|
|
353
353
|
category: import("./Diagnostic").DiagnosticCategory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ECRules.d.ts","sourceRoot":"","sources":["../../../src/Validation/ECRules.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACL,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,6BAA6B,EAClD,WAAW,EAAE,WAAW,EACjC,iBAAiB,EAAE,sBAAsB,EAA4B,MAAM,EAEtF,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,eAAe,EAC4F,kCAAkC,
|
|
1
|
+
{"version":3,"file":"ECRules.d.ts","sourceRoot":"","sources":["../../../src/Validation/ECRules.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EACL,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,6BAA6B,EAClD,WAAW,EAAE,WAAW,EACjC,iBAAiB,EAAE,sBAAsB,EAA4B,MAAM,EAEtF,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,eAAe,EAC4F,kCAAkC,EAE7I,cAAc,EAAE,kBAAkB,EAAE,gCAAgC,EAAE,gBAAgB,EAAE,oBAAoB,EAC7G,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAQnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;CA+B3B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW;IACtB,+EAA+E;;;;;;;;;;;;;;IAI/E,2IAA2I;;;;;;;;;;;;;;IAI3I,mEAAmE;;;;;;;;;;;;;;IAInE,mFAAmF;;;;;;;;;;;;;IAInF,6GAA6G;;;;;;;;;;;;;IAI7G,kGAAkG;;;;;;;;;;;;;IAIlG,yGAAyG;;;;;;;;;;;;IAIzG,wIAAwI;;;;;;;;;;;;IAIxI,yGAAyG;;;;;;;;;;;;IAIzG,4DAA4D;;;;;;;;;;;;;IAI5D,uHAAuH;;;;;;;;;;;;;IAIvH,sIAAsI;;;;;;;;;;;;;IAItI,4IAA4I;;;;;;;;;;;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AAuB,2CAA2C,CAAC,WAAW,EAAE,WAAW,GAAG,aAAa,CAAC,oBAAoB,CAAC,WAAW,EAAE,GAAG,EAAE,CAAC,CAAC,CAWpJ;AAED;;;GAGG;AACH,wBAAuB,+BAA+B,CAAC,SAAS,EAAE,6BAA6B,EAAE,eAAe,EAAE,eAAe,GAAG,aAAa,CAAC,kCAAkC,CAAC,GAAG,EAAE,CAAC,CAAC,CAI3L"}
|
|
@@ -223,7 +223,7 @@ async function* baseClassIsOfDifferentType(ecClass) {
|
|
|
223
223
|
// return if rule passed
|
|
224
224
|
if (baseClass.schemaItemType === ecClass.schemaItemType)
|
|
225
225
|
return;
|
|
226
|
-
const itemType =
|
|
226
|
+
const itemType = baseClass.schemaItemType;
|
|
227
227
|
yield new exports.Diagnostics.BaseClassIsOfDifferentType(ecClass, [ecClass.fullName, baseClass.fullName, itemType]);
|
|
228
228
|
}
|
|
229
229
|
exports.baseClassIsOfDifferentType = baseClassIsOfDifferentType;
|