@itwin/ecschema-rpcinterface-tests 3.7.0-dev.2 → 3.7.0-dev.3

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.
Files changed (27) hide show
  1. package/lib/backend/BackendInit.d.ts +1 -1
  2. package/lib/backend/BackendInit.js +27 -27
  3. package/lib/backend/BackendInit.js.map +1 -1
  4. package/lib/common/Settings.d.ts +39 -39
  5. package/lib/common/Settings.js +106 -106
  6. package/lib/common/Settings.js.map +1 -1
  7. package/lib/common/SideChannels.d.ts +3 -3
  8. package/lib/common/SideChannels.js +19 -19
  9. package/lib/common/SideChannels.js.map +1 -1
  10. package/lib/dist/_d48c.bundled-tests.js.map +1 -1
  11. package/lib/dist/bundled-tests.js +322 -306
  12. package/lib/dist/bundled-tests.js.map +1 -1
  13. package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
  14. package/lib/dist/object-storage.bundled-tests.js.map +1 -1
  15. package/lib/dist/vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_4_0_node_modules_itwin_obj-3576c6.bundled-tests.js.map +1 -1
  16. package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_3_1_node_modules_loaders_gl_draco_di-d3af41.bundled-tests.js.map +1 -1
  17. package/lib/dist/vendors-common_temp_node_modules_pnpm_reflect-metadata_0_1_13_node_modules_reflect-metadata_R-610cb3.bundled-tests.js.map +1 -1
  18. package/lib/frontend/SchemaRpcInterface.test.d.ts +1 -1
  19. package/lib/frontend/SchemaRpcInterface.test.js +31 -31
  20. package/lib/frontend/SchemaRpcInterface.test.js.map +1 -1
  21. package/lib/frontend/setup/IModelSession.d.ts +13 -13
  22. package/lib/frontend/setup/IModelSession.js +78 -78
  23. package/lib/frontend/setup/IModelSession.js.map +1 -1
  24. package/lib/frontend/setup/TestContext.d.ts +15 -15
  25. package/lib/frontend/setup/TestContext.js +68 -68
  26. package/lib/frontend/setup/TestContext.js.map +1 -1
  27. package/package.json +17 -17
@@ -101155,6 +101155,7 @@ class DrawingViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_14__.ViewStat
101155
101155
  CAST(json_extract(jsonProperties, '$.displaySpatialView') as BOOLEAN) as displaySpatialView
101156
101156
  FROM bis.SectionDrawing
