@itwin/rpcinterface-full-stack-tests 5.9.1 → 5.9.2
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 +33 -46
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -195303,12 +195303,12 @@ class QuantityFormatter {
|
|
|
195303
195303
|
const effectiveSystem = args.system ?? this._activeUnitSystem;
|
|
195304
195304
|
return this._formatSpecsRegistry.get(args.name)?.get(args.persistenceUnitName)?.get(effectiveSystem);
|
|
195305
195305
|
}
|
|
195306
|
-
/** Create a
|
|
195307
|
-
* The handle
|
|
195306
|
+
/** Create a handle to formatting specs for a specific KoQ and persistence unit.
|
|
195307
|
+
* The handle reads the current specs from the formatter on access. Call `dispose()` when done.
|
|
195308
195308
|
*
|
|
195309
195309
|
* @param koqName - The KindOfQuantity name (e.g., "DefaultToolsUnits.LENGTH")
|
|
195310
195310
|
* @param persistenceUnit - The persistence unit name (e.g., "Units.M")
|
|
195311
|
-
* @returns A FormatSpecHandle that
|
|
195311
|
+
* @returns A FormatSpecHandle that reflects current formatter state
|
|
195312
195312
|
* @beta
|
|
195313
195313
|
*/
|
|
195314
195314
|
getFormatSpecHandle(koqName, persistenceUnit, system) {
|
|
@@ -195336,12 +195336,17 @@ class QuantityFormatter {
|
|
|
195336
195336
|
formatProps,
|
|
195337
195337
|
formatName: name,
|
|
195338
195338
|
});
|
|
195339
|
-
|
|
195340
|
-
|
|
195341
|
-
|
|
195342
|
-
|
|
195343
|
-
|
|
195344
|
-
unitMap.get(persistenceUnitName)
|
|
195339
|
+
let unitMap = this._formatSpecsRegistry.get(name);
|
|
195340
|
+
if (!unitMap) {
|
|
195341
|
+
unitMap = new Map();
|
|
195342
|
+
this._formatSpecsRegistry.set(name, unitMap);
|
|
195343
|
+
}
|
|
195344
|
+
let systemMap = unitMap.get(persistenceUnitName);
|
|
195345
|
+
if (!systemMap) {
|
|
195346
|
+
systemMap = new Map();
|
|
195347
|
+
unitMap.set(persistenceUnitName, systemMap);
|
|
195348
|
+
}
|
|
195349
|
+
systemMap.set(effectiveSystem, { formatterSpec, parserSpec });
|
|
195345
195350
|
}
|
|
195346
195351
|
else {
|
|
195347
195352
|
throw new Error(`Unable to find format properties for ${name} with persistence unit ${persistenceUnitName}`);
|
|
@@ -345756,19 +345761,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
345756
345761
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
345757
345762
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
345758
345763
|
*--------------------------------------------------------------------------------------------*/
|
|
345759
|
-
/** A
|
|
345760
|
-
*
|
|
345764
|
+
/** A handle to formatting and parsing specs for a specific KoQ and persistence unit.
|
|
345765
|
+
* Reads the current specs from the provider on access. Use [[QuantityFormatter.getFormatSpecHandle]]
|
|
345761
345766
|
* to create instances.
|
|
345762
345767
|
*
|
|
345763
345768
|
* When formatting is not yet ready, [[format]] returns a `value.toString()` fallback.
|
|
345764
|
-
*
|
|
345769
|
+
* Dispose the handle when it is no longer needed to invalidate it.
|
|
345765
345770
|
*
|
|
345766
345771
|
* @beta
|
|
345767
345772
|
*/
|
|
345768
345773
|
class FormatSpecHandle {
|
|
345769
|
-
|
|
345770
|
-
_parserSpec;
|
|
345771
|
-
_removeListener;
|
|
345774
|
+
_disposed = false;
|
|
345772
345775
|
_provider;
|
|
345773
345776
|
_koqName;
|
|
345774
345777
|
_persistenceUnit;
|
|
@@ -345779,10 +345782,6 @@ class FormatSpecHandle {
|
|
|
345779
345782
|
this._koqName = args.name;
|
|
345780
345783
|
this._persistenceUnit = args.persistenceUnitName;
|
|
345781
345784
|
this._system = args.system;
|
|
345782
|
-
this._removeListener = args.provider.onFormattingReady.addListener(() => {
|
|
345783
|
-
this._refresh();
|
|
345784
|
-
});
|
|
345785
|
-
this._refresh();
|
|
345786
345785
|
}
|
|
345787
345786
|
/** The KoQ name this handle is keyed to. */
|
|
345788
345787
|
get koqName() { return this._koqName; }
|
|
@@ -345791,47 +345790,35 @@ class FormatSpecHandle {
|
|
|
345791
345790
|
/** The unit system this handle is pinned to, or `undefined` for the active system. */
|
|
345792
345791
|
get system() { return this._system; }
|
|
345793
345792
|
/** The current FormatterSpec, or undefined if not yet loaded. */
|
|
345794
|
-
get formatterSpec() { return this.
|
|
345793
|
+
get formatterSpec() { return this._getEntry()?.formatterSpec; }
|
|
345795
345794
|
/** The current ParserSpec, or undefined if not yet loaded. */
|
|
345796
|
-
get parserSpec() { return this.
|
|
345795
|
+
get parserSpec() { return this._getEntry()?.parserSpec; }
|
|
345797
345796
|
/** Format a quantity value using the current spec.
|
|
345798
345797
|
* If the formatter is not yet ready, returns `value.toString()` as a fallback.
|
|
345799
345798
|
* @param value - The numeric value to format.
|
|
345800
345799
|
* @returns The formatted string.
|
|
345801
345800
|
*/
|
|
345802
345801
|
format(value) {
|
|
345803
|
-
|
|
345802
|
+
const formatterSpec = this.formatterSpec;
|
|
345803
|
+
if (!formatterSpec)
|
|
345804
345804
|
return value.toString();
|
|
345805
|
-
return this._provider.formatQuantity(value,
|
|
345805
|
+
return this._provider.formatQuantity(value, formatterSpec);
|
|
345806
345806
|
}
|
|
345807
|
-
/**
|
|
345808
|
-
* Idempotent and safe to call
|
|
345807
|
+
/** Invalidate this handle.
|
|
345808
|
+
* Idempotent and safe to call multiple times.
|
|
345809
|
+
* No additional teardown is required because the handle owns no external resources.
|
|
345809
345810
|
*/
|
|
345810
345811
|
[Symbol.dispose]() {
|
|
345811
|
-
|
|
345812
|
-
this._removeListener();
|
|
345813
|
-
this._removeListener = undefined;
|
|
345814
|
-
}
|
|
345815
|
-
this._formatterSpec = undefined;
|
|
345816
|
-
this._parserSpec = undefined;
|
|
345812
|
+
this._disposed = true;
|
|
345817
345813
|
}
|
|
345818
|
-
|
|
345819
|
-
|
|
345820
|
-
|
|
345821
|
-
|
|
345822
|
-
const entry = this._provider.getSpecsByNameAndUnit({
|
|
345814
|
+
_getEntry() {
|
|
345815
|
+
if (this._disposed)
|
|
345816
|
+
return undefined;
|
|
345817
|
+
return this._provider.getSpecsByNameAndUnit({
|
|
345823
345818
|
name: this._koqName,
|
|
345824
345819
|
persistenceUnitName: this._persistenceUnit,
|
|
345825
345820
|
system: this._system,
|
|
345826
345821
|
});
|
|
345827
|
-
if (entry) {
|
|
345828
|
-
this._formatterSpec = entry.formatterSpec;
|
|
345829
|
-
this._parserSpec = entry.parserSpec;
|
|
345830
|
-
}
|
|
345831
|
-
else {
|
|
345832
|
-
this._formatterSpec = undefined;
|
|
345833
|
-
this._parserSpec = undefined;
|
|
345834
|
-
}
|
|
345835
345822
|
}
|
|
345836
345823
|
}
|
|
345837
345824
|
|
|
@@ -350628,7 +350615,7 @@ class TestContext {
|
|
|
350628
350615
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
350629
350616
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
350630
350617
|
await core_frontend_1.NoRenderApp.startup({
|
|
350631
|
-
applicationVersion: "5.9.
|
|
350618
|
+
applicationVersion: "5.9.2",
|
|
350632
350619
|
applicationId: this.settings.gprid,
|
|
350633
350620
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
350634
350621
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -378334,7 +378321,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
378334
378321
|
/***/ ((module) => {
|
|
378335
378322
|
|
|
378336
378323
|
"use strict";
|
|
378337
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.9.
|
|
378324
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.9.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 && 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"}}');
|
|
378338
378325
|
|
|
378339
378326
|
/***/ }),
|
|
378340
378327
|
|