@itwin/rpcinterface-full-stack-tests 5.8.0-dev.12 → 5.8.0-dev.14

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.
@@ -194113,6 +194113,11 @@ class QuantityFormatter {
194113
194113
  * @internal
194114
194114
  */
194115
194115
  async onInitialized() {
194116
+ // Remove any existing listener before re-registering to avoid duplicates when called via setUnitsProvider.
194117
+ if (this._removeFormatsProviderListener) {
194118
+ this._removeFormatsProviderListener();
194119
+ this._removeFormatsProviderListener = undefined;
194120
+ }
194116
194121
  await this.initializeQuantityTypesRegistry();
194117
194122
  const initialKoQs = [["DefaultToolsUnits.LENGTH", "Units.M"], ["DefaultToolsUnits.ANGLE", "Units.RAD"], ["DefaultToolsUnits.AREA", "Units.SQ_M"], ["DefaultToolsUnits.VOLUME", "Units.CUB_M"], ["DefaultToolsUnits.LENGTH_COORDINATE", "Units.M"], ["CivilUnits.STATION", "Units.M"], ["CivilUnits.LENGTH", "Units.M"], ["AecUnits.LENGTH", "Units.M"]];
194118
194123
  for (const entry of initialKoQs) {
@@ -194181,7 +194186,11 @@ class QuantityFormatter {
194181
194186
  set unitsProvider(unitsProvider) {
194182
194187
  this.setUnitsProvider(unitsProvider); // eslint-disable-line @typescript-eslint/no-floating-promises
194183
194188
  }
194184
- /** async method to set a units provider and reload caches */
194189
+ /**
194190
+ * Async method to set a units provider and reload caches.
194191
+ * @note If the active primitive tool may be holding stale unit data, callers should follow this with
194192
+ * `IModelApp.toolAdmin.restartPrimitiveTool()` to allow the tool to reinitialize itself.
194193
+ */
194185
194194
  async setUnitsProvider(unitsProvider) {
194186
194195
  this._unitsProvider = unitsProvider;
194187
194196
  try {
@@ -194195,12 +194204,14 @@ class QuantityFormatter {
194195
194204
  await _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.quantityFormatter.resetToUseInternalUnitsProvider();
194196
194205
  return;
194197
194206
  }
194198
- // force default tool to start so any tool that may be using cached data will not be using bad data.
194199
- if (_IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.toolAdmin)
194200
- await _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.toolAdmin.startDefaultTool();
194201
194207
  this.onUnitsProviderChanged.emit();
194202
194208
  }
194203
- /** Async call typically used after IModel is closed to reset UnitsProvider to default one that does not require an Units schema. */
194209
+ /**
194210
+ * Async call typically used after an iModel is closed to reset the UnitsProvider to the default one
194211
+ * that does not require a Units schema.
194212
+ * @note If the active primitive tool may be holding stale unit data, callers should follow this with
194213
+ * `IModelApp.toolAdmin.restartPrimitiveTool()` to allow the tool to reinitialize itself.
194214
+ */
194204
194215
  async resetToUseInternalUnitsProvider() {
194205
194216
  if (this._unitsProvider instanceof _BasicUnitsProvider__WEBPACK_IMPORTED_MODULE_4__.BasicUnitsProvider)
194206
194217
  return;
@@ -194570,7 +194581,7 @@ const DEFAULT_FORMATKEY_BY_UNIT_SYSTEM = [
194570
194581
  { type: getQuantityTypeKey(QuantityType.Coordinate), formatKey: "[units:length]meter2" },
194571
194582
  { type: getQuantityTypeKey(QuantityType.Stationing), formatKey: "[units:length]m-sta2" },
194572
194583
  { type: getQuantityTypeKey(QuantityType.LengthSurvey), formatKey: "[units:length]meter4" },
194573
- { type: getQuantityTypeKey(QuantityType.LengthEngineering), formatKey: "[units:length]millimeter3" },
194584
+ { type: getQuantityTypeKey(QuantityType.LengthEngineering), formatKey: "[units:length]meter4" },
194574
194585
  ],
194575
194586
  },
194576
194587
  {
@@ -194632,20 +194643,6 @@ const DEFAULT_FORMATPROPS = [
194632
194643
  type: "Decimal",
194633
194644
  },
194634
194645
  },
194635
- {
194636
- key: "[units:length]millimeter3",
194637
- description: "millimeters (labeled) 3 decimal places",
194638
- format: {
194639
- composite: {
194640
- includeZero: true,
194641
- spacer: "",
194642
- units: [{ label: "mm", name: "Units.MM" }],
194643
- },
194644
- formatTraits: ["keepSingleZero", "showUnitLabel"],
194645
- precision: 3,
194646
- type: "Decimal",
194647
- },
194648
- },
194649
194646
  {
194650
194647
  key: "[units:length]meter2",
194651
194648
  description: "meters (labeled) 2 decimal places",
@@ -220351,7 +220348,12 @@ class ToolAdmin {
220351
220348
  await this.setPrimitiveTool(newTool);
220352
220349
  }
220353
220350
  // it is important to raise event after setPrimitiveTool is called
220354
- this.onActiveToolChanged(undefined !== newTool ? newTool : this.idleTool, StartOrResume.Start);
220351
+ const activeTool = newTool ?? this._idleTool;
220352
+ // _idleTool is cleared during onShutDown(); skip the event if shutdown has already run
220353
+ // to avoid emitting activeToolChanged with an undefined tool.
220354
+ if (undefined === activeTool)
220355
+ return;
220356
+ this.onActiveToolChanged(activeTool, StartOrResume.Start);
220355
220357
  }
220356
220358
  finally {
220357
220359
  if (resolveStarting)
@@ -348184,7 +348186,7 @@ class TestContext {
348184
348186
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
348185
348187
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
348186
348188
  await core_frontend_1.NoRenderApp.startup({
348187
- applicationVersion: "5.8.0-dev.12",
348189
+ applicationVersion: "5.8.0-dev.14",
348188
348190
  applicationId: this.settings.gprid,
348189
348191
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
348190
348192
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -375361,7 +375363,7 @@ var loadLanguages = instance.loadLanguages;
375361
375363
  /***/ ((module) => {
375362
375364
 
375363
375365
  "use strict";
375364
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.8.0-dev.12","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 && npm run -s copy:draco","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","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./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 && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.9","@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/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.5.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","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/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.3.4","@loaders.gl/draco":"^4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
375366
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.8.0-dev.14","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 && npm run -s copy:draco","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","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./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 && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.9","@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/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.5.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","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/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^4.3.4","@loaders.gl/draco":"^4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
375365
375367
 
375366
375368
  /***/ }),
375367
375369