dexie-cloud-addon 4.0.1-beta.51 → 4.0.1-beta.53

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.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * ==========================================================================
10
10
  *
11
- * Version 4.0.1-beta.51, Sat Oct 28 2023
11
+ * Version 4.0.1-beta.53, Sat Dec 02 2023
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -4704,7 +4704,7 @@ function readLock(fn, prop) {
4704
4704
  const numWriters = writers.length;
4705
4705
  const promise = (numWriters > 0
4706
4706
  ? writers[numWriters - 1].then(() => fn(req), () => fn(req))
4707
- : fn(req)).finally(() => readers.splice(readers.indexOf(promise)));
4707
+ : fn(req)).finally(() => { readers.splice(readers.indexOf(promise)); });
4708
4708
  readers.push(promise);
4709
4709
  return promise;
4710
4710
  };
@@ -4716,7 +4716,7 @@ function writeLock(fn, prop) {
4716
4716
  ? writers[writers.length - 1].then(() => fn(req), () => fn(req))
4717
4717
  : readers.length > 0
4718
4718
  ? allSettled(readers).then(() => fn(req))
4719
- : fn(req)).finally(() => writers.shift());
4719
+ : fn(req)).finally(() => { writers.shift(); });
4720
4720
  writers.push(promise);
4721
4721
  return promise;
4722
4722
  };
@@ -6141,7 +6141,7 @@ function permissions(dexie, obj, tableName) {
6141
6141
  const realm = permissionsLookup[realmId || dexie.cloud.currentUserId];
6142
6142
  if (!realm)
6143
6143
  return new PermissionChecker({}, tableName, !owner || owner === dexie.cloud.currentUserId);
6144
- return new PermissionChecker(realm.permissions, tableName, realmId === dexie.cloud.currentUserId || owner === dexie.cloud.currentUserId);
6144
+ return new PermissionChecker(realm.permissions, tableName, realmId === undefined || realmId === dexie.cloud.currentUserId || owner === dexie.cloud.currentUserId);
6145
6145
  };
6146
6146
  const o = source.pipe(map(mapper));
6147
6147
  o.getValue = () => mapper(source.getValue());
@@ -6210,7 +6210,7 @@ function dexieCloud(dexie) {
6210
6210
  const syncComplete = new Subject();
6211
6211
  dexie.cloud = {
6212
6212
  // @ts-ignore
6213
- version: "4.0.1-beta.51",
6213
+ version: "4.0.1-beta.53",
6214
6214
  options: Object.assign({}, DEFAULT_OPTIONS),
6215
6215
  schema: null,
6216
6216
  get currentUserId() {
@@ -6487,7 +6487,7 @@ function dexieCloud(dexie) {
6487
6487
  }
6488
6488
  }
6489
6489
  // @ts-ignore
6490
- dexieCloud.version = "4.0.1-beta.51";
6490
+ dexieCloud.version = "4.0.1-beta.53";
6491
6491
  Dexie.Cloud = dexieCloud;
6492
6492
 
6493
6493
  // In case the SW lives for a while, let it reuse already opened connections: