@livestore/common 0.0.56-dev.1 → 0.0.56-dev.2
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/adapter-types.d.ts +1 -1
- package/dist/devtools/devtools-bridge.d.ts +1 -1
- package/dist/devtools/devtools-messages.d.ts +47 -47
- package/dist/devtools/devtools-messages.js +2 -2
- package/dist/devtools/devtools-window-message.d.ts +2 -2
- package/dist/devtools/devtools-window-message.js +4 -4
- package/dist/devtools/index.d.ts +4 -4
- package/dist/devtools/index.js +5 -5
- package/dist/schema/mutations.d.ts +1 -1
- package/package.json +3 -3
- package/src/adapter-types.ts +1 -1
- package/src/devtools/devtools-bridge.ts +1 -1
- package/src/devtools/devtools-messages.ts +2 -2
- package/src/devtools/devtools-window-message.ts +4 -4
- package/src/devtools/index.ts +5 -5
package/dist/adapter-types.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export type BootStatus = typeof BootStatus.Type;
|
|
|
60
60
|
export type Coordinator = {
|
|
61
61
|
devtools: {
|
|
62
62
|
enabled: boolean;
|
|
63
|
-
|
|
63
|
+
appHostId: string;
|
|
64
64
|
};
|
|
65
65
|
lockStatus: SubscriptionRef.SubscriptionRef<LockStatus>;
|
|
66
66
|
syncMutations: Stream.Stream<MutationEvent.AnyEncoded, UnexpectedError>;
|
|
@@ -4,7 +4,7 @@ export type PrepareDevtoolsBridge = {
|
|
|
4
4
|
/** Messages coming from the app host (usually responses to requests) */
|
|
5
5
|
responsePubSub: PubSub.PubSub<Devtools.MessageFromAppHostCoordinator | Devtools.MessageFromAppHostStore>;
|
|
6
6
|
sendToAppHost: (msg: Devtools.MessageToAppHostCoordinator | Devtools.MessageToAppHostStore) => Effect.Effect<void>;
|
|
7
|
-
|
|
7
|
+
appHostId: string;
|
|
8
8
|
copyToClipboard: (text: string) => Effect.Effect<void>;
|
|
9
9
|
sendEscapeKey?: Effect.Effect<void>;
|
|
10
10
|
isLeaderTab: boolean;
|
|
@@ -4,7 +4,7 @@ declare const SnapshotReq_base: Schema.Struct<{
|
|
|
4
4
|
} & {
|
|
5
5
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
6
6
|
} & {
|
|
7
|
-
|
|
7
|
+
appHostId: typeof Schema.String;
|
|
8
8
|
} & {
|
|
9
9
|
requestId: typeof Schema.String;
|
|
10
10
|
}>;
|
|
@@ -15,7 +15,7 @@ declare const SnapshotRes_base: Schema.Struct<{
|
|
|
15
15
|
} & {
|
|
16
16
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
17
17
|
} & {
|
|
18
|
-
|
|
18
|
+
appHostId: typeof Schema.String;
|
|
19
19
|
} & {
|
|
20
20
|
requestId: typeof Schema.String;
|
|
21
21
|
} & {
|
|
@@ -28,7 +28,7 @@ declare const LoadDatabaseFileReq_base: Schema.Struct<{
|
|
|
28
28
|
} & {
|
|
29
29
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
30
30
|
} & {
|
|
31
|
-
|
|
31
|
+
appHostId: typeof Schema.String;
|
|
32
32
|
} & {
|
|
33
33
|
requestId: typeof Schema.String;
|
|
34
34
|
} & {
|
|
@@ -41,7 +41,7 @@ declare const LoadDatabaseFileRes_base: Schema.Struct<{
|
|
|
41
41
|
} & {
|
|
42
42
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
43
43
|
} & {
|
|
44
|
-
|
|
44
|
+
appHostId: typeof Schema.String;
|
|
45
45
|
} & {
|
|
46
46
|
requestId: typeof Schema.String;
|
|
47
47
|
} & {
|
|
@@ -54,7 +54,7 @@ declare const DebugInfoReq_base: Schema.Struct<{
|
|
|
54
54
|
} & {
|
|
55
55
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
56
56
|
} & {
|
|
57
|
-
|
|
57
|
+
appHostId: typeof Schema.String;
|
|
58
58
|
} & {
|
|
59
59
|
requestId: typeof Schema.String;
|
|
60
60
|
}>;
|
|
@@ -65,7 +65,7 @@ declare const DebugInfoRes_base: Schema.Struct<{
|
|
|
65
65
|
} & {
|
|
66
66
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
67
67
|
} & {
|
|
68
|
-
|
|
68
|
+
appHostId: typeof Schema.String;
|
|
69
69
|
} & {
|
|
70
70
|
requestId: typeof Schema.String;
|
|
71
71
|
} & {
|
|
@@ -73,38 +73,38 @@ declare const DebugInfoRes_base: Schema.Struct<{
|
|
|
73
73
|
slowQueries: Schema.transform<Schema.Struct<{
|
|
74
74
|
size: typeof Schema.Number;
|
|
75
75
|
items: Schema.Array$<Schema.Schema<{
|
|
76
|
+
readonly queryStr: string;
|
|
76
77
|
readonly bindValues: ((readonly (string | number | Uint8Array | null)[] | {
|
|
77
78
|
readonly [x: string]: string | number | Uint8Array | null;
|
|
78
79
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
|
79
|
-
readonly queryStr: string;
|
|
80
80
|
readonly durationMs: number;
|
|
81
81
|
readonly rowsCount: number | undefined;
|
|
82
82
|
readonly queriedTables: ReadonlySet<string>;
|
|
83
83
|
readonly startTimePerfNow: number;
|
|
84
84
|
}, {
|
|
85
|
+
readonly queryStr: string;
|
|
85
86
|
readonly bindValues: readonly (string | number | readonly number[] | null)[] | {
|
|
86
87
|
readonly [x: string]: string | number | readonly number[] | null;
|
|
87
88
|
} | undefined;
|
|
88
|
-
readonly queryStr: string;
|
|
89
89
|
readonly durationMs: number;
|
|
90
90
|
readonly rowsCount: number | undefined;
|
|
91
91
|
readonly queriedTables: readonly string[];
|
|
92
92
|
readonly startTimePerfNow: number;
|
|
93
93
|
}, never>>;
|
|
94
94
|
}>, Schema.Schema<import("../bounded-collections.js").BoundArray<{
|
|
95
|
+
readonly queryStr: string;
|
|
95
96
|
readonly bindValues: ((readonly (string | number | Uint8Array | null)[] | {
|
|
96
97
|
readonly [x: string]: string | number | Uint8Array | null;
|
|
97
98
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
|
98
|
-
readonly queryStr: string;
|
|
99
99
|
readonly durationMs: number;
|
|
100
100
|
readonly rowsCount: number | undefined;
|
|
101
101
|
readonly queriedTables: ReadonlySet<string>;
|
|
102
102
|
readonly startTimePerfNow: number;
|
|
103
103
|
}>, import("../bounded-collections.js").BoundArray<{
|
|
104
|
+
readonly queryStr: string;
|
|
104
105
|
readonly bindValues: ((readonly (string | number | Uint8Array | null)[] | {
|
|
105
106
|
readonly [x: string]: string | number | Uint8Array | null;
|
|
106
107
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
|
107
|
-
readonly queryStr: string;
|
|
108
108
|
readonly durationMs: number;
|
|
109
109
|
readonly rowsCount: number | undefined;
|
|
110
110
|
readonly queriedTables: ReadonlySet<string>;
|
|
@@ -125,7 +125,7 @@ declare const DebugInfoHistorySubscribe_base: Schema.Struct<{
|
|
|
125
125
|
} & {
|
|
126
126
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
127
127
|
} & {
|
|
128
|
-
|
|
128
|
+
appHostId: typeof Schema.String;
|
|
129
129
|
} & {
|
|
130
130
|
requestId: typeof Schema.String;
|
|
131
131
|
}>;
|
|
@@ -136,7 +136,7 @@ declare const DebugInfoHistoryRes_base: Schema.Struct<{
|
|
|
136
136
|
} & {
|
|
137
137
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
138
138
|
} & {
|
|
139
|
-
|
|
139
|
+
appHostId: typeof Schema.String;
|
|
140
140
|
} & {
|
|
141
141
|
requestId: typeof Schema.String;
|
|
142
142
|
} & {
|
|
@@ -144,38 +144,38 @@ declare const DebugInfoHistoryRes_base: Schema.Struct<{
|
|
|
144
144
|
slowQueries: Schema.transform<Schema.Struct<{
|
|
145
145
|
size: typeof Schema.Number;
|
|
146
146
|
items: Schema.Array$<Schema.Schema<{
|
|
147
|
+
readonly queryStr: string;
|
|
147
148
|
readonly bindValues: ((readonly (string | number | Uint8Array | null)[] | {
|
|
148
149
|
readonly [x: string]: string | number | Uint8Array | null;
|
|
149
150
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
|
150
|
-
readonly queryStr: string;
|
|
151
151
|
readonly durationMs: number;
|
|
152
152
|
readonly rowsCount: number | undefined;
|
|
153
153
|
readonly queriedTables: ReadonlySet<string>;
|
|
154
154
|
readonly startTimePerfNow: number;
|
|
155
155
|
}, {
|
|
156
|
+
readonly queryStr: string;
|
|
156
157
|
readonly bindValues: readonly (string | number | readonly number[] | null)[] | {
|
|
157
158
|
readonly [x: string]: string | number | readonly number[] | null;
|
|
158
159
|
} | undefined;
|
|
159
|
-
readonly queryStr: string;
|
|
160
160
|
readonly durationMs: number;
|
|
161
161
|
readonly rowsCount: number | undefined;
|
|
162
162
|
readonly queriedTables: readonly string[];
|
|
163
163
|
readonly startTimePerfNow: number;
|
|
164
164
|
}, never>>;
|
|
165
165
|
}>, Schema.Schema<import("../bounded-collections.js").BoundArray<{
|
|
166
|
+
readonly queryStr: string;
|
|
166
167
|
readonly bindValues: ((readonly (string | number | Uint8Array | null)[] | {
|
|
167
168
|
readonly [x: string]: string | number | Uint8Array | null;
|
|
168
169
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
|
169
|
-
readonly queryStr: string;
|
|
170
170
|
readonly durationMs: number;
|
|
171
171
|
readonly rowsCount: number | undefined;
|
|
172
172
|
readonly queriedTables: ReadonlySet<string>;
|
|
173
173
|
readonly startTimePerfNow: number;
|
|
174
174
|
}>, import("../bounded-collections.js").BoundArray<{
|
|
175
|
+
readonly queryStr: string;
|
|
175
176
|
readonly bindValues: ((readonly (string | number | Uint8Array | null)[] | {
|
|
176
177
|
readonly [x: string]: string | number | Uint8Array | null;
|
|
177
178
|
}) & import("effect/Brand").Brand<"PreparedBindValues">) | undefined;
|
|
178
|
-
readonly queryStr: string;
|
|
179
179
|
readonly durationMs: number;
|
|
180
180
|
readonly rowsCount: number | undefined;
|
|
181
181
|
readonly queriedTables: ReadonlySet<string>;
|
|
@@ -196,7 +196,7 @@ declare const DebugInfoHistoryUnsubscribe_base: Schema.Struct<{
|
|
|
196
196
|
} & {
|
|
197
197
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
198
198
|
} & {
|
|
199
|
-
|
|
199
|
+
appHostId: typeof Schema.String;
|
|
200
200
|
} & {
|
|
201
201
|
requestId: typeof Schema.String;
|
|
202
202
|
}>;
|
|
@@ -207,7 +207,7 @@ declare const DebugInfoResetReq_base: Schema.Struct<{
|
|
|
207
207
|
} & {
|
|
208
208
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
209
209
|
} & {
|
|
210
|
-
|
|
210
|
+
appHostId: typeof Schema.String;
|
|
211
211
|
} & {
|
|
212
212
|
requestId: typeof Schema.String;
|
|
213
213
|
}>;
|
|
@@ -218,7 +218,7 @@ declare const DebugInfoResetRes_base: Schema.Struct<{
|
|
|
218
218
|
} & {
|
|
219
219
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
220
220
|
} & {
|
|
221
|
-
|
|
221
|
+
appHostId: typeof Schema.String;
|
|
222
222
|
} & {
|
|
223
223
|
requestId: typeof Schema.String;
|
|
224
224
|
}>;
|
|
@@ -229,7 +229,7 @@ declare const DebugInfoRerunQueryReq_base: Schema.Struct<{
|
|
|
229
229
|
} & {
|
|
230
230
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
231
231
|
} & {
|
|
232
|
-
|
|
232
|
+
appHostId: typeof Schema.String;
|
|
233
233
|
} & {
|
|
234
234
|
requestId: typeof Schema.String;
|
|
235
235
|
} & {
|
|
@@ -244,7 +244,7 @@ declare const DebugInfoRerunQueryRes_base: Schema.Struct<{
|
|
|
244
244
|
} & {
|
|
245
245
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
246
246
|
} & {
|
|
247
|
-
|
|
247
|
+
appHostId: typeof Schema.String;
|
|
248
248
|
} & {
|
|
249
249
|
requestId: typeof Schema.String;
|
|
250
250
|
}>;
|
|
@@ -269,7 +269,7 @@ declare const RunMutationReq_base: Schema.Struct<{
|
|
|
269
269
|
} & {
|
|
270
270
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
271
271
|
} & {
|
|
272
|
-
|
|
272
|
+
appHostId: typeof Schema.String;
|
|
273
273
|
} & {
|
|
274
274
|
requestId: typeof Schema.String;
|
|
275
275
|
} & {
|
|
@@ -287,7 +287,7 @@ declare const RunMutationRes_base: Schema.Struct<{
|
|
|
287
287
|
} & {
|
|
288
288
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
289
289
|
} & {
|
|
290
|
-
|
|
290
|
+
appHostId: typeof Schema.String;
|
|
291
291
|
} & {
|
|
292
292
|
requestId: typeof Schema.String;
|
|
293
293
|
}>;
|
|
@@ -298,7 +298,7 @@ declare const MutationLogReq_base: Schema.Struct<{
|
|
|
298
298
|
} & {
|
|
299
299
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
300
300
|
} & {
|
|
301
|
-
|
|
301
|
+
appHostId: typeof Schema.String;
|
|
302
302
|
} & {
|
|
303
303
|
requestId: typeof Schema.String;
|
|
304
304
|
}>;
|
|
@@ -309,7 +309,7 @@ declare const MutationLogRes_base: Schema.Struct<{
|
|
|
309
309
|
} & {
|
|
310
310
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
311
311
|
} & {
|
|
312
|
-
|
|
312
|
+
appHostId: typeof Schema.String;
|
|
313
313
|
} & {
|
|
314
314
|
requestId: typeof Schema.String;
|
|
315
315
|
} & {
|
|
@@ -322,7 +322,7 @@ declare const ReactivityGraphSubscribe_base: Schema.Struct<{
|
|
|
322
322
|
} & {
|
|
323
323
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
324
324
|
} & {
|
|
325
|
-
|
|
325
|
+
appHostId: typeof Schema.String;
|
|
326
326
|
} & {
|
|
327
327
|
requestId: typeof Schema.String;
|
|
328
328
|
} & {
|
|
@@ -335,7 +335,7 @@ declare const ReactivityGraphUnsubscribe_base: Schema.Struct<{
|
|
|
335
335
|
} & {
|
|
336
336
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
337
337
|
} & {
|
|
338
|
-
|
|
338
|
+
appHostId: typeof Schema.String;
|
|
339
339
|
} & {
|
|
340
340
|
requestId: typeof Schema.String;
|
|
341
341
|
}>;
|
|
@@ -346,7 +346,7 @@ declare const ReactivityGraphRes_base: Schema.Struct<{
|
|
|
346
346
|
} & {
|
|
347
347
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
348
348
|
} & {
|
|
349
|
-
|
|
349
|
+
appHostId: typeof Schema.String;
|
|
350
350
|
} & {
|
|
351
351
|
requestId: typeof Schema.String;
|
|
352
352
|
} & {
|
|
@@ -359,7 +359,7 @@ declare const LiveQueriesSubscribe_base: Schema.Struct<{
|
|
|
359
359
|
} & {
|
|
360
360
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
361
361
|
} & {
|
|
362
|
-
|
|
362
|
+
appHostId: typeof Schema.String;
|
|
363
363
|
} & {
|
|
364
364
|
requestId: typeof Schema.String;
|
|
365
365
|
}>;
|
|
@@ -370,7 +370,7 @@ declare const LiveQueriesUnsubscribe_base: Schema.Struct<{
|
|
|
370
370
|
} & {
|
|
371
371
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
372
372
|
} & {
|
|
373
|
-
|
|
373
|
+
appHostId: typeof Schema.String;
|
|
374
374
|
} & {
|
|
375
375
|
requestId: typeof Schema.String;
|
|
376
376
|
}>;
|
|
@@ -397,7 +397,7 @@ declare const LiveQueriesRes_base: Schema.Struct<{
|
|
|
397
397
|
} & {
|
|
398
398
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
399
399
|
} & {
|
|
400
|
-
|
|
400
|
+
appHostId: typeof Schema.String;
|
|
401
401
|
} & {
|
|
402
402
|
requestId: typeof Schema.String;
|
|
403
403
|
} & {
|
|
@@ -410,7 +410,7 @@ declare const ResetAllDataReq_base: Schema.Struct<{
|
|
|
410
410
|
} & {
|
|
411
411
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
412
412
|
} & {
|
|
413
|
-
|
|
413
|
+
appHostId: typeof Schema.String;
|
|
414
414
|
} & {
|
|
415
415
|
requestId: typeof Schema.String;
|
|
416
416
|
} & {
|
|
@@ -423,7 +423,7 @@ declare const ResetAllDataRes_base: Schema.Struct<{
|
|
|
423
423
|
} & {
|
|
424
424
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
425
425
|
} & {
|
|
426
|
-
|
|
426
|
+
appHostId: typeof Schema.String;
|
|
427
427
|
} & {
|
|
428
428
|
requestId: typeof Schema.String;
|
|
429
429
|
}>;
|
|
@@ -434,7 +434,7 @@ declare const DatabaseFileInfoReq_base: Schema.Struct<{
|
|
|
434
434
|
} & {
|
|
435
435
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
436
436
|
} & {
|
|
437
|
-
|
|
437
|
+
appHostId: typeof Schema.String;
|
|
438
438
|
} & {
|
|
439
439
|
requestId: typeof Schema.String;
|
|
440
440
|
}>;
|
|
@@ -445,7 +445,7 @@ declare const DatabaseFileInfoRes_base: Schema.Struct<{
|
|
|
445
445
|
} & {
|
|
446
446
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
447
447
|
} & {
|
|
448
|
-
|
|
448
|
+
appHostId: typeof Schema.String;
|
|
449
449
|
} & {
|
|
450
450
|
requestId: typeof Schema.String;
|
|
451
451
|
} & {
|
|
@@ -459,7 +459,7 @@ declare const MessagePortForStoreReq_base: Schema.Struct<{
|
|
|
459
459
|
} & {
|
|
460
460
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
461
461
|
} & {
|
|
462
|
-
|
|
462
|
+
appHostId: typeof Schema.String;
|
|
463
463
|
} & {
|
|
464
464
|
requestId: typeof Schema.String;
|
|
465
465
|
}>;
|
|
@@ -470,7 +470,7 @@ declare const MessagePortForStoreRes_base: Schema.Struct<{
|
|
|
470
470
|
} & {
|
|
471
471
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
472
472
|
} & {
|
|
473
|
-
|
|
473
|
+
appHostId: typeof Schema.String;
|
|
474
474
|
} & {
|
|
475
475
|
requestId: typeof Schema.String;
|
|
476
476
|
} & {
|
|
@@ -483,7 +483,7 @@ declare const NetworkStatusSubscribe_base: Schema.Struct<{
|
|
|
483
483
|
} & {
|
|
484
484
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
485
485
|
} & {
|
|
486
|
-
|
|
486
|
+
appHostId: typeof Schema.String;
|
|
487
487
|
} & {
|
|
488
488
|
requestId: typeof Schema.String;
|
|
489
489
|
}>;
|
|
@@ -494,7 +494,7 @@ declare const NetworkStatusUnsubscribe_base: Schema.Struct<{
|
|
|
494
494
|
} & {
|
|
495
495
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
496
496
|
} & {
|
|
497
|
-
|
|
497
|
+
appHostId: typeof Schema.String;
|
|
498
498
|
} & {
|
|
499
499
|
requestId: typeof Schema.String;
|
|
500
500
|
}>;
|
|
@@ -505,7 +505,7 @@ declare const NetworkStatusRes_base: Schema.Struct<{
|
|
|
505
505
|
} & {
|
|
506
506
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
507
507
|
} & {
|
|
508
|
-
|
|
508
|
+
appHostId: typeof Schema.String;
|
|
509
509
|
} & {
|
|
510
510
|
requestId: typeof Schema.String;
|
|
511
511
|
} & {
|
|
@@ -521,7 +521,7 @@ declare const SyncingInfoReq_base: Schema.Struct<{
|
|
|
521
521
|
} & {
|
|
522
522
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
523
523
|
} & {
|
|
524
|
-
|
|
524
|
+
appHostId: typeof Schema.String;
|
|
525
525
|
} & {
|
|
526
526
|
requestId: typeof Schema.String;
|
|
527
527
|
}>;
|
|
@@ -538,7 +538,7 @@ declare const SyncingInfoRes_base: Schema.Struct<{
|
|
|
538
538
|
} & {
|
|
539
539
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
540
540
|
} & {
|
|
541
|
-
|
|
541
|
+
appHostId: typeof Schema.String;
|
|
542
542
|
} & {
|
|
543
543
|
requestId: typeof Schema.String;
|
|
544
544
|
} & {
|
|
@@ -558,7 +558,7 @@ declare const DevtoolsConnected_base: Schema.Struct<{
|
|
|
558
558
|
} & {
|
|
559
559
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
560
560
|
} & {
|
|
561
|
-
|
|
561
|
+
appHostId: typeof Schema.String;
|
|
562
562
|
}>;
|
|
563
563
|
export declare class DevtoolsConnected extends DevtoolsConnected_base {
|
|
564
564
|
}
|
|
@@ -567,7 +567,7 @@ declare const AppHostReady_base: Schema.Struct<{
|
|
|
567
567
|
} & {
|
|
568
568
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
569
569
|
} & {
|
|
570
|
-
|
|
570
|
+
appHostId: typeof Schema.String;
|
|
571
571
|
} & {
|
|
572
572
|
isLeaderTab: typeof Schema.Boolean;
|
|
573
573
|
}>;
|
|
@@ -578,7 +578,7 @@ declare const Disconnect_base: Schema.Struct<{
|
|
|
578
578
|
} & {
|
|
579
579
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
580
580
|
} & {
|
|
581
|
-
|
|
581
|
+
appHostId: typeof Schema.String;
|
|
582
582
|
}>;
|
|
583
583
|
export declare class Disconnect extends Disconnect_base {
|
|
584
584
|
}
|
|
@@ -587,7 +587,7 @@ declare const Ping_base: Schema.Struct<{
|
|
|
587
587
|
} & {
|
|
588
588
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
589
589
|
} & {
|
|
590
|
-
|
|
590
|
+
appHostId: typeof Schema.String;
|
|
591
591
|
} & {
|
|
592
592
|
requestId: typeof Schema.String;
|
|
593
593
|
}>;
|
|
@@ -598,7 +598,7 @@ declare const Pong_base: Schema.Struct<{
|
|
|
598
598
|
} & {
|
|
599
599
|
liveStoreVersion: Schema.Literal<[string]>;
|
|
600
600
|
} & {
|
|
601
|
-
|
|
601
|
+
appHostId: typeof Schema.String;
|
|
602
602
|
} & {
|
|
603
603
|
requestId: typeof Schema.String;
|
|
604
604
|
}>;
|
|
@@ -5,14 +5,14 @@ import { mutationEventSchemaEncodedAny } from '../schema/mutations.js';
|
|
|
5
5
|
import { PreparedBindValues } from '../util.js';
|
|
6
6
|
import { liveStoreVersion as pkgVersion } from '../version.js';
|
|
7
7
|
const requestId = Schema.String;
|
|
8
|
-
const
|
|
8
|
+
const appHostId = Schema.String;
|
|
9
9
|
const liveStoreVersion = Schema.Literal(pkgVersion);
|
|
10
10
|
const LSDMessage = (tag, fields) => Schema.TaggedStruct(tag, {
|
|
11
11
|
liveStoreVersion,
|
|
12
12
|
...fields,
|
|
13
13
|
}).annotations({ identifier: tag });
|
|
14
14
|
const LSDChannelMessage = (tag, fields) => LSDMessage(tag, {
|
|
15
|
-
|
|
15
|
+
appHostId,
|
|
16
16
|
...fields,
|
|
17
17
|
});
|
|
18
18
|
const LSDReqResMessage = (tag, fields) => LSDChannelMessage(tag, {
|
|
@@ -2,7 +2,7 @@ import { Schema } from '@livestore/utils/effect';
|
|
|
2
2
|
export declare namespace DevtoolsWindowMessage {
|
|
3
3
|
const MessagePortReady_base: Schema.TaggedStruct<"LSD.WindowMessage.MessagePortReady", {
|
|
4
4
|
port: Schema.Schema<MessagePort, MessagePort, never>;
|
|
5
|
-
|
|
5
|
+
appHostId: typeof Schema.String;
|
|
6
6
|
}>;
|
|
7
7
|
/** Message is being created in contentscript-iframe, sent to contentscript and then sent to Store */
|
|
8
8
|
export class MessagePortReady extends MessagePortReady_base {
|
|
@@ -14,7 +14,7 @@ export declare namespace DevtoolsWindowMessage {
|
|
|
14
14
|
export class LoadIframe extends LoadIframe_base {
|
|
15
15
|
}
|
|
16
16
|
const StoreReady_base: Schema.TaggedStruct<"LSD.WindowMessage.StoreReady", {
|
|
17
|
-
|
|
17
|
+
appHostId: typeof Schema.String;
|
|
18
18
|
}>;
|
|
19
19
|
export class StoreReady extends StoreReady_base {
|
|
20
20
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Schema, Transferable } from '@livestore/utils/effect';
|
|
2
|
-
const
|
|
2
|
+
const appHostId = Schema.String;
|
|
3
3
|
export var DevtoolsWindowMessage;
|
|
4
4
|
(function (DevtoolsWindowMessage) {
|
|
5
5
|
/** Message is being created in contentscript-iframe, sent to contentscript and then sent to Store */
|
|
6
6
|
class MessagePortReady extends Schema.TaggedStruct('LSD.WindowMessage.MessagePortReady', {
|
|
7
7
|
port: Transferable.MessagePort,
|
|
8
|
-
|
|
8
|
+
appHostId,
|
|
9
9
|
}) {
|
|
10
10
|
}
|
|
11
11
|
DevtoolsWindowMessage.MessagePortReady = MessagePortReady;
|
|
@@ -13,13 +13,13 @@ export var DevtoolsWindowMessage;
|
|
|
13
13
|
}
|
|
14
14
|
DevtoolsWindowMessage.ContentscriptListening = ContentscriptListening;
|
|
15
15
|
// export class ContentscriptReady extends Schema.TaggedStruct('LSD.WindowMessage.ContentscriptReady', {
|
|
16
|
-
//
|
|
16
|
+
// appHostId,
|
|
17
17
|
// }) {}
|
|
18
18
|
class LoadIframe extends Schema.TaggedStruct('LSD.WindowMessage.LoadIframe', {}) {
|
|
19
19
|
}
|
|
20
20
|
DevtoolsWindowMessage.LoadIframe = LoadIframe;
|
|
21
21
|
class StoreReady extends Schema.TaggedStruct('LSD.WindowMessage.StoreReady', {
|
|
22
|
-
|
|
22
|
+
appHostId,
|
|
23
23
|
}) {
|
|
24
24
|
}
|
|
25
25
|
DevtoolsWindowMessage.StoreReady = StoreReady;
|
package/dist/devtools/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export * from './devtools-window-message.js';
|
|
|
5
5
|
export * from './devtools-bridge.js';
|
|
6
6
|
export declare namespace WebBridge {
|
|
7
7
|
const AppHostReady_base: Schema.TaggedStruct<"LSD.WebBridge.AppHostReady", {
|
|
8
|
-
|
|
8
|
+
appHostId: typeof Schema.String;
|
|
9
9
|
isLeader: typeof Schema.Boolean;
|
|
10
10
|
}>;
|
|
11
11
|
export class AppHostReady extends AppHostReady_base {
|
|
@@ -17,9 +17,9 @@ export declare namespace WebBridge {
|
|
|
17
17
|
}
|
|
18
18
|
const ConnectToDevtools_base: Schema.TaggedStruct<"LSD.WebBridge.ConnectToDevtools", {
|
|
19
19
|
devtoolsId: typeof Schema.String;
|
|
20
|
-
|
|
20
|
+
appHostId: typeof Schema.String;
|
|
21
21
|
/**
|
|
22
|
-
* Given the m:n relationship between devtools and app hosts and the fact that
|
|
22
|
+
* Given the m:n relationship between devtools and app hosts and the fact that appHostIds are usually
|
|
23
23
|
* sticky, we generate a new unique id for the lifetime of the web bridge.
|
|
24
24
|
*/
|
|
25
25
|
webBridgeId: typeof Schema.String;
|
|
@@ -28,7 +28,7 @@ export declare namespace WebBridge {
|
|
|
28
28
|
export class ConnectToDevtools extends ConnectToDevtools_base {
|
|
29
29
|
}
|
|
30
30
|
const AppHostWillDisconnect_base: Schema.TaggedStruct<"LSD.WebBridge.AppHostWillDisconnect", {
|
|
31
|
-
|
|
31
|
+
appHostId: typeof Schema.String;
|
|
32
32
|
}>;
|
|
33
33
|
export class AppHostWillDisconnect extends AppHostWillDisconnect_base {
|
|
34
34
|
}
|
package/dist/devtools/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export * from './devtools-bridge.js';
|
|
|
5
5
|
export var WebBridge;
|
|
6
6
|
(function (WebBridge) {
|
|
7
7
|
class AppHostReady extends Schema.TaggedStruct('LSD.WebBridge.AppHostReady', {
|
|
8
|
-
|
|
8
|
+
appHostId: Schema.String,
|
|
9
9
|
isLeader: Schema.Boolean,
|
|
10
10
|
}) {
|
|
11
11
|
}
|
|
@@ -17,9 +17,9 @@ export var WebBridge;
|
|
|
17
17
|
WebBridge.DevtoolsReady = DevtoolsReady;
|
|
18
18
|
class ConnectToDevtools extends Schema.TaggedStruct('LSD.WebBridge.ConnectToDevtools', {
|
|
19
19
|
devtoolsId: Schema.String,
|
|
20
|
-
|
|
20
|
+
appHostId: Schema.String,
|
|
21
21
|
/**
|
|
22
|
-
* Given the m:n relationship between devtools and app hosts and the fact that
|
|
22
|
+
* Given the m:n relationship between devtools and app hosts and the fact that appHostIds are usually
|
|
23
23
|
* sticky, we generate a new unique id for the lifetime of the web bridge.
|
|
24
24
|
*/
|
|
25
25
|
webBridgeId: Schema.String,
|
|
@@ -28,12 +28,12 @@ export var WebBridge;
|
|
|
28
28
|
}
|
|
29
29
|
WebBridge.ConnectToDevtools = ConnectToDevtools;
|
|
30
30
|
class AppHostWillDisconnect extends Schema.TaggedStruct('LSD.WebBridge.AppHostWillDisconnect', {
|
|
31
|
-
|
|
31
|
+
appHostId: Schema.String,
|
|
32
32
|
}) {
|
|
33
33
|
}
|
|
34
34
|
WebBridge.AppHostWillDisconnect = AppHostWillDisconnect;
|
|
35
35
|
// export class DevtoolsWillDisconnect extends Schema.TaggedStruct('LSD.WebBridge.DevtoolsWillDisconnect', {
|
|
36
|
-
//
|
|
36
|
+
// appHostId: Schema.String,
|
|
37
37
|
// }) {}
|
|
38
38
|
class All extends Schema.Union(AppHostReady, DevtoolsReady, ConnectToDevtools, AppHostWillDisconnect) {
|
|
39
39
|
}
|
|
@@ -54,10 +54,10 @@ export declare const rawSqlMutation: MutationDef<"livestore.RawSql", {
|
|
|
54
54
|
} | undefined;
|
|
55
55
|
readonly writeTables?: readonly string[] | undefined;
|
|
56
56
|
}, {
|
|
57
|
-
readonly sql: string;
|
|
58
57
|
readonly bindValues?: {
|
|
59
58
|
readonly [x: string]: any;
|
|
60
59
|
} | undefined;
|
|
60
|
+
readonly sql: string;
|
|
61
61
|
readonly writeTables?: ReadonlySet<string> | undefined;
|
|
62
62
|
}>;
|
|
63
63
|
export type RawSqlMutation = typeof rawSqlMutation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livestore/common",
|
|
3
|
-
"version": "0.0.56-dev.
|
|
3
|
+
"version": "0.0.56-dev.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@opentelemetry/api": "^1.9.0",
|
|
32
|
-
"@livestore/utils": "0.0.56-dev.
|
|
33
|
-
"effect-db-schema": "0.0.56-dev.
|
|
32
|
+
"@livestore/utils": "0.0.56-dev.2",
|
|
33
|
+
"effect-db-schema": "0.0.56-dev.2"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"vitest": "^2.0.4"
|
package/src/adapter-types.ts
CHANGED
|
@@ -55,7 +55,7 @@ export type BootStatus = typeof BootStatus.Type
|
|
|
55
55
|
export type Coordinator = {
|
|
56
56
|
devtools: {
|
|
57
57
|
enabled: boolean
|
|
58
|
-
|
|
58
|
+
appHostId: string
|
|
59
59
|
}
|
|
60
60
|
// TODO is exposing the lock status really needed (or only relevant for web adapter?)
|
|
61
61
|
lockStatus: SubscriptionRef.SubscriptionRef<LockStatus>
|
|
@@ -6,7 +6,7 @@ export type PrepareDevtoolsBridge = {
|
|
|
6
6
|
/** Messages coming from the app host (usually responses to requests) */
|
|
7
7
|
responsePubSub: PubSub.PubSub<Devtools.MessageFromAppHostCoordinator | Devtools.MessageFromAppHostStore>
|
|
8
8
|
sendToAppHost: (msg: Devtools.MessageToAppHostCoordinator | Devtools.MessageToAppHostStore) => Effect.Effect<void>
|
|
9
|
-
|
|
9
|
+
appHostId: string
|
|
10
10
|
copyToClipboard: (text: string) => Effect.Effect<void>
|
|
11
11
|
sendEscapeKey?: Effect.Effect<void>
|
|
12
12
|
isLeaderTab: boolean
|
|
@@ -7,7 +7,7 @@ import { PreparedBindValues } from '../util.js'
|
|
|
7
7
|
import { liveStoreVersion as pkgVersion } from '../version.js'
|
|
8
8
|
|
|
9
9
|
const requestId = Schema.String
|
|
10
|
-
const
|
|
10
|
+
const appHostId = Schema.String
|
|
11
11
|
const liveStoreVersion = Schema.Literal(pkgVersion)
|
|
12
12
|
|
|
13
13
|
const LSDMessage = <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) =>
|
|
@@ -18,7 +18,7 @@ const LSDMessage = <Tag extends string, Fields extends Schema.Struct.Fields>(tag
|
|
|
18
18
|
|
|
19
19
|
const LSDChannelMessage = <Tag extends string, Fields extends Schema.Struct.Fields>(tag: Tag, fields: Fields) =>
|
|
20
20
|
LSDMessage(tag, {
|
|
21
|
-
|
|
21
|
+
appHostId,
|
|
22
22
|
...fields,
|
|
23
23
|
})
|
|
24
24
|
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { Schema, Transferable } from '@livestore/utils/effect'
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const appHostId = Schema.String
|
|
4
4
|
|
|
5
5
|
export namespace DevtoolsWindowMessage {
|
|
6
6
|
/** Message is being created in contentscript-iframe, sent to contentscript and then sent to Store */
|
|
7
7
|
export class MessagePortReady extends Schema.TaggedStruct('LSD.WindowMessage.MessagePortReady', {
|
|
8
8
|
port: Transferable.MessagePort,
|
|
9
|
-
|
|
9
|
+
appHostId,
|
|
10
10
|
}) {}
|
|
11
11
|
|
|
12
12
|
export class ContentscriptListening extends Schema.TaggedStruct('LSD.WindowMessage.ContentscriptListening', {}) {}
|
|
13
13
|
|
|
14
14
|
// export class ContentscriptReady extends Schema.TaggedStruct('LSD.WindowMessage.ContentscriptReady', {
|
|
15
|
-
//
|
|
15
|
+
// appHostId,
|
|
16
16
|
// }) {}
|
|
17
17
|
|
|
18
18
|
export class LoadIframe extends Schema.TaggedStruct('LSD.WindowMessage.LoadIframe', {}) {}
|
|
19
19
|
|
|
20
20
|
export class StoreReady extends Schema.TaggedStruct('LSD.WindowMessage.StoreReady', {
|
|
21
|
-
|
|
21
|
+
appHostId,
|
|
22
22
|
}) {}
|
|
23
23
|
|
|
24
24
|
export class MessageForStore extends Schema.Union(MessagePortReady, ContentscriptListening) {}
|