@livestore/common 0.3.1 → 0.3.2-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/ClientSessionLeaderThreadProxy.d.ts +35 -0
  3. package/dist/ClientSessionLeaderThreadProxy.d.ts.map +1 -0
  4. package/dist/ClientSessionLeaderThreadProxy.js +6 -0
  5. package/dist/ClientSessionLeaderThreadProxy.js.map +1 -0
  6. package/dist/adapter-types.d.ts +10 -161
  7. package/dist/adapter-types.d.ts.map +1 -1
  8. package/dist/adapter-types.js +5 -49
  9. package/dist/adapter-types.js.map +1 -1
  10. package/dist/defs.d.ts +20 -0
  11. package/dist/defs.d.ts.map +1 -0
  12. package/dist/defs.js +12 -0
  13. package/dist/defs.js.map +1 -0
  14. package/dist/devtools/devtools-messages-client-session.d.ts +23 -21
  15. package/dist/devtools/devtools-messages-client-session.d.ts.map +1 -1
  16. package/dist/devtools/devtools-messages-common.d.ts +6 -6
  17. package/dist/devtools/devtools-messages-common.d.ts.map +1 -1
  18. package/dist/devtools/devtools-messages-leader.d.ts +26 -24
  19. package/dist/devtools/devtools-messages-leader.d.ts.map +1 -1
  20. package/dist/errors.d.ts +50 -0
  21. package/dist/errors.d.ts.map +1 -0
  22. package/dist/errors.js +36 -0
  23. package/dist/errors.js.map +1 -0
  24. package/dist/leader-thread/LeaderSyncProcessor.d.ts +6 -7
  25. package/dist/leader-thread/LeaderSyncProcessor.d.ts.map +1 -1
  26. package/dist/leader-thread/LeaderSyncProcessor.js +112 -122
  27. package/dist/leader-thread/LeaderSyncProcessor.js.map +1 -1
  28. package/dist/leader-thread/eventlog.d.ts +17 -6
  29. package/dist/leader-thread/eventlog.d.ts.map +1 -1
  30. package/dist/leader-thread/eventlog.js +32 -17
  31. package/dist/leader-thread/eventlog.js.map +1 -1
  32. package/dist/leader-thread/leader-worker-devtools.d.ts.map +1 -1
  33. package/dist/leader-thread/leader-worker-devtools.js +1 -2
  34. package/dist/leader-thread/leader-worker-devtools.js.map +1 -1
  35. package/dist/leader-thread/make-leader-thread-layer.d.ts.map +1 -1
  36. package/dist/leader-thread/make-leader-thread-layer.js +37 -7
  37. package/dist/leader-thread/make-leader-thread-layer.js.map +1 -1
  38. package/dist/leader-thread/materialize-event.d.ts.map +1 -1
  39. package/dist/leader-thread/materialize-event.js +7 -1
  40. package/dist/leader-thread/materialize-event.js.map +1 -1
  41. package/dist/leader-thread/mod.d.ts +1 -0
  42. package/dist/leader-thread/mod.d.ts.map +1 -1
  43. package/dist/leader-thread/mod.js +1 -0
  44. package/dist/leader-thread/mod.js.map +1 -1
  45. package/dist/leader-thread/recreate-db.d.ts +13 -6
  46. package/dist/leader-thread/recreate-db.d.ts.map +1 -1
  47. package/dist/leader-thread/recreate-db.js +1 -3
  48. package/dist/leader-thread/recreate-db.js.map +1 -1
  49. package/dist/leader-thread/types.d.ts +5 -7
  50. package/dist/leader-thread/types.d.ts.map +1 -1
  51. package/dist/make-client-session.d.ts +1 -1
  52. package/dist/make-client-session.d.ts.map +1 -1
  53. package/dist/make-client-session.js +1 -1
  54. package/dist/make-client-session.js.map +1 -1
  55. package/dist/rematerialize-from-eventlog.d.ts +1 -1
  56. package/dist/rematerialize-from-eventlog.d.ts.map +1 -1
  57. package/dist/rematerialize-from-eventlog.js +10 -2
  58. package/dist/rematerialize-from-eventlog.js.map +1 -1
  59. package/dist/schema/EventDef.d.ts +2 -2
  60. package/dist/schema/EventDef.d.ts.map +1 -1
  61. package/dist/schema/EventDef.js +2 -2
  62. package/dist/schema/EventDef.js.map +1 -1
  63. package/dist/schema/EventSequenceNumber.d.ts +20 -2
  64. package/dist/schema/EventSequenceNumber.d.ts.map +1 -1
  65. package/dist/schema/EventSequenceNumber.js +71 -19
  66. package/dist/schema/EventSequenceNumber.js.map +1 -1
  67. package/dist/schema/EventSequenceNumber.test.js +88 -3
  68. package/dist/schema/EventSequenceNumber.test.js.map +1 -1
  69. package/dist/schema/LiveStoreEvent.d.ts +25 -11
  70. package/dist/schema/LiveStoreEvent.d.ts.map +1 -1
  71. package/dist/schema/LiveStoreEvent.js +12 -4
  72. package/dist/schema/LiveStoreEvent.js.map +1 -1
  73. package/dist/schema/state/sqlite/db-schema/dsl/field-defs.js +2 -2
  74. package/dist/schema/state/sqlite/db-schema/dsl/field-defs.js.map +1 -1
  75. package/dist/schema/state/sqlite/db-schema/hash.js +3 -1
  76. package/dist/schema/state/sqlite/db-schema/hash.js.map +1 -1
  77. package/dist/schema/state/sqlite/mod.d.ts +1 -1
  78. package/dist/schema/state/sqlite/mod.d.ts.map +1 -1
  79. package/dist/schema/state/sqlite/query-builder/api.d.ts +35 -8
  80. package/dist/schema/state/sqlite/query-builder/api.d.ts.map +1 -1
  81. package/dist/schema/state/sqlite/query-builder/api.js.map +1 -1
  82. package/dist/schema/state/sqlite/query-builder/impl.d.ts.map +1 -1
  83. package/dist/schema/state/sqlite/query-builder/impl.js +16 -11
  84. package/dist/schema/state/sqlite/query-builder/impl.js.map +1 -1
  85. package/dist/schema/state/sqlite/query-builder/impl.test.d.ts +1 -81
  86. package/dist/schema/state/sqlite/query-builder/impl.test.d.ts.map +1 -1
  87. package/dist/schema/state/sqlite/query-builder/impl.test.js +34 -20
  88. package/dist/schema/state/sqlite/query-builder/impl.test.js.map +1 -1
  89. package/dist/schema/state/sqlite/system-tables.d.ts +67 -62
  90. package/dist/schema/state/sqlite/system-tables.d.ts.map +1 -1
  91. package/dist/schema/state/sqlite/system-tables.js +8 -17
  92. package/dist/schema/state/sqlite/system-tables.js.map +1 -1
  93. package/dist/schema/state/sqlite/table-def.d.ts +1 -1
  94. package/dist/schema/state/sqlite/table-def.d.ts.map +1 -1
  95. package/dist/schema-management/migrations.d.ts +3 -1
  96. package/dist/schema-management/migrations.d.ts.map +1 -1
  97. package/dist/schema-management/migrations.js.map +1 -1
  98. package/dist/sql-queries/sql-queries.d.ts.map +1 -1
  99. package/dist/sql-queries/sql-queries.js +2 -0
  100. package/dist/sql-queries/sql-queries.js.map +1 -1
  101. package/dist/sqlite-types.d.ts +72 -0
  102. package/dist/sqlite-types.d.ts.map +1 -0
  103. package/dist/sqlite-types.js +5 -0
  104. package/dist/sqlite-types.js.map +1 -0
  105. package/dist/sync/ClientSessionSyncProcessor.d.ts +6 -2
  106. package/dist/sync/ClientSessionSyncProcessor.d.ts.map +1 -1
  107. package/dist/sync/ClientSessionSyncProcessor.js +16 -13
  108. package/dist/sync/ClientSessionSyncProcessor.js.map +1 -1
  109. package/dist/sync/next/graphology.d.ts.map +1 -1
  110. package/dist/sync/next/graphology.js +0 -6
  111. package/dist/sync/next/graphology.js.map +1 -1
  112. package/dist/sync/next/rebase-events.d.ts.map +1 -1
  113. package/dist/sync/next/rebase-events.js +1 -0
  114. package/dist/sync/next/rebase-events.js.map +1 -1
  115. package/dist/sync/next/test/compact-events.test.js +1 -1
  116. package/dist/sync/next/test/compact-events.test.js.map +1 -1
  117. package/dist/sync/next/test/event-fixtures.d.ts.map +1 -1
  118. package/dist/sync/next/test/event-fixtures.js +12 -3
  119. package/dist/sync/next/test/event-fixtures.js.map +1 -1
  120. package/dist/sync/sync.d.ts +2 -0
  121. package/dist/sync/sync.d.ts.map +1 -1
  122. package/dist/sync/sync.js +3 -0
  123. package/dist/sync/sync.js.map +1 -1
  124. package/dist/sync/syncstate.d.ts +13 -4
  125. package/dist/sync/syncstate.d.ts.map +1 -1
  126. package/dist/sync/syncstate.js +23 -10
  127. package/dist/sync/syncstate.js.map +1 -1
  128. package/dist/sync/syncstate.test.js +17 -17
  129. package/dist/sync/syncstate.test.js.map +1 -1
  130. package/dist/version.d.ts +1 -1
  131. package/dist/version.d.ts.map +1 -1
  132. package/dist/version.js +1 -1
  133. package/dist/version.js.map +1 -1
  134. package/package.json +7 -6
  135. package/src/ClientSessionLeaderThreadProxy.ts +40 -0
  136. package/src/adapter-types.ts +19 -166
  137. package/src/defs.ts +17 -0
  138. package/src/errors.ts +49 -0
  139. package/src/leader-thread/LeaderSyncProcessor.ts +141 -180
  140. package/src/leader-thread/eventlog.ts +78 -56
  141. package/src/leader-thread/leader-worker-devtools.ts +1 -2
  142. package/src/leader-thread/make-leader-thread-layer.ts +52 -8
  143. package/src/leader-thread/materialize-event.ts +8 -1
  144. package/src/leader-thread/mod.ts +1 -0
  145. package/src/leader-thread/recreate-db.ts +99 -91
  146. package/src/leader-thread/types.ts +6 -11
  147. package/src/make-client-session.ts +2 -2
  148. package/src/rematerialize-from-eventlog.ts +10 -2
  149. package/src/schema/EventDef.ts +5 -3
  150. package/src/schema/EventSequenceNumber.test.ts +120 -3
  151. package/src/schema/EventSequenceNumber.ts +95 -23
  152. package/src/schema/LiveStoreEvent.ts +20 -4
  153. package/src/schema/state/sqlite/db-schema/dsl/field-defs.ts +2 -2
  154. package/src/schema/state/sqlite/db-schema/hash.ts +3 -3
  155. package/src/schema/state/sqlite/mod.ts +1 -1
  156. package/src/schema/state/sqlite/query-builder/api.ts +38 -8
  157. package/src/schema/state/sqlite/query-builder/impl.test.ts +60 -20
  158. package/src/schema/state/sqlite/query-builder/impl.ts +15 -12
  159. package/src/schema/state/sqlite/system-tables.ts +9 -22
  160. package/src/schema/state/sqlite/table-def.ts +1 -1
  161. package/src/schema-management/migrations.ts +3 -1
  162. package/src/sql-queries/sql-queries.ts +2 -0
  163. package/src/sqlite-types.ts +76 -0
  164. package/src/sync/ClientSessionSyncProcessor.ts +17 -20
  165. package/src/sync/next/graphology.ts +0 -6
  166. package/src/sync/next/rebase-events.ts +1 -0
  167. package/src/sync/next/test/compact-events.test.ts +1 -1
  168. package/src/sync/next/test/event-fixtures.ts +12 -3
  169. package/src/sync/sync.ts +3 -0
  170. package/src/sync/syncstate.test.ts +17 -17
  171. package/src/sync/syncstate.ts +31 -10
  172. package/src/version.ts +1 -1
