dexie-cloud-addon 4.1.0-beta.46 → 4.1.0-beta.48

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.
@@ -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.46, Thu Apr 03 2025
11
+ * Version 4.1.0-beta.48, Tue Jun 03 2025
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -3040,10 +3040,11 @@
3040
3040
  }
3041
3041
  }
3042
3042
 
3043
- const hasArrayBufferB64 = "fromBase64" in Uint8Array; // https://github.com/tc39/proposal-arraybuffer-base64;
3043
+ const hasArrayBufferFromBase64 = "fromBase64" in Uint8Array; // https://github.com/tc39/proposal-arraybuffer-base64;
3044
+ const hasArrayBufferToBase64 = "toBase64" in Uint8Array.prototype; // https://github.com/tc39/proposal-arraybuffer-base64;
3044
3045
  const b64decode = typeof Buffer !== "undefined"
3045
3046
  ? (base64) => Buffer.from(base64, "base64") // Node
3046
- : hasArrayBufferB64
3047
+ : hasArrayBufferFromBase64
3047
3048
  ? // @ts-ignore: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/fromBase64
3048
3049
  (base64) => Uint8Array.fromBase64(base64) // Modern javascript standard
3049
3050
  : (base64) => {
@@ -3066,9 +3067,13 @@
3066
3067
  return Buffer.from(b).toString("base64");
3067
3068
  }
3068
3069
  }
3069
- : hasArrayBufferB64
3070
- ? // @ts-ignore https://github.com/tc39/proposal-arraybuffer-base64
3071
- (b) => b.toBase64() // Modern Javascript standard
3070
+ : hasArrayBufferToBase64
3071
+ ? (b) => {
3072
+ // Uint8Array.prototype.toBase64 is available in modern browsers
3073
+ const u8a = ArrayBuffer.isView(b) ? b : new Uint8Array(b);
3074
+ // @ts-ignore: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array/toBase64
3075
+ return u8a.toBase64();
3076
+ }
3072
3077
  : (b) => {
3073
3078
  // Legacy DOM workaround
3074
3079
  const u8a = ArrayBuffer.isView(b) ? b : new Uint8Array(b);
@@ -3250,6 +3255,7 @@
3250
3255
  accessTokenExpiration: refreshedLogin.accessTokenExpiration,
3251
3256
  claims: refreshedLogin.claims,
3252
3257
  license: refreshedLogin.license,
3258
+ data: refreshedLogin.data,
3253
3259
  });
3254
3260
  return refreshedLogin;
3255
3261
  });
@@ -8447,7 +8453,7 @@
8447
8453
  const syncComplete = new rxjs.Subject();
8448
8454
  dexie.cloud = {
8449
8455
  // @ts-ignore
8450
- version: "4.1.0-beta.46",
8456
+ version: "4.1.0-beta.48",
8451
8457
  options: Object.assign({}, DEFAULT_OPTIONS),
8452
8458
  schema: null,
8453
8459
  get currentUserId() {
@@ -8765,7 +8771,7 @@
8765
8771
  }
8766
8772
  }
8767
8773
  // @ts-ignore
8768
- dexieCloud.version = "4.1.0-beta.46";
8774
+ dexieCloud.version = "4.1.0-beta.48";
8769
8775
  Dexie.Cloud = dexieCloud;
8770
8776
 
8771
8777
  exports.default = dexieCloud;