@itwin/ecschema-rpcinterface-tests 5.0.0-dev.52 → 5.0.0-dev.53
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 +12 -17
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -70742,6 +70742,7 @@ class UnitGraph {
|
|
|
70742
70742
|
constructor(_context) {
|
|
70743
70743
|
this._context = _context;
|
|
70744
70744
|
this._graph = new _Graph__WEBPACK_IMPORTED_MODULE_6__.Graph();
|
|
70745
|
+
this._unitsInProgress = new Map();
|
|
70745
70746
|
this._graph.setGraph("Unit tree processor");
|
|
70746
70747
|
}
|
|
70747
70748
|
/**
|
|
@@ -70804,11 +70805,19 @@ class UnitGraph {
|
|
|
70804
70805
|
* @param unit Current unit to be added to graph
|
|
70805
70806
|
*/
|
|
70806
70807
|
async addUnit(unit) {
|
|
70808
|
+
if (this._unitsInProgress.has(unit.key.fullName))
|
|
70809
|
+
return this._unitsInProgress.get(unit.key.fullName);
|
|
70807
70810
|
if (this._graph.hasNode(unit.key.fullName))
|
|
70808
70811
|
return;
|
|
70809
70812
|
this._graph.setNode(unit.key.fullName, unit);
|
|
70810
70813
|
if (this.isIdentity(unit))
|
|
70811
70814
|
return;
|
|
70815
|
+
const promise = this.addUnitToGraph(unit);
|
|
70816
|
+
this._unitsInProgress.set(unit.key.fullName, promise);
|
|
70817
|
+
await promise
|
|
70818
|
+
.finally(() => this._unitsInProgress.delete(unit.key.fullName));
|
|
70819
|
+
}
|
|
70820
|
+
async addUnitToGraph(unit) {
|
|
70812
70821
|
const umap = (0,_Parser__WEBPACK_IMPORTED_MODULE_5__.parseDefinition)(unit.definition);
|
|
70813
70822
|
const promiseArray = [];
|
|
70814
70823
|
for (const [key, value] of umap) {
|
|
@@ -84259,20 +84268,6 @@ class SnapshotConnection extends IModelConnection {
|
|
|
84259
84268
|
await viewState.load(); // loads models for ModelSelector
|
|
84260
84269
|
return viewState;
|
|
84261
84270
|
}
|
|
84262
|
-
/** Get a thumbnail for a view.
|
|
84263
|
-
* @param viewId The id of the view of the thumbnail.
|
|
84264
|
-
* @returns A Promise of the ThumbnailProps.
|
|
84265
|
-
* @throws "No content" error if invalid thumbnail.
|
|
84266
|
-
* @deprecated in 3.x use ViewStore apis
|
|
84267
|
-
*/
|
|
84268
|
-
async getThumbnail(_viewId) {
|
|
84269
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
84270
|
-
const val = await _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelReadRpcInterface.getClientForRouting(this._iModel.routingContext.token).getViewThumbnail(this._iModel.getRpcProps(), _viewId.toString());
|
|
84271
|
-
const intValues = new Uint32Array(val.buffer, 0, 4);
|
|
84272
|
-
if (intValues[1] !== _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ImageSourceFormat.Jpeg && intValues[1] !== _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ImageSourceFormat.Png)
|
|
84273
|
-
throw new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.NoContentError();
|
|
84274
|
-
return { format: intValues[1] === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ImageSourceFormat.Jpeg ? "jpeg" : "png", width: intValues[2], height: intValues[3], image: new Uint8Array(val.buffer, 16, intValues[0]) };
|
|
84275
|
-
}
|
|
84276
84271
|
}
|
|
84277
84272
|
IModelConnection.Views = Views;
|
|
84278
84273
|
/** Provides access to information about the [Category]($backend)'s stored in an [[IModelConnection]].
|
|
@@ -290373,9 +290368,9 @@ class Formatter {
|
|
|
290373
290368
|
const currentLabel = spec.unitConversions[i].label;
|
|
290374
290369
|
const unitConversion = spec.unitConversions[i].conversion;
|
|
290375
290370
|
if (i > 0 && unitConversion.factor < 1.0)
|
|
290376
|
-
throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.InvalidCompositeFormat, `The Format ${spec.format.name} has a invalid unit specification
|
|
290371
|
+
throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.InvalidCompositeFormat, `The Format ${spec.format.name} has a invalid unit specification.`);
|
|
290377
290372
|
if (i > 0 && unitConversion.offset !== 0) // offset should only ever be defined for major unit
|
|
290378
|
-
throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.InvalidCompositeFormat, `The Format ${spec.format.name} has a invalid unit specification
|
|
290373
|
+
throw new _Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityError(_Exception__WEBPACK_IMPORTED_MODULE_1__.QuantityStatus.InvalidCompositeFormat, `The Format ${spec.format.name} has a invalid unit specification.`);
|
|
290379
290374
|
let unitValue = 0.0;
|
|
290380
290375
|
if (spec.format.type === _FormatEnums__WEBPACK_IMPORTED_MODULE_2__.FormatType.Ratio) {
|
|
290381
290376
|
if (1 !== spec.format.units.length)
|
|
@@ -305612,7 +305607,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
305612
305607
|
/***/ ((module) => {
|
|
305613
305608
|
|
|
305614
305609
|
"use strict";
|
|
305615
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.
|
|
305610
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.53","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 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 --coverage","test:debug":"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:*"},"//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/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^2.1.0","@vitest/coverage-v8":"^2.1.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","cpx2":"^3.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^3.0.2","source-map-loader":"^4.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^2.1.0","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"1.0.6","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.2.5","@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"}}');
|
|
305616
305611
|
|
|
305617
305612
|
/***/ })
|
|
305618
305613
|
|