@itwin/rpcinterface-full-stack-tests 5.1.0-dev.26 → 5.1.0-dev.28

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.
@@ -92115,10 +92115,6 @@ __webpack_require__.r(__webpack_exports__);
92115
92115
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
92116
92116
  /* harmony export */ SchemaGraphUtil: () => (/* binding */ SchemaGraphUtil)
92117
92117
  /* harmony export */ });
92118
- /*---------------------------------------------------------------------------------------------
92119
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
92120
- * See LICENSE.md in the project root for license terms and full copyright notice.
92121
- *--------------------------------------------------------------------------------------------*/
92122
92118
  /**
92123
92119
  * Utility class for working with Schema graphs.
92124
92120
  * @internal
@@ -92134,23 +92130,44 @@ class SchemaGraphUtil {
92134
92130
  static buildDependencyOrderedSchemaList(insertSchema, schemas) {
92135
92131
  if (!schemas)
92136
92132
  schemas = [];
92137
- this.insertSchemaInDependencyOrderedList(schemas, insertSchema);
92133
+ const lookupFn = (schema, referenceKey) => {
92134
+ return schema.references.find((s) => s.schemaKey.name === referenceKey.name);
92135
+ };
92136
+ this.insertSchemaInDependencyOrderedList(schemas, insertSchema, lookupFn);
92138
92137
  for (const reference of insertSchema.references) {
92139
92138
  this.buildDependencyOrderedSchemaList(reference, schemas);
92140
92139
  }
92141
92140
  return schemas;
92142
92141
  }
92142
+ /**
92143
+ * Returns a flat list of schemas in topological order, typically used before schema import
92144
+ * so that dependent schemas are processed after their references. This method does not alter
92145
+ * the original schemaInfos array.
92146
+ * @param schemaInfos The schema collection that will hold the ordered schemas.
92147
+ * @returns A list of schemas in topological order.
92148
+ */
92149
+ static buildDependencyOrderedSchemaInfoList(schemaInfos) {
92150
+ const sortedList = [];
92151
+ const lookupFn = (_schema, reference) => {
92152
+ return schemaInfos.find((s) => s.schemaKey.name === reference.name);
92153
+ };
92154
+ for (const schemaInfo of schemaInfos) {
92155
+ this.insertSchemaInDependencyOrderedList(sortedList, schemaInfo, lookupFn);
92156
+ }
92157
+ return sortedList;
92158
+ }
92143
92159
  /**
92144
92160
  * Indicates if the given Schema references the possibleDependency Schema.
92145
92161
  * @param schema The possible dependent schema.
92146
92162
  * @param possibleDependency The possible Schema dependency.
92147
92163
  */
