@itwin/ecschema-metadata 5.1.0-dev.27 → 5.1.0-dev.28

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.
@@ -1,4 +1,5 @@
1
- import { Schema } from "../Metadata/Schema";
1
+ import type { SchemaInfo } from "../Interfaces";
2
+ import type { Schema } from "../Metadata/Schema";
2
3
  /**
3
4
  * Utility class for working with Schema graphs.
4
5
  * @internal
@@ -12,6 +13,14 @@ export declare class SchemaGraphUtil {
12
13
  * will be created internally and passed along during recursive calls.
13
14
  */
14
15
  static buildDependencyOrderedSchemaList(insertSchema: Schema, schemas?: Schema[]): Schema[];
16
+ /**
17
+ * Returns a flat list of schemas in topological order, typically used before schema import
18
+ * so that dependent schemas are processed after their references. This method does not alter
19
+ * the original schemaInfos array.
20
+ * @param schemaInfos The schema collection that will hold the ordered schemas.
21
+ * @returns A list of schemas in topological order.
22
+ */
23
+ static buildDependencyOrderedSchemaInfoList(schemaInfos: ReadonlyArray<SchemaInfo>): ReadonlyArray<SchemaInfo>;
15
24
  /**
16
25
  * Indicates if the given Schema references the possibleDependency Schema.
17
26
  * @param schema The possible dependent schema.
@@ -27,8 +36,8 @@ export declare class SchemaGraphUtil {
27
36
  /**
28
37
  * Helper method that manages the insertion of a Schema into the schemas collection
29
38
  * based on the topological ordering algorithm.
30
- * @param schemas The ordered Schema collection.
31
- * @param insertSchema The Schema to insert.
39
+ * @param schemas The ordered collection.
40
+ * @param insert The instance to insert.
32
41
  */
33
42
  private static insertSchemaInDependencyOrderedList;
