@itwin/rpcinterface-full-stack-tests 5.2.0-dev.15 → 5.2.0-dev.16
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/lib/dist/bundled-tests.js +60 -74
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +14 -14
|
@@ -95078,7 +95078,8 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95078
95078
|
if (schemaRow === undefined)
|
|
95079
95079
|
return undefined;
|
|
95080
95080
|
const schema = JSON.parse(schemaRow.schema);
|
|
95081
|
-
|
|
95081
|
+
const schemaInfos = await this._schemaInfoCache.getSchemasByContext(context) ?? [];
|
|
95082
|
+
return _SchemaParser__WEBPACK_IMPORTED_MODULE_5__.SchemaParser.parse(schema, schemaInfos);
|
|
95082
95083
|
}
|
|
95083
95084
|
/**
|
|
95084
95085
|
* Checks if the [[SchemaContext]] has the right Meta Schema version to support the incremental schema loading.
|
|
@@ -95256,10 +95257,12 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95256
95257
|
* @internal
|
|
95257
95258
|
*/
|
|
95258
95259
|
async getSchemaPartials(schemaKey, context) {
|
|
95260
|
+
const start = Date.now();
|
|
95259
95261
|
const [schemaRow] = await this.executeQuery(_SchemaStubQueries__WEBPACK_IMPORTED_MODULE_6__.ecsqlQueries.schemaStubQuery, {
|
|
95260
95262
|
parameters: { schemaName: schemaKey.name },
|
|
95261
95263
|
limit: 1
|
|
95262
95264
|
});
|
|
95265
|
+
this.options.performanceLogger?.logSchemaItem(start, schemaKey.name, 'SchemaPartials', 1);
|
|
95263
95266
|
if (!schemaRow)
|
|
95264
95267
|
return undefined;
|
|
95265
95268
|
const schemaPartials = [];
|
|
@@ -95293,7 +95296,8 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95293
95296
|
return value;
|
|
95294
95297
|
};
|
|
95295
95298
|
await addSchema(schemaKey);
|
|
95296
|
-
|
|
95299
|
+
const schemaInfos = await this._schemaInfoCache.getSchemasByContext(context) ?? [];
|
|
95300
|
+
await parseSchemaItemStubs(schemaKey.name, JSON.parse(schemaRow.items, reviver), addItems, schemaInfos);
|
|
95297
95301
|
return schemaPartials;
|
|
95298
95302
|
}
|
|
95299
95303
|
async querySchemaItem(context, schemaName, query, schemaType) {
|
|
@@ -95305,7 +95309,8 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95305
95309
|
const items = itemRows.map((itemRow) => {
|
|
95306
95310
|
return "string" === typeof itemRow.item ? JSON.parse(itemRow.item) : itemRow.item;
|
|
95307
95311
|
});
|
|
95308
|
-
|
|
95312
|
+
const schemaInfos = await this._schemaInfoCache.getSchemasByContext(context) ?? [];
|
|
95313
|
+
return await _SchemaParser__WEBPACK_IMPORTED_MODULE_5__.SchemaParser.parseSchemaItems(items, schemaName, schemaInfos) ?? [];
|
|
95309
95314
|
}
|
|
95310
95315
|
async getFullSchema(schemaKey, context) {
|
|
95311
95316
|
const schemaRows = await this.executeQuery(_FullSchemaQueries__WEBPACK_IMPORTED_MODULE_2__.FullSchemaQueries.schemaQuery, { parameters: { schemaName: schemaKey.name } });
|
|
@@ -95317,7 +95322,8 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95317
95322
|
if (schema.items) {
|
|
95318
95323
|
schema.items = schema.items.map((itemRow) => { return itemRow.item; });
|
|
95319
95324
|
}
|
|
95320
|
-
|
|
95325
|
+
const schemaInfos = await this._schemaInfoCache.getSchemasByContext(context) ?? [];
|
|
95326
|
+
return _SchemaParser__WEBPACK_IMPORTED_MODULE_5__.SchemaParser.parse(schema, schemaInfos);
|
|
95321
95327
|
}
|
|
95322
95328
|
async getFullSchemaMultipleQueries(schemaKey, context) {
|
|
95323
95329
|
const schema = await this.getSchemaNoItems(schemaKey.name, context);
|
|
@@ -95351,7 +95357,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95351
95357
|
function parseSchemaReference(referenceName) {
|
|
95352
95358
|
return { schemaKey: _SchemaKey__WEBPACK_IMPORTED_MODULE_1__.SchemaKey.parseString(referenceName) };
|
|
95353
95359
|
}
|
|
95354
|
-
async function parseSchemaItemStubs(schemaName,
|
|
95360
|
+
async function parseSchemaItemStubs(schemaName, itemRows, addItemsHandler, schemaInfos) {
|
|
95355
95361
|
if (!itemRows || itemRows.length === 0) {
|
|
95356
95362
|
return;
|
|
95357
95363
|
}
|
|
@@ -95362,7 +95368,7 @@ async function parseSchemaItemStubs(schemaName, context, itemRows, addItemsHandl
|
|
|
95362
95368
|
const currentItem = baseClasses[index--];
|
|
95363
95369
|
const baseClassItem = baseClasses[index];
|
|
95364
95370
|
const baseClassName = baseClassItem ? `${baseClassItem.schema}.${baseClassItem.name}` : undefined;
|
|
95365
|
-
const schemaItem = await _SchemaParser__WEBPACK_IMPORTED_MODULE_5__.SchemaParser.parseItem(currentItem, currentItem.schema,
|
|
95371
|
+
const schemaItem = await _SchemaParser__WEBPACK_IMPORTED_MODULE_5__.SchemaParser.parseItem(currentItem, currentItem.schema, schemaInfos);
|
|
95366
95372
|
await addItemsHandler(currentItem.schema, {
|
|
95367
95373
|
...schemaItem,
|
|
95368
95374
|
name: schemaItem.name,
|
|
@@ -95372,7 +95378,7 @@ async function parseSchemaItemStubs(schemaName, context, itemRows, addItemsHandl
|
|
|
95372
95378
|
}
|
|
95373
95379
|
};
|
|
95374
95380
|
for (const itemRow of itemRows) {
|
|
95375
|
-
const schemaItem = await _SchemaParser__WEBPACK_IMPORTED_MODULE_5__.SchemaParser.parseItem(itemRow, schemaName,
|
|
95381
|
+
const schemaItem = await _SchemaParser__WEBPACK_IMPORTED_MODULE_5__.SchemaParser.parseItem(itemRow, schemaName, schemaInfos);
|
|
95376
95382
|
await addItemsHandler(schemaName, {
|
|
95377
95383
|
...schemaItem,
|
|
95378
95384
|
name: schemaItem.name,
|
|
@@ -95383,7 +95389,7 @@ async function parseSchemaItemStubs(schemaName, context, itemRows, addItemsHandl
|
|
|
95383
95389
|
});
|
|
95384
95390
|
await parseBaseClasses(itemRow.baseClasses);
|
|
95385
95391
|
for (const mixinRow of itemRow.mixins || []) {
|
|
95386
|
-
const mixinItem = await _SchemaParser__WEBPACK_IMPORTED_MODULE_5__.SchemaParser.parseItem(mixinRow, mixinRow.schema,
|
|
95392
|
+
const mixinItem = await _SchemaParser__WEBPACK_IMPORTED_MODULE_5__.SchemaParser.parseItem(mixinRow, mixinRow.schema, schemaInfos);
|
|
95387
95393
|
await addItemsHandler(mixinRow.schema, {
|
|
95388
95394
|
...mixinItem,
|
|
95389
95395
|
name: mixinItem.name,
|
|
@@ -96271,9 +96277,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
96271
96277
|
/* harmony import */ var _Deserialization_JsonParser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Deserialization/JsonParser */ "../../core/ecschema-metadata/lib/esm/Deserialization/JsonParser.js");
|
|
96272
96278
|
/* harmony import */ var _ECObjects__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ECObjects */ "../../core/ecschema-metadata/lib/esm/ECObjects.js");
|
|
96273
96279
|
/* harmony import */ var _Metadata_Class__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Metadata/Class */ "../../core/ecschema-metadata/lib/esm/Metadata/Class.js");
|
|
96274
|
-
/* harmony import */ var
|
|
96275
|
-
/* harmony import */ var _utils_SchemaLoadingController__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/SchemaLoadingController */ "../../core/ecschema-metadata/lib/esm/utils/SchemaLoadingController.js");
|
|
96276
|
-
|
|
96280
|
+
/* harmony import */ var _utils_SchemaLoadingController__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/SchemaLoadingController */ "../../core/ecschema-metadata/lib/esm/utils/SchemaLoadingController.js");
|
|
96277
96281
|
|
|
96278
96282
|
|
|
96279
96283
|
|
|
@@ -96320,12 +96324,7 @@ class IncrementalSchemaReader extends _Deserialization_Helper__WEBPACK_IMPORTED_
|
|
|
96320
96324
|
// The fromJSON method of the actual class instances may complain about missing properties in the props, so
|
|
96321
96325
|
// calling the fromJSON on the ECClass ensures only the bare minimum is loaded.
|
|
96322
96326
|
if (this._incremental && schemaItemObject && schemaItem) {
|
|
96323
|
-
|
|
96324
|
-
_Metadata_SchemaItem__WEBPACK_IMPORTED_MODULE_4__.SchemaItem.prototype.fromJSONSync.call(schemaItem, schemaItemObject);
|
|
96325
|
-
}
|
|
96326
|
-
else {
|
|
96327
|
-
schemaItem.fromJSONSync(schemaItemObject);
|
|
96328
|
-
}
|
|
96327
|
+
await schemaItem.fromJSON(schemaItemObject);
|
|
96329
96328
|
}
|
|
96330
96329
|
this.schemaItemLoading(schemaItem);
|
|
96331
96330
|
return schemaItem;
|
|
@@ -96334,7 +96333,7 @@ class IncrementalSchemaReader extends _Deserialization_Helper__WEBPACK_IMPORTED_
|
|
|
96334
96333
|
if (schemaItem === undefined)
|
|
96335
96334
|
return;
|
|
96336
96335
|
if (schemaItem.loadingController === undefined) {
|
|
96337
|
-
const controller = new
|
|
96336
|
+
const controller = new _utils_SchemaLoadingController__WEBPACK_IMPORTED_MODULE_4__.SchemaLoadingController();
|
|
96338
96337
|
schemaItem.setLoadingController(controller);
|
|
96339
96338
|
}
|
|
96340
96339
|
if (_Metadata_Class__WEBPACK_IMPORTED_MODULE_3__.ECClass.isECClass(schemaItem)
|
|
@@ -96381,15 +96380,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
96381
96380
|
*/
|
|
96382
96381
|
class SchemaItemParser {
|
|
96383
96382
|
_schema;
|
|
96384
|
-
|
|
96383
|
+
_schemaInfos;
|
|
96385
96384
|
/**
|
|
96386
96385
|
* Initializes a new SchemaItemParser.
|
|
96387
96386
|
* @param schemaName The name the Schema containing the SchemaItems.
|
|
96388
96387
|
* @param context The SchemaContext containing the Schema.
|
|
96389
96388
|
*/
|
|
96390
|
-
constructor(schemaName,
|
|
96389
|
+
constructor(schemaName, schemaInfos) {
|
|
96391
96390
|
this._schema = schemaName;
|
|
96392
|
-
this.
|
|
96391
|
+
this._schemaInfos = schemaInfos;
|
|
96393
96392
|
}
|
|
96394
96393
|
/**
|
|
96395
96394
|
* Parses the given SchemaItemProps JSON returned from an ECSql query.
|
|
@@ -96412,7 +96411,7 @@ class SchemaItemParser {
|
|
|
96412
96411
|
* @param rawTypeName The name or aliased name of the SchemaItem.
|
|
96413
96412
|
* @returns The full name of the SchemaItem, ie. 'BisCore.PhysicalElement'
|
|
96414
96413
|
*/
|
|
96415
|
-
|
|
96414
|
+
getQualifiedTypeName(rawTypeName) {
|
|
96416
96415
|
const nameParts = rawTypeName.split(":");
|
|
96417
96416
|
if (nameParts.length !== 2) {
|
|
96418
96417
|
const [schemaName, itemName] = _Metadata_SchemaItem__WEBPACK_IMPORTED_MODULE_2__.SchemaItem.parseFullName(rawTypeName);
|
|
@@ -96420,15 +96419,15 @@ class SchemaItemParser {
|
|
|
96420
96419
|
return `${this._schema}.${itemName}`;
|
|
96421
96420
|
return rawTypeName;
|
|
96422
96421
|
}
|
|
96423
|
-
const resolvedName =
|
|
96422
|
+
const resolvedName = this.resolveNameFromAlias(nameParts[0].toLocaleLowerCase());
|
|
96424
96423
|
if (!resolvedName)
|
|
96425
96424
|
throw new Error(`No valid schema found for alias '${nameParts[0]}'`);
|
|
96426
96425
|
return `${resolvedName}.${nameParts[1]}`;
|
|
96427
96426
|
}
|
|
96428
|
-
|
|
96429
|
-
for (const
|
|
96430
|
-
if (
|
|
96431
|
-
return
|
|
96427
|
+
resolveNameFromAlias(alias) {
|
|
96428
|
+
for (const schemaInfo of this._schemaInfos) {
|
|
96429
|
+
if (schemaInfo.alias === alias)
|
|
96430
|
+
return schemaInfo.schemaKey.name;
|
|
96432
96431
|
}
|
|
96433
96432
|
return undefined;
|
|
96434
96433
|
}
|
|
@@ -96448,31 +96447,31 @@ class KindOfQuantityParser extends SchemaItemParser {
|
|
|
96448
96447
|
async parse(data) {
|
|
96449
96448
|
const mutableProps = await super.parse(data);
|
|
96450
96449
|
if (mutableProps.persistenceUnit) {
|
|
96451
|
-
mutableProps.persistenceUnit =
|
|
96450
|
+
mutableProps.persistenceUnit = this.getQualifiedTypeName(mutableProps.persistenceUnit);
|
|
96452
96451
|
}
|
|
96453
|
-
mutableProps.presentationUnits =
|
|
96452
|
+
mutableProps.presentationUnits = this.parsePresentationUnits(mutableProps);
|
|
96454
96453
|
return mutableProps;
|
|
96455
96454
|
}
|
|
96456
|
-
|
|
96455
|
+
parsePresentationUnits(props) {
|
|
96457
96456
|
const presentationUnits = [];
|
|
96458
96457
|
if (!props.presentationUnits)
|
|
96459
96458
|
return [];
|
|
96460
96459
|
for (const presentationUnit of props.presentationUnits) {
|
|
96461
96460
|
const presFormatOverride = _Metadata_OverrideFormat__WEBPACK_IMPORTED_MODULE_1__.OverrideFormat.parseFormatString(presentationUnit);
|
|
96462
|
-
const formatString =
|
|
96461
|
+
const formatString = this.createOverrideFormatString(presFormatOverride);
|
|
96463
96462
|
presentationUnits.push(formatString);
|
|
96464
96463
|
}
|
|
96465
96464
|
;
|
|
96466
96465
|
return presentationUnits;
|
|
96467
96466
|
}
|
|
96468
|
-
|
|
96469
|
-
let formatFullName =
|
|
96467
|
+
createOverrideFormatString(overrideFormatProps) {
|
|
96468
|
+
let formatFullName = this.getQualifiedTypeName(overrideFormatProps.name);
|
|
96470
96469
|
if (overrideFormatProps.precision)
|
|
96471
96470
|
formatFullName += `(${overrideFormatProps.precision.toString()})`;
|
|
96472
96471
|
if (undefined === overrideFormatProps.unitAndLabels)
|
|
96473
96472
|
return formatFullName;
|
|
96474
96473
|
for (const [unit, unitLabel] of overrideFormatProps.unitAndLabels) {
|
|
96475
|
-
const unitFullName =
|
|
96474
|
+
const unitFullName = this.getQualifiedTypeName(unit);
|
|
96476
96475
|
if (undefined === unitLabel)
|
|
96477
96476
|
formatFullName += `[${unitFullName}]`;
|
|
96478
96477
|
else
|
|
@@ -96516,10 +96515,10 @@ SELECT
|
|
|
96516
96515
|
'name', [koq].[Name],
|
|
96517
96516
|
'label', [koq].[DisplayLabel],
|
|
96518
96517
|
'description', [koq].[Description]
|
|
96519
|
-
${singleSchema ? `
|
|
96520
96518
|
,'relativeError', [koq].[RelativeError],
|
|
96521
|
-
'persistenceUnit', [koq].[PersistenceUnit]
|
|
96522
|
-
|
|
96519
|
+
'persistenceUnit', [koq].[PersistenceUnit]
|
|
96520
|
+
${singleSchema ? `
|
|
96521
|
+
, 'presentationUnits', (
|
|
96523
96522
|
SELECT json_group_array(js."value")
|
|
96524
96523
|
FROM [meta].[KindOfQuantityDef] [koq1], json1.json_each([PresentationUnits]) js
|
|
96525
96524
|
WHERE [koq1].[ECInstanceId] = [koq].[ECInstanceId]
|
|
@@ -96846,14 +96845,14 @@ class SchemaParser {
|
|
|
96846
96845
|
* @param context The SchemaContext that will contain the schema and it's references.
|
|
96847
96846
|
* @returns The corrected SchemaProps JSON.
|
|
96848
96847
|
*/
|
|
96849
|
-
static async parse(schema,
|
|
96848
|
+
static async parse(schema, schemaInfos) {
|
|
96850
96849
|
const props = schema;
|
|
96851
96850
|
props.$schema = _Constants__WEBPACK_IMPORTED_MODULE_0__.ECSchemaNamespaceUris.SCHEMAURL3_2_JSON,
|
|
96852
96851
|
props.customAttributes = props.customAttributes ? props.customAttributes.map((attr) => { return parseCustomAttribute(attr); }) : undefined;
|
|
96853
96852
|
props.label = props.label === null ? undefined : props.label;
|
|
96854
96853
|
props.description = props.description === null ? undefined : props.description;
|
|
96855
96854
|
if (props.items) {
|
|
96856
|
-
props.items = await this.parseItems(props.items, props.name,
|
|
96855
|
+
props.items = await this.parseItems(props.items, props.name, schemaInfos);
|
|
96857
96856
|
}
|
|
96858
96857
|
if (!props.customAttributes || props.customAttributes.length === 0)
|
|
96859
96858
|
delete props.customAttributes;
|
|
@@ -96867,46 +96866,46 @@ class SchemaParser {
|
|
|
96867
96866
|
* @param context The SchemaContext containing the Schema.
|
|
96868
96867
|
* @returns The corrected SchemaItemProps.
|
|
96869
96868
|
*/
|
|
96870
|
-
static async parseSchemaItems(schemaItems, schemaName,
|
|
96869
|
+
static async parseSchemaItems(schemaItems, schemaName, schemaInfos) {
|
|
96871
96870
|
const items = [];
|
|
96872
96871
|
for (const item of schemaItems) {
|
|
96873
|
-
const props = await this.parseItem(item, schemaName,
|
|
96872
|
+
const props = await this.parseItem(item, schemaName, schemaInfos);
|
|
96874
96873
|
const cleaned = JSON.parse(JSON.stringify(props, clean));
|
|
96875
96874
|
items.push(cleaned);
|
|
96876
96875
|
}
|
|
96877
96876
|
return items.length > 0 ? items : undefined;
|
|
96878
96877
|
}
|
|
96879
|
-
static async parseItems(schemaItemProps, schemaName,
|
|
96878
|
+
static async parseItems(schemaItemProps, schemaName, schemaInfos) {
|
|
96880
96879
|
const items = {};
|
|
96881
96880
|
for (const itemProps of schemaItemProps) {
|
|
96882
|
-
const props = await this.parseItem(itemProps, schemaName,
|
|
96881
|
+
const props = await this.parseItem(itemProps, schemaName, schemaInfos);
|
|
96883
96882
|
items[props.name] = props;
|
|
96884
96883
|
delete props.name;
|
|
96885
96884
|
}
|
|
96886
96885
|
return Object.keys(items).length > 0 ? items : undefined;
|
|
96887
96886
|
}
|
|
96888
|
-
static async parseItem(props, schemaName,
|
|
96887
|
+
static async parseItem(props, schemaName, schemaInfos) {
|
|
96889
96888
|
const schemaItem = "string" === typeof (props) ? JSON.parse(props) : props;
|
|
96890
96889
|
const type = (0,_ECObjects__WEBPACK_IMPORTED_MODULE_1__.parseSchemaItemType)(schemaItem.schemaItemType);
|
|
96891
96890
|
switch (type) {
|
|
96892
96891
|
case _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.KindOfQuantity:
|
|
96893
|
-
const koqParser = new _SchemaItemParsers__WEBPACK_IMPORTED_MODULE_3__.KindOfQuantityParser(schemaName,
|
|
96892
|
+
const koqParser = new _SchemaItemParsers__WEBPACK_IMPORTED_MODULE_3__.KindOfQuantityParser(schemaName, schemaInfos);
|
|
96894
96893
|
return koqParser.parse(schemaItem);
|
|
96895
96894
|
case _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.EntityClass:
|
|
96896
96895
|
case _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.StructClass:
|
|
96897
|
-
const classParser = new _ClassParsers__WEBPACK_IMPORTED_MODULE_2__.ClassParser(schemaName,
|
|
96896
|
+
const classParser = new _ClassParsers__WEBPACK_IMPORTED_MODULE_2__.ClassParser(schemaName, schemaInfos);
|
|
96898
96897
|
return classParser.parse(schemaItem);
|
|
96899
96898
|
case _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.RelationshipClass:
|
|
96900
|
-
const relationshipParser = new _ClassParsers__WEBPACK_IMPORTED_MODULE_2__.RelationshipClassParser(schemaName,
|
|
96899
|
+
const relationshipParser = new _ClassParsers__WEBPACK_IMPORTED_MODULE_2__.RelationshipClassParser(schemaName, schemaInfos);
|
|
96901
96900
|
return relationshipParser.parse(schemaItem);
|
|
96902
96901
|
case _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.Mixin:
|
|
96903
|
-
const mixinParser = new _ClassParsers__WEBPACK_IMPORTED_MODULE_2__.MixinParser(schemaName,
|
|
96902
|
+
const mixinParser = new _ClassParsers__WEBPACK_IMPORTED_MODULE_2__.MixinParser(schemaName, schemaInfos);
|
|
96904
96903
|
return mixinParser.parse(schemaItem);
|
|
96905
96904
|
case _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.CustomAttributeClass:
|
|
96906
|
-
const caParser = new _ClassParsers__WEBPACK_IMPORTED_MODULE_2__.CustomAttributeClassParser(schemaName,
|
|
96905
|
+
const caParser = new _ClassParsers__WEBPACK_IMPORTED_MODULE_2__.CustomAttributeClassParser(schemaName, schemaInfos);
|
|
96907
96906
|
return caParser.parse(schemaItem);
|
|
96908
96907
|
default:
|
|
96909
|
-
const itemParser = new _SchemaItemParsers__WEBPACK_IMPORTED_MODULE_3__.SchemaItemParser(schemaName,
|
|
96908
|
+
const itemParser = new _SchemaItemParsers__WEBPACK_IMPORTED_MODULE_3__.SchemaItemParser(schemaName, schemaInfos);
|
|
96910
96909
|
return itemParser.parse(schemaItem);
|
|
96911
96910
|
}
|
|
96912
96911
|
}
|
|
@@ -99616,32 +99615,19 @@ class KindOfQuantity extends _SchemaItem__WEBPACK_IMPORTED_MODULE_7__.SchemaItem
|
|
|
99616
99615
|
fromJSONSync(kindOfQuantityProps) {
|
|
99617
99616
|
super.fromJSONSync(kindOfQuantityProps);
|
|
99618
99617
|
this._relativeError = kindOfQuantityProps.relativeError;
|
|
99619
|
-
const
|
|
99620
|
-
|
|
99621
|
-
|
|
99622
|
-
|
|
99623
|
-
|
|
99624
|
-
|
|
99625
|
-
|
|
99626
|
-
|
|
99627
|
-
this._persistenceUnit = new _DelayedPromise__WEBPACK_IMPORTED_MODULE_0__.DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);
|
|
99618
|
+
const unitItemKey = this.schema.getSchemaItemKey(kindOfQuantityProps.persistenceUnit);
|
|
99619
|
+
this._persistenceUnit = new _DelayedPromise__WEBPACK_IMPORTED_MODULE_0__.DelayedPromiseWithProps(unitItemKey, async () => {
|
|
99620
|
+
const unitItem = await this.schema.lookupItem(unitItemKey, _Unit__WEBPACK_IMPORTED_MODULE_8__.Unit)
|
|
99621
|
+
|| await this.schema.lookupItem(unitItemKey, _InvertedUnit__WEBPACK_IMPORTED_MODULE_5__.InvertedUnit);
|
|
99622
|
+
if (undefined === unitItem)
|
|
99623
|
+
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECSchemaStatus.InvalidECJson, `Unable to locate the unit ${kindOfQuantityProps.persistenceUnit}.`);
|
|
99624
|
+
return unitItem;
|
|
99625
|
+
});
|
|
99628
99626
|
if (undefined !== kindOfQuantityProps.presentationUnits)
|
|
99629
99627
|
this.processPresentationUnitsSync(kindOfQuantityProps.presentationUnits);
|
|
99630
99628
|
}
|
|
99631
99629
|
async fromJSON(kindOfQuantityProps) {
|
|
99632
|
-
|
|
99633
|
-
this._relativeError = kindOfQuantityProps.relativeError;
|
|
99634
|
-
const persistenceUnit = await this.schema.lookupItem(kindOfQuantityProps.persistenceUnit);
|
|
99635
|
-
if (undefined === persistenceUnit)
|
|
99636
|
-
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECSchemaStatus.InvalidECJson, `The Unit ${kindOfQuantityProps.persistenceUnit} does not exist.`);
|
|
99637
|
-
if (!_Unit__WEBPACK_IMPORTED_MODULE_8__.Unit.isUnit(persistenceUnit) && !_InvertedUnit__WEBPACK_IMPORTED_MODULE_5__.InvertedUnit.isInvertedUnit(persistenceUnit))
|
|
99638
|
-
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECSchemaStatus.InvalidECJson, `The item ${kindOfQuantityProps.persistenceUnit} is not a Unit or InvertedUnit.`);
|
|
99639
|
-
if (_Unit__WEBPACK_IMPORTED_MODULE_8__.Unit.isUnit(persistenceUnit))
|
|
99640
|
-
this._persistenceUnit = new _DelayedPromise__WEBPACK_IMPORTED_MODULE_0__.DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);
|
|
99641
|
-
else
|
|
99642
|
-
this._persistenceUnit = new _DelayedPromise__WEBPACK_IMPORTED_MODULE_0__.DelayedPromiseWithProps(persistenceUnit.key, async () => persistenceUnit);
|
|
99643
|
-
if (undefined !== kindOfQuantityProps.presentationUnits)
|
|
99644
|
-
await this.processPresentationUnits(kindOfQuantityProps.presentationUnits);
|
|
99630
|
+
this.fromJSONSync(kindOfQuantityProps);
|
|
99645
99631
|
}
|
|
99646
99632
|
/**
|
|
99647
99633
|
* Used for schema editing.
|
|
@@ -335956,7 +335942,7 @@ class TestContext {
|
|
|
335956
335942
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
335957
335943
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
335958
335944
|
await core_frontend_1.NoRenderApp.startup({
|
|
335959
|
-
applicationVersion: "5.2.0-dev.
|
|
335945
|
+
applicationVersion: "5.2.0-dev.16",
|
|
335960
335946
|
applicationId: this.settings.gprid,
|
|
335961
335947
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
335962
335948
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -361045,7 +361031,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
361045
361031
|
/***/ ((module) => {
|
|
361046
361032
|
|
|
361047
361033
|
"use strict";
|
|
361048
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.2.0-dev.
|
|
361034
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.2.0-dev.16","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2022 --outDir lib/esm","clean":"rimraf -g lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/eslint-plugin":"5.2.2-dev.2","@types/chai-as-promised":"^7","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.2.4","@itwin/object-storage-core":"^2.3.0","@itwin/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
361049
361035
|
|
|
361050
361036
|
/***/ }),
|
|
361051
361037
|
|