dexie-cloud-addon 4.3.7 → 4.3.8

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.3.7, Wed Jan 28 2026
11
+ * Version 4.3.8, Thu Jan 29 2026
12
12
  *
13
13
  * https://dexie.org
14
14
  *
@@ -13793,7 +13793,7 @@
13793
13793
  *
13794
13794
  * ==========================================================================
13795
13795
  *
13796
- * Version 4.2.2, Wed Jan 28 2026
13796
+ * Version 4.2.2, Thu Jan 29 2026
13797
13797
  *
13798
13798
  * https://dexie.org
13799
13799
  *
@@ -17298,7 +17298,9 @@
17298
17298
  };
17299
17299
  }
17300
17300
 
17301
- const getCurrentUserEmitter = associate((db) => new rxjs.BehaviorSubject(UNAUTHORIZED_USER));
17301
+ const isOathCallback = typeof location !== 'undefined' && !!(new URL(location.href)).searchParams.get('dxc-auth');
17302
+ const getCurrentUserEmitter = associate((db) => new rxjs.BehaviorSubject(isOathCallback
17303
+ ? Object.assign(Object.assign({}, UNAUTHORIZED_USER), { oauthInProgress: true }) : UNAUTHORIZED_USER));
17302
17304
 
17303
17305
  function computeSyncState(db) {
17304
17306
  let _prevStatus = db.cloud.webSocketStatus.value;
@@ -18104,7 +18106,7 @@
18104
18106
  const syncComplete = new rxjs.Subject();
18105
18107
  dexie.cloud = {
18106
18108
  // @ts-ignore
18107
- version: "4.3.7",
18109
+ version: "4.3.8",
18108
18110
  options: Object.assign({}, DEFAULT_OPTIONS),
18109
18111
  schema: null,
18110
18112
  get currentUserId() {
@@ -18145,8 +18147,6 @@
18145
18147
  try {
18146
18148
  const callback = parseOAuthCallback();
18147
18149
  if (callback) {
18148
- // Clean up URL immediately (remove dxc-auth param)
18149
- cleanupOAuthUrl();
18150
18150
  // Store the pending auth code for processing when db is ready
18151
18151
  pendingOAuthCode = { code: callback.code, provider: callback.provider };
18152
18152
  console.debug('[dexie-cloud] OAuth callback detected, auth code stored for processing');
@@ -18154,7 +18154,6 @@
18154
18154
  }
18155
18155
  catch (error) {
18156
18156
  // parseOAuthCallback throws OAuthError on error callbacks
18157
- cleanupOAuthUrl();
18158
18157
  if (error instanceof OAuthError) {
18159
18158
  pendingOAuthError = error;
18160
18159
  console.error('[dexie-cloud] OAuth callback error:', error.message);
@@ -18382,6 +18381,9 @@
18382
18381
  message: error.message,
18383
18382
  messageParams: { provider: error.provider || 'unknown' }
18384
18383
  });
18384
+ // Clean up URL (remove dxc-auth param)
18385
+ cleanupOAuthUrl();
18386
+ currentUserEmitter.next(Object.assign(Object.assign({}, currentUserEmitter.value), { oauthInProgress: false }));
18385
18387
  }
18386
18388
  catch (uiError) {
18387
18389
  console.error('[dexie-cloud] Failed to show OAuth error alert:', uiError);
@@ -18395,6 +18397,8 @@
18395
18397
  try {
18396
18398
  changedUser = yield login(db, { oauthCode: code, provider });
18397
18399
  user = yield db.getCurrentUser();
18400
+ // Clean up URL (remove dxc-auth param)
18401
+ cleanupOAuthUrl();
18398
18402
  }
18399
18403
  catch (error) {
18400
18404
  console.error('[dexie-cloud] OAuth login failed:', error);
@@ -18489,7 +18493,7 @@
18489
18493
  }
18490
18494
  }
18491
18495
  // @ts-ignore
18492
- dexieCloud.version = "4.3.7";
18496
+ dexieCloud.version = "4.3.8";
18493
18497
  Dexie.Cloud = dexieCloud;
18494
18498
 
18495
18499
  exports.default = dexieCloud;