@itwin/rpcinterface-full-stack-tests 4.10.0 → 4.10.1

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.
@@ -100389,6 +100389,8 @@ class RealityDataSourceTilesetUrlImpl {
100389
100389
  constructor(props) {
100390
100390
  /** For use by all Reality Data. For RD stored on PW Context Share, represents the portion from the root of the Azure Blob Container*/
100391
100391
  this._baseUrl = "";
100392
+ /** Need to be passed down to child tile requests when requesting from blob storage, e.g. a Cesium export from the Mesh Export Service*/
100393
+ this._searchParams = "";
100392
100394
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(props.sourceKey.provider === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityDataProvider.TilesetUrl || props.sourceKey.provider === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RealityDataProvider.OrbitGtBlob);
100393
100395
  this.key = props.sourceKey;
100394
100396
  this._tilesetUrl = this.key.id;
@@ -100425,8 +100427,11 @@ class RealityDataSourceTilesetUrlImpl {
100425
100427
  // otherwise the full path to root document is given.
100426
100428
  // The base URL contains the base URL from which tile relative path are constructed.
100427
100429
  // The tile's path root will need to be reinserted for child tiles to return a 200
100430
+ // If the original url includes search paramaters, they are stored in _searchParams to be reinserted into child tile requests.
100428
100431
  setBaseUrl(url) {
100429
100432
  const urlParts = url.split("/");
100433
+ const newUrl = new URL(url);
100434
+ this._searchParams = newUrl.search;
100430
100435
  urlParts.pop();
100431
100436
  if (urlParts.length === 0)
100432
100437
  this._baseUrl = "";
@@ -100457,9 +100462,16 @@ class RealityDataSourceTilesetUrlImpl {
100457
100462
  }
100458
100463
  return true;
100459
100464
  }
100460
- /** Returns the tile URL. If the tile path is a full URL, it is returned as is. Otherwise, the base URL is prepended to the tile path. */
100465
+ /** Returns the tile URL.
100466
+ * If the tile path is a relative URL, the base URL is prepended to it.
100467
+ * For both absolute and relative tile path URLs, the search parameters are checked. If the search params are empty, the base URL's search params are appended to the tile path.
100468
+ */
100461
100469
  getTileUrl(tilePath) {
100462
- return this.isValidURL(tilePath) ? tilePath : this._baseUrl + tilePath;
100470
+ if (this.isValidURL(tilePath)) {
100471
+ const url = new URL(tilePath);
100472
+ return url.search === "" ? `${tilePath}${this._searchParams}` : tilePath;
100473
+ }
100474
+ return tilePath.includes("?") ? `${this._baseUrl}${tilePath}` : `${this._baseUrl}${tilePath}${this._searchParams}`;
100463
100475
  }
100464
100476
  /**
100465
100477
  * Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.
@@ -304014,7 +304026,7 @@ class TestContext {
304014
304026
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
304015
304027
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
304016
304028
  await core_frontend_1.NoRenderApp.startup({
304017
- applicationVersion: "4.10.0",
304029
+ applicationVersion: "4.10.1",
304018
304030
  applicationId: this.settings.gprid,
304019
304031
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
304020
304032
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -308737,8 +308749,7 @@ __webpack_require__.r(__webpack_exports__);
308737
308749
  /* harmony export */ });
308738
308750
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
308739
308751
  /* harmony import */ var _Content__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Content */ "../../presentation/common/lib/esm/presentation-common/content/Content.js");
308740
- /* harmony import */ var _TypeDescription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TypeDescription */ "../../presentation/common/lib/esm/presentation-common/content/TypeDescription.js");
308741
- /* harmony import */ var _Value__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Value */ "../../presentation/common/lib/esm/presentation-common/content/Value.js");
308752
+ /* harmony import */ var _Value__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Value */ "../../presentation/common/lib/esm/presentation-common/content/Value.js");
308742
308753
  /*---------------------------------------------------------------------------------------------
308743
308754
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
308744
308755
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -308749,7 +308760,6 @@ __webpack_require__.r(__webpack_exports__);
308749
308760
 
308750
308761
 
308751
308762
 
308752
-
308753
308763
  /** @internal */
