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.
- package/dist/modern/db/entities/UserLogin.d.ts +1 -0
- package/dist/modern/dexie-cloud-addon.js +11 -7
- package/dist/modern/dexie-cloud-addon.js.map +1 -1
- package/dist/modern/dexie-cloud-addon.min.js +1 -1
- package/dist/modern/dexie-cloud-addon.min.js.map +1 -1
- package/dist/modern/service-worker.js +11 -7
- package/dist/modern/service-worker.js.map +1 -1
- package/dist/modern/service-worker.min.js +1 -1
- package/dist/modern/service-worker.min.js.map +1 -1
- package/dist/umd/dexie-cloud-addon.js +12 -8
- package/dist/umd/dexie-cloud-addon.js.map +1 -1
- package/dist/umd/dexie-cloud-addon.min.js +1 -1
- package/dist/umd/dexie-cloud-addon.min.js.map +1 -1
- package/dist/umd/service-worker.js +12 -8
- package/dist/umd/service-worker.js.map +1 -1
- package/dist/umd/service-worker.min.js +1 -1
- package/dist/umd/service-worker.min.js.map +1 -1
- package/package.json +3 -3
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* ==========================================================================
|
|
10
10
|
*
|
|
11
|
-
* Version 4.3.
|
|
11
|
+
* Version 4.3.8, Thu Jan 29 2026
|
|
12
12
|
*
|
|
13
13
|
* https://dexie.org
|
|
14
14
|
*
|
|
@@ -6068,7 +6068,9 @@ function associate(factory) {
|
|
|
6068
6068
|
};
|
|
6069
6069
|
}
|
|
6070
6070
|
|
|
6071
|
-
const
|
|
6071
|
+
const isOathCallback = typeof location !== 'undefined' && !!(new URL(location.href)).searchParams.get('dxc-auth');
|
|
6072
|
+
const getCurrentUserEmitter = associate((db) => new BehaviorSubject(isOathCallback
|
|
6073
|
+
? Object.assign(Object.assign({}, UNAUTHORIZED_USER), { oauthInProgress: true }) : UNAUTHORIZED_USER));
|
|
6072
6074
|
|
|
6073
6075
|
function computeSyncState(db) {
|
|
6074
6076
|
let _prevStatus = db.cloud.webSocketStatus.value;
|
|
@@ -6703,7 +6705,7 @@ function dexieCloud(dexie) {
|
|
|
6703
6705
|
const syncComplete = new Subject();
|
|
6704
6706
|
dexie.cloud = {
|
|
6705
6707
|
// @ts-ignore
|
|
6706
|
-
version: "4.3.
|
|
6708
|
+
version: "4.3.8",
|
|
6707
6709
|
options: Object.assign({}, DEFAULT_OPTIONS),
|
|
6708
6710
|
schema: null,
|
|
6709
6711
|
get currentUserId() {
|
|
@@ -6744,8 +6746,6 @@ function dexieCloud(dexie) {
|
|
|
6744
6746
|
try {
|
|
6745
6747
|
const callback = parseOAuthCallback();
|
|
6746
6748
|
if (callback) {
|
|
6747
|
-
// Clean up URL immediately (remove dxc-auth param)
|
|
6748
|
-
cleanupOAuthUrl();
|
|
6749
6749
|
// Store the pending auth code for processing when db is ready
|
|
6750
6750
|
pendingOAuthCode = { code: callback.code, provider: callback.provider };
|
|
6751
6751
|
console.debug('[dexie-cloud] OAuth callback detected, auth code stored for processing');
|
|
@@ -6753,7 +6753,6 @@ function dexieCloud(dexie) {
|
|
|
6753
6753
|
}
|
|
6754
6754
|
catch (error) {
|
|
6755
6755
|
// parseOAuthCallback throws OAuthError on error callbacks
|
|
6756
|
-
cleanupOAuthUrl();
|
|
6757
6756
|
if (error instanceof OAuthError) {
|
|
6758
6757
|
pendingOAuthError = error;
|
|
6759
6758
|
console.error('[dexie-cloud] OAuth callback error:', error.message);
|
|
@@ -6981,6 +6980,9 @@ function dexieCloud(dexie) {
|
|
|
6981
6980
|
message: error.message,
|
|
6982
6981
|
messageParams: { provider: error.provider || 'unknown' }
|
|
6983
6982
|
});
|
|
6983
|
+
// Clean up URL (remove dxc-auth param)
|
|
6984
|
+
cleanupOAuthUrl();
|
|
6985
|
+
currentUserEmitter.next(Object.assign(Object.assign({}, currentUserEmitter.value), { oauthInProgress: false }));
|
|
6984
6986
|
}
|
|
6985
6987
|
catch (uiError) {
|
|
6986
6988
|
console.error('[dexie-cloud] Failed to show OAuth error alert:', uiError);
|
|
@@ -6994,6 +6996,8 @@ function dexieCloud(dexie) {
|
|
|
6994
6996
|
try {
|
|
6995
6997
|
changedUser = yield login(db, { oauthCode: code, provider });
|
|
6996
6998
|
user = yield db.getCurrentUser();
|
|
6999
|
+
// Clean up URL (remove dxc-auth param)
|
|
7000
|
+
cleanupOAuthUrl();
|
|
6997
7001
|
}
|
|
6998
7002
|
catch (error) {
|
|
6999
7003
|
console.error('[dexie-cloud] OAuth login failed:', error);
|
|
@@ -7088,7 +7092,7 @@ function dexieCloud(dexie) {
|
|
|
7088
7092
|
}
|
|
7089
7093
|
}
|
|
7090
7094
|
// @ts-ignore
|
|
7091
|
-
dexieCloud.version = "4.3.
|
|
7095
|
+
dexieCloud.version = "4.3.8";
|
|
7092
7096
|
Dexie.Cloud = dexieCloud;
|
|
7093
7097
|
|
|
7094
7098
|
// In case the SW lives for a while, let it reuse already opened connections:
|