@bentley/imodeljs-native 3.0.25 → 3.0.29
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/CloudSqlite.d.ts +132 -0
- package/CloudSqlite.d.ts.map +1 -0
- package/CloudSqlite.js +143 -0
- package/CloudSqlite.js.map +1 -0
- package/NativeLibrary.d.ts +4 -5
- package/NativeLibrary.d.ts.map +1 -1
- package/NativeLibrary.js.map +1 -1
- package/imodeljs-native.d.ts +1 -1
- package/imodeljs-native.d.ts.map +1 -1
- package/imodeljs-native.js +1 -1
- package/imodeljs-native.js.map +1 -1
- package/package.json +1 -1
- package/BlobDaemon.d.ts +0 -113
- package/BlobDaemon.d.ts.map +0 -1
- package/BlobDaemon.js +0 -80
- package/BlobDaemon.js.map +0 -1
package/CloudSqlite.d.ts
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module iModels
|
|
3
|
+
*/
|
|
4
|
+
/// <reference types="node" />
|
|
5
|
+
import * as child_process from "child_process";
|
|
6
|
+
import { DbResult } from "@itwin/core-bentley";
|
|
7
|
+
import { LocalFileName } from "@itwin/core-common";
|
|
8
|
+
export declare namespace CloudSqlite {
|
|
9
|
+
/** Error values for negative numbers returned by the Daemon `attach` command. */
|
|
10
|
+
const enum DaemonAttachError {
|
|
11
|
+
INVALID_DAEMON_DIRECTORY = -1,
|
|
12
|
+
DAEMON_NOT_ACTIVE = -2,
|
|
13
|
+
SOCKET_ERROR = -3
|
|
14
|
+
}
|
|
15
|
+
/** Possible values for `command` argument of `Daemon.command` method. */
|
|
16
|
+
type DaemonCommand = "attach" | "detach" | "create" | "destroy" | "upload" | "download" | "delete" | "copy" | "queryManifestETag";
|
|
17
|
+
interface AccountProps {
|
|
18
|
+
/** blob storage module: e.g. "azure", "google", "aws". May also include URI style parameters. */
|
|
19
|
+
storageType: string;
|
|
20
|
+
/** blob store account name. */
|
|
21
|
+
accountName: string;
|
|
22
|
+
}
|
|
23
|
+
interface ContainerProps {
|
|
24
|
+
/** the name of the container. */
|
|
25
|
+
containerId: string;
|
|
26
|
+
/** SAS token that grants access to the container. */
|
|
27
|
+
sasToken: string;
|
|
28
|
+
/** if true, container is attached with write permissions. */
|
|
29
|
+
writeable?: boolean;
|
|
30
|
+
/** if true, container is attached in "secure" mode (blocks are encrypted). */
|
|
31
|
+
secure?: boolean;
|
|
32
|
+
}
|
|
33
|
+
type ContainerAccessProps = AccountProps & ContainerProps;
|
|
34
|
+
interface DbNameProp {
|
|
35
|
+
dbName: string;
|
|
36
|
+
}
|
|
37
|
+
interface DbProps extends DbNameProp {
|
|
38
|
+
localFile: LocalFileName;
|
|
39
|
+
}
|
|
40
|
+
type TransferDirection = "upload" | "download";
|
|
41
|
+
interface TransferProgress {
|
|
42
|
+
onProgress?: (loaded: number, total: number) => number;
|
|
43
|
+
}
|
|
44
|
+
type TransferProps = ContainerAccessProps & TransferProgress;
|
|
45
|
+
type TransferDbProps = TransferProps & DbProps;
|
|
46
|
+
interface CacheProps {
|
|
47
|
+
/** full path of directory for daemon to store its files. Must be on fast local drive. */
|
|
48
|
+
daemonDir?: string;
|
|
49
|
+
/** block size, in megabytes used by CREATE command. Default is 4MB. */
|
|
50
|
+
blockSizeMb?: number;
|
|
51
|
+
}
|
|
52
|
+
/** Properties for creating a new instance of the daemon process. */
|
|
53
|
+
interface DaemonProps {
|
|
54
|
+
/** full path name of daemon.exe file. Default is to find "BeBlobDaemon.exe" in the same directory as this library. */
|
|
55
|
+
exePath?: string;
|
|
56
|
+
/** daemon connection address. Default is "127.0.0.1" */
|
|
57
|
+
addr?: string;
|
|
58
|
+
/** port number. Default 22002 */
|
|
59
|
+
portNumber?: number;
|
|
60
|
+
/** maximum cache Size. Must be a number followed by either M (for megabytes) or G (for gigabytes.) Default is 1G */
|
|
61
|
+
maxCacheSize?: string;
|
|
62
|
+
/** How often cloud storage is polled for database changes made by other daemon processes, in seconds. Default is 60. */
|
|
63
|
+
pollTime?: number;
|
|
64
|
+
/** How long an overwritten block is allowed to persist before it is permanently deleted, in seconds. Default is 3600. */
|
|
65
|
+
deleteTime?: number;
|
|
66
|
+
/** How often each daemon process scans for and deletes such garbage files, in seconds. Default is 3600. */
|
|
67
|
+
gcTime?: number;
|
|
68
|
+
/** How long after a failed checkpoint-to-upload operation the daemon process waits before retrying, in seconds. Default=10. */
|
|
69
|
+
retryTime?: number;
|
|
70
|
+
/** The maximum number of concurrent uploads (PUT requests) the daemon will make when uploading a new version of a database to cloud storage. Default=10. */
|
|
71
|
+
nWrites?: number;
|
|
72
|
+
/** The maximum number of concurrent deletes (DELETE requests) the daemon will make when uploading a new version of a database. Default=10. */
|
|
73
|
+
nDeletes?: number;
|
|
74
|
+
/** If true, unmodified cache entries are retained across runs of the daemon. Default=false. */
|
|
75
|
+
persistAcrossSessions?: boolean;
|
|
76
|
+
/** logging options */
|
|
77
|
+
log?: string;
|
|
78
|
+
/** if true, don't include timestamps in log messages */
|
|
79
|
+
noTimeStamps?: boolean;
|
|
80
|
+
/** if true, create local files only when first accessed. Default=false. */
|
|
81
|
+
lazy?: boolean;
|
|
82
|
+
/** if true, extra space for nonces is not reserved and no nonce values are used for encrypted pages. Default=false. */
|
|
83
|
+
noNonce?: boolean;
|
|
84
|
+
/** If specified, containers are automatically detached from the daemon process if there have been no connected clients for at least autodetach seconds.
|
|
85
|
+
* If set to 0, then containers are never automatically detached. Default=0.
|
|
86
|
+
*/
|
|
87
|
+
autodetach?: number;
|
|
88
|
+
/** If true, two virtual tables become available to database clients for querying the internal state of the connected daemon process. */
|
|
89
|
+
vtab?: boolean;
|
|
90
|
+
/** options for spawn */
|
|
91
|
+
spawnOptions?: child_process.SpawnOptions;
|
|
92
|
+
}
|
|
93
|
+
/** Optional arguments for Db upload and download commands. */
|
|
94
|
+
interface UploadDownloadArgs {
|
|
95
|
+
/** The number of simultaneous HTTP requests. */
|
|
96
|
+
nRequests?: number;
|
|
97
|
+
}
|
|
98
|
+
interface CopyDbArgs {
|
|
99
|
+
/** A new alias, for the `copy` command */
|
|
100
|
+
toAlias?: string;
|
|
101
|
+
}
|
|
102
|
+
type DaemonCommandArg = DbNameProp & AccountProps & CacheProps & CopyDbArgs & ContainerProps & UploadDownloadArgs & {
|
|
103
|
+
localFile?: LocalFileName;
|
|
104
|
+
};
|
|
105
|
+
class Daemon {
|
|
106
|
+
private static exeName;
|
|
107
|
+
static daemonDir(props: CacheProps): string;
|
|
108
|
+
/** Start the Daemon process using the supplied properties. The process will be detached from the current process. */
|
|
109
|
+
static start(props: DaemonProps & AccountProps & CacheProps): child_process.ChildProcess;
|
|
110
|
+
/** Get the full path to the local file that can be used to open a BlobDb. For the file to exist, you must first issue the "attach" command. */
|
|
111
|
+
static getDbFileName(props: CacheProps & ContainerProps & DbNameProp): string;
|
|
112
|
+
/** Perform one of the Daemon commands.
|
|
113
|
+
* @param command The Daemon command to run.
|
|
114
|
+
* @param args arguments to the command.
|
|
115
|
+
* @return `Promise<{ result, errMsg }>` the meaning of result varies by command, but 0 always means success. For `attach`, negative values are
|
|
116
|
+
* `DaemonAttachError`, positive numbers below 400 are `SQLITE_xxx` errors, and values 400 and above are HTTP errors.
|
|
117
|
+
* `errMsg` is blank on success, but an english message useful for diagnostics otherwise.
|
|
118
|
+
*/
|
|
119
|
+
static command(command: DaemonCommand, args: DaemonCommandArg): Promise<{
|
|
120
|
+
result: DaemonAttachError | DbResult | number;
|
|
121
|
+
errMsg: string;
|
|
122
|
+
eTag?: string;
|
|
123
|
+
}>;
|
|
124
|
+
}
|
|
125
|
+
function transferDb(direction: TransferDirection, props: TransferDbProps): Promise<void>;
|
|
126
|
+
function initializeContainer(props: ContainerAccessProps): Promise<void>;
|
|
127
|
+
function uploadDb(props: TransferDbProps): Promise<void>;
|
|
128
|
+
function downloadDb(props: TransferDbProps): Promise<void>;
|
|
129
|
+
function copyDb(oldVersion: string, newVersion: string, props: ContainerAccessProps): Promise<void>;
|
|
130
|
+
function deleteDb(props: ContainerA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QAAQ,CAAC,KAAK,EAAE,oBAAoB,GAAG,UAAU,iBAItE;CACF"}
|
package/CloudSqlite.js
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module iModels
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.CloudSqlite = void 0;
|
|
11
|
+
const child_process = require("child_process");
|
|
12
|
+
const fs = require("fs");
|
|
13
|
+
const os = require("os");
|
|
14
|
+
const path = require("path");
|
|
15
|
+
const core_bentley_1 = require("@itwin/core-bentley");
|
|
16
|
+
const NativeLibrary_1 = require("./NativeLibrary");
|
|
17
|
+
const core_common_1 = require("@itwin/core-common");
|
|
18
|
+
// cspell:ignore polltime blocksize cachesize notimestamps deletetime gctime retrytime nwrite ndelete
|
|
19
|
+
/* eslint-disable no-restricted-syntax */
|
|
20
|
+
var CloudSqlite;
|
|
21
|
+
(function (CloudSqlite) {
|
|
22
|
+
class Daemon {
|
|
23
|
+
static exeName(props) {
|
|
24
|
+
var _a;
|
|
25
|
+
return (_a = props.exePath) !== null && _a !== void 0 ? _a : path.join(path.dirname(require.resolve(NativeLibrary_1.NativeLibrary.libraryName)), os.platform() === "win32" ? "BeBlobDaemon.exe" : "BeBlobDaemon");
|
|
26
|
+
}
|
|
27
|
+
static daemonDir(props) {
|
|
28
|
+
var _a;
|
|
29
|
+
return (_a = props.daemonDir) !== null && _a !== void 0 ? _a : path.join(NativeLibrary_1.NativeLibrary.defaultCacheDir, "blob-daemon");
|
|
30
|
+
}
|
|
31
|
+
/** Start the Daemon process using the supplied properties. The process will be detached from the current process. */
|
|
32
|
+
static start(props) {
|
|
33
|
+
var _a;
|
|
34
|
+
const dir = this.daemonDir(props);
|
|
35
|
+
fs.mkdirSync(dir, { recursive: true }); // make sure the directory exists before starting the daemon
|
|
36
|
+
const args = [`daemon`, `-module`, `${props.storageType}`, `-user`, `${props.accountName}`, `-directory`, `${dir}`, `-polltime`, `${(_a = props.pollTime) !== null && _a !== void 0 ? _a : 60}`];
|
|
37
|
+
if (props.addr !== undefined)
|
|
38
|
+
args.push(`-addr`, `${props.addr}`);
|
|
39
|
+
if (props.portNumber !== undefined)
|
|
40
|
+
args.push(`-port`, `${props.portNumber}`);
|
|
41
|
+
if (props.maxCacheSize)
|
|
42
|
+
args.push(`-cachesize`, `${props.maxCacheSize}`);
|
|
43
|
+
if (props.log)
|
|
44
|
+
args.push(`-log`, `${props.log}`);
|
|
45
|
+
if (props.deleteTime !== undefined)
|
|
46
|
+
args.push(`-deletetime`, `${props.deleteTime}`);
|
|
47
|
+
if (props.gcTime !== undefined)
|
|
48
|
+
args.push(`-gctime`, `${props.gcTime}`);
|
|
49
|
+
if (props.retryTime !== undefined)
|
|
50
|
+
args.push(`-retrytime`, `${props.retryTime}`);
|
|
51
|
+
if (props.nWrites !== undefined)
|
|
52
|
+
args.push(`-nwrite`, `${props.nWrites}`);
|
|
53
|
+
if (props.nDeletes !== undefined)
|
|
54
|
+
args.push(`-ndelete`, `${props.nDeletes}`);
|
|
55
|
+
if (props.noTimeStamps)
|
|
56
|
+
args.push(`-notimestamps`);
|
|
57
|
+
if (props.persistAcrossSessions)
|
|
58
|
+
args.push(`-persistent`);
|
|
59
|
+
if (props.lazy)
|
|
60
|
+
args.push(`-lazy`);
|
|
61
|
+
if (props.noNonce)
|
|
62
|
+
args.push(`-nononce`);
|
|
63
|
+
if (props.autodetach !== undefined)
|
|
64
|
+
args.push(`-autodetach`, `${props.autodetach}`);
|
|
65
|
+
if (props.vtab)
|
|
66
|
+
args.push(`-vtab`);
|
|
67
|
+
return child_process.spawn(this.exeName(props), args, Object.assign(Object.assign({}, props.spawnOptions), { windowsVerbatimArguments: true }));
|
|
68
|
+
}
|
|
69
|
+
/** Get the full path to the local file that can be used to open a BlobDb. For the file to exist, you must first issue the "attach" command. */
|
|
70
|
+
static getDbFileName(props) {
|
|
71
|
+
return path.join(this.daemonDir(props), props.containerId, props.dbName);
|
|
72
|
+
}
|
|
73
|
+
/** Perform one of the Daemon commands.
|
|
74
|
+
* @param command The Daemon command to run.
|
|
75
|
+
* @param args arguments to the command.
|
|
76
|
+
* @return `Promise<{ result, errMsg }>` the meaning of result varies by command, but 0 always means success. For `attach`, negative values are
|
|
77
|
+
* `DaemonAttachError`, positive numbers below 400 are `SQLITE_xxx` errors, and values 400 and above are HTTP errors.
|
|
78
|
+
* `errMsg` is blank on success, but an english message useful for diagnostics otherwise.
|
|
79
|
+
*/
|
|
80
|
+
static async command(command, args) {
|
|
81
|
+
var _a;
|
|
82
|
+
const fullArgs = Object.assign({}, args);
|
|
83
|
+
fullArgs.daemonDir = (_a = fullArgs.daemonDir) !== null && _a !== void 0 ? _a : this.daemonDir(args);
|
|
84
|
+
return NativeLibrary_1.NativeLibrary.nativeLib.runDaemonCommand(command, fullArgs);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
CloudSqlite.Daemon = Daemon;
|
|
88
|
+
async function transferDb(direction, props) {
|
|
89
|
+
if (direction === "download")
|
|
90
|
+
fs.mkdirSync(path.dirname(props.localFile), { recursive: true }); // make sure the directory exists before starting download
|
|
91
|
+
const transfer = new NativeLibrary_1.NativeLibrary.nativeLib.CloudDbTransfer(direction, props);
|
|
92
|
+
let timer;
|
|
93
|
+
try {
|
|
94
|
+
let total = 0;
|
|
95
|
+
const onProgress = props.onProgress;
|
|
96
|
+
if (onProgress) {
|
|
97
|
+
timer = setInterval(async () => {
|
|
98
|
+
const progress = transfer.getProgress();
|
|
99
|
+
total = progress.total;
|
|
100
|
+
if (onProgress(progress.loaded, progress.total))
|
|
101
|
+
transfer.cancelTransfer();
|
|
102
|
+
}, 250);
|
|
103
|
+
}
|
|
104
|
+
await transfer.promise;
|
|
105
|
+
onProgress === null || onProgress === void 0 ? void 0 : onProgress(total, total); // make sure we call progress func one last time when download completes
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
throw (err.message === "cancelled") ? new core_common_1.IModelError(core_bentley_1.BriefcaseStatus.DownloadCancelled, `${direction} cancelled`) : err;
|
|
109
|
+
}
|
|
110
|
+
finally {
|
|
111
|
+
if (timer)
|
|
112
|
+
clearInterval(timer);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
CloudSqlite.transferDb = transferDb;
|
|
116
|
+
async function initializeContainer(props) {
|
|
117
|
+
const stat = await Daemon.command("create", Object.assign(Object.assign({}, props), { dbName: "" }));
|
|
118
|
+
if (stat.result !== core_bentley_1.DbResult.BE_SQLITE_OK)
|
|
119
|
+
throw new Error(`Cannot initialize container: ${stat.errMsg}`);
|
|
120
|
+
}
|
|
121
|
+
CloudSqlite.initializeContainer = initializeContainer;
|
|
122
|
+
async function uploadDb(props) {
|
|
123
|
+
return transferDb("upload", props);
|
|
124
|
+
}
|
|
125
|
+
CloudSqlite.uploadDb = uploadDb;
|
|
126
|
+
async function downloadDb(props) {
|
|
127
|
+
return transferDb("download", props);
|
|
128
|
+
}
|
|
129
|
+
CloudSqlite.downloadDb = downloadDb;
|
|
130
|
+
async function copyDb(oldVersion, newVersion, props) {
|
|
131
|
+
const stat = await Daemon.command("copy", Object.assign({ dbName: oldVersion, toAlias: newVersion }, props));
|
|
132
|
+
if (stat.result !== core_bentley_1.DbResult.BE_SQLITE_OK)
|
|
133
|
+
throw new Error(`Cannot copy db: ${stat.errMsg}`);
|
|
134
|
+
}
|
|
135
|
+
CloudSqlite.copyDb = copyDb;
|
|
136
|
+
async function deleteDb(props) {
|
|
137
|
+
const stat = await Daemon.command("delete", props);
|
|
138
|
+
if (stat.result !== core_bentley_1.DbResult.BE_SQLITE_OK)
|
|
139
|
+
throw new Error(`Cannot delete db: ${stat.errMsg}`);
|
|
140
|
+
}
|
|
141
|
+
CloudSqlite.deleteDb = deleteDb;
|
|
142
|
+
})(CloudSqlite = exports.CloudSqlite || (exports.CloudSqlite = {}));
|
|
143
|
+
//# sourceMappingURL=CloudSqlite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloudSqlite.js","sourceRoot":"","sources":["../src/CloudSqlite.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+CAA+C;AAC/C,yBAAyB;AACzB,yBAAyB;AACzB,6BAA6B;AAC7B,sDAAgE;AAChE,mDAAgD;AAChD,oDAAgE;AAEhE,qGAAqG;AACrG,yCAAyC;AAEzC,IAAiB,WAAW,CAuN3B;AAvND,WAAiB,WAAW;IAgG1B,MAAa,MAAM;QACT,MAAM,CAAC,OAAO,CAAC,KAAkB;;YACvC,OAAO,MAAA,KAAK,CAAC,OAAO,mCAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,6BAAa,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QAC/J,CAAC;QACM,MAAM,CAAC,SAAS,CAAC,KAAiB;;YACvC,OAAO,MAAA,KAAK,CAAC,SAAS,mCAAI,IAAI,CAAC,IAAI,CAAC,6BAAa,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;QACpF,CAAC;QAED,qHAAqH;QAC9G,MAAM,CAAC,KAAK,CAAC,KAA8C;;YAChE,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YAClC,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,4DAA4D;YAEpG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,GA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YAAY;YACvC,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACxD,CAAC;IAJqB,oBAAQ,WAI7B,CAAA;AACH,CAAC,EAvNgB,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAuN3B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport * as child_process from \"child_process\";\r\nimport * as fs from \"fs\";\r\nimport * as os from \"os\";\r\nimport * as path from \"path\";\r\nimport { BriefcaseStatus, DbResult } from \"@itwin/core-bentley\";\r\nimport { NativeLibrary } from \"./NativeLibrary\";\r\nimport { IModelError, LocalFileName } from \"@itwin/core-common\";\r\n\r\n// cspell:ignore polltime blocksize cachesize notimestamps deletetime gctime retrytime nwrite ndelete\r\n/* eslint-disable no-restricted-syntax */\r\n\r\nexport namespace CloudSqlite {\r\n /** Error values for negative numbers returned by the Daemon `attach` command. */\r\n export const enum DaemonAttachError {\r\n INVALID_DAEMON_DIRECTORY = -1, DAEMON_NOT_ACTIVE = -2, SOCKET_ERROR = -3,\r\n }\r\n /** Possible values for `command` argument of `Daemon.command` method. */\r\n export type DaemonCommand = \"attach\" | \"detach\" | \"create\" | \"destroy\" | \"upload\" | \"download\" | \"delete\" | \"copy\" | \"queryManifestETag\";\r\n\r\n export interface AccountProps {\r\n /** blob storage module: e.g. \"azure\", \"google\", \"aws\". May also include URI style parameters. */\r\n storageType: string;\r\n /** blob store account name. */\r\n accountName: string;\r\n }\r\n\r\n export interface ContainerProps {\r\n /** the name of the container. */\r\n containerId: string;\r\n /** SAS token that grants access to the container. */\r\n sasToken: string;\r\n /** if true, container is attached with write permissions. */\r\n writeable?: boolean;\r\n /** if true, container is attached in \"secure\" mode (blocks are encrypted). */\r\n secure?: boolean;\r\n }\r\n\r\n export type ContainerAccessProps = AccountProps & ContainerProps;\r\n export interface DbNameProp { dbName: string }\r\n export interface DbProps extends DbNameProp { localFile: LocalFileName }\r\n export type TransferDirection = \"upload\" | \"download\";\r\n export interface TransferProgress { onProgress?: (loaded: number, total: number) => number }\r\n export type TransferProps = ContainerAccessProps & TransferProgress;\r\n export type TransferDbProps = TransferProps & DbProps;\r\n\r\n export interface CacheProps {\r\n /** full path of directory for daemon to store its files. Must be on fast local drive. */\r\n daemonDir?: string;\r\n /** block size, in megabytes used by CREATE command. Default is 4MB. */\r\n blockSizeMb?: number;\r\n }\r\n\r\n /** Properties for creating a new instance of the daemon process. */\r\n export interface DaemonProps {\r\n /** full path name of daemon.exe file. Default is to find \"BeBlobDaemon.exe\" in the same directory as this library. */\r\n exePath?: string;\r\n /** daemon connection address. Default is \"127.0.0.1\" */\r\n addr?: string;\r\n /** port number. Default 22002 */\r\n portNumber?: number;\r\n /** maximum cache Size. Must be a number followed by either M (for megabytes) or G (for gigabytes.) Default is 1G */\r\n maxCacheSize?: string;\r\n /** How often cloud storage is polled for database changes made by other daemon processes, in seconds. Default is 60. */\r\n pollTime?: number;\r\n /** How long an overwritten block is allowed to persist before it is permanently deleted, in seconds. Default is 3600. */\r\n deleteTime?: number;\r\n /** How often each daemon process scans for and deletes such garbage files, in seconds. Default is 3600. */\r\n gcTime?: number;\r\n /** How long after a failed checkpoint-to-upload operation the daemon process waits before retrying, in seconds. Default=10. */\r\n retryTime?: number;\r\n /** The maximum number of concurrent uploads (PUT requests) the daemon will make when uploading a new version of a database to cloud storage. Default=10. */\r\n nWrites?: number;\r\n /** The maximum number of concurrent deletes (DELETE requests) the daemon will make when uploading a new version of a database. Default=10. */\r\n nDeletes?: number;\r\n /** If true, unmodified cache entries are retained across runs of the daemon. Default=false. */\r\n persistAcrossSessions?: boolean;\r\n /** logging options */\r\n log?: string;\r\n /** if true, don't include timestamps in log messages */\r\n noTimeStamps?: boolean;\r\n /** if true, create local files only when first accessed. Default=false. */\r\n lazy?: boolean;\r\n /** if true, extra space for nonces is not reserved and no nonce values are used for encrypted pages. Default=false. */\r\n noNonce?: boolean;\r\n /** If specified, containers are automatically detached from the daemon process if there have been no connected clients for at least autodetach seconds.\r\n * If set to 0, then containers are never automatically detached. Default=0.\r\n */\r\n autodetach?: number;\r\n /** If true, two virtual tables become available to database clients for querying the internal state of the connected daemon process. */\r\n vtab?: boolean;\r\n /** options for spawn */\r\n spawnOptions?: child_process.SpawnOptions;\r\n }\r\n\r\n /** Optional arguments for Db upload and download commands. */\r\n export interface UploadDownloadArgs {\r\n /** The number of simultaneous HTTP requests. */\r\n nRequests?: number;\r\n }\r\n\r\n export interface CopyDbArgs {\r\n /** A new alias, for the `copy` command */\r\n toAlias?: string;\r\n }\r\n\r\n export type DaemonCommandArg = DbNameProp & AccountProps & CacheProps & CopyDbArgs & ContainerProps & UploadDownloadArgs & { localFile?: LocalFileName };\r\n\r\n export class Daemon {\r\n private static exeName(props: DaemonProps) {\r\n return props.exePath ?? path.join(path.dirname(require.resolve(NativeLibrary.libraryName)), os.platform() === \"win32\" ? \"BeBlobDaemon.exe\" : \"BeBlobDaemon\");\r\n }\r\n public static daemonDir(props: CacheProps) {\r\n return props.daemonDir ?? path.join(NativeLibrary.defaultCacheDir, \"blob-daemon\");\r\n }\r\n\r\n /** Start the Daemon process using the supplied properties. The process will be detached from the current process. */\r\n public static start(props: DaemonProps & AccountProps & CacheProps): child_process.ChildProcess {\r\n const dir = this.daemonDir(props);\r\n fs.mkdirSync(dir, { recursive: true }); // make sure the directory exists before starting the daemon\r\n\r\n const args = [`daemon`, `-module`, `${props.storageType}`, `-user`, `${props.accountName}`, `-directory`, `${dir}`, `-polltime`, `${props.pollTime ?? 60}`];\r\n if (props.addr !== undefined)\r\n args.push(`-addr`, `${props.addr}`);\r\n if (props.portNumber !== undefined)\r\n args.push(`-port`, `${props.portNumber}`);\r\n if (props.maxCacheSize)\r\n args.push(`-cachesize`, `${props.maxCacheSize}`);\r\n if (props.log)\r\n args.push(`-log`, `${props.log}`);\r\n if (props.deleteTime !== undefined)\r\n args.push(`-deletetime`, `${props.deleteTime}`);\r\n if (props.gcTime !== undefined)\r\n args.push(`-gctime`, `${props.gcTime}`);\r\n if (props.retryTime !== undefined)\r\n args.push(`-retrytime`, `${props.retryTime}`);\r\n if (props.nWrites !== undefined)\r\n args.push(`-nwrite`, `${props.nWrites}`);\r\n if (props.nDeletes !== undefined)\r\n args.push(`-ndelete`, `${props.nDeletes}`);\r\n if (props.noTimeStamps)\r\n args.push(`-notimestamps`);\r\n if (props.persistAcrossSessions)\r\n args.push(`-persistent`);\r\n if (props.lazy)\r\n args.push(`-lazy`);\r\n if (props.noNonce)\r\n args.push(`-nononce`);\r\n if (props.autodetach !== undefined)\r\n args.push(`-autodetach`, `${props.autodetach}`)\r\n if (props.vtab)\r\n args.push(`-vtab`);\r\n return child_process.spawn(this.exeName(props), args, { ...props.spawnOptions, windowsVerbatimArguments: true });\r\n }\r\n\r\n /** Get the full path to the local file that can be used to open a BlobDb. For the file to exist, you must first issue the \"attach\" command. */\r\n public static getDbFileName(props: CacheProps & ContainerProps & DbNameProp) {\r\n return path.join(this.daemonDir(props), props.containerId, props.dbName);\r\n }\r\n\r\n /** Perform one of the Daemon commands.\r\n * @param command The Daemon command to run.\r\n * @param args arguments to the command.\r\n * @return `Promise<{ result, errMsg }>` the meaning of result varies by command, but 0 always means success. For `attach`, negative values are\r\n * `DaemonAttachError`, positive numbers below 400 are `SQLITE_xxx` errors, and values 400 and above are HTTP errors.\r\n * `errMsg` is blank on success, but an english message useful for diagnostics otherwise.\r\n */\r\n public static async command(command: DaemonCommand, args: DaemonCommandArg): Promise<{ result: DaemonAttachError | DbResult | number, errMsg: string, eTag?: string }> {\r\n const fullArgs = { ...args };\r\n fullArgs.daemonDir = fullArgs.daemonDir ?? this.daemonDir(args);\r\n return NativeLibrary.nativeLib.runDaemonCommand(command, fullArgs);\r\n }\r\n }\r\n\r\n export async function transferDb(direction: TransferDirection, props: TransferDbProps) {\r\n if (direction === \"download\")\r\n fs.mkdirSync(path.dirname(props.localFile), { recursive: true }); // make sure the directory exists before starting download\r\n\r\n const transfer = new NativeLibrary.nativeLib.CloudDbTransfer(direction, props);\r\n\r\n let timer: NodeJS.Timeout | undefined;\r\n try {\r\n let total = 0;\r\n const onProgress = props.onProgress;\r\n if (onProgress) {\r\n timer = setInterval(async () => { // set an interval timer to show progress every 250ms\r\n const progress = transfer.getProgress();\r\n total = progress.total;\r\n if (onProgress(progress.loaded, progress.total))\r\n transfer.cancelTransfer();\r\n }, 250);\r\n }\r\n await transfer.promise;\r\n onProgress?.(total, total); // make sure we call progress func one last time when download completes\r\n } catch (err: any) {\r\n throw (err.message === \"cancelled\") ? new IModelError(BriefcaseStatus.DownloadCancelled, `${direction} cancelled`) : err;\r\n } finally {\r\n if (timer)\r\n clearInterval(timer);\r\n }\r\n }\r\n\r\n export async function initializeContainer(props: ContainerAccessProps) {\r\n const stat = await Daemon.command(\"create\", { ...props, dbName: \"\" });\r\n if (stat.result !== DbResult.BE_SQLITE_OK)\r\n throw new Error(`Cannot initialize container: ${stat.errMsg}`);\r\n }\r\n\r\n export async function uploadDb(props: TransferDbProps) {\r\n return transferDb(\"upload\", props);\r\n }\r\n\r\n export async function downloadDb(props: TransferDbProps) {\r\n return transferDb(\"download\", props);\r\n }\r\n\r\n export async function copyDb(oldVersion: string, newVersion: string, props: ContainerAccessProps) {\r\n const stat = await Daemon.command(\"copy\", { dbName: oldVersion, toAlias: newVersion, ...props });\r\n if (stat.result !== DbResult.BE_SQLITE_OK)\r\n throw new Error(`Cannot copy db: ${stat.errMsg}`);\r\n }\r\n\r\n export async function deleteDb(props: ContainerAccessProps & DbNameProp) {\r\n const stat = await Daemon.command(\"delete\", props);\r\n if (stat.result !== DbResult.BE_SQLITE_OK)\r\n throw new Error(`Cannot delete db: ${stat.errMsg}`);\r\n }\r\n}\r\n"]}
|
package/NativeLibrary.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BentleyStatus, DbOpcode, DbResult, GuidString, Id64Array, Id64String, IDisposable, IModelStatus, Logger, OpenMode, RepositoryStatus, StatusCodeWithMessage } from "@itwin/core-bentley";
|
|
2
2
|
import { ChangesetIndexAndId, CreateEmptyStandaloneIModelProps, DbRequest, DbResponse, ElementAspectProps, ElementGraphicsRequestProps, ElementLoadProps, ElementProps, FilePropertyProps, FontMapProps, FontProps, GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeographicCRSInterpretRequestProps, GeographicCRSInterpretResponseProps, GeometryContainmentResponseProps, IModelCoordinatesRequestProps, IModelCoordinatesResponseProps, IModelEncryptionProps, IModelProps, LocalFileName, MassPropertiesResponseProps, ModelLoadProps, ModelProps, RelationshipProps, SnapshotOpenOptions, TextureData, TextureLoadProps, TileVersionInfo, UpgradeOptions } from "@itwin/core-common";
|
|
3
3
|
import { Range3dProps } from "@itwin/core-geometry";
|
|
4
|
-
import {
|
|
4
|
+
import { CloudSqlite } from "./CloudSqlite";
|
|
5
5
|
/** Logger categories used by the native addon
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
@@ -271,6 +271,7 @@ export declare namespace IModelJsNative {
|
|
|
271
271
|
deleteLocalValue(name: string): void;
|
|
272
272
|
deleteModel(modelIdJson: string): void;
|
|
273
273
|
detachChangeCache(): number;
|
|
274
|
+
dropSchema(schemaName: string): void;
|
|
274
275
|
dumpChangeset(changeSet: ChangesetFileProps): void;
|
|
275
276
|
elementGeometryCacheOperation(requestProps: any): BentleyStatus;
|
|
276
277
|
embedFile(arg: EmbedFileArg): void;
|
|
@@ -435,6 +436,7 @@ export declare namespace IModelJsNative {
|
|
|
435
436
|
closeDb(): void;
|
|
436
437
|
createDb(dbName: string): DbResult;
|
|
437
438
|
dispose(): void;
|
|
439
|
+
dropSchema(schemaName: string): void;
|
|
438
440
|
getFilePath(): string;
|
|
439
441
|
importSchema(schemaPathName: string): DbResult;
|
|
440
442
|
isOpen(): boolean;
|
|
@@ -735,11 +737,8 @@ export declare namespace IModelJsNative {
|
|
|
735
737
|
doSnap(db: DgnDb, request: any): Promise<any>;
|
|
736
738
|
cancelSnap(): void;
|
|
737
739
|
}
|
|
738
|
-
type CloudDbTransferArg = BlobDaemonCommandArg & {
|
|
739
|
-
direction: "upload" | "download";
|
|
740
|
-
};
|
|
741
740
|
class CloudDbTransfer {
|
|
742
|
-
constructor(args:
|
|
741
|
+
constructor(dir: CloudSqlite.TransferDirection, args: CloudSqlite.TransferDbProps);
|
|
743
742
|
cancelTransfer(): void;
|
|
744
743
|
getProgress(): {
|
|
745
744
|
loaded: number;
|
package/NativeLibrary.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeLibrary.d.ts","sourceRoot":"","sources":["../src/NativeLibrary.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,aAAa,EAAE,QAAQ,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,EACnI,qBAAqB,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,mBAAmB,EAAE,gCAAgC,EAAE,SAAS,EAAE,UAAU,EAAE,kBAAkB,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,YAAY,EAC7J,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,kCAAkC,EACvI,mCAAmC,EAAE,gCAAgC,EAAE,6BAA6B,EACpG,8BAA8B,EAAE,qBAAqB,EAAE,WAAW,EAAE,aAAa,EAAE,2BAA2B,EAAE,cAAc,EAC9H,UAAU,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,cAAc,EACnH,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,oBAAo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AAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;YACjD,KAAK,OAAO,CAAC;YACb,KAAK,SAAS;gBACZ,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YACtC;gBACE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;SAC/C;IACH,CAAC;IACM,MAAM,KAAK,eAAe,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAE5F,MAAM,KAAK,SAAS,KAAK,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9C,MAAM,CAAC,IAAI;;QAChB,OAAO,MAAA,IAAI,CAAC,UAAU,mCAAI,CAAC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,CAA0B,CAAC,CAAC,CAAC,yDAAyD;IACtK,CAAC;CACF;AAjCD,sCAiCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as os from \"os\";\r\nimport * as path from \"path\";\r\nimport {\r\n BentleyStatus, DbOpcode, DbResult, GuidString, Id64Array, Id64String, IDisposable, IModelStatus, Logger, OpenMode, RepositoryStatus,\r\n StatusCodeWithMessage,\r\n} from \"@itwin/core-bentley\";\r\nimport {\r\n ChangesetIndexAndId, CreateEmptyStandaloneIModelProps, DbRequest, DbResponse, ElementAspectProps, ElementGraphicsRequestProps, ElementLoadProps, ElementProps,\r\n FilePropertyProps, FontMapProps, FontProps, GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeographicCRSInterpretRequestProps,\r\n GeographicCRSInterpretResponseProps, GeometryContainmentResponseProps, IModelCoordinatesRequestProps,\r\n IModelCoordinatesResponseProps, IModelEncryptionProps, IModelProps, LocalFileName, MassPropertiesResponseProps, ModelLoadProps,\r\n ModelProps, RelationshipProps, SnapshotOpenOptions, TextureData, TextureLoadProps, TileVersionInfo, UpgradeOptions,\r\n} from \"@itwin/core-common\";\r\nimport { Range3dProps } from \"@itwin/core-geometry\";\r\nimport { BlobDaemonCommandArg } from \"./BlobDaemon\";\r\n\r\n// *** NOTE: DO NOT add dependencies on any other packages! ***\r\n\r\n// cspell:ignore blocksize cachesize polltime bentleyjs imodeljs ecsql pollable polyface txns lzma uncompress changesets ruleset ulas oidc keychain libsecret rulesets struct\r\n/* eslint-disable @bentley/prefer-get, no-restricted-syntax */\r\n\r\n/** Logger categories used by the native addon\r\n * @internal\r\n */\r\nexport enum NativeLoggerCategory {\r\n BeSQLite = \"BeSQLite\",\r\n BRepCore = \"BRepCore\",\r\n Changeset = \"Changeset\",\r\n DgnCore = \"DgnCore\",\r\n ECDb = \"ECDb\",\r\n ECObjectsNative = \"ECObjectsNative\",\r\n UnitsNative = \"UnitsNative\",\r\n}\r\n\r\n/** Find and load the native node-addon library */\r\nexport class NativeLibrary {\r\n public static get archName() {\r\n // We make sure we are running in a known platform.\r\n if (typeof process === \"undefined\" || process.platform === undefined || process.arch === undefined)\r\n throw new Error(\"Error - unknown process\");\r\n return `imodeljs-${process.platform}-${process.arch}`;\r\n }\r\n public static get nodeAddonName() { return \"imodeljs.node\"; }\r\n public static get libraryName() {\r\n return path.join(\"@bentley\", \"imodeljs-native\", NativeLibrary.archName, NativeLibrary.nodeAddonName);\r\n }\r\n public static get defaultLocalDir(): string {\r\n const homedir = os.homedir();\r\n const platform = os.platform() as string;\r\n switch (platform) {\r\n case \"win32\":\r\n return path.join(homedir, \"AppData\", \"Local\");\r\n case \"darwin\":\r\n case \"ios\":\r\n return path.join(homedir, \"Library\", \"Caches\");\r\n case \"linux\":\r\n case \"android\":\r\n return path.join(homedir, \".cache\");\r\n default:\r\n throw new Error(\"Error - unknown platform\");\r\n }\r\n }\r\n public static get defaultCacheDir(): string { return path.join(this.defaultLocalDir, \"iModelJs\"); }\r\n private static _nativeLib?: typeof IModelJsNative;\r\n public static get nativeLib() { return this.load(); }\r\n public static load() {\r\n return this._nativeLib ?? (this._nativeLib = require(NativeLibrary.libraryName) as typeof IModelJsNative); // eslint-disable-line @typescript-eslint/no-var-requires\r\n }\r\n}\r\n\r\n/** Possible outcomes of generateElementGraphics.\r\n* Must be kept in sync with Dgn::Tile::Graphics::TileGraphicsStatus.\r\n* @internal\r\n*/\r\nexport const enum ElementGraphicsStatus {\r\n Success = 0, // Non-null content as Uint8Array.\r\n Canceled = 1, // e.g., front-end explicitly canceled, iModel was closed while processing request, etc.\r\n NoGeometry = 2, // Not an error per se\r\n InvalidJson = 3,\r\n UnknownMajorFormatVersion = 4,\r\n ElementNotFound = 5,\r\n DuplicateRequestId = 6,\r\n}\r\n\r\n/** Possible outcomes of exportSchema[s] (and generally writing schemas)\r\n* Must be kept in sync with ECN::SchemaWriteStatus\r\n* @internal\r\n*/\r\nexport const enum SchemaWriteStatus {\r\n Success = 0,\r\n FailedToSaveXml = 1,\r\n FailedToCreateXml = 2,\r\n FailedToCreateJson = 3,\r\n FailedToWriteFile = 4,\r\n}\r\n\r\n/** Module that declares the IModelJs native code.\r\n * @internal\r\n */\r\nexport declare namespace IModelJsNative {\r\n interface NameValuePair {\r\n name: string;\r\n value: string;\r\n }\r\n\r\n /** any type of Db that supports EC */\r\n type AnyECDb = DgnDb | ECDb;\r\n /** any type of Db */\r\n type AnyDb = AnyECDb | SQLiteDb;\r\n\r\n /** A string that identifies a Txn. */\r\n type TxnIdString = string;\r\n\r\n interface NativeCrashReportingConfig {\r\n /** The directory to which *.dmp and/or iModelJsNativeCrash*.properties.txt files are written. */\r\n crashDir: string;\r\n /** Write .dmp files to crashDir? The default is false. Even if writeDumpsToCrashDir is false, the iModelJsNativeCrash*.properties.txt file will be written to crashDir. */\r\n enableCrashDumps?: boolean;\r\n /** max # .dmp files that may exist in crashDir */\r\n maxDumpsInDir?: number;\r\n /** If writeDumpsToCrashDir is true, do you want a full-memory dump? Defaults to false. */\r\n wantFullMemory?: boolean;\r\n /** Additional name, value pairs to add as meta data to a crash report. */\r\n params?: NameValuePair[];\r\n }\r\n\r\n const version: string;\r\n let logger: Logger;\r\n function setUseTileCache(useTileCache: boolean): void;\r\n function getTileVersionInfo(): TileVersionInfo;\r\n function setCrashReporting(cfg: NativeCrashReportingConfig): void;\r\n function setCrashReportProperty(name: string, value: string | undefined): void;\r\n function getCrashReportProperties(): NameValuePair[];\r\n function storeObjectInVault(obj: any, id: string): void;\r\n function getObjectFromVault(id: string): any;\r\n function dropObjectFromVault(id: string): void;\r\n function addReferenceToObjectInVault(id: string): void;\r\n function getObjectRefCountFromVault(id: string): number;\r\n function clearLogLevelCache(): void;\r\n function addGcsWorkspace(fileName: LocalFileName): boolean;\r\n function runDaemonCommand(command: string, args: any): any;\r\n function queryConcurrency(pool: \"io\" | \"cpu\"): number;\r\n\r\n /** The return type of synchronous functions that may return an error or a successful result. */\r\n type ErrorStatusOrResult<ErrorCodeType, ResultType> = {\r\n /** Error from the operation. This property is defined if and only if the operation failed. */\r\n error: StatusCodeWithMessage<ErrorCodeType>;\r\n result?: never;\r\n } | {\r\n error?:never\r\n /** Result of the operation. This property is defined if the operation completed successfully */\r\n result: ResultType;\r\n }\r\n\r\n namespace ConcurrentQuery {\r\n /**\r\n * note: the any type in following with replace with actual type once common package is published with changes.\r\n * @internal\r\n */\r\n type OnResponse = (response: DbResponse)=>void;\r\n /** Configuration for concurrent query manager\r\n * @internal\r\n */\r\n }\r\n interface IConcurrentQueryManager {\r\n concurrentQueryExecute(request: DbRequest, onResponse: ConcurrentQuery.OnResponse):void;\r\n }\r\n interface TileContent {\r\n content: Uint8Array;\r\n elapsedSeconds: number;\r\n }\r\n /** Represents the current state of a pollable tile content request.\r\n * Note: lack of a \"completed\" state because polling a completed request returns the content as a Uint8Array.\r\n * @internal\r\n */\r\n const enum TileContentState {\r\n New = 0, // Request was just created and enqueued.\r\n Pending = 1, // Request is enqueued but not yet being processed.\r\n Loading = 2, // Request is being actively processed.\r\n }\r\n\r\n /** Result of generateElementGraphics conveying graphics as Uint8Array.\r\n * @internal\r\n */\r\n export interface ElementGraphicsContent {\r\n status: ElementGraphicsStatus.Success;\r\n content: Uint8Array;\r\n }\r\n\r\n /** Result of generateElementGraphics that produced no graphics.\r\n * @internal\r\n */\r\n export interface ElementGraphicsError {\r\n status: Exclude<ElementGraphicsStatus, ElementGraphicsStatus.Success>;\r\n }\r\n\r\n /** The result of generateElementGraphics.\r\n * @note generateElementGraphics produces a Promise<ElementGraphicsResult>. It only ever rejects if some unforeseen error like \"iModel not open\" or \"type error\" occurs.\r\n * @internal\r\n */\r\n export type ElementGraphicsResult = ElementGraphicsContent | ElementGraphicsError;\r\n\r\n /** Information returned by DgnDb.queryDefinitionElementUsage. */\r\n interface DefinitionElementUsageInfo {\r\n /** The subset of input Ids that are SpatialCategory definitions. */\r\n spatialCategoryIds?: Id64String[];\r\n /** The subset of input Ids that are DrawingCategory definitions. */\r\n drawingCategoryIds?: Id64String[];\r\n /** The subset of input Ids that are SubCategory definitions. */\r\n subCategoryIds?: Id64String[];\r\n /** The subset of input Ids that are CategorySelectors. */\r\n categorySelectorIds?: Id64String[];\r\n /** The subset of input Ids that are ModelSelectors. */\r\n modelSelectorIds?: Id64String[];\r\n /** The subset of input Ids that are DisplayStyles. */\r\n displayStyleIds?: Id64String[];\r\n /** The subset of input Ids that are ViewDefinitions. */\r\n viewDefinitionIds?: Id64String[];\r\n /** The subset of input Ids that are GeometryParts. */\r\n geometryPartIds?: Id64String[];\r\n /** The subset of input Ids that are RenderMaterials. */\r\n renderMaterialIds?: Id64String[];\r\n /** The subset of input Ids that are LineStyles. */\r\n lineStyleIds?: Id64String[];\r\n /** The subset of input Ids that are Textures. */\r\n textureIds?: Id64String[];\r\n /** Ids of *other* input DefinitionElements that were not checked for usage. */\r\n otherDefinitionElementIds?: Id64String[];\r\n /** Ids of input DefinitionElements where usage was detected. */\r\n usedIds?: Id64String[];\r\n }\r\n\r\n /** The options for how conflicts are to be handled during change-merging in an OptimisticConcurrencyControlPolicy.\r\n * The scenario is that the caller has made some changes to the *local* briefcase. Now, the caller is attempting to\r\n * merge in changes from iModelHub. The properties of this policy specify how to handle the *incoming* changes from iModelHub.\r\n */\r\n interface BriefcaseManagerOnConflictPolicy {\r\n /** What to do with the incoming change in the case where the same entity was updated locally and also would be updated by the incoming change. */\r\n updateVsUpdate: number;\r\n /** What to do with the incoming change in the case where an entity was updated locally and would be deleted by the incoming change. */\r\n updateVsDelete: number;\r\n /** What to do with the incoming change in the case where an entity was deleted locally and would be updated by the incoming change. */\r\n deleteVsUpdate: number;\r\n }\r\n\r\n /**\r\n * Represents all of the valid EC Specification Versions.\r\n */\r\n const enum ECVersion {\r\n V2_0 = (0x02 << 16),\r\n V3_1 = (0x03 << 16 | 0x01),\r\n V3_2 = (0x03 << 16 | 0x02),\r\n Latest = V3_2,\r\n }\r\n\r\n interface ChangesetFileProps {\r\n index: number;\r\n id: string;\r\n parentId: string;\r\n changesType: number;\r\n description: string;\r\n briefcaseId: number;\r\n pushDate: string;\r\n userCreated: string;\r\n size?: number;\r\n pathname: string;\r\n }\r\n\r\n interface EmbeddedFileProps {\r\n name: string,\r\n localFileName: string,\r\n }\r\n\r\n interface EmbedFileArg extends EmbeddedFileProps {\r\n date: number,\r\n fileExt?: string,\r\n compress?: boolean;\r\n }\r\n\r\n interface EmbedFileQuery {\r\n size: number,\r\n date: number,\r\n fileExt: string\r\n }\r\n\r\n interface SQLiteOps {\r\n embedFile(arg: EmbedFileArg): void;\r\n extractEmbeddedFile(arg: EmbeddedFileProps): void;\r\n getFilePath(): string;\r\n isOpen(): boolean;\r\n isReadonly(): boolean;\r\n queryEmbeddedFile(name: string): EmbedFileQuery | undefined;\r\n queryFileProperty(props: FilePropertyProps, wantString: boolean): string | Uint8Array | undefined;\r\n queryNextAvailableFileProperty(props: FilePropertyProps): number;\r\n removeEmbeddedFile(name: string): void;\r\n replaceEmbeddedFile(arg: EmbedFileArg): void;\r\n saveChanges(): void;\r\n saveFileProperty(props: FilePropertyProps, strValue: string | undefined, blobVal: Uint8Array | undefined): void;\r\n }\r\n\r\n /** The native object for a Briefcase. */\r\n class DgnDb implements IConcurrentQueryManager, SQLiteOps {\r\n constructor();\r\n public abandonChanges(): DbResult;\r\n public abandonCreateChangeset(): void;\r\n public addChildPropagatesChangesToParentRelationship(schemaName: string, relClassName: string): BentleyStatus;\r\n public applyChangeset(changeSet: ChangesetFileProps): void;\r\n public attachChangeCache(changeCachePath: string): DbResult;\r\n public beginMultiTxnOperation(): DbResult;\r\n public beginPurgeOperation(): IModelStatus;\r\n public cancelElementGraphicsRequests(requestIds: string[]): void;\r\n public cancelTileContentRequests(treeId: string, contentIds: string[]): void;\r\n public cancelTo(txnId: TxnIdString): IModelStatus;\r\n public classIdToName(idString: string): string;\r\n public classNameToId(className: string): Id64String;\r\n public closeIModel(): void;\r\n public completeCreateChangeset(arg: { index: number }): void;\r\n public computeProjectExtents(wantFullExtents: boolean, wantOutlierIds: boolean): { extents: Range3dProps, fullExtents?: Range3dProps, outliers?: Id64Array };\r\n public concurrentQueryExecute(request: any, onResponse: ConcurrentQuery.OnResponse):void;\r\n public createBRepGeometry(createProps: any/* BRepGeometryCreate */): DbResult;\r\n public createChangeCache(changeCacheFile: ECDb, changeCachePath: string): DbResult;\r\n public createClassViewsInDb(): BentleyStatus;\r\n public createIModel(fileName: string, props: CreateEmptyStandaloneIModelProps): void;\r\n public deleteAllTxns(): void;\r\n public deleteElement(elemIdJson: string): void;\r\n public deleteElementAspect(aspectIdJson: string): void;\r\n public deleteLinkTableRelationship(props: RelationshipProps): DbResult;\r\n public deleteLocalValue(name: string): void;\r\n public deleteModel(modelIdJson: string): void;\r\n public detachChangeCache(): number;\r\n public dumpChangeset(changeSet: ChangesetFileProps): void;\r\n public elementGeometryCacheOperation(requestProps: any/* ElementGeometryCacheOperationRequestProps */): BentleyStatus;\r\n public embedFile(arg: EmbedFileArg): void;\r\n public embedFont(fontProps: FontProps): FontProps;\r\n public enableChangesetSizeStats(enabled: boolean): DbResult;\r\n public enableTxnTesting(): void;\r\n public endMultiTxnOperation(): DbResult;\r\n public endPurgeOperation(): IModelStatus;\r\n public executeTest(testName: string, params: string): string;\r\n public exportGraphics(exportProps: any/* ExportGraphicsProps */): DbResult;\r\n public exportPartGraphics(exportProps: any/* ExportPartGraphicsProps */): DbResult;\r\n public exportSchema(schemaName: string, exportDirectory: string): SchemaWriteStatus;\r\n public exportSchemas(exportDirectory: string): SchemaWriteStatus;\r\n public extractChangedInstanceIdsFromChangeSet(changeSetFileName: string): ErrorStatusOrResult<IModelStatus, string>; // see ChangedInstanceIdsProps\r\n public extractChangeSummary(changeCacheFile: ECDb, changesetFilePath: string): ErrorStatusOrResult<DbResult, string>;\r\n public extractEmbeddedFile(arg: EmbeddedFileProps): void;\r\n public findGeometryPartReferences(partIds: Id64String[], is2d: boolean): Id64String[];\r\n public generateElementGraphics(request: ElementGraphicsRequestProps): Promise<ElementGraphicsResult>;\r\n public getBriefcaseId(): number;\r\n public getChangesetSize(): number;\r\n public getChangeTrackingMemoryUsed(): number;\r\n public getCurrentChangeset(): ChangesetIndexAndId;\r\n public getCurrentTxnId(): TxnIdString;\r\n public getECClassMetaData(schema: string, className: string): ErrorStatusOrResult<IModelStatus, string>;\r\n public getElement(opts: ElementLoadProps): ElementProps;\r\n public getFilePath(): string; // full path of the DgnDb file\r\n public getGeoCoordinatesFromIModelCoordinates(points: GeoCoordinatesRequestProps): GeoCoordinatesResponseProps;\r\n public getGeometryContainment(props: object): Promise<GeometryContainmentResponseProps>;\r\n public getIModelCoordinatesFromGeoCoordinates(points: IModelCoordinatesRequestProps): IModelCoordinatesResponseProps;\r\n public getIModelId(): GuidString;\r\n public getIModelProps(): IModelProps;\r\n public getITwinId(): GuidString;\r\n public getMassProperties(props: object): Promise<MassPropertiesResponseProps>;\r\n public getModel(opts: ModelLoadProps): ModelProps;\r\n public getMultiTxnOperationDepth(): number;\r\n public getRedoString(): string;\r\n public getSchema(name: string): ErrorStatusOrResult<IModelStatus, string>;\r\n public getSchemaItem(schemaName: string, itemName: string): ErrorStatusOrResult<IModelStatus, string>;\r\n public getTempFileBaseName(): string;\r\n public getTileContent(treeId: string, tileId: string, callback: (result: ErrorStatusOrResult<IModelStatus, Uint8Array>) => void): void;\r\n public getTileTree(id: string, callback: (result: ErrorStatusOrResult<IModelStatus, any>) => void): void;\r\n public getTxnDescription(txnId: TxnIdString): string;\r\n public getUndoString(): string;\r\n public hasFatalTxnError(): boolean;\r\n public hasPendingTxns(): boolean;\r\n public hasUnsavedChanges(): boolean;\r\n public importFunctionalSchema(): DbResult;\r\n public importSchemas(schemaFileNames: string[]): DbResult;\r\n public importXmlSchemas(serializedXmlSchemas: string[]): DbResult;\r\n public inBulkOperation(): boolean;\r\n public insertCodeSpec(name: string, jsonProperties:{spec: any, scopeSpec: any}): Id64String;\r\n public insertElement(elemProps: ElementProps, options?: { forceUseId: boolean }): Id64String;\r\n public insertElementAspect(aspectProps: ElementAspectProps): void;\r\n public insertLinkTableRelationship(props: RelationshipProps): Id64String;\r\n public insertModel(modelProps: ModelProps): Id64String;\r\n public isChangeCacheAttached(): boolean;\r\n public isEncrypted(): boolean;\r\n public isGeometricModelTrackingSupported(): boolean;\r\n public isIndirectChanges(): boolean;\r\n public isLinkTableRelationship(classFullName: string): boolean | undefined;\r\n public isOpen(): boolean;\r\n public isProfilerPaused(): boolean;\r\n public isProfilerRunning(): boolean;\r\n public isReadonly(): boolean;\r\n public isRedoPossible(): boolean;\r\n public isTxnIdValid(txnId: TxnIdString): boolean;\r\n public isUndoPossible(): boolean;\r\n public logTxnError(fatal: boolean): void;\r\n public openIModel(dbName: string, mode: OpenMode, upgradeOptions?: UpgradeOptions, props?: SnapshotOpenOptions): void;\r\n public pauseProfiler(): DbResult;\r\n public pollTileContent(treeId: string, tileId: string): ErrorStatusOrResult<IModelStatus, TileContentState | TileContent>;\r\n public processGeometryStream(requestProps: any/* ElementGeometryOptions */): DbResult;\r\n public purgeTileTrees(modelIds: Id64Array | undefined): void;\r\n public queryDefinitionElementUsage(definitionElementIds: Id64Array): DefinitionElementUsageInfo | undefined;\r\n public queryEmbeddedFile(name: string): EmbedFileQuery | undefined;\r\n public queryFileProperty(props: FilePropertyProps, wantString: boolean): string | Uint8Array | undefined;\r\n public queryFirstTxnId(): TxnIdString;\r\n public queryLocalValue(name: string): string | undefined;\r\n public queryModelExtents(options: {id: Id64String}): { modelExtents: Range3dProps };\r\n public queryNextAvailableFileProperty(props: FilePropertyProps): number;\r\n public queryNextTxnId(txnId: TxnIdString): TxnIdString;\r\n public queryPreviousTxnId(txnId: TxnIdString): TxnIdString;\r\n public queryTextureData(opts: TextureLoadProps): Promise<TextureData | undefined>;\r\n public readFontMap(): FontMapProps;\r\n public reinstateTxn(): IModelStatus;\r\n public removeEmbeddedFile( name: string): void;\r\n public replaceEmbeddedFile(arg: EmbedFileArg): void;\r\n public resetBriefcaseId(idValue: number): void;\r\n public restartTxnSession(): void;\r\n public resumeProfiler(): DbResult;\r\n public reverseAll(): IModelStatus;\r\n public reverseTo(txnId: TxnIdString): IModelStatus;\r\n public reverseTxns(numOperations: number): IModelStatus;\r\n public saveChanges(description?: string): DbResult;\r\n public saveFileProperty(props: FilePropertyProps, strValue: string | undefined, blobVal: Uint8Array | undefined): void;\r\n public saveLocalValue(name: string, value: string | undefined): void;\r\n public schemaToXmlString(schemaName: string, version?: ECVersion): string | undefined;\r\n public setBriefcaseManagerOptimisticConcurrencyControlPolicy(conflictPolicy: BriefcaseManagerOnConflictPolicy): RepositoryStatus;\r\n public setBriefcaseManagerPessimisticConcurrencyControlPolicy(): RepositoryStatus;\r\n public setGeometricModelTrackingEnabled(enabled: boolean): ErrorStatusOrResult<IModelStatus, boolean>;\r\n public setIModelDb(iModelDb?: any/* IModelDb */): void;\r\n public setIModelId(guid: GuidString): DbResult;\r\n public setITwinId(guid: GuidString): DbResult;\r\n public simplifyElementGeometry(simplifyArgs: any): DbResult;\r\n public startCreateChangeset(): ChangesetFileProps;\r\n public startProfiler(scopeName?: string, scenarioName?: string, overrideFile?: boolean, computeExecutionPlan?: boolean): DbResult;\r\n public stopProfiler(): { rc: DbResult, elapsedTime?: number, scopeId?: number, fileName?: string };\r\n public updateElement(elemProps: ElementProps): void;\r\n public updateElementAspect(aspectProps: ElementAspectProps): void;\r\n public updateElementGeometryCache(props: object): Promise<any>;\r\n public updateGeometryStream(updateProps: any/* UpdateGeometryOptions */): DbResult;\r\n public updateIModelProps(props: IModelProps): void;\r\n public updateLinkTableRelationship(props: RelationshipProps): DbResult;\r\n public updateModel(modelProps: ModelProps): void;\r\n public updateModelGeometryGuid(modelId: Id64String): IModelStatus;\r\n public updateProjectExtents(newExtentsJson: string): void;\r\n public uploadDaemonBlobs(): DbResult;\r\n public writeAffectedElementDependencyGraphToFile(dotFileName: string, changedElems:Id64Array): BentleyStatus;\r\n public writeFullElementDependencyGraphToFile(dotFileName: string): BentleyStatus;\r\n\r\n public static enableSharedCache(enable: boolean): DbResult;\r\n public static encryptDb(dbFileName: string, encryptionProps: IModelEncryptionProps): void;\r\n public static flushLog():void;\r\n public static getAssetsDir(): string;\r\n public static vacuum(dbName: string, pageSize?: number): void;\r\n }\r\n\r\n /** The native object for GeoServices. */\r\n class GeoServices {\r\n constructor();\r\n public static getGeographicCRSInterpretation(props: GeographicCRSInterpretRequestProps): GeographicCRSInterpretResponseProps;\r\n\r\n }\r\n\r\n /**\r\n * RevisionUtility help with debugging and testing\r\n * @internal\r\n */\r\n class RevisionUtility {\r\n constructor();\r\n public static assembleRevision(targetFile: string, rawChangesetFile: string, prefixFile?: string, lzmaPropsJson?: string): BentleyStatus;\r\n public static computeStatistics(sourceFile: string, addPrefix: boolean): string;\r\n public static disassembleRevision(sourceFile: string, targetDir: string): BentleyStatus;\r\n public static dumpChangesetToDb(sourceFile: string, dbFile: string, includeCols: boolean): BentleyStatus;\r\n public static getUncompressSize(sourceFile: string): string;\r\n public static normalizeLzmaParams(lzmaPropsJson?: string): string;\r\n public static recompressRevision(sourceFile: string, targetFile: string, lzmaPropsJson?: string): BentleyStatus;\r\n }\r\n\r\n class ECDb implements IDisposable, IConcurrentQueryManager {\r\n constructor();\r\n public abandonChanges(): DbResult;\r\n public closeDb(): void;\r\n public createDb(dbName: string): DbResult;\r\n public dispose(): void;\r\n public getFilePath(): string;\r\n public importSchema(schemaPathName: string): DbResult;\r\n public isOpen(): boolean;\r\n public openDb(dbName: string, mode: OpenMode, upgradeProfiles?: boolean): DbResult;\r\n public saveChanges(changesetName?: string): DbResult;\r\n public static enableSharedCache(enable: boolean): DbResult;\r\n public concurrentQueryExecute(request: any, onResponse: ConcurrentQuery.OnResponse):void;\r\n }\r\n\r\n class ChangedElementsECDb implements IDisposable {\r\n constructor();\r\n public dispose(): void;\r\n public createDb(db: DgnDb, dbName: string): DbResult;\r\n public openDb(dbName: string, mode: OpenMode, upgradeProfiles?: boolean): DbResult;\r\n public isOpen(): boolean;\r\n public closeDb(): void;\r\n public processChangesets(db: DgnDb, changesets: ChangesetFileProps[], rulesetId: string, filterSpatial?: boolean, wantParents?: boolean, wantPropertyChecksums?: boolean, rulesetDir?: string, tempDir?: string): DbResult;\r\n public processChangesetsAndRoll(dbFilename: string, dbGuid: string, changesets: ChangesetFileProps[], rulesetId: string, filterSpatial?: boolean, wantParents?: boolean, wantPropertyChecksums?: boolean, rulesetDir?: string, tempDir?: string, wantRelationshipCaching?: boolean, relationshipCacheSize?: number): DbResult;\r\n public getChangedElements(startChangesetId: string, endChangesetId: string): ErrorStatusOrResult<IModelStatus, any>;\r\n public isProcessed(changesetId: string): boolean;\r\n public cleanCaches(): void;\r\n }\r\n\r\n class ECSqlStatement implements IDisposable {\r\n constructor();\r\n public clearBindings(): DbResult;\r\n public dispose(): void;\r\n public getBinder(param: number | string): ECSqlBinder;\r\n public getColumnCount(): number;\r\n public getValue(columnIndex: number): ECSqlValue;\r\n public prepare(db: AnyECDb, ecsql: string, logErrors?: boolean): StatusCodeWithMessage<DbResult>;\r\n public reset(): DbResult;\r\n public step(): DbResult;\r\n public stepAsync(callback: (result: DbResult) => void): void;\r\n public stepForInsert(): { status: DbResult, id: string };\r\n public stepForInsertAsync(callback: (result: { status: DbResult, id: string }) => void): void;\r\n public getNativeSql(): string;\r\n }\r\n\r\n class ECSqlBinder {\r\n constructor();\r\n public addArrayElement(): ECSqlBinder;\r\n public bindBlob(base64String: string | Uint8Array | ArrayBuffer | SharedArrayBuffer): DbResult;\r\n public bindBoolean(val: boolean): DbResult;\r\n public bindDateTime(isoString: string): DbResult;\r\n public bindDouble(val: number): DbResult;\r\n public bindGuid(guidStr: GuidString): DbResult;\r\n public bindId(hexStr: Id64String): DbResult;\r\n public bindIdSet(hexVector: Id64String[]): DbResult;\r\n public bindInteger(val: number | string): DbResult;\r\n public bindMember(memberName: string): ECSqlBinder;\r\n public bindNavigation(navIdHexStr: Id64String, relClassName?: string, relClassTableSpace?: string): DbResult;\r\n public bindNull(): DbResult;\r\n public bindPoint2d(x: number, y: number): DbResult;\r\n public bindPoint3d(x: number, y: number, z: number): DbResult;\r\n public bindString(val: string): DbResult;\r\n }\r\n\r\n class ECSqlColumnInfo {\r\n constructor();\r\n public getAccessString(): string;\r\n public getPropertyName(): string;\r\n public getRootClassAlias(): string;\r\n public getRootClassName(): string;\r\n public getRootClassTableSpace(): string;\r\n public getType(): number;\r\n public isEnum(): boolean;\r\n public isGeneratedProperty(): boolean;\r\n public isSystemProperty(): boolean;\r\n }\r\n\r\n class ECSqlValue {\r\n constructor();\r\n public getArrayIterator(): ECSqlValueIterator;\r\n public getBlob(): Uint8Array;\r\n public getBoolean(): boolean;\r\n public getClassNameForClassId(): string;\r\n public getColumnInfo(): ECSqlColumnInfo;\r\n public getDateTime(): string;\r\n public getDouble(): number;\r\n public getEnum(): Array<{ schema: string, name: string, key: string, value: number | string }> | undefined;\r\n public getGeometry(): string;\r\n public getGuid(): GuidString;\r\n public getId(): Id64String;\r\n public getInt(): number;\r\n public getInt64(): number;\r\n public getNavigation(): { id: Id64String, relClassName?: string };\r\n public getPoint2d(): { x: number, y: number };\r\n public getPoint3d(): { x: number, y: number, z: number };\r\n public getString(): string;\r\n public getStructIterator(): ECSqlValueIterator;\r\n public isNull(): boolean;\r\n }\r\n\r\n class ECSqlValueIterator {\r\n constructor();\r\n public getCurrent(): ECSqlValue;\r\n public moveNext(): boolean;\r\n }\r\n\r\n class SQLiteDb implements SQLiteOps, IDisposable {\r\n constructor();\r\n public abandonChanges(): void;\r\n public closeDb(): void;\r\n public createDb(dbName: string): void;\r\n public dispose(): void;\r\n public embedFile(arg: EmbedFileArg): void;\r\n public extractEmbeddedFile(arg: EmbeddedFileProps): void;\r\n public flushCloudUpload(): DbResult;\r\n public getFilePath(): string;\r\n public isOpen(): boolean;\r\n public isReadonly(): boolean;\r\n public openDb(dbName: string, mode: OpenMode): void;\r\n public queryEmbeddedFile(name: string): EmbedFileQuery | undefined;\r\n public queryFileProperty(props: FilePropertyProps, wantString: boolean): string | Uint8Array | undefined;\r\n public queryNextAvailableFileProperty(props: FilePropertyProps): number;\r\n public removeEmbeddedFile( name: string): void;\r\n public replaceEmbeddedFile(arg: EmbedFileArg): void;\r\n public saveChanges(): void;\r\n public saveFileProperty(props: FilePropertyProps, strValue: string | undefined, blobVal: Uint8Array | undefined): void;\r\n }\r\n\r\n class SqliteStatement implements IDisposable {\r\n constructor();\r\n public bindBlob(param: number | string, val: Uint8Array | ArrayBuffer | SharedArrayBuffer): DbResult;\r\n public bindDouble(param: number | string, val: number): DbResult;\r\n public bindGuid(param: number | string, guidStr: GuidString): DbResult;\r\n public bindId(param: number | string, hexStr: Id64String): DbResult;\r\n public bindInteger(param: number | string, val: number | string): DbResult;\r\n public bindNull(param: number | string): DbResult;\r\n public bindString(param: number | string, val: string): DbResult;\r\n public clearBindings(): DbResult;\r\n public dispose(): void;\r\n public getColumnCount(): number;\r\n public getColumnName(columnIndex: number): string;\r\n public getColumnType(columnIndex: number): number;\r\n public getValueBlob(columnIndex: number): Uint8Array;\r\n public getValueDouble(columnIndex: number): number;\r\n public getValueGuid(columnIndex: number): GuidString;\r\n public getValueId(columnIndex: number): Id64String;\r\n public getValueInteger(columnIndex: number): number;\r\n public getValueString(columnIndex: number): string;\r\n public isReadonly(): boolean;\r\n public isValueNull(columnIndex: number): boolean;\r\n public prepare(db: AnyDb, sql: string, logErrors?: boolean): void;\r\n public reset(): DbResult;\r\n public step(): DbResult;\r\n public stepAsync(callback: (result: DbResult) => void): void;\r\n }\r\n\r\n /** Incremental IO for blobs */\r\n class BlobIO {\r\n constructor();\r\n /** Close this BlobIO if it is opened.\r\n * @note this BlobIO *may* be reused after this call by calling `open` again.\r\n */\r\n public close(): void;\r\n /** get the total number of bytes in the blob */\r\n public getNumBytes(): number;\r\n /** @return true if this BlobIO was successfully opened and may be use to read or write the blob */\r\n public isValid(): boolean;\r\n /** Open this BlobIO against a table/row/column in a Db */\r\n public open(\r\n /** The database for the blob */\r\n db: AnyDb,\r\n args: {\r\n /** the name of the table for the blob*/\r\n tableName: string,\r\n /** the name of the column for the blob */\r\n columnName: string,\r\n /** The rowId of the blob */\r\n row: number,\r\n /** If true, open this BlobIO for write access */\r\n writeable?: boolean\r\n }): void;\r\n /** Read from a blob\r\n * @returns the contents of the requested byte range\r\n */\r\n public read(args: {\r\n /** The number of bytes to read */\r\n numBytes: number;\r\n /** starting offset within the blob to read */\r\n offset: number;\r\n /** If present and of sufficient size, use this ArrayBuffer for the value. */\r\n blob?: ArrayBuffer; }): Uint8Array;\r\n /** Reposition this BlobIO to a new rowId\r\n * @note this BlobIO must be valid when this methods is called.\r\n */\r\n public changeRow(row: number): void;\r\n /** Write to a blob */\r\n public write(args: {\r\n /** The number of bytes to write */\r\n numBytes: number;\r\n /** starting offset within the blob to write */\r\n offset: number;\r\n /** the value to write */\r\n blob: ArrayBuffer; }): void;\r\n }\r\n\r\n const enum ECPresentationStatus {\r\n Success = 0,\r\n Canceled = 1,\r\n Pending = 2,\r\n Error = 0x10000,\r\n InvalidArgument = Error + 1,\r\n }\r\n\r\n const enum ECPresentationManagerMode {\r\n ReadOnly = \"ro\",\r\n ReadWrite = \"rw\",\r\n }\r\n\r\n interface ECPresentationMemoryHierarchyCacheConfig {\r\n mode: \"memory\";\r\n }\r\n\r\n interface ECPresentationDiskHierarchyCacheConfig {\r\n mode: \"disk\";\r\n directory: string;\r\n }\r\n\r\n interface ECPresentationHybridHierarchyCacheConfig {\r\n mode: \"hybrid\";\r\n disk?: ECPresentationDiskHierarchyCacheConfig;\r\n }\r\n\r\n type ECPresentationHierarchyCacheConfig = ECPresentationMemoryHierarchyCacheConfig | ECPresentationDiskHierarchyCacheConfig | ECPresentationHybridHierarchyCacheConfig;\r\n\r\n type ECPresentationManagerResponse<TResult> = ErrorStatusOrResult<ECPresentationStatus, TResult> & {\r\n diagnostics?: any;\r\n }\r\n\r\n interface ECPresentationManagerProps {\r\n id: string;\r\n localeDirectories: string[];\r\n taskAllocationsMap: { [priority: number]: number };\r\n defaultFormats: {\r\n [phenomenon: string]: {\r\n unitSystems: string[];\r\n serializedFormat: string;\r\n };\r\n };\r\n mode: ECPresentationManagerMode;\r\n isChangeTrackingEnabled: boolean;\r\n cacheConfig: ECPresentationHierarchyCacheConfig;\r\n useMmap?: boolean | number;\r\n }\r\n\r\n class ECPresentationManager implements IDisposable {\r\n constructor(props: ECPresentationManagerProps);\r\n public forceLoadSchemas(db: DgnDb): Promise<ECPresentationManagerResponse<void>>;\r\n public setupRulesetDirectories(directories: string[]): ECPresentationManagerResponse<void>;\r\n public setupSupplementalRulesetDirectories(directories: string[]): ECPresentationManagerResponse<void>;\r\n public setRulesetVariableValue(rulesetId: string, variableId: string, type: string, value: any): ECPresentationManagerResponse<void>;\r\n public unsetRulesetVariableValue(rulesetId: string, variableId: string): ECPresentationManagerResponse<void>;\r\n public getRulesetVariableValue(rulesetId: string, variableId: string, type: string): ECPresentationManagerResponse<any>;\r\n public getRulesets(rulesetId: string): ECPresentationManagerResponse<string>;\r\n public addRuleset(serializedRuleset: string): ECPresentationManagerResponse<string>;\r\n public removeRuleset(rulesetId: string, hash: string): ECPresentationManagerResponse<boolean>;\r\n public clearRulesets(): ECPresentationManagerResponse<void>;\r\n public queueRequest(db: DgnDb, options: string): ECPresentationManagerResponse<string>;\r\n public pollResponse(requestGuid: string): ECPresentationManagerResponse<string>;\r\n public getUpdateInfo(): ECPresentationManagerResponse<any>;\r\n public updateHierarchyState(db: DgnDb, rulesetId: string, changeType: \"nodesExpanded\" | \"nodesCollapsed\", serializedKeys: string): ECPresentationManagerResponse<void>;\r\n public dispose(): void;\r\n }\r\n\r\n namespace ECSchemaXmlContext {\r\n interface SchemaKey {\r\n name: string;\r\n readVersion: number;\r\n writeVersion: number;\r\n minorVersion: number;\r\n }\r\n\r\n const enum SchemaMatchType {\r\n Identical = 0, // Find exact VersionRead, VersionWrite, VersionMinor match as well as Data\r\n Exact = 1, // Find exact VersionRead, VersionWrite, VersionMinor match.\r\n LatestWriteCompatible = 2, // Find latest version with matching VersionRead and VersionWrite\r\n Latest = 3, // Find latest version.\r\n LatestReadCompatible = 4, // Find latest version with matching VersionRead\r\n }\r\n\r\n type SchemaLocaterCallback = (key: SchemaKey, matchType: SchemaMatchType) => string | undefined | void;\r\n }\r\n\r\n class ECSchemaXmlContext {\r\n constructor();\r\n public addSchemaPath(path: string): void;\r\n public setSchemaLocater(locater: ECSchemaXmlContext.SchemaLocaterCallback): void;\r\n public setFirstSchemaLocater(locater: ECSchemaXmlContext.SchemaLocaterCallback): void;\r\n public readSchemaFromXmlFile(filePath: string): ErrorStatusOrResult<BentleyStatus, string>;\r\n }\r\n\r\n class SnapRequest {\r\n constructor();\r\n public doSnap(db: DgnDb, request: any): Promise<any>;\r\n public cancelSnap(): void;\r\n }\r\n\r\n type CloudDbTransferArg = BlobDaemonCommandArg & { direction: \"upload\" | \"download\" }\r\n\r\n class CloudDbTransfer {\r\n constructor(args: CloudDbTransferArg);\r\n public cancelTransfer(): void;\r\n public getProgress(): { loaded: number, total: number };\r\n public promise: Promise<void>;\r\n }\r\n\r\n interface FeatureUserDataKeyValuePair {\r\n key: string;\r\n value: string;\r\n }\r\n\r\n interface NativeUlasClientFeatureEvent {\r\n featureId: string;\r\n versionStr: string;\r\n projectId?: string;\r\n startDateZ?: string;\r\n endDateZ?: string;\r\n featureUserData?: FeatureUserDataKeyValuePair[];\r\n }\r\n\r\n const enum DbChangeStage {\r\n Old = 0,\r\n New = 1,\r\n }\r\n\r\n const enum DbValueType {\r\n IntegerVal = 1,\r\n FloatVal = 2,\r\n TextVal = 3,\r\n BlobVal = 4,\r\n NullVal = 5,\r\n }\r\n\r\n type ChangeValueType = Uint8Array | number| string | null | undefined;\r\n\r\n interface ChangedValue {\r\n new?: ChangeValueType;\r\n old?: ChangeValueType;\r\n }\r\n\r\n class ChangesetReader {\r\n close(): DbResult;\r\n getColumnCount(): number| undefined;\r\n getColumnValue(col: number, stage: DbChangeStage): ChangeValueType;\r\n getColumnValueType(col: number, stage: DbChangeStage): DbValueType | undefined;\r\n getFileName(): string | undefined;\r\n getOpCode(): DbOpcode | undefined;\r\n getRow(): ChangedValue[] | undefined;\r\n getDdlChanges(): string | undefined;\r\n getTableName(): string | undefined;\r\n isIndirectChange(): boolean | undefined;\r\n isPrimaryKeyColumn(col: number): boolean | undefined;\r\n open(fileName: string, invert: boolean): DbResult;\r\n reset(): DbResult;\r\n step(): DbResult;\r\n }\r\n\r\n class DisableNativeAssertions implements IDisposable {\r\n constructor();\r\n public dispose(): void;\r\n }\r\n\r\n class ImportContext implements IDisposable {\r\n constructor(sourceDb: DgnDb, targetDb: DgnDb);\r\n public dispose(): void;\r\n public dump(outputFileName: string): BentleyStatus;\r\n public addClass(sourceClassFullName: string, targetClassFullName: string): BentleyStatus;\r\n public addCodeSpecId(sourceId: Id64String, targetId: Id64String): BentleyStatus;\r\n public addElementId(sourceId: Id64String, targetId: Id64String): BentleyStatus;\r\n public removeElementId(sourceId: Id64String): BentleyStatus;\r\n public findCodeSpecId(sourceId: Id64String): Id64String;\r\n public findElementId(sourceId: Id64String): Id64String;\r\n public cloneElement(sourceId: Id64String, cloneOptions?: CloneElementOptions): ElementProps;\r\n public importCodeSpec(sourceId: Id64String): Id64String;\r\n public importFont(sourceId: number): number;\r\n public hasSubCategoryFilter(): boolean;\r\n public isSubCategoryFiltered(sourceId: Id64String): boolean;\r\n public filterSubCategoryId(sourceId: Id64String): BentleyStatus;\r\n }\r\n\r\n interface CloneElementOptions {\r\n binaryGeometry?: boolean;\r\n }\r\n\r\n interface ChangedInstanceOpsProps {\r\n insert?: Id64String[];\r\n update?: Id64String[];\r\n delete?: Id64String[];\r\n }\r\n\r\n /** The *wire format* of the result returned by DgnDb.extractChangedInstanceIdsFromChangeSet */\r\n interface ChangedInstanceIdsProps {\r\n codeSpec?: ChangedInstanceOpsProps;\r\n model?: ChangedInstanceOpsProps;\r\n element?: ChangedInstanceOpsProps;\r\n aspect?: ChangedInstanceOpsProps;\r\n relationship?: ChangedInstanceOpsProps;\r\n font?: ChangedInstanceOpsProps;\r\n }\r\n\r\n /**\r\n * Temporary implementation to allow crashing the backend for testing purposes\r\n * @internal\r\n */\r\n class NativeDevTools {\r\n public static signal(signalType: number): boolean;\r\n }\r\n\r\n /**\r\n * Utilities to encode/decode names to convert them to/from names that comply with EC naming rules\r\n */\r\n class ECNameValidation {\r\n /**\r\n * Encodes names to comply with EC naming rules\r\n * @param name Name to be encoded\r\n * @returns Encoded name\r\n * @param name\r\n */\r\n public static encodeToValidName(name: string): string;\r\n\r\n /**\r\n * Decodes names that were encoded to comply with EC naming rules\r\n * @param encodedName Encoded name\r\n * @returns Decoded name\r\n */\r\n public static decodeFromValidName(encodedName: string): string;\r\n }\r\n\r\n const enum TestWorkerState {\r\n NotQueued = 0,\r\n Queued = 1,\r\n Skipped = 2,\r\n Running = 3,\r\n Ok = 4,\r\n Error = 5,\r\n Aborted = 6,\r\n }\r\n\r\n class TestWorker {\r\n public constructor(db: DgnDb);\r\n\r\n public queue(): Promise<void>;\r\n public cancel(): void;\r\n public setReady(): void;\r\n public setThrow(): void;\r\n public isCanceled(): boolean;\r\n public wasExecuted(): boolean;\r\n public getState(): TestWorkerState;\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"NativeLibrary.js","sourceRoot":"","sources":["../src/NativeLibrary.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;AAE/F,yBAAyB;AACzB,6BAA6B;AAe7B,+DAA+D;AAE/D,8KAA8K;AAC9K,8DAA8D;AAE9D;;GAEG;AACH,IAAY,oBAQX;AARD,WAAY,oBAAoB;IAC9B,6CAAqB,CAAA;IACrB,6CAAqB,CAAA;IACrB,+CAAuB,CAAA;IACvB,2CAAmB,CAAA;IACnB,qCAAa,CAAA;IACb,2DAAmC,CAAA;IACnC,mDAA2B,CAAA;AAC7B,CAAC,EARW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAQ/B;AAED,kDAAkD;AAClD,MAAa,aAAa;IACjB,MAAM,KAAK,QAAQ;QACxB,mDAAmD;QACnD,IAAI,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,QAAQ,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS;YAChG,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,OAAO,YAAY,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;IACxD,CAAC;IACM,MAAM,KAAK,aAAa,KAAK,OAAO,eAAe,CAAC,CAAC,CAAC;IACtD,MAAM,KAAK,WAAW;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,iBAAiB,EAAE,aAAa,CAAC,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IACvG,CAAC;IACM,MAAM,KAAK,eAAe;QAC/B,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,EAAY,CAAC;QACzC,QAAQ,QAAQ,EAAE;YAChB,KAAK,OAAO;gBACV,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;YAChD,KAAK,QAAQ,CAAC;YACd,KAAK,KAAK;gBACR,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;YACjD,KAAK,OAAO,CAAC;YACb,KAAK,SAAS;gBACZ,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YACtC;gBACE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;SAC/C;IACH,CAAC;IACM,MAAM,KAAK,eAAe,KAAa,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC;IAE5F,MAAM,KAAK,SAAS,KAAK,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAC9C,MAAM,CAAC,IAAI;;QAChB,OAAO,MAAA,IAAI,CAAC,UAAU,mCAAI,CAAC,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,WAAW,CAA0B,CAAC,CAAC,CAAC,yDAAyD;IACtK,CAAC;CACF;AAjCD,sCAiCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n\r\nimport * as os from \"os\";\r\nimport * as path from \"path\";\r\nimport {\r\n BentleyStatus, DbOpcode, DbResult, GuidString, Id64Array, Id64String, IDisposable, IModelStatus, Logger, OpenMode, RepositoryStatus,\r\n StatusCodeWithMessage,\r\n} from \"@itwin/core-bentley\";\r\nimport {\r\n ChangesetIndexAndId, CreateEmptyStandaloneIModelProps, DbRequest, DbResponse, ElementAspectProps, ElementGraphicsRequestProps, ElementLoadProps, ElementProps,\r\n FilePropertyProps, FontMapProps, FontProps, GeoCoordinatesRequestProps, GeoCoordinatesResponseProps, GeographicCRSInterpretRequestProps,\r\n GeographicCRSInterpretResponseProps, GeometryContainmentResponseProps, IModelCoordinatesRequestProps,\r\n IModelCoordinatesResponseProps, IModelEncryptionProps, IModelProps, LocalFileName, MassPropertiesResponseProps, ModelLoadProps,\r\n ModelProps, RelationshipProps, SnapshotOpenOptions, TextureData, TextureLoadProps, TileVersionInfo, UpgradeOptions,\r\n} from \"@itwin/core-common\";\r\nimport { Range3dProps } from \"@itwin/core-geometry\";\r\nimport { CloudSqlite } from \"./CloudSqlite\";\r\n\r\n// *** NOTE: DO NOT add dependencies on any other packages! ***\r\n\r\n// cspell:ignore blocksize cachesize polltime bentleyjs imodeljs ecsql pollable polyface txns lzma uncompress changesets ruleset ulas oidc keychain libsecret rulesets struct\r\n/* eslint-disable @bentley/prefer-get, no-restricted-syntax */\r\n\r\n/** Logger categories used by the native addon\r\n * @internal\r\n */\r\nexport enum NativeLoggerCategory {\r\n BeSQLite = \"BeSQLite\",\r\n BRepCore = \"BRepCore\",\r\n Changeset = \"Changeset\",\r\n DgnCore = \"DgnCore\",\r\n ECDb = \"ECDb\",\r\n ECObjectsNative = \"ECObjectsNative\",\r\n UnitsNative = \"UnitsNative\",\r\n}\r\n\r\n/** Find and load the native node-addon library */\r\nexport class NativeLibrary {\r\n public static get archName() {\r\n // We make sure we are running in a known platform.\r\n if (typeof process === \"undefined\" || process.platform === undefined || process.arch === undefined)\r\n throw new Error(\"Error - unknown process\");\r\n return `imodeljs-${process.platform}-${process.arch}`;\r\n }\r\n public static get nodeAddonName() { return \"imodeljs.node\"; }\r\n public static get libraryName() {\r\n return path.join(\"@bentley\", \"imodeljs-native\", NativeLibrary.archName, NativeLibrary.nodeAddonName);\r\n }\r\n public static get defaultLocalDir(): string {\r\n const homedir = os.homedir();\r\n const platform = os.platform() as string;\r\n switch (platform) {\r\n case \"win32\":\r\n return path.join(homedir, \"AppData\", \"Local\");\r\n case \"darwin\":\r\n case \"ios\":\r\n return path.join(homedir, \"Library\", \"Caches\");\r\n case \"linux\":\r\n case \"android\":\r\n return path.join(homedir, \".cache\");\r\n default:\r\n throw new Error(\"Error - unknown platform\");\r\n }\r\n }\r\n public static get defaultCacheDir(): string { return path.join(this.defaultLocalDir, \"iModelJs\"); }\r\n private static _nativeLib?: typeof IModelJsNative;\r\n public static get nativeLib() { return this.load(); }\r\n public static load() {\r\n return this._nativeLib ?? (this._nativeLib = require(NativeLibrary.libraryName) as typeof IModelJsNative); // eslint-disable-line @typescript-eslint/no-var-requires\r\n }\r\n}\r\n\r\n/** Possible outcomes of generateElementGraphics.\r\n* Must be kept in sync with Dgn::Tile::Graphics::TileGraphicsStatus.\r\n* @internal\r\n*/\r\nexport const enum ElementGraphicsStatus {\r\n Success = 0, // Non-null content as Uint8Array.\r\n Canceled = 1, // e.g., front-end explicitly canceled, iModel was closed while processing request, etc.\r\n NoGeometry = 2, // Not an error per se\r\n InvalidJson = 3,\r\n UnknownMajorFormatVersion = 4,\r\n ElementNotFound = 5,\r\n DuplicateRequestId = 6,\r\n}\r\n\r\n/** Possible outcomes of exportSchema[s] (and generally writing schemas)\r\n* Must be kept in sync with ECN::SchemaWriteStatus\r\n* @internal\r\n*/\r\nexport const enum SchemaWriteStatus {\r\n Success = 0,\r\n FailedToSaveXml = 1,\r\n FailedToCreateXml = 2,\r\n FailedToCreateJson = 3,\r\n FailedToWriteFile = 4,\r\n}\r\n\r\n/** Module that declares the IModelJs native code.\r\n * @internal\r\n */\r\nexport declare namespace IModelJsNative {\r\n interface NameValuePair {\r\n name: string;\r\n value: string;\r\n }\r\n\r\n /** any type of Db that supports EC */\r\n type AnyECDb = DgnDb | ECDb;\r\n /** any type of Db */\r\n type AnyDb = AnyECDb | SQLiteDb;\r\n\r\n /** A string that identifies a Txn. */\r\n type TxnIdString = string;\r\n\r\n interface NativeCrashReportingConfig {\r\n /** The directory to which *.dmp and/or iModelJsNativeCrash*.properties.txt files are written. */\r\n crashDir: string;\r\n /** Write .dmp files to crashDir? The default is false. Even if writeDumpsToCrashDir is false, the iModelJsNativeCrash*.properties.txt file will be written to crashDir. */\r\n enableCrashDumps?: boolean;\r\n /** max # .dmp files that may exist in crashDir */\r\n maxDumpsInDir?: number;\r\n /** If writeDumpsToCrashDir is true, do you want a full-memory dump? Defaults to false. */\r\n wantFullMemory?: boolean;\r\n /** Additional name, value pairs to add as meta data to a crash report. */\r\n params?: NameValuePair[];\r\n }\r\n\r\n const version: string;\r\n let logger: Logger;\r\n function setUseTileCache(useTileCache: boolean): void;\r\n function getTileVersionInfo(): TileVersionInfo;\r\n function setCrashReporting(cfg: NativeCrashReportingConfig): void;\r\n function setCrashReportProperty(name: string, value: string | undefined): void;\r\n function getCrashReportProperties(): NameValuePair[];\r\n function storeObjectInVault(obj: any, id: string): void;\r\n function getObjectFromVault(id: string): any;\r\n function dropObjectFromVault(id: string): void;\r\n function addReferenceToObjectInVault(id: string): void;\r\n function getObjectRefCountFromVault(id: string): number;\r\n function clearLogLevelCache(): void;\r\n function addGcsWorkspace(fileName: LocalFileName): boolean;\r\n function runDaemonCommand(command: string, args: any): any;\r\n function queryConcurrency(pool: \"io\" | \"cpu\"): number;\r\n\r\n /** The return type of synchronous functions that may return an error or a successful result. */\r\n type ErrorStatusOrResult<ErrorCodeType, ResultType> = {\r\n /** Error from the operation. This property is defined if and only if the operation failed. */\r\n error: StatusCodeWithMessage<ErrorCodeType>;\r\n result?: never;\r\n } | {\r\n error?:never\r\n /** Result of the operation. This property is defined if the operation completed successfully */\r\n result: ResultType;\r\n }\r\n\r\n namespace ConcurrentQuery {\r\n /**\r\n * note: the any type in following with replace with actual type once common package is published with changes.\r\n * @internal\r\n */\r\n type OnResponse = (response: DbResponse)=>void;\r\n /** Configuration for concurrent query manager\r\n * @internal\r\n */\r\n }\r\n interface IConcurrentQueryManager {\r\n concurrentQueryExecute(request: DbRequest, onResponse: ConcurrentQuery.OnResponse):void;\r\n }\r\n interface TileContent {\r\n content: Uint8Array;\r\n elapsedSeconds: number;\r\n }\r\n /** Represents the current state of a pollable tile content request.\r\n * Note: lack of a \"completed\" state because polling a completed request returns the content as a Uint8Array.\r\n * @internal\r\n */\r\n const enum TileContentState {\r\n New = 0, // Request was just created and enqueued.\r\n Pending = 1, // Request is enqueued but not yet being processed.\r\n Loading = 2, // Request is being actively processed.\r\n }\r\n\r\n /** Result of generateElementGraphics conveying graphics as Uint8Array.\r\n * @internal\r\n */\r\n export interface ElementGraphicsContent {\r\n status: ElementGraphicsStatus.Success;\r\n content: Uint8Array;\r\n }\r\n\r\n /** Result of generateElementGraphics that produced no graphics.\r\n * @internal\r\n */\r\n export interface ElementGraphicsError {\r\n status: Exclude<ElementGraphicsStatus, ElementGraphicsStatus.Success>;\r\n }\r\n\r\n /** The result of generateElementGraphics.\r\n * @note generateElementGraphics produces a Promise<ElementGraphicsResult>. It only ever rejects if some unforeseen error like \"iModel not open\" or \"type error\" occurs.\r\n * @internal\r\n */\r\n export type ElementGraphicsResult = ElementGraphicsContent | ElementGraphicsError;\r\n\r\n /** Information returned by DgnDb.queryDefinitionElementUsage. */\r\n interface DefinitionElementUsageInfo {\r\n /** The subset of input Ids that are SpatialCategory definitions. */\r\n spatialCategoryIds?: Id64String[];\r\n /** The subset of input Ids that are DrawingCategory definitions. */\r\n drawingCategoryIds?: Id64String[];\r\n /** The subset of input Ids that are SubCategory definitions. */\r\n subCategoryIds?: Id64String[];\r\n /** The subset of input Ids that are CategorySelectors. */\r\n categorySelectorIds?: Id64String[];\r\n /** The subset of input Ids that are ModelSelectors. */\r\n modelSelectorIds?: Id64String[];\r\n /** The subset of input Ids that are DisplayStyles. */\r\n displayStyleIds?: Id64String[];\r\n /** The subset of input Ids that are ViewDefinitions. */\r\n viewDefinitionIds?: Id64String[];\r\n /** The subset of input Ids that are GeometryParts. */\r\n geometryPartIds?: Id64String[];\r\n /** The subset of input Ids that are RenderMaterials. */\r\n renderMaterialIds?: Id64String[];\r\n /** The subset of input Ids that are LineStyles. */\r\n lineStyleIds?: Id64String[];\r\n /** The subset of input Ids that are Textures. */\r\n textureIds?: Id64String[];\r\n /** Ids of *other* input DefinitionElements that were not checked for usage. */\r\n otherDefinitionElementIds?: Id64String[];\r\n /** Ids of input DefinitionElements where usage was detected. */\r\n usedIds?: Id64String[];\r\n }\r\n\r\n /** The options for how conflicts are to be handled during change-merging in an OptimisticConcurrencyControlPolicy.\r\n * The scenario is that the caller has made some changes to the *local* briefcase. Now, the caller is attempting to\r\n * merge in changes from iModelHub. The properties of this policy specify how to handle the *incoming* changes from iModelHub.\r\n */\r\n interface BriefcaseManagerOnConflictPolicy {\r\n /** What to do with the incoming change in the case where the same entity was updated locally and also would be updated by the incoming change. */\r\n updateVsUpdate: number;\r\n /** What to do with the incoming change in the case where an entity was updated locally and would be deleted by the incoming change. */\r\n updateVsDelete: number;\r\n /** What to do with the incoming change in the case where an entity was deleted locally and would be updated by the incoming change. */\r\n deleteVsUpdate: number;\r\n }\r\n\r\n /**\r\n * Represents all of the valid EC Specification Versions.\r\n */\r\n const enum ECVersion {\r\n V2_0 = (0x02 << 16),\r\n V3_1 = (0x03 << 16 | 0x01),\r\n V3_2 = (0x03 << 16 | 0x02),\r\n Latest = V3_2,\r\n }\r\n\r\n interface ChangesetFileProps {\r\n index: number;\r\n id: string;\r\n parentId: string;\r\n changesType: number;\r\n description: string;\r\n briefcaseId: number;\r\n pushDate: string;\r\n userCreated: string;\r\n size?: number;\r\n pathname: string;\r\n }\r\n\r\n interface EmbeddedFileProps {\r\n name: string,\r\n localFileName: string,\r\n }\r\n\r\n interface EmbedFileArg extends EmbeddedFileProps {\r\n date: number,\r\n fileExt?: string,\r\n compress?: boolean;\r\n }\r\n\r\n interface EmbedFileQuery {\r\n size: number,\r\n date: number,\r\n fileExt: string\r\n }\r\n\r\n interface SQLiteOps {\r\n embedFile(arg: EmbedFileArg): void;\r\n extractEmbeddedFile(arg: EmbeddedFileProps): void;\r\n getFilePath(): string;\r\n isOpen(): boolean;\r\n isReadonly(): boolean;\r\n queryEmbeddedFile(name: string): EmbedFileQuery | undefined;\r\n queryFileProperty(props: FilePropertyProps, wantString: boolean): string | Uint8Array | undefined;\r\n queryNextAvailableFileProperty(props: FilePropertyProps): number;\r\n removeEmbeddedFile(name: string): void;\r\n replaceEmbeddedFile(arg: EmbedFileArg): void;\r\n saveChanges(): void;\r\n saveFileProperty(props: FilePropertyProps, strValue: string | undefined, blobVal: Uint8Array | undefined): void;\r\n }\r\n\r\n /** The native object for a Briefcase. */\r\n class DgnDb implements IConcurrentQueryManager, SQLiteOps {\r\n constructor();\r\n public abandonChanges(): DbResult;\r\n public abandonCreateChangeset(): void;\r\n public addChildPropagatesChangesToParentRelationship(schemaName: string, relClassName: string): BentleyStatus;\r\n public applyChangeset(changeSet: ChangesetFileProps): void;\r\n public attachChangeCache(changeCachePath: string): DbResult;\r\n public beginMultiTxnOperation(): DbResult;\r\n public beginPurgeOperation(): IModelStatus;\r\n public cancelElementGraphicsRequests(requestIds: string[]): void;\r\n public cancelTileContentRequests(treeId: string, contentIds: string[]): void;\r\n public cancelTo(txnId: TxnIdString): IModelStatus;\r\n public classIdToName(idString: string): string;\r\n public classNameToId(className: string): Id64String;\r\n public closeIModel(): void;\r\n public completeCreateChangeset(arg: { index: number }): void;\r\n public computeProjectExtents(wantFullExtents: boolean, wantOutlierIds: boolean): { extents: Range3dProps, fullExtents?: Range3dProps, outliers?: Id64Array };\r\n public concurrentQueryExecute(request: any, onResponse: ConcurrentQuery.OnResponse):void;\r\n public createBRepGeometry(createProps: any/* BRepGeometryCreate */): DbResult;\r\n public createChangeCache(changeCacheFile: ECDb, changeCachePath: string): DbResult;\r\n public createClassViewsInDb(): BentleyStatus;\r\n public createIModel(fileName: string, props: CreateEmptyStandaloneIModelProps): void;\r\n public deleteAllTxns(): void;\r\n public deleteElement(elemIdJson: string): void;\r\n public deleteElementAspect(aspectIdJson: string): void;\r\n public deleteLinkTableRelationship(props: RelationshipProps): DbResult;\r\n public deleteLocalValue(name: string): void;\r\n public deleteModel(modelIdJson: string): void;\r\n public detachChangeCache(): number;\r\n public dropSchema(schemaName: string): void;\r\n public dumpChangeset(changeSet: ChangesetFileProps): void;\r\n public elementGeometryCacheOperation(requestProps: any/* ElementGeometryCacheOperationRequestProps */): BentleyStatus;\r\n public embedFile(arg: EmbedFileArg): void;\r\n public embedFont(fontProps: FontProps): FontProps;\r\n public enableChangesetSizeStats(enabled: boolean): DbResult;\r\n public enableTxnTesting(): void;\r\n public endMultiTxnOperation(): DbResult;\r\n public endPurgeOperation(): IModelStatus;\r\n public executeTest(testName: string, params: string): string;\r\n public exportGraphics(exportProps: any/* ExportGraphicsProps */): DbResult;\r\n public exportPartGraphics(exportProps: any/* ExportPartGraphicsProps */): DbResult;\r\n public exportSchema(schemaName: string, exportDirectory: string): SchemaWriteStatus;\r\n public exportSchemas(exportDirectory: string): SchemaWriteStatus;\r\n public extractChangedInstanceIdsFromChangeSet(changeSetFileName: string): ErrorStatusOrResult<IModelStatus, string>; // see ChangedInstanceIdsProps\r\n public extractChangeSummary(changeCacheFile: ECDb, changesetFilePath: string): ErrorStatusOrResult<DbResult, string>;\r\n public extractEmbeddedFile(arg: EmbeddedFileProps): void;\r\n public findGeometryPartReferences(partIds: Id64String[], is2d: boolean): Id64String[];\r\n public generateElementGraphics(request: ElementGraphicsRequestProps): Promise<ElementGraphicsResult>;\r\n public getBriefcaseId(): number;\r\n public getChangesetSize(): number;\r\n public getChangeTrackingMemoryUsed(): number;\r\n public getCurrentChangeset(): ChangesetIndexAndId;\r\n public getCurrentTxnId(): TxnIdString;\r\n public getECClassMetaData(schema: string, className: string): ErrorStatusOrResult<IModelStatus, string>;\r\n public getElement(opts: ElementLoadProps): ElementProps;\r\n public getFilePath(): string; // full path of the DgnDb file\r\n public getGeoCoordinatesFromIModelCoordinates(points: GeoCoordinatesRequestProps): GeoCoordinatesResponseProps;\r\n public getGeometryContainment(props: object): Promise<GeometryContainmentResponseProps>;\r\n public getIModelCoordinatesFromGeoCoordinates(points: IModelCoordinatesRequestProps): IModelCoordinatesResponseProps;\r\n public getIModelId(): GuidString;\r\n public getIModelProps(): IModelProps;\r\n public getITwinId(): GuidString;\r\n public getMassProperties(props: object): Promise<MassPropertiesResponseProps>;\r\n public getModel(opts: ModelLoadProps): ModelProps;\r\n public getMultiTxnOperationDepth(): number;\r\n public getRedoString(): string;\r\n public getSchema(name: string): ErrorStatusOrResult<IModelStatus, string>;\r\n public getSchemaItem(schemaName: string, itemName: string): ErrorStatusOrResult<IModelStatus, string>;\r\n public getTempFileBaseName(): string;\r\n public getTileContent(treeId: string, tileId: string, callback: (result: ErrorStatusOrResult<IModelStatus, Uint8Array>) => void): void;\r\n public getTileTree(id: string, callback: (result: ErrorStatusOrResult<IModelStatus, any>) => void): void;\r\n public getTxnDescription(txnId: TxnIdString): string;\r\n public getUndoString(): string;\r\n public hasFatalTxnError(): boolean;\r\n public hasPendingTxns(): boolean;\r\n public hasUnsavedChanges(): boolean;\r\n public importFunctionalSchema(): DbResult;\r\n public importSchemas(schemaFileNames: string[]): DbResult;\r\n public importXmlSchemas(serializedXmlSchemas: string[]): DbResult;\r\n public inBulkOperation(): boolean;\r\n public insertCodeSpec(name: string, jsonProperties:{spec: any, scopeSpec: any}): Id64String;\r\n public insertElement(elemProps: ElementProps, options?: { forceUseId: boolean }): Id64String;\r\n public insertElementAspect(aspectProps: ElementAspectProps): void;\r\n public insertLinkTableRelationship(props: RelationshipProps): Id64String;\r\n public insertModel(modelProps: ModelProps): Id64String;\r\n public isChangeCacheAttached(): boolean;\r\n public isEncrypted(): boolean;\r\n public isGeometricModelTrackingSupported(): boolean;\r\n public isIndirectChanges(): boolean;\r\n public isLinkTableRelationship(classFullName: string): boolean | undefined;\r\n public isOpen(): boolean;\r\n public isProfilerPaused(): boolean;\r\n public isProfilerRunning(): boolean;\r\n public isReadonly(): boolean;\r\n public isRedoPossible(): boolean;\r\n public isTxnIdValid(txnId: TxnIdString): boolean;\r\n public isUndoPossible(): boolean;\r\n public logTxnError(fatal: boolean): void;\r\n public openIModel(dbName: string, mode: OpenMode, upgradeOptions?: UpgradeOptions, props?: SnapshotOpenOptions): void;\r\n public pauseProfiler(): DbResult;\r\n public pollTileContent(treeId: string, tileId: string): ErrorStatusOrResult<IModelStatus, TileContentState | TileContent>;\r\n public processGeometryStream(requestProps: any/* ElementGeometryOptions */): DbResult;\r\n public purgeTileTrees(modelIds: Id64Array | undefined): void;\r\n public queryDefinitionElementUsage(definitionElementIds: Id64Array): DefinitionElementUsageInfo | undefined;\r\n public queryEmbeddedFile(name: string): EmbedFileQuery | undefined;\r\n public queryFileProperty(props: FilePropertyProps, wantString: boolean): string | Uint8Array | undefined;\r\n public queryFirstTxnId(): TxnIdString;\r\n public queryLocalValue(name: string): string | undefined;\r\n public queryModelExtents(options: {id: Id64String}): { modelExtents: Range3dProps };\r\n public queryNextAvailableFileProperty(props: FilePropertyProps): number;\r\n public queryNextTxnId(txnId: TxnIdString): TxnIdString;\r\n public queryPreviousTxnId(txnId: TxnIdString): TxnIdString;\r\n public queryTextureData(opts: TextureLoadProps): Promise<TextureData | undefined>;\r\n public readFontMap(): FontMapProps;\r\n public reinstateTxn(): IModelStatus;\r\n public removeEmbeddedFile( name: string): void;\r\n public replaceEmbeddedFile(arg: EmbedFileArg): void;\r\n public resetBriefcaseId(idValue: number): void;\r\n public restartTxnSession(): void;\r\n public resumeProfiler(): DbResult;\r\n public reverseAll(): IModelStatus;\r\n public reverseTo(txnId: TxnIdString): IModelStatus;\r\n public reverseTxns(numOperations: number): IModelStatus;\r\n public saveChanges(description?: string): DbResult;\r\n public saveFileProperty(props: FilePropertyProps, strValue: string | undefined, blobVal: Uint8Array | undefined): void;\r\n public saveLocalValue(name: string, value: string | undefined): void;\r\n public schemaToXmlString(schemaName: string, version?: ECVersion): string | undefined;\r\n public setBriefcaseManagerOptimisticConcurrencyControlPolicy(conflictPolicy: BriefcaseManagerOnConflictPolicy): RepositoryStatus;\r\n public setBriefcaseManagerPessimisticConcurrencyControlPolicy(): RepositoryStatus;\r\n public setGeometricModelTrackingEnabled(enabled: boolean): ErrorStatusOrResult<IModelStatus, boolean>;\r\n public setIModelDb(iModelDb?: any/* IModelDb */): void;\r\n public setIModelId(guid: GuidString): DbResult;\r\n public setITwinId(guid: GuidString): DbResult;\r\n public simplifyElementGeometry(simplifyArgs: any): DbResult;\r\n public startCreateChangeset(): ChangesetFileProps;\r\n public startProfiler(scopeName?: string, scenarioName?: string, overrideFile?: boolean, computeExecutionPlan?: boolean): DbResult;\r\n public stopProfiler(): { rc: DbResult, elapsedTime?: number, scopeId?: number, fileName?: string };\r\n public updateElement(elemProps: ElementProps): void;\r\n public updateElementAspect(aspectProps: ElementAspectProps): void;\r\n public updateElementGeometryCache(props: object): Promise<any>;\r\n public updateGeometryStream(updateProps: any/* UpdateGeometryOptions */): DbResult;\r\n public updateIModelProps(props: IModelProps): void;\r\n public updateLinkTableRelationship(props: RelationshipProps): DbResult;\r\n public updateModel(modelProps: ModelProps): void;\r\n public updateModelGeometryGuid(modelId: Id64String): IModelStatus;\r\n public updateProjectExtents(newExtentsJson: string): void;\r\n public uploadDaemonBlobs(): DbResult;\r\n public writeAffectedElementDependencyGraphToFile(dotFileName: string, changedElems:Id64Array): BentleyStatus;\r\n public writeFullElementDependencyGraphToFile(dotFileName: string): BentleyStatus;\r\n\r\n public static enableSharedCache(enable: boolean): DbResult;\r\n public static encryptDb(dbFileName: string, encryptionProps: IModelEncryptionProps): void;\r\n public static flushLog():void;\r\n public static getAssetsDir(): string;\r\n public static vacuum(dbName: string, pageSize?: number): void;\r\n }\r\n\r\n /** The native object for GeoServices. */\r\n class GeoServices {\r\n constructor();\r\n public static getGeographicCRSInterpretation(props: GeographicCRSInterpretRequestProps): GeographicCRSInterpretResponseProps;\r\n\r\n }\r\n\r\n /**\r\n * RevisionUtility help with debugging and testing\r\n * @internal\r\n */\r\n class RevisionUtility {\r\n constructor();\r\n public static assembleRevision(targetFile: string, rawChangesetFile: string, prefixFile?: string, lzmaPropsJson?: string): BentleyStatus;\r\n public static computeStatistics(sourceFile: string, addPrefix: boolean): string;\r\n public static disassembleRevision(sourceFile: string, targetDir: string): BentleyStatus;\r\n public static dumpChangesetToDb(sourceFile: string, dbFile: string, includeCols: boolean): BentleyStatus;\r\n public static getUncompressSize(sourceFile: string): string;\r\n public static normalizeLzmaParams(lzmaPropsJson?: string): string;\r\n public static recompressRevision(sourceFile: string, targetFile: string, lzmaPropsJson?: string): BentleyStatus;\r\n }\r\n\r\n class ECDb implements IDisposable, IConcurrentQueryManager {\r\n constructor();\r\n public abandonChanges(): DbResult;\r\n public closeDb(): void;\r\n public createDb(dbName: string): DbResult;\r\n public dispose(): void;\r\n public dropSchema(schemaName: string): void;\r\n public getFilePath(): string;\r\n public importSchema(schemaPathName: string): DbResult;\r\n public isOpen(): boolean;\r\n public openDb(dbName: string, mode: OpenMode, upgradeProfiles?: boolean): DbResult;\r\n public saveChanges(changesetName?: string): DbResult;\r\n public static enableSharedCache(enable: boolean): DbResult;\r\n public concurrentQueryExecute(request: any, onResponse: ConcurrentQuery.OnResponse):void;\r\n }\r\n\r\n class ChangedElementsECDb implements IDisposable {\r\n constructor();\r\n public dispose(): void;\r\n public createDb(db: DgnDb, dbName: string): DbResult;\r\n public openDb(dbName: string, mode: OpenMode, upgradeProfiles?: boolean): DbResult;\r\n public isOpen(): boolean;\r\n public closeDb(): void;\r\n public processChangesets(db: DgnDb, changesets: ChangesetFileProps[], rulesetId: string, filterSpatial?: boolean, wantParents?: boolean, wantPropertyChecksums?: boolean, rulesetDir?: string, tempDir?: string): DbResult;\r\n public processChangesetsAndRoll(dbFilename: string, dbGuid: string, changesets: ChangesetFileProps[], rulesetId: string, filterSpatial?: boolean, wantParents?: boolean, wantPropertyChecksums?: boolean, rulesetDir?: string, tempDir?: string, wantRelationshipCaching?: boolean, relationshipCacheSize?: number): DbResult;\r\n public getChangedElements(startChangesetId: string, endChangesetId: string): ErrorStatusOrResult<IModelStatus, any>;\r\n public isProcessed(changesetId: string): boolean;\r\n public cleanCaches(): void;\r\n }\r\n\r\n class ECSqlStatement implements IDisposable {\r\n constructor();\r\n public clearBindings(): DbResult;\r\n public dispose(): void;\r\n public getBinder(param: number | string): ECSqlBinder;\r\n public getColumnCount(): number;\r\n public getValue(columnIndex: number): ECSqlValue;\r\n public prepare(db: AnyECDb, ecsql: string, logErrors?: boolean): StatusCodeWithMessage<DbResult>;\r\n public reset(): DbResult;\r\n public step(): DbResult;\r\n public stepAsync(callback: (result: DbResult) => void): void;\r\n public stepForInsert(): { status: DbResult, id: string };\r\n public stepForInsertAsync(callback: (result: { status: DbResult, id: string }) => void): void;\r\n public getNativeSql(): string;\r\n }\r\n\r\n class ECSqlBinder {\r\n constructor();\r\n public addArrayElement(): ECSqlBinder;\r\n public bindBlob(base64String: string | Uint8Array | ArrayBuffer | SharedArrayBuffer): DbResult;\r\n public bindBoolean(val: boolean): DbResult;\r\n public bindDateTime(isoString: string): DbResult;\r\n public bindDouble(val: number): DbResult;\r\n public bindGuid(guidStr: GuidString): DbResult;\r\n public bindId(hexStr: Id64String): DbResult;\r\n public bindIdSet(hexVector: Id64String[]): DbResult;\r\n public bindInteger(val: number | string): DbResult;\r\n public bindMember(memberName: string): ECSqlBinder;\r\n public bindNavigation(navIdHexStr: Id64String, relClassName?: string, relClassTableSpace?: string): DbResult;\r\n public bindNull(): DbResult;\r\n public bindPoint2d(x: number, y: number): DbResult;\r\n public bindPoint3d(x: number, y: number, z: number): DbResult;\r\n public bindString(val: string): DbResult;\r\n }\r\n\r\n class ECSqlColumnInfo {\r\n constructor();\r\n public getAccessString(): string;\r\n public getPropertyName(): string;\r\n public getRootClassAlias(): string;\r\n public getRootClassName(): string;\r\n public getRootClassTableSpace(): string;\r\n public getType(): number;\r\n public isEnum(): boolean;\r\n public isGeneratedProperty(): boolean;\r\n public isSystemProperty(): boolean;\r\n }\r\n\r\n class ECSqlValue {\r\n constructor();\r\n public getArrayIterator(): ECSqlValueIterator;\r\n public getBlob(): Uint8Array;\r\n public getBoolean(): boolean;\r\n public getClassNameForClassId(): string;\r\n public getColumnInfo(): ECSqlColumnInfo;\r\n public getDateTime(): string;\r\n public getDouble(): number;\r\n public getEnum(): Array<{ schema: string, name: string, key: string, value: number | string }> | undefined;\r\n public getGeometry(): string;\r\n public getGuid(): GuidString;\r\n public getId(): Id64String;\r\n public getInt(): number;\r\n public getInt64(): number;\r\n public getNavigation(): { id: Id64String, relClassName?: string };\r\n public getPoint2d(): { x: number, y: number };\r\n public getPoint3d(): { x: number, y: number, z: number };\r\n public getString(): string;\r\n public getStructIterator(): ECSqlValueIterator;\r\n public isNull(): boolean;\r\n }\r\n\r\n class ECSqlValueIterator {\r\n constructor();\r\n public getCurrent(): ECSqlValue;\r\n public moveNext(): boolean;\r\n }\r\n\r\n class SQLiteDb implements SQLiteOps, IDisposable {\r\n constructor();\r\n public abandonChanges(): void;\r\n public closeDb(): void;\r\n public createDb(dbName: string): void;\r\n public dispose(): void;\r\n public embedFile(arg: EmbedFileArg): void;\r\n public extractEmbeddedFile(arg: EmbeddedFileProps): void;\r\n public flushCloudUpload(): DbResult;\r\n public getFilePath(): string;\r\n public isOpen(): boolean;\r\n public isReadonly(): boolean;\r\n public openDb(dbName: string, mode: OpenMode): void;\r\n public queryEmbeddedFile(name: string): EmbedFileQuery | undefined;\r\n public queryFileProperty(props: FilePropertyProps, wantString: boolean): string | Uint8Array | undefined;\r\n public queryNextAvailableFileProperty(props: FilePropertyProps): number;\r\n public removeEmbeddedFile( name: string): void;\r\n public replaceEmbeddedFile(arg: EmbedFileArg): void;\r\n public saveChanges(): void;\r\n public saveFileProperty(props: FilePropertyProps, strValue: string | undefined, blobVal: Uint8Array | undefined): void;\r\n }\r\n\r\n class SqliteStatement implements IDisposable {\r\n constructor();\r\n public bindBlob(param: number | string, val: Uint8Array | ArrayBuffer | SharedArrayBuffer): DbResult;\r\n public bindDouble(param: number | string, val: number): DbResult;\r\n public bindGuid(param: number | string, guidStr: GuidString): DbResult;\r\n public bindId(param: number | string, hexStr: Id64String): DbResult;\r\n public bindInteger(param: number | string, val: number | string): DbResult;\r\n public bindNull(param: number | string): DbResult;\r\n public bindString(param: number | string, val: string): DbResult;\r\n public clearBindings(): DbResult;\r\n public dispose(): void;\r\n public getColumnCount(): number;\r\n public getColumnName(columnIndex: number): string;\r\n public getColumnType(columnIndex: number): number;\r\n public getValueBlob(columnIndex: number): Uint8Array;\r\n public getValueDouble(columnIndex: number): number;\r\n public getValueGuid(columnIndex: number): GuidString;\r\n public getValueId(columnIndex: number): Id64String;\r\n public getValueInteger(columnIndex: number): number;\r\n public getValueString(columnIndex: number): string;\r\n public isReadonly(): boolean;\r\n public isValueNull(columnIndex: number): boolean;\r\n public prepare(db: AnyDb, sql: string, logErrors?: boolean): void;\r\n public reset(): DbResult;\r\n public step(): DbResult;\r\n public stepAsync(callback: (result: DbResult) => void): void;\r\n }\r\n\r\n /** Incremental IO for blobs */\r\n class BlobIO {\r\n constructor();\r\n /** Close this BlobIO if it is opened.\r\n * @note this BlobIO *may* be reused after this call by calling `open` again.\r\n */\r\n public close(): void;\r\n /** get the total number of bytes in the blob */\r\n public getNumBytes(): number;\r\n /** @return true if this BlobIO was successfully opened and may be use to read or write the blob */\r\n public isValid(): boolean;\r\n /** Open this BlobIO against a table/row/column in a Db */\r\n public open(\r\n /** The database for the blob */\r\n db: AnyDb,\r\n args: {\r\n /** the name of the table for the blob*/\r\n tableName: string,\r\n /** the name of the column for the blob */\r\n columnName: string,\r\n /** The rowId of the blob */\r\n row: number,\r\n /** If true, open this BlobIO for write access */\r\n writeable?: boolean\r\n }): void;\r\n /** Read from a blob\r\n * @returns the contents of the requested byte range\r\n */\r\n public read(args: {\r\n /** The number of bytes to read */\r\n numBytes: number;\r\n /** starting offset within the blob to read */\r\n offset: number;\r\n /** If present and of sufficient size, use this ArrayBuffer for the value. */\r\n blob?: ArrayBuffer; }): Uint8Array;\r\n /** Reposition this BlobIO to a new rowId\r\n * @note this BlobIO must be valid when this methods is called.\r\n */\r\n public changeRow(row: number): void;\r\n /** Write to a blob */\r\n public write(args: {\r\n /** The number of bytes to write */\r\n numBytes: number;\r\n /** starting offset within the blob to write */\r\n offset: number;\r\n /** the value to write */\r\n blob: ArrayBuffer; }): void;\r\n }\r\n\r\n const enum ECPresentationStatus {\r\n Success = 0,\r\n Canceled = 1,\r\n Pending = 2,\r\n Error = 0x10000,\r\n InvalidArgument = Error + 1,\r\n }\r\n\r\n const enum ECPresentationManagerMode {\r\n ReadOnly = \"ro\",\r\n ReadWrite = \"rw\",\r\n }\r\n\r\n interface ECPresentationMemoryHierarchyCacheConfig {\r\n mode: \"memory\";\r\n }\r\n\r\n interface ECPresentationDiskHierarchyCacheConfig {\r\n mode: \"disk\";\r\n directory: string;\r\n }\r\n\r\n interface ECPresentationHybridHierarchyCacheConfig {\r\n mode: \"hybrid\";\r\n disk?: ECPresentationDiskHierarchyCacheConfig;\r\n }\r\n\r\n type ECPresentationHierarchyCacheConfig = ECPresentationMemoryHierarchyCacheConfig | ECPresentationDiskHierarchyCacheConfig | ECPresentationHybridHierarchyCacheConfig;\r\n\r\n type ECPresentationManagerResponse<TResult> = ErrorStatusOrResult<ECPresentationStatus, TResult> & {\r\n diagnostics?: any;\r\n }\r\n\r\n interface ECPresentationManagerProps {\r\n id: string;\r\n localeDirectories: string[];\r\n taskAllocationsMap: { [priority: number]: number };\r\n defaultFormats: {\r\n [phenomenon: string]: {\r\n unitSystems: string[];\r\n serializedFormat: string;\r\n };\r\n };\r\n mode: ECPresentationManagerMode;\r\n isChangeTrackingEnabled: boolean;\r\n cacheConfig: ECPresentationHierarchyCacheConfig;\r\n useMmap?: boolean | number;\r\n }\r\n\r\n class ECPresentationManager implements IDisposable {\r\n constructor(props: ECPresentationManagerProps);\r\n public forceLoadSchemas(db: DgnDb): Promise<ECPresentationManagerResponse<void>>;\r\n public setupRulesetDirectories(directories: string[]): ECPresentationManagerResponse<void>;\r\n public setupSupplementalRulesetDirectories(directories: string[]): ECPresentationManagerResponse<void>;\r\n public setRulesetVariableValue(rulesetId: string, variableId: string, type: string, value: any): ECPresentationManagerResponse<void>;\r\n public unsetRulesetVariableValue(rulesetId: string, variableId: string): ECPresentationManagerResponse<void>;\r\n public getRulesetVariableValue(rulesetId: string, variableId: string, type: string): ECPresentationManagerResponse<any>;\r\n public getRulesets(rulesetId: string): ECPresentationManagerResponse<string>;\r\n public addRuleset(serializedRuleset: string): ECPresentationManagerResponse<string>;\r\n public removeRuleset(rulesetId: string, hash: string): ECPresentationManagerResponse<boolean>;\r\n public clearRulesets(): ECPresentationManagerResponse<void>;\r\n public queueRequest(db: DgnDb, options: string): ECPresentationManagerResponse<string>;\r\n public pollResponse(requestGuid: string): ECPresentationManagerResponse<string>;\r\n public getUpdateInfo(): ECPresentationManagerResponse<any>;\r\n public updateHierarchyState(db: DgnDb, rulesetId: string, changeType: \"nodesExpanded\" | \"nodesCollapsed\", serializedKeys: string): ECPresentationManagerResponse<void>;\r\n public dispose(): void;\r\n }\r\n\r\n namespace ECSchemaXmlContext {\r\n interface SchemaKey {\r\n name: string;\r\n readVersion: number;\r\n writeVersion: number;\r\n minorVersion: number;\r\n }\r\n\r\n const enum SchemaMatchType {\r\n Identical = 0, // Find exact VersionRead, VersionWrite, VersionMinor match as well as Data\r\n Exact = 1, // Find exact VersionRead, VersionWrite, VersionMinor match.\r\n LatestWriteCompatible = 2, // Find latest version with matching VersionRead and VersionWrite\r\n Latest = 3, // Find latest version.\r\n LatestReadCompatible = 4, // Find latest version with matching VersionRead\r\n }\r\n\r\n type SchemaLocaterCallback = (key: SchemaKey, matchType: SchemaMatchType) => string | undefined | void;\r\n }\r\n\r\n class ECSchemaXmlContext {\r\n constructor();\r\n public addSchemaPath(path: string): void;\r\n public setSchemaLocater(locater: ECSchemaXmlContext.SchemaLocaterCallback): void;\r\n public setFirstSchemaLocater(locater: ECSchemaXmlContext.SchemaLocaterCallback): void;\r\n public readSchemaFromXmlFile(filePath: string): ErrorStatusOrResult<BentleyStatus, string>;\r\n }\r\n\r\n class SnapRequest {\r\n constructor();\r\n public doSnap(db: DgnDb, request: any): Promise<any>;\r\n public cancelSnap(): void;\r\n }\r\n\r\n class CloudDbTransfer {\r\n constructor(dir: CloudSqlite.TransferDirection, args: CloudSqlite.TransferDbProps);\r\n public cancelTransfer(): void;\r\n public getProgress(): { loaded: number, total: number };\r\n public promise: Promise<void>;\r\n }\r\n\r\n interface FeatureUserDataKeyValuePair {\r\n key: string;\r\n value: string;\r\n }\r\n\r\n interface NativeUlasClientFeatureEvent {\r\n featureId: string;\r\n versionStr: string;\r\n projectId?: string;\r\n startDateZ?: string;\r\n endDateZ?: string;\r\n featureUserData?: FeatureUserDataKeyValuePair[];\r\n }\r\n\r\n const enum DbChangeStage {\r\n Old = 0,\r\n New = 1,\r\n }\r\n\r\n const enum DbValueType {\r\n IntegerVal = 1,\r\n FloatVal = 2,\r\n TextVal = 3,\r\n BlobVal = 4,\r\n NullVal = 5,\r\n }\r\n\r\n type ChangeValueType = Uint8Array | number| string | null | undefined;\r\n\r\n interface ChangedValue {\r\n new?: ChangeValueType;\r\n old?: ChangeValueType;\r\n }\r\n\r\n class ChangesetReader {\r\n close(): DbResult;\r\n getColumnCount(): number| undefined;\r\n getColumnValue(col: number, stage: DbChangeStage): ChangeValueType;\r\n getColumnValueType(col: number, stage: DbChangeStage): DbValueType | undefined;\r\n getFileName(): string | undefined;\r\n getOpCode(): DbOpcode | undefined;\r\n getRow(): ChangedValue[] | undefined;\r\n getDdlChanges(): string | undefined;\r\n getTableName(): string | undefined;\r\n isIndirectChange(): boolean | undefined;\r\n isPrimaryKeyColumn(col: number): boolean | undefined;\r\n open(fileName: string, invert: boolean): DbResult;\r\n reset(): DbResult;\r\n step(): DbResult;\r\n }\r\n\r\n class DisableNativeAssertions implements IDisposable {\r\n constructor();\r\n public dispose(): void;\r\n }\r\n\r\n class ImportContext implements IDisposable {\r\n constructor(sourceDb: DgnDb, targetDb: DgnDb);\r\n public dispose(): void;\r\n public dump(outputFileName: string): BentleyStatus;\r\n public addClass(sourceClassFullName: string, targetClassFullName: string): BentleyStatus;\r\n public addCodeSpecId(sourceId: Id64String, targetId: Id64String): BentleyStatus;\r\n public addElementId(sourceId: Id64String, targetId: Id64String): BentleyStatus;\r\n public removeElementId(sourceId: Id64String): BentleyStatus;\r\n public findCodeSpecId(sourceId: Id64String): Id64String;\r\n public findElementId(sourceId: Id64String): Id64String;\r\n public cloneElement(sourceId: Id64String, cloneOptions?: CloneElementOptions): ElementProps;\r\n public importCodeSpec(sourceId: Id64String): Id64String;\r\n public importFont(sourceId: number): number;\r\n public hasSubCategoryFilter(): boolean;\r\n public isSubCategoryFiltered(sourceId: Id64String): boolean;\r\n public filterSubCategoryId(sourceId: Id64String): BentleyStatus;\r\n }\r\n\r\n interface CloneElementOptions {\r\n binaryGeometry?: boolean;\r\n }\r\n\r\n interface ChangedInstanceOpsProps {\r\n insert?: Id64String[];\r\n update?: Id64String[];\r\n delete?: Id64String[];\r\n }\r\n\r\n /** The *wire format* of the result returned by DgnDb.extractChangedInstanceIdsFromChangeSet */\r\n interface ChangedInstanceIdsProps {\r\n codeSpec?: ChangedInstanceOpsProps;\r\n model?: ChangedInstanceOpsProps;\r\n element?: ChangedInstanceOpsProps;\r\n aspect?: ChangedInstanceOpsProps;\r\n relationship?: ChangedInstanceOpsProps;\r\n font?: ChangedInstanceOpsProps;\r\n }\r\n\r\n /**\r\n * Temporary implementation to allow crashing the backend for testing purposes\r\n * @internal\r\n */\r\n class NativeDevTools {\r\n public static signal(signalType: number): boolean;\r\n }\r\n\r\n /**\r\n * Utilities to encode/decode names to convert them to/from names that comply with EC naming rules\r\n */\r\n class ECNameValidation {\r\n /**\r\n * Encodes names to comply with EC naming rules\r\n * @param name Name to be encoded\r\n * @returns Encoded name\r\n * @param name\r\n */\r\n public static encodeToValidName(name: string): string;\r\n\r\n /**\r\n * Decodes names that were encoded to comply with EC naming rules\r\n * @param encodedName Encoded name\r\n * @returns Decoded name\r\n */\r\n public static decodeFromValidName(encodedName: string): string;\r\n }\r\n\r\n const enum TestWorkerState {\r\n NotQueued = 0,\r\n Queued = 1,\r\n Skipped = 2,\r\n Running = 3,\r\n Ok = 4,\r\n Error = 5,\r\n Aborted = 6,\r\n }\r\n\r\n class TestWorker {\r\n public constructor(db: DgnDb);\r\n\r\n public queue(): Promise<void>;\r\n public cancel(): void;\r\n public setReady(): void;\r\n public setThrow(): void;\r\n public isCanceled(): boolean;\r\n public wasExecuted(): boolean;\r\n public getState(): TestWorkerState;\r\n }\r\n}\r\n"]}
|
package/imodeljs-native.d.ts
CHANGED
package/imodeljs-native.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imodeljs-native.d.ts","sourceRoot":"","sources":["../src/imodeljs-native.ts"],"names":[],"mappings":"AAKA,cAAc,iBAAiB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"imodeljs-native.d.ts","sourceRoot":"","sources":["../src/imodeljs-native.ts"],"names":[],"mappings":"AAKA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC"}
|
package/imodeljs-native.js
CHANGED
|
@@ -15,5 +15,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
16
16
|
*--------------------------------------------------------------------------------------------*/
|
|
17
17
|
__exportStar(require("./NativeLibrary"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./CloudSqlite"), exports);
|
|
19
19
|
//# sourceMappingURL=imodeljs-native.js.map
|
package/imodeljs-native.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imodeljs-native.js","sourceRoot":"","sources":["../src/imodeljs-native.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA;;;+FAG+F;AAC/F,kDAAgC;AAChC
|
|
1
|
+
{"version":3,"file":"imodeljs-native.js","sourceRoot":"","sources":["../src/imodeljs-native.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA;;;+FAG+F;AAC/F,kDAAgC;AAChC,gDAA8B","sourcesContent":["\r\n/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nexport * from \"./NativeLibrary\";\r\nexport * from \"./CloudSqlite\";\r\n"]}
|
package/package.json
CHANGED
package/BlobDaemon.d.ts
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module iModels
|
|
3
|
-
*/
|
|
4
|
-
/// <reference types="node" />
|
|
5
|
-
import * as child_process from "child_process";
|
|
6
|
-
import { DbResult } from "@itwin/core-bentley";
|
|
7
|
-
/** Error values for negative numbers returned by the BlobDaemon `attach` command. */
|
|
8
|
-
export declare const enum DaemonAttachError {
|
|
9
|
-
INVALID_DAEMON_DIRECTORY = -1,
|
|
10
|
-
DAEMON_NOT_ACTIVE = -2,
|
|
11
|
-
SOCKET_ERROR = -3
|
|
12
|
-
}
|
|
13
|
-
/** Possible values for `command` argument of `BlobDaemon.command` method. */
|
|
14
|
-
export declare type BlobDaemonCommand = "attach" | "detach" | "create" | "destroy" | "upload" | "download" | "delete" | "copy" | "queryManifestETag";
|
|
15
|
-
/** Properties for accessing BlockCache directory and cloud storage. */
|
|
16
|
-
export interface BlobCacheProps {
|
|
17
|
-
/** blob storage module: e.g. "azure", "google", "aws". May also include URI style parameters. */
|
|
18
|
-
storageType: string;
|
|
19
|
-
/** blob store account name. */
|
|
20
|
-
user: string;
|
|
21
|
-
/** full path of directory for daemon to store its files. Must be on fast local drive. */
|
|
22
|
-
daemonDir?: string;
|
|
23
|
-
/** block size, in megabytes used by CREATE command. Default is 4MB. */
|
|
24
|
-
blockSizeMb?: number;
|
|
25
|
-
}
|
|
26
|
-
/** Properties for creating a new instance of the BlockCache daemon process. */
|
|
27
|
-
export interface DaemonProps {
|
|
28
|
-
/** full path name of daemon.exe file. Default is to find "BeBlobDaemon.exe" in the same directory as this library. */
|
|
29
|
-
exePath?: string;
|
|
30
|
-
/** daemon connection address. Default is "127.0.0.1" */
|
|
31
|
-
addr?: string;
|
|
32
|
-
/** port number. Default 22002 */
|
|
33
|
-
portNumber?: number;
|
|
34
|
-
/** maximum cache Size. Must be a number followed by either M (for megabytes) or G (for gigabytes.) Default is 1G */
|
|
35
|
-
maxCacheSize?: string;
|
|
36
|
-
/** How often cloud storage is polled for database changes made by other daemon processes, in seconds. Default is 60. */
|
|
37
|
-
pollTime?: number;
|
|
38
|
-
/** How long an overwritten block is allowed to persist before it is permanently deleted, in seconds. Default is 3600. */
|
|
39
|
-
deleteTime?: number;
|
|
40
|
-
/** How often each daemon process scans for and deletes such garbage files, in seconds. Default is 3600. */
|
|
41
|
-
gcTime?: number;
|
|
42
|
-
/** How long after a failed checkpoint-to-upload operation the daemon process waits before retrying, in seconds. Default=10. */
|
|
43
|
-
retryTime?: number;
|
|
44
|
-
/** The maximum number of concurrent uploads (PUT requests) the daemon will make when uploading a new version of a database to cloud storage. Default=10. */
|
|
45
|
-
nWrites?: number;
|
|
46
|
-
/** The maximum number of concurrent deletes (DELETE requests) the daemon will make when uploading a new version of a database. Default=10. */
|
|
47
|
-
nDeletes?: number;
|
|
48
|
-
/** If true, unmodified cache entries are retained across runs of the daemon. Default=false. */
|
|
49
|
-
persistAcrossSessions?: boolean;
|
|
50
|
-
/** logging options */
|
|
51
|
-
log?: string;
|
|
52
|
-
/** if true, don't include timestamps in log messages */
|
|
53
|
-
noTimeStamps?: boolean;
|
|
54
|
-
/** if true, create local files only when first accessed. Default=false. */
|
|
55
|
-
lazy?: boolean;
|
|
56
|
-
/** if true, extra space for nonces is not reserved and no nonce values are used for encrypted pages. Default=false. */
|
|
57
|
-
noNonce?: boolean;
|
|
58
|
-
/** If specified, containers are automatically detached from the daemon process if there have been no connected clients for at least autodetach seconds.
|
|
59
|
-
* If set to 0, then containers are never automatically detached. Default=0.
|
|
60
|
-
*/
|
|
61
|
-
autodetach?: number;
|
|
62
|
-
/** options for spawn */
|
|
63
|
-
spawnOptions?: child_process.SpawnOptions;
|
|
64
|
-
}
|
|
65
|
-
/** The name and key for a blob container */
|
|
66
|
-
export interface BlobContainerProps {
|
|
67
|
-
/** the name of the container. */
|
|
68
|
-
container: string;
|
|
69
|
-
/** SAS key that grants access to the container. */
|
|
70
|
-
auth: string;
|
|
71
|
-
/** if true, container is attached with write permissions. */
|
|
72
|
-
writeable?: boolean;
|
|
73
|
-
/** if true, container is attached in "secure" mode (encrypts blocks in cachefile). */
|
|
74
|
-
secure?: boolean;
|
|
75
|
-
}
|
|
76
|
-
/** Properties for uploading, downloading, copying, or deleting a database, by its alias, within a BlobContainer. */
|
|
77
|
-
export interface BlobDbProps {
|
|
78
|
-
/** The alias of the database within the container */
|
|
79
|
-
dbAlias: string;
|
|
80
|
-
/** local file name. Applies only to `upload` and `download` commands. */
|
|
81
|
-
localFile?: string;
|
|
82
|
-
/** A new alias, used only for the `copy` command */
|
|
83
|
-
toAlias?: string;
|
|
84
|
-
/** progress callback for `upload` and `download` commands. Return non-zero to abort operation. */
|
|
85
|
-
onProgress?: (nDone: number, nTotal: number) => number;
|
|
86
|
-
}
|
|
87
|
-
/** Optional arguments for Db upload and download commands. */
|
|
88
|
-
export interface UploadDownloadArgs {
|
|
89
|
-
/** The number of simultaneous HTTP requests. */
|
|
90
|
-
nRequests?: number;
|
|
91
|
-
}
|
|
92
|
-
export declare type BlobDaemonCommandArg = BlobDbProps & BlobCacheProps & BlobContainerProps & UploadDownloadArgs;
|
|
93
|
-
export declare class BlobDaemon {
|
|
94
|
-
private static exeName;
|
|
95
|
-
static daemonDir(props: BlobCacheProps): string;
|
|
96
|
-
/** Start the BlobDaemon process using the supplied properties. The process will be detached from the current process. */
|
|
97
|
-
static start(props: DaemonProps & BlobCacheProps): child_process.ChildProcess;
|
|
98
|
-
/** Get the full path to the local file that can be used to open a BlobDb. For the file to exist, you must first issue the "attach" command. */
|
|
99
|
-
static getDbFileName(props: BlobDaemonCommandArg): string;
|
|
100
|
-
/** Perform one of the BlobDaemon commands.
|
|
101
|
-
* @param command The BlobDaemon command to run.
|
|
102
|
-
* @param args arguments to the command.
|
|
103
|
-
* @return `Promise<{ result, errMsg }>` the meaning of result varies by command, but 0 always means success. For `attach`, negative values are
|
|
104
|
-
* `DaemonAttachError`, positive numbers below 400 are `SQLITE_xxx` errors, and values 400 and above are HTTP errors.
|
|
105
|
-
* `errMsg` is blank on success, but an english message useful for diagnostics otherwise.
|
|
106
|
-
*/
|
|
107
|
-
static command(command: BlobDaemonCommand, args: BlobDaemonCommandArg): Promise<{
|
|
108
|
-
result: DaemonAttachError | DbResult | number;
|
|
109
|
-
errMsg: string;
|
|
110
|
-
eTag?: string;
|
|
111
|
-
}>;
|
|
112
|
-
}
|
|
113
|
-
//# sourceMappingURL=BlobDaemon.d.ts.map
|
package/BlobDaemon.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlobDaemon.d.ts","sourceRoot":"","sources":["../src/BlobDaemon.ts"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,KAAK,aAAa,MAAM,eAAe,CAAC;AAI/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAM/C,qFAAqF;AACrF,0BAAkB,iBAAiB;IACjC,wBAAwB,KAAK;IAAE,iBAAiB,KAAK;IAAE,YAAY,KAAK;CACzE;AAED,6EAA6E;AAC7E,oBAAY,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,mBAAmB,CAAC;AAE7I,uEAAuE;AACvE,MAAM,WAAW,cAAc;IAC7B,iGAAiG;IACjG,WAAW,EAAE,MAAM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,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,sFAAsF;IACtF,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,oHAAoH;AACpH,MAAM,WAAW,WAAW;IAC1B,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAChB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kGAAkG;IAClG,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACxD;AAED,8DAA8D;AAC9D,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,oBAAY,oBAAoB,GAAG,WAAW,GAAG,cAAc,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAE1G,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,OAAO;WAGR,SAAS,CAAC,KAAK,EAAE,cAAc;IAI7C,yHAAyH;WAC3G,KAAK,CAAC,KAAK,EAAE,WAAW,GAAG,cAAc,GAAG,aAAa,CAAC,YAAY;IAoCpF,+IAA+I;WACjI,aAAa,CAAC,KAAK,EAAE,oBAAoB;IAIvD;;;;;;OAMG;WACiB,OAAO,CAAC,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,iBAAiB,GAAG,QAAQ,GAAG,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAK/K"}
|
package/BlobDaemon.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module iModels
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.BlobDaemon = void 0;
|
|
11
|
-
const child_process = require("child_process");
|
|
12
|
-
const fs = require("fs");
|
|
13
|
-
const os = require("os");
|
|
14
|
-
const path = require("path");
|
|
15
|
-
const NativeLibrary_1 = require("./NativeLibrary");
|
|
16
|
-
class BlobDaemon {
|
|
17
|
-
static exeName(props) {
|
|
18
|
-
var _a;
|
|
19
|
-
return (_a = props.exePath) !== null && _a !== void 0 ? _a : path.join(path.dirname(require.resolve(NativeLibrary_1.NativeLibrary.libraryName)), os.platform() === "win32" ? "BeBlobDaemon.exe" : "BeBlobDaemon");
|
|
20
|
-
}
|
|
21
|
-
static daemonDir(props) {
|
|
22
|
-
var _a;
|
|
23
|
-
return (_a = props.daemonDir) !== null && _a !== void 0 ? _a : path.join(NativeLibrary_1.NativeLibrary.defaultCacheDir, "blob-daemon");
|
|
24
|
-
}
|
|
25
|
-
/** Start the BlobDaemon process using the supplied properties. The process will be detached from the current process. */
|
|
26
|
-
static start(props) {
|
|
27
|
-
var _a;
|
|
28
|
-
const dir = this.daemonDir(props);
|
|
29
|
-
fs.mkdirSync(dir, { recursive: true }); // make sure the directory exists before starting the daemon
|
|
30
|
-
const args = [`daemon`, `-module`, `${props.storageType}`, `-user`, `${props.user}`, `-directory`, `${dir}`, `-polltime`, `${(_a = props.pollTime) !== null && _a !== void 0 ? _a : 60}`];
|
|
31
|
-
if (props.addr !== undefined)
|
|
32
|
-
args.push(`-addr`, `${props.addr}`);
|
|
33
|
-
if (props.portNumber !== undefined)
|
|
34
|
-
args.push(`-port`, `${props.portNumber}`);
|
|
35
|
-
if (props.maxCacheSize)
|
|
36
|
-
args.push(`-cachesize`, `${props.maxCacheSize}`);
|
|
37
|
-
if (props.log)
|
|
38
|
-
args.push(`-log`, `${props.log}`);
|
|
39
|
-
if (props.deleteTime !== undefined)
|
|
40
|
-
args.push(`-deletetime`, `${props.deleteTime}`);
|
|
41
|
-
if (props.gcTime !== undefined)
|
|
42
|
-
args.push(`-gctime`, `${props.gcTime}`);
|
|
43
|
-
if (props.retryTime !== undefined)
|
|
44
|
-
args.push(`-retrytime`, `${props.retryTime}`);
|
|
45
|
-
if (props.nWrites !== undefined)
|
|
46
|
-
args.push(`-nwrite`, `${props.nWrites}`);
|
|
47
|
-
if (props.nDeletes !== undefined)
|
|
48
|
-
args.push(`-ndelete`, `${props.nDeletes}`);
|
|
49
|
-
if (props.noTimeStamps)
|
|
50
|
-
args.push(`-notimestamps`);
|
|
51
|
-
if (props.persistAcrossSessions)
|
|
52
|
-
args.push(`-persistent`);
|
|
53
|
-
if (props.lazy)
|
|
54
|
-
args.push(`-lazy`);
|
|
55
|
-
if (props.noNonce)
|
|
56
|
-
args.push(`-nononce`);
|
|
57
|
-
if (props.autodetach !== undefined)
|
|
58
|
-
args.push(`-autodetach`, `${props.autodetach}`);
|
|
59
|
-
return child_process.spawn(this.exeName(props), args, Object.assign(Object.assign({}, props.spawnOptions), { windowsVerbatimArguments: true }));
|
|
60
|
-
}
|
|
61
|
-
/** Get the full path to the local file that can be used to open a BlobDb. For the file to exist, you must first issue the "attach" command. */
|
|
62
|
-
static getDbFileName(props) {
|
|
63
|
-
return path.join(this.daemonDir(props), props.container, props.dbAlias);
|
|
64
|
-
}
|
|
65
|
-
/** Perform one of the BlobDaemon commands.
|
|
66
|
-
* @param command The BlobDaemon command to run.
|
|
67
|
-
* @param args arguments to the command.
|
|
68
|
-
* @return `Promise<{ result, errMsg }>` the meaning of result varies by command, but 0 always means success. For `attach`, negative values are
|
|
69
|
-
* `DaemonAttachError`, positive numbers below 400 are `SQLITE_xxx` errors, and values 400 and above are HTTP errors.
|
|
70
|
-
* `errMsg` is blank on success, but an english message useful for diagnostics otherwise.
|
|
71
|
-
*/
|
|
72
|
-
static async command(command, args) {
|
|
73
|
-
var _a;
|
|
74
|
-
const fullArgs = Object.assign({}, args);
|
|
75
|
-
fullArgs.daemonDir = (_a = fullArgs.daemonDir) !== null && _a !== void 0 ? _a : this.daemonDir(args);
|
|
76
|
-
return NativeLibrary_1.NativeLibrary.nativeLib.runDaemonCommand(command, fullArgs);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
exports.BlobDaemon = BlobDaemon;
|
|
80
|
-
//# sourceMappingURL=BlobDaemon.js.map
|
package/BlobDaemon.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"BlobDaemon.js","sourceRoot":"","sources":["../src/BlobDaemon.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,+CAA+C;AAC/C,yBAAyB;AACzB,yBAAyB;AACzB,6BAA6B;AAE7B,mDAAgD;AAiGhD,MAAa,UAAU;IACb,MAAM,CAAC,OAAO,CAAC,KAAkB;;QACvC,OAAO,MAAA,KAAK,CAAC,OAAO,mCAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,6BAAa,CAAC,WAAW,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,KAAK,OAAO,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;IAC/J,CAAC;IACM,MAAM,CAAC,SAAS,CAAC,KAAqB;;QAC3C,OAAO,MAAA,KAAK,CAAC,SAAS,mCAAI,IAAI,CAAC,IAAI,CAAC,6BAAa,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IACpF,CAAC;IAED,yHAAyH;IAClH,MAAM,CAAC,KAAK,CAAC,KAAmC;;QACrD,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAClC,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC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,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IACrE,CAAC;CACF;AA9DD,gCA8DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module iModels\r\n */\r\n\r\nimport * as child_process from \"child_process\";\r\nimport * as fs from \"fs\";\r\nimport * as os from \"os\";\r\nimport * as path from \"path\";\r\nimport { DbResult } from \"@itwin/core-bentley\";\r\nimport { NativeLibrary } from \"./NativeLibrary\";\r\n\r\n// cspell:ignore polltime blocksize cachesize notimestamps deletetime gctime retrytime nwrite ndelete\r\n/* eslint-disable no-restricted-syntax */\r\n\r\n/** Error values for negative numbers returned by the BlobDaemon `attach` command. */\r\nexport const enum DaemonAttachError {\r\n INVALID_DAEMON_DIRECTORY = -1, DAEMON_NOT_ACTIVE = -2, SOCKET_ERROR = -3,\r\n}\r\n\r\n/** Possible values for `command` argument of `BlobDaemon.command` method. */\r\nexport type BlobDaemonCommand = \"attach\" | \"detach\" | \"create\" | \"destroy\" | \"upload\" | \"download\" | \"delete\" | \"copy\" | \"queryManifestETag\";\r\n\r\n/** Properties for accessing BlockCache directory and cloud storage. */\r\nexport interface BlobCacheProps {\r\n /** blob storage module: e.g. \"azure\", \"google\", \"aws\". May also include URI style parameters. */\r\n storageType: string;\r\n /** blob store account name. */\r\n user: string;\r\n /** full path of directory for daemon to store its files. Must be on fast local drive. */\r\n daemonDir?: string;\r\n /** block size, in megabytes used by CREATE command. Default is 4MB. */\r\n blockSizeMb?: number;\r\n}\r\n\r\n/** Properties for creating a new instance of the BlockCache daemon process. */\r\nexport interface DaemonProps {\r\n /** full path name of daemon.exe file. Default is to find \"BeBlobDaemon.exe\" in the same directory as this library. */\r\n exePath?: string;\r\n /** daemon connection address. Default is \"127.0.0.1\" */\r\n addr?: string;\r\n /** port number. Default 22002 */\r\n portNumber?: number;\r\n /** maximum cache Size. Must be a number followed by either M (for megabytes) or G (for gigabytes.) Default is 1G */\r\n maxCacheSize?: string;\r\n /** How often cloud storage is polled for database changes made by other daemon processes, in seconds. Default is 60. */\r\n pollTime?: number;\r\n /** How long an overwritten block is allowed to persist before it is permanently deleted, in seconds. Default is 3600. */\r\n deleteTime?: number;\r\n /** How often each daemon process scans for and deletes such garbage files, in seconds. Default is 3600. */\r\n gcTime?: number;\r\n /** How long after a failed checkpoint-to-upload operation the daemon process waits before retrying, in seconds. Default=10. */\r\n retryTime?: number;\r\n /** The maximum number of concurrent uploads (PUT requests) the daemon will make when uploading a new version of a database to cloud storage. Default=10. */\r\n nWrites?: number;\r\n /** The maximum number of concurrent deletes (DELETE requests) the daemon will make when uploading a new version of a database. Default=10. */\r\n nDeletes?: number;\r\n /** If true, unmodified cache entries are retained across runs of the daemon. Default=false. */\r\n persistAcrossSessions?: boolean;\r\n /** logging options */\r\n log?: string;\r\n /** if true, don't include timestamps in log messages */\r\n noTimeStamps?: boolean;\r\n /** if true, create local files only when first accessed. Default=false. */\r\n lazy?: boolean;\r\n /** if true, extra space for nonces is not reserved and no nonce values are used for encrypted pages. Default=false. */\r\n noNonce?: boolean;\r\n /** If specified, containers are automatically detached from the daemon process if there have been no connected clients for at least autodetach seconds. \r\n * If set to 0, then containers are never automatically detached. Default=0.\r\n */\r\n autodetach?: number; \r\n /** options for spawn */\r\n spawnOptions?: child_process.SpawnOptions;\r\n}\r\n\r\n/** The name and key for a blob container */\r\nexport interface BlobContainerProps {\r\n /** the name of the container. */\r\n container: string;\r\n /** SAS key that grants access to the container. */\r\n auth: string;\r\n /** if true, container is attached with write permissions. */\r\n writeable?: boolean;\r\n /** if true, container is attached in \"secure\" mode (encrypts blocks in cachefile). */\r\n secure?: boolean;\r\n}\r\n\r\n/** Properties for uploading, downloading, copying, or deleting a database, by its alias, within a BlobContainer. */\r\nexport interface BlobDbProps {\r\n /** The alias of the database within the container */\r\n dbAlias: string;\r\n /** local file name. Applies only to `upload` and `download` commands. */\r\n localFile?: string;\r\n /** A new alias, used only for the `copy` command */\r\n toAlias?: string;\r\n /** progress callback for `upload` and `download` commands. Return non-zero to abort operation. */\r\n onProgress?: (nDone: number, nTotal: number) => number;\r\n}\r\n\r\n/** Optional arguments for Db upload and download commands. */\r\nexport interface UploadDownloadArgs {\r\n /** The number of simultaneous HTTP requests. */\r\n nRequests?: number;\r\n}\r\n\r\nexport type BlobDaemonCommandArg = BlobDbProps & BlobCacheProps & BlobContainerProps & UploadDownloadArgs;\r\n\r\nexport class BlobDaemon {\r\n private static exeName(props: DaemonProps) {\r\n return props.exePath ?? path.join(path.dirname(require.resolve(NativeLibrary.libraryName)), os.platform() === \"win32\" ? \"BeBlobDaemon.exe\" : \"BeBlobDaemon\");\r\n }\r\n public static daemonDir(props: BlobCacheProps) {\r\n return props.daemonDir ?? path.join(NativeLibrary.defaultCacheDir, \"blob-daemon\");\r\n }\r\n\r\n /** Start the BlobDaemon process using the supplied properties. The process will be detached from the current process. */\r\n public static start(props: DaemonProps & BlobCacheProps): child_process.ChildProcess {\r\n const dir = this.daemonDir(props);\r\n fs.mkdirSync(dir, { recursive: true }); // make sure the directory exists before starting the daemon\r\n\r\n const args = [`daemon`, `-module`, `${props.storageType}`, `-user`, `${props.user}`, `-directory`, `${dir}`, `-polltime`, `${props.pollTime ?? 60}`];\r\n if (props.addr !== undefined)\r\n args.push(`-addr`, `${props.addr}`);\r\n if (props.portNumber !== undefined)\r\n args.push(`-port`, `${props.portNumber}`);\r\n if (props.maxCacheSize)\r\n args.push(`-cachesize`, `${props.maxCacheSize}`);\r\n if (props.log)\r\n args.push(`-log`, `${props.log}`);\r\n if (props.deleteTime !== undefined)\r\n args.push(`-deletetime`, `${props.deleteTime}`);\r\n if (props.gcTime !== undefined)\r\n args.push(`-gctime`, `${props.gcTime}`);\r\n if (props.retryTime !== undefined)\r\n args.push(`-retrytime`, `${props.retryTime}`);\r\n if (props.nWrites !== undefined)\r\n args.push(`-nwrite`, `${props.nWrites}`);\r\n if (props.nDeletes !== undefined)\r\n args.push(`-ndelete`, `${props.nDeletes}`);\r\n if (props.noTimeStamps)\r\n args.push(`-notimestamps`);\r\n if (props.persistAcrossSessions)\r\n args.push(`-persistent`);\r\n if (props.lazy)\r\n args.push(`-lazy`);\r\n if (props.noNonce)\r\n args.push(`-nononce`);\r\n if (props.autodetach !== undefined)\r\n args.push(`-autodetach`, `${props.autodetach}`)\r\n return child_process.spawn(this.exeName(props), args, { ...props.spawnOptions, windowsVerbatimArguments: true });\r\n }\r\n\r\n /** Get the full path to the local file that can be used to open a BlobDb. For the file to exist, you must first issue the \"attach\" command. */\r\n public static getDbFileName(props: BlobDaemonCommandArg) {\r\n return path.join(this.daemonDir(props), props.container, props.dbAlias);\r\n }\r\n\r\n /** Perform one of the BlobDaemon commands.\r\n * @param command The BlobDaemon command to run.\r\n * @param args arguments to the command.\r\n * @return `Promise<{ result, errMsg }>` the meaning of result varies by command, but 0 always means success. For `attach`, negative values are\r\n * `DaemonAttachError`, positive numbers below 400 are `SQLITE_xxx` errors, and values 400 and above are HTTP errors.\r\n * `errMsg` is blank on success, but an english message useful for diagnostics otherwise.\r\n */\r\n public static async command(command: BlobDaemonCommand, args: BlobDaemonCommandArg): Promise<{ result: DaemonAttachError | DbResult | number, errMsg: string, eTag?: string }> {\r\n const fullArgs = { ...args };\r\n fullArgs.daemonDir = fullArgs.daemonDir ?? this.daemonDir(args);\r\n return NativeLibrary.nativeLib.runDaemonCommand(command, fullArgs);\r\n }\r\n}\r\n"]}
|