308754
308764
  class ContentFormatter {
308755
308765
  constructor(_propertyValueFormatter, _unitSystem) {
@@ -308780,7 +308790,7 @@ class ContentFormatter {
308780
308790
  }
308781
308791
  // format display values of nested content field
308782
308792
  if (field.isNestedContentField()) {
308783
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(_Value__WEBPACK_IMPORTED_MODULE_3__.Value.isNestedContent(value));
308793
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(_Value__WEBPACK_IMPORTED_MODULE_2__.Value.isNestedContent(value));
308784
308794
  await this.formatNestedContentDisplayValues(value, field.nestedFields);
308785
308795
  continue;
308786
308796
  }
@@ -308799,11 +308809,11 @@ class ContentFormatter {
308799
308809
  }
308800
308810
  async formatPropertyValue(value, field) {
308801
308811
  if (field.isArrayPropertiesField()) {
308802
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(_Value__WEBPACK_IMPORTED_MODULE_3__.Value.isArray(value));
308812
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(_Value__WEBPACK_IMPORTED_MODULE_2__.Value.isArray(value));
308803
308813
  return this.formatArrayItems(value, field);
308804
308814
  }
308805
308815
  if (field.isStructPropertiesField()) {
308806
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(_Value__WEBPACK_IMPORTED_MODULE_3__.Value.isMap(value));
308816
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(_Value__WEBPACK_IMPORTED_MODULE_2__.Value.isMap(value));
308807
308817
  return this.formatStructMembers(value, field);
308808
308818
  }
308809
308819
  return this._propertyValueFormatter.formatPropertyValue(field, value, this._unitSystem);
@@ -308835,67 +308845,76 @@ class ContentPropertyValueFormatter {
308835
308845
  return formatDouble(rawValue);
308836
308846
  }
308837
308847
  : async (rawValue) => formatDouble(rawValue);
308838
- return this.formatValue(field.type, value, { doubleFormatter });
308848
+ return this.formatValue(field, value, { doubleFormatter });
308839
308849
  }
308840
- async formatValue(type, value, ctx) {
308841
- switch (type.valueFormat) {
308842
- case _TypeDescription__WEBPACK_IMPORTED_MODULE_2__.PropertyValueFormat.Primitive:
308843
- return this.formatPrimitiveValue(type, value, ctx);
308844
- case _TypeDescription__WEBPACK_IMPORTED_MODULE_2__.PropertyValueFormat.Array:
308845
- return this.formatArrayValue(type, value);
308846
- case _TypeDescription__WEBPACK_IMPORTED_MODULE_2__.PropertyValueFormat.Struct:
308847
- return this.formatStructValue(type, value);
308850
+ async formatValue(field, value, ctx) {
308851
+ if (field.isPropertiesField()) {
308852
+ if (field.isArrayPropertiesField()) {
308853
+ return this.formatArrayValue(field, value);
308854
+ }
308855
+ if (field.isStructPropertiesField()) {
308856
+ return this.formatStructValue(field, value);
308857
+ }
308848
308858
  }
308859
+ return this.formatPrimitiveValue(field, value, ctx);
308849
308860
  }
308850
- async formatPrimitiveValue(type, value, ctx) {
308861
+ async formatPrimitiveValue(field, value, ctx) {
308851
308862
  if (value === undefined) {
308852
308863
  return "";
308853
308864
  }
308854
308865
  const formatDoubleValue = async (raw) => (ctx ? ctx.doubleFormatter(raw) : formatDouble(raw));
308855
- if (type.typeName === "point2d" && isPoint2d(value)) {
308866
+ if (field.type.typeName === "point2d" && isPoint2d(value)) {
308856
308867
  return `X: ${await formatDoubleValue(value.x)}; Y: ${await formatDoubleValue(value.y)}`;
308857
308868
  }
308858
- if (type.typeName === "point3d" && isPoint3d(value)) {
308869
+ if (field.type.typeName === "point3d" && isPoint3d(value)) {
308859
308870
  return `X: ${await formatDoubleValue(value.x)}; Y: ${await formatDoubleValue(value.y)}; Z: ${await formatDoubleValue(value.z)}`;
308860
308871
  }
308861
- if (type.typeName === "dateTime") {
308872
+ if (field.type.typeName === "dateTime") {
308862
308873
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(typeof value === "string");
308863
308874
  return value;
308864
308875
  }
308865
- if (type.typeName === "bool" || type.typeName === "boolean") {
308876
+ if (field.type.typeName === "bool" || field.type.typeName === "boolean") {
308866
308877
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(typeof value === "boolean");
308867
308878
  return value ? "@Presentation:value.true@" : "@Presentation:value.false@";
308868
308879
  }
308869
- if (type.typeName === "int" || type.typeName === "long") {
308880
+ if (field.type.typeName === "int" || field.type.typeName === "long") {
308870
308881
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(isNumber(value));
308871
308882
  return value.toFixed(0);
308872
308883
  }
308873
- if (type.typeName === "double") {
308884
+ if (field.type.typeName === "double") {
308874
308885
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(isNumber(value));
308875
308886
  return formatDoubleValue(value);
308876
308887
  }
308877
- if (type.typeName === "navigation") {
308878
- (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(_Value__WEBPACK_IMPORTED_MODULE_3__.Value.isNavigationValue(value));
308888
+ if (field.type.typeName === "navigation") {
308889
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(_Value__WEBPACK_IMPORTED_MODULE_2__.Value.isNavigationValue(value));
308879
308890
  return value.label.displayValue;
308880
308891
  }
308892
+ if (field.type.typeName === "enum" && field.isPropertiesField()) {
308893
+ const defaultValue = !field.properties[0].property.enumerationInfo?.isStrict
308894
+ ? value.toString() // eslint-disable-line @typescript-eslint/no-base-to-string
308895
+ : undefined;
308896
+ return field.properties[0].property.enumerationInfo?.choices.find(({ value: enumValue }) => enumValue === value)?.label ?? defaultValue;
308897
+ }
308881
308898
  // eslint-disable-next-line @typescript-eslint/no-base-to-string
308882
308899
  return value.toString();
308883
308900
  }
308884
- async formatStructValue(type, value) {
308885
- if (!_Value__WEBPACK_IMPORTED_MODULE_3__.Value.isMap(value)) {
308901
+ async formatStructValue(field, value) {
308902
+ if (!_Value__WEBPACK_IMPORTED_MODULE_2__.Value.isMap(value)) {
308886
308903
  return {};
308887
308904
  }
308888
308905
  const formattedMember = {};
308889
- for (const member of type.members) {
308890
- formattedMember[member.name] = await this.formatValue(member.type, value[member.name]);
308906
+ for (const member of field.memberFields) {
308907
+ formattedMember[member.name] = await this.formatValue(member, value[member.name]);
308891
308908
  }
308892
308909
  return formattedMember;
308893
308910
  }
308894
- async formatArrayValue(type, value) {
308895
- if (!_Value__WEBPACK_IMPORTED_MODULE_3__.Value.isArray(value)) {
308911
+ async formatArrayValue(field, value) {
308912
+ if (!_Value__WEBPACK_IMPORTED_MODULE_2__.Value.isArray(value)) {
308896
308913
  return [];
308897
308914
  }
308898
- return Promise.all(value.map(async (arrayVal) => this.formatValue(type.memberType, arrayVal)));
308915
+ return Promise.all(value.map(async (arrayVal) => {
308916
+ return this.formatValue(field.itemsField, arrayVal);
308917
+ }));
308899
308918
  }
308900
308919
  }
308901
308920
  function formatDouble(value) {
@@ -331583,7 +331602,7 @@ function __disposeResources(env) {
331583
331602
  /***/ ((module) => {
331584
331603
 
331585
331604
  "use strict";
331586
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.10.0","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 ES2020 --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 --includes=../../generated-docs/extract --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:^4.10.0","@itwin/core-bentley":"workspace:^4.10.0","@itwin/core-common":"workspace:^4.10.0","@itwin/core-geometry":"workspace:^4.10.0","@itwin/core-orbitgt":"workspace:^4.10.0","@itwin/core-quantity":"workspace:^4.10.0"},"//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.76.0"},"//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/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"}}');
331605
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.10.1","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 ES2020 --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:^4.10.1","@itwin/core-bentley":"workspace:^4.10.1","@itwin/core-common":"workspace:^4.10.1","@itwin/core-geometry":"workspace:^4.10.1","@itwin/core-orbitgt":"workspace:^4.10.1","@itwin/core-quantity":"workspace:^4.10.1"},"//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.76.0"},"//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/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"}}');
331587
331606
 
331588
331607
  /***/ }),
331589
331608
 
@@ -332502,7 +332521,7 @@ describe("Snapping", () => {
332502
332521
  }
332503
332522
  catch (err) {
332504
332523
  // This is what we expect if the cancellation occurs in time to really cancel the snap.
332505
- expect(err.message).to.equal("aborted");
332524
+ expect(err.message).to.equal("Unknown server response code.");
332506
332525
  }
332507
332526
  });
332508
332527
  });