@itwin/ecschema-rpcinterface-tests 5.16.0-dev.5 → 5.16.0-dev.7
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 +42 -23
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +16 -15
|
@@ -5394,9 +5394,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
5394
5394
|
|
|
5395
5395
|
/***/ },
|
|
5396
5396
|
|
|
5397
|
-
/***/ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@
|
|
5397
|
+
/***/ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@6.2_e7b0f93268ba392b62030a9909ee634e/node_modules/@itwin/oidc-signin-tool/lib/cjs/TestFrontendAuthorizationClient.js"
|
|
5398
5398
|
/*!*****************************************************************************************************************************************************************************************!*\
|
|
5399
|
-
!*** ../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@
|
|
5399
|
+
!*** ../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@6.2_e7b0f93268ba392b62030a9909ee634e/node_modules/@itwin/oidc-signin-tool/lib/cjs/TestFrontendAuthorizationClient.js ***!
|
|
5400
5400
|
\*****************************************************************************************************************************************************************************************/
|
|
5401
5401
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5402
5402
|
|
|
@@ -5451,9 +5451,9 @@ exports.TestFrontendAuthorizationClient = TestFrontendAuthorizationClient;
|
|
|
5451
5451
|
|
|
5452
5452
|
/***/ },
|
|
5453
5453
|
|
|
5454
|
-
/***/ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@
|
|
5454
|
+
/***/ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@6.2_e7b0f93268ba392b62030a9909ee634e/node_modules/@itwin/oidc-signin-tool/lib/cjs/TestUsers.js"
|
|
5455
5455
|
/*!*******************************************************************************************************************************************************************!*\
|
|
5456
|
-
!*** ../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@
|
|
5456
|
+
!*** ../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@6.2_e7b0f93268ba392b62030a9909ee634e/node_modules/@itwin/oidc-signin-tool/lib/cjs/TestUsers.js ***!
|
|
5457
5457
|
\*******************************************************************************************************************************************************************/
|
|
5458
5458
|
(__unused_webpack_module, exports) {
|
|
5459
5459
|
|
|
@@ -5539,9 +5539,9 @@ exports.TestUsers = TestUsers;
|
|
|
5539
5539
|
|
|
5540
5540
|
/***/ },
|
|
5541
5541
|
|
|
5542
|
-
/***/ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@
|
|
5542
|
+
/***/ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@6.2_e7b0f93268ba392b62030a9909ee634e/node_modules/@itwin/oidc-signin-tool/lib/cjs/certa/certaCommon.js"
|
|
5543
5543
|
/*!***************************************************************************************************************************************************************************!*\
|
|
5544
|
-
!*** ../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@
|
|
5544
|
+
!*** ../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@6.2_e7b0f93268ba392b62030a9909ee634e/node_modules/@itwin/oidc-signin-tool/lib/cjs/certa/certaCommon.js ***!
|
|
5545
5545
|
\***************************************************************************************************************************************************************************/
|
|
5546
5546
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5547
5547
|
|
|
@@ -5577,9 +5577,9 @@ async function getServiceAuthTokenFromBackend(oidcConfig) {
|
|
|
5577
5577
|
|
|
5578
5578
|
/***/ },
|
|
5579
5579
|
|
|
5580
|
-
/***/ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@
|
|
5580
|
+
/***/ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@6.2_e7b0f93268ba392b62030a9909ee634e/node_modules/@itwin/oidc-signin-tool/lib/cjs/frontend.js"
|
|
5581
5581
|
/*!******************************************************************************************************************************************************************!*\
|
|
5582
|
-
!*** ../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@
|
|
5582
|
+
!*** ../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@6.2_e7b0f93268ba392b62030a9909ee634e/node_modules/@itwin/oidc-signin-tool/lib/cjs/frontend.js ***!
|
|
5583
5583
|
\******************************************************************************************************************************************************************/
|
|
5584
5584
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5585
5585
|
|
|
@@ -5604,9 +5604,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
5604
5604
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
5605
5605
|
};
|
|
5606
5606
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5607
|
-
__exportStar(__webpack_require__(/*! ./TestUsers */ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@
|
|
5608
|
-
__exportStar(__webpack_require__(/*! ./TestFrontendAuthorizationClient */ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@
|
|
5609
|
-
__exportStar(__webpack_require__(/*! ./certa/certaCommon */ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@
|
|
5607
|
+
__exportStar(__webpack_require__(/*! ./TestUsers */ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@6.2_e7b0f93268ba392b62030a9909ee634e/node_modules/@itwin/oidc-signin-tool/lib/cjs/TestUsers.js"), exports);
|
|
5608
|
+
__exportStar(__webpack_require__(/*! ./TestFrontendAuthorizationClient */ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@6.2_e7b0f93268ba392b62030a9909ee634e/node_modules/@itwin/oidc-signin-tool/lib/cjs/TestFrontendAuthorizationClient.js"), exports);
|
|
5609
|
+
__exportStar(__webpack_require__(/*! ./certa/certaCommon */ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@6.2_e7b0f93268ba392b62030a9909ee634e/node_modules/@itwin/oidc-signin-tool/lib/cjs/certa/certaCommon.js"), exports);
|
|
5610
5610
|
//# sourceMappingURL=frontend.js.map
|
|
5611
5611
|
|
|
5612
5612
|
/***/ },
|
|
@@ -28306,9 +28306,9 @@ class QueryOptionsBuilder {
|
|
|
28306
28306
|
return this;
|
|
28307
28307
|
}
|
|
28308
28308
|
/**
|
|
28309
|
-
* By default
|
|
28309
|
+
* By default blobs are not abbreviated and all blob data is returned by query as is. If set to true, blobs are abbreviated to save memory and network bandwidth.
|
|
28310
28310
|
* Use @type BlobReader to access blob data more efficiently.
|
|
28311
|
-
* @param val A boolean value, if set to
|
|
28311
|
+
* @param val A boolean value, if set to true will abbreviate blob type property data instead of returning it in full. Returning complete blob data could cost time and network bandwidth.
|
|
28312
28312
|
* @returns @type QueryOptionsBuilder for fluent interface.
|
|
28313
28313
|
*/
|
|
28314
28314
|
setAbbreviateBlobs(val) {
|
|
@@ -97495,6 +97495,8 @@ class RealityDataSourceTilesetUrlImpl {
|
|
|
97495
97495
|
_baseUrl = "";
|
|
97496
97496
|
/** Need to be passed down to child tile requests when requesting from blob storage, e.g. a Cesium export from the Mesh Export Service*/
|
|
97497
97497
|
_searchParams = "";
|
|
97498
|
+
/** Origin of the root tileset URL. `_searchParams` are only forwarded to this origin. */
|
|
97499
|
+
_origin;
|
|
97498
97500
|
/** Construct a new reality data source.
|
|
97499
97501
|
* @param props JSON representation of the reality data source
|
|
97500
97502
|
*/
|
|
@@ -97543,6 +97545,7 @@ class RealityDataSourceTilesetUrlImpl {
|
|
|
97543
97545
|
const urlParts = url.split("/");
|
|
97544
97546
|
const newUrl = new URL(url);
|
|
97545
97547
|
this._searchParams = newUrl.search;
|
|
97548
|
+
this._origin = newUrl.origin;
|
|
97546
97549
|
urlParts.pop();
|
|
97547
97550
|
if (urlParts.length === 0)
|
|
97548
97551
|
this._baseUrl = "";
|
|
@@ -97576,10 +97579,13 @@ class RealityDataSourceTilesetUrlImpl {
|
|
|
97576
97579
|
/** Returns the tile URL.
|
|
97577
97580
|
* If the tile path is a relative URL, the base URL is prepended to it.
|
|
97578
97581
|
* 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.
|
|
97582
|
+
* The base URL's search params (which may contain credentials such as a SAS token) are never appended to an absolute URL on a different origin.
|
|
97579
97583
|
*/
|
|
97580
97584
|
getTileUrl(tilePath) {
|
|
97581
97585
|
if (this.isValidURL(tilePath)) {
|
|
97582
97586
|
const url = new URL(tilePath);
|
|
97587
|
+
if (url.origin !== this._origin)
|
|
97588
|
+
return tilePath;
|
|
97583
97589
|
return url.search === "" ? `${tilePath}${this._searchParams}` : tilePath;
|
|
97584
97590
|
}
|
|
97585
97591
|
return tilePath.includes("?") ? `${this._baseUrl}${tilePath}` : `${this._baseUrl}${tilePath}${this._searchParams}`;
|
|
@@ -117581,6 +117587,9 @@ class RealityDataSourceGoogle3dTilesImpl {
|
|
|
117581
117587
|
// We also do not need to worry about the tile path starting with a slash.
|
|
117582
117588
|
// This happens in these tiles at the second .json level, but the URL API will handle that for us.
|
|
117583
117589
|
const url = new URL(tilePath, this._baseUrl);
|
|
117590
|
+
// Never forward the API key or session params to a different origin.
|
|
117591
|
+
if (!this.isSameOrigin(url))
|
|
117592
|
+
return url.toString();
|
|
117584
117593
|
// If tile is a reference to a tileset, iterate over tileset url's search params and store them in this._searchParams so we can pass them down to children
|
|
117585
117594
|
if (this.getTileContentType(url.toString()) === "tileset" && url.searchParams.size !== 0) {
|
|
117586
117595
|
for (const [key, value] of url.searchParams.entries()) {
|
|
@@ -117600,15 +117609,20 @@ class RealityDataSourceGoogle3dTilesImpl {
|
|
|
117600
117609
|
}
|
|
117601
117610
|
return newUrl.toString();
|
|
117602
117611
|
}
|
|
117612
|
+
/** Returns true if `url` has the same origin as the root tileset. Credentials are only sent to that origin. */
|
|
117613
|
+
isSameOrigin(url) {
|
|
117614
|
+
return new URL(url).origin === this._baseUrl;
|
|
117615
|
+
}
|
|
117603
117616
|
/**
|
|
117604
117617
|
* Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.
|
|
117605
117618
|
*/
|
|
117606
117619
|
async getTileContent(name) {
|
|
117620
|
+
const url = this.getTileUrl(name);
|
|
117607
117621
|
let authToken;
|
|
117608
|
-
if (this._getAuthToken) {
|
|
117622
|
+
if (this._getAuthToken && this.isSameOrigin(url)) {
|
|
117609
117623
|
authToken = await this._getAuthToken();
|
|
117610
117624
|
}
|
|
117611
|
-
return (0,_request_Request__WEBPACK_IMPORTED_MODULE_2__.request)(
|
|
117625
|
+
return (0,_request_Request__WEBPACK_IMPORTED_MODULE_2__.request)(url, "arraybuffer", authToken ? {
|
|
117612
117626
|
headers: {
|
|
117613
117627
|
authorization: `Bearer ${authToken}`
|
|
117614
117628
|
}
|
|
@@ -117618,11 +117632,12 @@ class RealityDataSourceGoogle3dTilesImpl {
|
|
|
117618
117632
|
* Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.
|
|
117619
117633
|
*/
|
|
117620
117634
|
async getTileJson(name) {
|
|
117635
|
+
const url = this.getTileUrl(name);
|
|
117621
117636
|
let authToken;
|
|
117622
|
-
if (this._getAuthToken) {
|
|
117637
|
+
if (this._getAuthToken && this.isSameOrigin(url)) {
|
|
117623
117638
|
authToken = await this._getAuthToken();
|
|
117624
117639
|
}
|
|
117625
|
-
return (0,_request_Request__WEBPACK_IMPORTED_MODULE_2__.request)(
|
|
117640
|
+
return (0,_request_Request__WEBPACK_IMPORTED_MODULE_2__.request)(url, "json", authToken ? {
|
|
117626
117641
|
headers: {
|
|
117627
117642
|
authorization: `Bearer ${authToken}`
|
|
117628
117643
|
}
|
|
@@ -156743,7 +156758,7 @@ class RealityTileLoader {
|
|
|
156743
156758
|
/** The base URL the glTF reader should resolve relatively-referenced resources (e.g. external images) against.
|
|
156744
156759
|
* Prefer the tile's own content URL so that images referenced relative to the content (typical of JSON `.gltf` tiles)
|
|
156745
156760
|
* resolve correctly, rather than against the tileset root. The tileset's query/authentication parameters (e.g.
|
|
156746
|
-
* `?sig=abc`) are preserved on the returned URL: the data source appends them to every tile request, and the glTF
|
|
156761
|
+
* `?sig=abc`) are preserved on the returned URL when it shares the tileset's origin: the data source appends them to every tile request, and the glTF
|
|
156747
156762
|
* reader re-applies the base URL's query string to each relatively-referenced resource (see `GltfReader.resolveUrl`),
|
|
156748
156763
|
* so external resources must be fetched with the same parameters.
|
|
156749
156764
|
*/
|
|
@@ -156754,8 +156769,10 @@ class RealityTileLoader {
|
|
|
156754
156769
|
return tile.contentUrl;
|
|
156755
156770
|
try {
|
|
156756
156771
|
const resolved = new URL(tile.contentUrl, treeBaseUrl);
|
|
156757
|
-
|
|
156758
|
-
|
|
156772
|
+
const base = new URL(treeBaseUrl);
|
|
156773
|
+
// Only inherit the tileset's query (which may contain credentials) on the tileset's own origin.
|
|
156774
|
+
if ("" === resolved.search && resolved.origin === base.origin)
|
|
156775
|
+
resolved.search = base.search;
|
|
156759
156776
|
return resolved.toString();
|
|
156760
156777
|
}
|
|
156761
156778
|
catch {
|
|
@@ -168149,7 +168166,9 @@ class GltfReader {
|
|
|
168149
168166
|
resolveUrl(uri) {
|
|
168150
168167
|
try {
|
|
168151
168168
|
const resolved = new URL(uri, this._baseUrl);
|
|
168152
|
-
|
|
168169
|
+
// Only forward the base URL's query (which may contain credentials) to the same origin.
|
|
168170
|
+
if (this._baseUrl && resolved.origin === this._baseUrl.origin)
|
|
168171
|
+
resolved.search = this._baseUrl.search;
|
|
168153
168172
|
return resolved.toString();
|
|
168154
168173
|
}
|
|
168155
168174
|
catch {
|
|
@@ -324638,7 +324657,7 @@ exports.TestContext = void 0;
|
|
|
324638
324657
|
const chai_1 = __webpack_require__(/*! chai */ "../../common/temp/node_modules/.pnpm/chai@4.5.0/node_modules/chai/index.js");
|
|
324639
324658
|
const core_bentley_1 = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
324640
324659
|
const core_frontend_1 = __webpack_require__(/*! @itwin/core-frontend */ "../../core/frontend/lib/esm/core-frontend.js");
|
|
324641
|
-
const frontend_1 = __webpack_require__(/*! @itwin/oidc-signin-tool/lib/cjs/frontend */ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@
|
|
324660
|
+
const frontend_1 = __webpack_require__(/*! @itwin/oidc-signin-tool/lib/cjs/frontend */ "../../common/temp/node_modules/.pnpm/@itwin+oidc-signin-tool@6.2_e7b0f93268ba392b62030a9909ee634e/node_modules/@itwin/oidc-signin-tool/lib/cjs/frontend.js");
|
|
324642
324661
|
const Settings_1 = __webpack_require__(/*! ../../common/Settings */ "./lib/common/Settings.js");
|
|
324643
324662
|
const SideChannels_1 = __webpack_require__(/*! ../../common/SideChannels */ "./lib/common/SideChannels.js");
|
|
324644
324663
|
const IModelSession_1 = __webpack_require__(/*! ./IModelSession */ "./lib/frontend/setup/IModelSession.js");
|
|
@@ -338186,7 +338205,7 @@ class WMS {
|
|
|
338186
338205
|
(module) {
|
|
338187
338206
|
|
|
338188
338207
|
"use strict";
|
|
338189
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.16.0-dev.
|
|
338208
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.16.0-dev.7","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 build: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: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 build:test-worker && vitest --run","cover":"npm run build:test-worker && vitest --run","build:test-worker":"vite build --config ./src/test/worker/vite.config.mts 1>&2","build:workers":"rimraf lib/workers/webpack && vite build --config ./src/workers/ImdlParser/vite.config.mts 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":"catalog:schemas","@bentley/formats-schema":"catalog:schemas","@bentley/units-schema":"catalog:schemas","@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":"catalog:imodels-clients","@itwin/eslint-plugin":"catalog:linting","@types/node":"catalog:build","@types/sinon":"catalog:testing","@vitest/browser-playwright":"catalog:testing","@vitest/coverage-v8":"catalog:testing","cpx2":"catalog:build","eslint":"catalog:linting","playwright":"catalog:testing","rimraf":"catalog:build","sinon":"catalog:testing","typescript":"catalog:build","vite":"catalog:bundling","vitest":"catalog:testing"},"//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.4.5","@loaders.gl/draco":"^4.4.5","fuse.js":"^3.3.0","wms-capabilities":"0.6.0"}}');
|
|
338190
338209
|
|
|
338191
338210
|
/***/ },
|
|
338192
338211
|
|