@itwin/rpcinterface-full-stack-tests 5.0.0-dev.39 → 5.0.0-dev.40
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 +45 -17
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +14 -14
|
@@ -302942,6 +302942,10 @@ class ParseToken {
|
|
|
302942
302942
|
}
|
|
302943
302943
|
get isString() { return !this.isOperator && typeof this.value === "string"; }
|
|
302944
302944
|
get isNumber() { return typeof this.value === "number"; }
|
|
302945
|
+
get isSpecialCharacter() {
|
|
302946
|
+
const format = /^[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]+$/;
|
|
302947
|
+
return this.isString && this.value.toString().match(format) !== null;
|
|
302948
|
+
}
|
|
302945
302949
|
}
|
|
302946
302950
|
/** A ScientificToken holds an index and string representing the exponent.
|
|
302947
302951
|
* @beta
|
|
@@ -303181,7 +303185,12 @@ class Parser {
|
|
|
303181
303185
|
if (signToken.length > 0) {
|
|
303182
303186
|
wipToken = signToken + wipToken;
|
|
303183
303187
|
}
|
|
303184
|
-
|
|
303188
|
+
if (isNaN(Number(wipToken))) {
|
|
303189
|
+
tokens.push(new ParseToken(NaN));
|
|
303190
|
+
}
|
|
303191
|
+
else {
|
|
303192
|
+
tokens.push(new ParseToken(parseFloat(wipToken)));
|
|
303193
|
+
}
|
|
303185
303194
|
}
|
|
303186
303195
|
else {
|
|
303187
303196
|
tokens.push(new ParseToken(wipToken));
|
|
@@ -303279,8 +303288,6 @@ class Parser {
|
|
|
303279
303288
|
*/
|
|
303280
303289
|
static async parseIntoQuantity(inString, format, unitsProvider, altUnitLabelsProvider) {
|
|
303281
303290
|
const tokens = Parser.parseQuantitySpecification(inString, format);
|
|
303282
|
-
if (tokens.length === 0 || (!format.allowMathematicOperations && Parser.isMathematicOperation(tokens)))
|
|
303283
|
-
return new _Quantity__WEBPACK_IMPORTED_MODULE_3__.Quantity();
|
|
303284
303291
|
return Parser.createQuantityFromParseTokens(tokens, format, unitsProvider, altUnitLabelsProvider);
|
|
303285
303292
|
}
|
|
303286
303293
|
/** method to get the Unit Conversion given a unit label */
|
|
@@ -303373,6 +303380,14 @@ class Parser {
|
|
|
303373
303380
|
* Accumulate the given list of tokens into a single quantity value. Formatting the tokens along the way.
|
|
303374
303381
|
*/
|
|
303375
303382
|
static getQuantityValueFromParseTokens(tokens, format, unitsConversions, defaultUnitConversion) {
|
|
303383
|
+
if (tokens.length === 0)
|
|
303384
|
+
return { ok: false, error: ParseError.UnableToGenerateParseTokens };
|
|
303385
|
+
if (!format.allowMathematicOperations && Parser.isMathematicOperation(tokens))
|
|
303386
|
+
return { ok: false, error: ParseError.MathematicOperationFoundButIsNotAllowed };
|
|
303387
|
+
if (tokens.some((token) => token.isNumber && isNaN(token.value)) ||
|
|
303388
|
+
tokens.every((token) => token.isSpecialCharacter)) {
|
|
303389
|
+
return { ok: false, error: ParseError.UnableToConvertParseTokensToQuantity };
|
|
303390
|
+
}
|
|
303376
303391
|
const defaultUnit = format.units && format.units.length > 0 ? format.units[0][0] : undefined;
|
|
303377
303392
|
defaultUnitConversion = defaultUnitConversion ? defaultUnitConversion : Parser.getDefaultUnitConversion(tokens, unitsConversions, defaultUnit);
|
|
303378
303393
|
let tokenPair;
|
|
@@ -303490,6 +303505,16 @@ class Parser {
|
|
|
303490
303505
|
return this.parseAndProcessTokens(inString, format, unitsConversions);
|
|
303491
303506
|
}
|
|
303492
303507
|
static parseBearingFormat(inString, spec) {
|
|
303508
|
+
const specialDirections = {
|
|
303509
|
+
n: 0,
|
|
303510
|
+
ne: 45,
|
|
303511
|
+
e: 90,
|
|
303512
|
+
se: 135,
|
|
303513
|
+
s: 180,
|
|
303514
|
+
sw: 225,
|
|
303515
|
+
w: 270,
|
|
303516
|
+
nw: 315,
|
|
303517
|
+
};
|
|
303493
303518
|
// TODO: at some point we will want to open this for localization, in the first release it's going to be hard coded
|
|
303494
303519
|
let DirectionLabel;
|
|
303495
303520
|
(function (DirectionLabel) {
|
|
@@ -303501,28 +303526,36 @@ class Parser {
|
|
|
303501
303526
|
let matchedPrefix = null;
|
|
303502
303527
|
let matchedSuffix = null;
|
|
303503
303528
|
// check if input string begins with northLabel or southLabel and strip it off
|
|
303504
|
-
if (inString.startsWith(DirectionLabel.North)) {
|
|
303529
|
+
if (inString.toUpperCase().startsWith(DirectionLabel.North)) {
|
|
303505
303530
|
inString = inString.substring(DirectionLabel.North.length);
|
|
303506
303531
|
matchedPrefix = DirectionLabel.North;
|
|
303507
303532
|
}
|
|
303508
|
-
else if (inString.startsWith(DirectionLabel.South)) {
|
|
303533
|
+
else if (inString.toUpperCase().startsWith(DirectionLabel.South)) {
|
|
303509
303534
|
inString = inString.substring(DirectionLabel.South.length);
|
|
303510
303535
|
matchedPrefix = DirectionLabel.South;
|
|
303511
303536
|
}
|
|
303512
|
-
// check if input string ends with eastLabel or westLabel and strip it off
|
|
303513
|
-
if (inString.endsWith(DirectionLabel.East)) {
|
|
303537
|
+
// check if input string ends with eastLabel or westLabel (case-insensitive) and strip it off
|
|
303538
|
+
if (inString.toUpperCase().endsWith(DirectionLabel.East)) {
|
|
303514
303539
|
inString = inString.substring(0, inString.length - DirectionLabel.East.length);
|
|
303515
303540
|
matchedSuffix = DirectionLabel.East;
|
|
303516
303541
|
}
|
|
303517
|
-
else if (inString.endsWith(DirectionLabel.West)) {
|
|
303542
|
+
else if (inString.toUpperCase().endsWith(DirectionLabel.West)) {
|
|
303518
303543
|
inString = inString.substring(0, inString.length - DirectionLabel.West.length);
|
|
303519
303544
|
matchedSuffix = DirectionLabel.West;
|
|
303520
303545
|
}
|
|
303546
|
+
// check if the remaining string is a special direction
|
|
303547
|
+
if (inString.trim() === "") {
|
|
303548
|
+
const prefix = matchedPrefix?.toLowerCase() || "";
|
|
303549
|
+
const suffix = matchedSuffix?.toLowerCase() || "";
|
|
303550
|
+
const specialDirection = specialDirections[`${prefix}${suffix}`];
|
|
303551
|
+
if (specialDirection !== undefined)
|
|
303552
|
+
return { ok: true, value: specialDirection };
|
|
303553
|
+
}
|
|
303521
303554
|
if (matchedPrefix === null || matchedSuffix === null) {
|
|
303522
303555
|
return { ok: false, error: ParseError.BearingPrefixOrSuffixMissing };
|
|
303523
303556
|
}
|
|
303524
303557
|
const parsedResult = this.parseAndProcessTokens(inString, spec.format, spec.unitConversions);
|
|
303525
|
-
if (this.isParseError(parsedResult)
|
|
303558
|
+
if (this.isParseError(parsedResult)) {
|
|
303526
303559
|
return parsedResult;
|
|
303527
303560
|
}
|
|
303528
303561
|
let magnitude = parsedResult.value;
|
|
@@ -303547,7 +303580,7 @@ class Parser {
|
|
|
303547
303580
|
}
|
|
303548
303581
|
static parseAzimuthFormat(inString, spec) {
|
|
303549
303582
|
const parsedResult = this.parseAndProcessTokens(inString, spec.format, spec.unitConversions);
|
|
303550
|
-
if (this.isParseError(parsedResult)
|
|
303583
|
+
if (this.isParseError(parsedResult)) {
|
|
303551
303584
|
return parsedResult;
|
|
303552
303585
|
}
|
|
303553
303586
|
let magnitude = parsedResult.value;
|
|
@@ -303646,11 +303679,6 @@ class Parser {
|
|
|
303646
303679
|
}
|
|
303647
303680
|
static parseAndProcessTokens(inString, format, unitsConversions) {
|
|
303648
303681
|
const tokens = Parser.parseQuantitySpecification(inString, format);
|
|
303649
|
-
if (tokens.length === 0)
|
|
303650
|
-
return { ok: false, error: ParseError.UnableToGenerateParseTokens };
|
|
303651
|
-
if (!format.allowMathematicOperations && Parser.isMathematicOperation(tokens)) {
|
|
303652
|
-
return { ok: false, error: ParseError.MathematicOperationFoundButIsNotAllowed };
|
|
303653
|
-
}
|
|
303654
303682
|
if (Parser._log) {
|
|
303655
303683
|
// eslint-disable-next-line no-console
|
|
303656
303684
|
console.log(`Parse tokens`);
|
|
@@ -305105,7 +305133,7 @@ class TestContext {
|
|
|
305105
305133
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
305106
305134
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
305107
305135
|
await core_frontend_1.NoRenderApp.startup({
|
|
305108
|
-
applicationVersion: "5.0.0-dev.
|
|
305136
|
+
applicationVersion: "5.0.0-dev.40",
|
|
305109
305137
|
applicationId: this.settings.gprid,
|
|
305110
305138
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
305111
305139
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -332852,7 +332880,7 @@ function __rewriteRelativeImportExtension(path, preserveJsx) {
|
|
|
332852
332880
|
/***/ ((module) => {
|
|
332853
332881
|
|
|
332854
332882
|
"use strict";
|
|
332855
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.
|
|
332883
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.0.0-dev.40","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 ES2022 --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 --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 --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","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run --coverage","test:debug":"vitest --run","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:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"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":{"@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/eslint-plugin":"5.0.0-dev.1","@types/chai-as-promised":"^7","@vitest/browser":"^2.1.0","@vitest/coverage-v8":"^2.1.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","cpx2":"^3.0.0","eslint":"^9.13.0","glob":"^10.3.12","playwright":"~1.47.1","rimraf":"^3.0.2","source-map-loader":"^4.0.0","typescript":"~5.6.2","typemoq":"^2.1.0","vitest":"^2.1.0","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"1.0.6","webpack":"^5.97.1"},"//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.2.4","@itwin/object-storage-core":"^2.2.5","@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"}}');
|
|
332856
332884
|
|
|
332857
332885
|
/***/ }),
|
|
332858
332886
|
|