34
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaGraphUtil.d.ts","sourceRoot":"","sources":["../../../src/Deserialization/SchemaGraphUtil.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;;GAGG;AACH,qBAAa,eAAe;IAC1B;;;;;;OAMG;WACW,gCAAgC,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAWlG;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IAaxB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IASjC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,mCAAmC;CAgBnD"}
1
+ {"version":3,"file":"SchemaGraphUtil.d.ts","sourceRoot":"","sources":["../../../src/Deserialization/SchemaGraphUtil.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAIjD;;;GAGG;AACH,qBAAa,eAAe;IAC1B;;;;;;OAMG;WACW,gCAAgC,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAelG;;;;;;OAMG;WACW,oCAAoC,CAAC,WAAW,EAAE,aAAa,CAAC,UAAU,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC;IAarH;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IAcxB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAIjC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,mCAAmC;CAgBnD"}
@@ -1,8 +1,4 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
7
3
  exports.SchemaGraphUtil = void 0;
8
4
  /**
@@ -20,23 +16,44 @@ class SchemaGraphUtil {
20
16
  static buildDependencyOrderedSchemaList(insertSchema, schemas) {
21
17
  if (!schemas)
22
18
  schemas = [];
23
- this.insertSchemaInDependencyOrderedList(schemas, insertSchema);
19
+ const lookupFn = (schema, referenceKey) => {
20
+ return schema.references.find((s) => s.schemaKey.name === referenceKey.name);
21
+ };
22
+ this.insertSchemaInDependencyOrderedList(schemas, insertSchema, lookupFn);
24
23
  for (const reference of insertSchema.references) {
25
24
  this.buildDependencyOrderedSchemaList(reference, schemas);
26
25
  }
27
26
  return schemas;
28
27
  }
28
+ /**
29
+ * Returns a flat list of schemas in topological order, typically used before schema import
30
+ * so that dependent schemas are processed after their references. This method does not alter
31
+ * the original schemaInfos array.
32
+ * @param schemaInfos The schema collection that will hold the ordered schemas.
33
+ * @returns A list of schemas in topological order.
34
+ */
35
+ static buildDependencyOrderedSchemaInfoList(schemaInfos) {
36
+ const sortedList = [];
37
+ const lookupFn = (_schema, reference) => {
38
+ return schemaInfos.find((s) => s.schemaKey.name === reference.name);
39
+ };
40
+ for (const schemaInfo of schemaInfos) {
41
+ this.insertSchemaInDependencyOrderedList(sortedList, schemaInfo, lookupFn);
42
+ }
43
+ return sortedList;
44
+ }
29
45
  /**
30
46
  * Indicates if the given Schema references the possibleDependency Schema.
31
47
  * @param schema The possible dependent schema.
32
48
  * @param possibleDependency The possible Schema dependency.
33
49
  */
34
- static dependsOn(schema, possibleDependency) {
50
+ static dependsOn(schema, possibleDependency, lookup) {
35
51
  if (this.directlyReferences(schema, possibleDependency))
36
52
  return true;
37
53
  // search for dependencies in indirect references
38
- for (const reference of schema.references) {
39
- if (this.dependsOn(reference, possibleDependency))
54
+ for (const referenceInfo of schema.references) {
55
+ const reference = lookup(schema, referenceInfo.schemaKey);
56
+ if (reference && this.dependsOn(reference, possibleDependency, lookup))
40
57
  return true;
41
58
  }
42
59
  return false;
@@ -47,31 +64,27 @@ class SchemaGraphUtil {
47
64
  * @param possibleDependency The Schema that may be referenced.
48
65
  */
49
66
  static directlyReferences(schema, possiblyReferencedSchema) {
50
- for (const reference of schema.references) {
51
- if (reference === possiblyReferencedSchema)
52
- return true;
53
- }
54
- return false;
67
+ return schema.references.some((ref) => ref.schemaKey.name === possiblyReferencedSchema.schemaKey.name);
55
68
  }
56
69
  /**
57
70
  * Helper method that manages the insertion of a Schema into the schemas collection
58
71
  * based on the topological ordering algorithm.
59
- * @param schemas The ordered Schema collection.
60
- * @param insertSchema The Schema to insert.
72
+ * @param schemas The ordered collection.
73
+ * @param insert The instance to insert.
61
74
  */
62
- static insertSchemaInDependencyOrderedList(schemas, insertSchema) {
63
- if (schemas.includes(insertSchema))
75
+ static insertSchemaInDependencyOrderedList(orderedList, insert, lookup) {
76
+ if (orderedList.includes(insert))
64
77
  return;
65
- for (let i = schemas.length - 1; i >= 0; --i) {
66
- const schema = schemas[i];
67
- if (this.dependsOn(insertSchema, schema)) {
78
+ for (let i = orderedList.length - 1; i >= 0; --i) {
79
+ const schema = orderedList[i];
80
+ if (this.dependsOn(insert, schema, lookup)) {
68
81
  // insert right after the referenced schema in the list
69
- const index = schemas.indexOf(schema);
70
- schemas.splice(index + 1, 0, insertSchema);
82
+ const index = orderedList.indexOf(schema);
83
+ orderedList.splice(index + 1, 0, insert);
71
84
  return;
72
85
  }
73
86
  }
74
- schemas.splice(0, 0, insertSchema);
87
+ orderedList.splice(0, 0, insert);
75
88
  }
76
89
  }
77
90
  exports.SchemaGraphUtil = SchemaGraphUtil;
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaGraphUtil.js","sourceRoot":"","sources":["../../../src/Deserialization/SchemaGraphUtil.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAI/F;;;GAGG;AACH,MAAa,eAAe;IAC1B;;;;;;OAMG;IACI,MAAM,CAAC,gCAAgC,CAAC,YAAoB,EAAE,OAAkB;QACrF,IAAI,CAAC,OAAO;YACV,OAAO,GAAG,EAAE,CAAC;QAEf,IAAI,CAAC,mCAAmC,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAChE,KAAK,MAAM,SAAS,IAAI,YAAY,CAAC,UAAU,EAAE,CAAC;YAChD,IAAI,CAAC,gCAAgC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;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C,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;IACrC,CAAC;CACF;AAzED,0CAyEC","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 { Schema } from \"../Metadata/Schema\";\n\n/**\n * Utility class for working with Schema graphs.\n * @internal\n */\nexport class SchemaGraphUtil {\n /**\n * Creates a flattened list of schemas in topological order, typically used before schema import\n * so that dependent schemas are processed after their references.\n * @param insertSchema The schema to be imported.\n * @param schemas The schema collection that will hold the ordered schemas. If null, the collection\n * will be created internally and passed along during recursive calls.\n */\n public static buildDependencyOrderedSchemaList(insertSchema: Schema, schemas?: Schema[]): Schema[] {\n if (!schemas)\n schemas = [];\n\n this.insertSchemaInDependencyOrderedList(schemas, insertSchema);\n for (const reference of insertSchema.references) {\n this.buildDependencyOrderedSchemaList(reference, schemas);\n }\n return schemas;\n }\n\n /**\n * Indicates if the given Schema references the possibleDependency Schema.\n * @param schema The possible dependent schema.\n * @param possibleDependency The possible Schema dependency.\n */\n private static dependsOn(schema: Schema, possibleDependency: Schema): boolean {\n if (this.directlyReferences(schema, possibleDependency))\n return true;\n\n // search for dependencies in indirect references\n for (const reference of schema.references) {\n if (this.dependsOn(reference, possibleDependency))\n return true;\n }\n\n return false;\n }\n\n /**\n * Indicates if the given Schema directly references the possiblyReferencedSchema Schema.\n * @param schema The possible parent schema.\n * @param possibleDependency The Schema that may be referenced.\n */\n private static directlyReferences(schema: Schema, possiblyReferencedSchema: Schema): boolean {\n for (const reference of schema.references) {\n if (reference === possiblyReferencedSchema)\n return true;\n }\n\n return false;\n }\n\n /**\n * Helper method that manages the insertion of a Schema into the schemas collection\n * based on the topological ordering algorithm.\n * @param schemas The ordered Schema collection.\n * @param insertSchema The Schema to insert.\n */\n private static insertSchemaInDependencyOrderedList(schemas: Schema[], insertSchema: Schema) {\n if (schemas.includes(insertSchema))\n return;\n\n for (let i = schemas.length - 1; i >= 0; --i) {\n const schema = schemas[i];\n if (this.dependsOn(insertSchema, schema)) {\n // insert right after the referenced schema in the list\n const index = schemas.indexOf(schema);\n schemas.splice(index + 1, 0, insertSchema);\n return;\n }\n }\n\n schemas.splice(0, 0, insertSchema);\n }\n}\n"]}
1
+ {"version":3,"file":"SchemaGraphUtil.js","sourceRoot":"","sources":["../../../src/Deserialization/SchemaGraphUtil.ts"],"names":[],"mappings":";;;AAUA;;;GAGG;AACH,MAAa,eAAe;IAC1B;;;;;;OAMG;IACI,MAAM,CAAC,gCAAgC,CAAC,YAAoB,EAAE,OAAkB;QACrF,IAAI,CAAC,OAAO;YACV,OAAO,GAAG,EAAE,CAAC;QAEf,MAAM,QAAQ,GAAG,CAAC,MAAc,EAAE,YAAuB,EAAE,EAAE;YAC3D,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;QAC/E,CAAC,CAAC;QAEF,IAAI,CAAC,mCAAmC,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;QAC1E,KAAK,MAAM,SAAS,IAAI,YAAY,CAAC,UAAU,EAAE,CAAC;YAChD,IAAI,CAAC,gCAAgC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,oCAAoC,CAAC,WAAsC;QACvF,MAAM,UAAU,GAAsB,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,CAAC,OAAmB,EAAE,SAAoB,EAAE,EAAE;YAC7D,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CAAC,CAAC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AI,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;gBAC3C,uDAAuD;gBACvD,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBAC1C,WAAW,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;gBACzC,OAAO;YACT,CAAC;QACH,CAAC;QAED,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;CACF;AA7FD,0CA6FC","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 { SchemaInfo } from \"../Interfaces\";\nimport type { SchemaKey } from \"../SchemaKey\";\nimport type { Schema } from \"../Metadata/Schema\";\n\ntype SchemaReferenceLookup<T extends SchemaInfo> = (input: T, reference: SchemaKey) => T | undefined;\n\n/**\n * Utility class for working with Schema graphs.\n * @internal\n */\nexport class SchemaGraphUtil {\n /**\n * Creates a flattened list of schemas in topological order, typically used before schema import\n * so that dependent schemas are processed after their references.\n * @param insertSchema The schema to be imported.\n * @param schemas The schema collection that will hold the ordered schemas. If null, the collection\n * will be created internally and passed along during recursive calls.\n */\n public static buildDependencyOrderedSchemaList(insertSchema: Schema, schemas?: Schema[]): Schema[] {\n if (!schemas)\n schemas = [];\n\n const lookupFn = (schema: Schema, referenceKey: SchemaKey) => {\n return schema.references.find((s) => s.schemaKey.name === referenceKey.name);\n };\n\n this.insertSchemaInDependencyOrderedList(schemas, insertSchema, lookupFn);\n for (const reference of insertSchema.references) {\n this.buildDependencyOrderedSchemaList(reference, schemas);\n }\n return schemas;\n }\n\n /**\n * Returns a flat list of schemas in topological order, typically used before schema import\n * so that dependent schemas are processed after their references. This method does not alter\n * the original schemaInfos array.\n * @param schemaInfos The schema collection that will hold the ordered schemas.\n * @returns A list of schemas in topological order.\n */\n public static buildDependencyOrderedSchemaInfoList(schemaInfos: ReadonlyArray<SchemaInfo>): ReadonlyArray<SchemaInfo> {\n const sortedList: Array<SchemaInfo> = [];\n const lookupFn = (_schema: SchemaInfo, reference: SchemaKey) => {\n return schemaInfos.find((s) => s.schemaKey.name === reference.name);\n };\n\n for(const schemaInfo of schemaInfos) {\n this.insertSchemaInDependencyOrderedList(sortedList, schemaInfo, lookupFn);\n }\n\n return sortedList;\n }\n\n /**\n * Indicates if the given Schema references the possibleDependency Schema.\n * @param schema The possible dependent schema.\n * @param possibleDependency The possible Schema dependency.\n */\n private static dependsOn<T extends SchemaInfo>(schema: T, possibleDependency: T, lookup: SchemaReferenceLookup<T>): boolean {\n if (this.directlyReferences(schema, possibleDependency))\n return true;\n\n // search for dependencies in indirect references\n for (const referenceInfo of schema.references) {\n const reference = lookup(schema, referenceInfo.schemaKey);\n if (reference && this.dependsOn(reference, possibleDependency, lookup))\n return true;\n }\n\n return false;\n }\n\n /**\n * Indicates if the given Schema directly references the possiblyReferencedSchema Schema.\n * @param schema The possible parent schema.\n * @param possibleDependency The Schema that may be referenced.\n */\n private static directlyReferences<T extends SchemaInfo>(schema: T, possiblyReferencedSchema: T): boolean {\n return schema.references.some((ref) => ref.schemaKey.name === possiblyReferencedSchema.schemaKey.name);\n }\n\n /**\n * Helper method that manages the insertion of a Schema into the schemas collection\n * based on the topological ordering algorithm.\n * @param schemas The ordered collection.\n * @param insert The instance to insert.\n */\n private static insertSchemaInDependencyOrderedList<T extends SchemaInfo>(orderedList: T[], insert: T, lookup: SchemaReferenceLookup<T>) {\n if (orderedList.includes(insert))\n return;\n\n for (let i = orderedList.length - 1; i >= 0; --i) {\n const schema = orderedList[i];\n if (this.dependsOn(insert, schema, lookup)) {\n // insert right after the referenced schema in the list\n const index = orderedList.indexOf(schema);\n orderedList.splice(index + 1, 0, insert);\n return;\n }\n }\n\n orderedList.splice(0, 0, insert);\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
- import { Schema } from "../Metadata/Schema";
1
+ import type { SchemaInfo } from "../Interfaces";
2
+ import type { Schema } from "../Metadata/Schema";
2
3
  /**
3
4
  * Utility class for working with Schema graphs.
4
5
  * @internal
@@ -12,6 +13,14 @@ export declare class SchemaGraphUtil {
12
13
  * will be created internally and passed along during recursive calls.
13
14
  */
14
15
  static buildDependencyOrderedSchemaList(insertSchema: Schema, schemas?: Schema[]): Schema[];
16
+ /**
17
+ * Returns a flat list of schemas in topological order, typically used before schema import
18
+ * so that dependent schemas are processed after their references. This method does not alter
19
+ * the original schemaInfos array.
20
+ * @param schemaInfos The schema collection that will hold the ordered schemas.
21
+ * @returns A list of schemas in topological order.
22
+ */
23
+ static buildDependencyOrderedSchemaInfoList(schemaInfos: ReadonlyArray<SchemaInfo>): ReadonlyArray<SchemaInfo>;
15
24
  /**
16
25
  * Indicates if the given Schema references the possibleDependency Schema.
17
26
  * @param schema The possible dependent schema.
@@ -27,8 +36,8 @@ export declare class SchemaGraphUtil {
27
36
  /**
28
37
  * Helper method that manages the insertion of a Schema into the schemas collection
29
38
  * based on the topological ordering algorithm.
30
- * @param schemas The ordered Schema collection.
31
- * @param insertSchema The Schema to insert.
39
+ * @param schemas The ordered collection.
40
+ * @param insert The instance to insert.
32
41
  */
33
42
  private static insertSchemaInDependencyOrderedList;
34
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaGraphUtil.d.ts","sourceRoot":"","sources":["../../../src/Deserialization/SchemaGraphUtil.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C;;;GAGG;AACH,qBAAa,eAAe;IAC1B;;;;;;OAMG;WACW,gCAAgC,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAWlG;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IAaxB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IASjC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,mCAAmC;CAgBnD"}
1
+ {"version":3,"file":"SchemaGraphUtil.d.ts","sourceRoot":"","sources":["../../../src/Deserialization/SchemaGraphUtil.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAIjD;;;GAGG;AACH,qBAAa,eAAe;IAC1B;;;;;;OAMG;WACW,gCAAgC,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAelG;;;;;;OAMG;WACW,oCAAoC,CAAC,WAAW,EAAE,aAAa,CAAC,UAAU,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC;IAarH;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IAcxB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IAIjC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,mCAAmC;CAgBnD"}
@@ -1,7 +1,3 @@
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
1
  /**
6
2
  * Utility class for working with Schema graphs.
7
3
  * @internal
@@ -17,23 +13,44 @@ export class SchemaGraphUtil {
17
13
  static buildDependencyOrderedSchemaList(insertSchema, schemas) {
18
14
  if (!schemas)
19
15
  schemas = [];
20
- this.insertSchemaInDependencyOrderedList(schemas, insertSchema);
16
+ const lookupFn = (schema, referenceKey) => {
17
+ return schema.references.find((s) => s.schemaKey.name === referenceKey.name);
18
+ };
19
+ this.insertSchemaInDependencyOrderedList(schemas, insertSchema, lookupFn);
21
20
  for (const reference of insertSchema.references) {
22
21
  this.buildDependencyOrderedSchemaList(reference, schemas);
23
22
  }
24
23
  return schemas;
25
24
  }
25
+ /**
26
+ * Returns a flat list of schemas in topological order, typically used before schema import
27
+ * so that dependent schemas are processed after their references. This method does not alter
28
+ * the original schemaInfos array.
29
+ * @param schemaInfos The schema collection that will hold the ordered schemas.
30
+ * @returns A list of schemas in topological order.
31
+ */
32
+ static buildDependencyOrderedSchemaInfoList(schemaInfos) {
33
+ const sortedList = [];
34
+ const lookupFn = (_schema, reference) => {
35
+ return schemaInfos.find((s) => s.schemaKey.name === reference.name);
36
+ };
37
+ for (const schemaInfo of schemaInfos) {
38
+ this.insertSchemaInDependencyOrderedList(sortedList, schemaInfo, lookupFn);
39
+ }
40
+ return sortedList;
41
+ }
26
42
  /**
27
43
  * Indicates if the given Schema references the possibleDependency Schema.
28
44
  * @param schema The possible dependent schema.
29
45
  * @param possibleDependency The possible Schema dependency.
30
46
  */
31
- static dependsOn(schema, possibleDependency) {
47
+ static dependsOn(schema, possibleDependency, lookup) {
32
48
  if (this.directlyReferences(schema, possibleDependency))
33
49
  return true;
34
50
  // search for dependencies in indirect references
35
- for (const reference of schema.references) {
36
- if (this.dependsOn(reference, possibleDependency))
51
+ for (const referenceInfo of schema.references) {
52
+ const reference = lookup(schema, referenceInfo.schemaKey);
53
+ if (reference && this.dependsOn(reference, possibleDependency, lookup))
37
54
  return true;
38
55
  }
39
56
  return false;
@@ -44,31 +61,27 @@ export class SchemaGraphUtil {
44
61
  * @param possibleDependency The Schema that may be referenced.
45
62
  */
46
63
  static directlyReferences(schema, possiblyReferencedSchema) {
47
- for (const reference of schema.references) {
48
- if (reference === possiblyReferencedSchema)
49
- return true;
50
- }
51
- return false;
64
+ return schema.references.some((ref) => ref.schemaKey.name === possiblyReferencedSchema.schemaKey.name);
52
65
  }
53
66
  /**
54
67
  * Helper method that manages the insertion of a Schema into the schemas collection
55
68
  * based on the topological ordering algorithm.
56
- * @param schemas The ordered Schema collection.
57
- * @param insertSchema The Schema to insert.
69
+ * @param schemas The ordered collection.
70
+ * @param insert The instance to insert.
58
71
  */
59
- static insertSchemaInDependencyOrderedList(schemas, insertSchema) {
60
- if (schemas.includes(insertSchema))
72
+ static insertSchemaInDependencyOrderedList(orderedList, insert, lookup) {
73
+ if (orderedList.includes(insert))
61
74
  return;
62
- for (let i = schemas.length - 1; i >= 0; --i) {
63
- const schema = schemas[i];
64
- if (this.dependsOn(insertSchema, schema)) {
75
+ for (let i = orderedList.length - 1; i >= 0; --i) {
76
+ const schema = orderedList[i];
77
+ if (this.dependsOn(insert, schema, lookup)) {
65
78
  // insert right after the referenced schema in the list
66
- const index = schemas.indexOf(schema);
67
- schemas.splice(index + 1, 0, insertSchema);
79
+ const index = orderedList.indexOf(schema);
80
+ orderedList.splice(index + 1, 0, insert);
68
81
  return;
69
82
  }
70
83
  }
71
- schemas.splice(0, 0, insertSchema);
84
+ orderedList.splice(0, 0, insert);
72
85
  }
73
86
  }
74
87
  //# sourceMappingURL=SchemaGraphUtil.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaGraphUtil.js","sourceRoot":"","sources":["../../../src/Deserialization/SchemaGraphUtil.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAI/F;;;GAGG;AACH,MAAM,OAAO,eAAe;IAC1B;;;;;;OAMG;IACI,MAAM,CAAC,gCAAgC,CAAC,YAAoB,EAAE,OAAkB;QACrF,IAAI,CAAC,OAAO;YACV,OAAO,GAAG,EAAE,CAAC;QAEf,IAAI,CAAC,mCAAmC,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAChE,KAAK,MAAM,SAAS,IAAI,YAAY,CAAC,UAAU,EAAE,CAAC;YAChD,IAAI,CAAC,gCAAgC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,SAAS,CAAC,MAAc,EAAE,kBAA0B;QACjE,IAAI,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,CAAC;YACrD,OAAO,IAAI,CAAC;QAEd,iDAAiD;QACjD,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YAC1C,IAAI,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,kBAAkB,CAAC;gBAC/C,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;OAIG;IACK,MAAM,CAAC,kBAAkB,CAAC,MAAc,EAAE,wBAAgC;QAChF,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YAC1C,IAAI,SAAS,KAAK,wBAAwB;gBACxC,OAAO,IAAI,CAAC;QAChB,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACK,MAAM,CAAC,mCAAmC,CAAC,OAAiB,EAAE,YAAoB;QACxF,IAAI,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;YAChC,OAAO;QAET,KAAK,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;YAC7C,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,IAAI,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC;gBACzC,uDAAuD;gBACvD,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;gBACtC,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;gBAC3C,OAAO;YACT,CAAC;QACH,CAAC;QAED,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;IACrC,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\nimport { Schema } from \"../Metadata/Schema\";\n\n/**\n * Utility class for working with Schema graphs.\n * @internal\n */\nexport class SchemaGraphUtil {\n /**\n * Creates a flattened list of schemas in topological order, typically used before schema import\n * so that dependent schemas are processed after their references.\n * @param insertSchema The schema to be imported.\n * @param schemas The schema collection that will hold the ordered schemas. If null, the collection\n * will be created internally and passed along during recursive calls.\n */\n public static buildDependencyOrderedSchemaList(insertSchema: Schema, schemas?: Schema[]): Schema[] {\n if (!schemas)\n schemas = [];\n\n this.insertSchemaInDependencyOrderedList(schemas, insertSchema);\n for (const reference of insertSchema.references) {\n this.buildDependencyOrderedSchemaList(reference, schemas);\n }\n return schemas;\n }\n\n /**\n * Indicates if the given Schema references the possibleDependency Schema.\n * @param schema The possible dependent schema.\n * @param possibleDependency The possible Schema dependency.\n */\n private static dependsOn(schema: Schema, possibleDependency: Schema): boolean {\n if (this.directlyReferences(schema, possibleDependency))\n return true;\n\n // search for dependencies in indirect references\n for (const reference of schema.references) {\n if (this.dependsOn(reference, possibleDependency))\n return true;\n }\n\n return false;\n }\n\n /**\n * Indicates if the given Schema directly references the possiblyReferencedSchema Schema.\n * @param schema The possible parent schema.\n * @param possibleDependency The Schema that may be referenced.\n */\n private static directlyReferences(schema: Schema, possiblyReferencedSchema: Schema): boolean {\n for (const reference of schema.references) {\n if (reference === possiblyReferencedSchema)\n return true;\n }\n\n return false;\n }\n\n /**\n * Helper method that manages the insertion of a Schema into the schemas collection\n * based on the topological ordering algorithm.\n * @param schemas The ordered Schema collection.\n * @param insertSchema The Schema to insert.\n */\n private static insertSchemaInDependencyOrderedList(schemas: Schema[], insertSchema: Schema) {\n if (schemas.includes(insertSchema))\n return;\n\n for (let i = schemas.length - 1; i >= 0; --i) {\n const schema = schemas[i];\n if (this.dependsOn(insertSchema, schema)) {\n // insert right after the referenced schema in the list\n const index = schemas.indexOf(schema);\n schemas.splice(index + 1, 0, insertSchema);\n return;\n }\n }\n\n schemas.splice(0, 0, insertSchema);\n }\n}\n"]}
1
+ {"version":3,"file":"SchemaGraphUtil.js","sourceRoot":"","sources":["../../../src/Deserialization/SchemaGraphUtil.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,MAAM,OAAO,eAAe;IAC1B;;;;;;OAMG;IACI,MAAM,CAAC,gCAAgC,CAAC,YAAoB,EAAE,OAAkB;QACrF,IAAI,CAAC,OAAO;YACV,OAAO,GAAG,EAAE,CAAC;QAEf,MAAM,QAAQ,GAAG,CAAC,MAAc,EAAE,YAAuB,EAAE,EAAE;YAC3D,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,KAAK,YAAY,CAAC,IAAI,CAAC,CAAC;QAC/E,CAAC,CAAC;QAEF,IAAI,CAAC,mCAAmC,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;QAC1E,KAAK,MAAM,SAAS,IAAI,YAAY,CAAC,UAAU,EAAE,CAAC;YAChD,IAAI,CAAC,gCAAgC,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC5D,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,oCAAoC,CAAC,WAAsC;QACvF,MAAM,UAAU,GAAsB,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,CAAC,OAAmB,EAAE,SAAoB,EAAE,EAAE;YAC7D,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,CAAC,CAAC;QACtE,CAAC,CAAC;QAEF,KAAI,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACpC,IAAI,CAAC,mCAAmC,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;QAC7E,CAAC;Q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C;gBAC1C,WAAW,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;gBACzC,OAAO;YACT,CAAC;QACH,CAAC;QAED,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;IACnC,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*--------------------------------------------------------------------------------------------*/\nimport type { SchemaInfo } from \"../Interfaces\";\nimport type { SchemaKey } from \"../SchemaKey\";\nimport type { Schema } from \"../Metadata/Schema\";\n\ntype SchemaReferenceLookup<T extends SchemaInfo> = (input: T, reference: SchemaKey) => T | undefined;\n\n/**\n * Utility class for working with Schema graphs.\n * @internal\n */\nexport class SchemaGraphUtil {\n /**\n * Creates a flattened list of schemas in topological order, typically used before schema import\n * so that dependent schemas are processed after their references.\n * @param insertSchema The schema to be imported.\n * @param schemas The schema collection that will hold the ordered schemas. If null, the collection\n * will be created internally and passed along during recursive calls.\n */\n public static buildDependencyOrderedSchemaList(insertSchema: Schema, schemas?: Schema[]): Schema[] {\n if (!schemas)\n schemas = [];\n\n const lookupFn = (schema: Schema, referenceKey: SchemaKey) => {\n return schema.references.find((s) => s.schemaKey.name === referenceKey.name);\n };\n\n this.insertSchemaInDependencyOrderedList(schemas, insertSchema, lookupFn);\n for (const reference of insertSchema.references) {\n this.buildDependencyOrderedSchemaList(reference, schemas);\n }\n return schemas;\n }\n\n /**\n * Returns a flat list of schemas in topological order, typically used before schema import\n * so that dependent schemas are processed after their references. This method does not alter\n * the original schemaInfos array.\n * @param schemaInfos The schema collection that will hold the ordered schemas.\n * @returns A list of schemas in topological order.\n */\n public static buildDependencyOrderedSchemaInfoList(schemaInfos: ReadonlyArray<SchemaInfo>): ReadonlyArray<SchemaInfo> {\n const sortedList: Array<SchemaInfo> = [];\n const lookupFn = (_schema: SchemaInfo, reference: SchemaKey) => {\n return schemaInfos.find((s) => s.schemaKey.name === reference.name);\n };\n\n for(const schemaInfo of schemaInfos) {\n this.insertSchemaInDependencyOrderedList(sortedList, schemaInfo, lookupFn);\n }\n\n return sortedList;\n }\n\n /**\n * Indicates if the given Schema references the possibleDependency Schema.\n * @param schema The possible dependent schema.\n * @param possibleDependency The possible Schema dependency.\n */\n private static dependsOn<T extends SchemaInfo>(schema: T, possibleDependency: T, lookup: SchemaReferenceLookup<T>): boolean {\n if (this.directlyReferences(schema, possibleDependency))\n return true;\n\n // search for dependencies in indirect references\n for (const referenceInfo of schema.references) {\n const reference = lookup(schema, referenceInfo.schemaKey);\n if (reference && this.dependsOn(reference, possibleDependency, lookup))\n return true;\n }\n\n return false;\n }\n\n /**\n * Indicates if the given Schema directly references the possiblyReferencedSchema Schema.\n * @param schema The possible parent schema.\n * @param possibleDependency The Schema that may be referenced.\n */\n private static directlyReferences<T extends SchemaInfo>(schema: T, possiblyReferencedSchema: T): boolean {\n return schema.references.some((ref) => ref.schemaKey.name === possiblyReferencedSchema.schemaKey.name);\n }\n\n /**\n * Helper method that manages the insertion of a Schema into the schemas collection\n * based on the topological ordering algorithm.\n * @param schemas The ordered collection.\n * @param insert The instance to insert.\n */\n private static insertSchemaInDependencyOrderedList<T extends SchemaInfo>(orderedList: T[], insert: T, lookup: SchemaReferenceLookup<T>) {\n if (orderedList.includes(insert))\n return;\n\n for (let i = orderedList.length - 1; i >= 0; --i) {\n const schema = orderedList[i];\n if (this.dependsOn(insert, schema, lookup)) {\n // insert right after the referenced schema in the list\n const index = orderedList.indexOf(schema);\n orderedList.splice(index + 1, 0, insert);\n return;\n }\n }\n\n orderedList.splice(0, 0, insert);\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/ecschema-metadata",
3
- "version": "5.1.0-dev.27",
3
+ "version": "5.1.0-dev.28",
4
4
  "description": "ECObjects core concepts in typescript",
5
5
  "license": "MIT",
6
6
  "main": "lib/cjs/ecschema-metadata.js",
@@ -44,13 +44,13 @@
44
44
  "rimraf": "^6.0.1",
45
45
  "sinon": "^17.0.2",
46
46
  "typescript": "~5.6.2",
47
- "@itwin/build-tools": "5.1.0-dev.27",
48
- "@itwin/core-bentley": "5.1.0-dev.27",
49
- "@itwin/core-quantity": "5.1.0-dev.27"
47
+ "@itwin/build-tools": "5.1.0-dev.28",
48
+ "@itwin/core-bentley": "5.1.0-dev.28",
49
+ "@itwin/core-quantity": "5.1.0-dev.28"
50
50
  },
51
51
  "peerDependencies": {
52
- "@itwin/core-bentley": "5.1.0-dev.27",
53
- "@itwin/core-quantity": "5.1.0-dev.27"
52
+ "@itwin/core-bentley": "5.1.0-dev.28",
53
+ "@itwin/core-quantity": "5.1.0-dev.28"
54
54
  },
55
55
  "nyc": {
56
56
  "extends": "./node_modules/@itwin/build-tools/.nycrc"