tinybase 6.0.0 → 6.1.0-beta.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/_internal/ui-react/with-schemas/index.d.cts +1 -1
- package/@types/_internal/ui-react/with-schemas/index.d.ts +1 -1
- package/@types/index.d.cts +1 -1
- package/@types/index.d.ts +1 -1
- package/@types/persisters/persister-automerge/index.d.cts +1 -1
- package/@types/persisters/persister-automerge/index.d.ts +1 -1
- package/@types/persisters/persister-automerge/with-schemas/index.d.cts +1 -1
- package/@types/persisters/persister-automerge/with-schemas/index.d.ts +1 -1
- package/@types/persisters/persister-cr-sqlite-wasm/index.d.cts +1 -1
- package/@types/persisters/persister-cr-sqlite-wasm/index.d.ts +1 -1
- package/@types/persisters/persister-cr-sqlite-wasm/with-schemas/index.d.cts +1 -1
- package/@types/persisters/persister-cr-sqlite-wasm/with-schemas/index.d.ts +1 -1
- package/@types/persisters/persister-electric-sql/index.d.cts +4 -4
- package/@types/persisters/persister-electric-sql/index.d.ts +4 -4
- package/@types/persisters/persister-electric-sql/with-schemas/index.d.cts +4 -4
- package/@types/persisters/persister-electric-sql/with-schemas/index.d.ts +4 -4
- package/@types/persisters/persister-expo-sqlite/index.d.cts +1 -1
- package/@types/persisters/persister-expo-sqlite/index.d.ts +1 -1
- package/@types/persisters/persister-expo-sqlite/with-schemas/index.d.cts +1 -1
- package/@types/persisters/persister-expo-sqlite/with-schemas/index.d.ts +1 -1
- package/@types/persisters/persister-libsql/index.d.cts +1 -1
- package/@types/persisters/persister-libsql/index.d.ts +1 -1
- package/@types/persisters/persister-libsql/with-schemas/index.d.cts +1 -1
- package/@types/persisters/persister-libsql/with-schemas/index.d.ts +1 -1
- package/@types/persisters/persister-partykit-client/index.d.cts +1 -1
- package/@types/persisters/persister-partykit-client/index.d.ts +1 -1
- package/@types/persisters/persister-partykit-client/with-schemas/index.d.cts +1 -1
- package/@types/persisters/persister-partykit-client/with-schemas/index.d.ts +1 -1
- package/@types/persisters/persister-partykit-server/index.d.cts +7 -7
- package/@types/persisters/persister-partykit-server/index.d.ts +7 -7
- package/@types/persisters/persister-partykit-server/with-schemas/index.d.cts +1 -1
- package/@types/persisters/persister-partykit-server/with-schemas/index.d.ts +1 -1
- package/@types/persisters/persister-pglite/index.d.cts +1 -1
- package/@types/persisters/persister-pglite/index.d.ts +1 -1
- package/@types/persisters/persister-pglite/with-schemas/index.d.cts +1 -1
- package/@types/persisters/persister-pglite/with-schemas/index.d.ts +1 -1
- package/@types/persisters/persister-postgres/index.d.cts +1 -1
- package/@types/persisters/persister-postgres/index.d.ts +1 -1
- package/@types/persisters/persister-postgres/with-schemas/index.d.cts +1 -1
- package/@types/persisters/persister-postgres/with-schemas/index.d.ts +1 -1
- package/@types/persisters/persister-powersync/index.d.cts +1 -1
- package/@types/persisters/persister-powersync/index.d.ts +1 -1
- package/@types/persisters/persister-powersync/with-schemas/index.d.cts +1 -1
- package/@types/persisters/persister-powersync/with-schemas/index.d.ts +1 -1
- package/@types/persisters/persister-sqlite3/index.d.cts +1 -1
- package/@types/persisters/persister-sqlite3/index.d.ts +1 -1
- package/@types/persisters/persister-sqlite3/with-schemas/index.d.cts +1 -1
- package/@types/persisters/persister-sqlite3/with-schemas/index.d.ts +1 -1
- package/@types/persisters/persister-yjs/index.d.cts +1 -1
- package/@types/persisters/persister-yjs/index.d.ts +1 -1
- package/@types/persisters/persister-yjs/with-schemas/index.d.cts +1 -1
- package/@types/persisters/persister-yjs/with-schemas/index.d.ts +1 -1
- package/@types/synchronizers/synchronizer-ws-client/index.d.cts +1 -1
- package/@types/synchronizers/synchronizer-ws-client/index.d.ts +1 -1
- package/@types/synchronizers/synchronizer-ws-client/with-schemas/index.d.cts +1 -1
- package/@types/synchronizers/synchronizer-ws-client/with-schemas/index.d.ts +1 -1
- package/@types/synchronizers/synchronizer-ws-server/index.d.cts +1 -1
- package/@types/synchronizers/synchronizer-ws-server/index.d.ts +1 -1
- package/@types/synchronizers/synchronizer-ws-server/with-schemas/index.d.cts +1 -1
- package/@types/synchronizers/synchronizer-ws-server/with-schemas/index.d.ts +1 -1
- package/@types/synchronizers/synchronizer-ws-server-durable-object/index.d.cts +1 -1
- package/@types/synchronizers/synchronizer-ws-server-durable-object/index.d.ts +1 -1
- package/@types/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.d.cts +1 -1
- package/@types/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.d.ts +1 -1
- package/@types/ui-react/index.d.cts +3 -3
- package/@types/ui-react/index.d.ts +3 -3
- package/@types/ui-react/with-schemas/index.d.cts +1 -1
- package/@types/ui-react/with-schemas/index.d.ts +1 -1
- package/@types/ui-react-dom/index.d.cts +1 -1
- package/@types/ui-react-dom/index.d.ts +1 -1
- package/@types/ui-react-dom/with-schemas/index.d.cts +1 -1
- package/@types/ui-react-dom/with-schemas/index.d.ts +1 -1
- package/@types/ui-react-inspector/with-schemas/index.d.cts +1 -1
- package/@types/ui-react-inspector/with-schemas/index.d.ts +1 -1
- package/@types/with-schemas/index.d.cts +1 -1
- package/@types/with-schemas/index.d.ts +1 -1
- package/index.js +1564 -1564
- package/min/index.js +1 -1
- package/min/index.js.gz +0 -0
- package/min/persisters/index.js +1 -1
- package/min/persisters/index.js.gz +0 -0
- package/min/persisters/with-schemas/index.js +1 -1
- package/min/persisters/with-schemas/index.js.gz +0 -0
- package/min/ui-react/index.js +1 -1
- package/min/ui-react/index.js.gz +0 -0
- package/min/ui-react/with-schemas/index.js +1 -1
- package/min/ui-react/with-schemas/index.js.gz +0 -0
- package/min/with-schemas/index.js +1 -1
- package/min/with-schemas/index.js.gz +0 -0
- package/package.json +1 -4
- package/persisters/index.js +95 -95
- package/persisters/with-schemas/index.js +95 -95
- package/readme.md +13 -13
- package/releases.md +25 -25
- package/synchronizers/synchronizer-ws-server-durable-object/index.js +1 -1
- package/synchronizers/synchronizer-ws-server-durable-object/with-schemas/index.js +1 -1
- package/ui-react/index.js +64 -53
- package/ui-react/with-schemas/index.js +64 -53
- package/ui-react-dom/index.js +3 -3
- package/ui-react-dom/with-schemas/index.js +3 -3
- package/ui-react-inspector/index.js +4 -4
- package/ui-react-inspector/with-schemas/index.js +4 -4
- package/with-schemas/index.js +1564 -1564
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type {ComponentType, ReactElement} from 'react';
|
|
1
2
|
import type {Checkpoints} from '../../../checkpoints/with-schemas/index.d.cts';
|
|
2
3
|
import type {Callback, Id} from '../../../common/with-schemas/index.d.cts';
|
|
3
4
|
import type {Indexes} from '../../../indexes/with-schemas/index.d.cts';
|
|
@@ -18,7 +19,6 @@ import type {
|
|
|
18
19
|
TableIdFromSchema,
|
|
19
20
|
ValueIdFromSchema,
|
|
20
21
|
} from '../../store/with-schemas/index.d.cts';
|
|
21
|
-
import type {ComponentType, ReactElement} from 'react';
|
|
22
22
|
|
|
23
23
|
type StoreOrStoreId<Schemas extends OptionalSchemas> = Store<Schemas> | Id;
|
|
24
24
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type {ComponentType, ReactElement} from 'react';
|
|
1
2
|
import type {Checkpoints} from '../../../checkpoints/with-schemas/index.d.ts';
|
|
2
3
|
import type {Callback, Id} from '../../../common/with-schemas/index.d.ts';
|
|
3
4
|
import type {Indexes} from '../../../indexes/with-schemas/index.d.ts';
|
|
@@ -18,7 +19,6 @@ import type {
|
|
|
18
19
|
TableIdFromSchema,
|
|
19
20
|
ValueIdFromSchema,
|
|
20
21
|
} from '../../store/with-schemas/index.d.ts';
|
|
21
|
-
import type {ComponentType, ReactElement} from 'react';
|
|
22
22
|
|
|
23
23
|
type StoreOrStoreId<Schemas extends OptionalSchemas> = Store<Schemas> | Id;
|
|
24
24
|
|
package/@types/index.d.cts
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
export * from './checkpoints/index.d.cts';
|
|
11
11
|
export * from './common/index.d.cts';
|
|
12
12
|
export * from './indexes/index.d.cts';
|
|
13
|
+
export * from './mergeable-store/index.d.cts';
|
|
13
14
|
export * from './metrics/index.d.cts';
|
|
14
15
|
export * from './queries/index.d.cts';
|
|
15
16
|
export * from './relationships/index.d.cts';
|
|
16
|
-
export * from './mergeable-store/index.d.cts';
|
|
17
17
|
export * from './store/index.d.cts';
|
package/@types/index.d.ts
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
export * from './checkpoints/index.d.ts';
|
|
11
11
|
export * from './common/index.d.ts';
|
|
12
12
|
export * from './indexes/index.d.ts';
|
|
13
|
+
export * from './mergeable-store/index.d.ts';
|
|
13
14
|
export * from './metrics/index.d.ts';
|
|
14
15
|
export * from './queries/index.d.ts';
|
|
15
16
|
export * from './relationships/index.d.ts';
|
|
16
|
-
export * from './mergeable-store/index.d.ts';
|
|
17
17
|
export * from './store/index.d.ts';
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* @module persister-automerge
|
|
11
11
|
* @since v4.0.0
|
|
12
12
|
*/
|
|
13
|
+
import type {DocHandle} from '@automerge/automerge-repo';
|
|
13
14
|
import type {Store} from '../../store/index.d.cts';
|
|
14
15
|
import type {Persister} from '../index.d.cts';
|
|
15
|
-
import type {DocHandle} from '@automerge/automerge-repo';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* The AutomergePersister interface represents a Persister that lets you save
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
* @module persister-automerge
|
|
11
11
|
* @since v4.0.0
|
|
12
12
|
*/
|
|
13
|
+
import type {DocHandle} from '@automerge/automerge-repo';
|
|
13
14
|
import type {Store} from '../../store/index.d.ts';
|
|
14
15
|
import type {Persister} from '../index.d.ts';
|
|
15
|
-
import type {DocHandle} from '@automerge/automerge-repo';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* The AutomergePersister interface represents a Persister that lets you save
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
* @module persister-automerge
|
|
11
11
|
* @since v4.0.0
|
|
12
12
|
*/
|
|
13
|
+
import type {DocHandle} from '@automerge/automerge-repo';
|
|
13
14
|
import type {
|
|
14
15
|
OptionalSchemas,
|
|
15
16
|
Store,
|
|
16
17
|
} from '../../../store/with-schemas/index.d.cts';
|
|
17
18
|
import type {Persister} from '../../with-schemas/index.d.cts';
|
|
18
|
-
import type {DocHandle} from '@automerge/automerge-repo';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* The AutomergePersister interface represents a Persister that lets you save
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
* @module persister-automerge
|
|
11
11
|
* @since v4.0.0
|
|
12
12
|
*/
|
|
13
|
+
import type {DocHandle} from '@automerge/automerge-repo';
|
|
13
14
|
import type {
|
|
14
15
|
OptionalSchemas,
|
|
15
16
|
Store,
|
|
16
17
|
} from '../../../store/with-schemas/index.d.ts';
|
|
17
18
|
import type {Persister} from '../../with-schemas/index.d.ts';
|
|
18
|
-
import type {DocHandle} from '@automerge/automerge-repo';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* The AutomergePersister interface represents a Persister that lets you save
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @module persister-cr-sqlite-wasm
|
|
8
8
|
* @since v4.0.0
|
|
9
9
|
*/
|
|
10
|
+
import type {DB} from '@vlcn.io/crsqlite-wasm';
|
|
10
11
|
import type {Store} from '../../store/index.d.cts';
|
|
11
12
|
import type {DatabasePersisterConfig, Persister} from '../index.d.cts';
|
|
12
|
-
import type {DB} from '@vlcn.io/crsqlite-wasm';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The CrSqliteWasmPersister interface represents a Persister that lets you save
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @module persister-cr-sqlite-wasm
|
|
8
8
|
* @since v4.0.0
|
|
9
9
|
*/
|
|
10
|
+
import type {DB} from '@vlcn.io/crsqlite-wasm';
|
|
10
11
|
import type {Store} from '../../store/index.d.ts';
|
|
11
12
|
import type {DatabasePersisterConfig, Persister} from '../index.d.ts';
|
|
12
|
-
import type {DB} from '@vlcn.io/crsqlite-wasm';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The CrSqliteWasmPersister interface represents a Persister that lets you save
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @module persister-cr-sqlite-wasm
|
|
8
8
|
* @since v4.0.0
|
|
9
9
|
*/
|
|
10
|
+
import type {DB} from '@vlcn.io/crsqlite-wasm';
|
|
10
11
|
import type {
|
|
11
12
|
OptionalSchemas,
|
|
12
13
|
Store,
|
|
@@ -15,7 +16,6 @@ import type {
|
|
|
15
16
|
DatabasePersisterConfig,
|
|
16
17
|
Persister,
|
|
17
18
|
} from '../../with-schemas/index.d.cts';
|
|
18
|
-
import type {DB} from '@vlcn.io/crsqlite-wasm';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* The CrSqliteWasmPersister interface represents a Persister that lets you save
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @module persister-cr-sqlite-wasm
|
|
8
8
|
* @since v4.0.0
|
|
9
9
|
*/
|
|
10
|
+
import type {DB} from '@vlcn.io/crsqlite-wasm';
|
|
10
11
|
import type {
|
|
11
12
|
OptionalSchemas,
|
|
12
13
|
Store,
|
|
@@ -15,7 +16,6 @@ import type {
|
|
|
15
16
|
DatabasePersisterConfig,
|
|
16
17
|
Persister,
|
|
17
18
|
} from '../../with-schemas/index.d.ts';
|
|
18
|
-
import type {DB} from '@vlcn.io/crsqlite-wasm';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* The CrSqliteWasmPersister interface represents a Persister that lets you save
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @module persister-electric-sql
|
|
8
8
|
* @since v4.6.0
|
|
9
9
|
*/
|
|
10
|
+
import type {ElectricClient} from 'electric-sql/client/model';
|
|
10
11
|
import type {Store} from '../../store/index.d.cts';
|
|
11
12
|
import type {DatabasePersisterConfig, Persister} from '../index.d.cts';
|
|
12
|
-
import type {ElectricClient} from 'electric-sql/client/model';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The ElectricSqlPersister interface represents a Persister that lets you save
|
|
@@ -34,10 +34,10 @@ export interface ElectricSqlPersister extends Persister {
|
|
|
34
34
|
* then gets the Electric client back out again.
|
|
35
35
|
*
|
|
36
36
|
* ```js yolo
|
|
37
|
-
* import {schema} from './generated/client';
|
|
38
37
|
* import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
|
|
39
38
|
* import {createStore} from 'tinybase';
|
|
40
39
|
* import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
|
|
40
|
+
* import {schema} from './generated/client';
|
|
41
41
|
*
|
|
42
42
|
* const electricClient = await electrify(
|
|
43
43
|
* await ElectricDatabase.init('electric.db', ''),
|
|
@@ -103,10 +103,10 @@ export interface ElectricSqlPersister extends Persister {
|
|
|
103
103
|
* into the Store.
|
|
104
104
|
*
|
|
105
105
|
* ```js yolo
|
|
106
|
-
* import {schema} from './generated/client';
|
|
107
106
|
* import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
|
|
108
107
|
* import {createStore} from 'tinybase';
|
|
109
108
|
* import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
|
|
109
|
+
* import {schema} from './generated/client';
|
|
110
110
|
*
|
|
111
111
|
* const electricClient = await electrify(
|
|
112
112
|
* await ElectricDatabase.init('electric.db', ''),
|
|
@@ -144,10 +144,10 @@ export interface ElectricSqlPersister extends Persister {
|
|
|
144
144
|
* a local ElectricSql database with tabular mapping.
|
|
145
145
|
*
|
|
146
146
|
* ```js yolo
|
|
147
|
-
* import {schema} from './generated/client';
|
|
148
147
|
* import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
|
|
149
148
|
* import {createStore} from 'tinybase';
|
|
150
149
|
* import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
|
|
150
|
+
* import {schema} from './generated/client';
|
|
151
151
|
*
|
|
152
152
|
* const electricClient = await electrify(
|
|
153
153
|
* await ElectricDatabase.init('electric.db', ''),
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @module persister-electric-sql
|
|
8
8
|
* @since v4.6.0
|
|
9
9
|
*/
|
|
10
|
+
import type {ElectricClient} from 'electric-sql/client/model';
|
|
10
11
|
import type {Store} from '../../store/index.d.ts';
|
|
11
12
|
import type {DatabasePersisterConfig, Persister} from '../index.d.ts';
|
|
12
|
-
import type {ElectricClient} from 'electric-sql/client/model';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The ElectricSqlPersister interface represents a Persister that lets you save
|
|
@@ -34,10 +34,10 @@ export interface ElectricSqlPersister extends Persister {
|
|
|
34
34
|
* then gets the Electric client back out again.
|
|
35
35
|
*
|
|
36
36
|
* ```js yolo
|
|
37
|
-
* import {schema} from './generated/client';
|
|
38
37
|
* import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
|
|
39
38
|
* import {createStore} from 'tinybase';
|
|
40
39
|
* import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
|
|
40
|
+
* import {schema} from './generated/client';
|
|
41
41
|
*
|
|
42
42
|
* const electricClient = await electrify(
|
|
43
43
|
* await ElectricDatabase.init('electric.db', ''),
|
|
@@ -103,10 +103,10 @@ export interface ElectricSqlPersister extends Persister {
|
|
|
103
103
|
* into the Store.
|
|
104
104
|
*
|
|
105
105
|
* ```js yolo
|
|
106
|
-
* import {schema} from './generated/client';
|
|
107
106
|
* import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
|
|
108
107
|
* import {createStore} from 'tinybase';
|
|
109
108
|
* import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
|
|
109
|
+
* import {schema} from './generated/client';
|
|
110
110
|
*
|
|
111
111
|
* const electricClient = await electrify(
|
|
112
112
|
* await ElectricDatabase.init('electric.db', ''),
|
|
@@ -144,10 +144,10 @@ export interface ElectricSqlPersister extends Persister {
|
|
|
144
144
|
* a local ElectricSql database with tabular mapping.
|
|
145
145
|
*
|
|
146
146
|
* ```js yolo
|
|
147
|
-
* import {schema} from './generated/client';
|
|
148
147
|
* import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
|
|
149
148
|
* import {createStore} from 'tinybase';
|
|
150
149
|
* import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
|
|
150
|
+
* import {schema} from './generated/client';
|
|
151
151
|
*
|
|
152
152
|
* const electricClient = await electrify(
|
|
153
153
|
* await ElectricDatabase.init('electric.db', ''),
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @module persister-electric-sql
|
|
8
8
|
* @since v4.6.0
|
|
9
9
|
*/
|
|
10
|
+
import type {ElectricClient} from 'electric-sql/client/model';
|
|
10
11
|
import type {
|
|
11
12
|
OptionalSchemas,
|
|
12
13
|
Store,
|
|
@@ -15,7 +16,6 @@ import type {
|
|
|
15
16
|
DatabasePersisterConfig,
|
|
16
17
|
Persister,
|
|
17
18
|
} from '../../with-schemas/index.d.cts';
|
|
18
|
-
import type {ElectricClient} from 'electric-sql/client/model';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* The ElectricSqlPersister interface represents a Persister that lets you save
|
|
@@ -41,10 +41,10 @@ export interface ElectricSqlPersister<Schemas extends OptionalSchemas>
|
|
|
41
41
|
* then gets the Electric client back out again.
|
|
42
42
|
*
|
|
43
43
|
* ```js yolo
|
|
44
|
-
* import {schema} from './generated/client';
|
|
45
44
|
* import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
|
|
46
45
|
* import {createStore} from 'tinybase';
|
|
47
46
|
* import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
|
|
47
|
+
* import {schema} from './generated/client';
|
|
48
48
|
*
|
|
49
49
|
* const electricClient = await electrify(
|
|
50
50
|
* await ElectricDatabase.init('electric.db', ''),
|
|
@@ -122,10 +122,10 @@ export interface ElectricSqlPersister<Schemas extends OptionalSchemas>
|
|
|
122
122
|
* into the Store.
|
|
123
123
|
*
|
|
124
124
|
* ```js yolo
|
|
125
|
-
* import {schema} from './generated/client';
|
|
126
125
|
* import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
|
|
127
126
|
* import {createStore} from 'tinybase';
|
|
128
127
|
* import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
|
|
128
|
+
* import {schema} from './generated/client';
|
|
129
129
|
*
|
|
130
130
|
* const electricClient = await electrify(
|
|
131
131
|
* await ElectricDatabase.init('electric.db', ''),
|
|
@@ -163,10 +163,10 @@ export interface ElectricSqlPersister<Schemas extends OptionalSchemas>
|
|
|
163
163
|
* a local ElectricSql database with tabular mapping.
|
|
164
164
|
*
|
|
165
165
|
* ```js yolo
|
|
166
|
-
* import {schema} from './generated/client';
|
|
167
166
|
* import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
|
|
168
167
|
* import {createStore} from 'tinybase';
|
|
169
168
|
* import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
|
|
169
|
+
* import {schema} from './generated/client';
|
|
170
170
|
*
|
|
171
171
|
* const electricClient = await electrify(
|
|
172
172
|
* await ElectricDatabase.init('electric.db', ''),
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @module persister-electric-sql
|
|
8
8
|
* @since v4.6.0
|
|
9
9
|
*/
|
|
10
|
+
import type {ElectricClient} from 'electric-sql/client/model';
|
|
10
11
|
import type {
|
|
11
12
|
OptionalSchemas,
|
|
12
13
|
Store,
|
|
@@ -15,7 +16,6 @@ import type {
|
|
|
15
16
|
DatabasePersisterConfig,
|
|
16
17
|
Persister,
|
|
17
18
|
} from '../../with-schemas/index.d.ts';
|
|
18
|
-
import type {ElectricClient} from 'electric-sql/client/model';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* The ElectricSqlPersister interface represents a Persister that lets you save
|
|
@@ -41,10 +41,10 @@ export interface ElectricSqlPersister<Schemas extends OptionalSchemas>
|
|
|
41
41
|
* then gets the Electric client back out again.
|
|
42
42
|
*
|
|
43
43
|
* ```js yolo
|
|
44
|
-
* import {schema} from './generated/client';
|
|
45
44
|
* import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
|
|
46
45
|
* import {createStore} from 'tinybase';
|
|
47
46
|
* import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
|
|
47
|
+
* import {schema} from './generated/client';
|
|
48
48
|
*
|
|
49
49
|
* const electricClient = await electrify(
|
|
50
50
|
* await ElectricDatabase.init('electric.db', ''),
|
|
@@ -122,10 +122,10 @@ export interface ElectricSqlPersister<Schemas extends OptionalSchemas>
|
|
|
122
122
|
* into the Store.
|
|
123
123
|
*
|
|
124
124
|
* ```js yolo
|
|
125
|
-
* import {schema} from './generated/client';
|
|
126
125
|
* import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
|
|
127
126
|
* import {createStore} from 'tinybase';
|
|
128
127
|
* import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
|
|
128
|
+
* import {schema} from './generated/client';
|
|
129
129
|
*
|
|
130
130
|
* const electricClient = await electrify(
|
|
131
131
|
* await ElectricDatabase.init('electric.db', ''),
|
|
@@ -163,10 +163,10 @@ export interface ElectricSqlPersister<Schemas extends OptionalSchemas>
|
|
|
163
163
|
* a local ElectricSql database with tabular mapping.
|
|
164
164
|
*
|
|
165
165
|
* ```js yolo
|
|
166
|
-
* import {schema} from './generated/client';
|
|
167
166
|
* import {ElectricDatabase, electrify} from 'electric-sql/wa-sqlite';
|
|
168
167
|
* import {createStore} from 'tinybase';
|
|
169
168
|
* import {createElectricSqlPersister} from 'tinybase/persisters/persister-electric-sql';
|
|
169
|
+
* import {schema} from './generated/client';
|
|
170
170
|
*
|
|
171
171
|
* const electricClient = await electrify(
|
|
172
172
|
* await ElectricDatabase.init('electric.db', ''),
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* @module persister-expo-sqlite
|
|
15
15
|
* @since v4.5.0
|
|
16
16
|
*/
|
|
17
|
+
import type {SQLiteDatabase} from 'expo-sqlite';
|
|
17
18
|
import type {MergeableStore} from '../../mergeable-store/index.d.cts';
|
|
18
19
|
import type {Store} from '../../store/index.d.cts';
|
|
19
20
|
import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.cts';
|
|
20
|
-
import type {SQLiteDatabase} from 'expo-sqlite';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* The ExpoSqlitePersister interface represents a Persister that lets you save
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
* @module persister-expo-sqlite
|
|
15
15
|
* @since v4.5.0
|
|
16
16
|
*/
|
|
17
|
+
import type {SQLiteDatabase} from 'expo-sqlite';
|
|
17
18
|
import type {MergeableStore} from '../../mergeable-store/index.d.ts';
|
|
18
19
|
import type {Store} from '../../store/index.d.ts';
|
|
19
20
|
import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
|
|
20
|
-
import type {SQLiteDatabase} from 'expo-sqlite';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* The ExpoSqlitePersister interface represents a Persister that lets you save
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* @module persister-expo-sqlite
|
|
15
15
|
* @since v4.5.0
|
|
16
16
|
*/
|
|
17
|
+
import type {SQLiteDatabase} from 'expo-sqlite';
|
|
17
18
|
import type {MergeableStore} from '../../../mergeable-store/with-schemas/index.d.cts';
|
|
18
19
|
import type {
|
|
19
20
|
OptionalSchemas,
|
|
@@ -24,7 +25,6 @@ import type {
|
|
|
24
25
|
Persister,
|
|
25
26
|
Persists,
|
|
26
27
|
} from '../../with-schemas/index.d.cts';
|
|
27
|
-
import type {SQLiteDatabase} from 'expo-sqlite';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* The ExpoSqlitePersister interface represents a Persister that lets you save
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* @module persister-expo-sqlite
|
|
15
15
|
* @since v4.5.0
|
|
16
16
|
*/
|
|
17
|
+
import type {SQLiteDatabase} from 'expo-sqlite';
|
|
17
18
|
import type {MergeableStore} from '../../../mergeable-store/with-schemas/index.d.ts';
|
|
18
19
|
import type {
|
|
19
20
|
OptionalSchemas,
|
|
@@ -24,7 +25,6 @@ import type {
|
|
|
24
25
|
Persister,
|
|
25
26
|
Persists,
|
|
26
27
|
} from '../../with-schemas/index.d.ts';
|
|
27
|
-
import type {SQLiteDatabase} from 'expo-sqlite';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* The ExpoSqlitePersister interface represents a Persister that lets you save
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @module persister-libsql
|
|
8
8
|
* @since v4.7.0
|
|
9
9
|
*/
|
|
10
|
+
import type {Client} from '@libsql/client';
|
|
10
11
|
import type {Store} from '../../store/index.d.cts';
|
|
11
12
|
import type {DatabasePersisterConfig, Persister} from '../index.d.cts';
|
|
12
|
-
import type {Client} from '@libsql/client';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The LibSqlPersister interface represents a Persister that lets you save and
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* @module persister-libsql
|
|
8
8
|
* @since v4.7.0
|
|
9
9
|
*/
|
|
10
|
+
import type {Client} from '@libsql/client';
|
|
10
11
|
import type {Store} from '../../store/index.d.ts';
|
|
11
12
|
import type {DatabasePersisterConfig, Persister} from '../index.d.ts';
|
|
12
|
-
import type {Client} from '@libsql/client';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The LibSqlPersister interface represents a Persister that lets you save and
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @module persister-libsql
|
|
8
8
|
* @since v4.7.0
|
|
9
9
|
*/
|
|
10
|
+
import type {Client} from '@libsql/client';
|
|
10
11
|
import type {
|
|
11
12
|
OptionalSchemas,
|
|
12
13
|
Store,
|
|
@@ -15,7 +16,6 @@ import type {
|
|
|
15
16
|
DatabasePersisterConfig,
|
|
16
17
|
Persister,
|
|
17
18
|
} from '../../with-schemas/index.d.cts';
|
|
18
|
-
import type {Client} from '@libsql/client';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* The LibSqlPersister interface represents a Persister that lets you save and
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @module persister-libsql
|
|
8
8
|
* @since v4.7.0
|
|
9
9
|
*/
|
|
10
|
+
import type {Client} from '@libsql/client';
|
|
10
11
|
import type {
|
|
11
12
|
OptionalSchemas,
|
|
12
13
|
Store,
|
|
@@ -15,7 +16,6 @@ import type {
|
|
|
15
16
|
DatabasePersisterConfig,
|
|
16
17
|
Persister,
|
|
17
18
|
} from '../../with-schemas/index.d.ts';
|
|
18
|
-
import type {Client} from '@libsql/client';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* The LibSqlPersister interface represents a Persister that lets you save and
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
* @module persister-partykit-client
|
|
18
18
|
* @since v4.3.0
|
|
19
19
|
*/
|
|
20
|
+
import type {PartySocket} from 'partysocket';
|
|
20
21
|
import type {Store} from '../../store/index.d.cts';
|
|
21
22
|
import type {Persister} from '../index.d.cts';
|
|
22
|
-
import type {PartySocket} from 'partysocket';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* The PartyKitPersister interface represents a Persister that lets you save and
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
* @module persister-partykit-client
|
|
18
18
|
* @since v4.3.0
|
|
19
19
|
*/
|
|
20
|
+
import type {PartySocket} from 'partysocket';
|
|
20
21
|
import type {Store} from '../../store/index.d.ts';
|
|
21
22
|
import type {Persister} from '../index.d.ts';
|
|
22
|
-
import type {PartySocket} from 'partysocket';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* The PartyKitPersister interface represents a Persister that lets you save and
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
* @module persister-partykit-client
|
|
18
18
|
* @since v4.3.0
|
|
19
19
|
*/
|
|
20
|
+
import type {PartySocket} from 'partysocket';
|
|
20
21
|
import type {
|
|
21
22
|
OptionalSchemas,
|
|
22
23
|
Store,
|
|
23
24
|
} from '../../../store/with-schemas/index.d.cts';
|
|
24
25
|
import type {Persister} from '../../with-schemas/index.d.cts';
|
|
25
|
-
import type {PartySocket} from 'partysocket';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* The PartyKitPersister interface represents a Persister that lets you save and
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
* @module persister-partykit-client
|
|
18
18
|
* @since v4.3.0
|
|
19
19
|
*/
|
|
20
|
+
import type {PartySocket} from 'partysocket';
|
|
20
21
|
import type {
|
|
21
22
|
OptionalSchemas,
|
|
22
23
|
Store,
|
|
23
24
|
} from '../../../store/with-schemas/index.d.ts';
|
|
24
25
|
import type {Persister} from '../../with-schemas/index.d.ts';
|
|
25
|
-
import type {PartySocket} from 'partysocket';
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* The PartyKitPersister interface represents a Persister that lets you save and
|
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
* @module persister-partykit-server
|
|
17
17
|
* @since v4.3.0
|
|
18
18
|
*/
|
|
19
|
+
import type {
|
|
20
|
+
Connection,
|
|
21
|
+
Party,
|
|
22
|
+
Request,
|
|
23
|
+
Server,
|
|
24
|
+
Storage,
|
|
25
|
+
} from 'partykit/server';
|
|
19
26
|
import type {Id} from '../../common/index.d.cts';
|
|
20
27
|
import type {
|
|
21
28
|
Cell,
|
|
@@ -25,13 +32,6 @@ import type {
|
|
|
25
32
|
Value,
|
|
26
33
|
ValueOrUndefined,
|
|
27
34
|
} from '../../store/index.d.cts';
|
|
28
|
-
import type {
|
|
29
|
-
Connection,
|
|
30
|
-
Party,
|
|
31
|
-
Request,
|
|
32
|
-
Server,
|
|
33
|
-
Storage,
|
|
34
|
-
} from 'partykit/server';
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* The TinyBasePartyKitServerConfig type describes the configuration of a
|
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
* @module persister-partykit-server
|
|
17
17
|
* @since v4.3.0
|
|
18
18
|
*/
|
|
19
|
+
import type {
|
|
20
|
+
Connection,
|
|
21
|
+
Party,
|
|
22
|
+
Request,
|
|
23
|
+
Server,
|
|
24
|
+
Storage,
|
|
25
|
+
} from 'partykit/server';
|
|
19
26
|
import type {Id} from '../../common/index.d.ts';
|
|
20
27
|
import type {
|
|
21
28
|
Cell,
|
|
@@ -25,13 +32,6 @@ import type {
|
|
|
25
32
|
Value,
|
|
26
33
|
ValueOrUndefined,
|
|
27
34
|
} from '../../store/index.d.ts';
|
|
28
|
-
import type {
|
|
29
|
-
Connection,
|
|
30
|
-
Party,
|
|
31
|
-
Request,
|
|
32
|
-
Server,
|
|
33
|
-
Storage,
|
|
34
|
-
} from 'partykit/server';
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* The TinyBasePartyKitServerConfig type describes the configuration of a
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* @module persister-partykit-server
|
|
17
17
|
* @since v4.3.0
|
|
18
18
|
*/
|
|
19
|
+
import type {Connection, Party, Request, Server} from 'partykit/server';
|
|
19
20
|
import type {Id} from '../../../common/with-schemas/index.d.cts';
|
|
20
21
|
import type {
|
|
21
22
|
Cell,
|
|
@@ -28,7 +29,6 @@ import type {
|
|
|
28
29
|
Value,
|
|
29
30
|
ValueOrUndefined,
|
|
30
31
|
} from '../../../store/with-schemas/index.d.cts';
|
|
31
|
-
import type {Connection, Party, Request, Server} from 'partykit/server';
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* The TinyBasePartyKitServerConfig type describes the configuration of a
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
* @module persister-partykit-server
|
|
17
17
|
* @since v4.3.0
|
|
18
18
|
*/
|
|
19
|
+
import type {Connection, Party, Request, Server} from 'partykit/server';
|
|
19
20
|
import type {Id} from '../../../common/with-schemas/index.d.ts';
|
|
20
21
|
import type {
|
|
21
22
|
Cell,
|
|
@@ -28,7 +29,6 @@ import type {
|
|
|
28
29
|
Value,
|
|
29
30
|
ValueOrUndefined,
|
|
30
31
|
} from '../../../store/with-schemas/index.d.ts';
|
|
31
|
-
import type {Connection, Party, Request, Server} from 'partykit/server';
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* The TinyBasePartyKitServerConfig type describes the configuration of a
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* @module persister-pglite
|
|
7
7
|
* @since 5.2.0
|
|
8
8
|
*/
|
|
9
|
+
import type {PGlite} from '@electric-sql/pglite';
|
|
9
10
|
import type {MergeableStore} from '../../mergeable-store/index.d.cts';
|
|
10
11
|
import type {Store} from '../../store/index.d.cts';
|
|
11
12
|
import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.cts';
|
|
12
|
-
import type {PGlite} from '@electric-sql/pglite';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The PglitePersister interface represents a Persister that lets you save and
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
* @module persister-pglite
|
|
7
7
|
* @since 5.2.0
|
|
8
8
|
*/
|
|
9
|
+
import type {PGlite} from '@electric-sql/pglite';
|
|
9
10
|
import type {MergeableStore} from '../../mergeable-store/index.d.ts';
|
|
10
11
|
import type {Store} from '../../store/index.d.ts';
|
|
11
12
|
import type {DatabasePersisterConfig, Persister, Persists} from '../index.d.ts';
|
|
12
|
-
import type {PGlite} from '@electric-sql/pglite';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* The PglitePersister interface represents a Persister that lets you save and
|