@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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/ClientSessionLeaderThreadProxy.d.ts +35 -0
- package/dist/ClientSessionLeaderThreadProxy.d.ts.map +1 -0
- package/dist/ClientSessionLeaderThreadProxy.js +6 -0
- package/dist/ClientSessionLeaderThreadProxy.js.map +1 -0
- package/dist/adapter-types.d.ts +10 -161
- package/dist/adapter-types.d.ts.map +1 -1
- package/dist/adapter-types.js +5 -49
- package/dist/adapter-types.js.map +1 -1
- package/dist/defs.d.ts +20 -0
- package/dist/defs.d.ts.map +1 -0
- package/dist/defs.js +12 -0
- package/dist/defs.js.map +1 -0
- package/dist/devtools/devtools-messages-client-session.d.ts +23 -21
- package/dist/devtools/devtools-messages-client-session.d.ts.map +1 -1
- package/dist/devtools/devtools-messages-common.d.ts +6 -6
- package/dist/devtools/devtools-messages-common.d.ts.map +1 -1
- package/dist/devtools/devtools-messages-leader.d.ts +26 -24
- package/dist/devtools/devtools-messages-leader.d.ts.map +1 -1
- package/dist/errors.d.ts +50 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +36 -0
- package/dist/errors.js.map +1 -0
- package/dist/leader-thread/LeaderSyncProcessor.d.ts +6 -7
- package/dist/leader-thread/LeaderSyncProcessor.d.ts.map +1 -1
- package/dist/leader-thread/LeaderSyncProcessor.js +112 -122
- package/dist/leader-thread/LeaderSyncProcessor.js.map +1 -1
- package/dist/leader-thread/eventlog.d.ts +17 -6
- package/dist/leader-thread/eventlog.d.ts.map +1 -1
- package/dist/leader-thread/eventlog.js +32 -17
- package/dist/leader-thread/eventlog.js.map +1 -1
- package/dist/leader-thread/leader-worker-devtools.d.ts.map +1 -1
- package/dist/leader-thread/leader-worker-devtools.js +1 -2
- package/dist/leader-thread/leader-worker-devtools.js.map +1 -1
- package/dist/leader-thread/make-leader-thread-layer.d.ts.map +1 -1
- package/dist/leader-thread/make-leader-thread-layer.js +37 -7
- package/dist/leader-thread/make-leader-thread-layer.js.map +1 -1
- package/dist/leader-thread/materialize-event.d.ts.map +1 -1
- package/dist/leader-thread/materialize-event.js +7 -1
- package/dist/leader-thread/materialize-event.js.map +1 -1
- package/dist/leader-thread/mod.d.ts +1 -0
- package/dist/leader-thread/mod.d.ts.map +1 -1
- package/dist/leader-thread/mod.js +1 -0
- package/dist/leader-thread/mod.js.map +1 -1
- package/dist/leader-thread/recreate-db.d.ts +13 -6
- package/dist/leader-thread/recreate-db.d.ts.map +1 -1
- package/dist/leader-thread/recreate-db.js +1 -3
- package/dist/leader-thread/recreate-db.js.map +1 -1
- package/dist/leader-thread/types.d.ts +5 -7
- package/dist/leader-thread/types.d.ts.map +1 -1
- package/dist/make-client-session.d.ts +1 -1
- package/dist/make-client-session.d.ts.map +1 -1
- package/dist/make-client-session.js +1 -1
- package/dist/make-client-session.js.map +1 -1
- package/dist/rematerialize-from-eventlog.d.ts +1 -1
- package/dist/rematerialize-from-eventlog.d.ts.map +1 -1
- package/dist/rematerialize-from-eventlog.js +10 -2
- package/dist/rematerialize-from-eventlog.js.map +1 -1
- package/dist/schema/EventDef.d.ts +2 -2
- package/dist/schema/EventDef.d.ts.map +1 -1
- package/dist/schema/EventDef.js +2 -2
- package/dist/schema/EventDef.js.map +1 -1
- package/dist/schema/EventSequenceNumber.d.ts +20 -2
- package/dist/schema/EventSequenceNumber.d.ts.map +1 -1
- package/dist/schema/EventSequenceNumber.js +71 -19
- package/dist/schema/EventSequenceNumber.js.map +1 -1
- package/dist/schema/EventSequenceNumber.test.js +88 -3
- package/dist/schema/EventSequenceNumber.test.js.map +1 -1
- package/dist/schema/LiveStoreEvent.d.ts +25 -11
- package/dist/schema/LiveStoreEvent.d.ts.map +1 -1
- package/dist/schema/LiveStoreEvent.js +12 -4
- package/dist/schema/LiveStoreEvent.js.map +1 -1
- package/dist/schema/state/sqlite/db-schema/dsl/field-defs.js +2 -2
- package/dist/schema/state/sqlite/db-schema/dsl/field-defs.js.map +1 -1
- package/dist/schema/state/sqlite/db-schema/hash.js +3 -1
- package/dist/schema/state/sqlite/db-schema/hash.js.map +1 -1
- package/dist/schema/state/sqlite/mod.d.ts +1 -1
- package/dist/schema/state/sqlite/mod.d.ts.map +1 -1
- package/dist/schema/state/sqlite/query-builder/api.d.ts +35 -8
- package/dist/schema/state/sqlite/query-builder/api.d.ts.map +1 -1
- package/dist/schema/state/sqlite/query-builder/api.js.map +1 -1
- package/dist/schema/state/sqlite/query-builder/impl.d.ts.map +1 -1
- package/dist/schema/state/sqlite/query-builder/impl.js +16 -11
- package/dist/schema/state/sqlite/query-builder/impl.js.map +1 -1
- package/dist/schema/state/sqlite/query-builder/impl.test.d.ts +1 -81
- package/dist/schema/state/sqlite/query-builder/impl.test.d.ts.map +1 -1
- package/dist/schema/state/sqlite/query-builder/impl.test.js +34 -20
- package/dist/schema/state/sqlite/query-builder/impl.test.js.map +1 -1
- package/dist/schema/state/sqlite/system-tables.d.ts +67 -62
- package/dist/schema/state/sqlite/system-tables.d.ts.map +1 -1
- package/dist/schema/state/sqlite/system-tables.js +8 -17
- package/dist/schema/state/sqlite/system-tables.js.map +1 -1
- package/dist/schema/state/sqlite/table-def.d.ts +1 -1
- package/dist/schema/state/sqlite/table-def.d.ts.map +1 -1
- package/dist/schema-management/migrations.d.ts +3 -1
- package/dist/schema-management/migrations.d.ts.map +1 -1
- package/dist/schema-management/migrations.js.map +1 -1
- package/dist/sql-queries/sql-queries.d.ts.map +1 -1
- package/dist/sql-queries/sql-queries.js +2 -0
- package/dist/sql-queries/sql-queries.js.map +1 -1
- package/dist/sqlite-types.d.ts +72 -0
- package/dist/sqlite-types.d.ts.map +1 -0
- package/dist/sqlite-types.js +5 -0
- package/dist/sqlite-types.js.map +1 -0
- package/dist/sync/ClientSessionSyncProcessor.d.ts +6 -2
- package/dist/sync/ClientSessionSyncProcessor.d.ts.map +1 -1
- package/dist/sync/ClientSessionSyncProcessor.js +16 -13
- package/dist/sync/ClientSessionSyncProcessor.js.map +1 -1
- package/dist/sync/next/graphology.d.ts.map +1 -1
- package/dist/sync/next/graphology.js +0 -6
- package/dist/sync/next/graphology.js.map +1 -1
- package/dist/sync/next/rebase-events.d.ts.map +1 -1
- package/dist/sync/next/rebase-events.js +1 -0
- package/dist/sync/next/rebase-events.js.map +1 -1
- package/dist/sync/next/test/compact-events.test.js +1 -1
- package/dist/sync/next/test/compact-events.test.js.map +1 -1
- package/dist/sync/next/test/event-fixtures.d.ts.map +1 -1
- package/dist/sync/next/test/event-fixtures.js +12 -3
- package/dist/sync/next/test/event-fixtures.js.map +1 -1
- package/dist/sync/sync.d.ts +2 -0
- package/dist/sync/sync.d.ts.map +1 -1
- package/dist/sync/sync.js +3 -0
- package/dist/sync/sync.js.map +1 -1
- package/dist/sync/syncstate.d.ts +13 -4
- package/dist/sync/syncstate.d.ts.map +1 -1
- package/dist/sync/syncstate.js +23 -10
- package/dist/sync/syncstate.js.map +1 -1
- package/dist/sync/syncstate.test.js +17 -17
- package/dist/sync/syncstate.test.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +7 -6
- package/src/ClientSessionLeaderThreadProxy.ts +40 -0
- package/src/adapter-types.ts +19 -166
- package/src/defs.ts +17 -0
- package/src/errors.ts +49 -0
- package/src/leader-thread/LeaderSyncProcessor.ts +141 -180
- package/src/leader-thread/eventlog.ts +78 -56
- package/src/leader-thread/leader-worker-devtools.ts +1 -2
- package/src/leader-thread/make-leader-thread-layer.ts +52 -8
- package/src/leader-thread/materialize-event.ts +8 -1
- package/src/leader-thread/mod.ts +1 -0
- package/src/leader-thread/recreate-db.ts +99 -91
- package/src/leader-thread/types.ts +6 -11
- package/src/make-client-session.ts +2 -2
- package/src/rematerialize-from-eventlog.ts +10 -2
- package/src/schema/EventDef.ts +5 -3
- package/src/schema/EventSequenceNumber.test.ts +120 -3
- package/src/schema/EventSequenceNumber.ts +95 -23
- package/src/schema/LiveStoreEvent.ts +20 -4
- package/src/schema/state/sqlite/db-schema/dsl/field-defs.ts +2 -2
- package/src/schema/state/sqlite/db-schema/hash.ts +3 -3
- package/src/schema/state/sqlite/mod.ts +1 -1
- package/src/schema/state/sqlite/query-builder/api.ts +38 -8
- package/src/schema/state/sqlite/query-builder/impl.test.ts +60 -20
- package/src/schema/state/sqlite/query-builder/impl.ts +15 -12
- package/src/schema/state/sqlite/system-tables.ts +9 -22
- package/src/schema/state/sqlite/table-def.ts +1 -1
- package/src/schema-management/migrations.ts +3 -1
- package/src/sql-queries/sql-queries.ts +2 -0
- package/src/sqlite-types.ts +76 -0
- package/src/sync/ClientSessionSyncProcessor.ts +17 -20
- package/src/sync/next/graphology.ts +0 -6
- package/src/sync/next/rebase-events.ts +1 -0
- package/src/sync/next/test/compact-events.test.ts +1 -1
- package/src/sync/next/test/event-fixtures.ts +12 -3
- package/src/sync/sync.ts +3 -0
- package/src/sync/syncstate.test.ts +17 -17
- package/src/sync/syncstate.ts +31 -10
- 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,EAAE,MAAM,yBAAyB,CAAA;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,KAAK,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,KAAK,KAAK,mBAAmB,MAAM,iCAAiC,CAAA;AAC3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E,CAAC,QAAQ,EAAE,8BAA8B,KAAK,OAAO,CAAC,8BAA8B,CAAC,CAAA;CAAE,KAC9G,8BAIF,CAAA"}
|
@@ -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"}
|
package/dist/adapter-types.d.ts
CHANGED
@@ -1,28 +1,13 @@
|
|
1
|
-
import type
|
2
|
-
import {
|
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
|
5
|
-
import type {
|
6
|
-
import type {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
export
|
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,
|
1
|
+
{"version":3,"file":"adapter-types.d.ts","sourceRoot":"","sources":["../src/adapter-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,KAAK,EACV,MAAM,EACN,KAAK,KAAK,EACV,KAAK,eAAe,EACpB,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,KAAK,EAAE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CAAC,KAAK,CAAC,CAAA;AAEtD,MAAM,MAAM,OAAO,GAAG,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,CAAA;AAEvG,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,eAAe,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,eAAe,EAAE,OAAO,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"}
|
package/dist/adapter-types.js
CHANGED
@@ -1,12 +1,8 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
export
|
4
|
-
|
5
|
-
|
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":"
|
1
|
+
{"version":3,"file":"adapter-types.js","sourceRoot":"","sources":["../src/adapter-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,GAIP,MAAM,yBAAyB,CAAA;AAOhC,OAAO,KAAK,8BAA8B,MAAM,qCAAqC,CAAA;AACrF,cAAc,WAAW,CAAA;AACzB,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AAmBjC,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,IAAI,EAAE,MAAM,CAAC,MAAM;IACnB,KAAK,EAAE,MAAM,CAAC,MAAM;CACrB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CACpC,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,EACnD,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC,EAClF,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC,EACpF,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC,EAChF,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CACjD,CAAC,WAAW,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,CAAA;AAItC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAA"}
|
package/dist/defs.d.ts
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
import { Schema } from '@livestore/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
|
package/dist/defs.js.map
ADDED
@@ -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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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,yBAA0B,SAAQ,8BAK9C;CAA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