@itwin/ecschema-rpcinterface-tests 4.5.0-dev.8 → 4.5.0-dev.9

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.
@@ -1 +1 @@
1
- {"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_b\\183\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.1.6\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
1
+ {"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\10\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.1.6\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
@@ -22970,7 +22970,6 @@ class BentleyError extends Error {
22970
22970
  case GeoServiceStatus.CSMapError: return "CSMap error";
22971
22971
  case GeoServiceStatus.Pending: return "Pending";
22972
22972
  case RealityDataStatus.InvalidData: return "Invalid or unknown data";
22973
- case IModelStatus.Success:
22974
22973
  case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_OK:
22975
22974
  case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ROW:
22976
22975
  case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_DONE:
@@ -76699,6 +76698,7 @@ __webpack_require__.r(__webpack_exports__);
76699
76698
  /* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
76700
76699
  /* harmony import */ var _IModelConnection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./IModelConnection */ "../../core/frontend/lib/esm/IModelConnection.js");
76701
76700
  /* harmony import */ var _IModelRoutingContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./IModelRoutingContext */ "../../core/frontend/lib/esm/IModelRoutingContext.js");
76701
+ /* harmony import */ var _IpcApp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./IpcApp */ "../../core/frontend/lib/esm/IpcApp.js");
76702
76702
  /*---------------------------------------------------------------------------------------------
76703
76703
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
76704
76704
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -76712,17 +76712,22 @@ __webpack_require__.r(__webpack_exports__);
76712
76712
 
76713
76713
 
76714
76714
 
76715
+
76715
76716
  const loggerCategory = _common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_2__.FrontendLoggerCategory.IModelConnection;
76716
76717
  /**
76717
- * An IModelConnection to a checkpoint of an iModel, hosted on a remote backend over RPC.
76718
- * Due to the nature of RPC requests, the backend servicing this connection may change over time, and there may even be more than one backend
76719
- * at servicing requests at the same time. For this reason, this type of connection may only be used with Checkpoint iModels that are
76720
- * guaranteed to be the same on every backend. Obviously Checkpoint iModels only allow readonly access.
76718
+ * An IModelConnection to a Checkpoint of an iModel.
76719
+ * @see [CheckpointConnection]($docs/learning/frontend/IModelConnection)
76721
76720
  * @public
76722
76721
  */
