@itwin/workspace-editor 4.1.0-dev.7 → 4.1.0-dev.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -283,7 +283,7 @@ async function importWorkspaceDb(args) {
283
283
  args.localFileName = `${args.localFileName}.${core_backend_1.ITwinWorkspaceDb.fileExt}`;
284
284
  if (!core_backend_1.IModelJsFs.existsSync(args.localFileName))
285
285
  args.localFileName = (0, path_1.join)(args.directory ?? core_backend_1.IModelHost.appWorkspace.containerDir, args.localFileName);
286
- await core_backend_1.CloudSqlite.withWriteLock(args.user, container, async () => {
286
+ await core_backend_1.CloudSqlite.withWriteLock({ ...args, container }, async () => {
287
287
  await performTransfer(container, "upload", args);
288
288
  });
289
289
  container.checkForChanges(); // so we can see newly imported WorkspaceDb
@@ -300,7 +300,7 @@ async function exportWorkspaceDb(args) {
300
300
  /** Delete a WorkspaceDb from a cloud WorkspaceContainer. */
301
301
  async function deleteWorkspaceDb(args) {
302
302
  const container = getCloudContainer(args);
303
- await core_backend_1.CloudSqlite.withWriteLock(args.user, container, async () => {
303
+ await core_backend_1.CloudSqlite.withWriteLock({ ...args, container }, async () => {
304
304
  return container.deleteDatabase(args.dbName);
305
305
  });
306
306
  showMessage(`deleted WorkspaceDb [${args.dbName}] from ${sayContainer(args)}`);
@@ -325,7 +325,7 @@ async function initializeWorkspace(args) {
325
325
  async function purgeWorkspace(args) {
326
326
  const container = getCloudContainer(args);
327
327
  const nGarbage = container.garbageBlocks;
328
- await core_backend_1.CloudSqlite.withWriteLock(args.user, container, async () => container.cleanDeletedBlocks());
328
+ await core_backend_1.CloudSqlite.withWriteLock({ ...args, container }, async () => container.cleanDeletedBlocks());
329
329
  container.checkForChanges(); // re-read manifest to get current garbage count
330
330
  showMessage(`purged ${sayContainer(args)}. ${nGarbage - container.garbageBlocks} garbage blocks cleaned`);
331
331
  }
@@ -342,7 +342,7 @@ async function copyWorkspaceDb(args) {
342
342
  const newVersion = core_backend_1.ITwinWorkspaceContainer.parseDbFileName(args.newDbName);
343
343
  core_backend_1.ITwinWorkspaceContainer.validateDbName(newVersion.dbName);
344
344
  const newName = core_backend_1.ITwinWorkspaceContainer.makeDbFileName(newVersion.dbName, core_backend_1.ITwinWorkspaceContainer.validateVersion(newVersion.version));
345
- await core_backend_1.CloudSqlite.withWriteLock(args.user, container, async () => container.copyDatabase(oldName, newName));
345
+ await core_backend_1.CloudSqlite.withWriteLock({ ...args, container }, async () => container.copyDatabase(oldName, newName));
346
346
  showMessage(`copied WorkspaceDb [${oldName}] to [${newName}] in ${sayContainer(args)}`);
347
347
  }
348
348
  /** Make a copy of a WorkspaceDb with a new name. */
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": "4.1.0-dev.7",
5
+ "version": "4.1.0-dev.70",
6
6
  "bin": {
7
7
  "WorkspaceEditor": "./lib/WorkspaceEditor.js"
8
8
  },
@@ -17,27 +17,21 @@
17
17
  "dependencies": {
18
18
  "glob": "^7.1.2",
19
19
  "yargs": "^17.4.0",
20
- "@itwin/core-bentley": "4.1.0-dev.7",
21
- "@itwin/core-common": "4.1.0-dev.7",
22
- "@itwin/core-backend": "4.1.0-dev.7"
20
+ "@itwin/core-bentley": "4.1.0-dev.70",
21
+ "@itwin/core-common": "4.1.0-dev.70",
22
+ "@itwin/core-backend": "4.1.0-dev.70"
23
23
  },
24
24
  "devDependencies": {
25
- "@itwin/eslint-plugin": "^4.0.0-dev.33",
25
+ "@itwin/eslint-plugin": "4.0.0-dev.44",
26
26
  "@types/chai": "4.3.1",
27
27
  "@types/mocha": "^8.2.2",
28
28
  "@types/yargs": "17.0.19",
29
29
  "@types/glob": "^5.0.35",
30
- "eslint": "^8.36.0",
30
+ "eslint": "^8.44.0",
31
31
  "mocha": "^10.0.0",
32
32
  "rimraf": "^3.0.2",
33
33
  "typescript": "~5.0.2",
34
- "@itwin/build-tools": "4.1.0-dev.7"
35
- },
36
- "eslintConfig": {
37
- "plugins": [
38
- "@itwin"
39
- ],
40
- "extends": "plugin:@itwin/itwinjs-recommended"
34
+ "@itwin/build-tools": "4.1.0-dev.70"
41
35
  },
42
36
  "scripts": {
43
37
  "build": "tsc 1>&2",