@itwin/workspace-editor 3.4.0-dev.9 → 3.5.0-dev.5

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.
@@ -20,7 +20,10 @@ let inScript = false;
20
20
  let logTimer;
21
21
  async function askQuestion(query) {
22
22
  const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
23
- return new Promise((resolve) => rl.question(query, (ans) => { rl.close(); resolve(ans); }));
23
+ return new Promise((resolve) => rl.question(query, (ans) => {
24
+ rl.close();
25
+ resolve(ans);
26
+ }));
24
27
  }
25
28
  function flushLog() {
26
29
  core_backend_1.IModelHost.platform.flushLog();
@@ -34,7 +37,8 @@ function showMessage(msg) {
34
37
  /** perform a vacuum on a database, with a message while it's happening */
35
38
  function doVacuum(dbName, container) {
36
39
  process.stdout.write(`Vacuuming ${dbName} ... `);
37
- core_backend_1.SQLiteDb.withOpenDb({ dbName, openMode: core_bentley_1.OpenMode.ReadWrite, container }, (db) => db.vacuum());
40
+ const db = new core_backend_1.SQLiteDb();
41
+ db.withOpenDb({ dbName, openMode: core_bentley_1.OpenMode.ReadWrite, container }, () => db.vacuum());
38
42
  process.stdout.write("done");
39
43
  showMessage("");
40
44
  }
@@ -321,7 +325,7 @@ async function initializeWorkspace(args) {
321
325
  if (yesNo[0].toUpperCase() !== "Y")
322
326
  return;
323
327
  }
324
- const container = core_backend_1.SQLiteDb.createCloudContainer(args);
328
+ const container = core_backend_1.CloudSqlite.createCloudContainer(args);
325
329
  container.initializeContainer({ checksumBlockNames: true });
326
330
  showMessage(`container "${args.containerId} initialized`);
327
331
  }
@@ -361,7 +365,7 @@ async function preFetchWorkspaceDb(args) {
361
365
  fixVersionArg(args);
362
366
  const container = getCloudContainer(args);
363
367
  const timer = new core_bentley_1.StopWatch("prefetch", true);
364
- const prefetch = core_backend_1.SQLiteDb.startCloudPrefetch(container, args.dbFileName);
368
+ const prefetch = core_backend_1.CloudSqlite.startCloudPrefetch(container, args.dbFileName);
365
369
  await prefetch.promise;
366
370
  showMessage(`preFetched WorkspaceDb [${args.dbFileName}] in ${sayContainer(args)}, time=${timer.elapsedSeconds.toString()}`);
367
371
  }
@@ -424,7 +428,7 @@ function runCommand(cmd) {
424
428
  if (true === args.logging) {
425
429
  core_bentley_1.Logger.initializeToConsole();
426
430
  core_bentley_1.Logger.setLevel("CloudSqlite", core_bentley_1.LogLevel.Trace);
427
- (_a = core_backend_1.IModelHost.appWorkspace.cloudCache) === null || _a === void 0 ? void 0 : _a.setLogMask(0xff);
431
+ (_a = core_backend_1.IModelHost.appWorkspace.cloudCache) === null || _a === void 0 ? void 0 : _a.setLogMask(core_backend_1.CloudSqlite.LoggingMask.All);
428
432
  logTimer = setInterval(() => flushLog(), 250); // logging from other threads is buffered. This causes it to appear every 1/4 second.
429
433
  }
430
434
  await cmd(args);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@itwin/workspace-editor",
3
3
  "license": "MIT",
4
4
  "main": "lib/WorkspaceEditor.js",
5
- "version": "3.4.0-dev.9",
5
+ "version": "3.5.0-dev.5",
6
6
  "bin": {
7
7
  "WorkspaceEditor": "./lib/WorkspaceEditor.js"
8
8
  },
@@ -14,15 +14,15 @@
14
14
  "url": "https://github.com/iTwin/itwinjs-core/tree/master/utils/workspace-editor"
15
15
  },
16
16
  "dependencies": {
17
- "@itwin/core-bentley": "3.4.0-dev.9",
18
- "@itwin/core-common": "3.4.0-dev.9",
19
- "@itwin/core-backend": "3.4.0-dev.9",
17
+ "@itwin/core-bentley": "3.5.0-dev.5",
18
+ "@itwin/core-common": "3.5.0-dev.5",
19
+ "@itwin/core-backend": "3.5.0-dev.5",
20
20
  "glob": "^7.1.2",
21
21
  "yargs": "^17.4.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@itwin/build-tools": "3.4.0-dev.9",
25
- "@itwin/eslint-plugin": "3.4.0-dev.9",
24
+ "@itwin/build-tools": "3.5.0-dev.5",
25
+ "@itwin/eslint-plugin": "3.5.0-dev.5",
26
26
  "@types/chai": "4.3.1",
27
27
  "@types/mocha": "^8.2.2",
28
28
  "@types/yargs": "^17.0.10",