@koolbase/js 12.7.0 → 12.9.0
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 +7 -1
- package/dist/esm/index.js +7 -1
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -65,12 +65,18 @@ exports.Koolbase = {
|
|
|
65
65
|
(0, core_1.setPlatform)(config.platform ?? (0, platform_js_2.browserPlatform)());
|
|
66
66
|
_auth = new core_1.KoolbaseAuth(config);
|
|
67
67
|
_db = new core_1.KoolbaseDatabase(config, () => _auth?.currentUser?.id ?? null, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
68
|
-
_storage = new core_1.KoolbaseStorage(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); }
|
|
68
|
+
_storage = new core_1.KoolbaseStorage(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); },
|
|
69
|
+
// Project identity for publicUrlFor, from the bootstrap payload; a
|
|
70
|
+
// missing one nudges a refresh (as Flutter's storage client).
|
|
71
|
+
() => _flags?.projectId() ?? '', () => { void _flags?.refresh(); });
|
|
69
72
|
_fiscal = new core_1.KoolbaseFiscal(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
70
73
|
_realtime = new core_1.KoolbaseRealtime(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), () => _auth?.currentUser?.id ?? null);
|
|
71
74
|
_functions = new core_1.KoolbaseFunctions(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
72
75
|
const deviceId = await (0, core_1.getOrCreateDeviceId)();
|
|
73
76
|
_flags = new core_1.KoolbaseFlags(config, deviceId);
|
|
77
|
+
// The bootstrap payload (flags, config, version policy, project identity),
|
|
78
|
+
// fetched in the background as Flutter's SDK does: never blocks startup.
|
|
79
|
+
void _flags.koolbaseFetch(config.appVersion ?? '0.0.0', 'web');
|
|
74
80
|
// Opt-in: nothing is sent unless the app asks for it.
|
|
75
81
|
if (config.analyticsEnabled === true) {
|
|
76
82
|
_analytics = new core_1.KoolbaseAnalytics(config, () => _auth?.currentUser?.id ?? null);
|
package/dist/esm/index.js
CHANGED
|
@@ -46,12 +46,18 @@ export const Koolbase = {
|
|
|
46
46
|
setPlatform(config.platform ?? browserPlatform());
|
|
47
47
|
_auth = new KoolbaseAuth(config);
|
|
48
48
|
_db = new KoolbaseDatabase(config, () => _auth?.currentUser?.id ?? null, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
49
|
-
_storage = new KoolbaseStorage(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); }
|
|
49
|
+
_storage = new KoolbaseStorage(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); },
|
|
50
|
+
// Project identity for publicUrlFor, from the bootstrap payload; a
|
|
51
|
+
// missing one nudges a refresh (as Flutter's storage client).
|
|
52
|
+
() => _flags?.projectId() ?? '', () => { void _flags?.refresh(); });
|
|
50
53
|
_fiscal = new KoolbaseFiscal(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
51
54
|
_realtime = new KoolbaseRealtime(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), () => _auth?.currentUser?.id ?? null);
|
|
52
55
|
_functions = new KoolbaseFunctions(config, () => _auth?.validAccessToken() ?? Promise.resolve(null), async () => { await _auth?.clearStoredSession(); });
|
|
53
56
|
const deviceId = await getOrCreateDeviceId();
|
|
54
57
|
_flags = new KoolbaseFlags(config, deviceId);
|
|
58
|
+
// The bootstrap payload (flags, config, version policy, project identity),
|
|
59
|
+
// fetched in the background as Flutter's SDK does: never blocks startup.
|
|
60
|
+
void _flags.koolbaseFetch(config.appVersion ?? '0.0.0', 'web');
|
|
55
61
|
// Opt-in: nothing is sent unless the app asks for it.
|
|
56
62
|
if (config.analyticsEnabled === true) {
|
|
57
63
|
_analytics = new KoolbaseAnalytics(config, () => _auth?.currentUser?.id ?? null);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koolbase/js",
|
|
3
|
-
"version": "12.
|
|
4
|
-
"description": "Koolbase SDK for the browser
|
|
3
|
+
"version": "12.9.0",
|
|
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",
|
|
7
7
|
"files": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"url": "https://github.com/koolbase/koolbase-react-native"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@koolbase/core": "12.
|
|
28
|
+
"@koolbase/core": "12.9.0"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|