@@ -0,0 +1,35 @@
1
+ import type { Effect, Stream } from '@livestore/utils/effect';
2
+ import type { MigrationsReport } from './defs.js';
3
+ import type * as Devtools from './devtools/mod.js';
4
+ import type { UnexpectedError } from './errors.js';
5
+ import type * as EventSequenceNumber from './schema/EventSequenceNumber.js';
6
+ import type { LiveStoreEvent } from './schema/mod.js';
7
+ import type { LeaderAheadError } from './sync/sync.js';
8
+ import type { PayloadUpstream, SyncState } from './sync/syncstate.js';
9
+ export interface ClientSessionLeaderThreadProxy {
10
+ events: {
11
+ pull: (args: {
12
+ cursor: EventSequenceNumber.EventSequenceNumber;
13
+ }) => Stream.Stream<{
14
+ payload: typeof PayloadUpstream.Type;
15
+ }, UnexpectedError>;
16
+ /** It's important that a client session doesn't call `push` concurrently. */
17
+ push(batch: ReadonlyArray<LiveStoreEvent.AnyEncoded>): Effect.Effect<void, UnexpectedError | LeaderAheadError>;
18
+ };
19
+ /** The initial state after the leader thread has booted */
20
+ readonly initialState: {
21
+ /** The latest event sequence number during boot. Used for the client session to resume syncing. */
22
+ readonly leaderHead: EventSequenceNumber.EventSequenceNumber;
23
+ /** The migrations report from the leader thread */
24
+ readonly migrationsReport: MigrationsReport;
25
+ };
26
+ export: Effect.Effect<Uint8Array, UnexpectedError>;
27
+ getEventlogData: Effect.Effect<Uint8Array, UnexpectedError>;
28
+ getSyncState: Effect.Effect<SyncState, UnexpectedError>;
29
+ /** For debugging purposes it can be useful to manually trigger devtools messages (e.g. to reset the database) */
30
+ sendDevtoolsMessage: (message: Devtools.Leader.MessageToApp) => Effect.Effect<void, UnexpectedError>;
31
+ }
32
+ export declare const of: (proxy: ClientSessionLeaderThreadProxy, options?: {
33
+ overrides?: (original: ClientSessionLeaderThreadProxy) => Partial<ClientSessionLeaderThreadProxy>;
34
+ }) => ClientSessionLeaderThreadProxy;
35
+ //# sourceMappingURL=ClientSessionLeaderThreadProxy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientSessionLeaderThreadProxy.d.ts","sourceRoot":"","sources":["../src/ClientSessionLeaderThreadProxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,E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E,eAAe,CAAC,CAAA;IACvD,iHAAiH;IACjH,mBAAmB,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,YAAY,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,CAAA;CACrG;AAED,eAAO,MAAM,EAAE,GACb,OAAO,8BAA8B,EACrC,UAAU;IAAE,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,8BAA8B,KAAK,OAAO,CAAC,8BAA8B,CAAC,CAAA;CAAE,KAC9G,8BAIF,CAAA"}
@@ -0,0 +1,6 @@
1
+ export const of = (proxy, options) => {
2
+ if (options?.overrides === undefined)
3
+ return proxy;
4
+ return { ...proxy, ...options.overrides(proxy) };
5
+ };
6
+ //# sourceMappingURL=ClientSessionLeaderThreadProxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientSessionLeaderThreadProxy.js","sourceRoot":"","sources":["../src/ClientSessionLeaderThreadProxy.ts"],"names":[],"mappings":"AAgCA,MAAM,CAAC,MAAM,EAAE,GAAG,CAChB,KAAqC,EACrC,OAA+G,EAC/E,EAAE;IAClC,IAAI,OAAO,EAAE,SAAS,KAAK,SAAS;QAAE,OAAO,KAAK,CAAA;IAElD,OAAO,EAAE,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAA;AAClD,CAAC,CAAA"}
@@ -1,28 +1,13 @@
1
- import type { Cause, Queue, Scope, SubscriptionRef, WebChannel } from '@livestore/utils/effect';
2
- import { Effect, Schema, Stream } from '@livestore/utils/effect';
1
+ import { type Cause, type Effect, type Queue, Schema, type Scope, type SubscriptionRef, type WebChannel } from '@livestore/utils/effect';
2
+ import type { ClientSessionLeaderThreadProxy } from './ClientSessionLeaderThreadProxy.js';
3
3
  import type * as Devtools from './devtools/mod.js';
