@itwin/ecschema-rpcinterface-tests 5.14.0-dev.11 → 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 +55 -26
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -90292,6 +90292,7 @@ class CoordinateConverter {
|
|
|
90292
90292
|
_maxPointsPerRequest;
|
|
90293
90293
|
_isIModelClosed;
|
|
90294
90294
|
_requestPoints;
|
|
90295
|
+
_direction;
|
|
90295
90296
|
// If true, [[dispatch]] will schedule another dispatch after it receives a response.
|
|
90296
90297
|
// This is needed when all the points requested after the most recent dispatch were included in the currently-in-flight request -
|
|
90297
90298
|
// _pending will be empty but new callers will be awaiting the results of the in-flight request.
|
|
@@ -90316,6 +90317,7 @@ class CoordinateConverter {
|
|
|
90316
90317
|
this._maxPointsPerRequest = Math.max(1, opts.maxPointsPerRequest ?? 300);
|
|
90317
90318
|
this._isIModelClosed = opts.isIModelClosed;
|
|
90318
90319
|
this._requestPoints = opts.requestPoints;
|
|
90320
|
+
this._direction = opts.direction;
|
|
90319
90321
|
this._cache = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Dictionary(compareXYAndZ, cloneXYAndZ);
|
|
90320
90322
|
this._pending = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.SortedArray(compareXYAndZ, false, cloneXYAndZ);
|
|
90321
90323
|
this._inflight = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.SortedArray(compareXYAndZ, false, cloneXYAndZ);
|
|
@@ -90350,7 +90352,10 @@ class CoordinateConverter {
|
|
|
90350
90352
|
this._cache.set(requests[j], results[j]);
|
|
90351
90353
|
}
|
|
90352
90354
|
}).catch((err) => {
|
|
90353
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(`${_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_2__.FrontendLoggerCategory.Package}.geoservices`, err)
|
|
90355
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logError(`${_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_2__.FrontendLoggerCategory.Package}.geoservices`, err, () => ({
|
|
90356
|
+
direction: this._direction,
|
|
90357
|
+
pointCount: requests.length,
|
|
90358
|
+
}));
|
|
90354
90359
|
});
|
|
90355
90360
|
promises.push(promise);
|
|
90356
90361
|
}
|
|
@@ -90446,10 +90451,12 @@ class GeoConverter {
|
|
|
90446
90451
|
constructor(opts) {
|
|
90447
90452
|
const isIModelClosed = opts.isIModelClosed;
|
|
90448
90453
|
this._geoToIModel = new CoordinateConverter({
|
|
90454
|
+
direction: "geoToIModel",
|
|
90449
90455
|
isIModelClosed,
|
|
90450
90456
|
requestPoints: async (geoCoords) => opts.toIModelCoords({ source: opts.datum, geoCoords }),
|
|
90451
90457
|
});
|
|
90452
90458
|
this._iModelToGeo = new CoordinateConverter({
|
|
90459
|
+
direction: "iModelToGeo",
|
|
90453
90460
|
isIModelClosed,
|
|
90454
90461
|
requestPoints: async (iModelCoords) => opts.fromIModelCoords({ target: opts.datum, iModelCoords }),
|
|
90455
90462
|
});
|
|
@@ -116193,6 +116200,45 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
116193
116200
|
*/
|
|
116194
116201
|
|
|
116195
116202
|
|
|
116203
|
+
/** The Extensions loading system has the following goals:
|
|
116204
|
+
* 1. Only fetch what is needed when it is required
|
|
116205
|
+
* 1. Load a manifest file
|
|
116206
|
+
* 2. Load the the main module when necessary (usually at an activation event)
|
|
116207
|
+
* 2. Download the extension's files
|
|
116208
|
+
*
|
|
116209
|
+
* 3 ways to load an Extension into the system:
|
|
116210
|
+
*
|
|
116211
|
+
* 1. Load both the Extension Manifest and import the main module of the extension from a local file/package.
|
|
116212
|
+
* 2. A minimum set of properties to get the manifest and javascript from a remote server.
|
|
116213
|
+
* 3. A minimum set of properties to get the manifest and javascript from Bentley's Extension Service.
|
|
116214
|
+
*
|
|
116215
|
+
* An Extension must be added to ExtensionAdmin before it can be executed during activation events.
|
|
116216
|
+
*/
|
|
116217
|
+
/**
|
|
116218
|
+
* Normalizes hostnames for comparison.
|
|
116219
|
+
* @returns The normalized hostname of a URL or bare hostname.
|
|
116220
|
+
* @throws Error if the input cannot be parsed, or does not contain a hostname.
|
|
116221
|
+
*/
|
|
116222
|
+
function normalizeHostname(input) {
|
|
116223
|
+
const invalid = () => new Error(`"${input}" is not a valid URL or hostname (i.e. http://localhost:3000, yourdomain.com, etc.).`);
|
|
116224
|
+
// inputs without a scheme (e.g., https://) will throw an error in the URL constructor
|
|
116225
|
+
const inputWithScheme = /^[a-z][a-z0-9+\-.]*:\/\//i.test(input) ? input : `https://${input}`;
|
|
116226
|
+
let hostname;
|
|
116227
|
+
try {
|
|
116228
|
+
hostname = new URL(inputWithScheme).hostname.toLowerCase();
|
|
116229
|
+
}
|
|
116230
|
+
catch {
|
|
116231
|
+
throw invalid();
|
|
116232
|
+
}
|
|
116233
|
+
// strip only a leading "www." label - removing "www" anywhere would make unrelated
|
|
116234
|
+
// hosts like "wwwexample.com" compare equal to "example.com"
|
|
116235
|
+
const normalized = hostname.startsWith("www.") ? hostname.substring("www.".length) : hostname;
|
|
116236
|
+
// schemes with an optional or opaque host (e.g. file:///, data:) parse successfully but carry no
|
|
116237
|
+
// hostname, and an input of just "www." normalizes to nothing. Neither can identify a host.
|
|
116238
|
+
if (normalized.length === 0)
|
|
116239
|
+
throw invalid();
|
|
116240
|
+
return normalized;
|
|
116241
|
+
}
|
|
116196
116242
|
/** The Extension Admin controls the list of currently loaded Extensions.
|
|
116197
116243
|
*
|
|
116198
116244
|
* @alpha
|
|
@@ -116217,10 +116263,10 @@ class ExtensionAdmin {
|
|
|
116217
116263
|
* @alpha
|
|
116218
116264
|
*/
|
|
116219
116265
|
async addExtension(provider) {
|
|
116220
|
-
if (provider.hostname) {
|
|
116221
|
-
const
|
|
116222
|
-
if (this._hosts.
|
|
116223
|
-
throw new Error(`Error loading extension: ${
|
|
116266
|
+
if (provider.hostname !== undefined && this._hosts.length > 0) {
|
|
116267
|
+
const hostname = normalizeHostname(provider.hostname);
|
|
116268
|
+
if (this._hosts.indexOf(hostname) < 0) {
|
|
116269
|
+
throw new Error(`Error loading extension: ${provider.hostname} was not registered.`);
|
|
116224
116270
|
}
|
|
116225
116271
|
}
|
|
116226
116272
|
try {
|
|
@@ -116251,28 +116297,11 @@ class ExtensionAdmin {
|
|
|
116251
116297
|
* @param hostUrl (string) Accepts both URLs and hostnames (e.g., http://localhost:3000, yourdomain.com, https://www.yourdomain.com, etc.).
|
|
116252
116298
|
*/
|
|
116253
116299
|
registerHost(hostUrl) {
|
|
116254
|
-
const hostname =
|
|
116300
|
+
const hostname = normalizeHostname(hostUrl);
|
|
116255
116301
|
if (this._hosts.indexOf(hostname) < 0) {
|
|
116256
116302
|
this._hosts.push(hostname);
|
|
116257
116303
|
}
|
|
116258
116304
|
}
|
|
116259
|
-
/** Returns the hostname of an input string. Throws an error if input is not a valid hostname (or URL). */
|
|
116260
|
-
getHostName(inputUrl) {
|
|
116261
|
-
// inputs without a protocol (e.g., http://) will throw an error in URL constructor
|
|
116262
|
-
const inputWithProtocol = /(http|https):\/\//.test(inputUrl) ?
|
|
116263
|
-
inputUrl :
|
|
116264
|
-
`https://${inputUrl}`;
|
|
116265
|
-
try {
|
|
116266
|
-
const hostname = new URL(inputWithProtocol).hostname.replace("www.", "");
|
|
116267
|
-
return hostname;
|
|
116268
|
-
}
|
|
116269
|
-
catch (e) {
|
|
116270
|
-
if (e instanceof TypeError) {
|
|
116271
|
-
throw new Error("Argument hostUrl should be a valid URL or hostname (i.e. http://localhost:3000, yourdomain.com, etc.).");
|
|
116272
|
-
}
|
|
116273
|
-
throw e;
|
|
116274
|
-
}
|
|
116275
|
-
}
|
|
116276
116305
|
/** Loops over all enabled Extensions and triggers each one if the provided event is defined. */
|
|
116277
116306
|
async activateExtensionEvents(event) {
|
|
116278
116307
|
for (const extension of this._extensions.values()) {
|
|
@@ -116750,11 +116779,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
116750
116779
|
*/
|
|
116751
116780
|
class RemoteExtensionProvider {
|
|
116752
116781
|
_props;
|
|
116753
|
-
/** The
|
|
116782
|
+
/** The hostname of the server where the extension is hosted. */
|
|
116754
116783
|
hostname;
|
|
116755
116784
|
constructor(_props) {
|
|
116756
116785
|
this._props = _props;
|
|
116757
|
-
this.hostname = new URL(this._props.jsUrl).hostname
|
|
116786
|
+
this.hostname = new URL(this._props.jsUrl).hostname;
|
|
116758
116787
|
}
|
|
116759
116788
|
/**
|
|
116760
116789
|
* Attempts to execute an extension.
|
|
@@ -336970,7 +336999,7 @@ class WMS {
|
|
|
336970
336999
|
(module) {
|
|
336971
337000
|
|
|
336972
337001
|
"use strict";
|
|
336973
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.14.0-dev.
|
|
337002
|
+
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"}}');
|
|
336974
337003
|
|
|
336975
337004
|
/***/ }
|
|
336976
337005
|
|