@koolbase/js 12.12.0 → 12.13.1
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/cjs/index.js +3 -0
- package/dist/esm/index.js +3 -0
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -71,6 +71,9 @@ exports.Koolbase = {
|
|
|
71
71
|
() => _flags?.projectId() ?? '', () => { void _flags?.refresh(); });
|
|
72
72
|
_fiscal = new core_1.KoolbaseFiscal(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
73
73
|
_realtime = new core_1.KoolbaseRealtime(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), () => _auth?.currentUser?.id ?? null);
|
|
74
|
+
// Signed in, signed out, another user: the realtime connection is
|
|
75
|
+
// replaced to match (signed out, collections anyone can read only).
|
|
76
|
+
_auth?.onAuthStateChange(() => _realtime?.sessionChanged());
|
|
74
77
|
_functions = new core_1.KoolbaseFunctions(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
75
78
|
const deviceId = await (0, core_1.getOrCreateDeviceId)();
|
|
76
79
|
_flags = new core_1.KoolbaseFlags(config, deviceId);
|
package/dist/esm/index.js
CHANGED
|
@@ -52,6 +52,9 @@ export const Koolbase = {
|
|
|
52
52
|
() => _flags?.projectId() ?? '', () => { void _flags?.refresh(); });
|
|
53
53
|
_fiscal = new KoolbaseFiscal(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
54
54
|
_realtime = new KoolbaseRealtime(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), () => _auth?.currentUser?.id ?? null);
|
|
55
|
+
// Signed in, signed out, another user: the realtime connection is
|
|
56
|
+
// replaced to match (signed out, collections anyone can read only).
|
|
57
|
+
_auth?.onAuthStateChange(() => _realtime?.sessionChanged());
|
|
55
58
|
_functions = new KoolbaseFunctions(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
56
59
|
const deviceId = await getOrCreateDeviceId();
|
|
57
60
|
_flags = new KoolbaseFlags(config, deviceId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koolbase/js",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.13.1",
|
|
4
4
|
"description": "Koolbase SDK for the browser \u2014 auth, database, storage, realtime, functions, flags and offline sync in one package.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"url": "https://github.com/koolbase/koolbase-react-native"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@koolbase/core": "12.
|
|
29
|
+
"@koolbase/core": "12.13.1"
|
|
30
30
|
},
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|