4
- import * as EventSequenceNumber from './schema/EventSequenceNumber.js';
5
- import type { LiveStoreEvent, LiveStoreSchema } from './schema/mod.js';
6
- import type { QueryBuilder } from './schema/state/sqlite/query-builder/api.js';
7
- import type { LeaderAheadError } from './sync/sync.js';
8
- import type { PayloadUpstream, SyncState } from './sync/syncstate.js';
9
- import type { PreparedBindValues } from './util.js';
10
- export interface PreparedStatement {
11
- execute(bindValues: PreparedBindValues | undefined, options?: {
12
- onRowsChanged?: (rowsChanged: number) => void;
13
- }): void;
14
- select<T>(bindValues: PreparedBindValues | undefined): ReadonlyArray<T>;
15
- finalize(): void;
16
- sql: string;
17
- }
18
- export type SqliteDbSession = {
19
- changeset: () => Uint8Array | undefined;
20
- finish: () => void;
21
- };
22
- export type SqliteDbChangeset = {
23
- invert: () => SqliteDbChangeset;
24
- apply: () => void;
25
- };
4
+ import type { IntentionalShutdownCause, SyncError, UnexpectedError } from './errors.js';
5
+ import type { LiveStoreSchema } from './schema/mod.js';
6
+ import type { SqliteDb } from './sqlite-types.js';
7
+ export * as ClientSessionLeaderThreadProxy from './ClientSessionLeaderThreadProxy.js';
8
+ export * from './defs.js';
9
+ export * from './errors.js';
10
+ export * from './sqlite-types.js';
26
11
  export interface ClientSession {
27
12
  /** SQLite database with synchronous API running in the same thread (usually in-memory) */
28
13
  sqliteDb: SqliteDb;
@@ -37,89 +22,12 @@ export interface ClientSession {
37
22
  sessionId: string;
38
23
  /** Status info whether current session is leader or not */
39
24
  lockStatus: SubscriptionRef.SubscriptionRef<LockStatus>;
40
- shutdown: (cause: Cause.Cause<UnexpectedError | IntentionalShutdownCause>) => Effect.Effect<void>;
25
+ shutdown: (cause: Cause.Cause<UnexpectedError | IntentionalShutdownCause | SyncError>) => Effect.Effect<void>;
41
26
  /** A proxy API to communicate with the leader thread */
42
27
  leaderThread: ClientSessionLeaderThreadProxy;
43
28
  /** A unique identifier for the current instance of the client session. Used for debugging purposes. */
44
29
  debugInstanceId: string;
45
30
  }
46
- export declare const LeaderPullCursor: Schema.Struct<{
47
- mergeCounter: typeof Schema.Number;
48
- eventNum: Schema.Struct<{
49
- global: Schema.BrandSchema<number & import("effect/Brand").Brand<"GlobalEventSequenceNumber">, number, never>;
50
- client: Schema.BrandSchema<number & import("effect/Brand").Brand<"ClientEventSequenceNumber">, number, never>;
51
- }>;
52
- }>;
53
- export type LeaderPullCursor = typeof LeaderPullCursor.Type;
54
- export interface ClientSessionLeaderThreadProxy {
55
- events: {
56
- pull: (args: {
57
- cursor: LeaderPullCursor;
58
- }) => Stream.Stream<{
59
- payload: typeof PayloadUpstream.Type;
60
- mergeCounter: number;
61
- }, UnexpectedError>;
62
- /** It's important that a client session doesn't call `push` concurrently. */
63
- push(batch: ReadonlyArray<LiveStoreEvent.AnyEncoded>): Effect.Effect<void, UnexpectedError | LeaderAheadError>;
64
- };
65
- /** The initial state after the leader thread has booted */
66
- readonly initialState: {
67
- /** The latest event sequence number during boot. Used for the client session to resume syncing. */
68
- readonly leaderHead: EventSequenceNumber.EventSequenceNumber;
69
- /** The migrations report from the leader thread */
70
- readonly migrationsReport: MigrationsReport;
71
- };
72
- export: Effect.Effect<Uint8Array, UnexpectedError>;
73
- getEventlogData: Effect.Effect<Uint8Array, UnexpectedError>;
74
- getSyncState: Effect.Effect<SyncState, UnexpectedError>;
75
- /** For debugging purposes it can be useful to manually trigger devtools messages (e.g. to reset the database) */
76
- sendDevtoolsMessage: (message: Devtools.Leader.MessageToApp) => Effect.Effect<void, UnexpectedError>;
77
- }
78
- /**
79
- * Common interface for SQLite databases used by LiveStore to facilitate a consistent API across different platforms.
80
- * Always assumes a synchronous SQLite build with the `bytecode` and `session` extensions enabled.
81
- * Can be either in-memory or persisted to disk.
82
- */
83
- export interface SqliteDb<TReq = any, TMetadata extends TReq = TReq> {
84
- _tag: 'SqliteDb';
85
- metadata: TMetadata;
86
- prepare(queryStr: string): PreparedStatement;
87
- execute(queryStr: string, bindValues?: PreparedBindValues | undefined, options?: {
88
- onRowsChanged?: (rowsChanged: number) => void;
89
- }): void;
90
- execute(queryBuilder: QueryBuilder.Any, options?: {
91
- onRowsChanged?: (rowsChanged: number) => void;
92
- }): void;
93
- select<T>(queryStr: string, bindValues?: PreparedBindValues | undefined): ReadonlyArray<T>;
94
- select<T>(queryBuilder: QueryBuilder<T, any, any>): ReadonlyArray<T>;
95
- export(): Uint8Array;
96
- import: (data: Uint8Array | SqliteDb<TReq>) => void;
97
- close(): void;
98
- destroy(): void;
99
- session(): SqliteDbSession;
100
- makeChangeset: (data: Uint8Array) => SqliteDbChangeset;
101
- }
102
- export type MakeSqliteDb<TReq = {
103
- dbPointer: number;
104
- persistenceInfo: PersistenceInfo;
105
- }, TInput_ extends {
106
- _tag: string;
107
- } = {
108
- _tag: string;
109
- }, TMetadata_ extends TReq = TReq, R = never> = <TInput extends TInput_, TMetadata extends TMetadata_ & {
110
- _tag: TInput['_tag'];
111
- } = TMetadata_ & {
112
- _tag: TInput['_tag'];
113
- }>(input: TInput) => Effect.Effect<SqliteDb<TReq, Extract<TMetadata, {
114
- _tag: TInput['_tag'];
115
- }>>, SqliteError | UnexpectedError, R>;
116
- export declare const PersistenceInfo: Schema.TypeLiteral<{
117
- fileName: typeof Schema.String;
118
- }, readonly [{
119
- readonly key: typeof Schema.String;
120
- readonly value: typeof Schema.Any;
121
- }]>;
122
- export type PersistenceInfo<With extends {} = {}> = typeof PersistenceInfo.Type & With;
123
31
  export type ResetMode = 'all-data' | 'only-app-db';
124
32
  export declare const BootStateProgress: Schema.Struct<{
125
33
  done: typeof Schema.Number;
@@ -174,46 +82,6 @@ export type BootStatus = typeof BootStatus.Type;
174
82
  export declare const SessionIdSymbol: unique symbol;
175
83
  export type SessionIdSymbol = typeof SessionIdSymbol;
176
84
  export type LockStatus = 'has-lock' | 'no-lock';
177
- declare const UnexpectedError_base: Schema.TaggedErrorClass<UnexpectedError, "LiveStore.UnexpectedError", {
178
- readonly _tag: Schema.tag<"LiveStore.UnexpectedError">;
179
- } & {
180
- cause: typeof Schema.Defect;
181
- note: Schema.optional<typeof Schema.String>;
182
- payload: Schema.optional<typeof Schema.Any>;
183
- }>;
184
- export declare class UnexpectedError extends UnexpectedError_base {
185
- static mapToUnexpectedError: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, UnexpectedError, R>;
186
- static mapToUnexpectedErrorStream: <A, E, R>(stream: Stream.Stream<A, E, R>) => Stream.Stream<A, UnexpectedError, R>;
187
- }
188
- declare const IntentionalShutdownCause_base: Schema.TaggedErrorClass<IntentionalShutdownCause, "LiveStore.IntentionalShutdownCause", {
189
- readonly _tag: Schema.tag<"LiveStore.IntentionalShutdownCause">;
190
- } & {
191
- reason: Schema.Literal<["devtools-reset", "devtools-import", "adapter-reset", "manual"]>;
192
- }>;
193
- export declare class IntentionalShutdownCause extends IntentionalShutdownCause_base {
194
- }
195
- declare const StoreInterrupted_base: Schema.TaggedErrorClass<StoreInterrupted, "LiveStore.StoreInterrupted", {
196
- readonly _tag: Schema.tag<"LiveStore.StoreInterrupted">;
197
- } & {
198
- reason: typeof Schema.String;
199
- }>;
200
- export declare class StoreInterrupted extends StoreInterrupted_base {
201
- }
202
- declare const SqliteError_base: Schema.TaggedErrorClass<SqliteError, "LiveStore.SqliteError", {
203
- readonly _tag: Schema.tag<"LiveStore.SqliteError">;
204
- } & {
205
- query: Schema.optional<Schema.Struct<{
206
- sql: typeof Schema.String;
207
- bindValues: Schema.Union<[Schema.Record$<typeof Schema.String, typeof Schema.Any>, Schema.Array$<typeof Schema.Any>]>;
208
- }>>;
209
- /** The SQLite result code */
210
- code: Schema.optional<Schema.Union<[typeof Schema.Number, typeof Schema.String]>>;
211
- /** The original SQLite3 error */
212
- cause: typeof Schema.Defect;
213
- note: Schema.optional<typeof Schema.String>;
214
- }>;
215
- export declare class SqliteError extends SqliteError_base {
216
- }
217
85
  export type MigrationOptions = {
218
86
  strategy: 'auto';
219
87
  hooks?: Partial<MigrationHooks>;
@@ -252,23 +120,4 @@ export interface AdapterArgs {
252
120
  */
253
121
  syncPayload: Schema.JsonValue | undefined;
254
122
  }
255
- export declare const MigrationsReportEntry: Schema.Struct<{
256
- tableName: typeof Schema.String;
257
- hashes: Schema.Struct<{
258
- expected: typeof Schema.Number;
259
- actual: Schema.optional<typeof Schema.Number>;
260
- }>;
261
- }>;
262
- export declare const MigrationsReport: Schema.Struct<{
263
- migrations: Schema.Array$<Schema.Struct<{
264
- tableName: typeof Schema.String;
265
- hashes: Schema.Struct<{
266
- expected: typeof Schema.Number;
267
- actual: Schema.optional<typeof Schema.Number>;
268
- }>;
269
- }>>;
270
- }>;
271
- export type MigrationsReport = typeof MigrationsReport.Type;
272
- export type MigrationsReportEntry = typeof MigrationsReportEntry.Type;
273
- export {};
274
123
  //# sourceMappingURL=adapter-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter-types.d.ts","sourceRoot":"","sources":["../src/adapter-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAC/F,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhE,OAAO,KAAK,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,mBAAmB,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAA;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAEnD,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,UAAU,EAAE,kBAAkB,GAAG,SAAS,EAAE,OAAO,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAA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CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA;IACxC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC1D,sBAAsB,EAAE,sBAAsB,CAAA;IAC9C;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC,SAAS,GAAG,SAAS,CAAA;CAC1C"}
@@ -1,12 +1,8 @@
1
- import { Effect, Schema, Stream } from '@livestore/utils/effect';
2
- import * as EventSequenceNumber from './schema/EventSequenceNumber.js';
3
- export const LeaderPullCursor = Schema.Struct({
4
- mergeCounter: Schema.Number,
5
- eventNum: EventSequenceNumber.EventSequenceNumber,
6
- });
7
- export const PersistenceInfo = Schema.Struct({
8
- fileName: Schema.String,
9
- }, { key: Schema.String, value: Schema.Any }).annotations({ title: 'LiveStore.PersistenceInfo' });
1
+ import { Schema, } from '@livestore/utils/effect';
2
+ export * as ClientSessionLeaderThreadProxy from './ClientSessionLeaderThreadProxy.js';
3
+ export * from './defs.js';
4
+ export * from './errors.js';
5
+ export * from './sqlite-types.js';
10
6
  export const BootStateProgress = Schema.Struct({
11
7
  done: Schema.Number,
12
8
  total: Schema.Number,
@@ -35,44 +31,4 @@ export const BootStatus = Schema.Union(Schema.Struct({ stage: Schema.Literal('lo
35
31
  * ```
36
32
  */
37
33
  export const SessionIdSymbol = Symbol.for('@livestore/session-id');
38
- export class UnexpectedError extends Schema.TaggedError()('LiveStore.UnexpectedError', {
39
- cause: Schema.Defect,
40
- note: Schema.optional(Schema.String),
41
- payload: Schema.optional(Schema.Any),
42
- }) {
43
- static mapToUnexpectedError = (effect) => effect.pipe(Effect.mapError((cause) => (Schema.is(UnexpectedError)(cause) ? cause : new UnexpectedError({ cause }))), Effect.catchAllDefect((cause) => new UnexpectedError({ cause })));
44
- static mapToUnexpectedErrorStream = (stream) => stream.pipe(Stream.mapError((cause) => (Schema.is(UnexpectedError)(cause) ? cause : new UnexpectedError({ cause }))));
45
- }
46
- export class IntentionalShutdownCause extends Schema.TaggedError()('LiveStore.IntentionalShutdownCause', {
47
- reason: Schema.Literal('devtools-reset', 'devtools-import', 'adapter-reset', 'manual'),
48
- }) {
49
- }
50
- export class StoreInterrupted extends Schema.TaggedError()('LiveStore.StoreInterrupted', {
51
- reason: Schema.String,
52
- }) {
53
- }
54
- export class SqliteError extends Schema.TaggedError()('LiveStore.SqliteError', {
55
- query: Schema.optional(Schema.Struct({
56
- sql: Schema.String,
57
- bindValues: Schema.Union(Schema.Record({ key: Schema.String, value: Schema.Any }), Schema.Array(Schema.Any)),
58
- })),
59
- /** The SQLite result code */
60
- // code: Schema.optional(Schema.Number),
61
- // Added string support for Expo SQLite (we should refactor this to have a unified error type)
62
- code: Schema.optional(Schema.Union(Schema.Number, Schema.String)),
63
- /** The original SQLite3 error */
64
- cause: Schema.Defect,
65
- note: Schema.optional(Schema.String),
66
- }) {
67
- }
68
- export const MigrationsReportEntry = Schema.Struct({
69
- tableName: Schema.String,
70
- hashes: Schema.Struct({
71
- expected: Schema.Number,
72
- actual: Schema.optional(Schema.Number),
73
- }),
74
- });
75
- export const MigrationsReport = Schema.Struct({
76
- migrations: Schema.Array(MigrationsReportEntry),
77
- });
78
34
  //# sourceMappingURL=adapter-types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter-types.js","sourceRoot":"","sources":["../src/adapter-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAGhE,OAAO,KAAK,mBAAmB,MAAM,iCAAiC,CAAA;AAwCtE,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,YAAY,EAAE,MAAM,CAAC,MAAM;IAC3B,QAAQ,EAAE,mBAAmB,CAAC,mBAAmB;CAClD,CAAC,C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estore/utils/effect';
2
+ export declare const MigrationsReportEntry: Schema.Struct<{
3
+ tableName: typeof Schema.String;
4
+ hashes: Schema.Struct<{
5
+ expected: typeof Schema.Number;
6
+ actual: Schema.optional<typeof Schema.Number>;
7
+ }>;
8
+ }>;
9
+ export declare const MigrationsReport: Schema.Struct<{
10
+ migrations: Schema.Array$<Schema.Struct<{
11
+ tableName: typeof Schema.String;
12
+ hashes: Schema.Struct<{
13
+ expected: typeof Schema.Number;
14
+ actual: Schema.optional<typeof Schema.Number>;
15
+ }>;
16
+ }>>;
17
+ }>;
18
+ export type MigrationsReport = typeof MigrationsReport.Type;
19
+ export type MigrationsReportEntry = typeof MigrationsReportEntry.Type;
20
+ //# sourceMappingURL=defs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.d.ts","sourceRoot":"","sources":["../src/defs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,eAAO,MAAM,qBAAqB;;;;;;EAMhC,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;EAE3B,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC,IAAI,CAAA;AAE3D,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC,IAAI,CAAA"}
package/dist/defs.js ADDED
@@ -0,0 +1,12 @@
1
+ import { Schema } from '@livestore/utils/effect';
2
+ export const MigrationsReportEntry = Schema.Struct({
3
+ tableName: Schema.String,
4
+ hashes: Schema.Struct({
5
+ expected: Schema.Number,
6
+ actual: Schema.optional(Schema.Number),
7
+ }),
8
+ });
9
+ export const MigrationsReport = Schema.Struct({
10
+ migrations: Schema.Array(MigrationsReportEntry),
11
+ });
12
+ //# sourceMappingURL=defs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defs.js","sourceRoot":"","sources":["../src/defs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC;IACjD,SAAS,EAAE,MAAM,CAAC,MAAM;IACxB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC,MAAM;QACvB,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;KACvC,CAAC;CACH,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5C,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC;CAChD,CAAC,CAAA"}
@@ -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.3.1"]>;
5
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
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.3.1"]>;
16
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
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.3.1"]>;
76
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
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.3.1"]>;
89
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
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.3.1"]>;
150
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
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.3.1"]>;
163
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
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.3.1"]>;
174
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
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.3.1"]>;
185
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
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.3.1"]>;
200
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
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.3.1"]>;
211
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
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.3.1"]>;
224
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
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.3.1"]>;
237
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
238
238
  } & {
239
239
  clientId: typeof Schema.String;
240
240
  sessionId: typeof Schema.String;
@@ -243,10 +243,12 @@ declare const SyncHeadRes_base: Schema.Struct<{
243
243
  local: Schema.Struct<{
244
244
  global: Schema.BrandSchema<number & import("effect/Brand").Brand<"GlobalEventSequenceNumber">, number, never>;
245
245
  client: Schema.BrandSchema<number & import("effect/Brand").Brand<"ClientEventSequenceNumber">, number, never>;
246
+ rebaseGeneration: typeof Schema.Int;
246
247
  }>;
247
248
  upstream: Schema.Struct<{
248
249
  global: Schema.BrandSchema<number & import("effect/Brand").Brand<"GlobalEventSequenceNumber">, number, never>;
249
250
  client: Schema.BrandSchema<number & import("effect/Brand").Brand<"ClientEventSequenceNumber">, number, never>;
251
+ rebaseGeneration: typeof Schema.Int;
250
252
  }>;
251
253
  subscriptionId: typeof Schema.String;
252
254
  }>;
@@ -255,7 +257,7 @@ export declare class SyncHeadRes extends SyncHeadRes_base {
255
257
  declare const ReactivityGraphSubscribe_base: Schema.Struct<{
256
258
  _tag: Schema.tag<"LSD.ClientSession.ReactivityGraphSubscribe">;
257
259
  } & {
258
- liveStoreVersion: Schema.Literal<["0.3.1"]>;
260
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
259
261
  } & {
260
262
  clientId: typeof Schema.String;
261
263
  sessionId: typeof Schema.String;
@@ -269,7 +271,7 @@ export declare class ReactivityGraphSubscribe extends ReactivityGraphSubscribe_b
269
271
  declare const ReactivityGraphUnsubscribe_base: Schema.Struct<{
270
272
  _tag: Schema.tag<"LSD.ClientSession.ReactivityGraphUnsubscribe">;
271
273
  } & {
272
- liveStoreVersion: Schema.Literal<["0.3.1"]>;
274
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
273
275
  } & {
274
276
  clientId: typeof Schema.String;
275
277
  sessionId: typeof Schema.String;
@@ -282,7 +284,7 @@ export declare class ReactivityGraphUnsubscribe extends ReactivityGraphUnsubscri
282
284
  declare const ReactivityGraphRes_base: Schema.Struct<{
283
285
  _tag: Schema.tag<"LSD.ClientSession.ReactivityGraphRes">;
284
286
  } & {
285
- liveStoreVersion: Schema.Literal<["0.3.1"]>;
287
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
286
288
  } & {
287
289
  clientId: typeof Schema.String;
288
290
  sessionId: typeof Schema.String;
@@ -296,7 +298,7 @@ export declare class ReactivityGraphRes extends ReactivityGraphRes_base {
296
298
  declare const LiveQueriesSubscribe_base: Schema.Struct<{
297
299
  _tag: Schema.tag<"LSD.ClientSession.LiveQueriesSubscribe">;
298
300
  } & {
299
- liveStoreVersion: Schema.Literal<["0.3.1"]>;
301
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
300
302
  } & {
301
303
  clientId: typeof Schema.String;
302
304
  sessionId: typeof Schema.String;
@@ -309,7 +311,7 @@ export declare class LiveQueriesSubscribe extends LiveQueriesSubscribe_base {
309
311
  declare const LiveQueriesUnsubscribe_base: Schema.Struct<{
310
312
  _tag: Schema.tag<"LSD.ClientSession.LiveQueriesUnsubscribe">;
311
313
  } & {
312
- liveStoreVersion: Schema.Literal<["0.3.1"]>;
314
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
313
315
  } & {
314
316
  clientId: typeof Schema.String;
315
317
  sessionId: typeof Schema.String;
@@ -339,7 +341,7 @@ export declare class SerializedLiveQuery extends SerializedLiveQuery_base {
339
341
  declare const LiveQueriesRes_base: Schema.Struct<{
340
342
  _tag: Schema.tag<"LSD.ClientSession.LiveQueriesRes">;
341
343
  } & {
342
- liveStoreVersion: Schema.Literal<["0.3.1"]>;
344
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
343
345
  } & {
344
346
  clientId: typeof Schema.String;
345
347
  sessionId: typeof Schema.String;
@@ -353,7 +355,7 @@ export declare class LiveQueriesRes extends LiveQueriesRes_base {
353
355
  declare const Ping_base: Schema.Struct<{
354
356
  _tag: Schema.tag<"LSD.ClientSession.Ping">;
355
357
  } & {
356
- liveStoreVersion: Schema.Literal<["0.3.1"]>;
358
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
357
359
  } & {
358
360
  clientId: typeof Schema.String;
359
361
  sessionId: typeof Schema.String;
@@ -364,7 +366,7 @@ export declare class Ping extends Ping_base {
364
366
  declare const Pong_base: Schema.Struct<{
365
367
  _tag: Schema.tag<"LSD.ClientSession.Pong">;
366
368
  } & {
367
- liveStoreVersion: Schema.Literal<["0.3.1"]>;
369
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
368
370
  } & {
369
371
  clientId: typeof Schema.String;
370
372
  sessionId: typeof Schema.String;
@@ -375,7 +377,7 @@ export declare class Pong extends Pong_base {
375
377
  declare const Disconnect_base: Schema.Struct<{
376
378
  _tag: Schema.tag<"LSD.ClientSession.Disconnect">;
377
379
  } & {
378
- liveStoreVersion: Schema.Literal<["0.3.1"]>;
380
+ liveStoreVersion: Schema.Literal<["0.3.2-dev.0"]>;
379
381
  } & {
380
382
  clientId: typeof Schema.String;
381
383
  sessionId: typeof Schema.String;
@@ -1 +1 @@
1
- {"version":3,"file":"devtools-messages-client-session.d.ts","sourceRoot":"","sources":["../../src/devtools/devtools-messages-client-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;;;;;;;;;;AAOhD,qBAAa,YAAa,SAAQ,iBAAmE;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAExG,qBAAa,YAAa,SAAQ,iBAEhC;CAAG;;;;;;;;;;;;AAEL,qBAAa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