101157
101157
  WHERE ECInstanceId=${this.baseModelId}`;
101158
+ // eslint-disable-next-line deprecation/deprecation
101158
101159
  for await (const row of this.iModel.query(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
101159
101160
  spatialView = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromJSON((_a = row.spatialView) === null || _a === void 0 ? void 0 : _a.id);
101160
101161
  displaySpatialView = !!row.displaySpatialView;
@@ -105029,7 +105030,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
105029
105030
  /** Allow to execute query and read results along with meta data. The result are streamed.
105030
105031
  * @param params The values to bind to the parameters (if the ECSQL has any).
105031
105032
  * @param config Allow to specify certain flags which control how query is executed.
105032
- * @returns Returns *ECSqlQueryReader* which help iterate over result set and also give access to meta data.
105033
+ * @returns Returns an [ECSqlReader]($common) which helps iterate over the result set and also give access to metadata.
105033
105034
  * @beta
105034
105035
  * */
105035
105036
  createQueryReader(ecsql, params, config) {
@@ -105063,6 +105064,7 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
105063
105064
  * @returns Returns the query result as an *AsyncIterableIterator<any>* which lazy load result as needed. The row format is determined by *rowFormat* parameter.
105064
105065
  * See [ECSQL row format]($docs/learning/ECSQLRowFormat) for details about the format of the returned rows.
105065
105066
  * @throws [IModelError]($common) If there was any error while submitting, preparing or stepping into query
105067
+ * @deprecated in 3.7. Use [[createQueryReader]] instead; it accepts the same parameters.
105066
105068
  */
105067
105069
  async *query(ecsql, params, options) {
105068
105070
  const builder = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryOptionsBuilder(options);
@@ -105081,8 +105083,10 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
105081
105083
  * See "[iTwin.js Types used in ECSQL Parameter Bindings]($docs/learning/ECSQLParameterTypes)" for details.
105082
105084
  * @returns Return row count.
105083
105085
  * @throws [IModelError]($common) If the statement is invalid
105086
+ * @deprecated in 3.7. Count the number of results using `count(*)` where the original query is a subquery instead. E.g., `SELECT count(*) FROM (<query-whose-rows-to-count>)`.
105084
105087
  */
105085
105088
  async queryRowCount(ecsql, params) {
105089
+ // eslint-disable-next-line deprecation/deprecation
105086
105090
  for await (const row of this.query(`select count(*) from (${ecsql})`, params)) {
105087
105091
  return row[0];
105088
105092
  }
@@ -105104,8 +105108,10 @@ class IModelConnection extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.I
105104
105108
  * @returns Returns the query result as an *AsyncIterableIterator<any>* which lazy load result as needed. The row format is determined by *rowFormat* parameter.
105105
105109
  * See [ECSQL row format]($docs/learning/ECSQLRowFormat) for details about the format of the returned rows.
105106
105110
  * @throws [IModelError]($common) If there was any error while submitting, preparing or stepping into query
105111
+ * @deprecated in 3.7. Use [[createQueryReader]] instead. Pass in the restart token as part of the `config` argument; e.g., `{ restartToken: myToken }` or `new QueryOptionsBuilder().setRestartToken(myToken).getOptions()`.
105107
105112
  */
105108
105113
  async *restartQuery(token, ecsql, params, options) {
105114
+ // eslint-disable-next-line deprecation/deprecation
105109
105115
  for await (const row of this.query(ecsql, params, new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryOptionsBuilder(options).setRestartToken(token).getOptions())) {
105110
105116
  yield row;
105111
105117
  }
@@ -105648,6 +105654,7 @@ class SnapshotConnection extends IModelConnection {
105648
105654
  break;
105649
105655
  }
105650
105656
  const placements = new Array();
105657
+ // eslint-disable-next-line deprecation/deprecation
105651
105658
  for await (const row of this._iModel.query(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
105652
105659
  const origin = [row.x, row.y, row.z];
105653
105660
  const bbox = {
@@ -110092,6 +110099,7 @@ class SheetViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_14__.ViewState2
110092
110099
  async queryAttachmentIds() {
110093
110100
  const ecsql = `SELECT ECInstanceId as attachmentId FROM bis.ViewAttachment WHERE model.Id=${this.baseModelId}`;
110094
110101
  const ids = [];
110102
+ // eslint-disable-next-line deprecation/deprecation
110095
110103
  for await (const row of this.iModel.query(ecsql))
110096
110104
  ids.push(row[0]);
110097
110105
  return ids;
@@ -112360,6 +112368,7 @@ class ViewCreator2d {
112360
112368
  */
112361
112369
  this._executeQuery = async (query) => {
112362
112370
  const rows = [];
112371
+ // eslint-disable-next-line deprecation/deprecation
112363
112372
  for await (const row of this._imodel.query(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames }))
112364
112373
  rows.push(row.id);
112365
112374
  return rows;
@@ -112448,6 +112457,7 @@ class ViewCreator2d {
112448
112457
  async _addSheetViewProps(modelId, props) {
112449
112458
  let width = 0;
112450
112459
  let height = 0;
112460
+ // eslint-disable-next-line deprecation/deprecation
112451
112461
  for await (const row of this._imodel.query(`SELECT Width, Height FROM bis.Sheet WHERE ECInstanceId = ?`, _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryBinder.from([modelId]), { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
112452
112462
  width = row.width;
112453
112463
  height = row.height;
@@ -112575,6 +112585,7 @@ class ViewCreator3d {
112575
112585
  */
112576
112586
  this._executeQuery = async (query) => {
112577
112587
  const rows = [];
112588
+ // eslint-disable-next-line deprecation/deprecation
112578
112589
  for await (const row of this._imodel.query(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames }))
112579
112590
  rows.push(row.id);
112580
112591
  return rows;
@@ -180411,7 +180422,11 @@ class ViewClipDecoration extends _EditManipulator__WEBPACK_IMPORTED_MODULE_8__.E
180411
180422
  this._clipEventHandler.onModifyClip(this._clipView);
180412
180423
  }
180413
180424
  testDecorationHit(id) { return (id === this._clipId || this._controlIds.includes(id)); }
180414
- async getDecorationToolTip(hit) { return (hit.sourceId === this._clipId ? "View Clip" : "Modify View Clip"); }
180425
+ async getDecorationToolTip(hit) {
180426
+ if (hit.sourceId === this._clipId)
180427
+ return _Tool__WEBPACK_IMPORTED_MODULE_10__.CoreTools.translate("ViewClip.Message.Clip");
180428
+ return _Tool__WEBPACK_IMPORTED_MODULE_10__.CoreTools.translate("ViewClip.Message.ModifyClip");
180429
+ }
180415
180430
  updateDecorationListener(_add) { super.updateDecorationListener(undefined !== this._clipId); } // Decorator isn't just for resize controls...
180416
180431
  decorate(context) {
180417
180432
  if (this._suspendDecorator)
@@ -181293,6 +181308,7 @@ class ElementSetTool extends _PrimitiveTool__WEBPACK_IMPORTED_MODULE_9__.Primiti
181293
181308
  ids.add(id);
181294
181309
  try {
181295
181310
  const ecsql = `SELECT ECInstanceId as id, Parent.Id as parentId FROM BisCore.GeometricElement WHERE Parent.Id IN (SELECT Parent.Id as parentId FROM BisCore.GeometricElement WHERE parent.Id != 0 AND ECInstanceId IN (${id}))`;
181311
+ // eslint-disable-next-line deprecation/deprecation
181296
181312
  for await (const row of this.iModel.query(ecsql, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames })) {
181297
181313
  ids.add(row.parentId);
181298
181314
  ids.add(row.id);
@@ -292277,7 +292293,7 @@ class Formatter {
292277
292293
  formattedValue = formattedValue + spec.format.decimalSeparator + fractionString;
292278
292294
  else {
292279
292295
  if (spec.format.hasFormatTraitSet(_FormatEnums__WEBPACK_IMPORTED_MODULE_2__.FormatTraits.KeepDecimalPoint))
292280
- formattedValue = formattedValue + spec.format.decimalSeparator;
292296
+ formattedValue = formattedValue + spec.format.decimalSeparator + (isKeepSingleZero ? "0" : "");
292281
292297
  }
292282
292298
  }
292283
292299
  if (isSci) {
@@ -294108,112 +294124,112 @@ __webpack_require__.r(__webpack_exports__);
294108
294124
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
294109
294125
 
294110
294126
  "use strict";
294111
-
294112
- Object.defineProperty(exports, "__esModule", ({ value: true }));
294113
- exports.Settings = exports.getRpcInterfaces = void 0;
294114
- /*---------------------------------------------------------------------------------------------
294115
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
294116
- * See LICENSE.md in the project root for license terms and full copyright notice.
294117
- *--------------------------------------------------------------------------------------------*/
294118
- const core_bentley_1 = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
294119
- const core_common_1 = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
294120
- const ecschema_rpcinterface_common_1 = __webpack_require__(/*! @itwin/ecschema-rpcinterface-common */ "../../core/ecschema-rpc/common/lib/cjs/ecschema-rpc-interface.js");
294121
- function getRpcInterfaces() {
294122
- const rpcInterfaces = [];
294123
- rpcInterfaces.push(core_common_1.IModelReadRpcInterface);
294124
- rpcInterfaces.push(ecschema_rpcinterface_common_1.ECSchemaRpcInterface);
294125
- return rpcInterfaces;
294126
- }
294127
- exports.getRpcInterfaces = getRpcInterfaces;
294128
- class Settings {
294129
- constructor(env) {
294130
- this._backend = {};
294131
- this.users = [];
294132
- this.iModel = {};
294133
- const isFrontend = (typeof (process) === "undefined");
294134
- if (!isFrontend && undefined === env.TF_BUILD) {
294135
- const path = __webpack_require__(/*! path */ "../../common/temp/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js"); // eslint-disable-line @typescript-eslint/no-var-requires
294136
- const dotenv = __webpack_require__(/*! dotenv */ "../../common/temp/node_modules/.pnpm/dotenv@10.0.0/node_modules/dotenv/lib/main.js"); // eslint-disable-line @typescript-eslint/no-var-requires
294137
- const dotenvExpand = __webpack_require__(/*! dotenv-expand */ "../../common/temp/node_modules/.pnpm/dotenv-expand@5.1.0/node_modules/dotenv-expand/lib/main.js"); // eslint-disable-line @typescript-eslint/no-var-requires
294138
- // First check in process.cwd() for the config
294139
- let result = dotenv.config();
294140
- if (result.error) {
294141
- const potential = path.resolve(process.cwd(), "..", "..", "..", "imodeljs-config", ".env");
294142
- result = dotenv.config({ path: potential });
294143
- if (result.error)
294144
- throw result.error;
294145
- }
294146
- dotenvExpand(result);
294147
- }
294148
- if (isFrontend)
294149
- globalThis.process = { browser: true, env };
294150
- // Loads the config out of the environment.
294151
- this.load();
294152
- }
294153
- // eslint-disable-next-line @typescript-eslint/naming-convention
294154
- get Backend() { return this._backend; }
294155
- get user() { return this.users[0]; }
294156
- /** Loads the necessary variables from `process.env`.
294157
- */
294158
- load() {
294159
- // Parse OIDC
294160
- if (undefined === process.env.OIDC_CLIENT_ID)
294161
- throw new Error("Missing the 'OIDC_CLIENT_ID' setting.");
294162
- this.oidcClientId = process.env.OIDC_CLIENT_ID;
294163
- if (undefined === process.env.OIDC_SCOPES)
294164
- throw new Error("Missing the 'OIDC_SCOPES' setting");
294165
- this.oidcScopes = process.env.OIDC_SCOPES;
294166
- if (process.env.OIDC_AUTHORITY)
294167
- this.oidcAuthority = process.env.OIDC_AUTHORITY;
294168
- this.oidcRedirect = (undefined === process.env.OIDC_REDIRECT) ? "http://localhost:5000" : process.env.OIDC_REDIRECT;
294169
- // Parse GPRId
294170
- if (undefined !== process.env.GPRID)
294171
- this.gprid = process.env.GPRID;
294172
- // Parse the iModel variables
294173
- if (!process.env.IMODEL_PROJECTID && !process.env.IMODEL_PROJECTNAME)
294174
- throw new Error("Missing the 'IMODEL_PROJECTID' or 'IMODEL_PROJECTNAME' setting.");
294175
- if (!process.env.IMODEL_IMODELID && !process.env.IMODEL_IMODELNAME)
294176
- throw new Error("Missing the 'IMODEL_IMODELID' or 'IMODEL_IMODELNAME' setting.");
294177
- this.iModel = {
294178
- useName: !process.env.IMODEL_IMODELID,
294179
- id: process.env.IMODEL_IMODELID,
294180
- name: process.env.IMODEL_IMODELNAME,
294181
- useITwinName: !process.env.IMODEL_PROJECTID,
294182
- iTwinId: process.env.IMODEL_PROJECTID,
294183
- iTwinName: process.env.IMODEL_PROJECTNAME,
294184
- changesetId: process.env.IMODEL_CHANGESETID,
294185
- };
294186
- // Parse logging level
294187
- if (undefined !== process.env.LOG_LEVEL) {
294188
- const level = parseInt(process.env.LOG_LEVEL, 10);
294189
- if (!isNaN(level) && undefined !== core_bentley_1.LogLevel[level])
294190
- this.logLevel = level;
294191
- }
294192
- // Get backend data
294193
- if (undefined === process.env.BACKEND_LOCATION)
294194
- throw new Error("Missing the 'BACKEND_LOCATION' setting.");
294195
- this._backend.location = process.env.BACKEND_LOCATION;
294196
- if (undefined === process.env.BACKEND_VERSION)
294197
- throw new Error("Missing the 'BACKEND_VERSION' setting.");
294198
- this._backend.version = process.env.BACKEND_VERSION;
294199
- if (undefined === process.env.BACKEND_NAME)
294200
- throw new Error("Missing the 'BACKEND_NAME' setting.");
294201
- this._backend.name = process.env.BACKEND_NAME;
294202
- // Get users
294203
- this.users.push({
294204
- email: process.env.USER_WITH_ACCESS_USERNAME || "",
294205
- password: process.env.USER_WITH_ACCESS_PASSWORD || "",
294206
- });
294207
- }
294208
- toString() {
294209
- return `Configurations:
294210
- oidc client id: ${this.oidcClientId},
294211
- oidc scopes: ${this.oidcScopes},
294212
- applicationId: ${this.gprid},
294213
- log level: ${this.logLevel}`;
294214
- }
294215
- }
294216
- exports.Settings = Settings;
294127
+
294128
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
294129
+ exports.Settings = exports.getRpcInterfaces = void 0;
294130
+ /*---------------------------------------------------------------------------------------------
294131
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
294132
+ * See LICENSE.md in the project root for license terms and full copyright notice.
294133
+ *--------------------------------------------------------------------------------------------*/
294134
+ const core_bentley_1 = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
294135
+ const core_common_1 = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
294136
+ const ecschema_rpcinterface_common_1 = __webpack_require__(/*! @itwin/ecschema-rpcinterface-common */ "../../core/ecschema-rpc/common/lib/cjs/ecschema-rpc-interface.js");
294137
+ function getRpcInterfaces() {
294138
+ const rpcInterfaces = [];
294139
+ rpcInterfaces.push(core_common_1.IModelReadRpcInterface);
294140
+ rpcInterfaces.push(ecschema_rpcinterface_common_1.ECSchemaRpcInterface);
294141
+ return rpcInterfaces;
294142
+ }
294143
+ exports.getRpcInterfaces = getRpcInterfaces;
294144
+ class Settings {
294145
+ constructor(env) {
294146
+ this._backend = {};
294147
+ this.users = [];
294148
+ this.iModel = {};
294149
+ const isFrontend = (typeof (process) === "undefined");
294150
+ if (!isFrontend && undefined === env.TF_BUILD) {
294151
+ const path = __webpack_require__(/*! path */ "../../common/temp/node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js"); // eslint-disable-line @typescript-eslint/no-var-requires
294152
+ const dotenv = __webpack_require__(/*! dotenv */ "../../common/temp/node_modules/.pnpm/dotenv@10.0.0/node_modules/dotenv/lib/main.js"); // eslint-disable-line @typescript-eslint/no-var-requires
294153
+ const dotenvExpand = __webpack_require__(/*! dotenv-expand */ "../../common/temp/node_modules/.pnpm/dotenv-expand@5.1.0/node_modules/dotenv-expand/lib/main.js"); // eslint-disable-line @typescript-eslint/no-var-requires
294154
+ // First check in process.cwd() for the config
294155
+ let result = dotenv.config();
294156
+ if (result.error) {
294157
+ const potential = path.resolve(process.cwd(), "..", "..", "..", "imodeljs-config", ".env");
294158
+ result = dotenv.config({ path: potential });
294159
+ if (result.error)
294160
+ throw result.error;
294161
+ }
294162
+ dotenvExpand(result);
294163
+ }
294164
+ if (isFrontend)
294165
+ globalThis.process = { browser: true, env };
294166
+ // Loads the config out of the environment.
294167
+ this.load();
294168
+ }
294169
+ // eslint-disable-next-line @typescript-eslint/naming-convention
294170
+ get Backend() { return this._backend; }
294171
+ get user() { return this.users[0]; }
294172
+ /** Loads the necessary variables from `process.env`.
294173
+ */
294174
+ load() {
294175
+ // Parse OIDC
294176
+ if (undefined === process.env.OIDC_CLIENT_ID)
294177
+ throw new Error("Missing the 'OIDC_CLIENT_ID' setting.");
294178
+ this.oidcClientId = process.env.OIDC_CLIENT_ID;
294179
+ if (undefined === process.env.OIDC_SCOPES)
294180
+ throw new Error("Missing the 'OIDC_SCOPES' setting");
294181
+ this.oidcScopes = process.env.OIDC_SCOPES;
294182
+ if (process.env.OIDC_AUTHORITY)
294183
+ this.oidcAuthority = process.env.OIDC_AUTHORITY;
294184
+ this.oidcRedirect = (undefined === process.env.OIDC_REDIRECT) ? "http://localhost:5000" : process.env.OIDC_REDIRECT;
294185
+ // Parse GPRId
294186
+ if (undefined !== process.env.GPRID)
294187
+ this.gprid = process.env.GPRID;
294188
+ // Parse the iModel variables
294189
+ if (!process.env.IMODEL_PROJECTID && !process.env.IMODEL_PROJECTNAME)
294190
+ throw new Error("Missing the 'IMODEL_PROJECTID' or 'IMODEL_PROJECTNAME' setting.");
294191
+ if (!process.env.IMODEL_IMODELID && !process.env.IMODEL_IMODELNAME)
294192
+ throw new Error("Missing the 'IMODEL_IMODELID' or 'IMODEL_IMODELNAME' setting.");
294193
+ this.iModel = {
294194
+ useName: !process.env.IMODEL_IMODELID,
294195
+ id: process.env.IMODEL_IMODELID,
294196
+ name: process.env.IMODEL_IMODELNAME,
294197
+ useITwinName: !process.env.IMODEL_PROJECTID,
294198
+ iTwinId: process.env.IMODEL_PROJECTID,
294199
+ iTwinName: process.env.IMODEL_PROJECTNAME,
294200
+ changesetId: process.env.IMODEL_CHANGESETID,
294201
+ };
294202
+ // Parse logging level
294203
+ if (undefined !== process.env.LOG_LEVEL) {
294204
+ const level = parseInt(process.env.LOG_LEVEL, 10);
294205
+ if (!isNaN(level) && undefined !== core_bentley_1.LogLevel[level])
294206
+ this.logLevel = level;
294207
+ }
294208
+ // Get backend data
294209
+ if (undefined === process.env.BACKEND_LOCATION)
294210
+ throw new Error("Missing the 'BACKEND_LOCATION' setting.");
294211
+ this._backend.location = process.env.BACKEND_LOCATION;
294212
+ if (undefined === process.env.BACKEND_VERSION)
294213
+ throw new Error("Missing the 'BACKEND_VERSION' setting.");
294214
+ this._backend.version = process.env.BACKEND_VERSION;
294215
+ if (undefined === process.env.BACKEND_NAME)
294216
+ throw new Error("Missing the 'BACKEND_NAME' setting.");
294217
+ this._backend.name = process.env.BACKEND_NAME;
294218
+ // Get users
294219
+ this.users.push({
294220
+ email: process.env.USER_WITH_ACCESS_USERNAME || "",
294221
+ password: process.env.USER_WITH_ACCESS_PASSWORD || "",
294222
+ });
294223
+ }
294224
+ toString() {
294225
+ return `Configurations:
294226
+ oidc client id: ${this.oidcClientId},
294227
+ oidc scopes: ${this.oidcScopes},
294228
+ applicationId: ${this.gprid},
294229
+ log level: ${this.logLevel}`;
294230
+ }
294231
+ }
294232
+ exports.Settings = Settings;
294217
294233
 
294218
294234
 
294219
294235
  /***/ }),
@@ -294225,25 +294241,25 @@ exports.Settings = Settings;
294225
294241
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
294226
294242
 
294227
294243
  "use strict";
294228
-
294229
- Object.defineProperty(exports, "__esModule", ({ value: true }));
294230
- exports.getProcessEnvFromBackend = exports.exposeBackendCallbacks = void 0;
294231
- /*---------------------------------------------------------------------------------------------
294232
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
294233
- * See LICENSE.md in the project root for license terms and full copyright notice.
294234
- *--------------------------------------------------------------------------------------------*/
294235
- const CallbackUtils_1 = __webpack_require__(/*! @itwin/certa/lib/utils/CallbackUtils */ "../../tools/certa/lib/utils/CallbackUtils.js");
294236
- const getEnvCallbackName = "getEnv";
294237
- function exposeBackendCallbacks() {
294238
- (0, CallbackUtils_1.registerBackendCallback)(getEnvCallbackName, () => {
294239
- return JSON.stringify(process.env);
294240
- });
294241
- }
294242
- exports.exposeBackendCallbacks = exposeBackendCallbacks;
294243
- async function getProcessEnvFromBackend() {
294244
- return JSON.parse(await (0, CallbackUtils_1.executeBackendCallback)(getEnvCallbackName));
294245
- }
294246
- exports.getProcessEnvFromBackend = getProcessEnvFromBackend;
294244
+
294245
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
294246
+ exports.getProcessEnvFromBackend = exports.exposeBackendCallbacks = void 0;
294247
+ /*---------------------------------------------------------------------------------------------
294248
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
294249
+ * See LICENSE.md in the project root for license terms and full copyright notice.
294250
+ *--------------------------------------------------------------------------------------------*/
294251
+ const CallbackUtils_1 = __webpack_require__(/*! @itwin/certa/lib/utils/CallbackUtils */ "../../tools/certa/lib/utils/CallbackUtils.js");
294252
+ const getEnvCallbackName = "getEnv";
294253
+ function exposeBackendCallbacks() {
294254
+ (0, CallbackUtils_1.registerBackendCallback)(getEnvCallbackName, () => {
294255
+ return JSON.stringify(process.env);
294256
+ });
294257
+ }
294258
+ exports.exposeBackendCallbacks = exposeBackendCallbacks;
294259
+ async function getProcessEnvFromBackend() {
294260
+ return JSON.parse(await (0, CallbackUtils_1.executeBackendCallback)(getEnvCallbackName));
294261
+ }
294262
+ exports.getProcessEnvFromBackend = getProcessEnvFromBackend;
294247
294263
 
294248
294264
 
294249
294265
  /***/ }),
@@ -294255,84 +294271,84 @@ exports.getProcessEnvFromBackend = getProcessEnvFromBackend;
294255
294271
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
294256
294272
 
294257
294273
  "use strict";
294258
-
294259
- Object.defineProperty(exports, "__esModule", ({ value: true }));
294260
- exports.IModelSession = void 0;
294261
- /*---------------------------------------------------------------------------------------------
294262
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
294263
- * See LICENSE.md in the project root for license terms and full copyright notice.
294264
- *--------------------------------------------------------------------------------------------*/
294265
- const chai_1 = __webpack_require__(/*! chai */ "../../common/temp/node_modules/.pnpm/chai@4.3.7/node_modules/chai/index.js");
294266
- const core_frontend_1 = __webpack_require__(/*! @itwin/core-frontend */ "../../core/frontend/lib/esm/core-frontend.js");
294267
- const imodels_client_management_1 = __webpack_require__(/*! @itwin/imodels-client-management */ "../../common/temp/node_modules/.pnpm/@itwin+imodels-client-management@2.3.0/node_modules/@itwin/imodels-client-management/lib/esm/index.js");
294268
- const projects_client_1 = __webpack_require__(/*! @itwin/projects-client */ "../../common/temp/node_modules/.pnpm/@itwin+projects-client@0.6.0/node_modules/@itwin/projects-client/lib/esm/projects-client.js");
294269
- const imodels_access_frontend_1 = __webpack_require__(/*! @itwin/imodels-access-frontend */ "../../common/temp/node_modules/.pnpm/@itwin+imodels-access-frontend@2.3.0/node_modules/@itwin/imodels-access-frontend/lib/esm/index.js");
294270
- class IModelSession {
294271
- constructor(iModelId, iTwinId, changesetId) {
294272
- this.iTwinId = iTwinId;
294273
- this.iModelId = iModelId;
294274
- this.changesetId = changesetId;
294275
- }
294276
- static async create(accessToken, iModelData) {
294277
- var _a;
294278
- let iTwinId;
294279
- let imodelId;
294280
- // Turn the iTwin name into an id
294281
- if (iModelData.useITwinName && iModelData.iTwinName) {
294282
- const client = new projects_client_1.ProjectsAccessClient();
294283
- const iTwinList = await client.getAll(accessToken, {
294284
- search: {
294285
- searchString: iModelData.iTwinName,
294286
- propertyName: projects_client_1.ProjectsSearchableProperty.Name,
294287
- exactMatch: true,
294288
- },
294289
- });
294290
- if (iTwinList.length === 0)
294291
- throw new Error(`ITwin ${iModelData.iTwinName} was not found for the user.`);
294292
- else if (iTwinList.length > 1)
294293
- throw new Error(`Multiple iTwins named ${iModelData.iTwinName} were found for the user.`);
294294
- iTwinId = iTwinList[0].id;
294295
- }
294296
- else
294297
- iTwinId = iModelData.iTwinId;
294298
- if (iModelData.useName) {
294299
- const imodelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
294300
- const iModels = imodelClient.iModels.getRepresentationList({
294301
- authorization: imodels_access_frontend_1.AccessTokenAdapter.toAuthorizationCallback(accessToken),
294302
- urlParams: {
294303
- projectId: iTwinId,
294304
- name: iModelData.name,
294305
- },
294306
- });
294307
- for await (const iModel of iModels) {
294308
- imodelId = iModel.id;
294309
- break;
294310
- }
294311
- if (!imodelId)
294312
- throw new Error(`The iModel ${iModelData.name} does not exist in iTwin ${iTwinId}.`);
294313
- }
294314
- else
294315
- imodelId = iModelData.id;
294316
- console.log(`Using iModel { name:${iModelData.name}, id:${imodelId}, iTwinId:${iTwinId}, changesetId:${iModelData.changesetId} }`); // eslint-disable-line no-console
294317
- return new IModelSession(imodelId, iTwinId, iModelData.changesetId);
294318
- }
294319
- async getConnection() {
294320
- return undefined === this._iModel ? this.open() : this._iModel;
294321
- }
294322
- async open() {
294323
- try {
294324
- // eslint-disable-next-line no-console
294325
- console.log(`Environment: ${process.env.IMJS_URL_PREFIX}`);
294326
- this._iModel = await core_frontend_1.CheckpointConnection.openRemote(this.iTwinId, this.iModelId);
294327
- (0, chai_1.expect)(this._iModel).to.exist;
294328
- }
294329
- catch (e) {
294330
- throw new Error(`Failed to open test iModel. Error: ${e.message}`);
294331
- }
294332
- return this._iModel;
294333
- }
294334
- }
294335
- exports.IModelSession = IModelSession;
294274
+
294275
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
294276
+ exports.IModelSession = void 0;
294277
+ /*---------------------------------------------------------------------------------------------
294278
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
294279
+ * See LICENSE.md in the project root for license terms and full copyright notice.
294280
+ *--------------------------------------------------------------------------------------------*/
294281
+ const chai_1 = __webpack_require__(/*! chai */ "../../common/temp/node_modules/.pnpm/chai@4.3.7/node_modules/chai/index.js");
294282
+ const core_frontend_1 = __webpack_require__(/*! @itwin/core-frontend */ "../../core/frontend/lib/esm/core-frontend.js");
294283
+ const imodels_client_management_1 = __webpack_require__(/*! @itwin/imodels-client-management */ "../../common/temp/node_modules/.pnpm/@itwin+imodels-client-management@2.3.0/node_modules/@itwin/imodels-client-management/lib/esm/index.js");
294284
+ const projects_client_1 = __webpack_require__(/*! @itwin/projects-client */ "../../common/temp/node_modules/.pnpm/@itwin+projects-client@0.6.0/node_modules/@itwin/projects-client/lib/esm/projects-client.js");
294285
+ const imodels_access_frontend_1 = __webpack_require__(/*! @itwin/imodels-access-frontend */ "../../common/temp/node_modules/.pnpm/@itwin+imodels-access-frontend@2.3.0/node_modules/@itwin/imodels-access-frontend/lib/esm/index.js");
294286
+ class IModelSession {
294287
+ constructor(iModelId, iTwinId, changesetId) {
294288
+ this.iTwinId = iTwinId;
294289
+ this.iModelId = iModelId;
294290
+ this.changesetId = changesetId;
294291
+ }
294292
+ static async create(accessToken, iModelData) {
294293
+ var _a;
294294
+ let iTwinId;
294295
+ let imodelId;
294296
+ // Turn the iTwin name into an id
294297
+ if (iModelData.useITwinName && iModelData.iTwinName) {
294298
+ const client = new projects_client_1.ProjectsAccessClient();
294299
+ const iTwinList = await client.getAll(accessToken, {
294300
+ search: {
294301
+ searchString: iModelData.iTwinName,
294302
+ propertyName: projects_client_1.ProjectsSearchableProperty.Name,
294303
+ exactMatch: true,
294304
+ },
294305
+ });
294306
+ if (iTwinList.length === 0)
294307
+ throw new Error(`ITwin ${iModelData.iTwinName} was not found for the user.`);
294308
+ else if (iTwinList.length > 1)
294309
+ throw new Error(`Multiple iTwins named ${iModelData.iTwinName} were found for the user.`);
294310
+ iTwinId = iTwinList[0].id;
294311
+ }
294312
+ else
294313
+ iTwinId = iModelData.iTwinId;
294314
+ if (iModelData.useName) {
294315
+ const imodelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
294316
+ const iModels = imodelClient.iModels.getRepresentationList({
294317
+ authorization: imodels_access_frontend_1.AccessTokenAdapter.toAuthorizationCallback(accessToken),
294318
+ urlParams: {
294319
+ projectId: iTwinId,
294320
+ name: iModelData.name,
294321
+ },
294322
+ });
294323
+ for await (const iModel of iModels) {
294324
+ imodelId = iModel.id;
294325
+ break;
294326
+ }
294327
+ if (!imodelId)
294328
+ throw new Error(`The iModel ${iModelData.name} does not exist in iTwin ${iTwinId}.`);
294329
+ }
294330
+ else
294331
+ imodelId = iModelData.id;
294332
+ console.log(`Using iModel { name:${iModelData.name}, id:${imodelId}, iTwinId:${iTwinId}, changesetId:${iModelData.changesetId} }`); // eslint-disable-line no-console
294333
+ return new IModelSession(imodelId, iTwinId, iModelData.changesetId);
294334
+ }
294335
+ async getConnection() {
294336
+ return undefined === this._iModel ? this.open() : this._iModel;
294337
+ }
294338
+ async open() {
294339
+ try {
294340
+ // eslint-disable-next-line no-console
294341
+ console.log(`Environment: ${process.env.IMJS_URL_PREFIX}`);
294342
+ this._iModel = await core_frontend_1.CheckpointConnection.openRemote(this.iTwinId, this.iModelId);
294343
+ (0, chai_1.expect)(this._iModel).to.exist;
294344
+ }
294345
+ catch (e) {
294346
+ throw new Error(`Failed to open test iModel. Error: ${e.message}`);
294347
+ }
294348
+ return this._iModel;
294349
+ }
294350
+ }
294351
+ exports.IModelSession = IModelSession;
294336
294352
 
294337
294353
 
294338
294354
  /***/ }),
@@ -294344,74 +294360,74 @@ exports.IModelSession = IModelSession;
294344
294360
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
294345
294361
 
294346
294362
  "use strict";
294347
-
294348
- /*---------------------------------------------------------------------------------------------
294349
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
294350
- * See LICENSE.md in the project root for license terms and full copyright notice.
294351
- *--------------------------------------------------------------------------------------------*/
294352
- Object.defineProperty(exports, "__esModule", ({ value: true }));
294353
- exports.TestContext = void 0;
294354
- const chai_1 = __webpack_require__(/*! chai */ "../../common/temp/node_modules/.pnpm/chai@4.3.7/node_modules/chai/index.js");
294355
- const core_bentley_1 = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
294356
- const core_frontend_1 = __webpack_require__(/*! @itwin/core-frontend */ "../../core/frontend/lib/esm/core-frontend.js");
294357
- const frontend_1 = __webpack_require__(/*! @itwin/oidc-signin-tool/lib/cjs/frontend */ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@3.6.1/node_modules/@itwin/oidc-signin-tool/lib/cjs/frontend.js");
294358
- const Settings_1 = __webpack_require__(/*! ../../common/Settings */ "./lib/common/Settings.js");
294359
- const SideChannels_1 = __webpack_require__(/*! ../../common/SideChannels */ "./lib/common/SideChannels.js");
294360
- const IModelSession_1 = __webpack_require__(/*! ./IModelSession */ "./lib/frontend/setup/IModelSession.js");
294361
- const core_common_1 = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
294362
- const imodels_access_frontend_1 = __webpack_require__(/*! @itwin/imodels-access-frontend */ "../../common/temp/node_modules/.pnpm/@itwin+imodels-access-frontend@2.3.0/node_modules/@itwin/imodels-access-frontend/lib/esm/index.js");
294363
- const imodels_client_management_1 = __webpack_require__(/*! @itwin/imodels-client-management */ "../../common/temp/node_modules/.pnpm/@itwin+imodels-client-management@2.3.0/node_modules/@itwin/imodels-client-management/lib/esm/index.js");
294364
- class TestContext {
294365
- constructor(env) {
294366
- this.settings = new Settings_1.Settings(env);
294367
- }
294368
- static async instance() {
294369
- if (this._instance === undefined) {
294370
- this._instance = new TestContext(await (0, SideChannels_1.getProcessEnvFromBackend)());
294371
- await this._instance.initialize();
294372
- }
294373
- return this._instance;
294374
- }
294375
- /** Initialize configuration for the rpc interfaces used by the application. */
294376
- initializeRpcInterfaces(info) {
294377
- // Url without trailing slash
294378
- const uriPrefix = this.settings.Backend.location.replace(/\/$/, "");
294379
- core_common_1.BentleyCloudRpcManager.initializeClient({ info, uriPrefix }, (0, Settings_1.getRpcInterfaces)());
294380
- }
294381
- async initialize() {
294382
- var _a;
294383
- (0, chai_1.expect)(this.settings.users.length).to.be.gte(1, `Unexpected number of users found in settings - got ${this.settings.users.length}, expected at least 2`);
294384
- // Print out the configuration
294385
- console.log(this.settings.toString()); // eslint-disable-line
294386
- // Configure iTwin.js frontend logging to go to the console
294387
- core_bentley_1.Logger.initializeToConsole();
294388
- core_bentley_1.Logger.setLevelDefault(this.settings.logLevel === undefined ? core_bentley_1.LogLevel.Warning : this.settings.logLevel);
294389
- if (undefined !== this.settings.oidcClientId) {
294390
- this.adminUserAccessToken = await (0, frontend_1.getAccessTokenFromBackend)({
294391
- email: this.settings.users[0].email,
294392
- password: this.settings.users[0].password,
294393
- }, {
294394
- clientId: this.settings.oidcClientId,
294395
- redirectUri: this.settings.oidcRedirect,
294396
- scope: this.settings.oidcScopes,
294397
- authority: this.settings.oidcAuthority,
294398
- });
294399
- }
294400
- const iModelData = this.settings.iModel;
294401
- this.iModelWithChangesets = await IModelSession_1.IModelSession.create(this.adminUserAccessToken, iModelData);
294402
- this.iTwinId = this.iModelWithChangesets.iTwinId;
294403
- this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
294404
- const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
294405
- await core_frontend_1.NoRenderApp.startup({
294406
- applicationId: this.settings.gprid,
294407
- authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
294408
- hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
294409
- });
294410
- console.log("TestSetup: Done"); // eslint-disable-line
294411
- }
294412
- }
294413
- exports.TestContext = TestContext;
294414
- TestContext._instance = undefined;
294363
+
294364
+ /*---------------------------------------------------------------------------------------------
294365
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
294366
+ * See LICENSE.md in the project root for license terms and full copyright notice.
294367
+ *--------------------------------------------------------------------------------------------*/
294368
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
294369
+ exports.TestContext = void 0;
294370
+ const chai_1 = __webpack_require__(/*! chai */ "../../common/temp/node_modules/.pnpm/chai@4.3.7/node_modules/chai/index.js");
294371
+ const core_bentley_1 = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
294372
+ const core_frontend_1 = __webpack_require__(/*! @itwin/core-frontend */ "../../core/frontend/lib/esm/core-frontend.js");
294373
+ const frontend_1 = __webpack_require__(/*! @itwin/oidc-signin-tool/lib/cjs/frontend */ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@3.6.1/node_modules/@itwin/oidc-signin-tool/lib/cjs/frontend.js");
294374
+ const Settings_1 = __webpack_require__(/*! ../../common/Settings */ "./lib/common/Settings.js");
294375
+ const SideChannels_1 = __webpack_require__(/*! ../../common/SideChannels */ "./lib/common/SideChannels.js");
294376
+ const IModelSession_1 = __webpack_require__(/*! ./IModelSession */ "./lib/frontend/setup/IModelSession.js");
294377
+ const core_common_1 = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
294378
+ const imodels_access_frontend_1 = __webpack_require__(/*! @itwin/imodels-access-frontend */ "../../common/temp/node_modules/.pnpm/@itwin+imodels-access-frontend@2.3.0/node_modules/@itwin/imodels-access-frontend/lib/esm/index.js");
294379
+ const imodels_client_management_1 = __webpack_require__(/*! @itwin/imodels-client-management */ "../../common/temp/node_modules/.pnpm/@itwin+imodels-client-management@2.3.0/node_modules/@itwin/imodels-client-management/lib/esm/index.js");
294380
+ class TestContext {
294381
+ constructor(env) {
294382
+ this.settings = new Settings_1.Settings(env);
294383
+ }
294384
+ static async instance() {
294385
+ if (this._instance === undefined) {
294386
+ this._instance = new TestContext(await (0, SideChannels_1.getProcessEnvFromBackend)());
294387
+ await this._instance.initialize();
294388
+ }
294389
+ return this._instance;
294390
+ }
294391
+ /** Initialize configuration for the rpc interfaces used by the application. */
294392
+ initializeRpcInterfaces(info) {
294393
+ // Url without trailing slash
294394
+ const uriPrefix = this.settings.Backend.location.replace(/\/$/, "");
294395
+ core_common_1.BentleyCloudRpcManager.initializeClient({ info, uriPrefix }, (0, Settings_1.getRpcInterfaces)());
294396
+ }
294397
+ async initialize() {
294398
+ var _a;
294399
+ (0, chai_1.expect)(this.settings.users.length).to.be.gte(1, `Unexpected number of users found in settings - got ${this.settings.users.length}, expected at least 2`);
294400
+ // Print out the configuration
294401
+ console.log(this.settings.toString()); // eslint-disable-line
294402
+ // Configure iTwin.js frontend logging to go to the console
294403
+ core_bentley_1.Logger.initializeToConsole();
294404
+ core_bentley_1.Logger.setLevelDefault(this.settings.logLevel === undefined ? core_bentley_1.LogLevel.Warning : this.settings.logLevel);
294405
+ if (undefined !== this.settings.oidcClientId) {
294406
+ this.adminUserAccessToken = await (0, frontend_1.getAccessTokenFromBackend)({
294407
+ email: this.settings.users[0].email,
294408
+ password: this.settings.users[0].password,
294409
+ }, {
294410
+ clientId: this.settings.oidcClientId,
294411
+ redirectUri: this.settings.oidcRedirect,
294412
+ scope: this.settings.oidcScopes,
294413
+ authority: this.settings.oidcAuthority,
294414
+ });
294415
+ }
294416
+ const iModelData = this.settings.iModel;
294417
+ this.iModelWithChangesets = await IModelSession_1.IModelSession.create(this.adminUserAccessToken, iModelData);
294418
+ this.iTwinId = this.iModelWithChangesets.iTwinId;
294419
+ this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
294420
+ const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
294421
+ await core_frontend_1.NoRenderApp.startup({
294422
+ applicationId: this.settings.gprid,
294423
+ authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
294424
+ hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
294425
+ });
294426
+ console.log("TestSetup: Done"); // eslint-disable-line
294427
+ }
294428
+ }
294429
+ exports.TestContext = TestContext;
294430
+ TestContext._instance = undefined;
294415
294431
 
294416
294432
 
294417
294433
  /***/ }),
@@ -304793,7 +304809,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
304793
304809
  /***/ ((module) => {
304794
304810
 
304795
304811
  "use strict";
304796
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.7.0-dev.2","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","build:ci":"npm run -s build && npm run -s build:esm","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 ES2020 --outDir lib/esm","clean":"rimraf 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","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/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-eslintrc -c \\"../../tools/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^3.7.0-dev.2","@itwin/core-bentley":"workspace:^3.7.0-dev.2","@itwin/core-common":"workspace:^3.7.0-dev.2","@itwin/core-geometry":"workspace:^3.7.0-dev.2","@itwin/core-orbitgt":"workspace:^3.7.0-dev.2","@itwin/core-quantity":"workspace:^3.7.0-dev.2","@itwin/webgl-compatibility":"workspace:^3.7.0-dev.2"},"//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/certa":"workspace:*","@itwin/eslint-plugin":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/lodash":"^4.14.0","@types/mocha":"^8.2.2","@types/node":"18.11.5","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.64.4"},"//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/object-storage-azure":"~1.4.0","@itwin/cloud-agnostic-core":"~1.4.0","@itwin/object-storage-core":"~1.4.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","lodash":"^4.17.10","qs":"^6.5.3","semver":"^7.3.5","superagent":"^7.1.5","wms-capabilities":"0.4.0","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
304812
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.7.0-dev.3","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","build:ci":"npm run -s build && npm run -s build:esm","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 ES2020 --outDir lib/esm","clean":"rimraf 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","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/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-eslintrc -c \\"../../tools/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^3.7.0-dev.3","@itwin/core-bentley":"workspace:^3.7.0-dev.3","@itwin/core-common":"workspace:^3.7.0-dev.3","@itwin/core-geometry":"workspace:^3.7.0-dev.3","@itwin/core-orbitgt":"workspace:^3.7.0-dev.3","@itwin/core-quantity":"workspace:^3.7.0-dev.3","@itwin/webgl-compatibility":"workspace:^3.7.0-dev.3"},"//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/certa":"workspace:*","@itwin/eslint-plugin":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/lodash":"^4.14.0","@types/mocha":"^8.2.2","@types/node":"18.11.5","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.76.0"},"//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/object-storage-azure":"~1.4.0","@itwin/cloud-agnostic-core":"~1.4.0","@itwin/object-storage-core":"~1.4.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","lodash":"^4.17.10","qs":"^6.5.3","semver":"^7.3.5","superagent":"^7.1.5","wms-capabilities":"0.4.0","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
304797
304813
 
304798
304814
  /***/ })
304799
304815
 
@@ -305107,37 +305123,37 @@ var exports = __webpack_exports__;
305107
305123
  /*!*************************************************!*\
305108
305124
  !*** ./lib/frontend/SchemaRpcInterface.test.js ***!
305109
305125
  \*************************************************/
305110
-
305111
- /*---------------------------------------------------------------------------------------------
305112
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
305113
- * See LICENSE.md in the project root for license terms and full copyright notice.
305114
- *--------------------------------------------------------------------------------------------*/
305115
- Object.defineProperty(exports, "__esModule", ({ value: true }));
305116
- const chai_1 = __webpack_require__(/*! chai */ "../../common/temp/node_modules/.pnpm/chai@4.3.7/node_modules/chai/index.js");
305117
- const ecschema_rpcinterface_common_1 = __webpack_require__(/*! @itwin/ecschema-rpcinterface-common */ "../../core/ecschema-rpc/common/lib/cjs/ecschema-rpc-interface.js");
305118
- const TestContext_1 = __webpack_require__(/*! ./setup/TestContext */ "./lib/frontend/setup/TestContext.js");
305119
- const ecschema_metadata_1 = __webpack_require__(/*! @itwin/ecschema-metadata */ "../../core/ecschema-metadata/lib/cjs/ecschema-metadata.js");
305120
- describe("Schema RPC Interface", () => {
305121
- let iModel;
305122
- let testContext;
305123
- before(async () => {
305124
- testContext = await TestContext_1.TestContext.instance();
305125
- iModel = await testContext.iModelWithChangesets.getConnection();
305126
- });
305127
- it("should get schema keys", async () => {
305128
- const schemaKeys = [];
305129
- const props = await ecschema_rpcinterface_common_1.ECSchemaRpcInterface.getClient().getSchemaKeys(iModel.getRpcProps());
305130
- props.forEach((prop) => schemaKeys.push(ecschema_metadata_1.SchemaKey.fromJSON(prop)));
305131
- (0, chai_1.expect)(schemaKeys).to.not.be.undefined;
305132
- });
305133
- it("should get schema JSON", async () => {
305134
- const schemaKeys = [];
305135
- const props = await ecschema_rpcinterface_common_1.ECSchemaRpcInterface.getClient().getSchemaKeys(iModel.getRpcProps());
305136
- props.forEach((prop) => schemaKeys.push(ecschema_metadata_1.SchemaKey.fromJSON(prop)));
305137
- const schemaJSON = await ecschema_rpcinterface_common_1.ECSchemaRpcInterface.getClient().getSchemaJSON(iModel.getRpcProps(), schemaKeys[0].name);
305138
- (0, chai_1.expect)(schemaJSON).to.not.be.undefined;
305139
- });
305140
- });
305126
+
305127
+ /*---------------------------------------------------------------------------------------------
305128
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
305129
+ * See LICENSE.md in the project root for license terms and full copyright notice.
305130
+ *--------------------------------------------------------------------------------------------*/
305131
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
305132
+ const chai_1 = __webpack_require__(/*! chai */ "../../common/temp/node_modules/.pnpm/chai@4.3.7/node_modules/chai/index.js");
305133
+ const ecschema_rpcinterface_common_1 = __webpack_require__(/*! @itwin/ecschema-rpcinterface-common */ "../../core/ecschema-rpc/common/lib/cjs/ecschema-rpc-interface.js");
305134
+ const TestContext_1 = __webpack_require__(/*! ./setup/TestContext */ "./lib/frontend/setup/TestContext.js");
305135
+ const ecschema_metadata_1 = __webpack_require__(/*! @itwin/ecschema-metadata */ "../../core/ecschema-metadata/lib/cjs/ecschema-metadata.js");
305136
+ describe("Schema RPC Interface", () => {
305137
+ let iModel;
305138
+ let testContext;
305139
+ before(async () => {
305140
+ testContext = await TestContext_1.TestContext.instance();
305141
+ iModel = await testContext.iModelWithChangesets.getConnection();
305142
+ });
305143
+ it("should get schema keys", async () => {
305144
+ const schemaKeys = [];
305145
+ const props = await ecschema_rpcinterface_common_1.ECSchemaRpcInterface.getClient().getSchemaKeys(iModel.getRpcProps());
305146
+ props.forEach((prop) => schemaKeys.push(ecschema_metadata_1.SchemaKey.fromJSON(prop)));
305147
+ (0, chai_1.expect)(schemaKeys).to.not.be.undefined;
305148
+ });
305149
+ it("should get schema JSON", async () => {
305150
+ const schemaKeys = [];
305151
+ const props = await ecschema_rpcinterface_common_1.ECSchemaRpcInterface.getClient().getSchemaKeys(iModel.getRpcProps());
305152
+ props.forEach((prop) => schemaKeys.push(ecschema_metadata_1.SchemaKey.fromJSON(prop)));
305153
+ const schemaJSON = await ecschema_rpcinterface_common_1.ECSchemaRpcInterface.getClient().getSchemaJSON(iModel.getRpcProps(), schemaKeys[0].name);
305154
+ (0, chai_1.expect)(schemaJSON).to.not.be.undefined;
305155
+ });
305156
+ });
305141
305157
 
305142
305158
  })();
305143
305159