@itwin/workspace-editor 3.3.0-dev.76 → 3.3.0-dev.79

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.
@@ -32,9 +32,9 @@ function showMessage(msg) {
32
32
  console.log(msg);
33
33
  }
34
34
  /** perform a vacuum on a database, with a message while it's happening */
35
- function doVacuum(fileName, cloudContainer) {
36
- process.stdout.write(`Vacuuming ${fileName} ... `);
37
- core_backend_1.IModelHost.platform.DgnDb.vacuum(fileName, cloudContainer);
35
+ function doVacuum(dbName, container) {
36
+ process.stdout.write(`Vacuuming ${dbName} ... `);
37
+ core_backend_1.SQLiteDb.withOpenDb({ dbName, openMode: core_bentley_1.OpenMode.ReadWrite, container }, (db) => db.vacuum());
38
38
  process.stdout.write("done");
39
39
  showMessage("");
40
40
  }
@@ -321,7 +321,7 @@ async function initializeWorkspace(args) {
321
321
  if (yesNo[0].toUpperCase() !== "Y")
322
322
  return;
323
323
  }
324
- const container = new core_backend_1.IModelHost.platform.CloudContainer(args);
324
+ const container = core_backend_1.SQLiteDb.createCloudContainer(args);
325
325
  container.initializeContainer({ checksumBlockNames: true });
326
326
  showMessage(`container "${args.containerId} initialized`);
327
327
  }
@@ -361,7 +361,7 @@ async function preFetchWorkspaceDb(args) {
361
361
  fixVersionArg(args);
362
362
  const container = getCloudContainer(args);
363
363
  const timer = new core_bentley_1.StopWatch("prefetch", true);
364
- const prefetch = new core_backend_1.IModelHost.platform.CloudPrefetch(container, args.dbFileName);
364
+ const prefetch = core_backend_1.SQLiteDb.startCloudPrefetch(container, args.dbFileName);
365
365
  await prefetch.promise;
366
366
  showMessage(`preFetched WorkspaceDb [${args.dbFileName}] in ${sayContainer(args)}, time=${timer.elapsedSeconds.toString()}`);
367
367
  }
@@ -425,7 +425,7 @@ function runCommand(cmd) {
425
425
  core_bentley_1.Logger.initializeToConsole();
426
426
  core_bentley_1.Logger.setLevel("CloudSqlite", core_bentley_1.LogLevel.Trace);
427
427
  (_a = core_backend_1.IModelHost.appWorkspace.cloudCache) === null || _a === void 0 ? void 0 : _a.setLogMask(0xff);
428
- logTimer = setInterval(() => flushLog(), 20); // logging from other threads is buffered. This causes it to appear every 1/4 second.
428
+ logTimer = setInterval(() => flushLog(), 250); // logging from other threads is buffered. This causes it to appear every 1/4 second.
429
429
  }
430
430
  await cmd(args);
431
431
  }
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.3.0-dev.76",
5
+ "version": "3.3.0-dev.79",
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.3.0-dev.76",
18
- "@itwin/core-common": "3.3.0-dev.76",
19
- "@itwin/core-backend": "3.3.0-dev.76",
17
+ "@itwin/core-bentley": "3.3.0-dev.79",
18
+ "@itwin/core-common": "3.3.0-dev.79",
19
+ "@itwin/core-backend": "3.3.0-dev.79",
20
20
  "glob": "^7.1.2",
21
21
  "yargs": "^17.4.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@itwin/build-tools": "3.3.0-dev.76",
25
- "@itwin/eslint-plugin": "3.3.0-dev.76",
24
+ "@itwin/build-tools": "3.3.0-dev.79",
25
+ "@itwin/eslint-plugin": "3.3.0-dev.79",
26
26
  "@types/chai": "4.3.1",
27
27
  "@types/mocha": "^8.2.2",
28
28
  "@types/yargs": "^17.0.10",