92148
- static dependsOn(schema, possibleDependency) {
92164
+ static dependsOn(schema, possibleDependency, lookup) {
92149
92165
  if (this.directlyReferences(schema, possibleDependency))
92150
92166
  return true;
92151
92167
  // search for dependencies in indirect references
92152
- for (const reference of schema.references) {
92153
- if (this.dependsOn(reference, possibleDependency))
92168
+ for (const referenceInfo of schema.references) {
92169
+ const reference = lookup(schema, referenceInfo.schemaKey);
92170
+ if (reference && this.dependsOn(reference, possibleDependency, lookup))
92154
92171
  return true;
92155
92172
  }
92156
92173
  return false;
@@ -92161,31 +92178,27 @@ class SchemaGraphUtil {
92161
92178
  * @param possibleDependency The Schema that may be referenced.
92162
92179
  */
92163
92180
  static directlyReferences(schema, possiblyReferencedSchema) {
92164
- for (const reference of schema.references) {
92165
- if (reference === possiblyReferencedSchema)
92166
- return true;
92167
- }
92168
- return false;
92181
+ return schema.references.some((ref) => ref.schemaKey.name === possiblyReferencedSchema.schemaKey.name);
92169
92182
  }
92170
92183
  /**
92171
92184
  * Helper method that manages the insertion of a Schema into the schemas collection
92172
92185
  * based on the topological ordering algorithm.
92173
- * @param schemas The ordered Schema collection.
92174
- * @param insertSchema The Schema to insert.
92186
+ * @param schemas The ordered collection.
92187
+ * @param insert The instance to insert.
92175
92188
  */
92176
- static insertSchemaInDependencyOrderedList(schemas, insertSchema) {
92177
- if (schemas.includes(insertSchema))
92189
+ static insertSchemaInDependencyOrderedList(orderedList, insert, lookup) {
92190
+ if (orderedList.includes(insert))
92178
92191
  return;
92179
- for (let i = schemas.length - 1; i >= 0; --i) {
92180
- const schema = schemas[i];
92181
- if (this.dependsOn(insertSchema, schema)) {
92192
+ for (let i = orderedList.length - 1; i >= 0; --i) {
92193
+ const schema = orderedList[i];
92194
+ if (this.dependsOn(insert, schema, lookup)) {
92182
92195
  // insert right after the referenced schema in the list
92183
- const index = schemas.indexOf(schema);
92184
- schemas.splice(index + 1, 0, insertSchema);
92196
+ const index = orderedList.indexOf(schema);
92197
+ orderedList.splice(index + 1, 0, insert);
92185
92198
  return;
92186
92199
  }
92187
92200
  }
92188
- schemas.splice(0, 0, insertSchema);
92201
+ orderedList.splice(0, 0, insert);
92189
92202
  }
92190
92203
  }
92191
92204
 
@@ -330463,7 +330476,7 @@ class TestContext {
330463
330476
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
330464
330477
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
330465
330478
  await core_frontend_1.NoRenderApp.startup({
330466
- applicationVersion: "5.1.0-dev.26",
330479
+ applicationVersion: "5.1.0-dev.28",
330467
330480
  applicationId: this.settings.gprid,
330468
330481
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
330469
330482
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -343564,13 +343577,13 @@ class FavoritePropertiesManager {
343564
343577
  if (missingClasses.size === 0) {
343565
343578
  return baseClasses;
343566
343579
  }
343567
- const query = `
343568
- SELECT (derivedSchema.Name || ':' || derivedClass.Name) AS "ClassFullName", (baseSchema.Name || ':' || baseClass.Name) AS "BaseClassFullName"
343569
- FROM ECDbMeta.ClassHasAllBaseClasses baseClassRels
343570
- INNER JOIN ECDbMeta.ECClassDef derivedClass ON derivedClass.ECInstanceId = baseClassRels.SourceECInstanceId
343571
- INNER JOIN ECDbMeta.ECSchemaDef derivedSchema ON derivedSchema.ECInstanceId = derivedClass.Schema.Id
343572
- INNER JOIN ECDbMeta.ECClassDef baseClass ON baseClass.ECInstanceId = baseClassRels.TargetECInstanceId
343573
- INNER JOIN ECDbMeta.ECSchemaDef baseSchema ON baseSchema.ECInstanceId = baseClass.Schema.Id
343580
+ const query = `
343581
+ SELECT (derivedSchema.Name || ':' || derivedClass.Name) AS "ClassFullName", (baseSchema.Name || ':' || baseClass.Name) AS "BaseClassFullName"
343582
+ FROM ECDbMeta.ClassHasAllBaseClasses baseClassRels
343583
+ INNER JOIN ECDbMeta.ECClassDef derivedClass ON derivedClass.ECInstanceId = baseClassRels.SourceECInstanceId
343584
+ INNER JOIN ECDbMeta.ECSchemaDef derivedSchema ON derivedSchema.ECInstanceId = derivedClass.Schema.Id
343585
+ INNER JOIN ECDbMeta.ECClassDef baseClass ON baseClass.ECInstanceId = baseClassRels.TargetECInstanceId
343586
+ INNER JOIN ECDbMeta.ECSchemaDef baseSchema ON baseSchema.ECInstanceId = baseClass.Schema.Id
343574
343587
  WHERE (derivedSchema.Name || ':' || derivedClass.Name) IN (${[...missingClasses].map((className) => `'${className}'`).join(",")})`;
343575
343588
  const reader = imodel.createQueryReader(query, undefined, { rowFormat: core_common_1.QueryRowFormat.UseJsPropertyNames });
343576
343589
  while (await reader.step()) {
@@ -355511,7 +355524,7 @@ var loadLanguages = instance.loadLanguages;
355511
355524
  /***/ ((module) => {
355512
355525
 
355513
355526
  "use strict";
355514
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.26","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","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.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","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"}}');
355527
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.28","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","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.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^6.0.1","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"}}');
355515
355528
 
355516
355529
  /***/ }),
355517
355530