@itwin/core-backend 3.3.0-dev.7 → 3.3.0-dev.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +38 -1
- package/lib/cjs/BackendHubAccess.d.ts +2 -7
- package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BisCoreSchema.d.ts +1 -1
- package/lib/cjs/BisCoreSchema.js +1 -1
- package/lib/cjs/BisCoreSchema.js.map +1 -1
- package/lib/cjs/BriefcaseManager.d.ts +10 -11
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +10 -11
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/CheckpointManager.d.ts +16 -4
- package/lib/cjs/CheckpointManager.d.ts.map +1 -1
- package/lib/cjs/CheckpointManager.js +103 -20
- package/lib/cjs/CheckpointManager.js.map +1 -1
- package/lib/cjs/ClassRegistry.js +6 -6
- package/lib/cjs/ClassRegistry.js.map +1 -1
- package/lib/cjs/CodeSpecs.d.ts +1 -1
- package/lib/cjs/CodeSpecs.js +1 -1
- package/lib/cjs/CodeSpecs.js.map +1 -1
- package/lib/cjs/DisplayStyle.d.ts +2 -2
- package/lib/cjs/DisplayStyle.d.ts.map +1 -1
- package/lib/cjs/DisplayStyle.js +14 -17
- package/lib/cjs/DisplayStyle.js.map +1 -1
- package/lib/cjs/Element.d.ts +36 -25
- package/lib/cjs/Element.d.ts.map +1 -1
- package/lib/cjs/Element.js +54 -39
- package/lib/cjs/Element.js.map +1 -1
- package/lib/cjs/GeoCoordConfig.d.ts +14 -0
- package/lib/cjs/GeoCoordConfig.d.ts.map +1 -0
- package/lib/cjs/GeoCoordConfig.js +73 -0
- package/lib/cjs/GeoCoordConfig.js.map +1 -0
- package/lib/cjs/HubMock.d.ts +99 -0
- package/lib/cjs/HubMock.d.ts.map +1 -0
- package/lib/cjs/HubMock.js +193 -0
- package/lib/cjs/HubMock.js.map +1 -0
- package/lib/cjs/IModelDb.d.ts +25 -15
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +43 -34
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +70 -32
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +65 -64
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IpcHost.d.ts +2 -2
- package/lib/cjs/IpcHost.d.ts.map +1 -1
- package/lib/cjs/IpcHost.js +1 -1
- package/lib/cjs/IpcHost.js.map +1 -1
- package/lib/cjs/LocalHub.d.ts +163 -0
- package/lib/cjs/LocalHub.d.ts.map +1 -0
- package/lib/cjs/LocalHub.js +588 -0
- package/lib/cjs/LocalHub.js.map +1 -0
- package/lib/cjs/LocalhostIpcHost.d.ts +2 -2
- package/lib/cjs/LocalhostIpcHost.d.ts.map +1 -1
- package/lib/cjs/LocalhostIpcHost.js +16 -0
- package/lib/cjs/LocalhostIpcHost.js.map +1 -1
- package/lib/cjs/RpcBackend.d.ts +2 -0
- package/lib/cjs/RpcBackend.d.ts.map +1 -1
- package/lib/cjs/RpcBackend.js +19 -2
- package/lib/cjs/RpcBackend.js.map +1 -1
- package/lib/cjs/SQLiteDb.d.ts +4 -3
- package/lib/cjs/SQLiteDb.d.ts.map +1 -1
- package/lib/cjs/SQLiteDb.js +5 -4
- package/lib/cjs/SQLiteDb.js.map +1 -1
- package/lib/cjs/SqliteStatement.d.ts +4 -0
- package/lib/cjs/SqliteStatement.d.ts.map +1 -1
- package/lib/cjs/SqliteStatement.js +4 -0
- package/lib/cjs/SqliteStatement.js.map +1 -1
- package/lib/cjs/ViewDefinition.d.ts +6 -6
- package/lib/cjs/ViewDefinition.d.ts.map +1 -1
- package/lib/cjs/ViewDefinition.js +20 -20
- package/lib/cjs/ViewDefinition.js.map +1 -1
- package/lib/cjs/assets/Settings/Schemas/Cloud.Schema.json +68 -0
- package/lib/cjs/assets/Settings/Schemas/Gcs.schema.json +22 -0
- package/lib/cjs/assets/Settings/Schemas/Workspace.Schema.json +53 -0
- package/lib/cjs/assets/Settings/backend.setting.json5 +139 -0
- package/lib/cjs/core-backend.d.ts +9 -7
- package/lib/cjs/core-backend.d.ts.map +1 -1
- package/lib/cjs/core-backend.js +9 -7
- package/lib/cjs/core-backend.js.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.d.ts.map +1 -1
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js +8 -12
- package/lib/cjs/rpc-impl/RpcBriefcaseUtility.js.map +1 -1
- package/lib/cjs/workspace/Settings.d.ts +8 -3
- package/lib/cjs/workspace/Settings.d.ts.map +1 -1
- package/lib/cjs/workspace/Settings.js +9 -0
- package/lib/cjs/workspace/Settings.js.map +1 -1
- package/lib/cjs/workspace/SettingsSchemas.d.ts +76 -0
- package/lib/cjs/workspace/SettingsSchemas.d.ts.map +1 -0
- package/lib/cjs/workspace/SettingsSchemas.js +192 -0
- package/lib/cjs/workspace/SettingsSchemas.js.map +1 -0
- package/lib/cjs/workspace/Workspace.d.ts +235 -140
- package/lib/cjs/workspace/Workspace.d.ts.map +1 -1
- package/lib/cjs/workspace/Workspace.js +262 -91
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/package.json +23 -18
- package/lib/cjs/assets/Settings.schema.json +0 -25
- package/lib/cjs/workspace/SettingsSpecRegistry.d.ts +0 -68
- package/lib/cjs/workspace/SettingsSpecRegistry.d.ts.map +0 -1
- package/lib/cjs/workspace/SettingsSpecRegistry.js +0 -122
- package/lib/cjs/workspace/SettingsSpecRegistry.js.map +0 -1
package/lib/cjs/IModelHost.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @module IModelHost
|
|
3
3
|
*/
|
|
4
4
|
import { IModelJsNative } from "@bentley/imodeljs-native";
|
|
5
|
-
import { TelemetryManager } from "@itwin/core-telemetry";
|
|
6
5
|
import { AccessToken, BeEvent, GuidString, Mutable } from "@itwin/core-bentley";
|
|
7
6
|
import { AuthorizationClient, LocalDirName, SessionProps } from "@itwin/core-common";
|
|
7
|
+
import { TelemetryManager } from "@itwin/core-telemetry";
|
|
8
8
|
import { BackendHubAccess } from "./BackendHubAccess";
|
|
9
9
|
import { AzureBlobStorageCredentials, CloudStorageService, CloudStorageTileUploader } from "./CloudStorageBackend";
|
|
10
10
|
import { Workspace, WorkspaceOpts } from "./workspace/Workspace";
|
|
@@ -39,10 +39,11 @@ export interface CrashReportingConfig {
|
|
|
39
39
|
/** Upload crash dump and node-reports to Bentley's crash-reporting service? Defaults to false */
|
|
40
40
|
uploadToBentley?: boolean;
|
|
41
41
|
}
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Options for [[IModelHost.startup]]
|
|
43
44
|
* @public
|
|
44
45
|
*/
|
|
45
|
-
export
|
|
46
|
+
export interface IModelHostOptions {
|
|
46
47
|
/**
|
|
47
48
|
* Root of the directory holding all the files that iTwin.js caches
|
|
48
49
|
* - If not specified at startup a platform specific default is used -
|
|
@@ -58,13 +59,15 @@ export declare class IModelHostConfiguration {
|
|
|
58
59
|
* @see [[IModelHost.cacheDir]] for the value it's set to after startup
|
|
59
60
|
*/
|
|
60
61
|
cacheDir?: LocalDirName;
|
|
61
|
-
/**
|
|
62
|
+
/** The directory where application assets are found. */
|
|
63
|
+
appAssetsDir?: LocalDirName;
|
|
64
|
+
/**
|
|
65
|
+
* Options for creating the [[Workspace]]
|
|
62
66
|
* @beta
|
|
63
67
|
*/
|
|
64
68
|
workspace?: WorkspaceOpts;
|
|
65
|
-
/**
|
|
66
|
-
|
|
67
|
-
/** The kind of iModel hub server to use.
|
|
69
|
+
/**
|
|
70
|
+
* The kind of iModel hub server to use.
|
|
68
71
|
* @beta
|
|
69
72
|
*/
|
|
70
73
|
hubAccess?: BackendHubAccess;
|
|
@@ -89,31 +92,19 @@ export declare class IModelHostConfiguration {
|
|
|
89
92
|
/** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileTreeProps]($common) should wait before returning a "pending" status.
|
|
90
93
|
* @internal
|
|
91
94
|
*/
|
|
92
|
-
tileTreeRequestTimeout
|
|
95
|
+
tileTreeRequestTimeout?: number;
|
|
93
96
|
/** The time, in milliseconds, for which [IModelTileRpcInterface.requestTileContent]($common) should wait before returning a "pending" status.
|
|
94
97
|
* @internal
|
|
95
98
|
*/
|
|
96
|
-
tileContentRequestTimeout
|
|
97
|
-
/** The default time, in milliseconds, used for [[tileTreeRequestTimeout]] and [[tileContentRequestTimeout]]. To change this, override one or both of those properties.
|
|
98
|
-
* @internal
|
|
99
|
-
*/
|
|
100
|
-
static defaultTileRequestTimeout: number;
|
|
101
|
-
/** The default time, in seconds, used for [[logTileLoadTimeThreshold]]. To change this, override that property.
|
|
102
|
-
* @internal
|
|
103
|
-
*/
|
|
104
|
-
static defaultLogTileLoadTimeThreshold: number;
|
|
99
|
+
tileContentRequestTimeout?: number;
|
|
105
100
|
/** The backend will log when a tile took longer to load than this threshold in seconds.
|
|
106
101
|
* @internal
|
|
107
102
|
*/
|
|
108
|
-
logTileLoadTimeThreshold
|
|
109
|
-
/** The default size, in bytes, used for [[logTileSizeThreshold]]. To change this, override that property.
|
|
110
|
-
* @internal
|
|
111
|
-
*/
|
|
112
|
-
static defaultLogTileSizeThreshold: number;
|
|
103
|
+
logTileLoadTimeThreshold?: number;
|
|
113
104
|
/** The backend will log when a tile is loaded with a size in bytes above this threshold.
|
|
114
105
|
* @internal
|
|
115
106
|
*/
|
|
116
|
-
logTileSizeThreshold
|
|
107
|
+
logTileSizeThreshold?: number;
|
|
117
108
|
/** Crash-reporting configuration
|
|
118
109
|
* @alpha
|
|
119
110
|
*/
|
|
@@ -123,6 +114,39 @@ export declare class IModelHostConfiguration {
|
|
|
123
114
|
*/
|
|
124
115
|
authorizationClient?: AuthorizationClient;
|
|
125
116
|
}
|
|
117
|
+
/** Configuration of core-backend.
|
|
118
|
+
* @public
|
|
119
|
+
*/
|
|
120
|
+
export declare class IModelHostConfiguration implements IModelHostOptions {
|
|
121
|
+
static defaultTileRequestTimeout: number;
|
|
122
|
+
static defaultLogTileLoadTimeThreshold: number;
|
|
123
|
+
static defaultLogTileSizeThreshold: number;
|
|
124
|
+
appAssetsDir?: LocalDirName;
|
|
125
|
+
cacheDir?: LocalDirName;
|
|
126
|
+
/** @beta */
|
|
127
|
+
workspace?: WorkspaceOpts;
|
|
128
|
+
/** @beta */
|
|
129
|
+
hubAccess?: BackendHubAccess;
|
|
130
|
+
/** @beta */
|
|
131
|
+
authorizationClient?: AuthorizationClient;
|
|
132
|
+
/** @beta */
|
|
133
|
+
tileCacheService?: CloudStorageService;
|
|
134
|
+
/** @beta */
|
|
135
|
+
restrictTileUrlsByClientIp?: boolean;
|
|
136
|
+
compressCachedTiles?: boolean;
|
|
137
|
+
/** @beta */
|
|
138
|
+
tileCacheAzureCredentials?: AzureBlobStorageCredentials;
|
|
139
|
+
/** @internal */
|
|
140
|
+
tileTreeRequestTimeout: number;
|
|
141
|
+
/** @internal */
|
|
142
|
+
tileContentRequestTimeout: number;
|
|
143
|
+
/** @internal */
|
|
144
|
+
logTileLoadTimeThreshold: number;
|
|
145
|
+
/** @internal */
|
|
146
|
+
logTileSizeThreshold: number;
|
|
147
|
+
/** @alpha */
|
|
148
|
+
crashReportingConfig?: CrashReportingConfig;
|
|
149
|
+
}
|
|
126
150
|
/** IModelHost initializes ($backend) and captures its configuration. A backend must call [[IModelHost.startup]] before using any backend classes.
|
|
127
151
|
* See [the learning article]($docs/learning/backend/IModelHost.md)
|
|
128
152
|
* @public
|
|
@@ -138,7 +162,9 @@ export declare class IModelHost {
|
|
|
138
162
|
private static _platform?;
|
|
139
163
|
/** @internal */
|
|
140
164
|
static get platform(): typeof IModelJsNative;
|
|
141
|
-
static configuration?:
|
|
165
|
+
static configuration?: IModelHostOptions;
|
|
166
|
+
/** Event raised during startup to allow loading settings data */
|
|
167
|
+
static readonly onWorkspaceStartup: BeEvent<() => void>;
|
|
142
168
|
/** Event raised just after the backend IModelHost was started */
|
|
143
169
|
static readonly onAfterStartup: BeEvent<() => void>;
|
|
144
170
|
/** Event raised just before the backend IModelHost is to be shut down */
|
|
@@ -181,28 +207,34 @@ export declare class IModelHost {
|
|
|
181
207
|
private static validateNativePlatformVersion;
|
|
182
208
|
/**
|
|
183
209
|
* @internal
|
|
184
|
-
* @note Use [[
|
|
210
|
+
* @note Use [[IModelHostOptions.tileCacheService]] to set the service provider.
|
|
185
211
|
*/
|
|
186
212
|
static tileCacheService?: CloudStorageService;
|
|
187
213
|
/** @internal */
|
|
188
214
|
static tileUploader?: CloudStorageTileUploader;
|
|
189
|
-
private static _hubAccess
|
|
215
|
+
private static _hubAccess?;
|
|
190
216
|
/** @internal */
|
|
191
|
-
static setHubAccess(hubAccess: BackendHubAccess): void;
|
|
217
|
+
static setHubAccess(hubAccess: BackendHubAccess | undefined): void;
|
|
218
|
+
/** get the current hubAccess, if present.
|
|
219
|
+
* @beta
|
|
220
|
+
*/
|
|
221
|
+
static getHubAccess(): BackendHubAccess | undefined;
|
|
192
222
|
/** Provides access to the IModelHub for this IModelHost
|
|
193
223
|
* @beta
|
|
194
|
-
* @note If [[
|
|
224
|
+
* @note If [[IModelHostOptions.hubAccess]] was undefined when initializing this class, accessing this property will throw an error.
|
|
225
|
+
* To determine whether one is present, use [[getHubAccess]].
|
|
195
226
|
*/
|
|
196
227
|
static get hubAccess(): BackendHubAccess;
|
|
228
|
+
private static initializeWorkspace;
|
|
197
229
|
private static _isValid;
|
|
198
230
|
/** Returns true if IModelHost is started. */
|
|
199
231
|
static get isValid(): boolean;
|
|
200
232
|
/** This method must be called before any iTwin.js services are used.
|
|
201
|
-
* @param
|
|
233
|
+
* @param options Host configuration data.
|
|
202
234
|
* Raises [[onAfterStartup]].
|
|
203
235
|
* @see [[shutdown]].
|
|
204
236
|
*/
|
|
205
|
-
static startup(
|
|
237
|
+
static startup(options?: IModelHostOptions): Promise<void>;
|
|
206
238
|
private static _briefcaseCacheDir;
|
|
207
239
|
private static logStartup;
|
|
208
240
|
private static setupHostDirs;
|
|
@@ -228,11 +260,11 @@ export declare class IModelHost {
|
|
|
228
260
|
static getCrashReportProperties(): CrashReportingConfigNameValuePair[];
|
|
229
261
|
/** The directory where application assets may be found */
|
|
230
262
|
static get appAssetsDir(): string | undefined;
|
|
231
|
-
/** The time, in milliseconds, for which
|
|
263
|
+
/** The time, in milliseconds, for which IModelTileRpcInterface.requestTileTreeProps should wait before returning a "pending" status.
|
|
232
264
|
* @internal
|
|
233
265
|
*/
|
|
234
266
|
static get tileTreeRequestTimeout(): number;
|
|
235
|
-
/** The time, in milliseconds, for which
|
|
267
|
+
/** The time, in milliseconds, for which IModelTileRpcInterface.requestTileContent should wait before returning a "pending" status.
|
|
236
268
|
* @internal
|
|
237
269
|
*/
|
|
238
270
|
static get tileContentRequestTimeout(): number;
|
|
@@ -253,6 +285,12 @@ export declare class IModelHost {
|
|
|
253
285
|
*/
|
|
254
286
|
static get compressCachedTiles(): boolean;
|
|
255
287
|
private static setupTileCache;
|
|
288
|
+
/** @internal */
|
|
289
|
+
static computeSchemaChecksum(arg: {
|
|
290
|
+
schemaXmlPath: string;
|
|
291
|
+
referencePaths: string[];
|
|
292
|
+
exactMatch?: boolean;
|
|
293
|
+
}): string;
|
|
256
294
|
}
|
|
257
295
|
/** Information about the platform on which the app is running. Also see [[KnownLocations]] and [[IModelJsFs]].
|
|
258
296
|
* @public
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IModelHost.d.ts","sourceRoot":"","sources":["../../src/IModelHost.ts"],"names":[],"mappings":"AAIA;;GAEG;AAKH,OAAO,EAAE,cAAc,EAAiB,MAAM,0BAA0B,CAAC;AACzE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"IModelHost.d.ts","sourceRoot":"","sources":["../../src/IModelHost.ts"],"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AAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IACjE;;;;OAIG;IACI,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;CAOnD"}
|
package/lib/cjs/IModelHost.js
CHANGED
|
@@ -12,15 +12,16 @@ const os = require("os");
|
|
|
12
12
|
const path = require("path");
|
|
13
13
|
const semver = require("semver");
|
|
14
14
|
const imodeljs_native_1 = require("@bentley/imodeljs-native");
|
|
15
|
-
const core_telemetry_1 = require("@itwin/core-telemetry");
|
|
16
15
|
const core_bentley_1 = require("@itwin/core-bentley");
|
|
17
16
|
const core_common_1 = require("@itwin/core-common");
|
|
17
|
+
const core_telemetry_1 = require("@itwin/core-telemetry");
|
|
18
18
|
const BackendLoggerCategory_1 = require("./BackendLoggerCategory");
|
|
19
19
|
const BisCoreSchema_1 = require("./BisCoreSchema");
|
|
20
20
|
const BriefcaseManager_1 = require("./BriefcaseManager");
|
|
21
21
|
const CloudStorageBackend_1 = require("./CloudStorageBackend");
|
|
22
22
|
const FunctionalSchema_1 = require("./domains/FunctionalSchema");
|
|
23
23
|
const GenericSchema_1 = require("./domains/GenericSchema");
|
|
24
|
+
const GeoCoordConfig_1 = require("./GeoCoordConfig");
|
|
24
25
|
const IModelJsFs_1 = require("./IModelJsFs");
|
|
25
26
|
const DevToolsRpcImpl_1 = require("./rpc-impl/DevToolsRpcImpl");
|
|
26
27
|
const IModelReadRpcImpl_1 = require("./rpc-impl/IModelReadRpcImpl");
|
|
@@ -28,54 +29,37 @@ const IModelTileRpcImpl_1 = require("./rpc-impl/IModelTileRpcImpl");
|
|
|
28
29
|
const SnapshotIModelRpcImpl_1 = require("./rpc-impl/SnapshotIModelRpcImpl");
|
|
29
30
|
const WipRpcImpl_1 = require("./rpc-impl/WipRpcImpl");
|
|
30
31
|
const RpcBackend_1 = require("./RpcBackend");
|
|
31
|
-
const Workspace_1 = require("./workspace/Workspace");
|
|
32
32
|
const Settings_1 = require("./workspace/Settings");
|
|
33
|
-
const
|
|
33
|
+
const SettingsSchemas_1 = require("./workspace/SettingsSchemas");
|
|
34
|
+
const Workspace_1 = require("./workspace/Workspace");
|
|
34
35
|
const loggerCategory = BackendLoggerCategory_1.BackendLoggerCategory.IModelHost;
|
|
35
36
|
/** Configuration of core-backend.
|
|
36
37
|
* @public
|
|
37
38
|
*/
|
|
38
39
|
class IModelHostConfiguration {
|
|
39
40
|
constructor() {
|
|
40
|
-
/**
|
|
41
|
-
* @internal
|
|
42
|
-
*/
|
|
41
|
+
/** @internal */
|
|
43
42
|
this.tileTreeRequestTimeout = IModelHostConfiguration.defaultTileRequestTimeout;
|
|
44
|
-
/**
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
43
|
+
/** @internal */
|
|
47
44
|
this.tileContentRequestTimeout = IModelHostConfiguration.defaultTileRequestTimeout;
|
|
48
|
-
/**
|
|
49
|
-
* @internal
|
|
50
|
-
*/
|
|
45
|
+
/** @internal */
|
|
51
46
|
this.logTileLoadTimeThreshold = IModelHostConfiguration.defaultLogTileLoadTimeThreshold;
|
|
52
|
-
/**
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
47
|
+
/** @internal */
|
|
55
48
|
this.logTileSizeThreshold = IModelHostConfiguration.defaultLogTileSizeThreshold;
|
|
56
49
|
}
|
|
57
50
|
}
|
|
58
51
|
exports.IModelHostConfiguration = IModelHostConfiguration;
|
|
59
|
-
/** The default time, in milliseconds, used for [[tileTreeRequestTimeout]] and [[tileContentRequestTimeout]]. To change this, override one or both of those properties.
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
62
52
|
IModelHostConfiguration.defaultTileRequestTimeout = 20 * 1000;
|
|
63
|
-
/** The default time, in seconds, used for [[logTileLoadTimeThreshold]]. To change this, override that property.
|
|
64
|
-
* @internal
|
|
65
|
-
*/
|
|
66
53
|
IModelHostConfiguration.defaultLogTileLoadTimeThreshold = 40;
|
|
67
|
-
/** The default size, in bytes, used for [[logTileSizeThreshold]]. To change this, override that property.
|
|
68
|
-
* @internal
|
|
69
|
-
*/
|
|
70
54
|
IModelHostConfiguration.defaultLogTileSizeThreshold = 20 * 1000000;
|
|
71
55
|
/**
|
|
72
|
-
* Settings for
|
|
56
|
+
* Settings for `IModelHost.appWorkspace`.
|
|
73
57
|
* @note this includes the default dictionary from the SettingsSpecRegistry
|
|
74
58
|
*/
|
|
75
59
|
class ApplicationSettings extends Settings_1.BaseSettings {
|
|
76
60
|
constructor() {
|
|
77
61
|
super();
|
|
78
|
-
this._remove =
|
|
62
|
+
this._remove = SettingsSchemas_1.SettingsSchemas.onSchemaChanged.addListener(() => this.updateDefaults());
|
|
79
63
|
this.updateDefaults();
|
|
80
64
|
}
|
|
81
65
|
verifyPriority(priority) {
|
|
@@ -84,9 +68,9 @@ class ApplicationSettings extends Settings_1.BaseSettings {
|
|
|
84
68
|
}
|
|
85
69
|
updateDefaults() {
|
|
86
70
|
const defaults = {};
|
|
87
|
-
for (const [
|
|
71
|
+
for (const [schemaName, val] of SettingsSchemas_1.SettingsSchemas.allSchemas) {
|
|
88
72
|
if (val.default)
|
|
89
|
-
defaults[
|
|
73
|
+
defaults[schemaName] = val.default;
|
|
90
74
|
}
|
|
91
75
|
this.addDictionary("_default_", 0, defaults);
|
|
92
76
|
}
|
|
@@ -145,7 +129,7 @@ class IModelHost {
|
|
|
145
129
|
}
|
|
146
130
|
/** @internal */
|
|
147
131
|
static flushLog() {
|
|
148
|
-
return this.platform.
|
|
132
|
+
return this.platform.flushLog();
|
|
149
133
|
}
|
|
150
134
|
/** @internal */
|
|
151
135
|
static loadNative() {
|
|
@@ -174,33 +158,45 @@ class IModelHost {
|
|
|
174
158
|
}
|
|
175
159
|
/** @internal */
|
|
176
160
|
static setHubAccess(hubAccess) { this._hubAccess = hubAccess; }
|
|
161
|
+
/** get the current hubAccess, if present.
|
|
162
|
+
* @beta
|
|
163
|
+
*/
|
|
164
|
+
static getHubAccess() { return this._hubAccess; }
|
|
177
165
|
/** Provides access to the IModelHub for this IModelHost
|
|
178
166
|
* @beta
|
|
179
|
-
* @note If [[
|
|
167
|
+
* @note If [[IModelHostOptions.hubAccess]] was undefined when initializing this class, accessing this property will throw an error.
|
|
168
|
+
* To determine whether one is present, use [[getHubAccess]].
|
|
180
169
|
*/
|
|
181
170
|
static get hubAccess() {
|
|
182
|
-
// Strictly speaking, _hubAccess should be marked as possibly undefined since it's not needed for Snapshot iModels.
|
|
183
|
-
// However, a decision was made to not provide that type annotation so callers aren't forced to constantly check for
|
|
184
|
-
// something that's required in all other workflows.
|
|
185
|
-
// This check is here to provide a better error message when hubAccess is inadvertently undefined.
|
|
186
171
|
if (this._hubAccess === undefined)
|
|
187
|
-
throw new core_common_1.IModelError(core_bentley_1.IModelStatus.BadRequest, "
|
|
172
|
+
throw new core_common_1.IModelError(core_bentley_1.IModelStatus.BadRequest, "No BackendHubAccess supplied in IModelHostOptions");
|
|
188
173
|
return this._hubAccess;
|
|
189
174
|
}
|
|
175
|
+
static initializeWorkspace(configuration) {
|
|
176
|
+
const settingAssets = path.join(KnownLocations.packageAssetsDir, "Settings");
|
|
177
|
+
SettingsSchemas_1.SettingsSchemas.addDirectory(path.join(settingAssets, "Schemas"));
|
|
178
|
+
this._appWorkspace = new Workspace_1.ITwinWorkspace(new ApplicationSettings(), configuration.workspace);
|
|
179
|
+
this.appWorkspace.settings.addDirectory(settingAssets, Settings_1.SettingsPriority.defaults);
|
|
180
|
+
GeoCoordConfig_1.GeoCoordConfig.onStartup();
|
|
181
|
+
// allow applications to load their default settings
|
|
182
|
+
this.onWorkspaceStartup.raiseEvent();
|
|
183
|
+
}
|
|
190
184
|
/** Returns true if IModelHost is started. */
|
|
191
185
|
static get isValid() { return this._isValid; }
|
|
192
186
|
/** This method must be called before any iTwin.js services are used.
|
|
193
|
-
* @param
|
|
187
|
+
* @param options Host configuration data.
|
|
194
188
|
* Raises [[onAfterStartup]].
|
|
195
189
|
* @see [[shutdown]].
|
|
196
190
|
*/
|
|
197
|
-
static async startup(
|
|
191
|
+
static async startup(options) {
|
|
192
|
+
var _a, _b, _c, _d;
|
|
198
193
|
if (this._isValid)
|
|
199
194
|
return; // we're already initialized
|
|
200
195
|
this._isValid = true;
|
|
196
|
+
options = options !== null && options !== void 0 ? options : {};
|
|
201
197
|
if (IModelHost.sessionId === "")
|
|
202
198
|
IModelHost.sessionId = core_bentley_1.Guid.createValue();
|
|
203
|
-
this.authorizationClient =
|
|
199
|
+
this.authorizationClient = options.authorizationClient;
|
|
204
200
|
this.logStartup();
|
|
205
201
|
this.backendVersion = require("../../package.json").version; // eslint-disable-line @typescript-eslint/no-var-requires
|
|
206
202
|
(0, RpcBackend_1.initializeRpcBackend)();
|
|
@@ -209,27 +205,24 @@ class IModelHost {
|
|
|
209
205
|
this.loadNative();
|
|
210
206
|
}
|
|
211
207
|
catch (error) {
|
|
212
|
-
core_bentley_1.Logger.logError(loggerCategory, "Error registering/loading the native platform API", () => (
|
|
208
|
+
core_bentley_1.Logger.logError(loggerCategory, "Error registering/loading the native platform API", () => (options));
|
|
213
209
|
throw error;
|
|
214
210
|
}
|
|
215
211
|
}
|
|
216
|
-
if (
|
|
217
|
-
this.platform.setCrashReporting(
|
|
218
|
-
core_bentley_1.Logger.logTrace(loggerCategory, "Configured crash reporting",
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
enableNodeReport: (_c = configuration.crashReportingConfig) === null || _c === void 0 ? void 0 : _c.enableNodeReport,
|
|
224
|
-
uploadToBentley: (_d = configuration.crashReportingConfig) === null || _d === void 0 ? void 0 : _d.uploadToBentley,
|
|
225
|
-
});
|
|
212
|
+
if (options.crashReportingConfig && options.crashReportingConfig.crashDir && !core_bentley_1.ProcessDetector.isElectronAppBackend && !core_bentley_1.ProcessDetector.isMobileAppBackend) {
|
|
213
|
+
this.platform.setCrashReporting(options.crashReportingConfig);
|
|
214
|
+
core_bentley_1.Logger.logTrace(loggerCategory, "Configured crash reporting", {
|
|
215
|
+
enableCrashDumps: (_a = options.crashReportingConfig) === null || _a === void 0 ? void 0 : _a.enableCrashDumps,
|
|
216
|
+
wantFullMemoryDumps: (_b = options.crashReportingConfig) === null || _b === void 0 ? void 0 : _b.wantFullMemoryDumps,
|
|
217
|
+
enableNodeReport: (_c = options.crashReportingConfig) === null || _c === void 0 ? void 0 : _c.enableNodeReport,
|
|
218
|
+
uploadToBentley: (_d = options.crashReportingConfig) === null || _d === void 0 ? void 0 : _d.uploadToBentley,
|
|
226
219
|
});
|
|
227
|
-
if (
|
|
220
|
+
if (options.crashReportingConfig.enableNodeReport) {
|
|
228
221
|
try {
|
|
229
222
|
// node-report reports on V8 fatal errors and unhandled exceptions/Promise rejections.
|
|
230
223
|
const nodereport = require("node-report/api"); // eslint-disable-line @typescript-eslint/no-var-requires
|
|
231
224
|
nodereport.setEvents("exception+fatalerror+apicall");
|
|
232
|
-
nodereport.setDirectory(
|
|
225
|
+
nodereport.setDirectory(options.crashReportingConfig.crashDir);
|
|
233
226
|
nodereport.setVerbose("yes");
|
|
234
227
|
core_bentley_1.Logger.logTrace(loggerCategory, "Configured native crash reporting (node-report)");
|
|
235
228
|
}
|
|
@@ -238,8 +231,8 @@ class IModelHost {
|
|
|
238
231
|
}
|
|
239
232
|
}
|
|
240
233
|
}
|
|
241
|
-
this.setupHostDirs(
|
|
242
|
-
this.
|
|
234
|
+
this.setupHostDirs(options);
|
|
235
|
+
this.initializeWorkspace(options);
|
|
243
236
|
BriefcaseManager_1.BriefcaseManager.initialize(this._briefcaseCacheDir);
|
|
244
237
|
[
|
|
245
238
|
IModelReadRpcImpl_1.IModelReadRpcImpl,
|
|
@@ -253,13 +246,13 @@ class IModelHost {
|
|
|
253
246
|
GenericSchema_1.GenericSchema,
|
|
254
247
|
FunctionalSchema_1.FunctionalSchema,
|
|
255
248
|
].forEach((schema) => schema.registerSchema()); // register all of the schemas
|
|
256
|
-
if (undefined !==
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
249
|
+
if (undefined !== options.hubAccess)
|
|
250
|
+
this._hubAccess = options.hubAccess;
|
|
251
|
+
this.configuration = options;
|
|
252
|
+
this.setupTileCache();
|
|
260
253
|
this.platform.setUseTileCache(IModelHost.tileCacheService ? false : true);
|
|
261
254
|
process.once("beforeExit", IModelHost.shutdown);
|
|
262
|
-
|
|
255
|
+
this.onAfterStartup.raiseEvent();
|
|
263
256
|
}
|
|
264
257
|
static logStartup() {
|
|
265
258
|
if (!core_bentley_1.Logger.isEnabled(loggerCategory, core_bentley_1.LogLevel.Trace))
|
|
@@ -334,22 +327,24 @@ class IModelHost {
|
|
|
334
327
|
}
|
|
335
328
|
/** The directory where application assets may be found */
|
|
336
329
|
static get appAssetsDir() { return undefined !== IModelHost.configuration ? IModelHost.configuration.appAssetsDir : undefined; }
|
|
337
|
-
/** The time, in milliseconds, for which
|
|
330
|
+
/** The time, in milliseconds, for which IModelTileRpcInterface.requestTileTreeProps should wait before returning a "pending" status.
|
|
338
331
|
* @internal
|
|
339
332
|
*/
|
|
340
333
|
static get tileTreeRequestTimeout() {
|
|
341
|
-
|
|
334
|
+
var _a, _b;
|
|
335
|
+
return (_b = (_a = IModelHost.configuration) === null || _a === void 0 ? void 0 : _a.tileTreeRequestTimeout) !== null && _b !== void 0 ? _b : IModelHostConfiguration.defaultTileRequestTimeout;
|
|
342
336
|
}
|
|
343
|
-
/** The time, in milliseconds, for which
|
|
337
|
+
/** The time, in milliseconds, for which IModelTileRpcInterface.requestTileContent should wait before returning a "pending" status.
|
|
344
338
|
* @internal
|
|
345
339
|
*/
|
|
346
340
|
static get tileContentRequestTimeout() {
|
|
347
|
-
|
|
341
|
+
var _a, _b;
|
|
342
|
+
return (_b = (_a = IModelHost.configuration) === null || _a === void 0 ? void 0 : _a.tileContentRequestTimeout) !== null && _b !== void 0 ? _b : IModelHostConfiguration.defaultTileRequestTimeout;
|
|
348
343
|
}
|
|
349
344
|
/** The backend will log when a tile took longer to load than this threshold in seconds. */
|
|
350
|
-
static get logTileLoadTimeThreshold() { return
|
|
345
|
+
static get logTileLoadTimeThreshold() { var _a, _b; return (_b = (_a = IModelHost.configuration) === null || _a === void 0 ? void 0 : _a.logTileLoadTimeThreshold) !== null && _b !== void 0 ? _b : IModelHostConfiguration.defaultLogTileLoadTimeThreshold; }
|
|
351
346
|
/** The backend will log when a tile is loaded with a size in bytes above this threshold. */
|
|
352
|
-
static get logTileSizeThreshold() { return
|
|
347
|
+
static get logTileSizeThreshold() { var _a, _b; return (_b = (_a = IModelHost.configuration) === null || _a === void 0 ? void 0 : _a.logTileSizeThreshold) !== null && _b !== void 0 ? _b : IModelHostConfiguration.defaultLogTileSizeThreshold; }
|
|
353
348
|
/** Whether external tile caching is active.
|
|
354
349
|
* @internal
|
|
355
350
|
*/
|
|
@@ -382,12 +377,18 @@ class IModelHost {
|
|
|
382
377
|
throw new core_common_1.IModelError(core_common_1.BentleyStatus.ERROR, "Cannot use both Azure and custom cloud storage providers for tile cache.");
|
|
383
378
|
}
|
|
384
379
|
}
|
|
380
|
+
/** @internal */
|
|
381
|
+
static computeSchemaChecksum(arg) {
|
|
382
|
+
return this.platform.computeSchemaChecksum(arg);
|
|
383
|
+
}
|
|
385
384
|
}
|
|
386
385
|
exports.IModelHost = IModelHost;
|
|
387
386
|
/** @alpha */
|
|
388
387
|
IModelHost.telemetry = new core_telemetry_1.TelemetryManager();
|
|
389
388
|
IModelHost.backendVersion = "";
|
|
390
389
|
IModelHost._cacheDir = "";
|
|
390
|
+
/** Event raised during startup to allow loading settings data */
|
|
391
|
+
IModelHost.onWorkspaceStartup = new core_bentley_1.BeEvent();
|
|
391
392
|
/** Event raised just after the backend IModelHost was started */
|
|
392
393
|
IModelHost.onAfterStartup = new core_bentley_1.BeEvent();
|
|
393
394
|
/** Event raised just before the backend IModelHost is to be shut down */
|