@itwin/rpcinterface-full-stack-tests 5.14.0-dev.12 → 5.14.0-dev.14
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 +56 -27
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -110301,6 +110301,7 @@ class CoordinateConverter {
|
|
|
110301
110301
|
_maxPointsPerRequest;
|
|
110302
110302
|
_isIModelClosed;
|
|
110303
110303
|
_requestPoints;
|
|
110304
|
+
_direction;
|
|
110304
110305
|
// If true, [[dispatch]] will schedule another dispatch after it receives a response.
|
|
110305
110306
|
// This is needed when all the points requested after the most recent dispatch were included in the currently-in-flight request -
|
|
110306
110307
|
// _pending will be empty but new callers will be awaiting the results of the in-flight request.
|
|
@@ -110325,6 +110326,7 @@ class CoordinateConverter {
|
|
|
110325
110326
|
this._maxPointsPerRequest = Math.max(1, opts.maxPointsPerRequest ?? 300);
|
|
110326
110327
|
this._isIModelClosed = opts.isIModelClosed;
|
|
110327
110328
|
this._requestPoints = opts.requestPoints;
|
|
110329
|
+
this._direction = opts.direction;
|
|
110328
110330
|
this._cache = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Dictionary(compareXYAndZ, cloneXYAndZ);
|
|
110329
110331
|
this._pending = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.SortedArray(compareXYAndZ, false, cloneXYAndZ);
|
|
110330
110332
|
this._inflight = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.SortedArray(compareXYAndZ, false, cloneXYAndZ);
|
|
@@ -110359,7 +110361,10 @@ class CoordinateConverter {
|
|
|
110359
110361
|
this._cache.set(requests[j], results[j]);
|
|
110360
110362
|
}
|
|
110361
110363
|
}).catch((err) => {
|
|
110362
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(`${_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_2__.FrontendLoggerCategory.Package}.geoservices`, err)
|
|
110364
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(`${_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_2__.FrontendLoggerCategory.Package}.geoservices`, err, () => ({
|
|
110365
|
+
direction: this._direction,
|
|
110366
|
+
pointCount: requests.length,
|
|
110367
|
+
}));
|
|
110363
110368
|
});
|
|
110364
110369
|
promises.push(promise);
|
|
110365
110370
|
}
|
|
@@ -110455,10 +110460,12 @@ class GeoConverter {
|
|
|
110455
110460
|
constructor(opts) {
|
|
110456
110461
|
const isIModelClosed = opts.isIModelClosed;
|
|
110457
110462
|
this._geoToIModel = new CoordinateConverter({
|
|
110463
|
+
direction: "geoToIModel",
|
|
110458
110464
|
isIModelClosed,
|
|
110459
110465
|
requestPoints: async (geoCoords) => opts.toIModelCoords({ source: opts.datum, geoCoords }),
|
|
110460
110466
|
});
|
|
110461
110467
|
this._iModelToGeo = new CoordinateConverter({
|
|
110468
|
+
direction: "iModelToGeo",
|
|
110462
110469
|
isIModelClosed,
|
|
110463
110470
|
requestPoints: async (iModelCoords) => opts.fromIModelCoords({ target: opts.datum, iModelCoords }),
|
|
110464
110471
|
});
|
|
@@ -136202,6 +136209,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
136202
136209
|
*/
|
|
136203
136210
|
|
|
136204
136211
|
|
|
136212
|
+
/** The Extensions loading system has the following goals:
|
|
136213
|
+
* 1. Only fetch what is needed when it is required
|
|
136214
|
+
* 1. Load a manifest file
|
|
136215
|
+
* 2. Load the the main module when necessary (usually at an activation event)
|
|
136216
|
+
* 2. Download the extension's files
|
|
136217
|
+
*
|
|
136218
|
+
* 3 ways to load an Extension into the system:
|
|
136219
|
+
*
|
|
136220
|
+
* 1. Load both the Extension Manifest and import the main module of the extension from a local file/package.
|
|
136221
|
+
* 2. A minimum set of properties to get the manifest and javascript from a remote server.
|
|
136222
|
+
* 3. A minimum set of properties to get the manifest and javascript from Bentley's Extension Service.
|
|
136223
|
+
*
|
|
136224
|
+
* An Extension must be added to ExtensionAdmin before it can be executed during activation events.
|
|
136225
|
+
*/
|
|
136226
|
+
/**
|
|
136227
|
+
* Normalizes hostnames for comparison.
|
|
136228
|
+
* @returns The normalized hostname of a URL or bare hostname.
|
|
136229
|
+
* @throws Error if the input cannot be parsed, or does not contain a hostname.
|
|
136230
|
+
*/
|
|
136231
|
+
function normalizeHostname(input) {
|
|
136232
|
+
const invalid = () => new Error(`"${input}" is not a valid URL or hostname (i.e. http://localhost:3000, yourdomain.com, etc.).`);
|
|
136233
|
+
// inputs without a scheme (e.g., https://) will throw an error in the URL constructor
|
|
136234
|
+
const inputWithScheme = /^[a-z][a-z0-9+\-.]*:\/\//i.test(input) ? input : `https://${input}`;
|
|
136235
|
+
let hostname;
|
|
136236
|
+
try {
|
|
136237
|
+
hostname = new URL(inputWithScheme).hostname.toLowerCase();
|
|
136238
|
+
}
|
|
136239
|
+
catch {
|
|
136240
|
+
throw invalid();
|
|
136241
|
+
}
|
|
136242
|
+
// strip only a leading "www." label - removing "www" anywhere would make unrelated
|
|
136243
|
+
// hosts like "wwwexample.com" compare equal to "example.com"
|
|
136244
|
+
const normalized = hostname.startsWith("www.") ? hostname.substring("www.".length) : hostname;
|
|
136245
|
+
// schemes with an optional or opaque host (e.g. file:///, data:) parse successfully but carry no
|
|
136246
|
+
// hostname, and an input of just "www." normalizes to nothing. Neither can identify a host.
|
|
136247
|
+
if (normalized.length === 0)
|
|
136248
|
+
throw invalid();
|
|
136249
|
+
return normalized;
|
|
136250
|
+
}
|
|
136205
136251
|
/** The Extension Admin controls the list of currently loaded Extensions.
|
|
136206
136252
|
*
|
|
136207
136253
|
* @alpha
|
|
@@ -136226,10 +136272,10 @@ class ExtensionAdmin {
|
|
|
136226
136272
|
* @alpha
|
|
136227
136273
|
*/
|
|
136228
136274
|
async addExtension(provider) {
|
|
136229
|
-
if (provider.hostname) {
|
|
136230
|
-
const
|
|
136231
|
-
if (this._hosts.
|
|
136232
|
-
throw new Error(`Error loading extension: ${
|
|
136275
|
+
if (provider.hostname !== undefined && this._hosts.length > 0) {
|
|
136276
|
+
const hostname = normalizeHostname(provider.hostname);
|
|
136277
|
+
if (this._hosts.indexOf(hostname) < 0) {
|
|
136278
|
+
throw new Error(`Error loading extension: ${provider.hostname} was not registered.`);
|
|
136233
136279
|
}
|
|
136234
136280
|
}
|
|
136235
136281
|
try {
|
|
@@ -136260,28 +136306,11 @@ class ExtensionAdmin {
|
|
|
136260
136306
|
* @param hostUrl (string) Accepts both URLs and hostnames (e.g., http://localhost:3000, yourdomain.com, https://www.yourdomain.com, etc.).
|
|
136261
136307
|
*/
|
|
136262
136308
|
registerHost(hostUrl) {
|
|
136263
|
-
const hostname =
|
|
136309
|
+
const hostname = normalizeHostname(hostUrl);
|
|
136264
136310
|
if (this._hosts.indexOf(hostname) < 0) {
|
|
136265
136311
|
this._hosts.push(hostname);
|
|
136266
136312
|
}
|
|
136267
136313
|
}
|
|
136268
|
-
/** Returns the hostname of an input string. Throws an error if input is not a valid hostname (or URL). */
|
|
136269
|
-
getHostName(inputUrl) {
|
|
136270
|
-
// inputs without a protocol (e.g., http://) will throw an error in URL constructor
|
|
136271
|
-
const inputWithProtocol = /(http|https):\/\//.test(inputUrl) ?
|
|
136272
|
-
inputUrl :
|
|
136273
|
-
`https://${inputUrl}`;
|
|
136274
|
-
try {
|
|
136275
|
-
const hostname = new URL(inputWithProtocol).hostname.replace("www.", "");
|
|
136276
|
-
return hostname;
|
|
136277
|
-
}
|
|
136278
|
-
catch (e) {
|
|
136279
|
-
if (e instanceof TypeError) {
|
|
136280
|
-
throw new Error("Argument hostUrl should be a valid URL or hostname (i.e. http://localhost:3000, yourdomain.com, etc.).");
|
|
136281
|
-
}
|
|
136282
|
-
throw e;
|
|
136283
|
-
}
|
|
136284
|
-
}
|
|
136285
136314
|
/** Loops over all enabled Extensions and triggers each one if the provided event is defined. */
|
|
136286
136315
|
async activateExtensionEvents(event) {
|
|
136287
136316
|
for (const extension of this._extensions.values()) {
|
|
@@ -136759,11 +136788,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
136759
136788
|
*/
|
|
136760
136789
|
class RemoteExtensionProvider {
|
|
136761
136790
|
_props;
|
|
136762
|
-
/** The
|
|
136791
|
+
/** The hostname of the server where the extension is hosted. */
|
|
136763
136792
|
hostname;
|
|
136764
136793
|
constructor(_props) {
|
|
136765
136794
|
this._props = _props;
|
|
136766
|
-
this.hostname = new URL(this._props.jsUrl).hostname
|
|
136795
|
+
this.hostname = new URL(this._props.jsUrl).hostname;
|
|
136767
136796
|
}
|
|
136768
136797
|
/**
|
|
136769
136798
|
* Attempts to execute an extension.
|
|
@@ -343390,7 +343419,7 @@ class TestContext {
|
|
|
343390
343419
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
343391
343420
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
343392
343421
|
await core_frontend_1.NoRenderApp.startup({
|
|
343393
|
-
applicationVersion: "5.14.0-dev.
|
|
343422
|
+
applicationVersion: "5.14.0-dev.14",
|
|
343394
343423
|
applicationId: this.settings.gprid,
|
|
343395
343424
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
343396
343425
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -370132,7 +370161,7 @@ class WMS {
|
|
|
370132
370161
|
(module) {
|
|
370133
370162
|
|
|
370134
370163
|
"use strict";
|
|
370135
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.0-dev.
|
|
370164
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.0-dev.14","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":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.11","@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/node":"~20.17.0","@types/sinon":"^17.0.2","@vitest/browser-playwright":"^4.1.10","@vitest/coverage-v8":"^4.1.10","cpx2":"^8.0.0","eslint":"^9.31.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","typescript":"~5.6.2","vite":"^6.4.3","vitest":"^4.1.10","vite-plugin-static-copy":"2.2.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/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"}}');
|
|
370136
370165
|
|
|
370137
370166
|
/***/ },
|
|
370138
370167
|
|