@livestore/common 0.4.0-dev.8 → 0.4.0-dev.9

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.
@@ -2,7 +2,7 @@ import { Schema } from '@livestore/utils/effect';
2
2
  declare const DebugInfoReq_base: Schema.Struct<{
3
3
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoReq">;
4
4
  } & {
5
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
5
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
6
6
  } & {
7
7
  clientId: typeof Schema.String;
8
8
  sessionId: typeof Schema.String;
@@ -13,7 +13,7 @@ export declare class DebugInfoReq extends DebugInfoReq_base {
13
13
  declare const DebugInfoRes_base: Schema.Struct<{
14
14
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoRes">;
15
15
  } & {
16
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
16
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
17
17
  } & {
18
18
  clientId: typeof Schema.String;
19
19
  sessionId: typeof Schema.String;
@@ -73,7 +73,7 @@ export declare class DebugInfoRes extends DebugInfoRes_base {
73
73
  declare const DebugInfoHistorySubscribe_base: Schema.Struct<{
74
74
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoHistorySubscribe">;
75
75
  } & {
76
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
76
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
77
77
  } & {
78
78
  clientId: typeof Schema.String;
79
79
  sessionId: typeof Schema.String;
@@ -86,7 +86,7 @@ export declare class DebugInfoHistorySubscribe extends DebugInfoHistorySubscribe
86
86
  declare const DebugInfoHistoryRes_base: Schema.Struct<{
87
87
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoHistoryRes">;
88
88
  } & {
89
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
89
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
90
90
  } & {
91
91
  clientId: typeof Schema.String;
92
92
  sessionId: typeof Schema.String;
@@ -147,7 +147,7 @@ export declare class DebugInfoHistoryRes extends DebugInfoHistoryRes_base {
147
147
  declare const DebugInfoHistoryUnsubscribe_base: Schema.Struct<{
148
148
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoHistoryUnsubscribe">;
149
149
  } & {
150
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
150
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
151
151
  } & {
152
152
  clientId: typeof Schema.String;
153
153
  sessionId: typeof Schema.String;
@@ -160,7 +160,7 @@ export declare class DebugInfoHistoryUnsubscribe extends DebugInfoHistoryUnsubsc
160
160
  declare const DebugInfoResetReq_base: Schema.Struct<{
161
161
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoResetReq">;
162
162
  } & {
163
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
163
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
164
164
  } & {
165
165
  clientId: typeof Schema.String;
166
166
  sessionId: typeof Schema.String;
@@ -171,7 +171,7 @@ export declare class DebugInfoResetReq extends DebugInfoResetReq_base {
171
171
  declare const DebugInfoResetRes_base: Schema.Struct<{
172
172
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoResetRes">;
173
173
  } & {
174
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
174
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
175
175
  } & {
176
176
  clientId: typeof Schema.String;
177
177
  sessionId: typeof Schema.String;
@@ -182,7 +182,7 @@ export declare class DebugInfoResetRes extends DebugInfoResetRes_base {
182
182
  declare const DebugInfoRerunQueryReq_base: Schema.Struct<{
183
183
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoRerunQueryReq">;
184
184
  } & {
185
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
185
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
186
186
  } & {
187
187
  clientId: typeof Schema.String;
188
188
  sessionId: typeof Schema.String;
@@ -197,7 +197,7 @@ export declare class DebugInfoRerunQueryReq extends DebugInfoRerunQueryReq_base
197
197
  declare const DebugInfoRerunQueryRes_base: Schema.Struct<{
198
198
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoRerunQueryRes">;
199
199
  } & {
200
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
200
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
201
201
  } & {
202
202
  clientId: typeof Schema.String;
203
203
  sessionId: typeof Schema.String;
@@ -208,7 +208,7 @@ export declare class DebugInfoRerunQueryRes extends DebugInfoRerunQueryRes_base
208
208
  declare const SyncHeadSubscribe_base: Schema.Struct<{
209
209
  _tag: Schema.tag<"LSD.ClientSession.SyncHeadSubscribe">;
210
210
  } & {
211
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
211
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
212
212
  } & {
213
213
  clientId: typeof Schema.String;
214
214
  sessionId: typeof Schema.String;
@@ -221,7 +221,7 @@ export declare class SyncHeadSubscribe extends SyncHeadSubscribe_base {
221
221
  declare const SyncHeadUnsubscribe_base: Schema.Struct<{
222
222
  _tag: Schema.tag<"LSD.ClientSession.SyncHeadUnsubscribe">;
223
223
  } & {
224
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
224
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
225
225
  } & {
226
226
  clientId: typeof Schema.String;
227
227
  sessionId: typeof Schema.String;
@@ -234,7 +234,7 @@ export declare class SyncHeadUnsubscribe extends SyncHeadUnsubscribe_base {
234
234
  declare const SyncHeadRes_base: Schema.Struct<{
235
235
  _tag: Schema.tag<"LSD.ClientSession.SyncHeadRes">;
236
236
  } & {
237
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
237
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
238
238
  } & {
239
239
  clientId: typeof Schema.String;
240
240
  sessionId: typeof Schema.String;
@@ -257,7 +257,7 @@ export declare class SyncHeadRes extends SyncHeadRes_base {
257
257
  declare const ReactivityGraphSubscribe_base: Schema.Struct<{
258
258
  _tag: Schema.tag<"LSD.ClientSession.ReactivityGraphSubscribe">;
259
259
  } & {
260
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
260
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
261
261
  } & {
262
262
  clientId: typeof Schema.String;
263
263
  sessionId: typeof Schema.String;
@@ -271,7 +271,7 @@ export declare class ReactivityGraphSubscribe extends ReactivityGraphSubscribe_b
271
271
  declare const ReactivityGraphUnsubscribe_base: Schema.Struct<{
272
272
  _tag: Schema.tag<"LSD.ClientSession.ReactivityGraphUnsubscribe">;
273
273
  } & {
274
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
274
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
275
275
  } & {
276
276
  clientId: typeof Schema.String;
277
277
  sessionId: typeof Schema.String;
@@ -284,7 +284,7 @@ export declare class ReactivityGraphUnsubscribe extends ReactivityGraphUnsubscri
284
284
  declare const ReactivityGraphRes_base: Schema.Struct<{
285
285
  _tag: Schema.tag<"LSD.ClientSession.ReactivityGraphRes">;
286
286
  } & {
287
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
287
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
288
288
  } & {
289
289
  clientId: typeof Schema.String;
290
290
  sessionId: typeof Schema.String;
@@ -298,7 +298,7 @@ export declare class ReactivityGraphRes extends ReactivityGraphRes_base {
298
298
  declare const LiveQueriesSubscribe_base: Schema.Struct<{
299
299
  _tag: Schema.tag<"LSD.ClientSession.LiveQueriesSubscribe">;
300
300
  } & {
301
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
301
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
302
302
  } & {
303
303
  clientId: typeof Schema.String;
304
304
  sessionId: typeof Schema.String;
@@ -311,7 +311,7 @@ export declare class LiveQueriesSubscribe extends LiveQueriesSubscribe_base {
311
311
  declare const LiveQueriesUnsubscribe_base: Schema.Struct<{
312
312
  _tag: Schema.tag<"LSD.ClientSession.LiveQueriesUnsubscribe">;
313
313
  } & {
314
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
314
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
315
315
  } & {
316
316
  clientId: typeof Schema.String;
317
317
  sessionId: typeof Schema.String;
@@ -341,7 +341,7 @@ export declare class SerializedLiveQuery extends SerializedLiveQuery_base {
341
341
  declare const LiveQueriesRes_base: Schema.Struct<{
342
342
  _tag: Schema.tag<"LSD.ClientSession.LiveQueriesRes">;
343
343
  } & {
344
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
344
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
345
345
  } & {
346
346
  clientId: typeof Schema.String;
347
347
  sessionId: typeof Schema.String;
@@ -355,7 +355,7 @@ export declare class LiveQueriesRes extends LiveQueriesRes_base {
355
355
  declare const Ping_base: Schema.Struct<{
356
356
  _tag: Schema.tag<"LSD.ClientSession.Ping">;
357
357
  } & {
358
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
358
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
359
359
  } & {
360
360
  clientId: typeof Schema.String;
361
361
  sessionId: typeof Schema.String;
@@ -366,7 +366,7 @@ export declare class Ping extends Ping_base {
366
366
  declare const Pong_base: Schema.Struct<{
367
367
  _tag: Schema.tag<"LSD.ClientSession.Pong">;
368
368
  } & {
369
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
369
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
370
370
  } & {
371
371
  clientId: typeof Schema.String;
372
372
  sessionId: typeof Schema.String;
@@ -377,7 +377,7 @@ export declare class Pong extends Pong_base {
377
377
  declare const Disconnect_base: Schema.Struct<{
378
378
  _tag: Schema.tag<"LSD.ClientSession.Disconnect">;
379
379
  } & {
380
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
380
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
381
381
  } & {
382
382
  clientId: typeof Schema.String;
383
383
  sessionId: typeof Schema.String;
@@ -9,23 +9,23 @@ export type NetworkStatus = typeof NetworkStatus.Type;
9
9
  export declare const requestId: typeof Schema.String;
10
10
  export declare const clientId: typeof Schema.String;
11
11
  export declare const sessionId: typeof Schema.String;
12
- export declare const liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
12
+ export declare const liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
13
13
  export declare const LSDMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
14
14
  _tag: Schema.tag<Tag>;
15
15
  } & {
16
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
16
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
17
17
  } & Fields>;
18
18
  export declare const LSDChannelMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
19
19
  _tag: Schema.tag<Tag>;
20
20
  } & {
21
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
21
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
22
22
  } & {
23
23
  clientId: typeof Schema.String;
24
24
  } & Fields>;
25
25
  export declare const LSDClientSessionChannelMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
26
26
  _tag: Schema.tag<Tag>;
27
27
  } & {
28
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
28
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
29
29
  } & {
30
30
  clientId: typeof Schema.String;
31
31
  sessionId: typeof Schema.String;
@@ -33,7 +33,7 @@ export declare const LSDClientSessionChannelMessage: <Tag extends string, Fields
33
33
  export declare const LSDClientSessionReqResMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
34
34
  _tag: Schema.tag<Tag>;
35
35
  } & {
36
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
36
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
37
37
  } & {
38
38
  clientId: typeof Schema.String;
39
39
  sessionId: typeof Schema.String;
@@ -42,7 +42,7 @@ export declare const LSDClientSessionReqResMessage: <Tag extends string, Fields
42
42
  export declare const LSDReqResMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
43
43
  _tag: Schema.tag<Tag>;
44
44
  } & {
45
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
45
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
46
46
  } & {
47
47
  clientId: typeof Schema.String;
48
48
  } & {
@@ -3,7 +3,7 @@ import * as SyncState from '../sync/syncstate.ts';
3
3
  declare const ResetAllDataReq_base: Schema.Struct<{
4
4
  _tag: Schema.tag<"LSD.Leader.ResetAllDataReq">;
5
5
  } & {
6
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
6
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
7
7
  } & {
8
8
  clientId: typeof Schema.String;
9
9
  } & {
@@ -16,7 +16,7 @@ export declare class ResetAllDataReq extends ResetAllDataReq_base {
16
16
  declare const DatabaseFileInfoReq_base: Schema.Struct<{
17
17
  _tag: Schema.tag<"LSD.Leader.DatabaseFileInfoReq">;
18
18
  } & {
19
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
19
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
20
20
  } & {
21
21
  clientId: typeof Schema.String;
22
22
  } & {
@@ -38,7 +38,7 @@ export declare class DatabaseFileInfo extends DatabaseFileInfo_base {
38
38
  declare const DatabaseFileInfoRes_base: Schema.Struct<{
39
39
  _tag: Schema.tag<"LSD.Leader.DatabaseFileInfoRes">;
40
40
  } & {
41
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
41
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
42
42
  } & {
43
43
  clientId: typeof Schema.String;
44
44
  } & {
@@ -52,7 +52,7 @@ export declare class DatabaseFileInfoRes extends DatabaseFileInfoRes_base {
52
52
  declare const NetworkStatusSubscribe_base: Schema.Struct<{
53
53
  _tag: Schema.tag<"LSD.Leader.NetworkStatusSubscribe">;
54
54
  } & {
55
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
55
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
56
56
  } & {
57
57
  clientId: typeof Schema.String;
58
58
  } & {
@@ -65,7 +65,7 @@ export declare class NetworkStatusSubscribe extends NetworkStatusSubscribe_base
65
65
  declare const NetworkStatusUnsubscribe_base: Schema.Struct<{
66
66
  _tag: Schema.tag<"LSD.Leader.NetworkStatusUnsubscribe">;
67
67
  } & {
68
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
68
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
69
69
  } & {
70
70
  clientId: typeof Schema.String;
71
71
  } & {
@@ -78,7 +78,7 @@ export declare class NetworkStatusUnsubscribe extends NetworkStatusUnsubscribe_b
78
78
  declare const NetworkStatusRes_base: Schema.Struct<{
79
79
  _tag: Schema.tag<"LSD.Leader.NetworkStatusRes">;
80
80
  } & {
81
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
81
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
82
82
  } & {
83
83
  clientId: typeof Schema.String;
84
84
  } & {
@@ -96,7 +96,7 @@ export declare class NetworkStatusRes extends NetworkStatusRes_base {
96
96
  declare const SyncingInfoReq_base: Schema.Struct<{
97
97
  _tag: Schema.tag<"LSD.Leader.SyncingInfoReq">;
98
98
  } & {
99
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
99
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
100
100
  } & {
101
101
  clientId: typeof Schema.String;
102
102
  } & {
@@ -113,7 +113,7 @@ export declare class SyncingInfo extends SyncingInfo_base {
113
113
  declare const SyncingInfoRes_base: Schema.Struct<{
114
114
  _tag: Schema.tag<"LSD.Leader.SyncingInfoRes">;
115
115
  } & {
116
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
116
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
117
117
  } & {
118
118
  clientId: typeof Schema.String;
119
119
  } & {
@@ -126,7 +126,7 @@ export declare class SyncingInfoRes extends SyncingInfoRes_base {
126
126
  declare const SyncHistorySubscribe_base: Schema.Struct<{
127
127
  _tag: Schema.tag<"LSD.Leader.SyncHistorySubscribe">;
128
128
  } & {
129
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
129
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
130
130
  } & {
131
131
  clientId: typeof Schema.String;
132
132
  } & {
@@ -139,7 +139,7 @@ export declare class SyncHistorySubscribe extends SyncHistorySubscribe_base {
139
139
  declare const SyncHistoryUnsubscribe_base: Schema.Struct<{
140
140
  _tag: Schema.tag<"LSD.Leader.SyncHistoryUnsubscribe">;
141
141
  } & {
142
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
142
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
143
143
  } & {
144
144
  clientId: typeof Schema.String;
145
145
  } & {
@@ -152,7 +152,7 @@ export declare class SyncHistoryUnsubscribe extends SyncHistoryUnsubscribe_base
152
152
  declare const SyncHistoryRes_base: Schema.Struct<{
153
153
  _tag: Schema.tag<"LSD.Leader.SyncHistoryRes">;
154
154
  } & {
155
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
155
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
156
156
  } & {
157
157
  clientId: typeof Schema.String;
158
158
  } & {
@@ -174,7 +174,7 @@ export declare class SyncHistoryRes extends SyncHistoryRes_base {
174
174
  declare const SyncHeadSubscribe_base: Schema.Struct<{
175
175
  _tag: Schema.tag<"LSD.Leader.SyncHeadSubscribe">;
176
176
  } & {
177
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
177
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
178
178
  } & {
179
179
  clientId: typeof Schema.String;
180
180
  } & {
@@ -187,7 +187,7 @@ export declare class SyncHeadSubscribe extends SyncHeadSubscribe_base {
187
187
  declare const SyncHeadUnsubscribe_base: Schema.Struct<{
188
188
  _tag: Schema.tag<"LSD.Leader.SyncHeadUnsubscribe">;
189
189
  } & {
190
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
190
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
191
191
  } & {
192
192
  clientId: typeof Schema.String;
193
193
  } & {
@@ -200,7 +200,7 @@ export declare class SyncHeadUnsubscribe extends SyncHeadUnsubscribe_base {
200
200
  declare const SyncHeadRes_base: Schema.Struct<{
201
201
  _tag: Schema.tag<"LSD.Leader.SyncHeadRes">;
202
202
  } & {
203
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
203
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
204
204
  } & {
205
205
  clientId: typeof Schema.String;
206
206
  } & {
@@ -223,7 +223,7 @@ export declare class SyncHeadRes extends SyncHeadRes_base {
223
223
  declare const SnapshotReq_base: Schema.Struct<{
224
224
  _tag: Schema.tag<"LSD.Leader.SnapshotReq">;
225
225
  } & {
226
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
226
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
227
227
  } & {
228
228
  clientId: typeof Schema.String;
229
229
  } & {
@@ -234,7 +234,7 @@ export declare class SnapshotReq extends SnapshotReq_base {
234
234
  declare const SnapshotRes_base: Schema.Struct<{
235
235
  _tag: Schema.tag<"LSD.Leader.SnapshotRes">;
236
236
  } & {
237
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
237
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
238
238
  } & {
239
239
  clientId: typeof Schema.String;
240
240
  } & {
@@ -254,7 +254,7 @@ export declare const LoadDatabaseFile: import("./devtools-messages-common.ts").L
254
254
  declare const SyncPull_base: Schema.Struct<{
255
255
  _tag: Schema.tag<"LSD.Leader.SyncPull">;
256
256
  } & {
257
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
257
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
258
258
  } & {
259
259
  payload: typeof SyncState.PayloadUpstream;
260
260
  }>;
@@ -263,7 +263,7 @@ export declare class SyncPull extends SyncPull_base {
263
263
  declare const CommitEventReq_base: Schema.Struct<{
264
264
  _tag: Schema.tag<"LSD.Leader.CommitEventReq">;
265
265
  } & {
266
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
266
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
267
267
  } & {
268
268
  clientId: typeof Schema.String;
269
269
  } & {
@@ -279,7 +279,7 @@ export declare class CommitEventReq extends CommitEventReq_base {
279
279
  declare const CommitEventRes_base: Schema.Struct<{
280
280
  _tag: Schema.tag<"LSD.Leader.CommitEventRes">;
281
281
  } & {
282
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
282
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
283
283
  } & {
284
284
  clientId: typeof Schema.String;
285
285
  } & {
@@ -290,7 +290,7 @@ export declare class CommitEventRes extends CommitEventRes_base {
290
290
  declare const EventlogReq_base: Schema.Struct<{
291
291
  _tag: Schema.tag<"LSD.Leader.EventlogReq">;
292
292
  } & {
293
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
293
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
294
294
  } & {
295
295
  clientId: typeof Schema.String;
296
296
  } & {
@@ -301,7 +301,7 @@ export declare class EventlogReq extends EventlogReq_base {
301
301
  declare const EventlogRes_base: Schema.Struct<{
302
302
  _tag: Schema.tag<"LSD.Leader.EventlogRes">;
303
303
  } & {
304
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
304
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
305
305
  } & {
306
306
  clientId: typeof Schema.String;
307
307
  } & {
@@ -314,7 +314,7 @@ export declare class EventlogRes extends EventlogRes_base {
314
314
  declare const Ping_base: Schema.Struct<{
315
315
  _tag: Schema.tag<"LSD.Leader.Ping">;
316
316
  } & {
317
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
317
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
318
318
  } & {
319
319
  clientId: typeof Schema.String;
320
320
  } & {
@@ -325,7 +325,7 @@ export declare class Ping extends Ping_base {
325
325
  declare const Pong_base: Schema.Struct<{
326
326
  _tag: Schema.tag<"LSD.Leader.Pong">;
327
327
  } & {
328
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
328
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
329
329
  } & {
330
330
  clientId: typeof Schema.String;
331
331
  } & {
@@ -336,7 +336,7 @@ export declare class Pong extends Pong_base {
336
336
  declare const Disconnect_base: Schema.Struct<{
337
337
  _tag: Schema.tag<"LSD.Leader.Disconnect">;
338
338
  } & {
339
- liveStoreVersion: Schema.Literal<["0.4.0-dev.8"]>;
339
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.9"]>;
340
340
  } & {
341
341
  clientId: typeof Schema.String;
342
342
  } & {
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Helpers for synthesizing LiveStore events in tests while keeping track of
3
+ * sequence numbers, parent pointers, and authoring client identity. Inspired
4
+ * by the effect-based schema utilities, the factory exposes a namespaced API
5
+ * where each event definition maps to a helper with `next`, `advanceTo`, and
6
+ * `setParent` functions that share a single sequence stream.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import { EventFactory } from '@livestore/common/testing'
11
+ * import { events } from './schema'
12
+ *
13
+ * const eventFactory = EventFactory.makeFactory(events)({
14
+ * client: EventFactory.clientIdentity('test-client'),
15
+ * startSeq: 1,
16
+ * initialParent: 'root',
17
+ * })
18
+ *
19
+ * const bootstrap = eventFactory.todoCreated.next({
20
+ * id: 'todo-1',
21
+ * text: 'write tests',
22
+ * completed: false,
23
+ * })
24
+ *
25
+ * eventFactory.todoCreated.advanceTo(42)
26
+ * const branched = eventFactory.todoUpdated.next({
27
+ * id: 'todo-1',
28
+ * text: 'ship feature',
29
+ * completed: true,
30
+ * })
31
+ * ```
32
+ */
33
+ import type { EventDef } from '../schema/EventDef.ts';
34
+ import * as LiveStoreEvent from '../schema/LiveStoreEvent.ts';
35
+ export interface ClientIdentity {
36
+ clientId: string;
37
+ sessionId: string;
38
+ }
39
+ export declare const clientIdentity: (label: string, session?: string) => ClientIdentity;
40
+ export type SequenceValue = 'root' | number;
41
+ type EventFactoriesArgs<TDefs extends Record<string, EventDef.Any>> = {
42
+ [K in keyof TDefs]: Parameters<TDefs[K]>[0];
43
+ };
44
+ type EventFactories<TDefs extends Record<string, EventDef.Any>, TResult> = {
45
+ [K in keyof TDefs]: {
46
+ next: (args: EventFactoriesArgs<TDefs>[K]) => TResult;
47
+ advanceTo: (seq: number, parent?: SequenceValue) => void;
48
+ setParent: (parent: SequenceValue) => void;
49
+ current: () => {
50
+ seq: number;
51
+ parent: SequenceValue;
52
+ };
53
+ };
54
+ };
55
+ export interface EventFactoriesConfig {
56
+ client: ClientIdentity;
57
+ /**
58
+ * @default 1
59
+ */
60
+ startSeq?: number;
61
+ /**
62
+ * @default 0 (root)
63
+ */
64
+ initialParent?: SequenceValue;
65
+ }
66
+ export declare const makeFactory: <TDefs extends Record<string, EventDef.Any>>(eventDefs: TDefs) => ({ client, startSeq, initialParent, }: EventFactoriesConfig) => EventFactories<TDefs, LiveStoreEvent.AnyEncodedGlobal>;
67
+ export {};
68
+ //# sourceMappingURL=event-factory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-factory.d.ts","sourceRoot":"","sources":["../../src/testing/event-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAErD,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAA;AAE7D,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,EAAE,gBAA4B,KAAG,cAG3E,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAA;AAE3C,KAAK,kBAAkB,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI;KACnE,CAAC,IAAI,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAC5C,CAAA;AAED,KAAK,cAAc,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,IAAI;KACxE,CAAC,IAAI,MAAM,KAAK,GAAG;QAClB,IAAI,EAAE,CAAC,IAAI,EAAE,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,OAAO,CAAA;QACrD,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,IAAI,CAAA;QACxD,SAAS,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;QAC1C,OAAO,EAAE,MAAM;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,aAAa,CAAA;SAAE,CAAA;KACtD;CACF,CAAA;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,aAAa,CAAC,EAAE,aAAa,CAAA;CAC9B;AAED,eAAO,MAAM,WAAW,GACrB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,EAAE,WAAW,KAAK,MAC5D,sCAIE,oBAAoB,KAAG,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,gBAAgB,CAkD9E,CAAA"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * Helpers for synthesizing LiveStore events in tests while keeping track of
3
+ * sequence numbers, parent pointers, and authoring client identity. Inspired
4
+ * by the effect-based schema utilities, the factory exposes a namespaced API
5
+ * where each event definition maps to a helper with `next`, `advanceTo`, and
6
+ * `setParent` functions that share a single sequence stream.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import { EventFactory } from '@livestore/common/testing'
11
+ * import { events } from './schema'
12
+ *
13
+ * const eventFactory = EventFactory.makeFactory(events)({
14
+ * client: EventFactory.clientIdentity('test-client'),
15
+ * startSeq: 1,
16
+ * initialParent: 'root',
17
+ * })
18
+ *
19
+ * const bootstrap = eventFactory.todoCreated.next({
20
+ * id: 'todo-1',
21
+ * text: 'write tests',
22
+ * completed: false,
23
+ * })
24
+ *
25
+ * eventFactory.todoCreated.advanceTo(42)
26
+ * const branched = eventFactory.todoUpdated.next({
27
+ * id: 'todo-1',
28
+ * text: 'ship feature',
29
+ * completed: true,
30
+ * })
31
+ * ```
32
+ */
33
+ import { Schema } from '@livestore/utils/effect';
34
+ import * as EventSequenceNumber from "../schema/EventSequenceNumber.js";
35
+ import * as LiveStoreEvent from "../schema/LiveStoreEvent.js";
36
+ export const clientIdentity = (label, session = `${label}-session`) => ({
37
+ clientId: label,
38
+ sessionId: session,
39
+ });
40
+ export const makeFactory = (eventDefs) => ({ client, startSeq = 1, initialParent = 'root', }) => {
41
+ let nextSeq = startSeq;
42
+ let parentRef = initialParent;
43
+ const advanceTo = (seq, parent = 'root') => {
44
+ nextSeq = seq;
45
+ parentRef = parent;
46
+ };
47
+ const setParent = (parent) => {
48
+ parentRef = parent;
49
+ };
50
+ const current = () => ({ seq: nextSeq, parent: parentRef });
51
+ const factories = {};
52
+ for (const [name, eventDef] of Object.entries(eventDefs)) {
53
+ const next = (args) => {
54
+ const decoded = eventDef(args);
55
+ const encodedArgs = Schema.encodeSync(eventDef.schema)(decoded.args);
56
+ const encoded = eventDef.encoded(encodedArgs);
57
+ const event = LiveStoreEvent.AnyEncodedGlobal.make({
58
+ name: encoded.name,
59
+ args: encoded.args,
60
+ seqNum: EventSequenceNumber.globalEventSequenceNumber(nextSeq),
61
+ parentSeqNum: parentRef === 'root'
62
+ ? EventSequenceNumber.ROOT.global
63
+ : EventSequenceNumber.globalEventSequenceNumber(parentRef),
64
+ clientId: client.clientId,
65
+ sessionId: client.sessionId,
66
+ });
67
+ parentRef = nextSeq;
68
+ nextSeq = nextSeq + 1;
69
+ return event;
70
+ };
71
+ factories[name] = {
72
+ next,
73
+ advanceTo,
74
+ setParent,
75
+ current,
76
+ };
77
+ }
78
+ return factories;
79
+ };
80
+ //# sourceMappingURL=event-factory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-factory.js","sourceRoot":"","sources":["../../src/testing/event-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAGhD,OAAO,KAAK,mBAAmB,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAA;AAO7D,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,OAAO,GAAG,GAAG,KAAK,UAAU,EAAkB,EAAE,CAAC,CAAC;IAC9F,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,OAAO;CACnB,CAAC,CAAA;AA6BF,MAAM,CAAC,MAAM,WAAW,GACtB,CAA6C,SAAgB,EAAE,EAAE,CACjE,CAAC,EACC,MAAM,EACN,QAAQ,GAAG,CAAC,EACZ,aAAa,GAAG,MAAM,GACD,EAA0D,EAAE;IACjF,IAAI,OAAO,GAAG,QAAQ,CAAA;IACtB,IAAI,SAAS,GAAkB,aAAa,CAAA;IAE5C,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,SAAwB,MAAM,EAAE,EAAE;QAChE,OAAO,GAAG,GAAG,CAAA;QACb,SAAS,GAAG,MAAM,CAAA;IACpB,CAAC,CAAA;IAED,MAAM,SAAS,GAAG,CAAC,MAAqB,EAAE,EAAE;QAC1C,SAAS,GAAG,MAAM,CAAA;IACpB,CAAC,CAAA;IAED,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAA;IAE3D,MAAM,SAAS,GAAoE,EAAE,CAAA;IAErF,KAAK,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAwC,EAAE,CAAC;QAChG,MAAM,IAAI,GAAG,CAAC,IAA4C,EAAE,EAAE;YAC5D,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAA;YAC9B,MAAM,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;YACpE,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;YAE7C,MAAM,KAAK,GAAG,cAAc,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBACjD,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,EAAE,mBAAmB,CAAC,yBAAyB,CAAC,OAAO,CAAC;gBAC9D,YAAY,EACV,SAAS,KAAK,MAAM;oBAClB,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,MAAM;oBACjC,CAAC,CAAC,mBAAmB,CAAC,yBAAyB,CAAC,SAAS,CAAC;gBAC9D,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,SAAS,EAAE,MAAM,CAAC,SAAS;aAC5B,CAAC,CAAA;YAEF,SAAS,GAAG,OAAO,CAAA;YACnB,OAAO,GAAG,OAAO,GAAG,CAAC,CAAA;YAErB,OAAO,KAAK,CAAA;QACd,CAAC,CAAA;QAED,SAAS,CAAC,IAAI,CAAC,GAAG;YAChB,IAAI;YACJ,SAAS;YACT,SAAS;YACT,OAAO;SAC+D,CAAA;IAC1E,CAAC;IAED,OAAO,SAAmE,CAAA;AAC5E,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * as EventFactory from './event-factory.ts';
2
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/testing/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * as EventFactory from "./event-factory.js";
2
+ //# sourceMappingURL=mod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.js","sourceRoot":"","sources":["../../src/testing/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,oBAAoB,CAAA"}
package/dist/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const liveStoreVersion: "0.4.0-dev.8";
1
+ export declare const liveStoreVersion: "0.4.0-dev.9";
2
2
  /**
3
3
  * This version number is incremented whenever the internal storage format changes in a breaking way.
4
4
  * Whenever this version changes, LiveStore will start with fresh database files. Old database files are not deleted.
package/dist/version.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // TODO bring back when Expo and Playwright supports `with` imports
2
2
  // import packageJson from '../package.json' with { type: 'json' }
3
3
  // export const liveStoreVersion = packageJson.version
4
- export const liveStoreVersion = '0.4.0-dev.8';
4
+ export const liveStoreVersion = '0.4.0-dev.9';
5
5
  /**
6
6
  * This version number is incremented whenever the internal storage format changes in a breaking way.
7
7
  * Whenever this version changes, LiveStore will start with fresh database files. Old database files are not deleted.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livestore/common",
3
- "version": "0.4.0-dev.8",
3
+ "version": "0.4.0-dev.9",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -9,19 +9,20 @@
9
9
  "./leader-thread": "./dist/leader-thread/mod.js",
10
10
  "./schema": "./dist/schema/mod.js",
11
11
  "./sync/next": "./dist/sync/next/mod.js",
12
- "./sync/next/test": "./dist/sync/next/test/mod.js"
12
+ "./sync/next/test": "./dist/sync/next/test/mod.js",
13
+ "./testing": "./dist/testing/mod.js"
13
14
  },
14
15
  "dependencies": {
15
16
  "@opentelemetry/api": "1.9.0",
16
17
  "graphology": "0.26.0-alpha1",
17
18
  "graphology-dag": "0.4.1",
18
19
  "graphology-types": "0.24.8",
19
- "@livestore/webmesh": "0.4.0-dev.8",
20
- "@livestore/utils": "0.4.0-dev.8"
20
+ "@livestore/utils": "0.4.0-dev.9",
21
+ "@livestore/webmesh": "0.4.0-dev.9"
21
22
  },
22
23
  "devDependencies": {
23
24
  "vitest": "3.2.4",
24
- "@livestore/utils-dev": "0.4.0-dev.8"
25
+ "@livestore/utils-dev": "0.4.0-dev.9"
25
26
  },
26
27
  "files": [
27
28
  "package.json",