dexie-cloud-addon 4.1.0-beta.45 → 4.1.0-beta.47

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.
@@ -0,0 +1,2 @@
1
+ import Dexie from "dexie";
2
+ export declare function dbOnClosed(db: Dexie, handler: () => void): () => void;
@@ -1,5 +1,5 @@
1
1
  /* ==========================================================================
2
- * dexie-cloud-addom.js
2
+ * dexie-cloud-addon.js
3
3
  * ==========================================================================
4
4
  *
5
5
  * Dexie addon that syncs IndexedDB with Dexie Cloud.
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * ==========================================================================
10
10
  *
11
- * Version 4.1.0-beta.45, Mon Mar 31 2025
11
+ * Version 4.1.0-beta.47, Mon May 12 2025
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -1800,10 +1800,11 @@ function triggerSync(db, purpose) {
1800
1800
  }
1801
1801
  }
1802
1802
 
1803
- const hasArrayBufferB64 = "fromBase64" in Uint8Array; // https://github.com/tc39/proposal-arraybuffer-base64;
1803
+ const hasArrayBufferFromBase64 = "fromBase64" in Uint8Array; // https://github.com/tc39/proposal-arraybuffer-base64;
1804
+ const hasArrayBufferToBase64 = "toBase64" in Uint8Array.prototype; // https://github.com/tc39/proposal-arraybuffer-base64;
1804
1805
  const b64decode = typeof Buffer !== "undefined"
1805
1806
  ? (base64) => Buffer.from(base64, "base64") // Node
1806
- : hasArrayBufferB64
1807
+ : hasArrayBufferFromBase64
1807
1808
  ? // @ts-ignore: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/fromBase64
1808
1809
  (base64) => Uint8Array.fromBase64(base64) // Modern javascript standard
1809
1810
  : (base64) => {
@@ -1826,7 +1827,7 @@ const b64encode = typeof Buffer !== "undefined"
1826
1827
  return Buffer.from(b).toString("base64");
1827
1828
  }
1828
1829
  }
1829
- : hasArrayBufferB64
1830
+ : hasArrayBufferToBase64
1830
1831
  ? // @ts-ignore https://github.com/tc39/proposal-arraybuffer-base64
1831
1832
  (b) => b.toBase64() // Modern Javascript standard
1832
1833
  : (b) => {
@@ -3564,6 +3565,7 @@ function loadAccessToken(db) {
3564
3565
  accessTokenExpiration: refreshedLogin.accessTokenExpiration,
3565
3566
  claims: refreshedLogin.claims,
3566
3567
  license: refreshedLogin.license,
3568
+ data: refreshedLogin.data,
3567
3569
  });
3568
3570
  return refreshedLogin;
3569
3571
  });
@@ -8273,7 +8275,7 @@ function dexieCloud(dexie) {
8273
8275
  const syncComplete = new Subject();
8274
8276
  dexie.cloud = {
8275
8277
  // @ts-ignore
8276
- version: "4.1.0-beta.45",
8278
+ version: "4.1.0-beta.47",
8277
8279
  options: Object.assign({}, DEFAULT_OPTIONS),
8278
8280
  schema: null,
8279
8281
  get currentUserId() {
@@ -8591,7 +8593,7 @@ function dexieCloud(dexie) {
8591
8593
  }
8592
8594
  }
8593
8595
  // @ts-ignore
8594
- dexieCloud.version = "4.1.0-beta.45";
8596
+ dexieCloud.version = "4.1.0-beta.47";
8595
8597
  Dexie.Cloud = dexieCloud;
8596
8598
 
8597
8599
  // In case the SW lives for a while, let it reuse already opened connections: