@itwin/core-backend 5.4.0-dev.7 → 5.5.0-dev.2

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/lib/cjs/IModelDb.d.ts.map +1 -1
  3. package/lib/cjs/IModelDb.js +12 -9
  4. package/lib/cjs/IModelDb.js.map +1 -1
  5. package/lib/cjs/IModelHost.d.ts +11 -0
  6. package/lib/cjs/IModelHost.d.ts.map +1 -1
  7. package/lib/cjs/IModelHost.js +6 -0
  8. package/lib/cjs/IModelHost.js.map +1 -1
  9. package/lib/cjs/LocalhostIpcHost.d.ts +1 -0
  10. package/lib/cjs/LocalhostIpcHost.d.ts.map +1 -1
  11. package/lib/cjs/LocalhostIpcHost.js +1 -1
  12. package/lib/cjs/LocalhostIpcHost.js.map +1 -1
  13. package/lib/cjs/NativeHost.d.ts.map +1 -1
  14. package/lib/cjs/NativeHost.js +7 -0
  15. package/lib/cjs/NativeHost.js.map +1 -1
  16. package/lib/cjs/NavigationRelationship.d.ts +8 -0
  17. package/lib/cjs/NavigationRelationship.d.ts.map +1 -1
  18. package/lib/cjs/NavigationRelationship.js +12 -1
  19. package/lib/cjs/NavigationRelationship.js.map +1 -1
  20. package/lib/cjs/TxnManager.d.ts +16 -4
  21. package/lib/cjs/TxnManager.d.ts.map +1 -1
  22. package/lib/cjs/TxnManager.js +25 -3
  23. package/lib/cjs/TxnManager.js.map +1 -1
  24. package/lib/cjs/internal/ChannelAdmin.d.ts.map +1 -1
  25. package/lib/cjs/internal/ChannelAdmin.js +9 -1
  26. package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
  27. package/lib/cjs/internal/OnlineStatus.d.ts +15 -0
  28. package/lib/cjs/internal/OnlineStatus.d.ts.map +1 -0
  29. package/lib/cjs/internal/OnlineStatus.js +28 -0
  30. package/lib/cjs/internal/OnlineStatus.js.map +1 -0
  31. package/lib/cjs/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  32. package/lib/cjs/internal/workspace/WorkspaceImpl.js +12 -0
  33. package/lib/cjs/internal/workspace/WorkspaceImpl.js.map +1 -1
  34. package/lib/esm/IModelDb.d.ts.map +1 -1
  35. package/lib/esm/IModelDb.js +12 -9
  36. package/lib/esm/IModelDb.js.map +1 -1
  37. package/lib/esm/IModelHost.d.ts +11 -0
  38. package/lib/esm/IModelHost.d.ts.map +1 -1
  39. package/lib/esm/IModelHost.js +6 -0
  40. package/lib/esm/IModelHost.js.map +1 -1
  41. package/lib/esm/LocalhostIpcHost.d.ts +1 -0
  42. package/lib/esm/LocalhostIpcHost.d.ts.map +1 -1
  43. package/lib/esm/LocalhostIpcHost.js +1 -1
  44. package/lib/esm/LocalhostIpcHost.js.map +1 -1
  45. package/lib/esm/NativeHost.d.ts.map +1 -1
  46. package/lib/esm/NativeHost.js +8 -1
  47. package/lib/esm/NativeHost.js.map +1 -1
  48. package/lib/esm/NavigationRelationship.d.ts +8 -0
  49. package/lib/esm/NavigationRelationship.d.ts.map +1 -1
  50. package/lib/esm/NavigationRelationship.js +10 -0
  51. package/lib/esm/NavigationRelationship.js.map +1 -1
  52. package/lib/esm/TxnManager.d.ts +16 -4
  53. package/lib/esm/TxnManager.d.ts.map +1 -1
  54. package/lib/esm/TxnManager.js +25 -3
  55. package/lib/esm/TxnManager.js.map +1 -1
  56. package/lib/esm/internal/ChannelAdmin.d.ts.map +1 -1
  57. package/lib/esm/internal/ChannelAdmin.js +9 -1
  58. package/lib/esm/internal/ChannelAdmin.js.map +1 -1
  59. package/lib/esm/internal/OnlineStatus.d.ts +15 -0
  60. package/lib/esm/internal/OnlineStatus.d.ts.map +1 -0
  61. package/lib/esm/internal/OnlineStatus.js +24 -0
  62. package/lib/esm/internal/OnlineStatus.js.map +1 -0
  63. package/lib/esm/internal/workspace/WorkspaceImpl.d.ts.map +1 -1
  64. package/lib/esm/internal/workspace/WorkspaceImpl.js +13 -1
  65. package/lib/esm/internal/workspace/WorkspaceImpl.js.map +1 -1
  66. package/lib/esm/test/element/ElementAspect.test.js +27 -0
  67. package/lib/esm/test/element/ElementAspect.test.js.map +1 -1
  68. package/lib/esm/test/hubaccess/ApplyChangeset.test.js +100 -2
  69. package/lib/esm/test/hubaccess/ApplyChangeset.test.js.map +1 -1
  70. package/lib/esm/test/hubaccess/Rebase.test.js +157 -1
  71. package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -1
  72. package/lib/esm/test/imodel/Code.test.js +369 -248
  73. package/lib/esm/test/imodel/Code.test.js.map +1 -1
  74. package/lib/esm/test/imodel/IModel.test.js +3 -0
  75. package/lib/esm/test/imodel/IModel.test.js.map +1 -1
  76. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js +27 -8
  77. package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
  78. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts +4 -1
  79. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.d.ts.map +1 -1
  80. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js +14 -4
  81. package/lib/esm/test/incrementalSchemaLocater/utils/IncrementalTestHelper.js.map +1 -1
  82. package/lib/esm/test/standalone/ChangeMerge.test.js +24 -0
  83. package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
  84. package/package.json +15 -15
@@ -150,6 +150,11 @@ export interface IModelHostOptions {
150
150
  * @beta
151
151
  */
152
152
  disableRestorePointOnPullMerge?: true;
153
+ /**
154
+ * Configuration controlling whether incremental schema loading is enabled or disabled.
155
+ * @beta
156
+ */
157
+ incrementalSchemaLoading?: "enabled" | "disabled";
153
158
  }
154
159
  /** Configuration of core-backend.
155
160
  * @public
@@ -193,6 +198,12 @@ export declare class IModelHostConfiguration implements IModelHostOptions {
193
198
  * @beta
194
199
  */
195
200
  disableRestorePointOnPullMerge?: true;
201
+ /**
202
+ * Configuration controlling whether incremental schema loading is disabled.
203
+ * Default is "disabled" at the moment to preserve existing behavior.
204
+ * @beta
205
+ */
206
+ incrementalSchemaLoading: "enabled" | "disabled";
196
207
  }
197
208
  /** IModelHost initializes ($backend) and captures its configuration. A backend must call [[IModelHost.startup]] before using any backend classes.
198
209
  * See [the learning article]($docs/learning/backend/IModelHost.md)
@@ -1 +1 @@
1
- {"version":3,"file":"IModelHost.d.ts","sourceRoot":"","sources":["../../src/IModelHost.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,YAAY,CAAC;AAKpB,OAAO,EAAE,WAAW,EAAU,OAAO,EAAiC,UAAU,EAAwB,OAAO,EAAmB,MAAM,qBAAqB,CAAC;AAC9J,OAAO,EAAE,mBAAmB,EAAe,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGlG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAc5E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAKjE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAM9E,gBAAgB;AAChB,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,8JAA8J;IAC9J,QAAQ,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wOAAwO;IACxO,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sFAAsF;IACtF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iLAAiL;IACjL,gBAAgB,CAAC,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C,MAAM,CAAC,mBAAmB;IAclC,gBAAgB;WACF,qBAAqB,CAAC,GAAG,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,EAAE,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,MAAM;CAG5H;AAED;;GAEG;AACH,qBAAa,QAAQ;IACnB,oCAAoC;IACpC,WAAkB,YAAY,IAAI,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,KAAK,CAEzF;CACF;AAED;;GAEG;AACH,qBAAa,cAAc;IAEzB,iEAAiE;IACjE,WAAkB,eAAe,IAAI,YAAY,CAEhD;IAED,8DAA8D;IAC9D,WAAkB,gBAAgB,IAAI,YAAY,CAEjD;IAED,+BAA+B;IAC/B,WAAkB,MAAM,IAAI,YAAY,CAEvC;CACF;AAED;;;;;GAKG;AACH,8BAAsB,gBAAgB;IACpC;;;OAGG;IACI,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAC1D;;;;OAIG;IACI,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAO1C;;;OAGG;IACI,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IACjE;;;;OAIG;IACI,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;CAOnD"}
@@ -80,6 +80,12 @@ class IModelHostConfiguration {
80
80
  * @beta
81
81
  */
82
82
  disableRestorePointOnPullMerge;
83
+ /**
84
+ * Configuration controlling whether incremental schema loading is disabled.
85
+ * Default is "disabled" at the moment to preserve existing behavior.
86
+ * @beta
87
+ */
88
+ incrementalSchemaLoading = "disabled";
83
89
  }
84
90
  exports.IModelHostConfiguration = IModelHostConfiguration;
85
91
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"IModelHost.js","sourceRoot":"","sources":["../../src/IModelHost.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F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AO,EAAE,CAAC,MAAM,EAAE,CAAC;IACrB,CAAC;CACF;AAhBD,wCAgBC;AAED;;;;;GAKG;AACH,MAAsB,gBAAgB;IACpC;;;OAGG;IACI,aAAa,CAAC,QAAgB,IAAwB,OAAO,SAAS,CAAC,CAAC,CAAC;IAChF;;;;OAIG;IACI,UAAU,CAAC,OAAe;QAC/B,MAAM,gBAAgB,GAAuB,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzE,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC;YACnC,MAAM,IAAI,yBAAW,CAAC,2BAAY,CAAC,QAAQ,EAAE,GAAG,OAAO,eAAe,CAAC,CAAC;QAC1E,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD;;;OAGG;IACI,kBAAkB,CAAC,UAAkB,IAAwB,OAAO,UAAU,CAAC,CAAC,CAAC;IACxF;;;;OAIG;IACI,eAAe,CAAC,UAAkB;QACvC,MAAM,gBAAgB,GAAuB,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QACjF,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC;YACnC,MAAM,IAAI,yBAAW,CAAC,2BAAY,CAAC,QAAQ,EAAE,GAAG,UAAU,eAAe,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF;AAnCD,4CAmCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModelHost\n */\n\n// To avoid circular load errors, the \"Element\" classes must be loaded before IModelHost.\nimport \"./IModelDb\"; // DO NOT REMOVE OR MOVE THIS LINE!\n\nimport { IModelNative, loadNativePlatform } from \"./internal/NativePlatform\";\nimport * as os from \"node:os\";\nimport { NativeLibrary } from \"@bentley/imodeljs-native\";\nimport { AccessToken, assert, BeEvent, BentleyStatus, DbResult, Guid, GuidString, IModelStatus, Logger, Mutable, ProcessDetector } from \"@itwin/core-bentley\";\nimport { AuthorizationClient, IModelError, LocalDirName, SessionProps } from \"@itwin/core-common\";\nimport { AzureServerStorage, AzureServerStorageConfig, BlobServiceClientWrapper } from \"@itwin/object-storage-azure\";\nimport { BlobServiceClient, StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport type { ServerStorage } from \"@itwin/object-storage-core\";\nimport { BackendHubAccess, CreateNewIModelProps } from \"./BackendHubAccess\";\nimport { BackendLoggerCategory } from \"./BackendLoggerCategory\";\nimport { BisCoreSchema } from \"./BisCoreSchema\";\nimport { BriefcaseManager } from \"./BriefcaseManager\";\nimport { CloudSqlite } from \"./CloudSqlite\";\nimport { FunctionalSchema } from \"./domains/FunctionalSchema\";\nimport { GenericSchema } from \"./domains/GenericSchema\";\nimport { GeoCoordConfig } from \"./GeoCoordConfig\";\nimport { IModelJsFs } from \"./IModelJsFs\";\nimport { DevToolsRpcImpl } from \"./rpc-impl/DevToolsRpcImpl\";\nimport { IModelReadRpcImpl } from \"./rpc-impl/IModelReadRpcImpl\";\nimport { IModelTileRpcImpl } from \"./rpc-impl/IModelTileRpcImpl\";\nimport { SnapshotIModelRpcImpl } from \"./rpc-impl/SnapshotIModelRpcImpl\";\nimport { initializeRpcBackend } from \"./RpcBackend\";\nimport { TileStorage } from \"./TileStorage\";\nimport { SettingsContainer, SettingsPriority } from \"./workspace/Settings\";\nimport { SettingsSchemas } from \"./workspace/SettingsSchemas\";\nimport { Workspace, WorkspaceOpts } from \"./workspace/Workspace\";\nimport { join, normalize as normalizeDir } from \"path\";\nimport { constructWorkspace, OwnedWorkspace } from \"./internal/workspace/WorkspaceImpl\";\nimport { SettingsImpl } from \"./internal/workspace/SettingsImpl\";\nimport { constructSettingsSchemas } from \"./internal/workspace/SettingsSchemasImpl\";\nimport { _getHubAccess, _hubAccess, _setHubAccess } from \"./internal/Symbols\";\n\nconst loggerCategory = BackendLoggerCategory.IModelHost;\n\n// cspell:ignore nodereport fatalerror apicall alicloud rpcs\n\n/** @internal */\nexport interface CrashReportingConfigNameValuePair {\n name: string;\n value: string;\n}\n\n/** Configuration of the crash-reporting system.\n * @internal\n */\nexport interface CrashReportingConfig {\n /** The directory to which *.dmp and/or iModelJsNativeCrash*.properties.txt files are written. This directory will be created if it does not already exist. */\n crashDir: string;\n /** max # .dmp files that may exist in crashDir. The default is 50. */\n maxDumpsInDir?: number;\n /** Enable crash-dumps? If so, .dmp and .properties.txt files will be generated and written to crashDir in the event of an unhandled native-code exception. If not, only .properties.txt files will be written. The default is false. */\n enableCrashDumps?: boolean;\n /** If enableCrashDumps is true, do you want a full-memory dump? Defaults to false. */\n wantFullMemoryDumps?: boolean;\n /** Enable Node.js crash reporting? If so, report files will be generated in the event of an unhandled exception or fatal error and written to crashDir. The default is false. */\n enableNodeReport?: boolean;\n /** Additional name, value pairs to write to iModelJsNativeCrash*.properties.txt file in the event of a crash. */\n params?: CrashReportingConfigNameValuePair[];\n /** Run this .js file to process .dmp and Node.js crash reporting .json files in the event of a crash.\n * This script will be executed with a single command-line parameter: the name of the dump or Node.js report file.\n * In the case of a dump file, there will be a second file with the same basename and the extension \".properties.txt\".\n * Since it runs in a separate process, this script will have no access to the Javascript\n * context of the exiting backend. No default.\n */\n dumpProcessorScriptFileName?: string;\n /** Upload crash dump and node-reports to Bentley's crash-reporting service? Defaults to false */\n uploadToBentley?: boolean;\n}\n\n/** @beta */\nexport interface AzureBlobStorageCredentials {\n account: string;\n accessKey: string;\n baseUrl?: string;\n}\n\n/**\n * Options for [[IModelHost.startup]]\n * @public\n */\nexport interface IModelHostOptions {\n /**\n * The name of the *Profile* subdirectory of [[cacheDir]] for this process. If not present, \"default\" is used.\n * @see [[IModelHost.profileName]]\n * @beta\n */\n profileName?: string;\n\n /**\n * Root of the directory holding all the files that iTwin.js caches\n * - If not specified at startup a platform specific default is used -\n * - Windows: $(HOMEDIR)/AppData/Local/iModelJs/\n * - Mac/iOS: $(HOMEDIR)/Library/Caches/iModelJs/\n * - Linux: $(HOMEDIR)/.cache/iModelJs/\n * where $(HOMEDIR) is documented [here](https://nodejs.org/api/os.html#os_os_homedir)\n * - if specified, ensure it is set to a folder with read/write access.\n * @see [[IModelHost.cacheDir]] for the value it's set to after startup\n */\n cacheDir?: LocalDirName;\n\n /** The directory where application assets are found. */\n appAssetsDir?: LocalDirName;\n\n /**\n * Options for creating the [[IModelHost.appWorkspace]]\n * @beta\n */\n workspace?: WorkspaceOpts;\n\n /**\n * The kind of iModel hub server to use.\n */\n hubAccess?: BackendHubAccess;\n\n /** The Azure blob storage credentials to use for the tile cache service. If omitted and no external service implementation is provided, a local cache will be used.\n * @beta\n */\n tileCacheAzureCredentials?: AzureBlobStorageCredentials;\n\n /**\n * @beta\n * @note A reference implementation is set for AzureServerStorage from @itwin/object-storage-azure if [[tileCacheAzureCredentials]] property is set. To supply a different implementation for any service provider (such as AWS),\n * set this property with a custom ServerStorage.\n */\n tileCacheStorage?: ServerStorage;\n\n /** The maximum size in bytes to which a local sqlite database used for caching tiles can grow before it is purged of least-recently-used tiles.\n * The local cache is used only if an external cache has not been configured via [[tileCacheStorage]], and [[tileCacheAzureCredentials]].\n * Defaults to 1 GB. Must be an unsigned integer. A value of zero disables the local cache entirely.\n * @beta\n */\n maxTileCacheDbSize?: number;\n\n /** Whether to restrict tile cache URLs by client IP address (if available).\n * @beta\n */\n restrictTileUrlsByClientIp?: boolean;\n\n /** Whether to enable OpenTelemetry tracing.\n * Defaults to `false`.\n */\n enableOpenTelemetry?: boolean;\n\n /** Whether to compress cached tiles.\n * Defaults to `true`.\n */\n compressCachedTiles?: boolean;\n\n /** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileTreeProps]($common) should wait before returning a \"pending\" status.\n * @internal\n */\n tileTreeRequestTimeout?: number;\n\n /** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileContent]($common) should wait before returning a \"pending\" status.\n * @internal\n */\n tileContentRequestTimeout?: number;\n\n /** The backend will log when a tile took longer to load than this threshold in seconds.\n * @internal\n */\n logTileLoadTimeThreshold?: number;\n\n /** The backend will log when a tile is loaded with a size in bytes above this threshold.\n * @internal\n */\n logTileSizeThreshold?: number;\n\n /** Crash-reporting configuration\n * @internal\n */\n crashReportingConfig?: CrashReportingConfig;\n\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n authorizationClient?: AuthorizationClient;\n\n /**\n * Automatically enable shared channel when opening iModels for read/write (see [Working With Channels]($docs/learning/backend/Channel.md)).\n * If not present, defaults to `true` for backwards compatibility. This means that the shared channel may be edited by default. Generally\n * that is undesirable because it allows applications to \"accidentally\" modify data it shouldn't be allowed to modify. Unfortunately the\n * previous versions of iTwin.js allowed it so this is necessary so they won't break.\n * Will be changed to default to `false` in 5.0.\n */\n allowSharedChannel?: boolean;\n\n /**\n * Setting this to true will revert to the previous behavior of using the native side for all CRUD operations.\n * While set to false, the getElement(), getModel() and getAspect() functions will use a thinned down native workflow to read the entities from the database.\n * This workflow performs work previously done on the native side in the TS side, resulting in performance improvements, if errors are detected,\n * this option can be set to true to revert to old workflow.\n */\n disableThinnedNativeInstanceWorkflow?: boolean;\n\n /**\n * Configuration controlling whether to disable the creation of restore points during pull/merge operations.\n * @beta\n */\n disableRestorePointOnPullMerge?: true;\n}\n\n/** Configuration of core-backend.\n * @public\n */\nexport class IModelHostConfiguration implements IModelHostOptions {\n public static defaultTileRequestTimeout = 20 * 1000;\n public static defaultLogTileLoadTimeThreshold = 40;\n public static defaultLogTileSizeThreshold = 20 * 1000000;\n /** @internal */\n public static defaultMaxTileCacheDbSize = 1024 * 1024 * 1024;\n public appAssetsDir?: LocalDirName;\n public cacheDir?: LocalDirName;\n\n /** @beta */\n public workspace?: WorkspaceOpts;\n public hubAccess?: BackendHubAccess;\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n public authorizationClient?: AuthorizationClient;\n /** @beta */\n public restrictTileUrlsByClientIp?: boolean;\n public compressCachedTiles?: boolean;\n /** @beta */\n public tileCacheAzureCredentials?: AzureBlobStorageCredentials;\n /** @internal */\n public tileTreeRequestTimeout = IModelHostConfiguration.defaultTileRequestTimeout;\n /** @internal */\n public tileContentRequestTimeout = IModelHostConfiguration.defaultTileRequestTimeout;\n /** @internal */\n public logTileLoadTimeThreshold = IModelHostConfiguration.defaultLogTileLoadTimeThreshold;\n /** @internal */\n public logTileSizeThreshold = IModelHostConfiguration.defaultLogTileSizeThreshold;\n /** @internal */\n public crashReportingConfig?: CrashReportingConfig;\n /**\n * Configuration controlling whether to use the thinned down native instance functions for element, model, and aspect CRUD operations\n * or use the previous behavior of using the native side for all CRUD operations. Set to true to revert to the previous behavior.\n * @beta\n */\n public disableThinnedNativeInstanceWorkflow?: boolean;\n\n /**\n * Configuration controlling whether to disable the creation of restore points during pull/merge operations.\n * @beta\n */\n public disableRestorePointOnPullMerge?: true;\n}\n\n/**\n * Settings for `IModelHost.appWorkspace`.\n * @note this includes the default dictionary from the SettingsSpecRegistry\n */\nclass ApplicationSettings extends SettingsImpl {\n private _remove?: VoidFunction;\n protected override verifyPriority(priority: SettingsPriority) {\n if (priority > SettingsPriority.application) // only application or lower may appear in ApplicationSettings\n throw new Error(\"Use IModelSettings\");\n }\n private updateDefaults() {\n const defaults: SettingsContainer = {};\n for (const [schemaName, val] of IModelHost.settingsSchemas.settingDefs) {\n if (val.default)\n defaults[schemaName] = val.default;\n }\n this.addDictionary({ name: \"_default_\", priority: 0 }, defaults);\n }\n\n public constructor() {\n super();\n this._remove = IModelHost.settingsSchemas.onSchemaChanged.addListener(() => this.updateDefaults());\n this.updateDefaults();\n }\n\n public override close() {\n if (this._remove) {\n this._remove();\n this._remove = undefined;\n }\n }\n}\n\nconst definedInStartup = <T>(obj: T | undefined): T => {\n if (obj === undefined)\n throw new Error(\"IModelHost.startup must be called first\");\n return obj;\n};\n\n/** IModelHost initializes ($backend) and captures its configuration. A backend must call [[IModelHost.startup]] before using any backend classes.\n * See [the learning article]($docs/learning/backend/IModelHost.md)\n * @public\n */\nexport class IModelHost {\n private constructor() { }\n\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n public static authorizationClient?: AuthorizationClient;\n\n public static backendVersion = \"\";\n private static _profileName: string;\n private static _cacheDir = \"\";\n private static _settingsSchemas?: SettingsSchemas;\n private static _appWorkspace?: OwnedWorkspace;\n\n // Omit the hubAccess field from configuration so it stays internal.\n public static configuration?: Omit<IModelHostOptions, \"hubAccess\">;\n\n /**\n * The name of the *Profile* directory (a subdirectory of \"[[cacheDir]]/profiles/\") for this process.\n *\n * The *Profile* directory is used to cache data that is specific to a type-of-usage of the iTwin.js library.\n * It is important that information in the profile cache be consistent but isolated across sessions (i.e.\n * data for a profile is maintained between runs, but each profile is completely independent and\n * unaffected by the presence or use of others.)\n * @note **Only one process at a time may be using a given profile**, and an exception will be thrown by [[startup]]\n * if a second process attempts to use the same profile.\n * @beta\n */\n public static get profileName(): string {\n return this._profileName;\n }\n\n /** The full path of the Profile directory.\n * @see [[profileName]]\n * @beta\n */\n public static get profileDir(): LocalDirName {\n return join(this._cacheDir, \"profiles\", this._profileName);\n }\n\n /** Event raised during startup to allow loading settings data */\n public static readonly onWorkspaceStartup = new BeEvent<() => void>();\n\n /** Event raised just after the backend IModelHost was started */\n public static readonly onAfterStartup = new BeEvent<() => void>();\n\n /** Event raised just before the backend IModelHost is to be shut down */\n public static readonly onBeforeShutdown = new BeEvent<() => void>();\n\n /** @internal */\n public static readonly session: Mutable<SessionProps> = { applicationId: \"2686\", applicationVersion: \"1.0.0\", sessionId: \"\" };\n\n /** A uniqueId for this session */\n public static get sessionId() { return this.session.sessionId; }\n public static set sessionId(id: GuidString) { this.session.sessionId = id; }\n\n /** The Id of this application - needs to be set only if it is an agent application. The applicationId will otherwise originate at the frontend. */\n public static get applicationId() { return this.session.applicationId; }\n public static set applicationId(id: string) { this.session.applicationId = id; }\n\n /** The version of this application - needs to be set if is an agent application. The applicationVersion will otherwise originate at the frontend. */\n public static get applicationVersion() { return this.session.applicationVersion; }\n public static set applicationVersion(version: string) { this.session.applicationVersion = version; }\n\n /** A string that can identify the current user to other users when collaborating. */\n public static userMoniker = \"unknown\";\n\n /** Root directory holding files that iTwin.js caches */\n public static get cacheDir(): LocalDirName { return this._cacheDir; }\n\n /** The application [[Workspace]] for this `IModelHost`\n * @note this `Workspace` only holds [[WorkspaceContainer]]s and [[Settings]] scoped to the currently loaded application(s).\n * All organization, iTwin, and iModel based containers or settings must be accessed through [[IModelDb.workspace]] and\n * attempting to add them to this Workspace will fail.\n * @beta\n */\n public static get appWorkspace(): Workspace { return definedInStartup(this._appWorkspace); }\n\n /** The registry of schemas describing the [[Setting]]s for the application session.\n * Applications should register their schemas via methods like [[SettingsSchemas.addGroup]].\n * @beta\n */\n public static get settingsSchemas(): SettingsSchemas { return definedInStartup(this._settingsSchemas); }\n\n /** The optional [[FileNameResolver]] that resolves keys and partial file names for snapshot iModels.\n * @deprecated in 4.10 - will not be removed until after 2026-06-13. When opening a snapshot by file name, ensure to pass already resolved path. Using a key to open a snapshot is now deprecated.\n */\n public static snapshotFileNameResolver?: FileNameResolver; // eslint-disable-line @typescript-eslint/no-deprecated\n\n /** Get the current access token for this IModelHost, or a blank string if none is available.\n * @note for web backends, this will *always* return a blank string because the backend itself has no token (but never needs one either.)\n * For all IpcHosts, where this backend is servicing a single frontend, this will be the user's token. For ElectronHost, the backend\n * obtains the token and forwards it to the frontend.\n * @note accessTokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value\n * returned by this method may change over time throughout the course of a session.\n */\n public static async getAccessToken(): Promise<AccessToken> {\n try {\n return (await IModelHost.authorizationClient?.getAccessToken()) ?? \"\";\n } catch {\n return \"\";\n }\n }\n\n private static loadNative(options: IModelHostOptions) {\n loadNativePlatform();\n\n if (options.crashReportingConfig && options.crashReportingConfig.crashDir && !ProcessDetector.isElectronAppBackend && !ProcessDetector.isMobileAppBackend) {\n IModelNative.platform.setCrashReporting(options.crashReportingConfig);\n\n Logger.logTrace(loggerCategory, \"Configured crash reporting\", {\n enableCrashDumps: options.crashReportingConfig?.enableCrashDumps,\n wantFullMemoryDumps: options.crashReportingConfig?.wantFullMemoryDumps,\n enableNodeReport: options.crashReportingConfig?.enableNodeReport,\n uploadToBentley: options.crashReportingConfig?.uploadToBentley,\n });\n\n if (options.crashReportingConfig.enableNodeReport) {\n if (process.report !== undefined) {\n process.report.reportOnFatalError = true;\n process.report.reportOnUncaughtException = true;\n process.report.directory = options.crashReportingConfig.crashDir;\n Logger.logTrace(loggerCategory, \"Configured Node.js crash reporting\");\n } else {\n Logger.logWarning(loggerCategory, \"Unable to configure Node.js crash reporting\");\n }\n }\n }\n }\n\n /** @internal */\n public static tileStorage?: TileStorage;\n\n private static _hubAccess?: BackendHubAccess;\n /** @internal */\n public static [_setHubAccess](hubAccess: BackendHubAccess | undefined) { this._hubAccess = hubAccess; }\n\n /** get the current hubAccess, if present.\n * @internal\n */\n public static [_getHubAccess](): BackendHubAccess | undefined { return this._hubAccess; }\n\n /** Provides access to the IModelHub for this IModelHost\n * @internal\n * @note If [[IModelHostOptions.hubAccess]] was undefined when initializing this class, accessing this property will throw an error.\n * To determine whether one is present, use [[_getHubAccess]].\n */\n public static get [_hubAccess](): BackendHubAccess {\n if (IModelHost._hubAccess === undefined)\n throw new IModelError(IModelStatus.BadRequest, \"No BackendHubAccess supplied in IModelHostOptions\");\n return IModelHost._hubAccess;\n }\n\n private static initializeWorkspace(configuration: IModelHostOptions) {\n const settingAssets = join(KnownLocations.packageAssetsDir, \"Settings\");\n this._settingsSchemas = constructSettingsSchemas();\n this._settingsSchemas.addDirectory(join(settingAssets, \"Schemas\"));\n this._appWorkspace = constructWorkspace(new ApplicationSettings(), configuration.workspace);\n\n // Create the CloudCache for Workspaces. This will fail if another process is already using the same profile.\n try {\n this.appWorkspace.getCloudCache();\n } catch (e: any) {\n throw (e.errorNumber === DbResult.BE_SQLITE_BUSY) ? new IModelError(DbResult.BE_SQLITE_BUSY, `Profile [${this.profileDir}] is already in use by another process`) : e;\n }\n\n this.appWorkspace.settings.addDirectory(settingAssets, SettingsPriority.defaults);\n\n GeoCoordConfig.onStartup();\n // allow applications to load their default settings\n this.onWorkspaceStartup.raiseEvent();\n }\n\n private static _isValid = false;\n\n /** true between a successful call to [[startup]] and before [[shutdown]] */\n public static get isValid() {\n return IModelHost._isValid;\n }\n\n /** This method must be called before any iTwin.js services are used.\n * @param options Host configuration data.\n * Raises [[onAfterStartup]].\n * @see [[shutdown]].\n */\n public static async startup(options?: IModelHostOptions): Promise<void> {\n if (this._isValid)\n return; // we're already initialized\n this._isValid = true;\n\n options = options ?? {};\n if (this.sessionId === \"\")\n this.sessionId = Guid.createValue();\n\n this.authorizationClient = options.authorizationClient;\n\n this.backendVersion = require(\"../../package.json\").version; // eslint-disable-line @typescript-eslint/no-require-imports\n initializeRpcBackend(options.enableOpenTelemetry);\n\n this.loadNative(options);\n this.setupCacheDir(options);\n this.initializeWorkspace(options);\n\n BriefcaseManager.initialize(join(this._cacheDir, \"imodels\"));\n\n [\n IModelReadRpcImpl,\n IModelTileRpcImpl,\n SnapshotIModelRpcImpl, // eslint-disable-line @typescript-eslint/no-deprecated\n DevToolsRpcImpl,\n ].forEach((rpc) => rpc.register()); // register all of the RPC implementations\n\n [\n BisCoreSchema,\n GenericSchema,\n FunctionalSchema,\n ].forEach((schema) => schema.registerSchema()); // register all of the schemas\n\n const { hubAccess, ...otherOptions } = options;\n if (undefined !== hubAccess)\n this._hubAccess = hubAccess;\n\n this.configuration = otherOptions;\n this.setupTileCache();\n\n process.once(\"beforeExit\", IModelHost.shutdown);\n this.onAfterStartup.raiseEvent();\n }\n\n private static setupCacheDir(configuration: IModelHostOptions) {\n this._cacheDir = normalizeDir(configuration.cacheDir ?? NativeLibrary.defaultCacheDir);\n IModelJsFs.recursiveMkDirSync(this._cacheDir);\n\n this._profileName = configuration.profileName ?? \"default\";\n Logger.logInfo(loggerCategory, `cacheDir: [${this.cacheDir}], profileDir: [${this.profileDir}]`);\n }\n\n /** This method must be called when an iTwin.js host is shut down. Raises [[onBeforeShutdown]] */\n public static async shutdown(this: void): Promise<void> {\n // Note: This method is set as a node listener where `this` is unbound. Call private method to\n // ensure `this` is correct. Don't combine these methods.\n return IModelHost.doShutdown();\n }\n\n /**\n * Create a new iModel.\n * @returns the Guid of the newly created iModel.\n * @throws [IModelError]($common) in case of errors.\n * @note If [[IModelHostOptions.hubAccess]] was undefined in the call to [[startup]], this function will throw an error.\n */\n public static async createNewIModel(arg: CreateNewIModelProps): Promise<GuidString> {\n return this[_hubAccess].createNewIModel(arg);\n }\n\n private static async doShutdown() {\n if (!this._isValid)\n return;\n\n this._isValid = false;\n this.onBeforeShutdown.raiseEvent();\n\n this.configuration = undefined;\n this.tileStorage = undefined;\n\n this._appWorkspace?.close();\n this._appWorkspace = undefined;\n this._settingsSchemas = undefined;\n\n CloudSqlite.CloudCaches.destroy();\n process.removeListener(\"beforeExit\", IModelHost.shutdown);\n }\n\n /**\n * Add or update a property that should be included in a crash report.\n * @internal\n */\n public static setCrashReportProperty(name: string, value: string): void {\n IModelNative.platform.setCrashReportProperty(name, value);\n }\n\n /**\n * Remove a previously defined property so that will not be included in a crash report.\n * @internal\n */\n public static removeCrashReportProperty(name: string): void {\n IModelNative.platform.setCrashReportProperty(name, undefined);\n }\n\n /**\n * Get all properties that will be included in a crash report.\n * @internal\n */\n public static getCrashReportProperties(): CrashReportingConfigNameValuePair[] {\n return IModelNative.platform.getCrashReportProperties();\n }\n\n /** The directory where application assets may be found */\n public static get appAssetsDir(): string | undefined {\n return undefined !== IModelHost.configuration ? IModelHost.configuration.appAssetsDir : undefined;\n }\n\n /** The time, in milliseconds, for which IModelTileRpcInterface.requestTileTreeProps should wait before returning a \"pending\" status.\n * @internal\n */\n public static get tileTreeRequestTimeout(): number {\n return IModelHost.configuration?.tileTreeRequestTimeout ?? IModelHostConfiguration.defaultTileRequestTimeout;\n }\n /** The time, in milliseconds, for which IModelTileRpcInterface.requestTileContent should wait before returning a \"pending\" status.\n * @internal\n */\n public static get tileContentRequestTimeout(): number {\n return IModelHost.configuration?.tileContentRequestTimeout ?? IModelHostConfiguration.defaultTileRequestTimeout;\n }\n\n /** The backend will log when a tile took longer to load than this threshold in seconds. */\n public static get logTileLoadTimeThreshold(): number {\n return IModelHost.configuration?.logTileLoadTimeThreshold ?? IModelHostConfiguration.defaultLogTileLoadTimeThreshold;\n }\n /** The backend will log when a tile is loaded with a size in bytes above this threshold. */\n public static get logTileSizeThreshold(): number {\n return IModelHost.configuration?.logTileSizeThreshold ?? IModelHostConfiguration.defaultLogTileSizeThreshold;\n }\n\n /** Whether external tile caching is active.\n * @internal\n */\n public static get usingExternalTileCache(): boolean {\n return undefined !== IModelHost.tileStorage;\n }\n\n /** Whether to restrict tile cache URLs by client IP address.\n * @internal\n */\n public static get restrictTileUrlsByClientIp(): boolean {\n return undefined !== IModelHost.configuration && (IModelHost.configuration.restrictTileUrlsByClientIp ? true : false);\n }\n\n /** Whether to compress cached tiles.\n * @internal\n */\n public static get compressCachedTiles(): boolean {\n return false !== IModelHost.configuration?.compressCachedTiles;\n }\n\n private static setupTileCache() {\n assert(undefined !== IModelHost.configuration);\n const config = IModelHost.configuration;\n const storage = config.tileCacheStorage;\n const credentials = config.tileCacheAzureCredentials;\n\n if (!storage && !credentials) {\n IModelNative.platform.setMaxTileCacheSize(config.maxTileCacheDbSize ?? IModelHostConfiguration.defaultMaxTileCacheDbSize);\n return;\n }\n\n IModelNative.platform.setMaxTileCacheSize(0);\n if (credentials) {\n if (storage)\n throw new IModelError(BentleyStatus.ERROR, \"Cannot use both Azure and custom cloud storage providers for tile cache.\");\n this.setupAzureTileCache(credentials);\n }\n if (storage)\n IModelHost.tileStorage = new TileStorage(storage);\n }\n\n private static setupAzureTileCache(credentials: AzureBlobStorageCredentials) {\n const storageConfig: AzureServerStorageConfig = {\n accountName: credentials.account,\n accountKey: credentials.accessKey,\n baseUrl: credentials.baseUrl ?? `https://${credentials.account}.blob.core.windows.net`,\n }\n const blobServiceClient = new BlobServiceClient(\n storageConfig.baseUrl,\n new StorageSharedKeyCredential(storageConfig.accountName, storageConfig.accountKey),\n );\n const azureStorage: ServerStorage = new AzureServerStorage(storageConfig, new BlobServiceClientWrapper(blobServiceClient))\n IModelHost.tileStorage = new TileStorage(azureStorage);\n }\n\n /** @internal */\n public static computeSchemaChecksum(arg: { schemaXmlPath: string, referencePaths: string[], exactMatch?: boolean }): string {\n return IModelNative.platform.computeSchemaChecksum(arg);\n }\n}\n\n/** Information about the platform on which the app is running.\n * @public\n */\nexport class Platform {\n /** Get the name of the platform. */\n public static get platformName(): \"win32\" | \"linux\" | \"darwin\" | \"ios\" | \"android\" | \"uwp\" {\n return process.platform as any;\n }\n}\n\n/** Well known directories that may be used by the application.\n * @public\n */\nexport class KnownLocations {\n\n /** The directory where the imodeljs-native assets are stored. */\n public static get nativeAssetsDir(): LocalDirName {\n return IModelNative.platform.DgnDb.getAssetsDir();\n }\n\n /** The directory where the core-backend assets are stored. */\n public static get packageAssetsDir(): LocalDirName {\n return join(__dirname, \"assets\");\n }\n\n /** The temporary directory. */\n public static get tmpdir(): LocalDirName {\n return os.tmpdir();\n }\n}\n\n/** Extend this class to provide custom file name resolution behavior.\n * @note Only `tryResolveKey` and/or `tryResolveFileName` need to be overridden as the implementations of `resolveKey` and `resolveFileName` work for most purposes.\n * @see [[IModelHost.snapshotFileNameResolver]]\n * @public\n * @deprecated in 4.10 - will not be removed until after 2026-06-13. When opening a snapshot by file name, ensure to pass already resolved path. Using a key to open a snapshot is now deprecated.\n */\nexport abstract class FileNameResolver {\n /** Resolve a file name from the specified key.\n * @param _fileKey The key that identifies the file name in a `Map` or other similar data structure.\n * @returns The resolved file name or `undefined` if not found.\n */\n public tryResolveKey(_fileKey: string): string | undefined { return undefined; }\n /** Resolve a file name from the specified key.\n * @param fileKey The key that identifies the file name in a `Map` or other similar data structure.\n * @returns The resolved file name.\n * @throws [[IModelError]] if not found.\n */\n public resolveKey(fileKey: string): string {\n const resolvedFileName: string | undefined = this.tryResolveKey(fileKey);\n if (undefined === resolvedFileName) {\n throw new IModelError(IModelStatus.NotFound, `${fileKey} not resolved`);\n }\n return resolvedFileName;\n }\n /** Resolve the input file name, which may be a partial name, into a full path file name.\n * @param inFileName The partial file name.\n * @returns The resolved full path file name or `undefined` if not found.\n */\n public tryResolveFileName(inFileName: string): string | undefined { return inFileName; }\n /** Resolve the input file name, which may be a partial name, into a full path file name.\n * @param inFileName The partial file name.\n * @returns The resolved full path file name.\n * @throws [[IModelError]] if not found.\n */\n public resolveFileName(inFileName: string): string {\n const resolvedFileName: string | undefined = this.tryResolveFileName(inFileName);\n if (undefined === resolvedFileName) {\n throw new IModelError(IModelStatus.NotFound, `${inFileName} not resolved`);\n }\n return resolvedFileName;\n }\n}\n"]}
1
+ {"version":3,"file":"IModelHost.js","sourceRoot":"","sources":["../../src/IModelHost.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yFAAyF;AACzF,sBAAoB,CAAC,mCAAmC;AAExD,8DAA6E;AAC7E,8BAA8B;AAC9B,8DAAyD;AACzD,sDAA8J;AAC9J,oDAAkG;AAClG,sEAAqH;AACrH,sDAAoF;AAGpF,mEAAgE;AAChE,mDAAgD;AAChD,yDAAsD;AACtD,+CAA4C;AAC5C,iEAA8D;AAC9D,2DAAwD;AACxD,qDAAkD;AAClD,6CAA0C;AAC1C,gEAA6D;AAC7D,oEAAiE;AACjE,oEAAiE;AACjE,4EAAyE;AACzE,6CAAoD;AACpD,+CAA4C;AAC5C,mDAA2E;AAG3E,+BAAuD;AACvD,sEAAwF;AACxF,oEAAiE;AACjE,kFAAoF;AACpF,gDAA8E;AAE9E,MAAM,cAAc,GAAG,6CAAqB,CAAC,UAAU,CAAC;AA6KxD;;GAEG;AACH,MAAa,uBAAuB;IAC3B,MAAM,CAAC,yBAAyB,GAAG,EAAE,GAAG,IAAI,CAAC;IAC7C,MAAM,CAAC,+BAA+B,GAAG,EAAE,C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C,MAAM,gBAAgB,GAAuB,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;QACjF,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC;YACnC,MAAM,IAAI,yBAAW,CAAC,2BAAY,CAAC,QAAQ,EAAE,GAAG,UAAU,eAAe,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF;AAnCD,4CAmCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModelHost\n */\n\n// To avoid circular load errors, the \"Element\" classes must be loaded before IModelHost.\nimport \"./IModelDb\"; // DO NOT REMOVE OR MOVE THIS LINE!\n\nimport { IModelNative, loadNativePlatform } from \"./internal/NativePlatform\";\nimport * as os from \"node:os\";\nimport { NativeLibrary } from \"@bentley/imodeljs-native\";\nimport { AccessToken, assert, BeEvent, BentleyStatus, DbResult, Guid, GuidString, IModelStatus, Logger, Mutable, ProcessDetector } from \"@itwin/core-bentley\";\nimport { AuthorizationClient, IModelError, LocalDirName, SessionProps } from \"@itwin/core-common\";\nimport { AzureServerStorage, AzureServerStorageConfig, BlobServiceClientWrapper } from \"@itwin/object-storage-azure\";\nimport { BlobServiceClient, StorageSharedKeyCredential } from \"@azure/storage-blob\";\nimport type { ServerStorage } from \"@itwin/object-storage-core\";\nimport { BackendHubAccess, CreateNewIModelProps } from \"./BackendHubAccess\";\nimport { BackendLoggerCategory } from \"./BackendLoggerCategory\";\nimport { BisCoreSchema } from \"./BisCoreSchema\";\nimport { BriefcaseManager } from \"./BriefcaseManager\";\nimport { CloudSqlite } from \"./CloudSqlite\";\nimport { FunctionalSchema } from \"./domains/FunctionalSchema\";\nimport { GenericSchema } from \"./domains/GenericSchema\";\nimport { GeoCoordConfig } from \"./GeoCoordConfig\";\nimport { IModelJsFs } from \"./IModelJsFs\";\nimport { DevToolsRpcImpl } from \"./rpc-impl/DevToolsRpcImpl\";\nimport { IModelReadRpcImpl } from \"./rpc-impl/IModelReadRpcImpl\";\nimport { IModelTileRpcImpl } from \"./rpc-impl/IModelTileRpcImpl\";\nimport { SnapshotIModelRpcImpl } from \"./rpc-impl/SnapshotIModelRpcImpl\";\nimport { initializeRpcBackend } from \"./RpcBackend\";\nimport { TileStorage } from \"./TileStorage\";\nimport { SettingsContainer, SettingsPriority } from \"./workspace/Settings\";\nimport { SettingsSchemas } from \"./workspace/SettingsSchemas\";\nimport { Workspace, WorkspaceOpts } from \"./workspace/Workspace\";\nimport { join, normalize as normalizeDir } from \"path\";\nimport { constructWorkspace, OwnedWorkspace } from \"./internal/workspace/WorkspaceImpl\";\nimport { SettingsImpl } from \"./internal/workspace/SettingsImpl\";\nimport { constructSettingsSchemas } from \"./internal/workspace/SettingsSchemasImpl\";\nimport { _getHubAccess, _hubAccess, _setHubAccess } from \"./internal/Symbols\";\n\nconst loggerCategory = BackendLoggerCategory.IModelHost;\n\n// cspell:ignore nodereport fatalerror apicall alicloud rpcs\n\n/** @internal */\nexport interface CrashReportingConfigNameValuePair {\n name: string;\n value: string;\n}\n\n/** Configuration of the crash-reporting system.\n * @internal\n */\nexport interface CrashReportingConfig {\n /** The directory to which *.dmp and/or iModelJsNativeCrash*.properties.txt files are written. This directory will be created if it does not already exist. */\n crashDir: string;\n /** max # .dmp files that may exist in crashDir. The default is 50. */\n maxDumpsInDir?: number;\n /** Enable crash-dumps? If so, .dmp and .properties.txt files will be generated and written to crashDir in the event of an unhandled native-code exception. If not, only .properties.txt files will be written. The default is false. */\n enableCrashDumps?: boolean;\n /** If enableCrashDumps is true, do you want a full-memory dump? Defaults to false. */\n wantFullMemoryDumps?: boolean;\n /** Enable Node.js crash reporting? If so, report files will be generated in the event of an unhandled exception or fatal error and written to crashDir. The default is false. */\n enableNodeReport?: boolean;\n /** Additional name, value pairs to write to iModelJsNativeCrash*.properties.txt file in the event of a crash. */\n params?: CrashReportingConfigNameValuePair[];\n /** Run this .js file to process .dmp and Node.js crash reporting .json files in the event of a crash.\n * This script will be executed with a single command-line parameter: the name of the dump or Node.js report file.\n * In the case of a dump file, there will be a second file with the same basename and the extension \".properties.txt\".\n * Since it runs in a separate process, this script will have no access to the Javascript\n * context of the exiting backend. No default.\n */\n dumpProcessorScriptFileName?: string;\n /** Upload crash dump and node-reports to Bentley's crash-reporting service? Defaults to false */\n uploadToBentley?: boolean;\n}\n\n/** @beta */\nexport interface AzureBlobStorageCredentials {\n account: string;\n accessKey: string;\n baseUrl?: string;\n}\n\n/**\n * Options for [[IModelHost.startup]]\n * @public\n */\nexport interface IModelHostOptions {\n /**\n * The name of the *Profile* subdirectory of [[cacheDir]] for this process. If not present, \"default\" is used.\n * @see [[IModelHost.profileName]]\n * @beta\n */\n profileName?: string;\n\n /**\n * Root of the directory holding all the files that iTwin.js caches\n * - If not specified at startup a platform specific default is used -\n * - Windows: $(HOMEDIR)/AppData/Local/iModelJs/\n * - Mac/iOS: $(HOMEDIR)/Library/Caches/iModelJs/\n * - Linux: $(HOMEDIR)/.cache/iModelJs/\n * where $(HOMEDIR) is documented [here](https://nodejs.org/api/os.html#os_os_homedir)\n * - if specified, ensure it is set to a folder with read/write access.\n * @see [[IModelHost.cacheDir]] for the value it's set to after startup\n */\n cacheDir?: LocalDirName;\n\n /** The directory where application assets are found. */\n appAssetsDir?: LocalDirName;\n\n /**\n * Options for creating the [[IModelHost.appWorkspace]]\n * @beta\n */\n workspace?: WorkspaceOpts;\n\n /**\n * The kind of iModel hub server to use.\n */\n hubAccess?: BackendHubAccess;\n\n /** The Azure blob storage credentials to use for the tile cache service. If omitted and no external service implementation is provided, a local cache will be used.\n * @beta\n */\n tileCacheAzureCredentials?: AzureBlobStorageCredentials;\n\n /**\n * @beta\n * @note A reference implementation is set for AzureServerStorage from @itwin/object-storage-azure if [[tileCacheAzureCredentials]] property is set. To supply a different implementation for any service provider (such as AWS),\n * set this property with a custom ServerStorage.\n */\n tileCacheStorage?: ServerStorage;\n\n /** The maximum size in bytes to which a local sqlite database used for caching tiles can grow before it is purged of least-recently-used tiles.\n * The local cache is used only if an external cache has not been configured via [[tileCacheStorage]], and [[tileCacheAzureCredentials]].\n * Defaults to 1 GB. Must be an unsigned integer. A value of zero disables the local cache entirely.\n * @beta\n */\n maxTileCacheDbSize?: number;\n\n /** Whether to restrict tile cache URLs by client IP address (if available).\n * @beta\n */\n restrictTileUrlsByClientIp?: boolean;\n\n /** Whether to enable OpenTelemetry tracing.\n * Defaults to `false`.\n */\n enableOpenTelemetry?: boolean;\n\n /** Whether to compress cached tiles.\n * Defaults to `true`.\n */\n compressCachedTiles?: boolean;\n\n /** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileTreeProps]($common) should wait before returning a \"pending\" status.\n * @internal\n */\n tileTreeRequestTimeout?: number;\n\n /** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileContent]($common) should wait before returning a \"pending\" status.\n * @internal\n */\n tileContentRequestTimeout?: number;\n\n /** The backend will log when a tile took longer to load than this threshold in seconds.\n * @internal\n */\n logTileLoadTimeThreshold?: number;\n\n /** The backend will log when a tile is loaded with a size in bytes above this threshold.\n * @internal\n */\n logTileSizeThreshold?: number;\n\n /** Crash-reporting configuration\n * @internal\n */\n crashReportingConfig?: CrashReportingConfig;\n\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n authorizationClient?: AuthorizationClient;\n\n /**\n * Automatically enable shared channel when opening iModels for read/write (see [Working With Channels]($docs/learning/backend/Channel.md)).\n * If not present, defaults to `true` for backwards compatibility. This means that the shared channel may be edited by default. Generally\n * that is undesirable because it allows applications to \"accidentally\" modify data it shouldn't be allowed to modify. Unfortunately the\n * previous versions of iTwin.js allowed it so this is necessary so they won't break.\n * Will be changed to default to `false` in 5.0.\n */\n allowSharedChannel?: boolean;\n\n /**\n * Setting this to true will revert to the previous behavior of using the native side for all CRUD operations.\n * While set to false, the getElement(), getModel() and getAspect() functions will use a thinned down native workflow to read the entities from the database.\n * This workflow performs work previously done on the native side in the TS side, resulting in performance improvements, if errors are detected,\n * this option can be set to true to revert to old workflow.\n */\n disableThinnedNativeInstanceWorkflow?: boolean;\n\n /**\n * Configuration controlling whether to disable the creation of restore points during pull/merge operations.\n * @beta\n */\n disableRestorePointOnPullMerge?: true;\n /**\n * Configuration controlling whether incremental schema loading is enabled or disabled.\n * @beta\n */\n incrementalSchemaLoading?: \"enabled\" | \"disabled\";\n}\n\n/** Configuration of core-backend.\n * @public\n */\nexport class IModelHostConfiguration implements IModelHostOptions {\n public static defaultTileRequestTimeout = 20 * 1000;\n public static defaultLogTileLoadTimeThreshold = 40;\n public static defaultLogTileSizeThreshold = 20 * 1000000;\n /** @internal */\n public static defaultMaxTileCacheDbSize = 1024 * 1024 * 1024;\n public appAssetsDir?: LocalDirName;\n public cacheDir?: LocalDirName;\n\n /** @beta */\n public workspace?: WorkspaceOpts;\n public hubAccess?: BackendHubAccess;\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n public authorizationClient?: AuthorizationClient;\n /** @beta */\n public restrictTileUrlsByClientIp?: boolean;\n public compressCachedTiles?: boolean;\n /** @beta */\n public tileCacheAzureCredentials?: AzureBlobStorageCredentials;\n /** @internal */\n public tileTreeRequestTimeout = IModelHostConfiguration.defaultTileRequestTimeout;\n /** @internal */\n public tileContentRequestTimeout = IModelHostConfiguration.defaultTileRequestTimeout;\n /** @internal */\n public logTileLoadTimeThreshold = IModelHostConfiguration.defaultLogTileLoadTimeThreshold;\n /** @internal */\n public logTileSizeThreshold = IModelHostConfiguration.defaultLogTileSizeThreshold;\n /** @internal */\n public crashReportingConfig?: CrashReportingConfig;\n /**\n * Configuration controlling whether to use the thinned down native instance functions for element, model, and aspect CRUD operations\n * or use the previous behavior of using the native side for all CRUD operations. Set to true to revert to the previous behavior.\n * @beta\n */\n public disableThinnedNativeInstanceWorkflow?: boolean;\n\n /**\n * Configuration controlling whether to disable the creation of restore points during pull/merge operations.\n * @beta\n */\n public disableRestorePointOnPullMerge?: true;\n /**\n * Configuration controlling whether incremental schema loading is disabled.\n * Default is \"disabled\" at the moment to preserve existing behavior.\n * @beta\n */\n public incrementalSchemaLoading: \"enabled\" | \"disabled\" = \"disabled\";\n}\n\n/**\n * Settings for `IModelHost.appWorkspace`.\n * @note this includes the default dictionary from the SettingsSpecRegistry\n */\nclass ApplicationSettings extends SettingsImpl {\n private _remove?: VoidFunction;\n protected override verifyPriority(priority: SettingsPriority) {\n if (priority > SettingsPriority.application) // only application or lower may appear in ApplicationSettings\n throw new Error(\"Use IModelSettings\");\n }\n private updateDefaults() {\n const defaults: SettingsContainer = {};\n for (const [schemaName, val] of IModelHost.settingsSchemas.settingDefs) {\n if (val.default)\n defaults[schemaName] = val.default;\n }\n this.addDictionary({ name: \"_default_\", priority: 0 }, defaults);\n }\n\n public constructor() {\n super();\n this._remove = IModelHost.settingsSchemas.onSchemaChanged.addListener(() => this.updateDefaults());\n this.updateDefaults();\n }\n\n public override close() {\n if (this._remove) {\n this._remove();\n this._remove = undefined;\n }\n }\n}\n\nconst definedInStartup = <T>(obj: T | undefined): T => {\n if (obj === undefined)\n throw new Error(\"IModelHost.startup must be called first\");\n return obj;\n};\n\n/** IModelHost initializes ($backend) and captures its configuration. A backend must call [[IModelHost.startup]] before using any backend classes.\n * See [the learning article]($docs/learning/backend/IModelHost.md)\n * @public\n */\nexport class IModelHost {\n private constructor() { }\n\n /** The AuthorizationClient used to obtain [AccessToken]($bentley)s. */\n public static authorizationClient?: AuthorizationClient;\n\n public static backendVersion = \"\";\n private static _profileName: string;\n private static _cacheDir = \"\";\n private static _settingsSchemas?: SettingsSchemas;\n private static _appWorkspace?: OwnedWorkspace;\n\n // Omit the hubAccess field from configuration so it stays internal.\n public static configuration?: Omit<IModelHostOptions, \"hubAccess\">;\n\n /**\n * The name of the *Profile* directory (a subdirectory of \"[[cacheDir]]/profiles/\") for this process.\n *\n * The *Profile* directory is used to cache data that is specific to a type-of-usage of the iTwin.js library.\n * It is important that information in the profile cache be consistent but isolated across sessions (i.e.\n * data for a profile is maintained between runs, but each profile is completely independent and\n * unaffected by the presence or use of others.)\n * @note **Only one process at a time may be using a given profile**, and an exception will be thrown by [[startup]]\n * if a second process attempts to use the same profile.\n * @beta\n */\n public static get profileName(): string {\n return this._profileName;\n }\n\n /** The full path of the Profile directory.\n * @see [[profileName]]\n * @beta\n */\n public static get profileDir(): LocalDirName {\n return join(this._cacheDir, \"profiles\", this._profileName);\n }\n\n /** Event raised during startup to allow loading settings data */\n public static readonly onWorkspaceStartup = new BeEvent<() => void>();\n\n /** Event raised just after the backend IModelHost was started */\n public static readonly onAfterStartup = new BeEvent<() => void>();\n\n /** Event raised just before the backend IModelHost is to be shut down */\n public static readonly onBeforeShutdown = new BeEvent<() => void>();\n\n /** @internal */\n public static readonly session: Mutable<SessionProps> = { applicationId: \"2686\", applicationVersion: \"1.0.0\", sessionId: \"\" };\n\n /** A uniqueId for this session */\n public static get sessionId() { return this.session.sessionId; }\n public static set sessionId(id: GuidString) { this.session.sessionId = id; }\n\n /** The Id of this application - needs to be set only if it is an agent application. The applicationId will otherwise originate at the frontend. */\n public static get applicationId() { return this.session.applicationId; }\n public static set applicationId(id: string) { this.session.applicationId = id; }\n\n /** The version of this application - needs to be set if is an agent application. The applicationVersion will otherwise originate at the frontend. */\n public static get applicationVersion() { return this.session.applicationVersion; }\n public static set applicationVersion(version: string) { this.session.applicationVersion = version; }\n\n /** A string that can identify the current user to other users when collaborating. */\n public static userMoniker = \"unknown\";\n\n /** Root directory holding files that iTwin.js caches */\n public static get cacheDir(): LocalDirName { return this._cacheDir; }\n\n /** The application [[Workspace]] for this `IModelHost`\n * @note this `Workspace` only holds [[WorkspaceContainer]]s and [[Settings]] scoped to the currently loaded application(s).\n * All organization, iTwin, and iModel based containers or settings must be accessed through [[IModelDb.workspace]] and\n * attempting to add them to this Workspace will fail.\n * @beta\n */\n public static get appWorkspace(): Workspace { return definedInStartup(this._appWorkspace); }\n\n /** The registry of schemas describing the [[Setting]]s for the application session.\n * Applications should register their schemas via methods like [[SettingsSchemas.addGroup]].\n * @beta\n */\n public static get settingsSchemas(): SettingsSchemas { return definedInStartup(this._settingsSchemas); }\n\n /** The optional [[FileNameResolver]] that resolves keys and partial file names for snapshot iModels.\n * @deprecated in 4.10 - will not be removed until after 2026-06-13. When opening a snapshot by file name, ensure to pass already resolved path. Using a key to open a snapshot is now deprecated.\n */\n public static snapshotFileNameResolver?: FileNameResolver; // eslint-disable-line @typescript-eslint/no-deprecated\n\n /** Get the current access token for this IModelHost, or a blank string if none is available.\n * @note for web backends, this will *always* return a blank string because the backend itself has no token (but never needs one either.)\n * For all IpcHosts, where this backend is servicing a single frontend, this will be the user's token. For ElectronHost, the backend\n * obtains the token and forwards it to the frontend.\n * @note accessTokens expire periodically and are automatically refreshed, if possible. Therefore tokens should not be saved, and the value\n * returned by this method may change over time throughout the course of a session.\n */\n public static async getAccessToken(): Promise<AccessToken> {\n try {\n return (await IModelHost.authorizationClient?.getAccessToken()) ?? \"\";\n } catch {\n return \"\";\n }\n }\n\n private static loadNative(options: IModelHostOptions) {\n loadNativePlatform();\n\n if (options.crashReportingConfig && options.crashReportingConfig.crashDir && !ProcessDetector.isElectronAppBackend && !ProcessDetector.isMobileAppBackend) {\n IModelNative.platform.setCrashReporting(options.crashReportingConfig);\n\n Logger.logTrace(loggerCategory, \"Configured crash reporting\", {\n enableCrashDumps: options.crashReportingConfig?.enableCrashDumps,\n wantFullMemoryDumps: options.crashReportingConfig?.wantFullMemoryDumps,\n enableNodeReport: options.crashReportingConfig?.enableNodeReport,\n uploadToBentley: options.crashReportingConfig?.uploadToBentley,\n });\n\n if (options.crashReportingConfig.enableNodeReport) {\n if (process.report !== undefined) {\n process.report.reportOnFatalError = true;\n process.report.reportOnUncaughtException = true;\n process.report.directory = options.crashReportingConfig.crashDir;\n Logger.logTrace(loggerCategory, \"Configured Node.js crash reporting\");\n } else {\n Logger.logWarning(loggerCategory, \"Unable to configure Node.js crash reporting\");\n }\n }\n }\n }\n\n /** @internal */\n public static tileStorage?: TileStorage;\n\n private static _hubAccess?: BackendHubAccess;\n /** @internal */\n public static [_setHubAccess](hubAccess: BackendHubAccess | undefined) { this._hubAccess = hubAccess; }\n\n /** get the current hubAccess, if present.\n * @internal\n */\n public static [_getHubAccess](): BackendHubAccess | undefined { return this._hubAccess; }\n\n /** Provides access to the IModelHub for this IModelHost\n * @internal\n * @note If [[IModelHostOptions.hubAccess]] was undefined when initializing this class, accessing this property will throw an error.\n * To determine whether one is present, use [[_getHubAccess]].\n */\n public static get [_hubAccess](): BackendHubAccess {\n if (IModelHost._hubAccess === undefined)\n throw new IModelError(IModelStatus.BadRequest, \"No BackendHubAccess supplied in IModelHostOptions\");\n return IModelHost._hubAccess;\n }\n\n private static initializeWorkspace(configuration: IModelHostOptions) {\n const settingAssets = join(KnownLocations.packageAssetsDir, \"Settings\");\n this._settingsSchemas = constructSettingsSchemas();\n this._settingsSchemas.addDirectory(join(settingAssets, \"Schemas\"));\n this._appWorkspace = constructWorkspace(new ApplicationSettings(), configuration.workspace);\n\n // Create the CloudCache for Workspaces. This will fail if another process is already using the same profile.\n try {\n this.appWorkspace.getCloudCache();\n } catch (e: any) {\n throw (e.errorNumber === DbResult.BE_SQLITE_BUSY) ? new IModelError(DbResult.BE_SQLITE_BUSY, `Profile [${this.profileDir}] is already in use by another process`) : e;\n }\n\n this.appWorkspace.settings.addDirectory(settingAssets, SettingsPriority.defaults);\n\n GeoCoordConfig.onStartup();\n // allow applications to load their default settings\n this.onWorkspaceStartup.raiseEvent();\n }\n\n private static _isValid = false;\n\n /** true between a successful call to [[startup]] and before [[shutdown]] */\n public static get isValid() {\n return IModelHost._isValid;\n }\n\n /** This method must be called before any iTwin.js services are used.\n * @param options Host configuration data.\n * Raises [[onAfterStartup]].\n * @see [[shutdown]].\n */\n public static async startup(options?: IModelHostOptions): Promise<void> {\n if (this._isValid)\n return; // we're already initialized\n this._isValid = true;\n\n options = options ?? {};\n if (this.sessionId === \"\")\n this.sessionId = Guid.createValue();\n\n this.authorizationClient = options.authorizationClient;\n\n this.backendVersion = require(\"../../package.json\").version; // eslint-disable-line @typescript-eslint/no-require-imports\n initializeRpcBackend(options.enableOpenTelemetry);\n\n this.loadNative(options);\n this.setupCacheDir(options);\n this.initializeWorkspace(options);\n\n BriefcaseManager.initialize(join(this._cacheDir, \"imodels\"));\n\n [\n IModelReadRpcImpl,\n IModelTileRpcImpl,\n SnapshotIModelRpcImpl, // eslint-disable-line @typescript-eslint/no-deprecated\n DevToolsRpcImpl,\n ].forEach((rpc) => rpc.register()); // register all of the RPC implementations\n\n [\n BisCoreSchema,\n GenericSchema,\n FunctionalSchema,\n ].forEach((schema) => schema.registerSchema()); // register all of the schemas\n\n const { hubAccess, ...otherOptions } = options;\n if (undefined !== hubAccess)\n this._hubAccess = hubAccess;\n\n this.configuration = otherOptions;\n this.setupTileCache();\n\n process.once(\"beforeExit\", IModelHost.shutdown);\n this.onAfterStartup.raiseEvent();\n }\n\n private static setupCacheDir(configuration: IModelHostOptions) {\n this._cacheDir = normalizeDir(configuration.cacheDir ?? NativeLibrary.defaultCacheDir);\n IModelJsFs.recursiveMkDirSync(this._cacheDir);\n\n this._profileName = configuration.profileName ?? \"default\";\n Logger.logInfo(loggerCategory, `cacheDir: [${this.cacheDir}], profileDir: [${this.profileDir}]`);\n }\n\n /** This method must be called when an iTwin.js host is shut down. Raises [[onBeforeShutdown]] */\n public static async shutdown(this: void): Promise<void> {\n // Note: This method is set as a node listener where `this` is unbound. Call private method to\n // ensure `this` is correct. Don't combine these methods.\n return IModelHost.doShutdown();\n }\n\n /**\n * Create a new iModel.\n * @returns the Guid of the newly created iModel.\n * @throws [IModelError]($common) in case of errors.\n * @note If [[IModelHostOptions.hubAccess]] was undefined in the call to [[startup]], this function will throw an error.\n */\n public static async createNewIModel(arg: CreateNewIModelProps): Promise<GuidString> {\n return this[_hubAccess].createNewIModel(arg);\n }\n\n private static async doShutdown() {\n if (!this._isValid)\n return;\n\n this._isValid = false;\n this.onBeforeShutdown.raiseEvent();\n\n this.configuration = undefined;\n this.tileStorage = undefined;\n\n this._appWorkspace?.close();\n this._appWorkspace = undefined;\n this._settingsSchemas = undefined;\n\n CloudSqlite.CloudCaches.destroy();\n process.removeListener(\"beforeExit\", IModelHost.shutdown);\n }\n\n /**\n * Add or update a property that should be included in a crash report.\n * @internal\n */\n public static setCrashReportProperty(name: string, value: string): void {\n IModelNative.platform.setCrashReportProperty(name, value);\n }\n\n /**\n * Remove a previously defined property so that will not be included in a crash report.\n * @internal\n */\n public static removeCrashReportProperty(name: string): void {\n IModelNative.platform.setCrashReportProperty(name, undefined);\n }\n\n /**\n * Get all properties that will be included in a crash report.\n * @internal\n */\n public static getCrashReportProperties(): CrashReportingConfigNameValuePair[] {\n return IModelNative.platform.getCrashReportProperties();\n }\n\n /** The directory where application assets may be found */\n public static get appAssetsDir(): string | undefined {\n return undefined !== IModelHost.configuration ? IModelHost.configuration.appAssetsDir : undefined;\n }\n\n /** The time, in milliseconds, for which IModelTileRpcInterface.requestTileTreeProps should wait before returning a \"pending\" status.\n * @internal\n */\n public static get tileTreeRequestTimeout(): number {\n return IModelHost.configuration?.tileTreeRequestTimeout ?? IModelHostConfiguration.defaultTileRequestTimeout;\n }\n /** The time, in milliseconds, for which IModelTileRpcInterface.requestTileContent should wait before returning a \"pending\" status.\n * @internal\n */\n public static get tileContentRequestTimeout(): number {\n return IModelHost.configuration?.tileContentRequestTimeout ?? IModelHostConfiguration.defaultTileRequestTimeout;\n }\n\n /** The backend will log when a tile took longer to load than this threshold in seconds. */\n public static get logTileLoadTimeThreshold(): number {\n return IModelHost.configuration?.logTileLoadTimeThreshold ?? IModelHostConfiguration.defaultLogTileLoadTimeThreshold;\n }\n /** The backend will log when a tile is loaded with a size in bytes above this threshold. */\n public static get logTileSizeThreshold(): number {\n return IModelHost.configuration?.logTileSizeThreshold ?? IModelHostConfiguration.defaultLogTileSizeThreshold;\n }\n\n /** Whether external tile caching is active.\n * @internal\n */\n public static get usingExternalTileCache(): boolean {\n return undefined !== IModelHost.tileStorage;\n }\n\n /** Whether to restrict tile cache URLs by client IP address.\n * @internal\n */\n public static get restrictTileUrlsByClientIp(): boolean {\n return undefined !== IModelHost.configuration && (IModelHost.configuration.restrictTileUrlsByClientIp ? true : false);\n }\n\n /** Whether to compress cached tiles.\n * @internal\n */\n public static get compressCachedTiles(): boolean {\n return false !== IModelHost.configuration?.compressCachedTiles;\n }\n\n private static setupTileCache() {\n assert(undefined !== IModelHost.configuration);\n const config = IModelHost.configuration;\n const storage = config.tileCacheStorage;\n const credentials = config.tileCacheAzureCredentials;\n\n if (!storage && !credentials) {\n IModelNative.platform.setMaxTileCacheSize(config.maxTileCacheDbSize ?? IModelHostConfiguration.defaultMaxTileCacheDbSize);\n return;\n }\n\n IModelNative.platform.setMaxTileCacheSize(0);\n if (credentials) {\n if (storage)\n throw new IModelError(BentleyStatus.ERROR, \"Cannot use both Azure and custom cloud storage providers for tile cache.\");\n this.setupAzureTileCache(credentials);\n }\n if (storage)\n IModelHost.tileStorage = new TileStorage(storage);\n }\n\n private static setupAzureTileCache(credentials: AzureBlobStorageCredentials) {\n const storageConfig: AzureServerStorageConfig = {\n accountName: credentials.account,\n accountKey: credentials.accessKey,\n baseUrl: credentials.baseUrl ?? `https://${credentials.account}.blob.core.windows.net`,\n }\n const blobServiceClient = new BlobServiceClient(\n storageConfig.baseUrl,\n new StorageSharedKeyCredential(storageConfig.accountName, storageConfig.accountKey),\n );\n const azureStorage: ServerStorage = new AzureServerStorage(storageConfig, new BlobServiceClientWrapper(blobServiceClient))\n IModelHost.tileStorage = new TileStorage(azureStorage);\n }\n\n /** @internal */\n public static computeSchemaChecksum(arg: { schemaXmlPath: string, referencePaths: string[], exactMatch?: boolean }): string {\n return IModelNative.platform.computeSchemaChecksum(arg);\n }\n}\n\n/** Information about the platform on which the app is running.\n * @public\n */\nexport class Platform {\n /** Get the name of the platform. */\n public static get platformName(): \"win32\" | \"linux\" | \"darwin\" | \"ios\" | \"android\" | \"uwp\" {\n return process.platform as any;\n }\n}\n\n/** Well known directories that may be used by the application.\n * @public\n */\nexport class KnownLocations {\n\n /** The directory where the imodeljs-native assets are stored. */\n public static get nativeAssetsDir(): LocalDirName {\n return IModelNative.platform.DgnDb.getAssetsDir();\n }\n\n /** The directory where the core-backend assets are stored. */\n public static get packageAssetsDir(): LocalDirName {\n return join(__dirname, \"assets\");\n }\n\n /** The temporary directory. */\n public static get tmpdir(): LocalDirName {\n return os.tmpdir();\n }\n}\n\n/** Extend this class to provide custom file name resolution behavior.\n * @note Only `tryResolveKey` and/or `tryResolveFileName` need to be overridden as the implementations of `resolveKey` and `resolveFileName` work for most purposes.\n * @see [[IModelHost.snapshotFileNameResolver]]\n * @public\n * @deprecated in 4.10 - will not be removed until after 2026-06-13. When opening a snapshot by file name, ensure to pass already resolved path. Using a key to open a snapshot is now deprecated.\n */\nexport abstract class FileNameResolver {\n /** Resolve a file name from the specified key.\n * @param _fileKey The key that identifies the file name in a `Map` or other similar data structure.\n * @returns The resolved file name or `undefined` if not found.\n */\n public tryResolveKey(_fileKey: string): string | undefined { return undefined; }\n /** Resolve a file name from the specified key.\n * @param fileKey The key that identifies the file name in a `Map` or other similar data structure.\n * @returns The resolved file name.\n * @throws [[IModelError]] if not found.\n */\n public resolveKey(fileKey: string): string {\n const resolvedFileName: string | undefined = this.tryResolveKey(fileKey);\n if (undefined === resolvedFileName) {\n throw new IModelError(IModelStatus.NotFound, `${fileKey} not resolved`);\n }\n return resolvedFileName;\n }\n /** Resolve the input file name, which may be a partial name, into a full path file name.\n * @param inFileName The partial file name.\n * @returns The resolved full path file name or `undefined` if not found.\n */\n public tryResolveFileName(inFileName: string): string | undefined { return inFileName; }\n /** Resolve the input file name, which may be a partial name, into a full path file name.\n * @param inFileName The partial file name.\n * @returns The resolved full path file name.\n * @throws [[IModelError]] if not found.\n */\n public resolveFileName(inFileName: string): string {\n const resolvedFileName: string | undefined = this.tryResolveFileName(inFileName);\n if (undefined === resolvedFileName) {\n throw new IModelError(IModelStatus.NotFound, `${inFileName} not resolved`);\n }\n return resolvedFileName;\n }\n}\n"]}
@@ -7,6 +7,7 @@ import { IModelHostOptions } from "./IModelHost";
7
7
  /** @internal */
