@itwin/core-backend 4.1.0-dev.63 → 4.1.0-dev.67
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 +21 -1
- package/lib/cjs/ECSchemaXmlContext.d.ts +28 -1
- package/lib/cjs/ECSchemaXmlContext.d.ts.map +1 -1
- package/lib/cjs/ECSchemaXmlContext.js +28 -1
- package/lib/cjs/ECSchemaXmlContext.js.map +1 -1
- package/lib/cjs/SchemaUtils.d.ts +3 -0
- package/lib/cjs/SchemaUtils.d.ts.map +1 -1
- package/lib/cjs/SchemaUtils.js +2 -2
- package/lib/cjs/SchemaUtils.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
# Change Log - @itwin/core-backend
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 18 Jul 2023 13:47:06 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 4.0.5
|
|
6
|
+
Tue, 18 Jul 2023 12:21:56 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 4.0.4
|
|
11
|
+
Wed, 12 Jul 2023 15:50:01 GMT
|
|
12
|
+
|
|
13
|
+
_Version update only_
|
|
4
14
|
|
|
5
15
|
## 4.0.3
|
|
6
16
|
Mon, 03 Jul 2023 15:28:41 GMT
|
|
@@ -45,6 +55,16 @@ Mon, 22 May 2023 15:34:14 GMT
|
|
|
45
55
|
- allow passing a custom schema read context to IModelDb.importSchemas
|
|
46
56
|
- Added test to verify Id serialization to hex for system properties.
|
|
47
57
|
|
|
58
|
+
## 3.7.11
|
|
59
|
+
Tue, 11 Jul 2023 17:17:21 GMT
|
|
60
|
+
|
|
61
|
+
_Version update only_
|
|
62
|
+
|
|
63
|
+
## 3.7.10
|
|
64
|
+
Wed, 05 Jul 2023 13:41:21 GMT
|
|
65
|
+
|
|
66
|
+
_Version update only_
|
|
67
|
+
|
|
48
68
|
## 3.7.9
|
|
49
69
|
Tue, 20 Jun 2023 12:51:02 GMT
|
|
50
70
|
|
|
@@ -6,14 +6,41 @@ import { IModelJsNative } from "@bentley/imodeljs-native";
|
|
|
6
6
|
export type SchemaKey = IModelJsNative.ECSchemaXmlContext.SchemaKey;
|
|
7
7
|
/** @internal */
|
|
8
8
|
export type SchemaMatchType = IModelJsNative.ECSchemaXmlContext.SchemaMatchType;
|
|
9
|
-
/**
|
|
9
|
+
/** Context used when deserializing a [Schema]($ecschema-metadata) from an XML file.
|
|
10
|
+
* A schema may contain references to other schemas, which may reside elsewhere on the local disk than the referencing schema.
|
|
11
|
+
* The context maintains a list of directories ("search paths") to search for referenced schemas. Directories can be appended to the list via [[addSchemaPath]].
|
|
12
|
+
* When a referenced schema needs to be located, the list of directories is searched in the order in which each was added.
|
|
13
|
+
* Once located, the schema is cached to avoid performing repeated lookups in the file system.
|
|
14
|
+
* @see [[readSchemaFromXmlFile]] to deserialize a schema.
|
|
15
|
+
* @beta
|
|
16
|
+
*/
|
|
10
17
|
export declare class ECSchemaXmlContext {
|
|
11
18
|
private _nativeContext;
|
|
19
|
+
/** Construct a context with an empty list of search paths. */
|
|
12
20
|
constructor();
|
|
21
|
+
/** @internal */
|
|
13
22
|
get nativeContext(): IModelJsNative.ECSchemaXmlContext;
|
|
23
|
+
/** Append a directory to the list of directories that will be searched to locate referenced schemas.
|
|
24
|
+
* The directories are searched in the order in which they were added to the list.
|
|
25
|
+
* @param searchPath The absolute path to the directory to search.
|
|
26
|
+
*/
|
|
14
27
|
addSchemaPath(searchPath: string): void;
|
|
28
|
+
/** Set the last locater to be used when trying to find a schema
|
|
29
|
+
* @param locater Locater that should be used as the last locater when trying to find a schema
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
15
32
|
setSchemaLocater(locater: IModelJsNative.ECSchemaXmlContext.SchemaLocaterCallback): void;
|
|
33
|
+
/** Adds a schema locator to the beginning of the list of locators used to search for schemas.
|
|
34
|
+
* This schema locator will be prioritized over other locators when searching for schemas in the current context.
|
|
35
|
+
* @param locater Locater to add to the current context
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
16
38
|
setFirstSchemaLocater(locater: IModelJsNative.ECSchemaXmlContext.SchemaLocaterCallback): void;
|
|
39
|
+
/** Deserialize a [Schema]($ecschema-metadata) from an ECSchemaXML-formatted file.
|
|
40
|
+
* @param filePath The absolute path of the XML file.
|
|
41
|
+
* @returns The JSON representation of the schema, as a [SchemaProps]($ecschema-metadata).
|
|
42
|
+
* @throws [[IModelError]] if there is a problem reading schema from the XML file
|
|
43
|
+
*/
|
|
17
44
|
readSchemaFromXmlFile(filePath: string): any;
|
|
18
45
|
}
|
|
19
46
|
//# sourceMappingURL=ECSchemaXmlContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ECSchemaXmlContext.d.ts","sourceRoot":"","sources":["../../src/ECSchemaXmlContext.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,gBAAgB;AAChB,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,kBAAkB,CAAC,SAAS,CAAC;AAEpE,gBAAgB;AAChB,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,kBAAkB,CAAC,eAAe,CAAC;AAEhF
|
|
1
|
+
{"version":3,"file":"ECSchemaXmlContext.d.ts","sourceRoot":"","sources":["../../src/ECSchemaXmlContext.ts"],"names":[],"mappings":"AAIA;;GAEG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,gBAAgB;AAChB,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,kBAAkB,CAAC,SAAS,CAAC;AAEpE,gBAAgB;AAChB,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,kBAAkB,CAAC,eAAe,CAAC;AAEhF;;;;;;;GAOG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,cAAc,CAAgD;IAEtE,8DAA8D;;IAK9D,gBAAgB;IAChB,IAAW,aAAa,IAAI,cAAc,CAAC,kBAAkB,CAG5D;IAED;;;OAGG;IACI,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAI9C;;;OAGG;IACI,gBAAgB,CAAC,OAAO,EAAE,cAAc,CAAC,kBAAkB,CAAC,qBAAqB,GAAG,IAAI;IAI/F;;;;OAIG;IACI,qBAAqB,CAAC,OAAO,EAAE,cAAc,CAAC,kBAAkB,CAAC,qBAAqB,GAAG,IAAI;IAIpG;;;;OAIG;IACI,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG;CASpD"}
|
|
@@ -11,24 +11,51 @@ exports.ECSchemaXmlContext = void 0;
|
|
|
11
11
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
12
12
|
const core_common_1 = require("@itwin/core-common");
|
|
13
13
|
const IModelHost_1 = require("./IModelHost");
|
|
14
|
-
/**
|
|
14
|
+
/** Context used when deserializing a [Schema]($ecschema-metadata) from an XML file.
|
|
15
|
+
* A schema may contain references to other schemas, which may reside elsewhere on the local disk than the referencing schema.
|
|
16
|
+
* The context maintains a list of directories ("search paths") to search for referenced schemas. Directories can be appended to the list via [[addSchemaPath]].
|
|
17
|
+
* When a referenced schema needs to be located, the list of directories is searched in the order in which each was added.
|
|
18
|
+
* Once located, the schema is cached to avoid performing repeated lookups in the file system.
|
|
19
|
+
* @see [[readSchemaFromXmlFile]] to deserialize a schema.
|
|
20
|
+
* @beta
|
|
21
|
+
*/
|
|
15
22
|
class ECSchemaXmlContext {
|
|
23
|
+
/** Construct a context with an empty list of search paths. */
|
|
16
24
|
constructor() {
|
|
17
25
|
this._nativeContext = new IModelHost_1.IModelHost.platform.ECSchemaXmlContext();
|
|
18
26
|
}
|
|
27
|
+
/** @internal */
|
|
19
28
|
get nativeContext() {
|
|
20
29
|
(0, core_bentley_1.assert)(undefined !== this._nativeContext);
|
|
21
30
|
return this._nativeContext;
|
|
22
31
|
}
|
|
32
|
+
/** Append a directory to the list of directories that will be searched to locate referenced schemas.
|
|
33
|
+
* The directories are searched in the order in which they were added to the list.
|
|
34
|
+
* @param searchPath The absolute path to the directory to search.
|
|
35
|
+
*/
|
|
23
36
|
addSchemaPath(searchPath) {
|
|
24
37
|
this.nativeContext.addSchemaPath(searchPath);
|
|
25
38
|
}
|
|
39
|
+
/** Set the last locater to be used when trying to find a schema
|
|
40
|
+
* @param locater Locater that should be used as the last locater when trying to find a schema
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
26
43
|
setSchemaLocater(locater) {
|
|
27
44
|
this.nativeContext.setSchemaLocater(locater);
|
|
28
45
|
}
|
|
46
|
+
/** Adds a schema locator to the beginning of the list of locators used to search for schemas.
|
|
47
|
+
* This schema locator will be prioritized over other locators when searching for schemas in the current context.
|
|
48
|
+
* @param locater Locater to add to the current context
|
|
49
|
+
* @internal
|
|
50
|
+
*/
|
|
29
51
|
setFirstSchemaLocater(locater) {
|
|
30
52
|
this.nativeContext.setFirstSchemaLocater(locater);
|
|
31
53
|
}
|
|
54
|
+
/** Deserialize a [Schema]($ecschema-metadata) from an ECSchemaXML-formatted file.
|
|
55
|
+
* @param filePath The absolute path of the XML file.
|
|
56
|
+
* @returns The JSON representation of the schema, as a [SchemaProps]($ecschema-metadata).
|
|
57
|
+
* @throws [[IModelError]] if there is a problem reading schema from the XML file
|
|
58
|
+
*/
|
|
32
59
|
readSchemaFromXmlFile(filePath) {
|
|
33
60
|
const response = this.nativeContext.readSchemaFromXmlFile(filePath);
|
|
34
61
|
if (response.error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ECSchemaXmlContext.js","sourceRoot":"","sources":["../../src/ECSchemaXmlContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,oDAAiD;AAEjD,6CAA0C;AAQ1C
|
|
1
|
+
{"version":3,"file":"ECSchemaXmlContext.js","sourceRoot":"","sources":["../../src/ECSchemaXmlContext.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6C;AAC7C,oDAAiD;AAEjD,6CAA0C;AAQ1C;;;;;;;GAOG;AACH,MAAa,kBAAkB;IAG7B,8DAA8D;IAC9D;QACE,IAAI,CAAC,cAAc,GAAG,IAAI,uBAAU,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC;IACrE,CAAC;IAED,gBAAgB;IAChB,IAAW,aAAa;QACtB,IAAA,qBAAM,EAAC,SAAS,KAAK,IAAI,CAAC,cAAc,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,aAAa,CAAC,UAAkB;QACrC,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAC/C,CAAC;IAED;;;OAGG;IACI,gBAAgB,CAAC,OAAgE;QACtF,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACI,qBAAqB,CAAC,OAAgE;QAC3F,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;IAED;;;;OAIG;IACI,qBAAqB,CAAC,QAAgB;QAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QACpE,IAAI,QAAQ,CAAC,KAAK,EAAE;YAClB,MAAM,IAAI,yBAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;SACtE;QAED,IAAA,qBAAM,EAAC,SAAS,KAAK,QAAQ,CAAC,MAAM,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;CACF;AArDD,gDAqDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Schema\r\n */\r\n\r\nimport { assert } from \"@itwin/core-bentley\";\r\nimport { IModelError } from \"@itwin/core-common\";\r\nimport { IModelJsNative } from \"@bentley/imodeljs-native\";\r\nimport { IModelHost } from \"./IModelHost\";\r\n\r\n/** @internal */\r\nexport type SchemaKey = IModelJsNative.ECSchemaXmlContext.SchemaKey;\r\n\r\n/** @internal */\r\nexport type SchemaMatchType = IModelJsNative.ECSchemaXmlContext.SchemaMatchType;\r\n\r\n/** Context used when deserializing a [Schema]($ecschema-metadata) from an XML file.\r\n * A schema may contain references to other schemas, which may reside elsewhere on the local disk than the referencing schema.\r\n * The context maintains a list of directories (\"search paths\") to search for referenced schemas. Directories can be appended to the list via [[addSchemaPath]].\r\n * When a referenced schema needs to be located, the list of directories is searched in the order in which each was added.\r\n * Once located, the schema is cached to avoid performing repeated lookups in the file system.\r\n * @see [[readSchemaFromXmlFile]] to deserialize a schema.\r\n * @beta\r\n */\r\nexport class ECSchemaXmlContext {\r\n private _nativeContext: IModelJsNative.ECSchemaXmlContext | undefined;\r\n\r\n /** Construct a context with an empty list of search paths. */\r\n constructor() {\r\n this._nativeContext = new IModelHost.platform.ECSchemaXmlContext();\r\n }\r\n\r\n /** @internal */\r\n public get nativeContext(): IModelJsNative.ECSchemaXmlContext {\r\n assert(undefined !== this._nativeContext);\r\n return this._nativeContext;\r\n }\r\n\r\n /** Append a directory to the list of directories that will be searched to locate referenced schemas.\r\n * The directories are searched in the order in which they were added to the list.\r\n * @param searchPath The absolute path to the directory to search.\r\n */\r\n public addSchemaPath(searchPath: string): void {\r\n this.nativeContext.addSchemaPath(searchPath);\r\n }\r\n\r\n /** Set the last locater to be used when trying to find a schema\r\n * @param locater Locater that should be used as the last locater when trying to find a schema\r\n * @internal\r\n */\r\n public setSchemaLocater(locater: IModelJsNative.ECSchemaXmlContext.SchemaLocaterCallback): void {\r\n this.nativeContext.setSchemaLocater(locater);\r\n }\r\n\r\n /** Adds a schema locator to the beginning of the list of locators used to search for schemas.\r\n * This schema locator will be prioritized over other locators when searching for schemas in the current context.\r\n * @param locater Locater to add to the current context\r\n * @internal\r\n */\r\n public setFirstSchemaLocater(locater: IModelJsNative.ECSchemaXmlContext.SchemaLocaterCallback): void {\r\n this.nativeContext.setFirstSchemaLocater(locater);\r\n }\r\n\r\n /** Deserialize a [Schema]($ecschema-metadata) from an ECSchemaXML-formatted file.\r\n * @param filePath The absolute path of the XML file.\r\n * @returns The JSON representation of the schema, as a [SchemaProps]($ecschema-metadata).\r\n * @throws [[IModelError]] if there is a problem reading schema from the XML file\r\n */\r\n public readSchemaFromXmlFile(filePath: string): any {\r\n const response = this.nativeContext.readSchemaFromXmlFile(filePath);\r\n if (response.error) {\r\n throw new IModelError(response.error.status, response.error.message);\r\n }\r\n\r\n assert(undefined !== response.result);\r\n return JSON.parse(response.result);\r\n }\r\n}\r\n"]}
|
package/lib/cjs/SchemaUtils.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Schema
|
|
3
|
+
*/
|
|
1
4
|
import { ECSchemaXmlContext } from "./ECSchemaXmlContext";
|
|
2
5
|
/** Converts EC2 Xml ECSchema(s). On success, the `EC2 Xml schemas` are converted into `EC3.2 Xml schemas`.
|
|
3
6
|
* @param ec2XmlSchemas The EC2 Xml string(s) created from a serialized ECSchema.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaUtils.d.ts","sourceRoot":"","sources":["../../src/SchemaUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SchemaUtils.d.ts","sourceRoot":"","sources":["../../src/SchemaUtils.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,aAAa,CAAC,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAOnH;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,aAAa,CAAC,EAAE,kBAAkB,GAAG,MAAM,EAAE,CAO/G"}
|
package/lib/cjs/SchemaUtils.js
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
4
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
5
|
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.upgradeCustomAttributesToEC3 = exports.convertEC2SchemasToEC3Schemas = void 0;
|
|
8
6
|
/** @packageDocumentation
|
|
9
7
|
* @module Schema
|
|
10
8
|
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.upgradeCustomAttributesToEC3 = exports.convertEC2SchemasToEC3Schemas = void 0;
|
|
11
11
|
const imodeljs_native_1 = require("@bentley/imodeljs-native");
|
|
12
12
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
13
13
|
const core_common_1 = require("@itwin/core-common");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaUtils.js","sourceRoot":"","sources":["../../src/SchemaUtils.ts"],"names":[],"mappings":";AAAA;;;+FAG+F
|
|
1
|
+
{"version":3,"file":"SchemaUtils.js","sourceRoot":"","sources":["../../src/SchemaUtils.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,8DAA0D;AAC1D,sDAAoD;AACpD,oDAAiD;AAGjD;;;;;GAKG;AACH,SAAgB,6BAA6B,CAAC,aAAuB,EAAE,aAAkC;IACvG,MAAM,kBAAkB,GAAG,aAAa,EAAE,aAAa,CAAC;IACxD,MAAM,aAAa,GAAa,gCAAc,CAAC,aAAa,CAAC,oBAAoB,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAAC;IACrH,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC;QAC5B,MAAM,IAAI,yBAAW,CAAC,4BAAa,CAAC,KAAK,EAAE,kCAAkC,CAAC,CAAC;IAEjF,OAAO,aAAa,CAAC;AACvB,CAAC;AAPD,sEAOC;AAED;;;;;GAKG;AACH,SAAgB,4BAA4B,CAAC,UAAoB,EAAE,aAAkC;IACnG,MAAM,kBAAkB,GAAG,aAAa,EAAE,aAAa,CAAC;IACxD,MAAM,sBAAsB,GAAa,gCAAc,CAAC,aAAa,CAAC,uBAAuB,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAC;IAC9H,IAAI,sBAAsB,CAAC,MAAM,KAAK,CAAC;QACrC,MAAM,IAAI,yBAAW,CAAC,4BAAa,CAAC,KAAK,EAAE,mDAAmD,CAAC,CAAC;IAElG,OAAO,sBAAsB,CAAC;AAChC,CAAC;AAPD,oEAOC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Schema\r\n */\r\n\r\nimport { IModelJsNative } from \"@bentley/imodeljs-native\";\r\nimport { BentleyStatus } from \"@itwin/core-bentley\";\r\nimport { IModelError } from \"@itwin/core-common\";\r\nimport { ECSchemaXmlContext } from \"./ECSchemaXmlContext\";\r\n\r\n/** Converts EC2 Xml ECSchema(s). On success, the `EC2 Xml schemas` are converted into `EC3.2 Xml schemas`.\r\n * @param ec2XmlSchemas The EC2 Xml string(s) created from a serialized ECSchema.\r\n * @returns EC3.2 Xml ECSchema(s).\r\n * @throws [[IModelError]] if there is a problem converting the EC2 schemas.\r\n * @beta\r\n */\r\nexport function convertEC2SchemasToEC3Schemas(ec2XmlSchemas: string[], schemaContext?: ECSchemaXmlContext): string[] {\r\n const maybeNativeContext = schemaContext?.nativeContext;\r\n const ec3XmlSchemas: string[] = IModelJsNative.SchemaUtility.convertEC2XmlSchemas(ec2XmlSchemas, maybeNativeContext);\r\n if (ec2XmlSchemas.length === 0)\r\n throw new IModelError(BentleyStatus.ERROR, \"Error converting EC2 Xml schemas\");\r\n\r\n return ec3XmlSchemas;\r\n}\r\n\r\n/** Converts schema metadata to EC3 concepts by traversing custom attributes of the supplied schema and calling converters based on schemaName:customAttributeName\r\n * @param xmlSchemas The ECSchema Xml string(s).\r\n * @returns EC3.2 Xml ECSchema(s) with converted custom attributes.\r\n * @throws [[IModelError]] if there is a problem converting the custom attributes of a schema.\r\n * @beta\r\n */\r\nexport function upgradeCustomAttributesToEC3(xmlSchemas: string[], schemaContext?: ECSchemaXmlContext): string[] {\r\n const maybeNativeContext = schemaContext?.nativeContext;\r\n const schemasWithConvertedCA: string[] = IModelJsNative.SchemaUtility.convertCustomAttributes(xmlSchemas, maybeNativeContext);\r\n if (schemasWithConvertedCA.length === 0)\r\n throw new IModelError(BentleyStatus.ERROR, \"Error converting custom attributes of Xml schemas\");\r\n\r\n return schemasWithConvertedCA;\r\n}\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/core-backend",
|
|
3
|
-
"version": "4.1.0-dev.
|
|
3
|
+
"version": "4.1.0-dev.67",
|
|
4
4
|
"description": "iTwin.js backend components",
|
|
5
5
|
"main": "lib/cjs/core-backend.js",
|
|
6
6
|
"typings": "lib/cjs/core-backend",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"url": "http://www.bentley.com"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@itwin/core-bentley": "^4.1.0-dev.
|
|
29
|
-
"@itwin/core-common": "^4.1.0-dev.
|
|
30
|
-
"@itwin/core-geometry": "^4.1.0-dev.
|
|
28
|
+
"@itwin/core-bentley": "^4.1.0-dev.67",
|
|
29
|
+
"@itwin/core-common": "^4.1.0-dev.67",
|
|
30
|
+
"@itwin/core-geometry": "^4.1.0-dev.67",
|
|
31
31
|
"@opentelemetry/api": "^1.0.4"
|
|
32
32
|
},
|
|
33
33
|
"peerDependenciesMeta": {
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
"source-map-loader": "^4.0.0",
|
|
67
67
|
"typescript": "~5.0.2",
|
|
68
68
|
"webpack": "^5.76.0",
|
|
69
|
-
"@itwin/build-tools": "4.1.0-dev.
|
|
70
|
-
"@itwin/core-common": "4.1.0-dev.
|
|
71
|
-
"@itwin/core-bentley": "4.1.0-dev.
|
|
72
|
-
"@itwin/core-geometry": "4.1.0-dev.
|
|
73
|
-
"@itwin/core-webpack-tools": "4.1.0-dev.
|
|
69
|
+
"@itwin/build-tools": "4.1.0-dev.67",
|
|
70
|
+
"@itwin/core-common": "4.1.0-dev.67",
|
|
71
|
+
"@itwin/core-bentley": "4.1.0-dev.67",
|
|
72
|
+
"@itwin/core-geometry": "4.1.0-dev.67",
|
|
73
|
+
"@itwin/core-webpack-tools": "4.1.0-dev.67",
|
|
74
74
|
"internal-tools": "3.0.0-dev.69"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"reflect-metadata": "^0.1.13",
|
|
87
87
|
"semver": "^7.3.5",
|
|
88
88
|
"ws": "^7.5.3",
|
|
89
|
-
"@itwin/core-telemetry": "4.1.0-dev.
|
|
89
|
+
"@itwin/core-telemetry": "4.1.0-dev.67"
|
|
90
90
|
},
|
|
91
91
|
"nyc": {
|
|
92
92
|
"extends": "./node_modules/@itwin/build-tools/.nycrc"
|