@itwin/rpcinterface-full-stack-tests 5.2.0-dev.17 → 5.2.0-dev.18
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 +91 -68
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -95004,13 +95004,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
95004
95004
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
95005
95005
|
/* harmony export */ ECSqlSchemaLocater: () => (/* binding */ ECSqlSchemaLocater)
|
|
95006
95006
|
/* harmony export */ });
|
|
95007
|
-
/* harmony import */ var
|
|
95008
|
-
/* harmony import */ var
|
|
95009
|
-
/* harmony import */ var
|
|
95010
|
-
/* harmony import */ var
|
|
95011
|
-
/* harmony import */ var
|
|
95012
|
-
/* harmony import */ var
|
|
95013
|
-
/* harmony import */ var
|
|
95007
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
95008
|
+
/* harmony import */ var _ECObjects__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ECObjects */ "../../core/ecschema-metadata/lib/esm/ECObjects.js");
|
|
95009
|
+
/* harmony import */ var _SchemaKey__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SchemaKey */ "../../core/ecschema-metadata/lib/esm/SchemaKey.js");
|
|
95010
|
+
/* harmony import */ var _FullSchemaQueries__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FullSchemaQueries */ "../../core/ecschema-metadata/lib/esm/IncrementalLoading/FullSchemaQueries.js");
|
|
95011
|
+
/* harmony import */ var _IncrementalSchemaLocater__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./IncrementalSchemaLocater */ "../../core/ecschema-metadata/lib/esm/IncrementalLoading/IncrementalSchemaLocater.js");
|
|
95012
|
+
/* harmony import */ var _SchemaItemQueries__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SchemaItemQueries */ "../../core/ecschema-metadata/lib/esm/IncrementalLoading/SchemaItemQueries.js");
|
|
95013
|
+
/* harmony import */ var _SchemaParser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SchemaParser */ "../../core/ecschema-metadata/lib/esm/IncrementalLoading/SchemaParser.js");
|
|
95014
|
+
/* harmony import */ var _SchemaStubQueries__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SchemaStubQueries */ "../../core/ecschema-metadata/lib/esm/IncrementalLoading/SchemaStubQueries.js");
|
|
95014
95015
|
/*---------------------------------------------------------------------------------------------
|
|
95015
95016
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
95016
95017
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -95022,12 +95023,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
95022
95023
|
|
|
95023
95024
|
|
|
95024
95025
|
|
|
95026
|
+
|
|
95027
|
+
const LOGGER_CATEGORY = "IncrementalSchemaLoading.Performance";
|
|
95025
95028
|
/**
|
|
95026
95029
|
* An abstract [[IncrementalSchemaLocater]] implementation for loading
|
|
95027
95030
|
* EC [Schema] instances from an iModelDb using ECSql queries.
|
|
95028
95031
|
* @internal
|
|
95029
95032
|
*/
|
|
95030
|
-
class ECSqlSchemaLocater extends
|
|
95033
|
+
class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MODULE_4__.IncrementalSchemaLocater {
|
|
95031
95034
|
/**
|
|
95032
95035
|
* Gets the [[ECSqlSchemaLocaterOptions]] used by this locater.
|
|
95033
95036
|
*/
|
|
@@ -95054,17 +95057,19 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95054
95057
|
// to fetch the whole schema json.
|
|
95055
95058
|
if (!await this.supportPartialSchemaLoading(context))
|
|
95056
95059
|
return this.getSchemaProps(schemaKey);
|
|
95057
|
-
const
|
|
95060
|
+
const queryStart = Date.now();
|
|
95058
95061
|
const schemaProps = this.options.useMultipleQueries
|
|
95059
95062
|
? await this.getFullSchemaMultipleQueries(schemaKey, context)
|
|
95060
95063
|
: await this.getFullSchema(schemaKey, context);
|
|
95061
|
-
|
|
95064
|
+
const queryDuration = Date.now() - queryStart;
|
|
95065
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logTrace(LOGGER_CATEGORY, `Recieved SchemaProps for ${schemaKey.name} in ${queryDuration}ms`, {
|
|
95066
|
+
schemaName: schemaKey.name,
|
|
95067
|
+
queryMode: this.options.useMultipleQueries ? "parallel" : "single",
|
|
95068
|
+
duration: queryDuration,
|
|
95069
|
+
});
|
|
95062
95070
|
return schemaProps;
|
|
95063
95071
|
}
|
|
95064
95072
|
;
|
|
95065
|
-
/**
|
|
95066
|
-
* Gets the [[SchemaProps]] without schemaItems.
|
|
95067
|
-
*/
|
|
95068
95073
|
/**
|
|
95069
95074
|
* Gets the [[SchemaProps]] without schemaItems for the given schema name.
|
|
95070
95075
|
* @param schemaName The name of the Schema.
|
|
@@ -95073,13 +95078,13 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95073
95078
|
* @internal
|
|
95074
95079
|
*/
|
|
95075
95080
|
async getSchemaNoItems(schemaName, context) {
|
|
95076
|
-
const schemaRows = await this.executeQuery(
|
|
95081
|
+
const schemaRows = await this.executeQuery(_FullSchemaQueries__WEBPACK_IMPORTED_MODULE_3__.FullSchemaQueries.schemaNoItemsQuery, { parameters: { schemaName } });
|
|
95077
95082
|
const schemaRow = schemaRows[0];
|
|
95078
95083
|
if (schemaRow === undefined)
|
|
95079
95084
|
return undefined;
|
|
95080
95085
|
const schema = JSON.parse(schemaRow.schema);
|
|
95081
95086
|
const schemaInfos = await this._schemaInfoCache.getSchemasByContext(context) ?? [];
|
|
95082
|
-
return
|
|
95087
|
+
return _SchemaParser__WEBPACK_IMPORTED_MODULE_6__.SchemaParser.parse(schema, schemaInfos);
|
|
95083
95088
|
}
|
|
95084
95089
|
/**
|
|
95085
95090
|
* Checks if the [[SchemaContext]] has the right Meta Schema version to support the incremental schema loading.
|
|
@@ -95087,8 +95092,8 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95087
95092
|
* @returns true if the context has a supported meta schema version, false otherwise.
|
|
95088
95093
|
*/
|
|
95089
95094
|
async supportPartialSchemaLoading(context) {
|
|
95090
|
-
const metaSchemaKey = new
|
|
95091
|
-
const metaSchemaInfo = await context.getSchemaInfo(metaSchemaKey,
|
|
95095
|
+
const metaSchemaKey = new _SchemaKey__WEBPACK_IMPORTED_MODULE_2__.SchemaKey("ECDbMeta", 4, 0, 3);
|
|
95096
|
+
const metaSchemaInfo = await context.getSchemaInfo(metaSchemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaMatchType.LatestWriteCompatible);
|
|
95092
95097
|
return metaSchemaInfo !== undefined;
|
|
95093
95098
|
}
|
|
95094
95099
|
;
|
|
@@ -95100,7 +95105,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95100
95105
|
* @internal
|
|
95101
95106
|
*/
|
|
95102
95107
|
async getEntities(schema, context, queryOverride) {
|
|
95103
|
-
const query = queryOverride ??
|
|
95108
|
+
const query = queryOverride ?? _FullSchemaQueries__WEBPACK_IMPORTED_MODULE_3__.FullSchemaQueries.entityQuery;
|
|
95104
95109
|
return this.querySchemaItem(context, schema, query, "EntityClass");
|
|
95105
95110
|
}
|
|
95106
95111
|
/**
|
|
@@ -95111,7 +95116,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95111
95116
|
* @internal
|
|
95112
95117
|
*/
|
|
95113
95118
|
async getMixins(schema, context, queryOverride) {
|
|
95114
|
-
const query = queryOverride ??
|
|
95119
|
+
const query = queryOverride ?? _FullSchemaQueries__WEBPACK_IMPORTED_MODULE_3__.FullSchemaQueries.mixinQuery;
|
|
95115
95120
|
return this.querySchemaItem(context, schema, query, "Mixin");
|
|
95116
95121
|
}
|
|
95117
95122
|
/**
|
|
@@ -95122,7 +95127,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95122
95127
|
* @internal
|
|
95123
95128
|
*/
|
|
95124
95129
|
async getRelationships(schema, context, queryOverride) {
|
|
95125
|
-
const query = queryOverride ??
|
|
95130
|
+
const query = queryOverride ?? _FullSchemaQueries__WEBPACK_IMPORTED_MODULE_3__.FullSchemaQueries.relationshipClassQuery;
|
|
95126
95131
|
return this.querySchemaItem(context, schema, query, "RelationshipClass");
|
|
95127
95132
|
}
|
|
95128
95133
|
/**
|
|
@@ -95133,7 +95138,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95133
95138
|
* @internal
|
|
95134
95139
|
*/
|
|
95135
95140
|
async getCustomAttributeClasses(schema, context, queryOverride) {
|
|
95136
|
-
const query = queryOverride ??
|
|
95141
|
+
const query = queryOverride ?? _FullSchemaQueries__WEBPACK_IMPORTED_MODULE_3__.FullSchemaQueries.customAttributeQuery;
|
|
95137
95142
|
return this.querySchemaItem(context, schema, query, "CustomAttributeClass");
|
|
95138
95143
|
}
|
|
95139
95144
|
/**
|
|
@@ -95144,7 +95149,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95144
95149
|
* @internal
|
|
95145
95150
|
*/
|
|
95146
95151
|
async getStructs(schema, context, queryOverride) {
|
|
95147
|
-
const query = queryOverride ??
|
|
95152
|
+
const query = queryOverride ?? _FullSchemaQueries__WEBPACK_IMPORTED_MODULE_3__.FullSchemaQueries.structQuery;
|
|
95148
95153
|
return this.querySchemaItem(context, schema, query, "StructClass");
|
|
95149
95154
|
}
|
|
95150
95155
|
/**
|
|
@@ -95155,7 +95160,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95155
95160
|
* @internal
|
|
95156
95161
|
*/
|
|
95157
95162
|
async getKindOfQuantities(schema, context) {
|
|
95158
|
-
return this.querySchemaItem(context, schema,
|
|
95163
|
+
return this.querySchemaItem(context, schema, _SchemaItemQueries__WEBPACK_IMPORTED_MODULE_5__.SchemaItemQueries.kindOfQuantity(true), "KindOfQuantity");
|
|
95159
95164
|
}
|
|
95160
95165
|
/**
|
|
95161
95166
|
* Gets all the Schema's PropertyCategory items as [[PropertyCategoryProps]] JSON objects.
|
|
@@ -95165,7 +95170,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95165
95170
|
* @internal
|
|
95166
95171
|
*/
|
|
95167
95172
|
async getPropertyCategories(schema, context) {
|
|
95168
|
-
return this.querySchemaItem(context, schema,
|
|
95173
|
+
return this.querySchemaItem(context, schema, _SchemaItemQueries__WEBPACK_IMPORTED_MODULE_5__.SchemaItemQueries.propertyCategory(true), "PropertyCategory");
|
|
95169
95174
|
}
|
|
95170
95175
|
/**
|
|
95171
95176
|
* Gets all the Schema's Enumeration items as [[EnumerationProps]] JSON objects.
|
|
@@ -95175,7 +95180,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95175
95180
|
* @internal
|
|
95176
95181
|
*/
|
|
95177
95182
|
async getEnumerations(schema, context) {
|
|
95178
|
-
return this.querySchemaItem(context, schema,
|
|
95183
|
+
return this.querySchemaItem(context, schema, _SchemaItemQueries__WEBPACK_IMPORTED_MODULE_5__.SchemaItemQueries.enumeration(true), "Enumeration");
|
|
95179
95184
|
}
|
|
95180
95185
|
/**
|
|
95181
95186
|
* Gets all the Schema's Unit items as [[SchemaItemUnitProps]] JSON objects.
|
|
@@ -95185,7 +95190,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95185
95190
|
* @internal
|
|
95186
95191
|
*/
|
|
95187
95192
|
async getUnits(schema, context) {
|
|
95188
|
-
return this.querySchemaItem(context, schema,
|
|
95193
|
+
return this.querySchemaItem(context, schema, _SchemaItemQueries__WEBPACK_IMPORTED_MODULE_5__.SchemaItemQueries.unit(true), "Unit");
|
|
95189
95194
|
}
|
|
95190
95195
|
/**
|
|
95191
95196
|
* Gets all the Schema's InvertedUnit items as [[InvertedUnitProps]] JSON objects.
|
|
@@ -95195,7 +95200,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95195
95200
|
* @internal
|
|
95196
95201
|
*/
|
|
95197
95202
|
async getInvertedUnits(schema, context) {
|
|
95198
|
-
return this.querySchemaItem(context, schema,
|
|
95203
|
+
return this.querySchemaItem(context, schema, _SchemaItemQueries__WEBPACK_IMPORTED_MODULE_5__.SchemaItemQueries.invertedUnit(true), "InvertedUnit");
|
|
95199
95204
|
}
|
|
95200
95205
|
/**
|
|
95201
95206
|
* Gets all the Schema's Constant items as [[ConstantProps]] JSON objects.
|
|
@@ -95205,7 +95210,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95205
95210
|
* @internal
|
|
95206
95211
|
*/
|
|
95207
95212
|
async getConstants(schema, context) {
|
|
95208
|
-
return this.querySchemaItem(context, schema,
|
|
95213
|
+
return this.querySchemaItem(context, schema, _SchemaItemQueries__WEBPACK_IMPORTED_MODULE_5__.SchemaItemQueries.constant(true), "Constant");
|
|
95209
95214
|
}
|
|
95210
95215
|
/**
|
|
95211
95216
|
* Gets all the Schema's UnitSystem items as [[UnitSystemProps]] JSON objects.
|
|
@@ -95215,7 +95220,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95215
95220
|
* @internal
|
|
95216
95221
|
*/
|
|
95217
95222
|
async getUnitSystems(schema, context) {
|
|
95218
|
-
return this.querySchemaItem(context, schema,
|
|
95223
|
+
return this.querySchemaItem(context, schema, _SchemaItemQueries__WEBPACK_IMPORTED_MODULE_5__.SchemaItemQueries.unitSystem(true), "UnitSystem");
|
|
95219
95224
|
}
|
|
95220
95225
|
/**
|
|
95221
95226
|
* Gets all the Schema's Phenomenon items as [[PhenomenonProps]] JSON objects.
|
|
@@ -95225,7 +95230,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95225
95230
|
* @internal
|
|
95226
95231
|
*/
|
|
95227
95232
|
async getPhenomenon(schema, context) {
|
|
95228
|
-
return this.querySchemaItem(context, schema,
|
|
95233
|
+
return this.querySchemaItem(context, schema, _SchemaItemQueries__WEBPACK_IMPORTED_MODULE_5__.SchemaItemQueries.phenomenon(true), "Phenomenon");
|
|
95229
95234
|
}
|
|
95230
95235
|
/**
|
|
95231
95236
|
* Gets all the Schema's Format items as [[SchemaItemFormatProps]] JSON objects.
|
|
@@ -95235,17 +95240,17 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95235
95240
|
* @internal
|
|
95236
95241
|
*/
|
|
95237
95242
|
async getFormats(schema, context) {
|
|
95238
|
-
return this.querySchemaItem(context, schema,
|
|
95243
|
+
return this.querySchemaItem(context, schema, _SchemaItemQueries__WEBPACK_IMPORTED_MODULE_5__.SchemaItemQueries.format(true), "Format");
|
|
95239
95244
|
}
|
|
95240
95245
|
/**
|
|
95241
95246
|
* Gets [[SchemaInfo]] objects for all schemas including their direct schema references.
|
|
95242
95247
|
* @internal
|
|
95243
95248
|
*/
|
|
95244
95249
|
async loadSchemaInfos() {
|
|
95245
|
-
const schemaRows = await this.executeQuery(
|
|
95250
|
+
const schemaRows = await this.executeQuery(_SchemaStubQueries__WEBPACK_IMPORTED_MODULE_7__.ecsqlQueries.schemaInfoQuery);
|
|
95246
95251
|
return schemaRows.map((schemaRow) => ({
|
|
95247
95252
|
alias: schemaRow.alias,
|
|
95248
|
-
schemaKey:
|
|
95253
|
+
schemaKey: _SchemaKey__WEBPACK_IMPORTED_MODULE_2__.SchemaKey.parseString(`${schemaRow.name}.${schemaRow.version}`),
|
|
95249
95254
|
references: Array.from(JSON.parse(schemaRow.references), parseSchemaReference),
|
|
95250
95255
|
}));
|
|
95251
95256
|
}
|
|
@@ -95257,12 +95262,16 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95257
95262
|
* @internal
|
|
95258
95263
|
*/
|
|
95259
95264
|
async getSchemaPartials(schemaKey, context) {
|
|
95260
|
-
const
|
|
95261
|
-
const [schemaRow] = await this.executeQuery(
|
|
95265
|
+
const queryStart = Date.now();
|
|
95266
|
+
const [schemaRow] = await this.executeQuery(_SchemaStubQueries__WEBPACK_IMPORTED_MODULE_7__.ecsqlQueries.schemaStubQuery, {
|
|
95262
95267
|
parameters: { schemaName: schemaKey.name },
|
|
95263
95268
|
limit: 1
|
|
95264
95269
|
});
|
|
95265
|
-
|
|
95270
|
+
const queryDuration = Date.now() - queryStart;
|
|
95271
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logTrace(LOGGER_CATEGORY, `Recieved PartialSchema for ${schemaKey.name} in ${queryDuration}ms`, {
|
|
95272
|
+
schemaName: schemaKey.name,
|
|
95273
|
+
duration: queryDuration,
|
|
95274
|
+
});
|
|
95266
95275
|
if (!schemaRow)
|
|
95267
95276
|
return undefined;
|
|
95268
95277
|
const schemaPartials = [];
|
|
@@ -95272,7 +95281,7 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95272
95281
|
if (stub.references) {
|
|
95273
95282
|
for (const referenceProps of stub.references) {
|
|
95274
95283
|
if (!schemaPartials.some((schema) => schema.name === referenceProps.name)) {
|
|
95275
|
-
await addSchema(
|
|
95284
|
+
await addSchema(_SchemaKey__WEBPACK_IMPORTED_MODULE_2__.SchemaKey.parseString(`${referenceProps.name}.${referenceProps.version}`));
|
|
95276
95285
|
}
|
|
95277
95286
|
}
|
|
95278
95287
|
}
|
|
@@ -95281,13 +95290,14 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95281
95290
|
const addItems = async (schemaName, itemInfo) => {
|
|
95282
95291
|
let schemaStub = schemaPartials.find((schema) => schema.name === schemaName);
|
|
95283
95292
|
if (!schemaStub) {
|
|
95284
|
-
schemaStub = await addSchema(
|
|
95293
|
+
schemaStub = await addSchema(_SchemaKey__WEBPACK_IMPORTED_MODULE_2__.SchemaKey.parseString(`${schemaName}.0.0.0`));
|
|
95285
95294
|
}
|
|
95286
|
-
|
|
95287
|
-
|
|
95295
|
+
let items = schemaStub.items;
|
|
95296
|
+
if (!items) {
|
|
95297
|
+
Object.assign(schemaStub, items = { items: {} });
|
|
95288
95298
|
}
|
|
95289
|
-
const existingItem =
|
|
95290
|
-
Object.assign(
|
|
95299
|
+
const existingItem = items[itemInfo.name] || {};
|
|
95300
|
+
Object.assign(items, { [itemInfo.name]: Object.assign(existingItem, itemInfo) });
|
|
95291
95301
|
};
|
|
95292
95302
|
const reviver = (_key, value) => {
|
|
95293
95303
|
if (value === null) {
|
|
@@ -95303,17 +95313,23 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95303
95313
|
async querySchemaItem(context, schemaName, query, schemaType) {
|
|
95304
95314
|
const start = Date.now();
|
|
95305
95315
|
const itemRows = await this.executeQuery(query, { parameters: { schemaName } });
|
|
95306
|
-
|
|
95316
|
+
const queryDuration = Date.now() - start;
|
|
95317
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logTrace(LOGGER_CATEGORY, `Recieved rows of ${schemaType} items for ${schemaName} in ${queryDuration}ms`, {
|
|
95318
|
+
schemaName,
|
|
95319
|
+
itemCount: itemRows.length,
|
|
95320
|
+
itemType: schemaType,
|
|
95321
|
+
duration: queryDuration,
|
|
95322
|
+
});
|
|
95307
95323
|
if (itemRows.length === 0)
|
|
95308
95324
|
return [];
|
|
95309
95325
|
const items = itemRows.map((itemRow) => {
|
|
95310
95326
|
return "string" === typeof itemRow.item ? JSON.parse(itemRow.item) : itemRow.item;
|
|
95311
95327
|
});
|
|
95312
95328
|
const schemaInfos = await this._schemaInfoCache.getSchemasByContext(context) ?? [];
|
|
95313
|
-
return await
|
|
95329
|
+
return await _SchemaParser__WEBPACK_IMPORTED_MODULE_6__.SchemaParser.parseSchemaItems(items, schemaName, schemaInfos) ?? [];
|
|
95314
95330
|
}
|
|
95315
95331
|
async getFullSchema(schemaKey, context) {
|
|
95316
|
-
const schemaRows = await this.executeQuery(
|
|
95332
|
+
const schemaRows = await this.executeQuery(_FullSchemaQueries__WEBPACK_IMPORTED_MODULE_3__.FullSchemaQueries.schemaQuery, { parameters: { schemaName: schemaKey.name } });
|
|
95317
95333
|
const schemaRow = schemaRows[0];
|
|
95318
95334
|
if (schemaRow === undefined)
|
|
95319
95335
|
return undefined;
|
|
@@ -95323,13 +95339,13 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95323
95339
|
schema.items = schema.items.map((itemRow) => { return itemRow.item; });
|
|
95324
95340
|
}
|
|
95325
95341
|
const schemaInfos = await this._schemaInfoCache.getSchemasByContext(context) ?? [];
|
|
95326
|
-
return
|
|
95342
|
+
return _SchemaParser__WEBPACK_IMPORTED_MODULE_6__.SchemaParser.parse(schema, schemaInfos);
|
|
95327
95343
|
}
|
|
95328
95344
|
async getFullSchemaMultipleQueries(schemaKey, context) {
|
|
95329
95345
|
const schema = await this.getSchemaNoItems(schemaKey.name, context);
|
|
95330
95346
|
if (!schema)
|
|
95331
95347
|
return undefined;
|
|
95332
|
-
schema.items = {};
|
|
95348
|
+
const items = schema.items || (schema.items = {});
|
|
95333
95349
|
await Promise.all([
|
|
95334
95350
|
this.getEntities(schemaKey.name, context),
|
|
95335
95351
|
this.getMixins(schemaKey.name, context),
|
|
@@ -95346,16 +95362,21 @@ class ECSqlSchemaLocater extends _IncrementalSchemaLocater__WEBPACK_IMPORTED_MOD
|
|
|
95346
95362
|
this.getPhenomenon(schemaKey.name, context),
|
|
95347
95363
|
this.getFormats(schemaKey.name, context)
|
|
95348
95364
|
]).then((itemResults) => {
|
|
95349
|
-
const flatItemList = itemResults.reduce((acc,
|
|
95365
|
+
const flatItemList = itemResults.reduce((acc, result) => acc.concat(result));
|
|
95350
95366
|
flatItemList.forEach((schemaItem) => {
|
|
95351
|
-
|
|
95367
|
+
if (!schemaItem.name) {
|
|
95368
|
+
// This should never be happen, as we query the schema items by name from the database, but since the SchemaProps
|
|
95369
|
+
// have name optional, we need the check here to make the compiler happy.
|
|
95370
|
+
throw new Error(`SchemaItem with no name encountered in schema ${schemaKey.name}`);
|
|
95371
|
+
}
|
|
95372
|
+
items[schemaItem.name] = schemaItem;
|
|
95352
95373
|
});
|
|
95353
95374
|
});
|
|
95354
95375
|
return schema;
|
|
95355
95376
|
}
|
|
95356
95377
|
}
|
|
95357
95378
|
function parseSchemaReference(referenceName) {
|
|
95358
|
-
return { schemaKey:
|
|
95379
|
+
return { schemaKey: _SchemaKey__WEBPACK_IMPORTED_MODULE_2__.SchemaKey.parseString(referenceName) };
|
|
95359
95380
|
}
|
|
95360
95381
|
async function parseSchemaItemStubs(schemaName, itemRows, addItemsHandler, schemaInfos) {
|
|
95361
95382
|
if (!itemRows || itemRows.length === 0) {
|
|
@@ -95368,32 +95389,32 @@ async function parseSchemaItemStubs(schemaName, itemRows, addItemsHandler, schem
|
|
|
95368
95389
|
const currentItem = baseClasses[index--];
|
|
95369
95390
|
const baseClassItem = baseClasses[index];
|
|
95370
95391
|
const baseClassName = baseClassItem ? `${baseClassItem.schema}.${baseClassItem.name}` : undefined;
|
|
95371
|
-
const schemaItem = await
|
|
95392
|
+
const schemaItem = await _SchemaParser__WEBPACK_IMPORTED_MODULE_6__.SchemaParser.parseItem(currentItem, currentItem.schema, schemaInfos);
|
|
95372
95393
|
await addItemsHandler(currentItem.schema, {
|
|
95373
95394
|
...schemaItem,
|
|
95374
95395
|
name: schemaItem.name,
|
|
95375
|
-
schemaItemType:
|
|
95396
|
+
schemaItemType: schemaItem.schemaItemType,
|
|
95376
95397
|
baseClass: baseClassName,
|
|
95377
95398
|
});
|
|
95378
95399
|
}
|
|
95379
95400
|
};
|
|
95380
95401
|
for (const itemRow of itemRows) {
|
|
95381
|
-
const schemaItem = await
|
|
95402
|
+
const schemaItem = await _SchemaParser__WEBPACK_IMPORTED_MODULE_6__.SchemaParser.parseItem(itemRow, schemaName, schemaInfos);
|
|
95382
95403
|
await addItemsHandler(schemaName, {
|
|
95383
95404
|
...schemaItem,
|
|
95384
95405
|
name: schemaItem.name,
|
|
95385
|
-
schemaItemType:
|
|
95406
|
+
schemaItemType: schemaItem.schemaItemType,
|
|
95386
95407
|
mixins: itemRow.mixins
|
|
95387
95408
|
? itemRow.mixins.map(mixin => { return `${mixin.schema}.${mixin.name}`; })
|
|
95388
95409
|
: undefined,
|
|
95389
95410
|
});
|
|
95390
95411
|
await parseBaseClasses(itemRow.baseClasses);
|
|
95391
95412
|
for (const mixinRow of itemRow.mixins || []) {
|
|
95392
|
-
const mixinItem = await
|
|
95413
|
+
const mixinItem = await _SchemaParser__WEBPACK_IMPORTED_MODULE_6__.SchemaParser.parseItem(mixinRow, mixinRow.schema, schemaInfos);
|
|
95393
95414
|
await addItemsHandler(mixinRow.schema, {
|
|
95394
95415
|
...mixinItem,
|
|
95395
95416
|
name: mixinItem.name,
|
|
95396
|
-
schemaItemType:
|
|
95417
|
+
schemaItemType: mixinItem.schemaItemType,
|
|
95397
95418
|
});
|
|
95398
95419
|
await parseBaseClasses(mixinRow.baseClasses);
|
|
95399
95420
|
}
|
|
@@ -96132,6 +96153,8 @@ class IncrementalSchemaLocater {
|
|
|
96132
96153
|
// to fetch the whole schema json.
|
|
96133
96154
|
if (!await this.supportPartialSchemaLoading(schemaContext)) {
|
|
96134
96155
|
const schemaJson = await this.getSchemaJson(schemaInfo.schemaKey, schemaContext);
|
|
96156
|
+
if (schemaJson === undefined)
|
|
96157
|
+
throw new _Exception__WEBPACK_IMPORTED_MODULE_3__.ECSchemaError(_Exception__WEBPACK_IMPORTED_MODULE_3__.ECSchemaStatus.UnableToLocateSchema, `Could not locate the schema, ${schemaInfo.schemaKey.name}.${schemaInfo.schemaKey.version.toString()}`);
|
|
96135
96158
|
return _Metadata_Schema__WEBPACK_IMPORTED_MODULE_4__.Schema.fromJson(schemaJson, schemaContext);
|
|
96136
96159
|
}
|
|
96137
96160
|
// Fetches the schema partials for the given schema key. The first item in the array is the
|
|
@@ -96162,18 +96185,17 @@ class IncrementalSchemaLocater {
|
|
|
96162
96185
|
const schemaInfo = await schemaContext.getSchemaInfo(schemaKey, _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaMatchType.Latest);
|
|
96163
96186
|
if (!schemaInfo)
|
|
96164
96187
|
throw new Error(`Schema ${schemaKey.name} could not be found.`);
|
|
96188
|
+
const schemaReferences = [];
|
|
96165
96189
|
const schemaProps = {
|
|
96166
96190
|
$schema: _Constants__WEBPACK_IMPORTED_MODULE_0__.ECSchemaNamespaceUris.SCHEMAURL3_2_JSON,
|
|
96167
96191
|
name: schemaKey.name,
|
|
96168
96192
|
alias: schemaInfo.alias,
|
|
96169
96193
|
version: schemaInfo.schemaKey.version.toString(),
|
|
96170
|
-
references:
|
|
96194
|
+
references: schemaReferences,
|
|
96171
96195
|
items: {}
|
|
96172
96196
|
};
|
|
96173
|
-
if (!schemaProps.references)
|
|
96174
|
-
throw new Error(`Schema references is undefined for the Schema ${schemaInfo.schemaKey.name}`);
|
|
96175
96197
|
schemaInfo.references.forEach((ref) => {
|
|
96176
|
-
|
|
96198
|
+
schemaReferences.push({ name: ref.schemaKey.name, version: ref.schemaKey.version.toString() });
|
|
96177
96199
|
});
|
|
96178
96200
|
return schemaProps;
|
|
96179
96201
|
}
|
|
@@ -96335,6 +96357,7 @@ class IncrementalSchemaReader extends _Deserialization_Helper__WEBPACK_IMPORTED_
|
|
|
96335
96357
|
if (schemaItem.loadingController === undefined) {
|
|
96336
96358
|
const controller = new _utils_SchemaLoadingController__WEBPACK_IMPORTED_MODULE_4__.SchemaLoadingController();
|
|
96337
96359
|
schemaItem.setLoadingController(controller);
|
|
96360
|
+
return this.schemaItemLoading(schemaItem);
|
|
96338
96361
|
}
|
|
96339
96362
|
if (_Metadata_Class__WEBPACK_IMPORTED_MODULE_3__.ECClass.isECClass(schemaItem)
|
|
96340
96363
|
|| schemaItem.schemaItemType === _ECObjects__WEBPACK_IMPORTED_MODULE_2__.SchemaItemType.KindOfQuantity
|
|
@@ -96890,23 +96913,23 @@ class SchemaParser {
|
|
|
96890
96913
|
switch (type) {
|
|
96891
96914
|
case _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.KindOfQuantity:
|
|
96892
96915
|
const koqParser = new _SchemaItemParsers__WEBPACK_IMPORTED_MODULE_3__.KindOfQuantityParser(schemaName, schemaInfos);
|
|
96893
|
-
return koqParser.parse(schemaItem);
|
|
96916
|
+
return await koqParser.parse(schemaItem);
|
|
96894
96917
|
case _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.EntityClass:
|
|
96895
96918
|
case _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.StructClass:
|
|
96896
96919
|
const classParser = new _ClassParsers__WEBPACK_IMPORTED_MODULE_2__.ClassParser(schemaName, schemaInfos);
|
|
96897
|
-
return classParser.parse(schemaItem);
|
|
96920
|
+
return await classParser.parse(schemaItem);
|
|
96898
96921
|
case _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.RelationshipClass:
|
|
96899
96922
|
const relationshipParser = new _ClassParsers__WEBPACK_IMPORTED_MODULE_2__.RelationshipClassParser(schemaName, schemaInfos);
|
|
96900
|
-
return relationshipParser.parse(schemaItem);
|
|
96923
|
+
return await relationshipParser.parse(schemaItem);
|
|
96901
96924
|
case _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.Mixin:
|
|
96902
96925
|
const mixinParser = new _ClassParsers__WEBPACK_IMPORTED_MODULE_2__.MixinParser(schemaName, schemaInfos);
|
|
96903
|
-
return mixinParser.parse(schemaItem);
|
|
96926
|
+
return await mixinParser.parse(schemaItem);
|
|
96904
96927
|
case _ECObjects__WEBPACK_IMPORTED_MODULE_1__.SchemaItemType.CustomAttributeClass:
|
|
96905
96928
|
const caParser = new _ClassParsers__WEBPACK_IMPORTED_MODULE_2__.CustomAttributeClassParser(schemaName, schemaInfos);
|
|
96906
|
-
return caParser.parse(schemaItem);
|
|
96929
|
+
return await caParser.parse(schemaItem);
|
|
96907
96930
|
default:
|
|
96908
96931
|
const itemParser = new _SchemaItemParsers__WEBPACK_IMPORTED_MODULE_3__.SchemaItemParser(schemaName, schemaInfos);
|
|
96909
|
-
return itemParser.parse(schemaItem);
|
|
96932
|
+
return await itemParser.parse(schemaItem);
|
|
96910
96933
|
}
|
|
96911
96934
|
}
|
|
96912
96935
|
}
|
|
@@ -335942,7 +335965,7 @@ class TestContext {
|
|
|
335942
335965
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
335943
335966
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
335944
335967
|
await core_frontend_1.NoRenderApp.startup({
|
|
335945
|
-
applicationVersion: "5.2.0-dev.
|
|
335968
|
+
applicationVersion: "5.2.0-dev.18",
|
|
335946
335969
|
applicationId: this.settings.gprid,
|
|
335947
335970
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
335948
335971
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -361031,7 +361054,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
361031
361054
|
/***/ ((module) => {
|
|
361032
361055
|
|
|
361033
361056
|
"use strict";
|
|
361034
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.2.0-dev.
|
|
361057
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.2.0-dev.18","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"}}');
|
|
361035
361058
|
|
|
361036
361059
|
/***/ }),
|
|
361037
361060
|
|