@koolbase/react-native 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
|
@@ -76,6 +76,9 @@ exports.Koolbase = {
|
|
|
76
76
|
() => _flags?.projectId() ?? '', () => { void _flags?.refresh(); });
|
|
77
77
|
_fiscal = new core_1.KoolbaseFiscal(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
78
78
|
_realtime = new core_1.KoolbaseRealtime(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), () => _auth?.currentUser?.id ?? null);
|
|
79
|
+
// Signed in, signed out, another user: the realtime connection is
|
|
80
|
+
// replaced to match (signed out, collections anyone can read only).
|
|
81
|
+
_auth?.onAuthStateChange(() => _realtime?.sessionChanged());
|
|
79
82
|
_functions = new core_1.KoolbaseFunctions(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
80
83
|
// One anonymous device id for the whole SDK — bucketing (flags), targeting
|
|
81
84
|
// (code push), and registration keying (messaging) must all agree on it.
|
package/dist/esm/index.js
CHANGED
|
@@ -58,6 +58,9 @@ export const Koolbase = {
|
|
|
58
58
|
() => _flags?.projectId() ?? '', () => { void _flags?.refresh(); });
|
|
59
59
|
_fiscal = new KoolbaseFiscal(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
60
60
|
_realtime = new KoolbaseRealtime(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), () => _auth?.currentUser?.id ?? null);
|
|
61
|
+
// Signed in, signed out, another user: the realtime connection is
|
|
62
|
+
// replaced to match (signed out, collections anyone can read only).
|
|
63
|
+
_auth?.onAuthStateChange(() => _realtime?.sessionChanged());
|
|
61
64
|
_functions = new KoolbaseFunctions(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
62
65
|
// One anonymous device id for the whole SDK — bucketing (flags), targeting
|
|
63
66
|
// (code push), and registration keying (messaging) must all agree on it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koolbase/react-native",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.13.1",
|
|
4
4
|
"description": "React Native SDK for Koolbase \u2014 auth, database, storage, realtime, feature flags, and functions in one package.",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"url": "https://github.com/koolbase/koolbase-react-native"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@koolbase/core": "12.
|
|
27
|
+
"@koolbase/core": "12.13.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@react-native-async-storage/async-storage": "^2.2.0 || ^3.0.2",
|