@itwin/ecschema-metadata 5.1.0-dev.1 → 5.1.0-dev.10
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 +13 -1
- package/lib/cjs/Metadata/CustomAttribute.d.ts +7 -1
- package/lib/cjs/Metadata/CustomAttribute.d.ts.map +1 -1
- package/lib/cjs/Metadata/CustomAttribute.js.map +1 -1
- package/lib/esm/Metadata/CustomAttribute.d.ts +7 -1
- package/lib/esm/Metadata/CustomAttribute.d.ts.map +1 -1
- package/lib/esm/Metadata/CustomAttribute.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# Change Log - @itwin/ecschema-metadata
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 30 Apr 2025 13:16:15 GMT and should not be manually modified.
|
|
4
|
+
|
|
5
|
+
## 4.11.1
|
|
6
|
+
Wed, 30 Apr 2025 13:13:21 GMT
|
|
7
|
+
|
|
8
|
+
_Version update only_
|
|
9
|
+
|
|
10
|
+
## 4.11.0
|
|
11
|
+
Wed, 16 Apr 2025 15:50:28 GMT
|
|
12
|
+
|
|
13
|
+
### Updates
|
|
14
|
+
|
|
15
|
+
- **BREAKING:** The signature of protected method `ECClass.buildPropertyCache()` has been changed to take less arguments and return a `Promise<Property[]>`.
|
|
4
16
|
|
|
5
17
|
## 4.10.13
|
|
6
18
|
Thu, 10 Apr 2025 17:47:21 GMT
|
|
@@ -7,7 +7,13 @@ export interface CustomAttribute {
|
|
|
7
7
|
className: string;
|
|
8
8
|
[propName: string]: any;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* A collection of custom attributes, accessed by full class names in the format `SchemaName.ClassName`.
|
|
12
|
+
* Iterates over, checks, and retrieves attributes. Class names are case-insensitive, separated by a dot (`.`).
|
|
13
|
+
* @param className - The full class name.
|
|
14
|
+
* @returns Iterator, boolean, or custom attribute.
|
|
15
|
+
* @public @preview
|
|
16
|
+
*/
|
|
11
17
|
export interface CustomAttributeSet {
|
|
12
18
|
[Symbol.iterator]: () => IterableIterator<[string, CustomAttribute]>;
|
|
13
19
|
has(className: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomAttribute.d.ts","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,uBAAuB;AACvB,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB;AAED
|
|
1
|
+
{"version":3,"file":"CustomAttribute.d.ts","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,uBAAuB;AACvB,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB;AAED;;;;;;EAME;AACF,MAAM,WAAW,kBAAkB;IACjC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,gBAAgB,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;IACrE,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;CACrD;AAED,uBAAuB;AACvB,MAAM,WAAW,6BAA6B;IAC5C,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,wBAAgB,yBAAyB,CAAC,gBAAgB,EAAE,kBAAkB,GAAG,SAAS,GAAG,GAAG,EAAE,GAAG,SAAS,CAc7G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomAttribute.js","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;
|
|
1
|
+
{"version":3,"file":"CustomAttribute.js","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA+BH,8DAcC;AAfD,gBAAgB;AAChB,SAAgB,yBAAyB,CAAC,gBAAgD;IACxF,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC,CAAC,gCAAgC;QACpE,MAAM,UAAU,GAAU,EAAE,CAAC;QAC7B,KAAK,MAAM,CAAC,EAAE,eAAe,CAAC,IAAI,gBAAgB,EAAE,CAAC;YACnD,MAAM,SAAS,GAA6B,EAAE,CAAC;YAC/C,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,QAAa,EAAE,EAAE;gBACjD,MAAM,YAAY,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;gBACzC,SAAS,CAAC,YAAY,CAAC,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;YACH,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,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*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { Schema } from \"./Schema\";\n\n/** @public @preview */\nexport interface CustomAttribute {\n className: string;\n [propName: string]: any;\n}\n\n/**\n* A collection of custom attributes, accessed by full class names in the format `SchemaName.ClassName`.\n* Iterates over, checks, and retrieves attributes. Class names are case-insensitive, separated by a dot (`.`).\n* @param className - The full class name.\n* @returns Iterator, boolean, or custom attribute.\n* @public @preview\n*/\nexport interface CustomAttributeSet {\n [Symbol.iterator]: () => IterableIterator<[string, CustomAttribute]>;\n has(className: string): boolean;\n get(className: string): CustomAttribute | undefined;\n}\n\n/** @public @preview */\nexport interface CustomAttributeContainerProps {\n customAttributes?: CustomAttributeSet;\n fullName: string;\n schema: Schema;\n}\n\n/** @internal */\nexport function serializeCustomAttributes(customAttributes: CustomAttributeSet | undefined): any[] | undefined {\n if (undefined !== customAttributes) { // custom attributes is optional\n const attributes: any[] = [];\n for (const [, customAttribute] of customAttributes) {\n const attribute: { [value: string]: any } = {};\n Object.keys(customAttribute).map((property: any) => {\n const propertyName = property.toString();\n attribute[propertyName] = customAttribute[property];\n });\n attributes.push(attribute);\n }\n return (attributes.length > 0) ? attributes : undefined;\n }\n return undefined;\n}\n"]}
|
|
@@ -7,7 +7,13 @@ export interface CustomAttribute {
|
|
|
7
7
|
className: string;
|
|
8
8
|
[propName: string]: any;
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* A collection of custom attributes, accessed by full class names in the format `SchemaName.ClassName`.
|
|
12
|
+
* Iterates over, checks, and retrieves attributes. Class names are case-insensitive, separated by a dot (`.`).
|
|
13
|
+
* @param className - The full class name.
|
|
14
|
+
* @returns Iterator, boolean, or custom attribute.
|
|
15
|
+
* @public @preview
|
|
16
|
+
*/
|
|
11
17
|
export interface CustomAttributeSet {
|
|
12
18
|
[Symbol.iterator]: () => IterableIterator<[string, CustomAttribute]>;
|
|
13
19
|
has(className: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomAttribute.d.ts","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,uBAAuB;AACvB,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB;AAED
|
|
1
|
+
{"version":3,"file":"CustomAttribute.d.ts","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,uBAAuB;AACvB,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACzB;AAED;;;;;;EAME;AACF,MAAM,WAAW,kBAAkB;IACjC,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,MAAM,gBAAgB,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;IACrE,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;CACrD;AAED,uBAAuB;AACvB,MAAM,WAAW,6BAA6B;IAC5C,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gBAAgB;AAChB,wBAAgB,yBAAyB,CAAC,gBAAgB,EAAE,kBAAkB,GAAG,SAAS,GAAG,GAAG,EAAE,GAAG,SAAS,CAc7G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomAttribute.js","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;
|
|
1
|
+
{"version":3,"file":"CustomAttribute.js","sourceRoot":"","sources":["../../../src/Metadata/CustomAttribute.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AA8BH,gBAAgB;AAChB,MAAM,UAAU,yBAAyB,CAAC,gBAAgD;IACxF,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC,CAAC,gCAAgC;QACpE,MAAM,UAAU,GAAU,EAAE,CAAC;QAC7B,KAAK,MAAM,CAAC,EAAE,eAAe,CAAC,IAAI,gBAAgB,EAAE,CAAC;YACnD,MAAM,SAAS,GAA6B,EAAE,CAAC;YAC/C,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,QAAa,EAAE,EAAE;gBACjD,MAAM,YAAY,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAC;gBACzC,SAAS,CAAC,YAAY,CAAC,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;YACtD,CAAC,CAAC,CAAC;YACH,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QACD,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1D,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,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*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Metadata\n */\n\nimport { Schema } from \"./Schema\";\n\n/** @public @preview */\nexport interface CustomAttribute {\n className: string;\n [propName: string]: any;\n}\n\n/**\n* A collection of custom attributes, accessed by full class names in the format `SchemaName.ClassName`.\n* Iterates over, checks, and retrieves attributes. Class names are case-insensitive, separated by a dot (`.`).\n* @param className - The full class name.\n* @returns Iterator, boolean, or custom attribute.\n* @public @preview\n*/\nexport interface CustomAttributeSet {\n [Symbol.iterator]: () => IterableIterator<[string, CustomAttribute]>;\n has(className: string): boolean;\n get(className: string): CustomAttribute | undefined;\n}\n\n/** @public @preview */\nexport interface CustomAttributeContainerProps {\n customAttributes?: CustomAttributeSet;\n fullName: string;\n schema: Schema;\n}\n\n/** @internal */\nexport function serializeCustomAttributes(customAttributes: CustomAttributeSet | undefined): any[] | undefined {\n if (undefined !== customAttributes) { // custom attributes is optional\n const attributes: any[] = [];\n for (const [, customAttribute] of customAttributes) {\n const attribute: { [value: string]: any } = {};\n Object.keys(customAttribute).map((property: any) => {\n const propertyName = property.toString();\n attribute[propertyName] = customAttribute[property];\n });\n attributes.push(attribute);\n }\n return (attributes.length > 0) ? attributes : undefined;\n }\n return undefined;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itwin/ecschema-metadata",
|
|
3
|
-
"version": "5.1.0-dev.
|
|
3
|
+
"version": "5.1.0-dev.10",
|
|
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.
|
|
48
|
-
"@itwin/core-
|
|
49
|
-
"@itwin/core-
|
|
47
|
+
"@itwin/build-tools": "5.1.0-dev.10",
|
|
48
|
+
"@itwin/core-bentley": "5.1.0-dev.10",
|
|
49
|
+
"@itwin/core-quantity": "5.1.0-dev.10"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@itwin/core-
|
|
53
|
-
"@itwin/core-
|
|
52
|
+
"@itwin/core-bentley": "5.1.0-dev.10",
|
|
53
|
+
"@itwin/core-quantity": "5.1.0-dev.10"
|
|
54
54
|
},
|
|
55
55
|
"nyc": {
|
|
56
56
|
"extends": "./node_modules/@itwin/build-tools/.nycrc"
|