@itwin/rpcinterface-full-stack-tests 4.3.0-dev.35 → 4.3.0-dev.37
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 +24 -17
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +13 -13
|
@@ -70502,7 +70502,7 @@ class KindOfQuantity extends SchemaItem_1.SchemaItem {
|
|
|
70502
70502
|
}
|
|
70503
70503
|
}
|
|
70504
70504
|
let i = 4;
|
|
70505
|
-
while (i < match.length) {
|
|
70505
|
+
while (i < match.length - 1) { // The regex match ends with an empty last value, which causes problems when exactly 4 unit overrides as specified, so ignore this last empty value
|
|
70506
70506
|
if (undefined === match[i])
|
|
70507
70507
|
break;
|
|
70508
70508
|
// Unit override required
|
|
@@ -70511,7 +70511,7 @@ class KindOfQuantity extends SchemaItem_1.SchemaItem {
|
|
|
70511
70511
|
if (undefined === returnValue.unitAndLabels)
|
|
70512
70512
|
returnValue.unitAndLabels = [];
|
|
70513
70513
|
if (undefined !== match[i + 2]) // matches '|'
|
|
70514
|
-
returnValue.unitAndLabels.push([match[i + 1], match[i + 3]]); // add unit name and label override
|
|
70514
|
+
returnValue.unitAndLabels.push([match[i + 1], match[i + 3] ?? ""]); // add unit name and label override (if '|' matches and next value is undefined, save it as an empty string)
|
|
70515
70515
|
else
|
|
70516
70516
|
returnValue.unitAndLabels.push([match[i + 1], undefined]); // add unit name
|
|
70517
70517
|
i += 4;
|
|
@@ -157101,6 +157101,7 @@ class MapLayerFormatRegistry {
|
|
|
157101
157101
|
else if (typeof formatIdOrArgs !== "string") {
|
|
157102
157102
|
const entry = this._formats.get(formatIdOrArgs.source.formatId);
|
|
157103
157103
|
format = entry?.type;
|
|
157104
|
+
args = formatIdOrArgs;
|
|
157104
157105
|
}
|
|
157105
157106
|
if (!args || !format)
|
|
157106
157107
|
return { status: _internal__WEBPACK_IMPORTED_MODULE_2__.MapLayerSourceStatus.InvalidFormat };
|
|
@@ -284890,7 +284891,7 @@ class TestContext {
|
|
|
284890
284891
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
284891
284892
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
284892
284893
|
await core_frontend_1.NoRenderApp.startup({
|
|
284893
|
-
applicationVersion: "4.3.0-dev.
|
|
284894
|
+
applicationVersion: "4.3.0-dev.37",
|
|
284894
284895
|
applicationId: this.settings.gprid,
|
|
284895
284896
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
284896
284897
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -286322,9 +286323,9 @@ async function getKoq(schemaLocater, fullName) {
|
|
|
286322
286323
|
return schema.getItem(propKoqName);
|
|
286323
286324
|
}
|
|
286324
286325
|
async function getKoqFormatProps(koq, persistenceUnit, defaultFormats, unitSystem) {
|
|
286325
|
-
const
|
|
286326
|
+
const unitSystemMatchers = getUnitSystemGroupMatchers(unitSystem);
|
|
286326
286327
|
// use one of KOQ presentation format that matches requested unit system
|
|
286327
|
-
const presentationFormat = await getKoqPresentationFormat(koq,
|
|
286328
|
+
const presentationFormat = await getKoqPresentationFormat(koq, unitSystemMatchers);
|
|
286328
286329
|
if (presentationFormat) {
|
|
286329
286330
|
return (0,_itwin_ecschema_metadata__WEBPACK_IMPORTED_MODULE_1__.getFormatProps)(presentationFormat);
|
|
286330
286331
|
}
|
|
@@ -286336,7 +286337,9 @@ async function getKoqFormatProps(koq, persistenceUnit, defaultFormats, unitSyste
|
|
|
286336
286337
|
// istanbul ignore else
|
|
286337
286338
|
if (phenomenon && defaultFormats[phenomenon.name.toUpperCase()]) {
|
|
286338
286339
|
const defaultPhenomenonFormats = defaultFormats[phenomenon.name.toUpperCase()];
|
|
286339
|
-
for (const defaultUnitSystemFormat of Array.isArray(defaultPhenomenonFormats)
|
|
286340
|
+
for (const defaultUnitSystemFormat of Array.isArray(defaultPhenomenonFormats)
|
|
286341
|
+
? /* istanbul ignore next */ defaultPhenomenonFormats
|
|
286342
|
+
: [defaultPhenomenonFormats]) {
|
|
286340
286343
|
if (defaultUnitSystemFormat.unitSystems.includes(unitSystem)) {
|
|
286341
286344
|
return defaultUnitSystemFormat.format;
|
|
286342
286345
|
}
|
|
@@ -286345,7 +286348,7 @@ async function getKoqFormatProps(koq, persistenceUnit, defaultFormats, unitSyste
|
|
|
286345
286348
|
}
|
|
286346
286349
|
// use persistence unit format if it matches requested unit system and matching presentation format was not found
|
|
286347
286350
|
const persistenceUnitSystem = await persistenceUnit.unitSystem;
|
|
286348
|
-
if (persistenceUnitSystem &&
|
|
286351
|
+
if (persistenceUnitSystem && unitSystemMatchers.some((matcher) => matcher(persistenceUnitSystem))) {
|
|
286349
286352
|
return getPersistenceUnitFormatProps(persistenceUnit);
|
|
286350
286353
|
}
|
|
286351
286354
|
// use default presentation format if persistence unit does not match requested unit system
|
|
@@ -286354,9 +286357,9 @@ async function getKoqFormatProps(koq, persistenceUnit, defaultFormats, unitSyste
|
|
|
286354
286357
|
}
|
|
286355
286358
|
return undefined;
|
|
286356
286359
|
}
|
|
286357
|
-
async function getKoqPresentationFormat(koq,
|
|
286360
|
+
async function getKoqPresentationFormat(koq, unitSystemMatchers) {
|
|
286358
286361
|
const presentationFormats = koq.presentationFormats;
|
|
286359
|
-
for (const
|
|
286362
|
+
for (const matcher of unitSystemMatchers) {
|
|
286360
286363
|
for (const format of presentationFormats) {
|
|
286361
286364
|
const unit = format.units && format.units[0][0];
|
|
286362
286365
|
// istanbul ignore if
|
|
@@ -286364,7 +286367,7 @@ async function getKoqPresentationFormat(koq, unitSystems) {
|
|
|
286364
286367
|
continue;
|
|
286365
286368
|
}
|
|
286366
286369
|
const currentUnitSystem = await unit.unitSystem;
|
|
286367
|
-
if (currentUnitSystem && currentUnitSystem
|
|
286370
|
+
if (currentUnitSystem && matcher(currentUnitSystem)) {
|
|
286368
286371
|
return format;
|
|
286369
286372
|
}
|
|
286370
286373
|
}
|
|
@@ -286389,16 +286392,20 @@ function getPersistenceUnitFormatProps(persistenceUnit) {
|
|
|
286389
286392
|
},
|
|
286390
286393
|
};
|
|
286391
286394
|
}
|
|
286392
|
-
function
|
|
286393
|
-
|
|
286395
|
+
function getUnitSystemGroupMatchers(groupKey) {
|
|
286396
|
+
function createMatcher(name) {
|
|
286397
|
+
const names = Array.isArray(name) ? name : [name];
|
|
286398
|
+
return (unitSystem) => names.some((n) => n === unitSystem.name.toUpperCase());
|
|
286399
|
+
}
|
|
286400
|
+
switch (groupKey) {
|
|
286394
286401
|
case "imperial":
|
|
286395
|
-
return ["IMPERIAL", "USCUSTOM", "INTERNATIONAL", "FINANCE"];
|
|
286402
|
+
return ["IMPERIAL", "USCUSTOM", "INTERNATIONAL", "FINANCE"].map(createMatcher);
|
|
286396
286403
|
case "metric":
|
|
286397
|
-
return ["SI", "METRIC", "INTERNATIONAL", "FINANCE"];
|
|
286404
|
+
return [["SI", "METRIC"], "INTERNATIONAL", "FINANCE"].map(createMatcher);
|
|
286398
286405
|
case "usCustomary":
|
|
286399
|
-
return ["USCUSTOM", "INTERNATIONAL", "FINANCE"];
|
|
286406
|
+
return ["USCUSTOM", "INTERNATIONAL", "FINANCE"].map(createMatcher);
|
|
286400
286407
|
case "usSurvey":
|
|
286401
|
-
return ["USSURVEY", "USCUSTOM", "INTERNATIONAL", "FINANCE"];
|
|
286408
|
+
return ["USSURVEY", "USCUSTOM", "INTERNATIONAL", "FINANCE"].map(createMatcher);
|
|
286402
286409
|
}
|
|
286403
286410
|
return [];
|
|
286404
286411
|
}
|
|
@@ -303648,7 +303655,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
303648
303655
|
/***/ ((module) => {
|
|
303649
303656
|
|
|
303650
303657
|
"use strict";
|
|
303651
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.
|
|
303658
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.37","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint -c extraction.eslint.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 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.3.0-dev.37","@itwin/core-bentley":"workspace:^4.3.0-dev.37","@itwin/core-common":"workspace:^4.3.0-dev.37","@itwin/core-geometry":"workspace:^4.3.0-dev.37","@itwin/core-orbitgt":"workspace:^4.3.0-dev.37","@itwin/core-quantity":"workspace:^4.3.0-dev.37"},"//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":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/sinon":"^10.0.15","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^15.0.4","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.1.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
303652
303659
|
|
|
303653
303660
|
/***/ }),
|
|
303654
303661
|
|