8
8
  export interface LocalhostIpcHostOpts {
9
9
  socketPort?: number;
10
+ host?: string;
10
11
  noServer?: boolean;
11
12
  }
12
13
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"LocalhostIpcHost.d.ts","sourceRoot":"","sources":["../../src/LocalhostIpcHost.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EACgC,mBAAmB,EACzD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGjD,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuDD,gBAAgB;AAChB,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAC,YAAY,CAAS;IACpC,OAAc,MAAM,EAAE,mBAAmB,CAAC;WAE5B,OAAO,CAAC,UAAU,EAAE,EAAE;WAIhB,OAAO,CAAC,IAAI,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;QAAC,UAAU,CAAC,EAAE,iBAAiB,CAAA;KAAE;CAe/G"}
1
+ {"version":3,"file":"LocalhostIpcHost.d.ts","sourceRoot":"","sources":["../../src/LocalhostIpcHost.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EACgC,mBAAmB,EACzD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGjD,gBAAgB;AAChB,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuDD,gBAAgB;AAChB,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAC,YAAY,CAAS;IACpC,OAAc,MAAM,EAAE,mBAAmB,CAAC;WAE5B,OAAO,CAAC,UAAU,EAAE,EAAE;WAIhB,OAAO,CAAC,IAAI,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;QAAC,UAAU,CAAC,EAAE,iBAAiB,CAAA;KAAE;CAe/G"}
@@ -17,7 +17,7 @@ class LocalTransport extends core_common_1.IpcWebSocketTransport {
17
17
  constructor(opts) {
18
18
  super();
19
19
  if (!opts.noServer) {
20
- this._server = new ws.Server({ port: opts.socketPort ?? 3002 });
20
+ this._server = new ws.Server({ port: opts.socketPort ?? 3002, host: opts.host ?? "127.0.0.1" });
21
21
  this._server.on("connection", (connection) => LocalhostIpcHost.connect(connection));
22
22
  }
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LocalhostIpcHost.js","sourceRoot":"","sources":["../../src/LocalhostIpcHost.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAyB;AACzB,oDAE4B;AAE5B,uCAAgD;AAQhD,MAAM,cAAe,SAAQ,mCAAqB;IACxC,OAAO,CAAwB;IAC/B,YAAY,GAAoB,IAAI,GAAG,EAAE,CAAC;IAElD,YAAmB,IAA0B;QAC3C,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE,CAAC,CAAC;YAChE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,E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;;AAtBH,4CAuBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModelHost\n */\n\nimport * as ws from \"ws\";\nimport {\n InterceptedRpcRequest, IpcWebSocket, IpcWebSocketBackend, IpcWebSocketMessage, IpcWebSocketTransport, rpcOverIpcStrings, RpcSessionInvocation,\n} from \"@itwin/core-common\";\nimport { IModelHostOptions } from \"./IModelHost\";\nimport { IpcHandler, IpcHost } from \"./IpcHost\";\n\n/** @internal */\nexport interface LocalhostIpcHostOpts {\n socketPort?: number;\n noServer?: boolean;\n}\n\nclass LocalTransport extends IpcWebSocketTransport {\n private _server: ws.Server | undefined;\n private _connections: Map<ws, number> = new Map();\n\n public constructor(opts: LocalhostIpcHostOpts) {\n super();\n\n if (!opts.noServer) {\n this._server = new ws.Server({ port: opts.socketPort ?? 3002 });\n this._server.on(\"connection\", (connection) => LocalhostIpcHost.connect(connection));\n }\n }\n\n public send(message: IpcWebSocketMessage): void {\n this._connections.forEach((last, connection) => {\n message.sequence = last + 1;\n this._connections.set(connection, message.sequence);\n const parts = this.serialize(message);\n parts.forEach((part) => connection.send(part));\n });\n }\n\n public connect(connection: ws) {\n this._connections.set(connection, -1);\n\n connection.on(\"message\", async (data) => {\n const message = await this.notifyIncoming(data, connection);\n if (IpcWebSocketMessage.skip(message)) {\n return;\n }\n\n for (const listener of IpcWebSocket.receivers) {\n listener({} as Event, message);\n }\n });\n\n connection.on(\"close\", () => {\n this._connections.delete(connection);\n this.notifyClose(connection);\n });\n }\n}\n\nclass RpcHandler extends IpcHandler {\n public channelName = rpcOverIpcStrings.channelName;\n\n public async request(info: InterceptedRpcRequest) {\n const invocation = RpcSessionInvocation.create(info);\n const fulfillment = await invocation.fulfillment;\n return invocation.rejected ? Promise.reject(fulfillment.rawResult) : fulfillment.rawResult; // eslint-disable-line @typescript-eslint/prefer-promise-reject-errors\n }\n}\n\n/** @internal */\nexport class LocalhostIpcHost {\n private static _initialized = false;\n public static socket: IpcWebSocketBackend;\n\n public static connect(connection: ws) {\n (IpcWebSocket.transport as LocalTransport).connect(connection);\n }\n\n public static async startup(opts?: { localhostIpcHost?: LocalhostIpcHostOpts, iModelHost?: IModelHostOptions }) {\n let registerHandler = false;\n\n if (!this._initialized) {\n registerHandler = true;\n IpcWebSocket.transport = new LocalTransport(opts?.localhostIpcHost ?? {});\n this.socket = new IpcWebSocketBackend();\n this._initialized = true;\n }\n\n await IpcHost.startup({ ipcHost: { socket: this.socket }, iModelHost: opts?.iModelHost });\n\n if (registerHandler)\n RpcHandler.register();\n }\n}\n"]}
1
+ {"version":3,"file":"LocalhostIpcHost.js","sourceRoot":"","sources":["../../src/LocalhostIpcHost.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,yBAAyB;AACzB,oDAE4B;AAE5B,uCAAgD;AAShD,MAAM,cAAe,SAAQ,mCAAqB;IACxC,OAAO,CAAwB;IAC/B,YAAY,GAAoB,IAAI,GAAG,EAAE,CAAC;IAElD,YAAmB,IAA0B;QAC3C,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,WAAW,EAAE,CAAC,CAAC;YAChG,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;IAEM,IAAI,CAAC,OAA4B;QACtC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,UAAU,EAAE,E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CAAC,CAAC;QACrD,MAAM,WAAW,GAAG,MAAM,UAAU,CAAC,WAAW,CAAC;QACjD,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,sEAAsE;IACpK,CAAC;CACF;AAED,gBAAgB;AAChB,MAAa,gBAAgB;IACnB,MAAM,CAAC,YAAY,GAAG,KAAK,CAAC;IAC7B,MAAM,CAAC,MAAM,CAAsB;IAEnC,MAAM,CAAC,OAAO,CAAC,UAAc;QACjC,0BAAY,CAAC,SAA4B,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACjE,CAAC;IAEM,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,IAAkF;QAC5G,IAAI,eAAe,GAAG,KAAK,CAAC;QAE5B,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,eAAe,GAAG,IAAI,CAAC;YACvB,0BAAY,CAAC,SAAS,GAAG,IAAI,cAAc,CAAC,IAAI,EAAE,gBAAgB,IAAI,EAAE,CAAC,CAAC;YAC1E,IAAI,CAAC,MAAM,GAAG,IAAI,iCAAmB,EAAE,CAAC;YACxC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QAC3B,CAAC;QAED,MAAM,iBAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;QAE1F,IAAI,eAAe;YACjB,UAAU,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;;AAtBH,4CAuBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module IModelHost\n */\n\nimport * as ws from \"ws\";\nimport {\n InterceptedRpcRequest, IpcWebSocket, IpcWebSocketBackend, IpcWebSocketMessage, IpcWebSocketTransport, rpcOverIpcStrings, RpcSessionInvocation,\n} from \"@itwin/core-common\";\nimport { IModelHostOptions } from \"./IModelHost\";\nimport { IpcHandler, IpcHost } from \"./IpcHost\";\n\n/** @internal */\nexport interface LocalhostIpcHostOpts {\n socketPort?: number;\n host?: string;\n noServer?: boolean;\n}\n\nclass LocalTransport extends IpcWebSocketTransport {\n private _server: ws.Server | undefined;\n private _connections: Map<ws, number> = new Map();\n\n public constructor(opts: LocalhostIpcHostOpts) {\n super();\n\n if (!opts.noServer) {\n this._server = new ws.Server({ port: opts.socketPort ?? 3002, host: opts.host ?? \"127.0.0.1\" });\n this._server.on(\"connection\", (connection) => LocalhostIpcHost.connect(connection));\n }\n }\n\n public send(message: IpcWebSocketMessage): void {\n this._connections.forEach((last, connection) => {\n message.sequence = last + 1;\n this._connections.set(connection, message.sequence);\n const parts = this.serialize(message);\n parts.forEach((part) => connection.send(part));\n });\n }\n\n public connect(connection: ws) {\n this._connections.set(connection, -1);\n\n connection.on(\"message\", async (data) => {\n const message = await this.notifyIncoming(data, connection);\n if (IpcWebSocketMessage.skip(message)) {\n return;\n }\n\n for (const listener of IpcWebSocket.receivers) {\n listener({} as Event, message);\n }\n });\n\n connection.on(\"close\", () => {\n this._connections.delete(connection);\n this.notifyClose(connection);\n });\n }\n}\n\nclass RpcHandler extends IpcHandler {\n public channelName = rpcOverIpcStrings.channelName;\n\n public async request(info: InterceptedRpcRequest) {\n const invocation = RpcSessionInvocation.create(info);\n const fulfillment = await invocation.fulfillment;\n return invocation.rejected ? Promise.reject(fulfillment.rawResult) : fulfillment.rawResult; // eslint-disable-line @typescript-eslint/prefer-promise-reject-errors\n }\n}\n\n/** @internal */\nexport class LocalhostIpcHost {\n private static _initialized = false;\n public static socket: IpcWebSocketBackend;\n\n public static connect(connection: ws) {\n (IpcWebSocket.transport as LocalTransport).connect(connection);\n }\n\n public static async startup(opts?: { localhostIpcHost?: LocalhostIpcHostOpts, iModelHost?: IModelHostOptions }) {\n let registerHandler = false;\n\n if (!this._initialized) {\n registerHandler = true;\n IpcWebSocket.transport = new LocalTransport(opts?.localhostIpcHost ?? {});\n this.socket = new IpcWebSocketBackend();\n this._initialized = true;\n }\n\n await IpcHost.startup({ ipcHost: { socket: this.socket }, iModelHost: opts?.iModelHost });\n\n if (registerHandler)\n RpcHandler.register();\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NativeHost.d.ts","sourceRoot":"","sources":["../../src/NativeHost.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAuB,OAAO,EAAc,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EACW,0BAA0B,EAAgE,sBAAsB,EAChI,YAAY,EACb,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EAAuB,WAAW,EAA4B,MAAM,WAAW,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAqGtD;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,UAAU,CAAC,EAAE;QACX,+GAA+G;QAC/G,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH;AAED;;;GAGG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAA6B;IAC1D,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAS;IACxC,OAAO;IAEP,qEAAqE;IACrE,gBAAuB,6BAA6B,mBAAwB,0BAA0B,KAAK,IAAI,EAAI;IAEnH,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAS;IAE7C,0DAA0D;IAC1D,WAAkB,mBAAmB,IAAI,MAAM,CAE9C;IAED,yEAAyE;WAC3D,oBAAoB,CAAC,CAAC,SAAS,MAAM,sBAAsB,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,UAAU,CAAC,sBAAsB,CA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mB,IAAI,MAAM,CAE9C;IAED,yEAAyE;WAC3D,oBAAoB,CAAC,CAAC,SAAS,MAAM,sBAAsB,EAAE,UAAU,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;IAIxI,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAS;IAChC,WAAkB,OAAO,IAAI,OAAO,CAA0B;IAC9D,WAAkB,eAAe,WAAoC;IACrE,kDAAkD;IAClD,WAAkB,aAAa,qBAE9B;IAED;;;OAGG;WACiB,OAAO,CAAC,GAAG,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAehE,mEAAmE;WAC/C,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAM7C,iDAAiD;WACnC,yBAAyB,IAAI,0BAA0B;IAIrE;;;;OAIG;WACW,4BAA4B,CAAC,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,0BAA0B,GAAG,IAAI;CAYjH"}
@@ -17,6 +17,7 @@ const IModelHost_1 = require("./IModelHost");
17
17
  const IpcHost_1 = require("./IpcHost");
18
18
  const NativeAppStorage_1 = require("./NativeAppStorage");
19
19
  const CatalogDb_1 = require("./CatalogDb");
20
+ const OnlineStatus_1 = require("./internal/OnlineStatus");
20
21
  /**
21
22
  * Implementation of NativeAppFunctions
22
23
  */
@@ -158,6 +159,12 @@ class NativeHost {
158
159
  if (this._reachability !== status) {
159
160
  this._reachability = status;
160
161
  this.onInternetConnectivityChanged.raiseEvent(status);
162
+ if (core_bentley_1.ProcessDetector.isMobileAppBackend) {
163
+ // Merely referencing NativeHost from a non-native backend causes a runtime exception (even
164
+ // inside an if statement that checks that the backend is a mobile backend). This allows code
165
+ // that needs to check connectivity to do so without referencing NativeHost directly.
166
+ (0, OnlineStatus_1.setOnlineStatus)(status === core_common_1.InternetConnectivityStatus.Online);
167
+ }
161
168
  }
162
169
  }
163
170
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NativeH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AAO,CAAC,GAAG,CAAC,CAAC;QAC3B,IAAI,iBAAO,CAAC,OAAO,EAAE,CAAC,CAAE,yDAAyD;YAC/E,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YAC5B,gCAAoB,CAAC,QAAQ,EAAE,CAAC;QAClC,CAAC;IACH,CAAC;IAED,mEAAmE;IAC5D,MAAM,CAAC,KAAK,CAAC,QAAQ;QAC1B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,6BAA6B,CAAC,KAAK,EAAE,CAAC;QAC3C,MAAM,iBAAO,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAED,iDAAiD;IAC1C,MAAM,CAAC,yBAAyB;QACrC,OAAO,IAAI,CAAC,aAAa,IAAI,wCAA0B,CAAC,MAAM,CAAC;IACjE,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,4BAA4B,CAAC,YAA0B,EAAE,MAAkC;QACvG,IAAI,IAAI,CAAC,aAAa,KAAK,MAAM,EAAE,CAAC;YAClC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC;YAC5B,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;;AArEH,gCAsEC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module NativeApp\n */\n\nimport { join } from \"path\";\nimport { AccessToken, assert, BeEvent, GuidString } from \"@itwin/core-bentley\";\nimport {\n BriefcaseProps, InternetConnectivityStatus, LocalBriefcaseProps, NativeAppFunctions, nativeAppIpcStrings, NativeAppNotifications,\n OverriddenBy, RequestNewBriefcaseProps, StorageValue,\n} from \"@itwin/core-common\";\nimport { BriefcaseManager, RequestNewBriefcaseArg } from \"./BriefcaseManager\";\nimport { Downloads, ProgressFunction, ProgressStatus } from \"./CheckpointManager\";\nimport { IModelHost } from \"./IModelHost\";\nimport { IpcHandler, IpcHost, IpcHostOpts, throttleProgressCallback } from \"./IpcHost\";\nimport { NativeAppStorage } from \"./NativeAppStorage\";\nimport { CatalogIModelHandler } from \"./CatalogDb\";\n\n/**\n * Implementation of NativeAppFunctions\n */\nclass NativeAppHandler extends IpcHandler implements NativeAppFunctions {\n public get channelName() { return nativeAppIpcStrings.channelName; }\n\n public async getAccessToken(): Promise<AccessToken | undefined> {\n return IModelHost.authorizationClient?.getAccessToken();\n }\n\n public async checkInternetConnectivity(): Promise<InternetConnectivityStatus> {\n return NativeHost.checkInternetConnectivity();\n }\n public async overrideInternetConnectivity(by: OverriddenBy, status: InternetConnectivityStatus): Promise<void> {\n NativeHost.overrideInternetConnectivity(by, status);\n }\n public async acquireNewBriefcaseId(iModelId: GuidString): Promise<number> {\n return BriefcaseManager.acquireNewBriefcaseId({ iModelId });\n }\n public async getBriefcaseFileName(props: BriefcaseProps): Promise<string> {\n return BriefcaseManager.getFileName(props);\n }\n public async downloadBriefcase(request: RequestNewBriefcaseProps, reportProgress: boolean, progressInterval?: number): Promise<LocalBriefcaseProps> {\n const args: RequestNewBriefcaseArg = {\n ...request,\n accessToken: await this.getAccessToken(),\n onProgress: (_a: number, _b: number) => checkAbort(),\n };\n\n const checkAbort = () => {\n assert(undefined !== args.fileName);\n const job = Downloads.isInProgress(args.fileName);\n return (job && (job.request as any).abort === 1) ? ProgressStatus.Abort : ProgressStatus.Continue;\n };\n\n if (reportProgress) {\n const progressCallback: ProgressFunction = (loaded, total) => {\n IpcHost.send(`nativeApp.progress-${request.iModelId}`, { loaded, total });\n return checkAbort();\n };\n args.onProgress = throttleProgressCallback(progressCallback, checkAbort, progressInterval);\n }\n\n return BriefcaseManager.downloadBriefcase(args);\n }\n\n public async requestCancelDownloadBriefcase(fileName: string): Promise<boolean> {\n const job = Downloads.isInProgress(fileName);\n if (job)\n (job.request as any).abort = 1;\n return job !== undefined;\n }\n\n public async deleteBriefcaseFiles(fileName: string): Promise<void> {\n await BriefcaseManager.deleteBriefcaseFiles(fileName, await IModelHost.getAccessToken());\n }\n\n public async getCachedBriefcases(iModelId?: GuidString): Promise<LocalBriefcaseProps[]> {\n return BriefcaseManager.getCachedBriefcases(iModelId);\n }\n\n public async storageMgrOpen(storageId: string): Promise<string> {\n return NativeAppStorage.open(storageId).id;\n }\n\n public async storageMgrClose(storageId: string, deleteIt: boolean): Promise<void> {\n NativeAppStorage.find(storageId).close(deleteIt);\n }\n\n public async storageMgrNames(): Promise<string[]> {\n return NativeAppStorage.getStorageNames();\n }\n\n public async storageGetValueType(storageId: string, key: string): Promise<\"number\" | \"string\" | \"boolean\" | \"Uint8Array\" | \"null\" | undefined> {\n return NativeAppStorage.find(storageId).getValueType(key);\n }\n\n public async storageGet(storageId: string, key: string): Promise<StorageValue | undefined> {\n return NativeAppStorage.find(storageId).getData(key);\n }\n\n public async storageSet(storageId: string, key: string, value: StorageValue): Promise<void> {\n NativeAppStorage.find(storageId).setData(key, value);\n }\n\n public async storageRemove(storageId: string, key: string): Promise<void> {\n NativeAppStorage.find(storageId).removeData(key);\n }\n\n public async storageKeys(storageId: string): Promise<string[]> {\n return NativeAppStorage.find(storageId).getKeys();\n }\n\n public async storageRemoveAll(storageId: string): Promise<void> {\n NativeAppStorage.find(storageId).removeAll();\n }\n}\n\n/** Options for [[NativeHost.startup]]\n * @public\n */\nexport interface NativeHostOpts extends IpcHostOpts {\n nativeHost?: {\n /** Application name. Used, for example, to name the settings file. If not supplied, defaults to \"iTwinApp\". */\n applicationName?: string;\n };\n}\n\n/**\n * Backend for desktop/mobile native applications\n * @public\n */\nexport class NativeHost {\n private static _reachability?: InternetConnectivityStatus;\n private static _applicationName: string;\n private constructor() { } // no instances - static methods only\n\n /** Event called when the internet connectivity changes, if known. */\n public static readonly onInternetConnectivityChanged = new BeEvent<(status: InternetConnectivityStatus) => void>();\n\n private static _appSettingsCacheDir?: string;\n\n /** Get the local cache folder for application settings */\n public static get appSettingsCacheDir(): string {\n return this._appSettingsCacheDir ??= join(IModelHost.cacheDir, \"appSettings\");\n }\n\n /** Send a notification to the NativeApp connected to this NativeHost. */\n public static notifyNativeFrontend<T extends keyof NativeAppNotifications>(methodName: T, ...args: Parameters<NativeAppNotifications[T]>) {\n return IpcHost.send(nativeAppIpcStrings.notifyChannel, methodName, ...args);\n }\n\n private static _isValid = false;\n public static get isValid(): boolean { return this._isValid; }\n public static get applicationName() { return this._applicationName; }\n /** Get the settings store for this NativeHost. */\n public static get settingsStore() {\n return NativeAppStorage.open(this.applicationName);\n }\n\n /**\n * Start the backend of a native app.\n * @note this method calls [[IpcHost.startup]] internally.\n */\n public static async startup(opt?: NativeHostOpts): Promise<void> {\n if (!this.isValid) {\n this._isValid = true;\n this.onInternetConnectivityChanged.addListener((status: InternetConnectivityStatus) =>\n NativeHost.notifyNativeFrontend(\"notifyInternetConnectivityChanged\", status));\n this._applicationName = opt?.nativeHost?.applicationName ?? \"iTwinApp\";\n }\n\n await IpcHost.startup(opt);\n if (IpcHost.isValid) { // for tests, we use NativeHost but don't have a frontend\n NativeAppHandler.register();\n CatalogIModelHandler.register();\n }\n }\n\n /** Shutdown native app backend. Also calls [[IpcHost.shutdown]] */\n public static async shutdown(): Promise<void> {\n this._isValid = false;\n this.onInternetConnectivityChanged.clear();\n await IpcHost.shutdown();\n }\n\n /** get current value of internet connectivity */\n public static checkInternetConnectivity(): InternetConnectivityStatus {\n return this._reachability ?? InternetConnectivityStatus.Online;\n }\n\n /**\n * Override internet connectivity state\n * @param _overridenBy who overrode the value.\n * @internal\n */\n public static overrideInternetConnectivity(_overridenBy: OverriddenBy, status: InternetConnectivityStatus): void {\n if (this._reachability !== status) {\n this._reachability = status;\n this.onInternetConnectivityChanged.raiseEvent(status);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"NativeHost.js","sourceRoot":"","sources":["../../src/NativeHost.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+BAA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AAyD;YAC/E,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YAC5B,gCAAoB,CAAC,QAAQ,EAAE,CAAC;QAClC,CAAC;IACH,CAAC;IAED,mEAAmE;IAC5D,MAAM,CAAC,KAAK,CAAC,QAAQ;QAC1B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,6BAA6B,CAAC,KAAK,EAAE,CAAC;QAC3C,MAAM,iBAAO,CAAC,QAAQ,EAAE,CAAC;IAC3B,CAAC;IAED,iDAAiD;IAC1C,MAAM,CAAC,yBAAyB;QACrC,OAAO,IAAI,CAAC,aAAa,IAAI,wCAA0B,CAAC,MAAM,CAAC;IACjE,CAAC;IAED;;;;OAIG;IACI,MAAM,CAAC,4BAA4B,CAAC,YAA0B,EAAE,MAAkC;QACvG,IAAI,IAAI,CAAC,aAAa,KAAK,MAAM,EAAE,CAAC;YAClC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC;YAC5B,IAAI,CAAC,6BAA6B,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;YACtD,IAAI,8BAAe,CAAC,kBAAkB,EAAE,CAAC;gBACvC,2FAA2F;gBAC3F,6FAA6F;gBAC7F,qFAAqF;gBACrF,IAAA,8BAAe,EAAC,MAAM,KAAK,wCAA0B,CAAC,MAAM,CAAC,CAAC;YAChE,CAAC;QACH,CAAC;IACH,CAAC;;AA3EH,gCA4EC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module NativeApp\n */\n\nimport { join } from \"path\";\nimport { AccessToken, assert, BeEvent, GuidString, ProcessDetector } from \"@itwin/core-bentley\";\nimport {\n BriefcaseProps, InternetConnectivityStatus, LocalBriefcaseProps, NativeAppFunctions, nativeAppIpcStrings, NativeAppNotifications,\n OverriddenBy, RequestNewBriefcaseProps, StorageValue,\n} from \"@itwin/core-common\";\nimport { BriefcaseManager, RequestNewBriefcaseArg } from \"./BriefcaseManager\";\nimport { Downloads, ProgressFunction, ProgressStatus } from \"./CheckpointManager\";\nimport { IModelHost } from \"./IModelHost\";\nimport { IpcHandler, IpcHost, IpcHostOpts, throttleProgressCallback } from \"./IpcHost\";\nimport { NativeAppStorage } from \"./NativeAppStorage\";\nimport { CatalogIModelHandler } from \"./CatalogDb\";\nimport { setOnlineStatus } from \"./internal/OnlineStatus\";\n\n/**\n * Implementation of NativeAppFunctions\n */\nclass NativeAppHandler extends IpcHandler implements NativeAppFunctions {\n public get channelName() { return nativeAppIpcStrings.channelName; }\n\n public async getAccessToken(): Promise<AccessToken | undefined> {\n return IModelHost.authorizationClient?.getAccessToken();\n }\n\n public async checkInternetConnectivity(): Promise<InternetConnectivityStatus> {\n return NativeHost.checkInternetConnectivity();\n }\n public async overrideInternetConnectivity(by: OverriddenBy, status: InternetConnectivityStatus): Promise<void> {\n NativeHost.overrideInternetConnectivity(by, status);\n }\n public async acquireNewBriefcaseId(iModelId: GuidString): Promise<number> {\n return BriefcaseManager.acquireNewBriefcaseId({ iModelId });\n }\n public async getBriefcaseFileName(props: BriefcaseProps): Promise<string> {\n return BriefcaseManager.getFileName(props);\n }\n public async downloadBriefcase(request: RequestNewBriefcaseProps, reportProgress: boolean, progressInterval?: number): Promise<LocalBriefcaseProps> {\n const args: RequestNewBriefcaseArg = {\n ...request,\n accessToken: await this.getAccessToken(),\n onProgress: (_a: number, _b: number) => checkAbort(),\n };\n\n const checkAbort = () => {\n assert(undefined !== args.fileName);\n const job = Downloads.isInProgress(args.fileName);\n return (job && (job.request as any).abort === 1) ? ProgressStatus.Abort : ProgressStatus.Continue;\n };\n\n if (reportProgress) {\n const progressCallback: ProgressFunction = (loaded, total) => {\n IpcHost.send(`nativeApp.progress-${request.iModelId}`, { loaded, total });\n return checkAbort();\n };\n args.onProgress = throttleProgressCallback(progressCallback, checkAbort, progressInterval);\n }\n\n return BriefcaseManager.downloadBriefcase(args);\n }\n\n public async requestCancelDownloadBriefcase(fileName: string): Promise<boolean> {\n const job = Downloads.isInProgress(fileName);\n if (job)\n (job.request as any).abort = 1;\n return job !== undefined;\n }\n\n public async deleteBriefcaseFiles(fileName: string): Promise<void> {\n await BriefcaseManager.deleteBriefcaseFiles(fileName, await IModelHost.getAccessToken());\n }\n\n public async getCachedBriefcases(iModelId?: GuidString): Promise<LocalBriefcaseProps[]> {\n return BriefcaseManager.getCachedBriefcases(iModelId);\n }\n\n public async storageMgrOpen(storageId: string): Promise<string> {\n return NativeAppStorage.open(storageId).id;\n }\n\n public async storageMgrClose(storageId: string, deleteIt: boolean): Promise<void> {\n NativeAppStorage.find(storageId).close(deleteIt);\n }\n\n public async storageMgrNames(): Promise<string[]> {\n return NativeAppStorage.getStorageNames();\n }\n\n public async storageGetValueType(storageId: string, key: string): Promise<\"number\" | \"string\" | \"boolean\" | \"Uint8Array\" | \"null\" | undefined> {\n return NativeAppStorage.find(storageId).getValueType(key);\n }\n\n public async storageGet(storageId: string, key: string): Promise<StorageValue | undefined> {\n return NativeAppStorage.find(storageId).getData(key);\n }\n\n public async storageSet(storageId: string, key: string, value: StorageValue): Promise<void> {\n NativeAppStorage.find(storageId).setData(key, value);\n }\n\n public async storageRemove(storageId: string, key: string): Promise<void> {\n NativeAppStorage.find(storageId).removeData(key);\n }\n\n public async storageKeys(storageId: string): Promise<string[]> {\n return NativeAppStorage.find(storageId).getKeys();\n }\n\n public async storageRemoveAll(storageId: string): Promise<void> {\n NativeAppStorage.find(storageId).removeAll();\n }\n}\n\n/** Options for [[NativeHost.startup]]\n * @public\n */\nexport interface NativeHostOpts extends IpcHostOpts {\n nativeHost?: {\n /** Application name. Used, for example, to name the settings file. If not supplied, defaults to \"iTwinApp\". */\n applicationName?: string;\n };\n}\n\n/**\n * Backend for desktop/mobile native applications\n * @public\n */\nexport class NativeHost {\n private static _reachability?: InternetConnectivityStatus;\n private static _applicationName: string;\n private constructor() { } // no instances - static methods only\n\n /** Event called when the internet connectivity changes, if known. */\n public static readonly onInternetConnectivityChanged = new BeEvent<(status: InternetConnectivityStatus) => void>();\n\n private static _appSettingsCacheDir?: string;\n\n /** Get the local cache folder for application settings */\n public static get appSettingsCacheDir(): string {\n return this._appSettingsCacheDir ??= join(IModelHost.cacheDir, \"appSettings\");\n }\n\n /** Send a notification to the NativeApp connected to this NativeHost. */\n public static notifyNativeFrontend<T extends keyof NativeAppNotifications>(methodName: T, ...args: Parameters<NativeAppNotifications[T]>) {\n return IpcHost.send(nativeAppIpcStrings.notifyChannel, methodName, ...args);\n }\n\n private static _isValid = false;\n public static get isValid(): boolean { return this._isValid; }\n public static get applicationName() { return this._applicationName; }\n /** Get the settings store for this NativeHost. */\n public static get settingsStore() {\n return NativeAppStorage.open(this.applicationName);\n }\n\n /**\n * Start the backend of a native app.\n * @note this method calls [[IpcHost.startup]] internally.\n */\n public static async startup(opt?: NativeHostOpts): Promise<void> {\n if (!this.isValid) {\n this._isValid = true;\n this.onInternetConnectivityChanged.addListener((status: InternetConnectivityStatus) =>\n NativeHost.notifyNativeFrontend(\"notifyInternetConnectivityChanged\", status));\n this._applicationName = opt?.nativeHost?.applicationName ?? \"iTwinApp\";\n }\n\n await IpcHost.startup(opt);\n if (IpcHost.isValid) { // for tests, we use NativeHost but don't have a frontend\n NativeAppHandler.register();\n CatalogIModelHandler.register();\n }\n }\n\n /** Shutdown native app backend. Also calls [[IpcHost.shutdown]] */\n public static async shutdown(): Promise<void> {\n this._isValid = false;\n this.onInternetConnectivityChanged.clear();\n await IpcHost.shutdown();\n }\n\n /** get current value of internet connectivity */\n public static checkInternetConnectivity(): InternetConnectivityStatus {\n return this._reachability ?? InternetConnectivityStatus.Online;\n }\n\n /**\n * Override internet connectivity state\n * @param _overridenBy who overrode the value.\n * @internal\n */\n public static overrideInternetConnectivity(_overridenBy: OverriddenBy, status: InternetConnectivityStatus): void {\n if (this._reachability !== status) {\n this._reachability = status;\n this.onInternetConnectivityChanged.raiseEvent(status);\n if (ProcessDetector.isMobileAppBackend) {\n // Merely referencing NativeHost from a non-native backend causes a runtime exception (even\n // inside an if statement that checks that the backend is a mobile backend). This allows code\n // that needs to check connectivity to do so without referencing NativeHost directly.\n setOnlineStatus(status === InternetConnectivityStatus.Online);\n }\n }\n }\n}\n"]}
@@ -197,4 +197,12 @@ export declare class SheetOwnsSheetInformationAspect extends ElementOwnsUniqueAs
197
197
  static classFullName: string;
198
198
  constructor(sheetId: Id64String, relClassName?: string);
199
199
  }
