@itwin/rpcinterface-full-stack-tests 5.7.0-dev.14 → 5.7.0-dev.16
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 +59 -27
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -59345,30 +59345,58 @@ class Logger {
|
|
|
59345
59345
|
const minLevel = Logger.getLevel(category);
|
|
59346
59346
|
return (minLevel !== undefined) && (level >= minLevel);
|
|
59347
59347
|
}
|
|
59348
|
-
|
|
59349
|
-
|
|
59350
|
-
|
|
59351
|
-
|
|
59352
|
-
|
|
59353
|
-
|
|
59354
|
-
|
|
59355
|
-
|
|
59348
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
59349
|
+
static logError(category, messageOrError, metaData) {
|
|
59350
|
+
if (Logger._logError && Logger.isEnabled(category, LogLevel.Error)) {
|
|
59351
|
+
if (typeof messageOrError === "string") {
|
|
59352
|
+
Logger._logError(category, messageOrError, metaData);
|
|
59353
|
+
}
|
|
59354
|
+
else if (_BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.isError(messageOrError)) {
|
|
59355
|
+
// For backwards compatibility, log BentleyError old way
|
|
59356
|
+
Logger._logError(category, Logger.getExceptionMessage(messageOrError), () => ({ ..._BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getErrorMetadata(messageOrError), exceptionType: messageOrError?.constructor?.name ?? "<Unknown>", ..._BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getMetaData(metaData) }));
|
|
59357
|
+
}
|
|
59358
|
+
else {
|
|
59359
|
+
// Else, return a copy of the error, with non-enumerable members `message` and `stack` removed, as "metadata" for log.
|
|
59360
|
+
Logger._logError(category, Logger.getExceptionMessage(messageOrError), Logger.getExceptionMetaData(messageOrError, metaData));
|
|
59361
|
+
}
|
|
59362
|
+
}
|
|
59356
59363
|
}
|
|
59357
|
-
|
|
59358
|
-
|
|
59359
|
-
|
|
59364
|
+
/**
|
|
59365
|
+
* Get a sting message for a given error.
|
|
59366
|
+
* For legacy [[BentleyError]] exceptions, this will include the error message and, optionally, the call stack.
|
|
59367
|
+
* For other exceptions, this will include the stringified version of the error.
|
|
59368
|
+
* @param error The error to get the message for
|
|
59369
|
+
* @returns A string message for the error
|
|
59370
|
+
*/
|
|
59371
|
+
static getExceptionMessage(error) {
|
|
59372
|
+
if (error === undefined) {
|
|
59373
|
+
return "Error: error is undefined.";
|
|
59360
59374
|
}
|
|
59361
|
-
if (
|
|
59362
|
-
return "Error:
|
|
59375
|
+
if (error === null) {
|
|
59376
|
+
return "Error: error is null.";
|
|
59363
59377
|
}
|
|
59364
|
-
const stack = Logger.logExceptionCallstacks ? `\n${_BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getErrorStack(
|
|
59365
|
-
return _BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getErrorMessage(
|
|
59378
|
+
const stack = Logger.logExceptionCallstacks ? `\n${_BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getErrorStack(error)}` : "";
|
|
59379
|
+
return _BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getErrorMessage(error) + stack;
|
|
59380
|
+
}
|
|
59381
|
+
/**
|
|
59382
|
+
* Merged passed metaData with error properties into one LoggingMetaData, with the passed metaData taking precedence in case of conflict.
|
|
59383
|
+
* @param error The error to be logged as metadata
|
|
59384
|
+
* @param metaData Optional metadata to be merged with the error
|
|
59385
|
+
* @returns A function returning the merged metadata
|
|
59386
|
+
*/
|
|
59387
|
+
static getExceptionMetaData(error, metaData) {
|
|
59388
|
+
const exceptionType = error?.constructor?.name ?? "<Unknown>";
|
|
59389
|
+
if (metaData === undefined) {
|
|
59390
|
+
return () => ({ exceptionType, ...error });
|
|
59391
|
+
}
|
|
59392
|
+
return () => ({ exceptionType, ...error, ..._BentleyError__WEBPACK_IMPORTED_MODULE_1__.BentleyError.getMetaData(metaData) });
|
|
59366
59393
|
}
|
|
59367
59394
|
/** Log the specified exception.
|
|
59368
59395
|
* For legacy [[BentleyError]] exceptions, the special "exceptionType" property will be added as metadata. Otherwise, all enumerable members of the exception are logged as metadata.
|
|
59369
59396
|
* @param category The category of the message.
|
|
59370
59397
|
* @param err The exception object.
|
|
59371
59398
|
* @param log The logger output function to use - defaults to Logger.logError
|
|
59399
|
+
* @deprecated in 5.6. Use logError(category, error, metaData) instead, which will log exceptions in the same way but is more flexible and easier to use.
|
|
59372
59400
|
*/
|
|
59373
59401
|
static logException(category, err, log = (_category, message, metaData) => Logger.logError(_category, message, metaData)) {
|
|
59374
59402
|
log(category, Logger.getExceptionMessage(err), () => {
|
|
@@ -59654,11 +59682,15 @@ class OneAtATimeAction {
|
|
|
59654
59682
|
return await promise;
|
|
59655
59683
|
}
|
|
59656
59684
|
finally {
|
|
59657
|
-
//
|
|
59658
|
-
|
|
59659
|
-
this.
|
|
59660
|
-
|
|
59661
|
-
this._active.
|
|
59685
|
+
// A replaced pending request can be abandoned before it ever becomes active.
|
|
59686
|
+
// Only the currently active entry is allowed to promote/start the next pending request.
|
|
59687
|
+
if (this._active === entry) {
|
|
59688
|
+
// do all of this whether promise was fulfilled or rejected
|
|
59689
|
+
this._active = this._pending; // see if there's a pending request waiting
|
|
59690
|
+
this._pending = undefined; // clear pending
|
|
59691
|
+
if (this._active)
|
|
59692
|
+
this._active.start(); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
59693
|
+
}
|
|
59662
59694
|
}
|
|
59663
59695
|
}
|
|
59664
59696
|
}
|
|
@@ -61741,7 +61773,7 @@ class UnexpectedErrors {
|
|
|
61741
61773
|
/** handler for logging exception to console */
|
|
61742
61774
|
static consoleLog = (e) => console.error(e); // eslint-disable-line no-console
|
|
61743
61775
|
/** handler for logging exception with [[Logger]] */
|
|
61744
|
-
static errorLog = (e) => _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.
|
|
61776
|
+
static errorLog = (e) => _Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.logError("unhandled", e);
|
|
61745
61777
|
static _telemetry = [];
|
|
61746
61778
|
static _handler = this.errorLog; // default to error logging
|
|
61747
61779
|
constructor() { } // this is a singleton
|
|
@@ -123710,7 +123742,7 @@ class CoordinateConverter {
|
|
|
123710
123742
|
this._cache.set(requests[j], results[j]);
|
|
123711
123743
|
}
|
|
123712
123744
|
}).catch((err) => {
|
|
123713
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.
|
|
123745
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(`${_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_2__.FrontendLoggerCategory.Package}.geoservices`, err);
|
|
123714
123746
|
});
|
|
123715
123747
|
promises.push(promise);
|
|
123716
123748
|
}
|
|
@@ -186152,7 +186184,7 @@ async function getDecoder() {
|
|
|
186152
186184
|
instance.exports.__wasm_call_ctors();
|
|
186153
186185
|
}
|
|
186154
186186
|
catch (err) {
|
|
186155
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.
|
|
186187
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_1__.FrontendLoggerCategory.Render, err);
|
|
186156
186188
|
return undefined;
|
|
186157
186189
|
}
|
|
186158
186190
|
function unpack(data) {
|
|
@@ -186961,7 +186993,7 @@ async function decodeDracoPointCloud(buf) {
|
|
|
186961
186993
|
}
|
|
186962
186994
|
catch (err) {
|
|
186963
186995
|
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_3__.FrontendLoggerCategory.Render, "Failed to decode draco-encoded point cloud");
|
|
186964
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.
|
|
186996
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_3__.FrontendLoggerCategory.Render, err);
|
|
186965
186997
|
return undefined;
|
|
186966
186998
|
}
|
|
186967
186999
|
}
|
|
@@ -199249,7 +199281,7 @@ class GltfReader {
|
|
|
199249
199281
|
}
|
|
199250
199282
|
catch (err) {
|
|
199251
199283
|
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_9__.FrontendLoggerCategory.Render, "Failed to decode draco-encoded glTF mesh");
|
|
199252
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.
|
|
199284
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_9__.FrontendLoggerCategory.Render, err);
|
|
199253
199285
|
}
|
|
199254
199286
|
}
|
|
199255
199287
|
async _resolveResources() {
|
|
@@ -345239,7 +345271,7 @@ class TestContext {
|
|
|
345239
345271
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
345240
345272
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
345241
345273
|
await core_frontend_1.NoRenderApp.startup({
|
|
345242
|
-
applicationVersion: "5.7.0-dev.
|
|
345274
|
+
applicationVersion: "5.7.0-dev.16",
|
|
345243
345275
|
applicationId: this.settings.gprid,
|
|
345244
345276
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
345245
345277
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -372160,7 +372192,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
372160
372192
|
/***/ ((module) => {
|
|
372161
372193
|
|
|
372162
372194
|
"use strict";
|
|
372163
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.7.0-dev.
|
|
372195
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.7.0-dev.16","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","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":{"@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"}}');
|
|
372164
372196
|
|
|
372165
372197
|
/***/ }),
|
|
372166
372198
|
|