76723
76722
  class CheckpointConnection extends _IModelConnection__WEBPACK_IMPORTED_MODULE_4__.IModelConnection {
76724
- constructor() {
76725
- super(...arguments);
76723
+ /** The Guid that identifies the iTwin that owns this iModel. */
76724
+ get iTwinId() { return super.iTwinId; }
76725
+ /** The Guid that identifies this iModel. */
76726
+ get iModelId() { return super.iModelId; }
76727
+ /** Returns `true` if [[close]] has already been called. */
76728
+ get isClosed() { return this._isClosed ? true : false; }
76729
+ constructor(props, fromIpc) {
76730
+ super(props);
76726
76731
  this._reopenConnectionHandler = async (request, response, resubmit, reject) => {
76727
76732
  if (!response.hasOwnProperty("isIModelNotFoundResponse"))
76728
76733
  return;
@@ -76745,30 +76750,30 @@ class CheckpointConnection extends _IModelConnection__WEBPACK_IMPORTED_MODULE_4_
76745
76750
  request.parameters[0] = this.getRpcProps(); // Modify the token of the original request before resubmitting it.
76746
76751
  resubmit();
76747
76752
  };
76753
+ this._fromIpc = fromIpc;
76748
76754
  }
76749
- /** The Guid that identifies the iTwin that owns this iModel. */
76750
- get iTwinId() { return super.iTwinId; }
76751
- /** The Guid that identifies this iModel. */
76752
- get iModelId() { return super.iModelId; }
76753
- /** Returns `true` if [[close]] has already been called. */
76754
- get isClosed() { return this._isClosed ? true : false; }
76755
76755
  /** Type guard for instanceof [[CheckpointConnection]] */
76756
76756
  isCheckpointConnection() { return true; }
76757
76757
  /**
76758
- * Open a readonly IModelConnection to an iModel over RPC.
76758
+ * Open a readonly IModelConnection to a Checkpoint of an iModel.
76759
76759
  */
76760
76760
  static async openRemote(iTwinId, iModelId, version = _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.IModelVersion.latest()) {
76761
- const routingContext = _IModelRoutingContext__WEBPACK_IMPORTED_MODULE_5__.IModelRoutingContext.current || _IModelRoutingContext__WEBPACK_IMPORTED_MODULE_5__.IModelRoutingContext["default"];
76762
- const accessToken = await _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.getAccessToken();
76763
76761
  if (undefined === _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.hubAccess)
76764
- throw new Error("Missing an implementation of FrontendHubAccess on IModelApp, it is required to open a remote iModel Connection. Please provide an implementation to the IModelApp.startup using IModelAppOptions.hubAccess.");
76762
+ throw new Error("Missing an implementation of IModelApp.hubAccess");
76763
+ const accessToken = await _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.getAccessToken();
76765
76764
  const changeset = await _IModelApp__WEBPACK_IMPORTED_MODULE_3__.IModelApp.hubAccess.getChangesetFromVersion({ accessToken, iModelId, version });
76766
- const iModelRpcProps = { iTwinId, iModelId, changeset };
76767
- const openResponse = await this.callOpen(iModelRpcProps, routingContext);
76768
- const connection = new this(openResponse);
76769
- _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RpcManager.setIModel(connection);
76770
- connection.routingContext = routingContext;
76771
- _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RpcRequest.notFoundHandlers.addListener(connection._reopenConnectionHandler);
76765
+ let connection;
76766
+ const iModelProps = { iTwinId, iModelId, changeset };
76767
+ if (_IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.isValid) {
76768
+ connection = new this(await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.openCheckpoint(iModelProps), true);
76769
+ }
76770
+ else {
76771
+ const routingContext = _IModelRoutingContext__WEBPACK_IMPORTED_MODULE_5__.IModelRoutingContext.current || _IModelRoutingContext__WEBPACK_IMPORTED_MODULE_5__.IModelRoutingContext["default"];
76772
+ connection = new this(await this.callOpen(iModelProps, routingContext), false);
76773
+ _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RpcManager.setIModel(connection);
76774
+ connection.routingContext = routingContext;
76775
+ _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RpcRequest.notFoundHandlers.addListener(connection._reopenConnectionHandler);
76776
+ }
76772
76777
  _IModelConnection__WEBPACK_IMPORTED_MODULE_4__.IModelConnection.onOpen.raiseEvent(connection);
76773
76778
  return connection;
76774
76779
  }
@@ -76816,7 +76821,10 @@ class CheckpointConnection extends _IModelConnection__WEBPACK_IMPORTED_MODULE_4_
76816
76821
  if (this.isClosed)
76817
76822
  return;
76818
76823
  this.beforeClose();
76819
- _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RpcRequest.notFoundHandlers.removeListener(this._reopenConnectionHandler);
76824
+ if (this._fromIpc)
76825
+ await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.closeIModel(this._fileKey);
76826
+ else
76827
+ _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RpcRequest.notFoundHandlers.removeListener(this._reopenConnectionHandler);
76820
76828
  this._isClosed = true;
76821
76829
  }
76822
76830
  }
@@ -292849,7 +292857,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
292849
292857
  /***/ ((module) => {
292850
292858
 
292851
292859
  "use strict";
292852
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.5.0-dev.8","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","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 -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.5.0-dev.8","@itwin/core-bentley":"workspace:^4.5.0-dev.8","@itwin/core-common":"workspace:^4.5.0-dev.8","@itwin/core-geometry":"workspace:^4.5.0-dev.8","@itwin/core-orbitgt":"workspace:^4.5.0-dev.8","@itwin/core-quantity":"workspace:^4.5.0-dev.8"},"//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":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","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.2.2","@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"}}');
292860
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.5.0-dev.9","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","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 -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.5.0-dev.9","@itwin/core-bentley":"workspace:^4.5.0-dev.9","@itwin/core-common":"workspace:^4.5.0-dev.9","@itwin/core-geometry":"workspace:^4.5.0-dev.9","@itwin/core-orbitgt":"workspace:^4.5.0-dev.9","@itwin/core-quantity":"workspace:^4.5.0-dev.9"},"//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":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","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.2.2","@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"}}');
292853
292861
 
292854
292862
  /***/ })
292855
292863