200
+ /** Relates an [[Element]] to the [[ChannelRootAspect]] that identifies it as a channel root.
201
+ * @see [[ChannelControl.makeChannelRoot]] to create an instance of this relationship.
202
+ * @public
203
+ */
204
+ export declare class ElementOwnsChannelRootAspect extends ElementOwnsUniqueAspect {
205
+ static classFullName: string;
206
+ constructor(elementId: Id64String, relClassName?: string);
207
+ }
200
208
  //# sourceMappingURL=NavigationRelationship.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationRelationship.d.ts","sourceRoot":"","sources":["../../src/NavigationRelationship.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpE;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,cAAc;IAC1D,OAAc,aAAa,SAAsC;gBAC9C,QAAQ,EAAE,UAAU,EAAE,YAAY,GAAE,MAA+C;CAGvG;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,wBAAwB;IAC/D,OAAuB,aAAa,SAAiC;gBAClD,QAAQ,EAAE,UAAU,EAAE,YAAY,GAAE,MAA0C;CAGlG;AAED;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,wBAAwB;IACxE,OAAuB,aAAa,SAA0C;gBAC3D,QAAQ,EAAE,UAAU,EAAE,YAAY,GAAE,MAAmD;CAG3G;AAED;;GAEG;AACH,qBAAa,yBAA0B,S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D;CAG/G;AAED;;;GAGG;AACH,qBAAa,sCAAuC,SAAQ,cAAc;IACxE,OAAc,aAAa,SAAoD;gBAC5D,gBAAgB,EAAE,UAAU,EAAE,YAAY,GAAE,MAA6D;CAG7H;AAED;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,cAAc;IAC7D,OAAc,aAAa,SAAyC;gBACjD,OAAO,EAAE,UAAU,EAAE,YAAY,GAAE,MAAkD;CAGzG;AAED;;GAEG;AACH,qBAAa,qCAAsC,SAAQ,cAAc;IACvE,OAAc,aAAa,SAAmD;gBAC3D,YAAY,EAAE,UAAU,EAAE,YAAY,GAAE,MAA4D;CAGxH;AAED;;GAEG;AACH,qBAAa,mCAAoC,SAAQ,wBAAwB;IAC/E,OAAuB,aAAa,SAAiD;gBAClE,QAAQ,EAAE,UAAU,EAAE,YAAY,SAAoD;CAG1G;AAED;;;GAGG;AACH,qBAAa,+BAAgC,SAAQ,uBAAuB;IAC1E,OAAuB,aAAa,SAA6C;gBAE9D,OAAO,EAAE,UAAU,EAAE,YAAY,SAAgD;CAGrG;AAED;;;GAGG;AACH,qBAAa,4BAA6B,SAAQ,uBAAuB;IACvE,OAAuB,aAAa,SAA0C;gBAE3D,SAAS,EAAE,UAAU,EAAE,YAAY,SAA6C;CAGpG"}
