@itwin/rpcinterface-full-stack-tests 3.4.0-dev.3 → 3.4.0-dev.30
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/{_b43d.bundled-tests.js → _c5fe.bundled-tests.js} +3 -3
- package/lib/dist/_c5fe.bundled-tests.js.map +1 -0
- package/lib/dist/bundled-tests.js +275 -223
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/{vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_6_node_modules_loaders_gl_draco_di-b6a763.bundled-tests.js → vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_7_node_modules_loaders_gl_draco_di-a586d9.bundled-tests.js} +67 -67
- package/lib/dist/{vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_6_node_modules_loaders_gl_draco_di-b6a763.bundled-tests.js.map → vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_7_node_modules_loaders_gl_draco_di-a586d9.bundled-tests.js.map} +1 -1
- package/lib/frontend/workflows/BasicScenarios.test.js +0 -52
- package/lib/frontend/workflows/BasicScenarios.test.js.map +1 -1
- package/package.json +14 -14
- package/lib/dist/_b43d.bundled-tests.js.map +0 -1
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
|
|
22
22
|
/***/ }),
|
|
23
23
|
|
|
24
|
-
/***/ "../../common/temp/node_modules/.pnpm/@itwin+certa@3.
|
|
24
|
+
/***/ "../../common/temp/node_modules/.pnpm/@itwin+certa@3.3.0/node_modules/@itwin/certa/lib/utils/CallbackUtils.js":
|
|
25
25
|
/*!********************************************************************************************************************!*\
|
|
26
|
-
!*** ../../common/temp/node_modules/.pnpm/@itwin+certa@3.
|
|
26
|
+
!*** ../../common/temp/node_modules/.pnpm/@itwin+certa@3.3.0/node_modules/@itwin/certa/lib/utils/CallbackUtils.js ***!
|
|
27
27
|
\********************************************************************************************************************/
|
|
28
28
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
29
29
|
|
|
@@ -2296,7 +2296,7 @@ exports.getAccessTokenFromBackend = exports.getTokenCallbackName = void 0;
|
|
|
2296
2296
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
2297
2297
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
2298
2298
|
*--------------------------------------------------------------------------------------------*/
|
|
2299
|
-
const CallbackUtils_1 = __webpack_require__(/*! @itwin/certa/lib/utils/CallbackUtils */ "../../common/temp/node_modules/.pnpm/@itwin+certa@3.
|
|
2299
|
+
const CallbackUtils_1 = __webpack_require__(/*! @itwin/certa/lib/utils/CallbackUtils */ "../../common/temp/node_modules/.pnpm/@itwin+certa@3.3.0/node_modules/@itwin/certa/lib/utils/CallbackUtils.js");
|
|
2300
2300
|
// Shared by both the frontend and backend side of the tests
|
|
2301
2301
|
exports.getTokenCallbackName = "getToken";
|
|
2302
2302
|
async function getAccessTokenFromBackend(user, oidcConfig) {
|
|
@@ -21236,9 +21236,9 @@ module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
|
|
|
21236
21236
|
|
|
21237
21237
|
/***/ }),
|
|
21238
21238
|
|
|
21239
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.
|
|
21239
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.5/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js":
|
|
21240
21240
|
/*!****************************************************************************************************************************************************************************!*\
|
|
21241
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.
|
|
21241
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.5/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js ***!
|
|
21242
21242
|
\****************************************************************************************************************************************************************************/
|
|
21243
21243
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
21244
21244
|
|
|
@@ -21273,12 +21273,12 @@ var serializeCookie = function serializeCookie(name, val, options) {
|
|
|
21273
21273
|
var opt = options || {};
|
|
21274
21274
|
opt.path = opt.path || '/';
|
|
21275
21275
|
var value = encodeURIComponent(val);
|
|
21276
|
-
var str = name
|
|
21276
|
+
var str = "".concat(name, "=").concat(value);
|
|
21277
21277
|
|
|
21278
21278
|
if (opt.maxAge > 0) {
|
|
21279
21279
|
var maxAge = opt.maxAge - 0;
|
|
21280
|
-
if (isNaN(maxAge)) throw new Error('maxAge should be a Number');
|
|
21281
|
-
str +=
|
|
21280
|
+
if (Number.isNaN(maxAge)) throw new Error('maxAge should be a Number');
|
|
21281
|
+
str += "; Max-Age=".concat(Math.floor(maxAge));
|
|
21282
21282
|
}
|
|
21283
21283
|
|
|
21284
21284
|
if (opt.domain) {
|
|
@@ -21286,7 +21286,7 @@ var serializeCookie = function serializeCookie(name, val, options) {
|
|
|
21286
21286
|
throw new TypeError('option domain is invalid');
|
|
21287
21287
|
}
|
|
21288
21288
|
|
|
21289
|
-
str +=
|
|
21289
|
+
str += "; Domain=".concat(opt.domain);
|
|
21290
21290
|
}
|
|
21291
21291
|
|
|
21292
21292
|
if (opt.path) {
|
|
@@ -21294,7 +21294,7 @@ var serializeCookie = function serializeCookie(name, val, options) {
|
|
|
21294
21294
|
throw new TypeError('option path is invalid');
|
|
21295
21295
|
}
|
|
21296
21296
|
|
|
21297
|
-
str +=
|
|
21297
|
+
str += "; Path=".concat(opt.path);
|
|
21298
21298
|
}
|
|
21299
21299
|
|
|
21300
21300
|
if (opt.expires) {
|
|
@@ -21302,7 +21302,7 @@ var serializeCookie = function serializeCookie(name, val, options) {
|
|
|
21302
21302
|
throw new TypeError('option expires is invalid');
|
|
21303
21303
|
}
|
|
21304
21304
|
|
|
21305
|
-
str +=
|
|
21305
|
+
str += "; Expires=".concat(opt.expires.toUTCString());
|
|
21306
21306
|
}
|
|
21307
21307
|
|
|
21308
21308
|
if (opt.httpOnly) str += '; HttpOnly';
|
|
@@ -21352,7 +21352,7 @@ var cookie = {
|
|
|
21352
21352
|
document.cookie = serializeCookie(name, encodeURIComponent(value), cookieOptions);
|
|
21353
21353
|
},
|
|
21354
21354
|
read: function read(name) {
|
|
21355
|
-
var nameEQ = name
|
|
21355
|
+
var nameEQ = "".concat(name, "=");
|
|
21356
21356
|
var ca = document.cookie.split(';');
|
|
21357
21357
|
|
|
21358
21358
|
for (var i = 0; i < ca.length; i++) {
|
|
@@ -21562,21 +21562,16 @@ var path = {
|
|
|
21562
21562
|
var subdomain = {
|
|
21563
21563
|
name: 'subdomain',
|
|
21564
21564
|
lookup: function lookup(options) {
|
|
21565
|
-
|
|
21565
|
+
// If given get the subdomain index else 1
|
|
21566
|
+
var lookupFromSubdomainIndex = typeof options.lookupFromSubdomainIndex === 'number' ? options.lookupFromSubdomainIndex + 1 : 1; // get all matches if window.location. is existing
|
|
21567
|
+
// first item of match is the match itself and the second is the first group macht which sould be the first subdomain match
|
|
21568
|
+
// is the hostname no public domain get the or option of localhost
|
|
21566
21569
|
|
|
21567
|
-
|
|
21568
|
-
var language = window.location.href.match(/(?:http[s]*\:\/\/)*(.*?)\.(?=[^\/]*\..{2,5})/gi);
|
|
21570
|
+
var language = typeof window !== 'undefined' && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i); // if there is no match (null) return undefined
|
|
21569
21571
|
|
|
21570
|
-
|
|
21571
|
-
if (typeof options.lookupFromSubdomainIndex === 'number') {
|
|
21572
|
-
found = language[options.lookupFromSubdomainIndex].replace('http://', '').replace('https://', '').replace('.', '');
|
|
21573
|
-
} else {
|
|
21574
|
-
found = language[0].replace('http://', '').replace('https://', '').replace('.', '');
|
|
21575
|
-
}
|
|
21576
|
-
}
|
|
21577
|
-
}
|
|
21572
|
+
if (!language) return undefined; // return the given group match
|
|
21578
21573
|
|
|
21579
|
-
return
|
|
21574
|
+
return language[lookupFromSubdomainIndex];
|
|
21580
21575
|
}
|
|
21581
21576
|
};
|
|
21582
21577
|
|
|
@@ -21589,8 +21584,8 @@ function getDefaults() {
|
|
|
21589
21584
|
lookupSessionStorage: 'i18nextLng',
|
|
21590
21585
|
// cache user language
|
|
21591
21586
|
caches: ['localStorage'],
|
|
21592
|
-
excludeCacheFor: ['cimode'] //cookieMinutes: 10,
|
|
21593
|
-
//cookieDomain: 'myDomain'
|
|
21587
|
+
excludeCacheFor: ['cimode'] // cookieMinutes: 10,
|
|
21588
|
+
// cookieDomain: 'myDomain'
|
|
21594
21589
|
|
|
21595
21590
|
};
|
|
21596
21591
|
}
|
|
@@ -61497,7 +61492,7 @@ class StopWatch {
|
|
|
61497
61492
|
get current() { return BeDuration.fromMilliseconds(BeTimePoint.now().milliseconds - (!!this._start ? this._start.milliseconds : 0)); }
|
|
61498
61493
|
/** Get the elapsed time, in seconds, since start() on a running timer. */
|
|
61499
61494
|
get currentSeconds() { return this.current.seconds; }
|
|
61500
|
-
/** Get the elapsed time between start() and stop() on this timer. */
|
|
61495
|
+
/** Get the elapsed time between start() and stop() on this timer in milliseconds. */
|
|
61501
61496
|
get elapsed() { return BeDuration.fromMilliseconds((!!this._stop ? this._stop.milliseconds : BeTimePoint.now().milliseconds) - (!!this._start ? this._start.milliseconds : 0)); }
|
|
61502
61497
|
/** Get the elapsed time, in seconds, between start() and stop() on this timer. */
|
|
61503
61498
|
get elapsedSeconds() { return this.elapsed.seconds; }
|
|
@@ -61636,7 +61631,10 @@ class Tracing {
|
|
|
61636
61631
|
static withOpenTelemetry(base, isError = false) {
|
|
61637
61632
|
return (category, message, metaData) => {
|
|
61638
61633
|
var _a, _b;
|
|
61639
|
-
|
|
61634
|
+
try {
|
|
61635
|
+
(_b = (_a = Tracing._openTelemetry) === null || _a === void 0 ? void 0 : _a.trace.getSpan(Tracing._openTelemetry.context.active())) === null || _b === void 0 ? void 0 : _b.addEvent(message, { ...flattenObject(_Logger__WEBPACK_IMPORTED_MODULE_0__.Logger.getMetaData(metaData)), error: isError });
|
|
61636
|
+
}
|
|
61637
|
+
catch (_e) { } // avoid throwing random errors (with stack trace mangled by async hooks) when openTelemetry collector doesn't work
|
|
61640
61638
|
base(category, message, metaData);
|
|
61641
61639
|
};
|
|
61642
61640
|
}
|
|
@@ -63282,7 +63280,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
63282
63280
|
* @module Codes
|
|
63283
63281
|
*/
|
|
63284
63282
|
|
|
63285
|
-
/**
|
|
63283
|
+
/**
|
|
63284
|
+
* A three-part structure containing information about the [Code]($docs/bis/guide/fundamentals/codes) of an Element
|
|
63286
63285
|
* @public
|
|
63287
63286
|
*/
|
|
63288
63287
|
class Code {
|
|
@@ -68933,12 +68932,21 @@ var Gradient;
|
|
|
68933
68932
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== imageBuffer);
|
|
68934
68933
|
return imageBuffer;
|
|
68935
68934
|
}
|
|
68936
|
-
/**
|
|
68935
|
+
/** Produces a bitmap image from this gradient.
|
|
68937
68936
|
* @param width Width of the image
|
|
68938
68937
|
* @param height Height of the image
|
|
68939
|
-
* @
|
|
68938
|
+
* @note If this gradient uses [[Gradient.Mode.Thematic]], then the width of the image will be 1 and the margin color will be included in the top and bottom rows.
|
|
68939
|
+
* @see [[produceImage]] for more customization.
|
|
68940
68940
|
*/
|
|
68941
68941
|
getImage(width, height) {
|
|
68942
|
+
if (this.mode === Mode.Thematic)
|
|
68943
|
+
width = 1;
|
|
68944
|
+
return this.produceImage({ width, height, includeThematicMargin: true });
|
|
68945
|
+
}
|
|
68946
|
+
/** Produces a bitmap image from this gradient. */
|
|
68947
|
+
produceImage(args) {
|
|
68948
|
+
var _a;
|
|
68949
|
+
const { width, height, includeThematicMargin } = { ...args };
|
|
68942
68950
|
const thisAngle = (this.angle === undefined) ? 0 : this.angle.radians;
|
|
68943
68951
|
const cosA = Math.cos(thisAngle);
|
|
68944
68952
|
const sinA = Math.sin(thisAngle);
|
|
@@ -69044,27 +69052,29 @@ var Gradient;
|
|
|
69044
69052
|
break;
|
|
69045
69053
|
}
|
|
69046
69054
|
case Mode.Thematic: {
|
|
69047
|
-
|
|
69048
|
-
if (settings === undefined) {
|
|
69049
|
-
settings = _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientSettings.defaults;
|
|
69050
|
-
}
|
|
69055
|
+
const settings = (_a = this.thematicSettings) !== null && _a !== void 0 ? _a : _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientSettings.defaults;
|
|
69051
69056
|
for (let j = 0; j < height; j++) {
|
|
69052
69057
|
let f = 1 - j / height;
|
|
69053
69058
|
let color;
|
|
69054
|
-
|
|
69055
|
-
|
|
69056
|
-
|
|
69057
|
-
|
|
69058
|
-
|
|
69059
|
-
|
|
69060
|
-
|
|
69061
|
-
|
|
69059
|
+
if (includeThematicMargin && (f < _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientSettings.margin || f > _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientSettings.contentMax)) {
|
|
69060
|
+
color = settings.marginColor;
|
|
69061
|
+
}
|
|
69062
|
+
else {
|
|
69063
|
+
f = (f - _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientSettings.margin) / (_ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientSettings.contentRange);
|
|
69064
|
+
switch (settings.mode) {
|
|
69065
|
+
case _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientMode.SteppedWithDelimiter:
|
|
69066
|
+
case _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientMode.IsoLines:
|
|
69067
|
+
case _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientMode.Stepped: {
|
|
69068
|
+
if (settings.stepCount > 1) {
|
|
69069
|
+
const fStep = Math.floor(f * settings.stepCount - 0.00001) / (settings.stepCount - 1);
|
|
69070
|
+
color = this.mapColor(fStep);
|
|
69071
|
+
}
|
|
69072
|
+
break;
|
|
69062
69073
|
}
|
|
69063
|
-
|
|
69074
|
+
case _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientMode.Smooth:
|
|
69075
|
+
color = this.mapColor(f);
|
|
69076
|
+
break;
|
|
69064
69077
|
}
|
|
69065
|
-
case _ThematicDisplay__WEBPACK_IMPORTED_MODULE_4__.ThematicGradientMode.Smooth:
|
|
69066
|
-
color = this.mapColor(f);
|
|
69067
|
-
break;
|
|
69068
69078
|
}
|
|
69069
69079
|
for (let i = 0; i < width; i++) {
|
|
69070
69080
|
image[currentIdx--] = color.getAlpha();
|
|
@@ -86791,6 +86801,7 @@ class IpcWebSocketBackend extends IpcWebSocket {
|
|
|
86791
86801
|
constructor() {
|
|
86792
86802
|
super();
|
|
86793
86803
|
this._handlers = new Map();
|
|
86804
|
+
this._processingQueue = [];
|
|
86794
86805
|
IpcWebSocket.receivers.add(async (e, m) => this.dispatch(e, m));
|
|
86795
86806
|
}
|
|
86796
86807
|
send(channel, ...data) {
|
|
@@ -86804,22 +86815,35 @@ class IpcWebSocketBackend extends IpcWebSocket {
|
|
|
86804
86815
|
};
|
|
86805
86816
|
}
|
|
86806
86817
|
async dispatch(_evt, message) {
|
|
86807
|
-
if (message.type !== IpcWebSocketMessageType.Invoke
|
|
86818
|
+
if (message.type !== IpcWebSocketMessageType.Invoke)
|
|
86808
86819
|
return;
|
|
86809
|
-
|
|
86810
|
-
|
|
86820
|
+
this._processingQueue.push(message);
|
|
86821
|
+
await this.processMessages();
|
|
86822
|
+
}
|
|
86823
|
+
async processMessages() {
|
|
86824
|
+
if (this._processing || !this._processingQueue.length) {
|
|
86811
86825
|
return;
|
|
86812
|
-
|
|
86813
|
-
|
|
86814
|
-
|
|
86815
|
-
|
|
86816
|
-
|
|
86817
|
-
|
|
86818
|
-
|
|
86819
|
-
|
|
86820
|
-
|
|
86821
|
-
|
|
86822
|
-
|
|
86826
|
+
}
|
|
86827
|
+
const message = this._processingQueue.shift();
|
|
86828
|
+
if (message && message.method) {
|
|
86829
|
+
const handler = this._handlers.get(message.channel);
|
|
86830
|
+
if (handler) {
|
|
86831
|
+
this._processing = message;
|
|
86832
|
+
let args = message.data;
|
|
86833
|
+
if (typeof (args) === "undefined")
|
|
86834
|
+
args = [];
|
|
86835
|
+
const response = await handler({}, message.method, ...args);
|
|
86836
|
+
IpcWebSocket.transport.send({
|
|
86837
|
+
type: IpcWebSocketMessageType.Response,
|
|
86838
|
+
channel: message.channel,
|
|
86839
|
+
response: message.request,
|
|
86840
|
+
data: response,
|
|
86841
|
+
sequence: -1,
|
|
86842
|
+
});
|
|
86843
|
+
this._processing = undefined;
|
|
86844
|
+
}
|
|
86845
|
+
}
|
|
86846
|
+
await this.processMessages();
|
|
86823
86847
|
}
|
|
86824
86848
|
}
|
|
86825
86849
|
|
|
@@ -89923,6 +89947,9 @@ class BentleyCloudRpcProtocol extends _WebAppRpcProtocol__WEBPACK_IMPORTED_MODUL
|
|
|
89923
89947
|
const components = url.pathname.split("/").filter((x) => x); // filter out empty segments
|
|
89924
89948
|
const operationComponent = components.slice(-1)[0];
|
|
89925
89949
|
const encodedRequest = url.searchParams.get("parameters") || "";
|
|
89950
|
+
// The encodedRequest should be base64 - fail now if any other characters detected.
|
|
89951
|
+
if (/[^A-z0-9=+\/]/.test(encodedRequest))
|
|
89952
|
+
throw new _IModelError__WEBPACK_IMPORTED_MODULE_1__.IModelError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR, `Invalid request: Malformed URL parameters detected.`);
|
|
89926
89953
|
const firstHyphen = operationComponent.indexOf("-");
|
|
89927
89954
|
const lastHyphen = operationComponent.lastIndexOf("-");
|
|
89928
89955
|
const interfaceDefinition = operationComponent.slice(0, firstHyphen);
|
|
@@ -90314,11 +90341,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
90314
90341
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
90315
90342
|
/* harmony export */ "WebAppRpcProtocol": () => (/* binding */ WebAppRpcProtocol)
|
|
90316
90343
|
/* harmony export */ });
|
|
90317
|
-
/* harmony import */ var
|
|
90318
|
-
/* harmony import */ var
|
|
90319
|
-
/* harmony import */ var
|
|
90320
|
-
/* harmony import */ var
|
|
90321
|
-
/* harmony import */ var
|
|
90344
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
90345
|
+
/* harmony import */ var _CommonLoggerCategory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../CommonLoggerCategory */ "../../core/common/lib/esm/CommonLoggerCategory.js");
|
|
90346
|
+
/* harmony import */ var _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../core/RpcConstants */ "../../core/common/lib/esm/rpc/core/RpcConstants.js");
|
|
90347
|
+
/* harmony import */ var _core_RpcProtocol__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../core/RpcProtocol */ "../../core/common/lib/esm/rpc/core/RpcProtocol.js");
|
|
90348
|
+
/* harmony import */ var _OpenAPI__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./OpenAPI */ "../../core/common/lib/esm/rpc/web/OpenAPI.js");
|
|
90349
|
+
/* harmony import */ var _WebAppRpcLogging__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./WebAppRpcLogging */ "../../core/common/lib/esm/rpc/web/WebAppRpcLogging.js");
|
|
90350
|
+
/* harmony import */ var _WebAppRpcRequest__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./WebAppRpcRequest */ "../../core/common/lib/esm/rpc/web/WebAppRpcRequest.js");
|
|
90322
90351
|
/*---------------------------------------------------------------------------------------------
|
|
90323
90352
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
90324
90353
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -90331,10 +90360,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
90331
90360
|
|
|
90332
90361
|
|
|
90333
90362
|
|
|
90363
|
+
|
|
90364
|
+
|
|
90334
90365
|
/** The HTTP application protocol.
|
|
90335
90366
|
* @internal
|
|
90336
90367
|
*/
|
|
90337
|
-
class WebAppRpcProtocol extends
|
|
90368
|
+
class WebAppRpcProtocol extends _core_RpcProtocol__WEBPACK_IMPORTED_MODULE_3__.RpcProtocol {
|
|
90338
90369
|
/** Constructs an HTTP protocol. */
|
|
90339
90370
|
constructor(configuration) {
|
|
90340
90371
|
super(configuration);
|
|
@@ -90342,9 +90373,9 @@ class WebAppRpcProtocol extends _core_RpcProtocol__WEBPACK_IMPORTED_MODULE_1__.R
|
|
|
90342
90373
|
/** An optional prefix for RPC operation URI paths. */
|
|
90343
90374
|
this.pathPrefix = "";
|
|
90344
90375
|
/** The RPC request class for this protocol. */
|
|
90345
|
-
this.requestType =
|
|
90376
|
+
this.requestType = _WebAppRpcRequest__WEBPACK_IMPORTED_MODULE_6__.WebAppRpcRequest;
|
|
90346
90377
|
this.supportsStatusCategory = true;
|
|
90347
|
-
this.events.addListener(
|
|
90378
|
+
this.events.addListener(_WebAppRpcLogging__WEBPACK_IMPORTED_MODULE_5__.WebAppRpcLogging.logProtocolEvent);
|
|
90348
90379
|
}
|
|
90349
90380
|
/** Convenience handler for an RPC operation get request for an HTTP server. */
|
|
90350
90381
|
async handleOperationGetRequest(req, res) {
|
|
@@ -90352,9 +90383,19 @@ class WebAppRpcProtocol extends _core_RpcProtocol__WEBPACK_IMPORTED_MODULE_1__.R
|
|
|
90352
90383
|
}
|
|
90353
90384
|
/** Convenience handler for an RPC operation post request for an HTTP server. */
|
|
90354
90385
|
async handleOperationPostRequest(req, res) {
|
|
90355
|
-
|
|
90386
|
+
let request;
|
|
90387
|
+
try {
|
|
90388
|
+
request = await _WebAppRpcRequest__WEBPACK_IMPORTED_MODULE_6__.WebAppRpcRequest.parseRequest(this, req);
|
|
90389
|
+
}
|
|
90390
|
+
catch (error) {
|
|
90391
|
+
const message = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError.getErrorMessage(error);
|
|
90392
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(_CommonLoggerCategory__WEBPACK_IMPORTED_MODULE_1__.CommonLoggerCategory.RpcInterfaceBackend, `Failed to parse request: ${message}`, _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyError.getErrorMetadata(error));
|
|
90393
|
+
res.status(400);
|
|
90394
|
+
res.send(JSON.stringify({ message, isError: true }));
|
|
90395
|
+
return;
|
|
90396
|
+
}
|
|
90356
90397
|
const fulfillment = await this.fulfill(request);
|
|
90357
|
-
await
|
|
90398
|
+
await _WebAppRpcRequest__WEBPACK_IMPORTED_MODULE_6__.WebAppRpcRequest.sendResponse(this, request, fulfillment, req, res);
|
|
90358
90399
|
}
|
|
90359
90400
|
/** Convenience handler for an OpenAPI description request for an HTTP server. */
|
|
90360
90401
|
handleOpenApiDescriptionRequest(_req, res) {
|
|
@@ -90364,45 +90405,45 @@ class WebAppRpcProtocol extends _core_RpcProtocol__WEBPACK_IMPORTED_MODULE_1__.R
|
|
|
90364
90405
|
/** Converts an HTTP content type value to an RPC content type value. */
|
|
90365
90406
|
static computeContentType(httpType) {
|
|
90366
90407
|
if (!httpType)
|
|
90367
|
-
return
|
|
90368
|
-
if (httpType.indexOf(
|
|
90369
|
-
return
|
|
90408
|
+
return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcContentType.Unknown;
|
|
90409
|
+
if (httpType.indexOf(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.WEB_RPC_CONSTANTS.ANY_TEXT) === 0) {
|
|
90410
|
+
return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcContentType.Text;
|
|
90370
90411
|
}
|
|
90371
|
-
else if (httpType.indexOf(
|
|
90372
|
-
return
|
|
90412
|
+
else if (httpType.indexOf(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.WEB_RPC_CONSTANTS.BINARY) === 0) {
|
|
90413
|
+
return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcContentType.Binary;
|
|
90373
90414
|
}
|
|
90374
|
-
else if (httpType.indexOf(
|
|
90375
|
-
return
|
|
90415
|
+
else if (httpType.indexOf(_core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.WEB_RPC_CONSTANTS.MULTIPART) === 0) {
|
|
90416
|
+
return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcContentType.Multipart;
|
|
90376
90417
|
}
|
|
90377
90418
|
else {
|
|
90378
|
-
return
|
|
90419
|
+
return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcContentType.Unknown;
|
|
90379
90420
|
}
|
|
90380
90421
|
}
|
|
90381
90422
|
/** Supplies the status corresponding to a protocol-specific code value. */
|
|
90382
90423
|
getStatus(code) {
|
|
90383
90424
|
switch (code) {
|
|
90384
|
-
case 404: return
|
|
90385
|
-
case 202: return
|
|
90386
|
-
case 200: return
|
|
90387
|
-
case 500: return
|
|
90388
|
-
case 204: return
|
|
90389
|
-
case 502: return
|
|
90390
|
-
case 503: return
|
|
90391
|
-
case 504: return
|
|
90392
|
-
default: return
|
|
90425
|
+
case 404: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.NotFound;
|
|
90426
|
+
case 202: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.Pending;
|
|
90427
|
+
case 200: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.Resolved;
|
|
90428
|
+
case 500: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.Rejected;
|
|
90429
|
+
case 204: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.NoContent;
|
|
90430
|
+
case 502: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.BadGateway;
|
|
90431
|
+
case 503: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.ServiceUnavailable;
|
|
90432
|
+
case 504: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.GatewayTimeout;
|
|
90433
|
+
default: return _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.Unknown;
|
|
90393
90434
|
}
|
|
90394
90435
|
}
|
|
90395
90436
|
/** Supplies the protocol-specific code corresponding to a status value. */
|
|
90396
90437
|
getCode(status) {
|
|
90397
90438
|
switch (status) {
|
|
90398
|
-
case
|
|
90399
|
-
case
|
|
90400
|
-
case
|
|
90401
|
-
case
|
|
90402
|
-
case
|
|
90403
|
-
case
|
|
90404
|
-
case
|
|
90405
|
-
case
|
|
90439
|
+
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.NotFound: return 404;
|
|
90440
|
+
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.Pending: return 202;
|
|
90441
|
+
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.Resolved: return 200;
|
|
90442
|
+
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.Rejected: return 500;
|
|
90443
|
+
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.NoContent: return 204;
|
|
90444
|
+
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.BadGateway: return 502;
|
|
90445
|
+
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.ServiceUnavailable: return 503;
|
|
90446
|
+
case _core_RpcConstants__WEBPACK_IMPORTED_MODULE_2__.RpcRequestStatus.GatewayTimeout: return 504;
|
|
90406
90447
|
default: return 501;
|
|
90407
90448
|
}
|
|
90408
90449
|
}
|
|
@@ -90413,7 +90454,7 @@ class WebAppRpcProtocol extends _core_RpcProtocol__WEBPACK_IMPORTED_MODULE_1__.R
|
|
|
90413
90454
|
/** An OpenAPI-compatible description of this protocol.
|
|
90414
90455
|
* @internal
|
|
90415
90456
|
*/
|
|
90416
|
-
get openAPIDescription() { return new
|
|
90457
|
+
get openAPIDescription() { return new _OpenAPI__WEBPACK_IMPORTED_MODULE_4__.RpcOpenAPIDescription(this); }
|
|
90417
90458
|
}
|
|
90418
90459
|
|
|
90419
90460
|
|
|
@@ -90514,7 +90555,7 @@ class WebAppRpcRequest extends _core_RpcRequest__WEBPACK_IMPORTED_MODULE_6__.Rpc
|
|
|
90514
90555
|
}
|
|
90515
90556
|
}
|
|
90516
90557
|
if (!request.id) {
|
|
90517
|
-
throw new _IModelError__WEBPACK_IMPORTED_MODULE_2__.IModelError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR, `Invalid request.`);
|
|
90558
|
+
throw new _IModelError__WEBPACK_IMPORTED_MODULE_2__.IModelError(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BentleyStatus.ERROR, `Invalid request: Missing required activity ID.`);
|
|
90518
90559
|
}
|
|
90519
90560
|
return request;
|
|
90520
90561
|
}
|
|
@@ -136633,8 +136674,6 @@ class RealityMeshGeometry extends _CachedGeometry__WEBPACK_IMPORTED_MODULE_7__.I
|
|
|
136633
136674
|
}
|
|
136634
136675
|
get techniqueId() { return 7 /* RealityMesh */; }
|
|
136635
136676
|
getPass(target) {
|
|
136636
|
-
if (target.isDrawingShadowMap)
|
|
136637
|
-
return "none";
|
|
136638
136677
|
if (this._baseIsTransparent || (target.wantThematicDisplay && target.uniforms.thematic.wantIsoLines))
|
|
136639
136678
|
return "translucent";
|
|
136640
136679
|
return "opaque";
|
|
@@ -142248,6 +142287,7 @@ class SolarShadowMap {
|
|
|
142248
142287
|
this.onGraphicsChanged(this._graphics);
|
|
142249
142288
|
}
|
|
142250
142289
|
update(context) {
|
|
142290
|
+
var _a;
|
|
142251
142291
|
this._isReady = false;
|
|
142252
142292
|
this.clearGraphics(false);
|
|
142253
142293
|
if (undefined === context || !context.viewport.view.isSpatialView()) {
|
|
@@ -142257,9 +142297,7 @@ class SolarShadowMap {
|
|
|
142257
142297
|
}
|
|
142258
142298
|
const view = context.viewport.view;
|
|
142259
142299
|
const style = view.getDisplayStyle3d();
|
|
142260
|
-
|
|
142261
|
-
if (undefined === sunDirection)
|
|
142262
|
-
sunDirection = defaultSunDirection;
|
|
142300
|
+
const sunDirection = (_a = style.sunDirection) !== null && _a !== void 0 ? _a : defaultSunDirection;
|
|
142263
142301
|
const minimumHorizonDirection = -.01;
|
|
142264
142302
|
if (sunDirection.z > minimumHorizonDirection) {
|
|
142265
142303
|
this.notifyGraphicsChanged();
|
|
@@ -142281,8 +142319,21 @@ class SolarShadowMap {
|
|
|
142281
142319
|
// Limit the map to only displayed models.
|
|
142282
142320
|
const viewTileRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
|
|
142283
142321
|
view.forEachTileTreeRef((ref) => {
|
|
142284
|
-
if (ref.castsShadows)
|
|
142285
|
-
ref.
|
|
142322
|
+
if (ref.castsShadows) {
|
|
142323
|
+
if (ref.isGlobal) {
|
|
142324
|
+
// A shadow-casting tile tree that spans the globe. Limit its range to the viewed extents.
|
|
142325
|
+
for (const p3 of viewFrustum.points) {
|
|
142326
|
+
const p4 = worldToMap.multiplyPoint3d(p3, 1);
|
|
142327
|
+
if (p4.w > 0.0001)
|
|
142328
|
+
viewTileRange.extendXYZW(p4.x, p4.y, p4.z, p4.w);
|
|
142329
|
+
else
|
|
142330
|
+
viewTileRange.high.z = Math.max(1.0, viewTileRange.high.z); // behind eye plane.
|
|
142331
|
+
}
|
|
142332
|
+
}
|
|
142333
|
+
else {
|
|
142334
|
+
ref.accumulateTransformedRange(viewTileRange, worldToMap, undefined);
|
|
142335
|
+
}
|
|
142336
|
+
}
|
|
142286
142337
|
});
|
|
142287
142338
|
if (!viewTileRange.isNull)
|
|
142288
142339
|
viewTileRange.clone(shadowRange);
|
|
@@ -143513,7 +143564,15 @@ class System extends _RenderSystem__WEBPACK_IMPORTED_MODULE_7__.RenderSystem {
|
|
|
143513
143564
|
}
|
|
143514
143565
|
/** Attempt to create a texture using gradient symbology. */
|
|
143515
143566
|
getGradientTexture(symb, iModel) {
|
|
143516
|
-
|
|
143567
|
+
let width = 0x100;
|
|
143568
|
+
let height = 0x100;
|
|
143569
|
+
if (symb.mode === _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Gradient.Mode.Thematic) {
|
|
143570
|
+
// Pixels in each row are identical, no point in having width > 1.
|
|
143571
|
+
width = 1;
|
|
143572
|
+
// We want maximum height to minimize bleeding of margin color.
|
|
143573
|
+
height = this.maxTextureSize;
|
|
143574
|
+
}
|
|
143575
|
+
const source = symb.produceImage({ width, height, includeThematicMargin: true });
|
|
143517
143576
|
return this.createTexture({
|
|
143518
143577
|
image: {
|
|
143519
143578
|
source,
|
|
@@ -157748,7 +157807,7 @@ class GltfReader {
|
|
|
157748
157807
|
if (dracoMeshes.length === 0)
|
|
157749
157808
|
return;
|
|
157750
157809
|
try {
|
|
157751
|
-
const dracoLoader = (await Promise.all(/*! import() */[__webpack_require__.e("vendors-
|
|
157810
|
+
const dracoLoader = (await Promise.all(/*! import() */[__webpack_require__.e("vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_7_node_modules_loaders_gl_draco_di-a586d9"), __webpack_require__.e("_c5fe")]).then(__webpack_require__.bind(__webpack_require__, /*! @loaders.gl/draco */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.7/node_modules/@loaders.gl/draco/dist/esm/index.js"))).DracoLoader;
|
|
157752
157811
|
await Promise.all(dracoMeshes.map(async (x) => this.decodeDracoMesh(x, dracoLoader)));
|
|
157753
157812
|
}
|
|
157754
157813
|
catch (err) {
|
|
@@ -160875,7 +160934,7 @@ function readPnts(stream, dataOffset, pnts) {
|
|
|
160875
160934
|
async function decodeDracoPointCloud(buf) {
|
|
160876
160935
|
var _a, _b, _c, _d, _e, _f;
|
|
160877
160936
|
try {
|
|
160878
|
-
const dracoLoader = (await Promise.all(/*! import() */[__webpack_require__.e("vendors-
|
|
160937
|
+
const dracoLoader = (await Promise.all(/*! import() */[__webpack_require__.e("vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_2_7_node_modules_loaders_gl_draco_di-a586d9"), __webpack_require__.e("_c5fe")]).then(__webpack_require__.bind(__webpack_require__, /*! @loaders.gl/draco */ "../../common/temp/node_modules/.pnpm/@loaders.gl+draco@3.2.7/node_modules/@loaders.gl/draco/dist/esm/index.js"))).DracoLoader;
|
|
160879
160938
|
const mesh = await dracoLoader.parse(buf, {});
|
|
160880
160939
|
if (mesh.topology !== "point-list")
|
|
160881
160940
|
return undefined;
|
|
@@ -163060,6 +163119,7 @@ class RealityTileTree extends _internal__WEBPACK_IMPORTED_MODULE_6__.TileTree {
|
|
|
163060
163119
|
const preloadDebugBuilder = (debugControl && debugControl.displayRealityTilePreload) ? args.context.createSceneGraphicBuilder() : undefined;
|
|
163061
163120
|
const graphicTypeBranches = new Map();
|
|
163062
163121
|
const selectedTiles = this.selectRealityTiles(args, displayedTileDescendants, preloadDebugBuilder);
|
|
163122
|
+
args.processSelectedTiles(selectedTiles);
|
|
163063
163123
|
let sortIndices;
|
|
163064
163124
|
if (!this.parentsAndChildrenExclusive) {
|
|
163065
163125
|
sortIndices = selectedTiles.map((_x, i) => i);
|
|
@@ -167320,28 +167380,6 @@ class ArcGisUtilities {
|
|
|
167320
167380
|
return undefined;
|
|
167321
167381
|
}
|
|
167322
167382
|
}
|
|
167323
|
-
static async getFootprintJson(url, credentials) {
|
|
167324
|
-
const cached = ArcGisUtilities._footprintCache.get(url);
|
|
167325
|
-
if (cached !== undefined)
|
|
167326
|
-
return cached;
|
|
167327
|
-
try {
|
|
167328
|
-
const tmpUrl = new URL(url);
|
|
167329
|
-
tmpUrl.searchParams.append("f", "json");
|
|
167330
|
-
tmpUrl.searchParams.append("option", "footprints");
|
|
167331
|
-
tmpUrl.searchParams.append("outSR", "4326");
|
|
167332
|
-
const accessClient = _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.mapLayerFormatRegistry.getAccessClient("ArcGIS");
|
|
167333
|
-
if (accessClient) {
|
|
167334
|
-
await ArcGisUtilities.appendSecurityToken(tmpUrl, accessClient, { mapLayerUrl: new URL(url), userName: credentials === null || credentials === void 0 ? void 0 : credentials.user, password: credentials === null || credentials === void 0 ? void 0 : credentials.password });
|
|
167335
|
-
}
|
|
167336
|
-
const json = await (0,_request_Request__WEBPACK_IMPORTED_MODULE_1__.getJson)(tmpUrl.toString());
|
|
167337
|
-
ArcGisUtilities._footprintCache.set(url, json);
|
|
167338
|
-
return json;
|
|
167339
|
-
}
|
|
167340
|
-
catch (_error) {
|
|
167341
|
-
ArcGisUtilities._footprintCache.set(url, undefined);
|
|
167342
|
-
return undefined;
|
|
167343
|
-
}
|
|
167344
|
-
}
|
|
167345
167383
|
// return the appended access token if available.
|
|
167346
167384
|
static async appendSecurityToken(url, accessClient, accessTokenParams) {
|
|
167347
167385
|
// Append security token if available
|
|
@@ -167358,7 +167396,6 @@ class ArcGisUtilities {
|
|
|
167358
167396
|
}
|
|
167359
167397
|
}
|
|
167360
167398
|
ArcGisUtilities._serviceCache = new Map();
|
|
167361
|
-
ArcGisUtilities._footprintCache = new Map();
|
|
167362
167399
|
|
|
167363
167400
|
|
|
167364
167401
|
/***/ }),
|
|
@@ -168237,18 +168274,9 @@ class ArcGISMapLayerImageryProvider extends _internal__WEBPACK_IMPORTED_MODULE_4
|
|
|
168237
168274
|
if (this._usesCachedTiles && this._tileMapSupported) {
|
|
168238
168275
|
this._tileMap = new _internal__WEBPACK_IMPORTED_MODULE_4__.ArcGISTileMap(this._settings.url, (_d = (_c = json.tileInfo) === null || _c === void 0 ? void 0 : _c.lods) === null || _d === void 0 ? void 0 : _d.length);
|
|
168239
168276
|
}
|
|
168240
|
-
|
|
168241
|
-
if (
|
|
168242
|
-
|
|
168243
|
-
if (layer.layerDefinition && layer.layerDefinition.extent) {
|
|
168244
|
-
this.cartoRange = _internal__WEBPACK_IMPORTED_MODULE_4__.MapCartoRectangle.createFromDegrees(layer.layerDefinition.extent.xmin, layer.layerDefinition.extent.ymin, layer.layerDefinition.extent.xmax, layer.layerDefinition.extent.ymax);
|
|
168245
|
-
break;
|
|
168246
|
-
}
|
|
168247
|
-
}
|
|
168248
|
-
}
|
|
168249
|
-
// Sometimes footprint request doesnt work, fallback to dataset fullextent
|
|
168250
|
-
if (this.cartoRange === undefined && json.fullExtent) {
|
|
168251
|
-
if (json.fullExtent.spatialReference.latestWkid === 3857) {
|
|
168277
|
+
// Read range using fullextent from service metadata
|
|
168278
|
+
if (json.fullExtent) {
|
|
168279
|
+
if (json.fullExtent.spatialReference.latestWkid === 3857 || json.fullExtent.spatialReference.wkid === 102100) {
|
|
168252
168280
|
const range3857 = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_6__.Range2d.createFrom({
|
|
168253
168281
|
low: { x: json.fullExtent.xmin, y: json.fullExtent.ymin },
|
|
168254
168282
|
high: { x: json.fullExtent.xmax, y: json.fullExtent.ymax }
|
|
@@ -194580,8 +194608,8 @@ var ClipMaskXYZRangePlanes;
|
|
|
194580
194608
|
* * isMask === true means the plane sets should cover the outside of its polygon.
|
|
194581
194609
|
* * Note that the ClipShape's `isMask` property and the ClipPrimitive's `isInvisible` property are distinct controls.
|
|
194582
194610
|
* * In normal usage, callers get "outside" clip behavior using ONLY the ClipShape isMask property.
|
|
194583
|
-
* * The ClipShape happens to pass the _invisible bit down to
|
|
194584
|
-
* * At that level,
|
|
194611
|
+
* * The ClipShape happens to pass the _invisible bit down to ClipPlanes that it creates.
|
|
194612
|
+
* * At that level, the flag controls whether the cut edges are produced on the plane
|
|
194585
194613
|
* * This seems like an confused overloading of the meaning.
|
|
194586
194614
|
* @public
|
|
194587
194615
|
*/
|
|
@@ -194600,7 +194628,7 @@ class ClipPrimitive {
|
|
|
194600
194628
|
/**
|
|
194601
194629
|
* Create a ClipPrimitive, capturing the supplied plane set as the clip planes.
|
|
194602
194630
|
* @param planes clipper
|
|
194603
|
-
* @param isInvisible
|
|
194631
|
+
* @param isInvisible set the invisible flag on the ClipPrimitive
|
|
194604
194632
|
*/
|
|
194605
194633
|
static createCapture(planes, isInvisible = false) {
|
|
194606
194634
|
let planeData;
|
|
@@ -195486,7 +195514,7 @@ class ClipUtilities {
|
|
|
195486
195514
|
* * `ClipVector` -- intersection of the ranges of its `ClipPrimitive`.
|
|
195487
195515
|
* * `undefined` -- entire input range.
|
|
195488
195516
|
* * If `observeInvisibleFlag` is false, the "invisible" properties are ignored, and this effectively returns the range of the edge work of the members
|
|
195489
|
-
* * If `observeInvisibleFlag` is
|
|
195517
|
+
* * If `observeInvisibleFlag` is true, the "invisible" properties are observed, and "invisible" parts do not restrict the range.
|
|
195490
195518
|
* @param clipper
|
|
195491
195519
|
* @param range non-null range.
|
|
195492
195520
|
* @param observeInvisibleFlag indicates how "invisible" bit is applied for ClipPrimitive.
|
|
@@ -196048,7 +196076,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
196048
196076
|
|
|
196049
196077
|
/** Class holding an array structure of shapes defined by `ClipPrimitive`
|
|
196050
196078
|
* * The `ClipVector` defines an intersection of the member `ClipPrimitive` regions.
|
|
196051
|
-
* * In the most common usage, one of the `ClipPrimitive` will be an outer region, and all others are holes with marker flag indicating that
|
|
196079
|
+
* * In the most common usage, one of the `ClipPrimitive` will be an outer region, and all others are holes with marker flag indicating that the outside of each hole is live.
|
|
196052
196080
|
* @public
|
|
196053
196081
|
*/
|
|
196054
196082
|
class ClipVector {
|
|
@@ -196479,7 +196507,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
196479
196507
|
/* harmony export */ });
|
|
196480
196508
|
/* harmony import */ var _Geometry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Geometry */ "../../core/geometry/lib/esm/Geometry.js");
|
|
196481
196509
|
/* harmony import */ var _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../geometry3d/Plane3dByOriginAndUnitNormal */ "../../core/geometry/lib/esm/geometry3d/Plane3dByOriginAndUnitNormal.js");
|
|
196482
|
-
/* harmony import */ var
|
|
196510
|
+
/* harmony import */ var _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../geometry3d/GrowableFloat64Array */ "../../core/geometry/lib/esm/geometry3d/GrowableFloat64Array.js");
|
|
196483
196511
|
/* harmony import */ var _geometry3d_GrowableXYZArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../geometry3d/GrowableXYZArray */ "../../core/geometry/lib/esm/geometry3d/GrowableXYZArray.js");
|
|
196484
196512
|
/* harmony import */ var _geometry3d_Matrix3d__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../geometry3d/Matrix3d */ "../../core/geometry/lib/esm/geometry3d/Matrix3d.js");
|
|
196485
196513
|
/* harmony import */ var _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../geometry3d/Point3dVector3d */ "../../core/geometry/lib/esm/geometry3d/Point3dVector3d.js");
|
|
@@ -196487,6 +196515,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
196487
196515
|
/* harmony import */ var _geometry3d_Range__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../geometry3d/Range */ "../../core/geometry/lib/esm/geometry3d/Range.js");
|
|
196488
196516
|
/* harmony import */ var _ClipPlane__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ClipPlane */ "../../core/geometry/lib/esm/clipping/ClipPlane.js");
|
|
196489
196517
|
/* harmony import */ var _ClipUtils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ClipUtils */ "../../core/geometry/lib/esm/clipping/ClipUtils.js");
|
|
196518
|
+
/* harmony import */ var _polyface_Polyface__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../polyface/Polyface */ "../../core/geometry/lib/esm/polyface/Polyface.js");
|
|
196519
|
+
/* harmony import */ var _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../polyface/PolyfaceQuery */ "../../core/geometry/lib/esm/polyface/PolyfaceQuery.js");
|
|
196490
196520
|
/*---------------------------------------------------------------------------------------------
|
|
196491
196521
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
196492
196522
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -196501,6 +196531,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
196501
196531
|
|
|
196502
196532
|
|
|
196503
196533
|
|
|
196534
|
+
|
|
196535
|
+
|
|
196504
196536
|
/**
|
|
196505
196537
|
* A ConvexClipPlaneSet is a collection of ClipPlanes, often used for bounding regions of space.
|
|
196506
196538
|
* @public
|
|
@@ -196782,7 +196814,7 @@ class ConvexClipPlaneSet {
|
|
|
196782
196814
|
return true;
|
|
196783
196815
|
}
|
|
196784
196816
|
/** Return true if `point` satisfies `point.isPointOnOrInside` for all planes */
|
|
196785
|
-
isPointOnOrInside(point, tolerance) {
|
|
196817
|
+
isPointOnOrInside(point, tolerance = _Geometry__WEBPACK_IMPORTED_MODULE_3__.Geometry.smallMetricDistance) {
|
|
196786
196818
|
const interiorTolerance = Math.abs(tolerance); // Interior tolerance should always be positive. (TFS# 246598).
|
|
196787
196819
|
for (const plane of this._planes) {
|
|
196788
196820
|
if (!plane.isPointOnOrInside(point, (plane.interior ? interiorTolerance : tolerance)))
|
|
@@ -197178,10 +197210,50 @@ class ConvexClipPlaneSet {
|
|
|
197178
197210
|
if (newInside)
|
|
197179
197211
|
insideFragments.push(newInside);
|
|
197180
197212
|
}
|
|
197213
|
+
/** Create a convex clip set from a convex mesh.
|
|
197214
|
+
* * Create a plane for each facet.
|
|
197215
|
+
* * Assemble the planes as a single clip plane set.
|
|
197216
|
+
* * If the facets are closed by edge pairing, use the sign of the computed volume to point the plane normals inward.
|
|
197217
|
+
* * If the facets are not closed, the facet orientation determines plane orientation.
|
|
197218
|
+
* * The implication of this is that if the facets are a convex volume, the returned clip plane set is convex.
|
|
197219
|
+
* @param convexMesh input mesh. For best results, the mesh should be closed and convex.
|
|
197220
|
+
* @param result optional preallocated result to reuse and return
|
|
197221
|
+
* @return clipper and volume (zero if mesh is not closed)
|
|
197222
|
+
*/
|
|
197223
|
+
static createConvexPolyface(convexMesh, result) {
|
|
197224
|
+
result = this.createEmpty(result);
|
|
197225
|
+
let vol = 0;
|
|
197226
|
+
let myMesh;
|
|
197227
|
+
let myVisitor;
|
|
197228
|
+
if (convexMesh instanceof _polyface_Polyface__WEBPACK_IMPORTED_MODULE_9__.Polyface) {
|
|
197229
|
+
myMesh = convexMesh;
|
|
197230
|
+
myVisitor = convexMesh.createVisitor(0);
|
|
197231
|
+
}
|
|
197232
|
+
else {
|
|
197233
|
+
myMesh = convexMesh.clientPolyface();
|
|
197234
|
+
myVisitor = convexMesh;
|
|
197235
|
+
}
|
|
197236
|
+
if (myMesh && myVisitor) {
|
|
197237
|
+
if (_polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_10__.PolyfaceQuery.isPolyfaceClosedByEdgePairing(myMesh))
|
|
197238
|
+
vol = _polyface_PolyfaceQuery__WEBPACK_IMPORTED_MODULE_10__.PolyfaceQuery.sumTetrahedralVolumes(myVisitor);
|
|
197239
|
+
const scale = vol > 0.0 ? -1.0 : 1.0; // point clipper normals inward if mesh normals point outward
|
|
197240
|
+
const normal = _geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_2__.Vector3d.create();
|
|
197241
|
+
const plane = _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.createXYPlane();
|
|
197242
|
+
myVisitor.reset();
|
|
197243
|
+
while (myVisitor.moveToNextFacet()) {
|
|
197244
|
+
if (undefined !== _geometry3d_PolygonOps__WEBPACK_IMPORTED_MODULE_6__.PolygonOps.areaNormalGo(myVisitor.point, normal)) {
|
|
197245
|
+
normal.scaleInPlace(scale);
|
|
197246
|
+
if (undefined !== _geometry3d_Plane3dByOriginAndUnitNormal__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.create(myVisitor.point.front(), normal, plane))
|
|
197247
|
+
result.addPlaneToConvexSet(plane);
|
|
197248
|
+
}
|
|
197249
|
+
}
|
|
197250
|
+
}
|
|
197251
|
+
return { clipper: result, volume: vol };
|
|
197252
|
+
}
|
|
197181
197253
|
}
|
|
197182
197254
|
/** Value acting as "at infinity" for coordinates along a ray. */
|
|
197183
197255
|
ConvexClipPlaneSet.hugeVal = 1e37;
|
|
197184
|
-
ConvexClipPlaneSet._clipArcFractionArray = new
|
|
197256
|
+
ConvexClipPlaneSet._clipArcFractionArray = new _geometry3d_GrowableFloat64Array__WEBPACK_IMPORTED_MODULE_11__.GrowableFloat64Array();
|
|
197185
197257
|
|
|
197186
197258
|
|
|
197187
197259
|
/***/ }),
|
|
@@ -225120,10 +225192,12 @@ class XYZ {
|
|
|
225120
225192
|
}
|
|
225121
225193
|
return index;
|
|
225122
225194
|
}
|
|
225123
|
-
/** Return true if the
|
|
225195
|
+
/** Return true if the x,y,z components are all nearly zero to tolerance Geometry.smallMetricDistance */
|
|
225124
225196
|
get isAlmostZero() {
|
|
225125
225197
|
return _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.x) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.y) && _Geometry__WEBPACK_IMPORTED_MODULE_0__.Geometry.isSmallMetricDistance(this.z);
|
|
225126
225198
|
}
|
|
225199
|
+
/** Return true if the x,y,z components are all exactly zero */
|
|
225200
|
+
get isZero() { return this.x === 0.0 && this.y === 0.0 && this.z === 0.0; }
|
|
225127
225201
|
/** Return the largest absolute value of any component */
|
|
225128
225202
|
maxAbs() { return Math.max(Math.abs(this.x), Math.abs(this.y), Math.abs(this.z)); }
|
|
225129
225203
|
/** Return the sqrt of the sum of squared x,y,z parts */
|
|
@@ -227569,12 +227643,13 @@ class PolygonOps {
|
|
|
227569
227643
|
static areaNormalGo(points, result) {
|
|
227570
227644
|
if (!result)
|
|
227571
227645
|
result = new _Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Vector3d();
|
|
227646
|
+
else
|
|
227647
|
+
result.setZero();
|
|
227572
227648
|
const n = points.length;
|
|
227573
227649
|
if (n === 3) {
|
|
227574
227650
|
points.crossProductIndexIndexIndex(0, 1, 2, result);
|
|
227575
227651
|
}
|
|
227576
|
-
else if (n
|
|
227577
|
-
result.setZero();
|
|
227652
|
+
else if (n > 3) {
|
|
227578
227653
|
// This will work with or without closure edge. If closure is given, the last vector is 000.
|
|
227579
227654
|
for (let i = 2; i < n; i++) {
|
|
227580
227655
|
points.accumulateCrossProductIndexIndexIndex(0, i - 1, i, result);
|
|
@@ -227582,7 +227657,7 @@ class PolygonOps {
|
|
|
227582
227657
|
}
|
|
227583
227658
|
// ALL BRANCHES SUM FULL CROSS PRODUCTS AND EXPECT SCALE HERE
|
|
227584
227659
|
result.scaleInPlace(0.5);
|
|
227585
|
-
return result;
|
|
227660
|
+
return result.isZero ? undefined : result;
|
|
227586
227661
|
}
|
|
227587
227662
|
/** return a vector which is perpendicular to the polygon and has magnitude equal to the polygon area. */
|
|
227588
227663
|
static areaNormal(points, result) {
|
|
@@ -227722,8 +227797,10 @@ class PolygonOps {
|
|
|
227722
227797
|
* Return a unit normal to the plane of the polygon.
|
|
227723
227798
|
* @param points array of points around the polygon.
|
|
227724
227799
|
* @param result caller-allocated result vector.
|
|
227800
|
+
* @return true if and only if result has unit length
|
|
227725
227801
|
*/
|
|
227726
227802
|
static unitNormal(points, result) {
|
|
227803
|
+
result.setZero();
|
|
227727
227804
|
let n = points.length;
|
|
227728
227805
|
if (n > 1 && points.getPoint3dAtUncheckedPointIndex(0).isExactEqual(points.getPoint3dAtUncheckedPointIndex(n - 1)))
|
|
227729
227806
|
--n; // ignore closure point
|
|
@@ -243664,7 +243741,7 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
243664
243741
|
* * Circular or elliptical pipe cross sections can be specified by supplying either a radius, a pair of semi-axis lengths, or a full Arc3d.
|
|
243665
243742
|
* * For semi-axis length input, x corresponds to an ellipse local axis nominally situated parallel to the xy-plane.
|
|
243666
243743
|
* * The center of Arc3d input is translated to the centerline start point to act as initial cross section.
|
|
243667
|
-
* @param centerline centerline of pipe
|
|
243744
|
+
* @param centerline centerline of pipe. If curved, it will be stroked using the builder's StrokeOptions.
|
|
243668
243745
|
* @param sectionData circle radius, ellipse semi-axis lengths, or full Arc3d
|
|
243669
243746
|
* @param numFacetAround how many equal parameter-space chords around each section
|
|
243670
243747
|
*/
|
|
@@ -243683,7 +243760,7 @@ class PolyfaceBuilder extends _geometry3d_GeometryHandler__WEBPACK_IMPORTED_MODU
|
|
|
243683
243760
|
}
|
|
243684
243761
|
else if (centerline instanceof _curve_GeometryQuery__WEBPACK_IMPORTED_MODULE_32__.GeometryQuery) {
|
|
243685
243762
|
const linestring = _curve_LineString3d__WEBPACK_IMPORTED_MODULE_11__.LineString3d.create();
|
|
243686
|
-
centerline.emitStrokes(linestring);
|
|
243763
|
+
centerline.emitStrokes(linestring, this._options);
|
|
243687
243764
|
this.addMiteredPipesFromPoints(linestring.packedPoints, sectionData, numFacetAround);
|
|
243688
243765
|
}
|
|
243689
243766
|
}
|
|
@@ -254727,6 +254804,26 @@ class Sample {
|
|
|
254727
254804
|
}
|
|
254728
254805
|
return result;
|
|
254729
254806
|
}
|
|
254807
|
+
/** Create various orders of non-rational B-spline curves with helical poles */
|
|
254808
|
+
static createBsplineCurveHelices(radius, height, numTurns, numSamplesPerTurn) {
|
|
254809
|
+
const pts = [];
|
|
254810
|
+
const zDelta = (height / numTurns) / numSamplesPerTurn;
|
|
254811
|
+
const aDelta = 2 * Math.PI / numSamplesPerTurn;
|
|
254812
|
+
for (let iTurn = 0; iTurn < numTurns; ++iTurn) {
|
|
254813
|
+
for (let iSample = 0; iSample < numSamplesPerTurn; iSample++) {
|
|
254814
|
+
pts.push(_geometry3d_Point3dVector3d__WEBPACK_IMPORTED_MODULE_1__.Point3d.create(radius * Math.cos(iSample * aDelta), radius * Math.sin(iSample * aDelta), pts.length * zDelta));
|
|
254815
|
+
}
|
|
254816
|
+
}
|
|
254817
|
+
const result = [];
|
|
254818
|
+
for (const order of [2, 3, 4, 9, 16, 25]) {
|
|
254819
|
+
if (order > pts.length)
|
|
254820
|
+
continue;
|
|
254821
|
+
const curve = _bspline_BSplineCurve__WEBPACK_IMPORTED_MODULE_9__.BSplineCurve3d.createUniformKnots(pts, order);
|
|
254822
|
+
if (curve !== undefined)
|
|
254823
|
+
result.push(curve);
|
|
254824
|
+
}
|
|
254825
|
+
return result;
|
|
254826
|
+
}
|
|
254730
254827
|
/** Create weighted bsplines for circular arcs.
|
|
254731
254828
|
*/
|
|
254732
254829
|
static createBspline3dHArcs() {
|
|
@@ -265702,8 +265799,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
265702
265799
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
265703
265800
|
/* harmony export */ "ITwinLocalization": () => (/* binding */ ITwinLocalization)
|
|
265704
265801
|
/* harmony export */ });
|
|
265705
|
-
/* harmony import */ var i18next__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.
|
|
265706
|
-
/* harmony import */ var i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! i18next-browser-languagedetector */ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.
|
|
265802
|
+
/* harmony import */ var i18next__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! i18next */ "../../common/temp/node_modules/.pnpm/i18next@21.9.1/node_modules/i18next/dist/esm/i18next.js");
|
|
265803
|
+
/* harmony import */ var i18next_browser_languagedetector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! i18next-browser-languagedetector */ "../../common/temp/node_modules/.pnpm/i18next-browser-languagedetector@6.1.5/node_modules/i18next-browser-languagedetector/dist/esm/i18nextBrowserLanguageDetector.js");
|
|
265707
265804
|
/* harmony import */ var i18next_xhr_backend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! i18next-xhr-backend */ "../../common/temp/node_modules/.pnpm/i18next-xhr-backend@3.2.2/node_modules/i18next-xhr-backend/dist/esm/i18nextXHRBackend.js");
|
|
265708
265805
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
265709
265806
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -287100,7 +287197,7 @@ class TestContext {
|
|
|
287100
287197
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
287101
287198
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
|
|
287102
287199
|
await core_frontend_1.NoRenderApp.startup({
|
|
287103
|
-
applicationVersion: "3.4.0-dev.
|
|
287200
|
+
applicationVersion: "3.4.0-dev.30",
|
|
287104
287201
|
applicationId: this.settings.gprid,
|
|
287105
287202
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
287106
287203
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -287167,12 +287264,6 @@ describe("Basic Scenarios", async () => {
|
|
|
287167
287264
|
const iModelId = testContext.iModelWithChangesets.iModelId;
|
|
287168
287265
|
await openIModelAndQueryPage(iTwinId, iModelId);
|
|
287169
287266
|
});
|
|
287170
|
-
// imodeljs does not allow this -- changesetid must be non-empty for routing purposes.
|
|
287171
|
-
it.skip("should successfully open a new IModel without changesets for read and Get Properties for an Element TestCase:872675", async () => {
|
|
287172
|
-
const iTwinId = testContext.iTwinId;
|
|
287173
|
-
const iModelId = testContext.iModelWithChangesets.iModelId;
|
|
287174
|
-
await openIModelAndQueryPage(iTwinId, iModelId);
|
|
287175
|
-
});
|
|
287176
287267
|
it("should open iModel and Execute Query TestCase:819343", async () => {
|
|
287177
287268
|
var e_1, _a;
|
|
287178
287269
|
const iModel = await testContext.iModelWithChangesets.getConnection();
|
|
@@ -287192,52 +287283,6 @@ describe("Basic Scenarios", async () => {
|
|
|
287192
287283
|
}
|
|
287193
287284
|
expect(rows).not.to.be.empty;
|
|
287194
287285
|
});
|
|
287195
|
-
/* This test is wrong. If two users open the same imodel using the same mode in the same backend, then they
|
|
287196
|
-
will share a single briefcase in the backend. When either user closes the imodel, then the briefcase will
|
|
287197
|
-
be closed. The backend does not maintain some kind of ref count that would keep the briefcase open
|
|
287198
|
-
for the second connection.
|
|
287199
|
-
it("should not affect other users when iModel is closed TestCase:819344 #orchestrator", async () => {
|
|
287200
|
-
const iModelId = testContext.iModelWithChangesets.iModelId;
|
|
287201
|
-
const iTwinId = testContext.iModelWithChangesets.iTwinId;
|
|
287202
|
-
const openMode = OpenMode.Readonly;
|
|
287203
|
-
|
|
287204
|
-
const originalAppAuth = TestRpcClientManager.configuration.applicationAuthorizationValue;
|
|
287205
|
-
|
|
287206
|
-
try {
|
|
287207
|
-
// Get access token of user that does not have permission to read given iModel
|
|
287208
|
-
const user1accessToken = await testContext.regularUser1.getAccessToken();
|
|
287209
|
-
const user1accessTokenString = user1accessToken.toTokenString() || "";
|
|
287210
|
-
|
|
287211
|
-
TestRpcClientManager.configuration.applicationAuthorizationValue = user1accessTokenString;
|
|
287212
|
-
const iModel1 = await IModelConnection.open(user1accessToken, iTwinId, iModelId, openMode);
|
|
287213
|
-
|
|
287214
|
-
// Open the same imodel for another user
|
|
287215
|
-
const user2accessToken = await testContext.regularUser2.getAccessToken();
|
|
287216
|
-
const user2accessTokenString = user2accessToken.toTokenString() || "";
|
|
287217
|
-
|
|
287218
|
-
TestRpcClientManager.configuration.applicationAuthorizationValue = user2accessTokenString;
|
|
287219
|
-
const iModel2 = await IModelConnection.open(user2accessToken, iTwinId, iModelId, openMode);
|
|
287220
|
-
const query = "SELECT ECInstanceId AS id FROM BisCore.Element";
|
|
287221
|
-
|
|
287222
|
-
// Act: Close the iModel for the same user
|
|
287223
|
-
{
|
|
287224
|
-
TestRpcClientManager.configuration.applicationAuthorizationValue = user1accessTokenString;
|
|
287225
|
-
const rows = await iModel1.queryPage(query);
|
|
287226
|
-
expect(rows).to.exist.and.be.not.empty;
|
|
287227
|
-
await iModel1.close(user1accessToken);
|
|
287228
|
-
}
|
|
287229
|
-
|
|
287230
|
-
// Assert: Previous session close should not affect other users
|
|
287231
|
-
{
|
|
287232
|
-
TestRpcClientManager.configuration.applicationAuthorizationValue = user2accessTokenString;
|
|
287233
|
-
const rows = await iModel2.queryPage(query);
|
|
287234
|
-
expect(rows).to.exist.and.be.not.empty;
|
|
287235
|
-
}
|
|
287236
|
-
} finally {
|
|
287237
|
-
TestRpcClientManager.configuration.applicationAuthorizationValue = originalAppAuth;
|
|
287238
|
-
}
|
|
287239
|
-
});
|
|
287240
|
-
*/
|
|
287241
287286
|
});
|
|
287242
287287
|
|
|
287243
287288
|
|
|
@@ -287622,7 +287667,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
287622
287667
|
/** @packageDocumentation
|
|
287623
287668
|
* @module Core
|
|
287624
287669
|
*/
|
|
287625
|
-
/**
|
|
287670
|
+
/**
|
|
287671
|
+
* Functions related to diagnostics log entry.
|
|
287672
|
+
* @beta
|
|
287673
|
+
*/
|
|
287626
287674
|
var DiagnosticsLogEntry;
|
|
287627
287675
|
(function (DiagnosticsLogEntry) {
|
|
287628
287676
|
function isMessage(entry) {
|
|
@@ -292753,7 +292801,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
292753
292801
|
*/
|
|
292754
292802
|
|
|
292755
292803
|
/**
|
|
292756
|
-
*
|
|
292804
|
+
* A function which logs messages to the console.
|
|
292805
|
+
* @beta
|
|
292757
292806
|
*/
|
|
292758
292807
|
function consoleDiagnosticsHandler(diagnostics) {
|
|
292759
292808
|
// eslint-disable-next-line no-console
|
|
@@ -292768,7 +292817,8 @@ function consoleDiagnosticsHandler(diagnostics) {
|
|
|
292768
292817
|
});
|
|
292769
292818
|
}
|
|
292770
292819
|
/**
|
|
292771
|
-
*
|
|
292820
|
+
* A function which calls all diagnostics handlers passed to it.
|
|
292821
|
+
* @beta
|
|
292772
292822
|
*/
|
|
292773
292823
|
function createCombinedDiagnosticsHandler(handlers) {
|
|
292774
292824
|
return (diagnostics) => {
|
|
@@ -302699,10 +302749,10 @@ function _unsupportedIterableToArray(o, minLen) {
|
|
|
302699
302749
|
|
|
302700
302750
|
/***/ }),
|
|
302701
302751
|
|
|
302702
|
-
/***/ "../../common/temp/node_modules/.pnpm/i18next@21.
|
|
302703
|
-
|
|
302704
|
-
!*** ../../common/temp/node_modules/.pnpm/i18next@21.
|
|
302705
|
-
|
|
302752
|
+
/***/ "../../common/temp/node_modules/.pnpm/i18next@21.9.1/node_modules/i18next/dist/esm/i18next.js":
|
|
302753
|
+
/*!****************************************************************************************************!*\
|
|
302754
|
+
!*** ../../common/temp/node_modules/.pnpm/i18next@21.9.1/node_modules/i18next/dist/esm/i18next.js ***!
|
|
302755
|
+
\****************************************************************************************************/
|
|
302706
302756
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
302707
302757
|
|
|
302708
302758
|
"use strict";
|
|
@@ -304603,6 +304653,8 @@ var Connector = function (_EventEmitter) {
|
|
|
304603
304653
|
_this.waitingReads = [];
|
|
304604
304654
|
_this.maxParallelReads = options.maxParallelReads || 10;
|
|
304605
304655
|
_this.readingCalls = 0;
|
|
304656
|
+
_this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;
|
|
304657
|
+
_this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;
|
|
304606
304658
|
_this.state = {};
|
|
304607
304659
|
_this.queue = [];
|
|
304608
304660
|
|
|
@@ -304709,7 +304761,7 @@ var Connector = function (_EventEmitter) {
|
|
|
304709
304761
|
var _this3 = this;
|
|
304710
304762
|
|
|
304711
304763
|
var tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
304712
|
-
var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] :
|
|
304764
|
+
var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.retryTimeout;
|
|
304713
304765
|
var callback = arguments.length > 5 ? arguments[5] : undefined;
|
|
304714
304766
|
if (!lng.length) return callback(null, {});
|
|
304715
304767
|
|
|
@@ -304735,7 +304787,7 @@ var Connector = function (_EventEmitter) {
|
|
|
304735
304787
|
_this3.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);
|
|
304736
304788
|
}
|
|
304737
304789
|
|
|
304738
|
-
if (err && data && tried <
|
|
304790
|
+
if (err && data && tried < _this3.maxRetries) {
|
|
304739
304791
|
setTimeout(function () {
|
|
304740
304792
|
_this3.read.call(_this3, lng, ns, fcName, tried + 1, wait * 2, callback);
|
|
304741
304793
|
}, wait);
|
|
@@ -304977,7 +305029,7 @@ var I18n = function (_EventEmitter) {
|
|
|
304977
305029
|
options = {};
|
|
304978
305030
|
}
|
|
304979
305031
|
|
|
304980
|
-
if (!options.defaultNS && options.ns) {
|
|
305032
|
+
if (!options.defaultNS && options.defaultNS !== false && options.ns) {
|
|
304981
305033
|
if (typeof options.ns === 'string') {
|
|
304982
305034
|
options.defaultNS = options.ns;
|
|
304983
305035
|
} else if (options.ns.indexOf('translation') < 0) {
|
|
@@ -305557,7 +305609,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
305557
305609
|
/***/ ((module) => {
|
|
305558
305610
|
|
|
305559
305611
|
"use strict";
|
|
305560
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev.
|
|
305612
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.4.0-dev.30","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","build:ci":"npm run -s build && npm run -s build:esm","build:cjs":"tsc 1>&2 --outDir lib/cjs","build:esm":"tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/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-eslintrc -c \\"../../tools/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^3.4.0-dev.30","@itwin/core-bentley":"workspace:^3.4.0-dev.30","@itwin/core-common":"workspace:^3.4.0-dev.30","@itwin/core-geometry":"workspace:^3.4.0-dev.30","@itwin/core-orbitgt":"workspace:^3.4.0-dev.30","@itwin/core-quantity":"workspace:^3.4.0-dev.30","@itwin/webgl-compatibility":"workspace:^3.4.0-dev.30"},"//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/certa":"workspace:*","@itwin/eslint-plugin":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/lodash":"^4.14.0","@types/mocha":"^8.2.2","@types/node":"16.11.7","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.64.4"},"//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/core-telemetry":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","lodash":"^4.17.10","qs":"^6.5.1","semver":"^7.3.5","superagent":"7.1.3","wms-capabilities":"0.4.0","xml-js":"~1.6.11"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
|
|
305561
305613
|
|
|
305562
305614
|
/***/ }),
|
|
305563
305615
|
|