@itwin/ecschema-rpcinterface-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.
- package/lib/dist/bundled-tests.js +37 -24
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -62480,10 +62480,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
62480
62480
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
62481
62481
|
/* harmony export */ SchemaGraphUtil: () => (/* binding */ SchemaGraphUtil)
|
|
62482
62482
|
/* harmony export */ });
|
|
62483
|
-
/*---------------------------------------------------------------------------------------------
|
|
62484
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
62485
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
62486
|
-
*--------------------------------------------------------------------------------------------*/
|
|
62487
62483
|
/**
|
|
62488
62484
|
* Utility class for working with Schema graphs.
|
|
62489
62485
|
* @internal
|
|
@@ -62499,23 +62495,44 @@ class SchemaGraphUtil {
|
|
|
62499
62495
|
static buildDependencyOrderedSchemaList(insertSchema, schemas) {
|
|
62500
62496
|
if (!schemas)
|
|
62501
62497
|
schemas = [];
|
|
62502
|
-
|
|
62498
|
+
const lookupFn = (schema, referenceKey) => {
|
|
62499
|
+
return schema.references.find((s) => s.schemaKey.name === referenceKey.name);
|
|
62500
|
+
};
|
|
62501
|
+
this.insertSchemaInDependencyOrderedList(schemas, insertSchema, lookupFn);
|
|
62503
62502
|
for (const reference of insertSchema.references) {
|
|
62504
62503
|
this.buildDependencyOrderedSchemaList(reference, schemas);
|
|
62505
62504
|
}
|
|
62506
62505
|
return schemas;
|
|
62507
62506
|
}
|
|
62507
|
+
/**
|
|
62508
|
+
* Returns a flat list of schemas in topological order, typically used before schema import
|
|
62509
|
+
* so that dependent schemas are processed after their references. This method does not alter
|
|
62510
|
+
* the original schemaInfos array.
|
|
62511
|
+
* @param schemaInfos The schema collection that will hold the ordered schemas.
|
|
62512
|
+
* @returns A list of schemas in topological order.
|
|
62513
|
+
*/
|
|
62514
|
+
static buildDependencyOrderedSchemaInfoList(schemaInfos) {
|
|
62515
|
+
const sortedList = [];
|
|
62516
|
+
const lookupFn = (_schema, reference) => {
|
|
62517
|
+
return schemaInfos.find((s) => s.schemaKey.name === reference.name);
|
|
62518
|
+
};
|
|
62519
|
+
for (const schemaInfo of schemaInfos) {
|
|
62520
|
+
this.insertSchemaInDependencyOrderedList(sortedList, schemaInfo, lookupFn);
|
|
62521
|
+
}
|
|
62522
|
+
return sortedList;
|
|
62523
|
+
}
|
|
62508
62524
|
/**
|
|
62509
62525
|
* Indicates if the given Schema references the possibleDependency Schema.
|
|
62510
62526
|
* @param schema The possible dependent schema.
|
|
62511
62527
|
* @param possibleDependency The possible Schema dependency.
|
|
62512
62528
|
*/
|
|
62513
|
-
static dependsOn(schema, possibleDependency) {
|
|
62529
|
+
static dependsOn(schema, possibleDependency, lookup) {
|
|
62514
62530
|
if (this.directlyReferences(schema, possibleDependency))
|
|
62515
62531
|
return true;
|
|
62516
62532
|
// search for dependencies in indirect references
|
|
62517
|
-
for (const
|
|
62518
|
-
|
|
62533
|
+
for (const referenceInfo of schema.references) {
|
|
62534
|
+
const reference = lookup(schema, referenceInfo.schemaKey);
|
|
62535
|
+
if (reference && this.dependsOn(reference, possibleDependency, lookup))
|
|
62519
62536
|
return true;
|
|
62520
62537
|
}
|
|
62521
62538
|
return false;
|
|
@@ -62526,31 +62543,27 @@ class SchemaGraphUtil {
|
|
|
62526
62543
|
* @param possibleDependency The Schema that may be referenced.
|
|
62527
62544
|
*/
|
|
62528
62545
|
static directlyReferences(schema, possiblyReferencedSchema) {
|
|
62529
|
-
|
|
62530
|
-
if (reference === possiblyReferencedSchema)
|
|
62531
|
-
return true;
|
|
62532
|
-
}
|
|
62533
|
-
return false;
|
|
62546
|
+
return schema.references.some((ref) => ref.schemaKey.name === possiblyReferencedSchema.schemaKey.name);
|
|
62534
62547
|
}
|
|
62535
62548
|
/**
|
|
62536
62549
|
* Helper method that manages the insertion of a Schema into the schemas collection
|
|
62537
62550
|
* based on the topological ordering algorithm.
|
|
62538
|
-
* @param schemas The ordered
|
|
62539
|
-
* @param
|
|
62551
|
+
* @param schemas The ordered collection.
|
|
62552
|
+
* @param insert The instance to insert.
|
|
62540
62553
|
*/
|
|
62541
|
-
static insertSchemaInDependencyOrderedList(
|
|
62542
|
-
if (
|
|
62554
|
+
static insertSchemaInDependencyOrderedList(orderedList, insert, lookup) {
|
|
62555
|
+
if (orderedList.includes(insert))
|
|
62543
62556
|
return;
|
|
62544
|
-
for (let i =
|
|
62545
|
-
const schema =
|
|
62546
|
-
if (this.dependsOn(
|
|
62557
|
+
for (let i = orderedList.length - 1; i >= 0; --i) {
|
|
62558
|
+
const schema = orderedList[i];
|
|
62559
|
+
if (this.dependsOn(insert, schema, lookup)) {
|
|
62547
62560
|
// insert right after the referenced schema in the list
|
|
62548
|
-
const index =
|
|
62549
|
-
|
|
62561
|
+
const index = orderedList.indexOf(schema);
|
|
62562
|
+
orderedList.splice(index + 1, 0, insert);
|
|
62550
62563
|
return;
|
|
62551
62564
|
}
|
|
62552
62565
|
}
|
|
62553
|
-
|
|
62566
|
+
orderedList.splice(0, 0, insert);
|
|
62554
62567
|
}
|
|
62555
62568
|
}
|
|
62556
62569
|
|
|
@@ -313375,7 +313388,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
313375
313388
|
/***/ ((module) => {
|
|
313376
313389
|
|
|
313377
313390
|
"use strict";
|
|
313378
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.1.0-dev.
|
|
313391
|
+
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"}}');
|
|
313379
313392
|
|
|
313380
313393
|
/***/ })
|
|
313381
313394
|
|