dexie-cloud-addon 4.0.2 → 4.0.3

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.
@@ -19,4 +19,5 @@ export interface UserLogin {
19
19
  nonExportablePrivateKey?: CryptoKey;
20
20
  publicKey?: CryptoKey;
21
21
  isLoggedIn?: boolean;
22
+ data?: any;
22
23
  }
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * ==========================================================================
10
10
  *
11
- * Version 4.0.2, Wed Apr 10 2024
11
+ * Version 4.0.3, Sat Apr 13 2024
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -2220,6 +2220,9 @@ function refreshAccessToken(url, login) {
2220
2220
  if (response.userValidUntil != null) {
2221
2221
  login.license.validUntil = new Date(response.userValidUntil);
2222
2222
  }
2223
+ if (response.data) {
2224
+ login.data = response.data;
2225
+ }
2223
2226
  return login;
2224
2227
  });
2225
2228
  }
@@ -2274,6 +2277,7 @@ function userAuthenticate(context, fetchToken, userInteraction, hints) {
2274
2277
  type: response2.userType,
2275
2278
  status: response2.claims.license || 'ok',
2276
2279
  };
2280
+ context.data = response2.data;
2277
2281
  if (response2.evalDaysLeft != null) {
2278
2282
  context.license.evalDaysLeft = response2.evalDaysLeft;
2279
2283
  }
@@ -4219,6 +4223,7 @@ function MessagesFromServerConsumer(db) {
4219
4223
  accessTokenExpiration: refreshedLogin.accessTokenExpiration,
4220
4224
  claims: refreshedLogin.claims,
4221
4225
  license: refreshedLogin.license,
4226
+ data: refreshedLogin.data,
4222
4227
  });
4223
4228
  // Updating $logins will trigger emission of db.cloud.currentUser observable, which
4224
4229
  // in turn will lead to that connectWebSocket.ts will reconnect the socket with the
@@ -5467,6 +5472,7 @@ function connectWebSocket(db) {
5467
5472
  accessTokenExpiration: refreshedLogin.accessTokenExpiration,
5468
5473
  claims: refreshedLogin.claims,
5469
5474
  license: refreshedLogin.license,
5475
+ data: refreshedLogin.data
5470
5476
  });
5471
5477
  })), switchMap(() => createObservable()));
5472
5478
  }
@@ -6300,7 +6306,7 @@ function dexieCloud(dexie) {
6300
6306
  const syncComplete = new Subject();
6301
6307
  dexie.cloud = {
6302
6308
  // @ts-ignore
6303
- version: "4.0.2",
6309
+ version: "4.0.3",
6304
6310
  options: Object.assign({}, DEFAULT_OPTIONS),
6305
6311
  schema: null,
6306
6312
  get currentUserId() {
@@ -6577,7 +6583,7 @@ function dexieCloud(dexie) {
6577
6583
  }
6578
6584
  }
6579
6585
  // @ts-ignore
6580
- dexieCloud.version = "4.0.2";
6586
+ dexieCloud.version = "4.0.3";
6581
6587
  Dexie.Cloud = dexieCloud;
6582
6588
 
6583
6589
  export { dexieCloud as default, dexieCloud, getTiedObjectId, getTiedRealmId, resolveText };