@@ -7,7 +7,7 @@
7
7
  * @module Relationships
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.SheetOwnsSheetInformationAspect = exports.SubjectOwnsProjectInformationRecord = exports.SheetIndexReferenceRefersToSheetIndex = exports.SheetReferenceRefersToSheet = exports.ExternalSourceAttachmentAttachesSource = exports.ExternalSourceIsInRepository = exports.ElementOwnsExternalSourceAspects = exports.ElementOwnsMultiAspects = exports.ElementOwnsUniqueAspect = exports.PhysicalTypeIsOfPhysicalMaterial = exports.PhysicalElementIsOfPhysicalMaterial = exports.PhysicalElementIsOfType = exports.SpatialLocationIsOfType = exports.GeometricElement3dHasTypeDefinition = exports.GraphicalElement2dIsOfType = exports.GeometricElement2dHasTypeDefinition = exports.SheetIndexOwnsEntries = exports.SheetIndexFolderOwnsEntries = exports.FolderContainsRepositories = exports.ExternalSourceOwnsAttachments = exports.PhysicalElementAssemblesElements = exports.ElementEncapsulatesElements = exports.RenderMaterialOwnsRenderMaterials = exports.CategoryOwnsSubCategories = exports.SubjectOwnsPartitionElements = exports.SubjectOwnsSubjects = exports.ElementOwnsChildElements = void 0;
10
+ exports.ElementOwnsChannelRootAspect = exports.SheetOwnsSheetInformationAspect = exports.SubjectOwnsProjectInformationRecord = exports.SheetIndexReferenceRefersToSheetIndex = exports.SheetReferenceRefersToSheet = exports.ExternalSourceAttachmentAttachesSource = exports.ExternalSourceIsInRepository = exports.ElementOwnsExternalSourceAspects = exports.ElementOwnsMultiAspects = exports.ElementOwnsUniqueAspect = exports.PhysicalTypeIsOfPhysicalMaterial = exports.PhysicalElementIsOfPhysicalMaterial = exports.PhysicalElementIsOfType = exports.SpatialLocationIsOfType = exports.GeometricElement3dHasTypeDefinition = exports.GraphicalElement2dIsOfType = exports.GeometricElement2dHasTypeDefinition = exports.SheetIndexOwnsEntries = exports.SheetIndexFolderOwnsEntries = exports.FolderContainsRepositories = exports.ExternalSourceOwnsAttachments = exports.PhysicalElementAssemblesElements = exports.ElementEncapsulatesElements = exports.RenderMaterialOwnsRenderMaterials = exports.CategoryOwnsSubCategories = exports.SubjectOwnsPartitionElements = exports.SubjectOwnsSubjects = exports.ElementOwnsChildElements = void 0;
11
11
  const core_common_1 = require("@itwin/core-common");
12
12
  /** Relates a parent Element to child Elements which represent parts of the Entity modeled by the parent Element.
13
13
  * @public
@@ -284,4 +284,15 @@ class SheetOwnsSheetInformationAspect extends ElementOwnsUniqueAspect {
284
284
  }
285
285
  }
286
286
  exports.SheetOwnsSheetInformationAspect = SheetOwnsSheetInformationAspect;
287
+ /** Relates an [[Element]] to the [[ChannelRootAspect]] that identifies it as a channel root.
288
+ * @see [[ChannelControl.makeChannelRoot]] to create an instance of this relationship.
289
+ * @public
290
+ */
291
+ class ElementOwnsChannelRootAspect extends ElementOwnsUniqueAspect {
292
+ static classFullName = "BisCore:ElementOwnsChannelRootAspect";
293
+ constructor(elementId, relClassName = ElementOwnsChannelRootAspect.classFullName) {
294
+ super(elementId, relClassName);
295
+ }
296
+ }
297
+ exports.ElementOwnsChannelRootAspect = ElementOwnsChannelRootAspect;
287
298
  //# sourceMappingURL=NavigationRelationship.js.map