@livestore/common 0.4.0-dev.19 → 0.4.0-dev.20

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.
@@ -3,7 +3,7 @@ import { EventSequenceNumber } from '../schema/mod.ts';
3
3
  declare const DebugInfoReq_base: Schema.Struct<{
4
4
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoReq">;
5
5
  } & {
6
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
6
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
7
7
  } & {
8
8
  clientId: typeof Schema.String;
9
9
  sessionId: typeof Schema.String;
@@ -14,7 +14,7 @@ export declare class DebugInfoReq extends DebugInfoReq_base {
14
14
  declare const DebugInfoRes_base: Schema.Struct<{
15
15
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoRes">;
16
16
  } & {
17
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
17
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
18
18
  } & {
19
19
  clientId: typeof Schema.String;
20
20
  sessionId: typeof Schema.String;
@@ -74,7 +74,7 @@ export declare class DebugInfoRes extends DebugInfoRes_base {
74
74
  declare const DebugInfoHistorySubscribe_base: Schema.Struct<{
75
75
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoHistorySubscribe">;
76
76
  } & {
77
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
77
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
78
78
  } & {
79
79
  clientId: typeof Schema.String;
80
80
  sessionId: typeof Schema.String;
@@ -87,7 +87,7 @@ export declare class DebugInfoHistorySubscribe extends DebugInfoHistorySubscribe
87
87
  declare const DebugInfoHistoryRes_base: Schema.Struct<{
88
88
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoHistoryRes">;
89
89
  } & {
90
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
90
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
91
91
  } & {
92
92
  clientId: typeof Schema.String;
93
93
  sessionId: typeof Schema.String;
@@ -148,7 +148,7 @@ export declare class DebugInfoHistoryRes extends DebugInfoHistoryRes_base {
148
148
  declare const DebugInfoHistoryUnsubscribe_base: Schema.Struct<{
149
149
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoHistoryUnsubscribe">;
150
150
  } & {
151
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
151
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
152
152
  } & {
153
153
  clientId: typeof Schema.String;
154
154
  sessionId: typeof Schema.String;
@@ -161,7 +161,7 @@ export declare class DebugInfoHistoryUnsubscribe extends DebugInfoHistoryUnsubsc
161
161
  declare const DebugInfoResetReq_base: Schema.Struct<{
162
162
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoResetReq">;
163
163
  } & {
164
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
164
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
165
165
  } & {
166
166
  clientId: typeof Schema.String;
167
167
  sessionId: typeof Schema.String;
@@ -172,7 +172,7 @@ export declare class DebugInfoResetReq extends DebugInfoResetReq_base {
172
172
  declare const DebugInfoResetRes_base: Schema.Struct<{
173
173
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoResetRes">;
174
174
  } & {
175
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
175
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
176
176
  } & {
177
177
  clientId: typeof Schema.String;
178
178
  sessionId: typeof Schema.String;
@@ -183,7 +183,7 @@ export declare class DebugInfoResetRes extends DebugInfoResetRes_base {
183
183
  declare const DebugInfoRerunQueryReq_base: Schema.Struct<{
184
184
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoRerunQueryReq">;
185
185
  } & {
186
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
186
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
187
187
  } & {
188
188
  clientId: typeof Schema.String;
189
189
  sessionId: typeof Schema.String;
@@ -198,7 +198,7 @@ export declare class DebugInfoRerunQueryReq extends DebugInfoRerunQueryReq_base
198
198
  declare const DebugInfoRerunQueryRes_base: Schema.Struct<{
199
199
  _tag: Schema.tag<"LSD.ClientSession.DebugInfoRerunQueryRes">;
200
200
  } & {
201
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
201
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
202
202
  } & {
203
203
  clientId: typeof Schema.String;
204
204
  sessionId: typeof Schema.String;
@@ -209,7 +209,7 @@ export declare class DebugInfoRerunQueryRes extends DebugInfoRerunQueryRes_base
209
209
  declare const SyncHeadSubscribe_base: Schema.Struct<{
210
210
  _tag: Schema.tag<"LSD.ClientSession.SyncHeadSubscribe">;
211
211
  } & {
212
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
212
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
213
213
  } & {
214
214
  clientId: typeof Schema.String;
215
215
  sessionId: typeof Schema.String;
@@ -222,7 +222,7 @@ export declare class SyncHeadSubscribe extends SyncHeadSubscribe_base {
222
222
  declare const SyncHeadUnsubscribe_base: Schema.Struct<{
223
223
  _tag: Schema.tag<"LSD.ClientSession.SyncHeadUnsubscribe">;
224
224
  } & {
225
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
225
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
226
226
  } & {
227
227
  clientId: typeof Schema.String;
228
228
  sessionId: typeof Schema.String;
@@ -235,7 +235,7 @@ export declare class SyncHeadUnsubscribe extends SyncHeadUnsubscribe_base {
235
235
  declare const SyncHeadRes_base: Schema.Struct<{
236
236
  _tag: Schema.tag<"LSD.ClientSession.SyncHeadRes">;
237
237
  } & {
238
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
238
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
239
239
  } & {
240
240
  clientId: typeof Schema.String;
241
241
  sessionId: typeof Schema.String;
@@ -262,7 +262,7 @@ export declare class SyncHeadRes extends SyncHeadRes_base {
262
262
  declare const ReactivityGraphSubscribe_base: Schema.Struct<{
263
263
  _tag: Schema.tag<"LSD.ClientSession.ReactivityGraphSubscribe">;
264
264
  } & {
265
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
265
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
266
266
  } & {
267
267
  clientId: typeof Schema.String;
268
268
  sessionId: typeof Schema.String;
@@ -276,7 +276,7 @@ export declare class ReactivityGraphSubscribe extends ReactivityGraphSubscribe_b
276
276
  declare const ReactivityGraphUnsubscribe_base: Schema.Struct<{
277
277
  _tag: Schema.tag<"LSD.ClientSession.ReactivityGraphUnsubscribe">;
278
278
  } & {
279
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
279
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
280
280
  } & {
281
281
  clientId: typeof Schema.String;
282
282
  sessionId: typeof Schema.String;
@@ -289,7 +289,7 @@ export declare class ReactivityGraphUnsubscribe extends ReactivityGraphUnsubscri
289
289
  declare const ReactivityGraphRes_base: Schema.Struct<{
290
290
  _tag: Schema.tag<"LSD.ClientSession.ReactivityGraphRes">;
291
291
  } & {
292
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
292
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
293
293
  } & {
294
294
  clientId: typeof Schema.String;
295
295
  sessionId: typeof Schema.String;
@@ -303,7 +303,7 @@ export declare class ReactivityGraphRes extends ReactivityGraphRes_base {
303
303
  declare const LiveQueriesSubscribe_base: Schema.Struct<{
304
304
  _tag: Schema.tag<"LSD.ClientSession.LiveQueriesSubscribe">;
305
305
  } & {
306
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
306
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
307
307
  } & {
308
308
  clientId: typeof Schema.String;
309
309
  sessionId: typeof Schema.String;
@@ -316,7 +316,7 @@ export declare class LiveQueriesSubscribe extends LiveQueriesSubscribe_base {
316
316
  declare const LiveQueriesUnsubscribe_base: Schema.Struct<{
317
317
  _tag: Schema.tag<"LSD.ClientSession.LiveQueriesUnsubscribe">;
318
318
  } & {
319
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
319
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
320
320
  } & {
321
321
  clientId: typeof Schema.String;
322
322
  sessionId: typeof Schema.String;
@@ -346,7 +346,7 @@ export declare class SerializedLiveQuery extends SerializedLiveQuery_base {
346
346
  declare const LiveQueriesRes_base: Schema.Struct<{
347
347
  _tag: Schema.tag<"LSD.ClientSession.LiveQueriesRes">;
348
348
  } & {
349
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
349
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
350
350
  } & {
351
351
  clientId: typeof Schema.String;
352
352
  sessionId: typeof Schema.String;
@@ -360,7 +360,7 @@ export declare class LiveQueriesRes extends LiveQueriesRes_base {
360
360
  declare const Ping_base: Schema.Struct<{
361
361
  _tag: Schema.tag<"LSD.ClientSession.Ping">;
362
362
  } & {
363
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
363
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
364
364
  } & {
365
365
  clientId: typeof Schema.String;
366
366
  sessionId: typeof Schema.String;
@@ -371,7 +371,7 @@ export declare class Ping extends Ping_base {
371
371
  declare const Pong_base: Schema.Struct<{
372
372
  _tag: Schema.tag<"LSD.ClientSession.Pong">;
373
373
  } & {
374
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
374
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
375
375
  } & {
376
376
  clientId: typeof Schema.String;
377
377
  sessionId: typeof Schema.String;
@@ -382,7 +382,7 @@ export declare class Pong extends Pong_base {
382
382
  declare const Disconnect_base: Schema.Struct<{
383
383
  _tag: Schema.tag<"LSD.ClientSession.Disconnect">;
384
384
  } & {
385
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
385
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
386
386
  } & {
387
387
  clientId: typeof Schema.String;
388
388
  sessionId: typeof Schema.String;
@@ -3,23 +3,23 @@ export { NetworkStatus } from '../sync/sync-backend.ts';
3
3
  export declare const requestId: typeof Schema.String;
4
4
  export declare const clientId: typeof Schema.String;
5
5
  export declare const sessionId: typeof Schema.String;
6
- export declare const liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
6
+ export declare const liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
7
7
  export declare const LSDMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
8
8
  _tag: Schema.tag<Tag>;
9
9
  } & {
10
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
10
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
11
11
  } & Fields>;
12
12
  export declare const LSDChannelMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
13
13
  _tag: Schema.tag<Tag>;
14
14
  } & {
15
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
15
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
16
16
  } & {
17
17
  clientId: typeof Schema.String;
18
18
  } & Fields>;
19
19
  export declare const LSDClientSessionChannelMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
20
20
  _tag: Schema.tag<Tag>;
21
21
  } & {
22
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
22
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
23
23
  } & {
24
24
  clientId: typeof Schema.String;
25
25
  sessionId: typeof Schema.String;
@@ -27,7 +27,7 @@ export declare const LSDClientSessionChannelMessage: <Tag extends string, Fields
27
27
  export declare const LSDClientSessionReqResMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
28
28
  _tag: Schema.tag<Tag>;
29
29
  } & {
30
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
30
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
31
31
  } & {
32
32
  clientId: typeof Schema.String;
33
33
  sessionId: typeof Schema.String;
@@ -36,7 +36,7 @@ export declare const LSDClientSessionReqResMessage: <Tag extends string, Fields
36
36
  export declare const LSDReqResMessage: <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) => Schema.Struct<{
37
37
  _tag: Schema.tag<Tag>;
38
38
  } & {
39
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
39
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
40
40
  } & {
41
41
  clientId: typeof Schema.String;
42
42
  } & {
@@ -4,7 +4,7 @@ import * as SyncState from '../sync/syncstate.ts';
4
4
  declare const ResetAllDataReq_base: Schema.Struct<{
5
5
  _tag: Schema.tag<"LSD.Leader.ResetAllDataReq">;
6
6
  } & {
7
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
7
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
8
8
  } & {
9
9
  clientId: typeof Schema.String;
10
10
  } & {
@@ -17,7 +17,7 @@ export declare class ResetAllDataReq extends ResetAllDataReq_base {
17
17
  declare const DatabaseFileInfoReq_base: Schema.Struct<{
18
18
  _tag: Schema.tag<"LSD.Leader.DatabaseFileInfoReq">;
19
19
  } & {
20
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
20
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
21
21
  } & {
22
22
  clientId: typeof Schema.String;
23
23
  } & {
@@ -39,7 +39,7 @@ export declare class DatabaseFileInfo extends DatabaseFileInfo_base {
39
39
  declare const DatabaseFileInfoRes_base: Schema.Struct<{
40
40
  _tag: Schema.tag<"LSD.Leader.DatabaseFileInfoRes">;
41
41
  } & {
42
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
42
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
43
43
  } & {
44
44
  clientId: typeof Schema.String;
45
45
  } & {
@@ -53,7 +53,7 @@ export declare class DatabaseFileInfoRes extends DatabaseFileInfoRes_base {
53
53
  declare const NetworkStatusSubscribe_base: Schema.Struct<{
54
54
  _tag: Schema.tag<"LSD.Leader.NetworkStatusSubscribe">;
55
55
  } & {
56
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
56
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
57
57
  } & {
58
58
  clientId: typeof Schema.String;
59
59
  } & {
@@ -66,7 +66,7 @@ export declare class NetworkStatusSubscribe extends NetworkStatusSubscribe_base
66
66
  declare const NetworkStatusUnsubscribe_base: Schema.Struct<{
67
67
  _tag: Schema.tag<"LSD.Leader.NetworkStatusUnsubscribe">;
68
68
  } & {
69
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
69
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
70
70
  } & {
71
71
  clientId: typeof Schema.String;
72
72
  } & {
@@ -79,7 +79,7 @@ export declare class NetworkStatusUnsubscribe extends NetworkStatusUnsubscribe_b
79
79
  declare const NetworkStatusRes_base: Schema.Struct<{
80
80
  _tag: Schema.tag<"LSD.Leader.NetworkStatusRes">;
81
81
  } & {
82
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
82
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
83
83
  } & {
84
84
  clientId: typeof Schema.String;
85
85
  } & {
@@ -99,7 +99,7 @@ export declare class NetworkStatusRes extends NetworkStatusRes_base {
99
99
  declare const SyncingInfoReq_base: Schema.Struct<{
100
100
  _tag: Schema.tag<"LSD.Leader.SyncingInfoReq">;
101
101
  } & {
102
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
102
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
103
103
  } & {
104
104
  clientId: typeof Schema.String;
105
105
  } & {
@@ -116,7 +116,7 @@ export declare class SyncingInfo extends SyncingInfo_base {
116
116
  declare const SyncingInfoRes_base: Schema.Struct<{
117
117
  _tag: Schema.tag<"LSD.Leader.SyncingInfoRes">;
118
118
  } & {
119
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
119
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
120
120
  } & {
121
121
  clientId: typeof Schema.String;
122
122
  } & {
@@ -129,7 +129,7 @@ export declare class SyncingInfoRes extends SyncingInfoRes_base {
129
129
  declare const SyncHistorySubscribe_base: Schema.Struct<{
130
130
  _tag: Schema.tag<"LSD.Leader.SyncHistorySubscribe">;
131
131
  } & {
132
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
132
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
133
133
  } & {
134
134
  clientId: typeof Schema.String;
135
135
  } & {
@@ -142,7 +142,7 @@ export declare class SyncHistorySubscribe extends SyncHistorySubscribe_base {
142
142
  declare const SyncHistoryUnsubscribe_base: Schema.Struct<{
143
143
  _tag: Schema.tag<"LSD.Leader.SyncHistoryUnsubscribe">;
144
144
  } & {
145
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
145
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
146
146
  } & {
147
147
  clientId: typeof Schema.String;
148
148
  } & {
@@ -155,7 +155,7 @@ export declare class SyncHistoryUnsubscribe extends SyncHistoryUnsubscribe_base
155
155
  declare const SyncHistoryRes_base: Schema.Struct<{
156
156
  _tag: Schema.tag<"LSD.Leader.SyncHistoryRes">;
157
157
  } & {
158
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
158
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
159
159
  } & {
160
160
  clientId: typeof Schema.String;
161
161
  } & {
@@ -177,7 +177,7 @@ export declare class SyncHistoryRes extends SyncHistoryRes_base {
177
177
  declare const SyncHeadSubscribe_base: Schema.Struct<{
178
178
  _tag: Schema.tag<"LSD.Leader.SyncHeadSubscribe">;
179
179
  } & {
180
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
180
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
181
181
  } & {
182
182
  clientId: typeof Schema.String;
183
183
  } & {
@@ -190,7 +190,7 @@ export declare class SyncHeadSubscribe extends SyncHeadSubscribe_base {
190
190
  declare const SyncHeadUnsubscribe_base: Schema.Struct<{
191
191
  _tag: Schema.tag<"LSD.Leader.SyncHeadUnsubscribe">;
192
192
  } & {
193
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
193
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
194
194
  } & {
195
195
  clientId: typeof Schema.String;
196
196
  } & {
@@ -203,7 +203,7 @@ export declare class SyncHeadUnsubscribe extends SyncHeadUnsubscribe_base {
203
203
  declare const SyncHeadRes_base: Schema.Struct<{
204
204
  _tag: Schema.tag<"LSD.Leader.SyncHeadRes">;
205
205
  } & {
206
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
206
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
207
207
  } & {
208
208
  clientId: typeof Schema.String;
209
209
  } & {
@@ -230,7 +230,7 @@ export declare class SyncHeadRes extends SyncHeadRes_base {
230
230
  declare const SnapshotReq_base: Schema.Struct<{
231
231
  _tag: Schema.tag<"LSD.Leader.SnapshotReq">;
232
232
  } & {
233
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
233
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
234
234
  } & {
235
235
  clientId: typeof Schema.String;
236
236
  } & {
@@ -241,7 +241,7 @@ export declare class SnapshotReq extends SnapshotReq_base {
241
241
  declare const SnapshotRes_base: Schema.Struct<{
242
242
  _tag: Schema.tag<"LSD.Leader.SnapshotRes">;
243
243
  } & {
244
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
244
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
245
245
  } & {
246
246
  clientId: typeof Schema.String;
247
247
  } & {
@@ -261,7 +261,7 @@ export declare const LoadDatabaseFile: import("./devtools-messages-common.ts").L
261
261
  declare const SyncPull_base: Schema.Struct<{
262
262
  _tag: Schema.tag<"LSD.Leader.SyncPull">;
263
263
  } & {
264
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
264
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
265
265
  } & {
266
266
  payload: typeof SyncState.PayloadUpstream;
267
267
  }>;
@@ -270,7 +270,7 @@ export declare class SyncPull extends SyncPull_base {
270
270
  declare const CommitEventReq_base: Schema.Struct<{
271
271
  _tag: Schema.tag<"LSD.Leader.CommitEventReq">;
272
272
  } & {
273
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
273
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
274
274
  } & {
275
275
  clientId: typeof Schema.String;
276
276
  } & {
@@ -286,7 +286,7 @@ export declare class CommitEventReq extends CommitEventReq_base {
286
286
  declare const CommitEventRes_base: Schema.Struct<{
287
287
  _tag: Schema.tag<"LSD.Leader.CommitEventRes">;
288
288
  } & {
289
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
289
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
290
290
  } & {
291
291
  clientId: typeof Schema.String;
292
292
  } & {
@@ -297,7 +297,7 @@ export declare class CommitEventRes extends CommitEventRes_base {
297
297
  declare const EventlogReq_base: Schema.Struct<{
298
298
  _tag: Schema.tag<"LSD.Leader.EventlogReq">;
299
299
  } & {
300
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
300
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
301
301
  } & {
302
302
  clientId: typeof Schema.String;
303
303
  } & {
@@ -308,7 +308,7 @@ export declare class EventlogReq extends EventlogReq_base {
308
308
  declare const EventlogRes_base: Schema.Struct<{
309
309
  _tag: Schema.tag<"LSD.Leader.EventlogRes">;
310
310
  } & {
311
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
311
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
312
312
  } & {
313
313
  clientId: typeof Schema.String;
314
314
  } & {
@@ -321,7 +321,7 @@ export declare class EventlogRes extends EventlogRes_base {
321
321
  declare const Ping_base: Schema.Struct<{
322
322
  _tag: Schema.tag<"LSD.Leader.Ping">;
323
323
  } & {
324
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
324
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
325
325
  } & {
326
326
  clientId: typeof Schema.String;
327
327
  } & {
@@ -332,7 +332,7 @@ export declare class Ping extends Ping_base {
332
332
  declare const Pong_base: Schema.Struct<{
333
333
  _tag: Schema.tag<"LSD.Leader.Pong">;
334
334
  } & {
335
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
335
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
336
336
  } & {
337
337
  clientId: typeof Schema.String;
338
338
  } & {
@@ -343,7 +343,7 @@ export declare class Pong extends Pong_base {
343
343
  declare const Disconnect_base: Schema.Struct<{
344
344
  _tag: Schema.tag<"LSD.Leader.Disconnect">;
345
345
  } & {
346
- liveStoreVersion: Schema.Literal<["0.4.0-dev.19"]>;
346
+ liveStoreVersion: Schema.Literal<["0.4.0-dev.20"]>;
347
347
  } & {
348
348
  clientId: typeof Schema.String;
349
349
  } & {
@@ -185,12 +185,12 @@ export const astToSql = (ast) => {
185
185
  : '';
186
186
  const limitStmt = ast.limit._tag === 'Some' ? `LIMIT ?` : '';
187
187
  const offsetStmt = ast.offset._tag === 'Some' ? `OFFSET ?` : '';
188
- // Push offset and limit values in the correct order matching the query string
189
- if (ast.offset._tag === 'Some')
190
- bindValues.push(ast.offset.value);
188
+ // Push limit and offset values in the correct order matching the query string
191
189
  if (ast.limit._tag === 'Some')
192
190
  bindValues.push(ast.limit.value);
193
- const query = [selectStmt, fromStmt, whereStmt, orderByStmt, offsetStmt, limitStmt]
191
+ if (ast.offset._tag === 'Some')
192
+ bindValues.push(ast.offset.value);
193
+ const query = [selectStmt, fromStmt, whereStmt, orderByStmt, limitStmt, offsetStmt]
194
194
  .map((clause) => clause.trim())
195
195
  .filter((clause) => clause.length > 0)
196
196
  .join(' ');
@@ -1 +1 @@
1
- {"version":3,"file":"astToSql.js","sourceRoot":"","sources":["../../../../../src/schema/state/sqlite/query-builder/astToSql.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAK9D,sCAAsC;AACtC,MAAM,eAAe,GAAG,CAAC,UAAkB,EAAU,EAAE,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAA;AAE7F,MAAM,iBAAiB,GAAG,CACxB,eAAqD,EACrD,QAAmC,EACnC,UAAsB,EACd,EAAE;IACV,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAA;IAE3C,MAAM,WAAW,GAAG,eAAe;SAChC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;QAC1B,MAAM,SAAS,GAAG,eAAe,CAAC,GAAG,CAAC,CAAA;QAEtC,qBAAqB;QACrB,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACnB,IAAI,EAAE,KAAK,GAAG,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC;gBAC9B,MAAM,IAAI,K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,CAAC,CAAA"}
@@ -217,7 +217,7 @@ describe('query builder', () => {
217
217
  10,
218
218
  10,
219
219
  ],
220
- "query": "SELECT "id", "text" FROM 'todos' WHERE "completed" = ? OFFSET ? LIMIT ?",
220
+ "query": "SELECT "id", "text" FROM 'todos' WHERE "completed" = ? LIMIT ? OFFSET ?",
221
221
  "schema": "ReadonlyArray<{ readonly id: string; readonly text: string }>",
222
222
  }
223
223
  `);
@@ -228,10 +228,10 @@ describe('query builder', () => {
228
228
  {
229
229
  "bindValues": [
230
230
  1,
231
- 5,
232
231
  10,
232
+ 5,
233
233
  ],
234
- "query": "SELECT "id", "text" FROM 'todos' WHERE "completed" = ? OFFSET ? LIMIT ?",
234
+ "query": "SELECT "id", "text" FROM 'todos' WHERE "completed" = ? LIMIT ? OFFSET ?",
235
235
  "schema": "ReadonlyArray<{ readonly id: string; readonly text: string }>",
236
236
  }
237
237
  `);
package/dist/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const liveStoreVersion: "0.4.0-dev.19";
1
+ export declare const liveStoreVersion: "0.4.0-dev.20";
2
2
  /**
3
3
  * CRITICAL: Increment this version whenever you modify client-side EVENTLOG table schemas.
4
4
  *
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.19';
4
+ export const liveStoreVersion = '0.4.0-dev.20';
5
5
  /**
6
6
  * CRITICAL: Increment this version whenever you modify client-side EVENTLOG table schemas.
7
7
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livestore/common",
3
- "version": "0.4.0-dev.19",
3
+ "version": "0.4.0-dev.20",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -15,12 +15,12 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@opentelemetry/api": "1.9.0",
18
- "@livestore/utils": "0.4.0-dev.19",
19
- "@livestore/webmesh": "0.4.0-dev.19"
18
+ "@livestore/utils": "0.4.0-dev.20",
19
+ "@livestore/webmesh": "0.4.0-dev.20"
20
20
  },
21
21
  "devDependencies": {
22
22
  "vitest": "3.2.4",
23
- "@livestore/utils-dev": "0.4.0-dev.19"
23
+ "@livestore/utils-dev": "0.4.0-dev.20"
24
24
  },
25
25
  "files": [
26
26
  "package.json",
@@ -230,11 +230,11 @@ export const astToSql = (ast: QueryBuilderAst): { query: string; bindValues: Sql
230
230
  const limitStmt = ast.limit._tag === 'Some' ? `LIMIT ?` : ''
231
231
  const offsetStmt = ast.offset._tag === 'Some' ? `OFFSET ?` : ''
232
232
 
233
- // Push offset and limit values in the correct order matching the query string
234
- if (ast.offset._tag === 'Some') bindValues.push(ast.offset.value)
233
+ // Push limit and offset values in the correct order matching the query string
235
234
  if (ast.limit._tag === 'Some') bindValues.push(ast.limit.value)
235
+ if (ast.offset._tag === 'Some') bindValues.push(ast.offset.value)
236
236
 
237
- const query = [selectStmt, fromStmt, whereStmt, orderByStmt, offsetStmt, limitStmt]
237
+ const query = [selectStmt, fromStmt, whereStmt, orderByStmt, limitStmt, offsetStmt]
238
238
  .map((clause) => clause.trim())
239
239
  .filter((clause) => clause.length > 0)
240
240
  .join(' ')
@@ -249,7 +249,7 @@ describe('query builder', () => {
249
249
  10,
250
250
  10,
251
251
  ],
252
- "query": "SELECT "id", "text" FROM 'todos' WHERE "completed" = ? OFFSET ? LIMIT ?",
252
+ "query": "SELECT "id", "text" FROM 'todos' WHERE "completed" = ? LIMIT ? OFFSET ?",
253
253
  "schema": "ReadonlyArray<{ readonly id: string; readonly text: string }>",
254
254
  }
255
255
  `)
@@ -261,10 +261,10 @@ describe('query builder', () => {
261
261
  {
262
262
  "bindValues": [
263
263
  1,
264
- 5,
265
264
  10,
265
+ 5,
266
266
  ],
267
- "query": "SELECT "id", "text" FROM 'todos' WHERE "completed" = ? OFFSET ? LIMIT ?",
267
+ "query": "SELECT "id", "text" FROM 'todos' WHERE "completed" = ? LIMIT ? OFFSET ?",
268
268
  "schema": "ReadonlyArray<{ readonly id: string; readonly text: string }>",
269
269
  }
270
270
  `)
package/src/version.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // import packageJson from '../package.json' with { type: 'json' }
3
3
  // export const liveStoreVersion = packageJson.version
4
4
 
5
- export const liveStoreVersion = '0.4.0-dev.19' as const
5
+ export const liveStoreVersion = '0.4.0-dev.20' as const
6
6
 
7
7
  /**
8
8
  * CRITICAL: Increment this version whenever you modify client-side EVENTLOG table schemas.