@itwin/rpcinterface-full-stack-tests 5.16.0-dev.2 → 5.16.0-dev.4
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 +50 -4
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -210224,7 +210224,14 @@ class ToolAdmin {
|
|
|
210224
210224
|
return false;
|
|
210225
210225
|
if (!await this.finishEditCommandForTxnOperation())
|
|
210226
210226
|
return false;
|
|
210227
|
-
|
|
210227
|
+
try {
|
|
210228
|
+
await imodel.txns.reverseSingleTxnAsync();
|
|
210229
|
+
return true;
|
|
210230
|
+
}
|
|
210231
|
+
catch (error) {
|
|
210232
|
+
await this.onTxnOperationError("undo", error);
|
|
210233
|
+
return false;
|
|
210234
|
+
}
|
|
210228
210235
|
}
|
|
210229
210236
|
/** Called to redo previous data button for primitive tools or undo last write operation. */
|
|
210230
210237
|
async doRedoOperation() {
|
|
@@ -210239,8 +210246,47 @@ class ToolAdmin {
|
|
|
210239
210246
|
return false;
|
|
210240
210247
|
if (!await this.finishEditCommandForTxnOperation())
|
|
210241
210248
|
return false;
|
|
210242
|
-
|
|
210249
|
+
try {
|
|
210250
|
+
await imodel.txns.reinstateTxnAsync();
|
|
210251
|
+
return true;
|
|
210252
|
+
}
|
|
210253
|
+
catch (error) {
|
|
210254
|
+
await this.onTxnOperationError("redo", error);
|
|
210255
|
+
return false;
|
|
210256
|
+
}
|
|
210257
|
+
}
|
|
210258
|
+
/** Called to undo all changes made to the briefcase in the current session.
|
|
210259
|
+
* @returns `true` if all changes were reversed or there was nothing to undo, `false` otherwise.
|
|
210260
|
+
* @see [[doUndoOperation]] to undo only the most recent operation.
|
|
210261
|
+
* @beta
|
|
210262
|
+
*/
|
|
210263
|
+
async doUndoAllOperation() {
|
|
210264
|
+
const imodel = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.viewManager.selectedView?.view.iModel;
|
|
210265
|
+
if (undefined === imodel || imodel.isReadonly || !imodel.isBriefcaseConnection())
|
|
210266
|
+
return false;
|
|
210267
|
+
if (!await this.finishEditCommandForTxnOperation())
|
|
210268
|
+
return false;
|
|
210269
|
+
let status;
|
|
210270
|
+
try {
|
|
210271
|
+
status = await imodel.txns.reverseAll();
|
|
210272
|
+
}
|
|
210273
|
+
catch (error) {
|
|
210274
|
+
await this.onTxnOperationError("undoAll", error);
|
|
210275
|
+
return false;
|
|
210276
|
+
}
|
|
210277
|
+
if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.Success === status || _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.IModelStatus.NothingToUndo === status)
|
|
210278
|
+
return true;
|
|
210279
|
+
await this.onTxnOperationError("undoAll", new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.IModelError(status, "Failed to undo all changes"));
|
|
210280
|
+
return false;
|
|
210243
210281
|
}
|
|
210282
|
+
/** Called when [[doUndoOperation]], [[doRedoOperation]] or [[doUndoAllOperation]] fails to reverse or reinstate Txns.
|
|
210283
|
+
* @param _operation The operation that failed.
|
|
210284
|
+
* @param _error The error thrown by [[BriefcaseTxns.reverseSingleTxnAsync]], [[BriefcaseTxns.reinstateTxnAsync]] or [[BriefcaseTxns.reverseAll]].
|
|
210285
|
+
* If [[BriefcaseTxns.reverseAll]] returns an unsuccessful status, this is an [IModelError]($common) with that status as its `errorNumber`.
|
|
210286
|
+
* @note Implementations should not throw. Any exception thrown by this method propagates to the caller of [[doUndoOperation]], [[doRedoOperation]] or [[doUndoAllOperation]].
|
|
210287
|
+
* @beta
|
|
210288
|
+
*/
|
|
210289
|
+
async onTxnOperationError(_operation, _error) { }
|
|
210244
210290
|
onActiveToolChanged(tool, start) {
|
|
210245
210291
|
this.clearMotionPromises();
|
|
210246
210292
|
this.activeToolChanged.raiseEvent(tool, start);
|
|
@@ -344443,7 +344489,7 @@ class TestContext {
|
|
|
344443
344489
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
344444
344490
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
344445
344491
|
await core_frontend_1.NoRenderApp.startup({
|
|
344446
|
-
applicationVersion: "5.16.0-dev.
|
|
344492
|
+
applicationVersion: "5.16.0-dev.4",
|
|
344447
344493
|
applicationId: this.settings.gprid,
|
|
344448
344494
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.serviceAuthToken),
|
|
344449
344495
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -371055,7 +371101,7 @@ class WMS {
|
|
|
371055
371101
|
(module) {
|
|
371056
371102
|
|
|
371057
371103
|
"use strict";
|
|
371058
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.16.0-dev.
|
|
371104
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.16.0-dev.4","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.12","@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.4","vitest":"^4.1.10"},"//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"}}');
|
|
371059
371105
|
|
|
371060
371106
|
/***/ },
|
|
371061
371107
|
|