tinybase 5.2.0-beta.5 → 5.2.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/@types/index.d.cts +0 -2
- package/@types/index.d.ts +0 -2
- package/@types/persisters/index.d.cts +10 -5
- package/@types/persisters/index.d.ts +10 -5
- package/@types/persisters/persister-partykit-client/index.d.cts +2 -2
- package/@types/persisters/persister-partykit-client/index.d.ts +2 -2
- package/@types/persisters/persister-partykit-client/with-schemas/index.d.cts +2 -2
- package/@types/persisters/persister-partykit-client/with-schemas/index.d.ts +2 -2
- package/@types/persisters/with-schemas/index.d.cts +10 -5
- package/@types/persisters/with-schemas/index.d.ts +10 -5
- package/@types/synchronizers/synchronizer-ws-server/index.d.cts +7 -7
- package/@types/synchronizers/synchronizer-ws-server/index.d.ts +7 -7
- package/@types/synchronizers/synchronizer-ws-server/with-schemas/index.d.cts +7 -7
- package/@types/synchronizers/synchronizer-ws-server/with-schemas/index.d.ts +7 -7
- package/@types/with-schemas/index.d.cts +0 -2
- package/@types/with-schemas/index.d.ts +0 -2
- package/package.json +3 -3
- package/readme.md +14 -14
- package/releases.md +24 -24
package/@types/index.d.cts
CHANGED
|
@@ -11,8 +11,6 @@ export * from './checkpoints/index.d.cts';
|
|
|
11
11
|
export * from './common/index.d.cts';
|
|
12
12
|
export * from './indexes/index.d.cts';
|
|
13
13
|
export * from './metrics/index.d.cts';
|
|
14
|
-
export * from './persisters/index.d.cts';
|
|
15
|
-
export * from './synchronizers/index.d.cts';
|
|
16
14
|
export * from './queries/index.d.cts';
|
|
17
15
|
export * from './relationships/index.d.cts';
|
|
18
16
|
export * from './mergeable-store/index.d.cts';
|
package/@types/index.d.ts
CHANGED
|
@@ -11,8 +11,6 @@ export * from './checkpoints/index.d.ts';
|
|
|
11
11
|
export * from './common/index.d.ts';
|
|
12
12
|
export * from './indexes/index.d.ts';
|
|
13
13
|
export * from './metrics/index.d.ts';
|
|
14
|
-
export * from './persisters/index.d.ts';
|
|
15
|
-
export * from './synchronizers/index.d.ts';
|
|
16
14
|
export * from './queries/index.d.ts';
|
|
17
15
|
export * from './relationships/index.d.ts';
|
|
18
16
|
export * from './mergeable-store/index.d.ts';
|
|
@@ -19,23 +19,28 @@
|
|
|
19
19
|
* |Sqlite3Persister|SQLite in Node, via [sqlite3](https://github.com/TryGhost/node-sqlite3)|Yes|Yes*
|
|
20
20
|
* |SqliteWasmPersister|SQLite in a browser, via [sqlite-wasm](https://github.com/tomayac/sqlite-wasm)|Yes|Yes*
|
|
21
21
|
* |ExpoSqlitePersister|SQLite in React Native, via [expo-sqlite](https://github.com/expo/expo/tree/main/packages/expo-sqlite)|Yes|Yes*
|
|
22
|
+
* |PostgresPersister|PostgreSQL, via [postgres](https://github.com/porsager/postgres)|Yes|Yes*
|
|
23
|
+
* |PglitePersister|PostgreSQL, via [PGlite](https://github.com/electric-sql/pglite)|Yes|Yes*
|
|
22
24
|
* |CrSqliteWasmPersister|SQLite CRDTs, via [cr-sqlite-wasm](https://github.com/vlcn-io/cr-sqlite)|Yes|No
|
|
23
25
|
* |ElectricSqlPersister|Electric SQL, via [electric-sql](https://github.com/electric-sql/electric)|Yes|No
|
|
24
26
|
* |LibSqlPersister|LibSQL for Turso, via [libsql-client](https://github.com/tursodatabase/libsql-client-ts)|Yes|No
|
|
25
27
|
* |PowerSyncPersister|PowerSync, via [powersync-sdk](https://github.com/powersync-ja/powersync-js)|Yes|No
|
|
26
|
-
* |PostgresPersister|PostgreSQL, via [postgres](https://github.com/porsager/postgres)|Yes|No
|
|
27
|
-
* |PglitePersister|PostgreSQL, via [PGlite](https://github.com/electric-sql/pglite)|Yes|No
|
|
28
28
|
* |YjsPersister|Yjs CRDTs, via [yjs](https://github.com/yjs/yjs)|Yes|No
|
|
29
29
|
* |AutomergePersister|Automerge CRDTs, via [automerge-repo](https://github.com/automerge/automerge-repo)|Yes|No
|
|
30
30
|
* |PartyKitPersister|[PartyKit](https://www.partykit.io/), via the persister-partykit-server module|Yes|No|
|
|
31
31
|
*
|
|
32
|
-
* (*) Note that SQLite-based Persisters can currently only
|
|
33
|
-
* MergeableStore data when
|
|
34
|
-
*
|
|
32
|
+
* (*) Note that SQLite- and PostgreSQL-based Persisters can currently only
|
|
33
|
+
* persist MergeableStore data when used with the JSON-based DpcJson mode, and
|
|
34
|
+
* not when using the DpcTabular mode.
|
|
35
35
|
*
|
|
36
36
|
* Since persistence requirements can be different for every app, the
|
|
37
37
|
* createCustomPersister function in this module can also be used to easily
|
|
38
38
|
* create a fully customized way to save and load Store data.
|
|
39
|
+
*
|
|
40
|
+
* Similarly, the createCustomSqlitePersister function and
|
|
41
|
+
* createCustomPostgreSqlPersister function can be used to build Persister objects
|
|
42
|
+
* against SQLite and PostgreSQL SDKs (or forks) that are not already included
|
|
43
|
+
* with TinyBase.
|
|
39
44
|
* @see Persistence guides
|
|
40
45
|
* @see Countries demo
|
|
41
46
|
* @see Todo App demos
|
|
@@ -19,23 +19,28 @@
|
|
|
19
19
|
* |Sqlite3Persister|SQLite in Node, via [sqlite3](https://github.com/TryGhost/node-sqlite3)|Yes|Yes*
|
|
20
20
|
* |SqliteWasmPersister|SQLite in a browser, via [sqlite-wasm](https://github.com/tomayac/sqlite-wasm)|Yes|Yes*
|
|
21
21
|
* |ExpoSqlitePersister|SQLite in React Native, via [expo-sqlite](https://github.com/expo/expo/tree/main/packages/expo-sqlite)|Yes|Yes*
|
|
22
|
+
* |PostgresPersister|PostgreSQL, via [postgres](https://github.com/porsager/postgres)|Yes|Yes*
|
|
23
|
+
* |PglitePersister|PostgreSQL, via [PGlite](https://github.com/electric-sql/pglite)|Yes|Yes*
|
|
22
24
|
* |CrSqliteWasmPersister|SQLite CRDTs, via [cr-sqlite-wasm](https://github.com/vlcn-io/cr-sqlite)|Yes|No
|
|
23
25
|
* |ElectricSqlPersister|Electric SQL, via [electric-sql](https://github.com/electric-sql/electric)|Yes|No
|
|
24
26
|
* |LibSqlPersister|LibSQL for Turso, via [libsql-client](https://github.com/tursodatabase/libsql-client-ts)|Yes|No
|
|
25
27
|
* |PowerSyncPersister|PowerSync, via [powersync-sdk](https://github.com/powersync-ja/powersync-js)|Yes|No
|
|
26
|
-
* |PostgresPersister|PostgreSQL, via [postgres](https://github.com/porsager/postgres)|Yes|No
|
|
27
|
-
* |PglitePersister|PostgreSQL, via [PGlite](https://github.com/electric-sql/pglite)|Yes|No
|
|
28
28
|
* |YjsPersister|Yjs CRDTs, via [yjs](https://github.com/yjs/yjs)|Yes|No
|
|
29
29
|
* |AutomergePersister|Automerge CRDTs, via [automerge-repo](https://github.com/automerge/automerge-repo)|Yes|No
|
|
30
30
|
* |PartyKitPersister|[PartyKit](https://www.partykit.io/), via the persister-partykit-server module|Yes|No|
|
|
31
31
|
*
|
|
32
|
-
* (*) Note that SQLite-based Persisters can currently only
|
|
33
|
-
* MergeableStore data when
|
|
34
|
-
*
|
|
32
|
+
* (*) Note that SQLite- and PostgreSQL-based Persisters can currently only
|
|
33
|
+
* persist MergeableStore data when used with the JSON-based DpcJson mode, and
|
|
34
|
+
* not when using the DpcTabular mode.
|
|
35
35
|
*
|
|
36
36
|
* Since persistence requirements can be different for every app, the
|
|
37
37
|
* createCustomPersister function in this module can also be used to easily
|
|
38
38
|
* create a fully customized way to save and load Store data.
|
|
39
|
+
*
|
|
40
|
+
* Similarly, the createCustomSqlitePersister function and
|
|
41
|
+
* createCustomPostgreSqlPersister function can be used to build Persister objects
|
|
42
|
+
* against SQLite and PostgreSQL SDKs (or forks) that are not already included
|
|
43
|
+
* with TinyBase.
|
|
39
44
|
* @see Persistence guides
|
|
40
45
|
* @see Countries demo
|
|
41
46
|
* @see Todo App demos
|
|
@@ -46,7 +46,7 @@ export interface PartyKitPersister extends Persister {
|
|
|
46
46
|
* then gets the PartySocket back out again.
|
|
47
47
|
*
|
|
48
48
|
* ```js yolo
|
|
49
|
-
* import PartySocket from 'partysocket';
|
|
49
|
+
* import {PartySocket} from 'partysocket';
|
|
50
50
|
* import {createPartyKitPersister} from 'tinybase/persisters/persister-partykit-client';
|
|
51
51
|
* import {createStore} from 'tinybase';
|
|
52
52
|
*
|
|
@@ -166,7 +166,7 @@ export type PartyKitPersisterConfig = {
|
|
|
166
166
|
* browser's IndexedDB storage.
|
|
167
167
|
*
|
|
168
168
|
* ```js yolo
|
|
169
|
-
* import PartySocket from 'partysocket';
|
|
169
|
+
* import {PartySocket} from 'partysocket';
|
|
170
170
|
* import {createPartyKitPersister} from 'tinybase/persisters/persister-partykit-client';
|
|
171
171
|
* import {createStore} from 'tinybase';
|
|
172
172
|
*
|
|
@@ -46,7 +46,7 @@ export interface PartyKitPersister extends Persister {
|
|
|
46
46
|
* then gets the PartySocket back out again.
|
|
47
47
|
*
|
|
48
48
|
* ```js yolo
|
|
49
|
-
* import PartySocket from 'partysocket';
|
|
49
|
+
* import {PartySocket} from 'partysocket';
|
|
50
50
|
* import {createPartyKitPersister} from 'tinybase/persisters/persister-partykit-client';
|
|
51
51
|
* import {createStore} from 'tinybase';
|
|
52
52
|
*
|
|
@@ -166,7 +166,7 @@ export type PartyKitPersisterConfig = {
|
|
|
166
166
|
* browser's IndexedDB storage.
|
|
167
167
|
*
|
|
168
168
|
* ```js yolo
|
|
169
|
-
* import PartySocket from 'partysocket';
|
|
169
|
+
* import {PartySocket} from 'partysocket';
|
|
170
170
|
* import {createPartyKitPersister} from 'tinybase/persisters/persister-partykit-client';
|
|
171
171
|
* import {createStore} from 'tinybase';
|
|
172
172
|
*
|
|
@@ -50,7 +50,7 @@ export interface PartyKitPersister<Schemas extends OptionalSchemas>
|
|
|
50
50
|
* then gets the PartySocket back out again.
|
|
51
51
|
*
|
|
52
52
|
* ```js yolo
|
|
53
|
-
* import PartySocket from 'partysocket';
|
|
53
|
+
* import {PartySocket} from 'partysocket';
|
|
54
54
|
* import {createPartyKitPersister} from 'tinybase/persisters/persister-partykit-client';
|
|
55
55
|
* import {createStore} from 'tinybase';
|
|
56
56
|
*
|
|
@@ -181,7 +181,7 @@ export type PartyKitPersisterConfig = {
|
|
|
181
181
|
* browser's IndexedDB storage.
|
|
182
182
|
*
|
|
183
183
|
* ```js yolo
|
|
184
|
-
* import PartySocket from 'partysocket';
|
|
184
|
+
* import {PartySocket} from 'partysocket';
|
|
185
185
|
* import {createPartyKitPersister} from 'tinybase/persisters/persister-partykit-client';
|
|
186
186
|
* import {createStore} from 'tinybase';
|
|
187
187
|
*
|
|
@@ -50,7 +50,7 @@ export interface PartyKitPersister<Schemas extends OptionalSchemas>
|
|
|
50
50
|
* then gets the PartySocket back out again.
|
|
51
51
|
*
|
|
52
52
|
* ```js yolo
|
|
53
|
-
* import PartySocket from 'partysocket';
|
|
53
|
+
* import {PartySocket} from 'partysocket';
|
|
54
54
|
* import {createPartyKitPersister} from 'tinybase/persisters/persister-partykit-client';
|
|
55
55
|
* import {createStore} from 'tinybase';
|
|
56
56
|
*
|
|
@@ -181,7 +181,7 @@ export type PartyKitPersisterConfig = {
|
|
|
181
181
|
* browser's IndexedDB storage.
|
|
182
182
|
*
|
|
183
183
|
* ```js yolo
|
|
184
|
-
* import PartySocket from 'partysocket';
|
|
184
|
+
* import {PartySocket} from 'partysocket';
|
|
185
185
|
* import {createPartyKitPersister} from 'tinybase/persisters/persister-partykit-client';
|
|
186
186
|
* import {createStore} from 'tinybase';
|
|
187
187
|
*
|
|
@@ -19,23 +19,28 @@
|
|
|
19
19
|
* |Sqlite3Persister|SQLite in Node, via [sqlite3](https://github.com/TryGhost/node-sqlite3)|Yes|Yes*
|
|
20
20
|
* |SqliteWasmPersister|SQLite in a browser, via [sqlite-wasm](https://github.com/tomayac/sqlite-wasm)|Yes|Yes*
|
|
21
21
|
* |ExpoSqlitePersister|SQLite in React Native, via [expo-sqlite](https://github.com/expo/expo/tree/main/packages/expo-sqlite)|Yes|Yes*
|
|
22
|
+
* |PostgresPersister|PostgreSQL, via [postgres](https://github.com/porsager/postgres)|Yes|Yes*
|
|
23
|
+
* |PglitePersister|PostgreSQL, via [PGlite](https://github.com/electric-sql/pglite)|Yes|Yes*
|
|
22
24
|
* |CrSqliteWasmPersister|SQLite CRDTs, via [cr-sqlite-wasm](https://github.com/vlcn-io/cr-sqlite)|Yes|No
|
|
23
25
|
* |ElectricSqlPersister|Electric SQL, via [electric-sql](https://github.com/electric-sql/electric)|Yes|No
|
|
24
26
|
* |LibSqlPersister|LibSQL for Turso, via [libsql-client](https://github.com/tursodatabase/libsql-client-ts)|Yes|No
|
|
25
27
|
* |PowerSyncPersister|PowerSync, via [powersync-sdk](https://github.com/powersync-ja/powersync-js)|Yes|No
|
|
26
|
-
* |PostgresPersister|PostgreSQL, via [postgres](https://github.com/porsager/postgres)|Yes|No
|
|
27
|
-
* |PglitePersister|PostgreSQL, via [PGlite](https://github.com/electric-sql/pglite)|Yes|No
|
|
28
28
|
* |YjsPersister|Yjs CRDTs, via [yjs](https://github.com/yjs/yjs)|Yes|No
|
|
29
29
|
* |AutomergePersister|Automerge CRDTs, via [automerge-repo](https://github.com/automerge/automerge-repo)|Yes|No
|
|
30
30
|
* |PartyKitPersister|[PartyKit](https://www.partykit.io/), via the persister-partykit-server module|Yes|No|
|
|
31
31
|
*
|
|
32
|
-
* (*) Note that SQLite-based Persisters can currently only
|
|
33
|
-
* MergeableStore data when
|
|
34
|
-
*
|
|
32
|
+
* (*) Note that SQLite- and PostgreSQL-based Persisters can currently only
|
|
33
|
+
* persist MergeableStore data when used with the JSON-based DpcJson mode, and
|
|
34
|
+
* not when using the DpcTabular mode.
|
|
35
35
|
*
|
|
36
36
|
* Since persistence requirements can be different for every app, the
|
|
37
37
|
* createCustomPersister function in this module can also be used to easily
|
|
38
38
|
* create a fully customized way to save and load Store data.
|
|
39
|
+
*
|
|
40
|
+
* Similarly, the createCustomSqlitePersister function and
|
|
41
|
+
* createCustomPostgreSqlPersister function can be used to build Persister objects
|
|
42
|
+
* against SQLite and PostgreSQL SDKs (or forks) that are not already included
|
|
43
|
+
* with TinyBase.
|
|
39
44
|
* @see Persistence guides
|
|
40
45
|
* @see Countries demo
|
|
41
46
|
* @see Todo App demos
|
|
@@ -19,23 +19,28 @@
|
|
|
19
19
|
* |Sqlite3Persister|SQLite in Node, via [sqlite3](https://github.com/TryGhost/node-sqlite3)|Yes|Yes*
|
|
20
20
|
* |SqliteWasmPersister|SQLite in a browser, via [sqlite-wasm](https://github.com/tomayac/sqlite-wasm)|Yes|Yes*
|
|
21
21
|
* |ExpoSqlitePersister|SQLite in React Native, via [expo-sqlite](https://github.com/expo/expo/tree/main/packages/expo-sqlite)|Yes|Yes*
|
|
22
|
+
* |PostgresPersister|PostgreSQL, via [postgres](https://github.com/porsager/postgres)|Yes|Yes*
|
|
23
|
+
* |PglitePersister|PostgreSQL, via [PGlite](https://github.com/electric-sql/pglite)|Yes|Yes*
|
|
22
24
|
* |CrSqliteWasmPersister|SQLite CRDTs, via [cr-sqlite-wasm](https://github.com/vlcn-io/cr-sqlite)|Yes|No
|
|
23
25
|
* |ElectricSqlPersister|Electric SQL, via [electric-sql](https://github.com/electric-sql/electric)|Yes|No
|
|
24
26
|
* |LibSqlPersister|LibSQL for Turso, via [libsql-client](https://github.com/tursodatabase/libsql-client-ts)|Yes|No
|
|
25
27
|
* |PowerSyncPersister|PowerSync, via [powersync-sdk](https://github.com/powersync-ja/powersync-js)|Yes|No
|
|
26
|
-
* |PostgresPersister|PostgreSQL, via [postgres](https://github.com/porsager/postgres)|Yes|No
|
|
27
|
-
* |PglitePersister|PostgreSQL, via [PGlite](https://github.com/electric-sql/pglite)|Yes|No
|
|
28
28
|
* |YjsPersister|Yjs CRDTs, via [yjs](https://github.com/yjs/yjs)|Yes|No
|
|
29
29
|
* |AutomergePersister|Automerge CRDTs, via [automerge-repo](https://github.com/automerge/automerge-repo)|Yes|No
|
|
30
30
|
* |PartyKitPersister|[PartyKit](https://www.partykit.io/), via the persister-partykit-server module|Yes|No|
|
|
31
31
|
*
|
|
32
|
-
* (*) Note that SQLite-based Persisters can currently only
|
|
33
|
-
* MergeableStore data when
|
|
34
|
-
*
|
|
32
|
+
* (*) Note that SQLite- and PostgreSQL-based Persisters can currently only
|
|
33
|
+
* persist MergeableStore data when used with the JSON-based DpcJson mode, and
|
|
34
|
+
* not when using the DpcTabular mode.
|
|
35
35
|
*
|
|
36
36
|
* Since persistence requirements can be different for every app, the
|
|
37
37
|
* createCustomPersister function in this module can also be used to easily
|
|
38
38
|
* create a fully customized way to save and load Store data.
|
|
39
|
+
*
|
|
40
|
+
* Similarly, the createCustomSqlitePersister function and
|
|
41
|
+
* createCustomPostgreSqlPersister function can be used to build Persister objects
|
|
42
|
+
* against SQLite and PostgreSQL SDKs (or forks) that are not already included
|
|
43
|
+
* with TinyBase.
|
|
39
44
|
* @see Persistence guides
|
|
40
45
|
* @see Countries demo
|
|
41
46
|
* @see Todo App demos
|
|
@@ -124,7 +124,7 @@ export interface WsServer {
|
|
|
124
124
|
* @category Getter
|
|
125
125
|
* @since v5.0.0
|
|
126
126
|
*/
|
|
127
|
-
getWebSocketServer
|
|
127
|
+
getWebSocketServer(): WebSocketServer;
|
|
128
128
|
/**
|
|
129
129
|
* The getPathIds method returns the active paths that the WsServer is
|
|
130
130
|
* handling.
|
|
@@ -174,7 +174,7 @@ export interface WsServer {
|
|
|
174
174
|
* @category Getter
|
|
175
175
|
* @since v5.0.0
|
|
176
176
|
*/
|
|
177
|
-
getPathIds
|
|
177
|
+
getPathIds(): Ids;
|
|
178
178
|
/**
|
|
179
179
|
* The getClientIds method method returns the active clients that the WsServer
|
|
180
180
|
* is handling for a given path.
|
|
@@ -222,7 +222,7 @@ export interface WsServer {
|
|
|
222
222
|
* @category Getter
|
|
223
223
|
* @since v5.0.0
|
|
224
224
|
*/
|
|
225
|
-
getClientIds
|
|
225
|
+
getClientIds(pathId: Id): Ids;
|
|
226
226
|
/**
|
|
227
227
|
* The addPathIdsListener method registers a listener function with the
|
|
228
228
|
* WsServer that will be called whenever there is a change in the active paths
|
|
@@ -282,7 +282,7 @@ export interface WsServer {
|
|
|
282
282
|
* @category Listener
|
|
283
283
|
* @since v5.0.0
|
|
284
284
|
*/
|
|
285
|
-
addPathIdsListener
|
|
285
|
+
addPathIdsListener(listener: PathIdsListener): Id;
|
|
286
286
|
/**
|
|
287
287
|
* The addClientIdsListener method registers a listener function with the
|
|
288
288
|
* WsServer that will be called whenever there is a change in the clients
|
|
@@ -383,7 +383,7 @@ export interface WsServer {
|
|
|
383
383
|
* @category Listener
|
|
384
384
|
* @since v5.0.0
|
|
385
385
|
*/
|
|
386
|
-
addClientIdsListener
|
|
386
|
+
addClientIdsListener(pathId: IdOrNull, listener: ClientIdsListener): Id;
|
|
387
387
|
/**
|
|
388
388
|
* The delListener method removes a listener that was previously added to the
|
|
389
389
|
* WsServer.
|
|
@@ -462,7 +462,7 @@ export interface WsServer {
|
|
|
462
462
|
* @category Development
|
|
463
463
|
* @since v5.0.0
|
|
464
464
|
*/
|
|
465
|
-
getStats
|
|
465
|
+
getStats(): WsServerStats;
|
|
466
466
|
/**
|
|
467
467
|
* The destroy method provides a way to clean up the server at the end of its
|
|
468
468
|
* use.
|
|
@@ -490,7 +490,7 @@ export interface WsServer {
|
|
|
490
490
|
* @category Getter
|
|
491
491
|
* @since v5.0.0
|
|
492
492
|
*/
|
|
493
|
-
destroy
|
|
493
|
+
destroy(): void;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
/**
|
|
@@ -124,7 +124,7 @@ export interface WsServer {
|
|
|
124
124
|
* @category Getter
|
|
125
125
|
* @since v5.0.0
|
|
126
126
|
*/
|
|
127
|
-
getWebSocketServer
|
|
127
|
+
getWebSocketServer(): WebSocketServer;
|
|
128
128
|
/**
|
|
129
129
|
* The getPathIds method returns the active paths that the WsServer is
|
|
130
130
|
* handling.
|
|
@@ -174,7 +174,7 @@ export interface WsServer {
|
|
|
174
174
|
* @category Getter
|
|
175
175
|
* @since v5.0.0
|
|
176
176
|
*/
|
|
177
|
-
getPathIds
|
|
177
|
+
getPathIds(): Ids;
|
|
178
178
|
/**
|
|
179
179
|
* The getClientIds method method returns the active clients that the WsServer
|
|
180
180
|
* is handling for a given path.
|
|
@@ -222,7 +222,7 @@ export interface WsServer {
|
|
|
222
222
|
* @category Getter
|
|
223
223
|
* @since v5.0.0
|
|
224
224
|
*/
|
|
225
|
-
getClientIds
|
|
225
|
+
getClientIds(pathId: Id): Ids;
|
|
226
226
|
/**
|
|
227
227
|
* The addPathIdsListener method registers a listener function with the
|
|
228
228
|
* WsServer that will be called whenever there is a change in the active paths
|
|
@@ -282,7 +282,7 @@ export interface WsServer {
|
|
|
282
282
|
* @category Listener
|
|
283
283
|
* @since v5.0.0
|
|
284
284
|
*/
|
|
285
|
-
addPathIdsListener
|
|
285
|
+
addPathIdsListener(listener: PathIdsListener): Id;
|
|
286
286
|
/**
|
|
287
287
|
* The addClientIdsListener method registers a listener function with the
|
|
288
288
|
* WsServer that will be called whenever there is a change in the clients
|
|
@@ -383,7 +383,7 @@ export interface WsServer {
|
|
|
383
383
|
* @category Listener
|
|
384
384
|
* @since v5.0.0
|
|
385
385
|
*/
|
|
386
|
-
addClientIdsListener
|
|
386
|
+
addClientIdsListener(pathId: IdOrNull, listener: ClientIdsListener): Id;
|
|
387
387
|
/**
|
|
388
388
|
* The delListener method removes a listener that was previously added to the
|
|
389
389
|
* WsServer.
|
|
@@ -462,7 +462,7 @@ export interface WsServer {
|
|
|
462
462
|
* @category Development
|
|
463
463
|
* @since v5.0.0
|
|
464
464
|
*/
|
|
465
|
-
getStats
|
|
465
|
+
getStats(): WsServerStats;
|
|
466
466
|
/**
|
|
467
467
|
* The destroy method provides a way to clean up the server at the end of its
|
|
468
468
|
* use.
|
|
@@ -490,7 +490,7 @@ export interface WsServer {
|
|
|
490
490
|
* @category Getter
|
|
491
491
|
* @since v5.0.0
|
|
492
492
|
*/
|
|
493
|
-
destroy
|
|
493
|
+
destroy(): void;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
/**
|
|
@@ -130,7 +130,7 @@ export interface WsServer {
|
|
|
130
130
|
* @category Getter
|
|
131
131
|
* @since v5.0.0
|
|
132
132
|
*/
|
|
133
|
-
getWebSocketServer
|
|
133
|
+
getWebSocketServer(): WebSocketServer;
|
|
134
134
|
/**
|
|
135
135
|
* The getPathIds method returns the active paths that the WsServer is
|
|
136
136
|
* handling.
|
|
@@ -180,7 +180,7 @@ export interface WsServer {
|
|
|
180
180
|
* @category Getter
|
|
181
181
|
* @since v5.0.0
|
|
182
182
|
*/
|
|
183
|
-
getPathIds
|
|
183
|
+
getPathIds(): Ids;
|
|
184
184
|
/**
|
|
185
185
|
* The getClientIds method method returns the active clients that the WsServer
|
|
186
186
|
* is handling for a given path.
|
|
@@ -228,7 +228,7 @@ export interface WsServer {
|
|
|
228
228
|
* @category Getter
|
|
229
229
|
* @since v5.0.0
|
|
230
230
|
*/
|
|
231
|
-
getClientIds
|
|
231
|
+
getClientIds(pathId: Id): Ids;
|
|
232
232
|
/**
|
|
233
233
|
* The addPathIdsListener method registers a listener function with the
|
|
234
234
|
* WsServer that will be called whenever there is a change in the active paths
|
|
@@ -288,7 +288,7 @@ export interface WsServer {
|
|
|
288
288
|
* @category Listener
|
|
289
289
|
* @since v5.0.0
|
|
290
290
|
*/
|
|
291
|
-
addPathIdsListener
|
|
291
|
+
addPathIdsListener(listener: PathIdsListener): Id;
|
|
292
292
|
/**
|
|
293
293
|
* The addClientIdsListener method registers a listener function with the
|
|
294
294
|
* WsServer that will be called whenever there is a change in the clients
|
|
@@ -389,7 +389,7 @@ export interface WsServer {
|
|
|
389
389
|
* @category Listener
|
|
390
390
|
* @since v5.0.0
|
|
391
391
|
*/
|
|
392
|
-
addClientIdsListener
|
|
392
|
+
addClientIdsListener(pathId: IdOrNull, listener: ClientIdsListener): Id;
|
|
393
393
|
/**
|
|
394
394
|
* The delListener method removes a listener that was previously added to the
|
|
395
395
|
* WsServer.
|
|
@@ -468,7 +468,7 @@ export interface WsServer {
|
|
|
468
468
|
* @category Development
|
|
469
469
|
* @since v5.0.0
|
|
470
470
|
*/
|
|
471
|
-
getStats
|
|
471
|
+
getStats(): WsServerStats;
|
|
472
472
|
/**
|
|
473
473
|
* The destroy method provides a way to clean up the server at the end of its
|
|
474
474
|
* use.
|
|
@@ -496,7 +496,7 @@ export interface WsServer {
|
|
|
496
496
|
* @category Getter
|
|
497
497
|
* @since v5.0.0
|
|
498
498
|
*/
|
|
499
|
-
destroy
|
|
499
|
+
destroy(): void;
|
|
500
500
|
}
|
|
501
501
|
|
|
502
502
|
/**
|
|
@@ -130,7 +130,7 @@ export interface WsServer {
|
|
|
130
130
|
* @category Getter
|
|
131
131
|
* @since v5.0.0
|
|
132
132
|
*/
|
|
133
|
-
getWebSocketServer
|
|
133
|
+
getWebSocketServer(): WebSocketServer;
|
|
134
134
|
/**
|
|
135
135
|
* The getPathIds method returns the active paths that the WsServer is
|
|
136
136
|
* handling.
|
|
@@ -180,7 +180,7 @@ export interface WsServer {
|
|
|
180
180
|
* @category Getter
|
|
181
181
|
* @since v5.0.0
|
|
182
182
|
*/
|
|
183
|
-
getPathIds
|
|
183
|
+
getPathIds(): Ids;
|
|
184
184
|
/**
|
|
185
185
|
* The getClientIds method method returns the active clients that the WsServer
|
|
186
186
|
* is handling for a given path.
|
|
@@ -228,7 +228,7 @@ export interface WsServer {
|
|
|
228
228
|
* @category Getter
|
|
229
229
|
* @since v5.0.0
|
|
230
230
|
*/
|
|
231
|
-
getClientIds
|
|
231
|
+
getClientIds(pathId: Id): Ids;
|
|
232
232
|
/**
|
|
233
233
|
* The addPathIdsListener method registers a listener function with the
|
|
234
234
|
* WsServer that will be called whenever there is a change in the active paths
|
|
@@ -288,7 +288,7 @@ export interface WsServer {
|
|
|
288
288
|
* @category Listener
|
|
289
289
|
* @since v5.0.0
|
|
290
290
|
*/
|
|
291
|
-
addPathIdsListener
|
|
291
|
+
addPathIdsListener(listener: PathIdsListener): Id;
|
|
292
292
|
/**
|
|
293
293
|
* The addClientIdsListener method registers a listener function with the
|
|
294
294
|
* WsServer that will be called whenever there is a change in the clients
|
|
@@ -389,7 +389,7 @@ export interface WsServer {
|
|
|
389
389
|
* @category Listener
|
|
390
390
|
* @since v5.0.0
|
|
391
391
|
*/
|
|
392
|
-
addClientIdsListener
|
|
392
|
+
addClientIdsListener(pathId: IdOrNull, listener: ClientIdsListener): Id;
|
|
393
393
|
/**
|
|
394
394
|
* The delListener method removes a listener that was previously added to the
|
|
395
395
|
* WsServer.
|
|
@@ -468,7 +468,7 @@ export interface WsServer {
|
|
|
468
468
|
* @category Development
|
|
469
469
|
* @since v5.0.0
|
|
470
470
|
*/
|
|
471
|
-
getStats
|
|
471
|
+
getStats(): WsServerStats;
|
|
472
472
|
/**
|
|
473
473
|
* The destroy method provides a way to clean up the server at the end of its
|
|
474
474
|
* use.
|
|
@@ -496,7 +496,7 @@ export interface WsServer {
|
|
|
496
496
|
* @category Getter
|
|
497
497
|
* @since v5.0.0
|
|
498
498
|
*/
|
|
499
|
-
destroy
|
|
499
|
+
destroy(): void;
|
|
500
500
|
}
|
|
501
501
|
|
|
502
502
|
/**
|
|
@@ -11,8 +11,6 @@ export * from '../checkpoints/with-schemas/index.d.cts';
|
|
|
11
11
|
export * from '../common/with-schemas/index.d.cts';
|
|
12
12
|
export * from '../indexes/with-schemas/index.d.cts';
|
|
13
13
|
export * from '../metrics/with-schemas/index.d.cts';
|
|
14
|
-
export * from '../persisters/with-schemas/index.d.cts';
|
|
15
|
-
export * from '../synchronizers/with-schemas/index.d.cts';
|
|
16
14
|
export * from '../queries/with-schemas/index.d.cts';
|
|
17
15
|
export * from '../relationships/with-schemas/index.d.cts';
|
|
18
16
|
export * from '../mergeable-store/with-schemas/index.d.cts';
|
|
@@ -11,8 +11,6 @@ export * from '../checkpoints/with-schemas/index.d.ts';
|
|
|
11
11
|
export * from '../common/with-schemas/index.d.ts';
|
|
12
12
|
export * from '../indexes/with-schemas/index.d.ts';
|
|
13
13
|
export * from '../metrics/with-schemas/index.d.ts';
|
|
14
|
-
export * from '../persisters/with-schemas/index.d.ts';
|
|
15
|
-
export * from '../synchronizers/with-schemas/index.d.ts';
|
|
16
14
|
export * from '../queries/with-schemas/index.d.ts';
|
|
17
15
|
export * from '../relationships/with-schemas/index.d.ts';
|
|
18
16
|
export * from '../mergeable-store/with-schemas/index.d.ts';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tinybase",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"author": "jamesgpearce",
|
|
5
5
|
"repository": "github:tinyplex/tinybase",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@automerge/automerge-repo": "^1.2.0",
|
|
24
|
-
"@electric-sql/pglite": "^0.2.
|
|
24
|
+
"@electric-sql/pglite": "^0.2.5",
|
|
25
25
|
"@libsql/client": "^0.10.0",
|
|
26
26
|
"@powersync/common": "^1.16.2",
|
|
27
|
-
"@sqlite.org/sqlite-wasm": "^3.46.1-
|
|
27
|
+
"@sqlite.org/sqlite-wasm": "^3.46.1-build3",
|
|
28
28
|
"@vlcn.io/crsqlite-wasm": "^0.16.0",
|
|
29
29
|
"electric-sql": "^0.12.1",
|
|
30
30
|
"expo": "^51.0.0",
|