@livestore/webmesh 0.4.0-dev.9 → 0.5.0-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 (59) hide show
  1. package/README.md +5 -3
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/channel/direct-channel-internal.d.ts +2 -3
  4. package/dist/channel/direct-channel-internal.d.ts.map +1 -1
  5. package/dist/channel/direct-channel-internal.js +35 -38
  6. package/dist/channel/direct-channel-internal.js.map +1 -1
  7. package/dist/channel/direct-channel.d.ts.map +1 -1
  8. package/dist/channel/direct-channel.js +22 -23
  9. package/dist/channel/direct-channel.js.map +1 -1
  10. package/dist/channel/proxy-channel.d.ts +29 -5
  11. package/dist/channel/proxy-channel.d.ts.map +1 -1
  12. package/dist/channel/proxy-channel.js +87 -37
  13. package/dist/channel/proxy-channel.js.map +1 -1
  14. package/dist/common.d.ts +33 -35
  15. package/dist/common.d.ts.map +1 -1
  16. package/dist/common.js +7 -7
  17. package/dist/common.js.map +1 -1
  18. package/dist/mesh-schema.d.ts +262 -136
  19. package/dist/mesh-schema.d.ts.map +1 -1
  20. package/dist/mesh-schema.js +45 -44
  21. package/dist/mesh-schema.js.map +1 -1
  22. package/dist/node.d.ts +12 -6
  23. package/dist/node.d.ts.map +1 -1
  24. package/dist/node.js +47 -44
  25. package/dist/node.js.map +1 -1
  26. package/dist/node.test.js +253 -63
  27. package/dist/node.test.js.map +1 -1
  28. package/dist/utils.d.ts +1 -1
  29. package/dist/utils.d.ts.map +1 -1
  30. package/dist/utils.js.map +1 -1
  31. package/dist/websocket-edge.d.ts +20 -18
  32. package/dist/websocket-edge.d.ts.map +1 -1
  33. package/dist/websocket-edge.js +33 -41
  34. package/dist/websocket-edge.js.map +1 -1
  35. package/dist/websocket-edge.test.d.ts +7 -0
  36. package/dist/websocket-edge.test.d.ts.map +1 -0
  37. package/dist/websocket-edge.test.js +74 -0
  38. package/dist/websocket-edge.test.js.map +1 -0
  39. package/dist/worker/mod.d.ts +24 -0
  40. package/dist/worker/mod.d.ts.map +1 -0
  41. package/dist/worker/mod.js +44 -0
  42. package/dist/worker/mod.js.map +1 -0
  43. package/dist/worker/schema.d.ts +10 -0
  44. package/dist/worker/schema.d.ts.map +1 -0
  45. package/dist/worker/schema.js +7 -0
  46. package/dist/worker/schema.js.map +1 -0
  47. package/package.json +48 -12
  48. package/src/channel/direct-channel-internal.ts +41 -47
  49. package/src/channel/direct-channel.ts +28 -25
  50. package/src/channel/proxy-channel.ts +120 -57
  51. package/src/common.ts +9 -7
  52. package/src/mesh-schema.ts +34 -33
  53. package/src/node.test.ts +356 -80
  54. package/src/node.ts +63 -55
  55. package/src/utils.ts +3 -3
  56. package/src/websocket-edge.test.ts +98 -0
  57. package/src/websocket-edge.ts +52 -48
  58. package/src/worker/mod.ts +89 -0
  59. package/src/worker/schema.ts +8 -0
@@ -1,20 +1,4 @@
1
- import { Schema } from '@livestore/utils/effect';
2
- declare const DirectChannelRequest_base: Schema.TaggedStruct<"DirectChannelRequest", {
3
- remainingHops: Schema.optional<Schema.Array$<typeof Schema.String>>;
4
- channelVersion: typeof Schema.Number;
5
- /** Only set if the request is in response to an incoming request */
6
- reqId: Schema.UndefinedOr<typeof Schema.String>;
7
- /**
8
- * Additionally to the `source` field, we use this field to track whether the instance of a
9
- * source has changed.
10
- */
11
- sourceId: typeof Schema.String;
12
- id: Schema.PropertySignature<":", string, never, "?:", string | undefined, true, never>;
13
- target: typeof Schema.String;
14
- source: typeof Schema.String;
15
- channelName: typeof Schema.String;
16
- hops: Schema.Array$<typeof Schema.String>;
17
- }>;
1
+ import { Schema, Transferable } from '@livestore/utils/effect';
18
2
  /**
19
3
  * Needs to go through already existing DirectChannel edges, times out otherwise
20
4
  *
@@ -22,149 +6,291 @@ declare const DirectChannelRequest_base: Schema.TaggedStruct<"DirectChannelReque
22
6
  * We need a clear path back to the sender to avoid this, thus we respond with a separate
23
7
  * `DirectChannelResponseSuccess` which contains the `port`.
24
8
  */
25
- export declare class DirectChannelRequest extends DirectChannelRequest_base {
26
- }
27
- declare const DirectChannelResponseSuccess_base: Schema.TaggedStruct<"DirectChannelResponseSuccess", {
28
- reqId: typeof Schema.String;
29
- port: Schema.Schema<MessagePort, MessagePort, never>;
30
- remainingHops: Schema.Array$<typeof Schema.String>;
31
- channelVersion: typeof Schema.Number;
32
- id: Schema.PropertySignature<":", string, never, "?:", string | undefined, true, never>;
33
- target: typeof Schema.String;
34
- source: typeof Schema.String;
35
- channelName: typeof Schema.String;
36
- hops: Schema.Array$<typeof Schema.String>;
9
+ export declare const DirectChannelRequest: Schema.TaggedStruct<"DirectChannelRequest", {
10
+ readonly remainingHops: Schema.optional<Schema.$Array<Schema.String>>;
11
+ readonly channelVersion: Schema.Finite;
12
+ /** Only set if the request is in response to an incoming request */
13
+ readonly reqId: Schema.UndefinedOr<Schema.String>;
14
+ /**
15
+ * Additionally to the `source` field, we use this field to track whether the instance of a
16
+ * source has changed.
17
+ */
18
+ readonly sourceId: Schema.String;
19
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
20
+ readonly target: Schema.String;
21
+ readonly source: Schema.String;
22
+ readonly channelName: Schema.String;
23
+ readonly hops: Schema.$Array<Schema.String>;
37
24
  }>;
38
- export declare class DirectChannelResponseSuccess extends DirectChannelResponseSuccess_base {
39
- }
40
- declare const DirectChannelResponseNoTransferables_base: Schema.TaggedStruct<"DirectChannelResponseNoTransferables", {
41
- reqId: typeof Schema.String;
42
- remainingHops: Schema.Array$<typeof Schema.String>;
43
- id: Schema.PropertySignature<":", string, never, "?:", string | undefined, true, never>;
44
- target: typeof Schema.String;
45
- source: typeof Schema.String;
46
- channelName: typeof Schema.String;
47
- hops: Schema.Array$<typeof Schema.String>;
25
+ export declare const DirectChannelResponseSuccess: Schema.TaggedStruct<"DirectChannelResponseSuccess", {
26
+ readonly reqId: Schema.String;
27
+ readonly port: Transferable.Transferable<Schema.declare<MessagePort, MessagePort>>;
28
+ readonly remainingHops: Schema.$Array<Schema.String>;
29
+ readonly channelVersion: Schema.Finite;
30
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
31
+ readonly target: Schema.String;
32
+ readonly source: Schema.String;
33
+ readonly channelName: Schema.String;
34
+ readonly hops: Schema.$Array<Schema.String>;
48
35
  }>;
49
- export declare class DirectChannelResponseNoTransferables extends DirectChannelResponseNoTransferables_base {
50
- }
51
- declare const ProxyChannelRequest_base: Schema.TaggedStruct<"ProxyChannelRequest", {
52
- remainingHops: Schema.optional<typeof Schema.Undefined>;
53
- channelIdCandidate: typeof Schema.String;
54
- id: Schema.PropertySignature<":", string, never, "?:", string | undefined, true, never>;
55
- target: typeof Schema.String;
56
- source: typeof Schema.String;
57
- channelName: typeof Schema.String;
58
- hops: Schema.Array$<typeof Schema.String>;
36
+ export declare const DirectChannelResponseNoTransferables: Schema.TaggedStruct<"DirectChannelResponseNoTransferables", {
37
+ readonly reqId: Schema.String;
38
+ readonly remainingHops: Schema.$Array<Schema.String>;
39
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
40
+ readonly target: Schema.String;
41
+ readonly source: Schema.String;
42
+ readonly channelName: Schema.String;
43
+ readonly hops: Schema.$Array<Schema.String>;
59
44
  }>;
60
- export declare class ProxyChannelRequest extends ProxyChannelRequest_base {
61
- }
62
- declare const ProxyChannelResponseSuccess_base: Schema.TaggedStruct<"ProxyChannelResponseSuccess", {
63
- reqId: typeof Schema.String;
64
- remainingHops: Schema.Array$<typeof Schema.String>;
65
- combinedChannelId: typeof Schema.String;
66
- channelIdCandidate: typeof Schema.String;
67
- id: Schema.PropertySignature<":", string, never, "?:", string | undefined, true, never>;
68
- target: typeof Schema.String;
69
- source: typeof Schema.String;
70
- channelName: typeof Schema.String;
71
- hops: Schema.Array$<typeof Schema.String>;
45
+ export declare const ProxyChannelRequest: Schema.TaggedStruct<"ProxyChannelRequest", {
46
+ readonly remainingHops: Schema.optional<Schema.Undefined>;
47
+ readonly channelIdCandidate: Schema.String;
48
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
49
+ readonly target: Schema.String;
50
+ readonly source: Schema.String;
51
+ readonly channelName: Schema.String;
52
+ readonly hops: Schema.$Array<Schema.String>;
72
53
  }>;
73
- export declare class ProxyChannelResponseSuccess extends ProxyChannelResponseSuccess_base {
74
- }
75
- declare const ProxyChannelPayload_base: Schema.TaggedStruct<"ProxyChannelPayload", {
76
- remainingHops: Schema.optional<typeof Schema.Undefined>;
77
- payload: typeof Schema.Any;
78
- combinedChannelId: typeof Schema.String;
79
- id: Schema.PropertySignature<":", string, never, "?:", string | undefined, true, never>;
80
- target: typeof Schema.String;
81
- source: typeof Schema.String;
82
- channelName: typeof Schema.String;
83
- hops: Schema.Array$<typeof Schema.String>;
54
+ export declare const ProxyChannelResponseSuccess: Schema.TaggedStruct<"ProxyChannelResponseSuccess", {
55
+ readonly reqId: Schema.String;
56
+ readonly remainingHops: Schema.$Array<Schema.String>;
57
+ readonly combinedChannelId: Schema.String;
58
+ readonly channelIdCandidate: Schema.String;
59
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
60
+ readonly target: Schema.String;
61
+ readonly source: Schema.String;
62
+ readonly channelName: Schema.String;
63
+ readonly hops: Schema.$Array<Schema.String>;
84
64
  }>;
85
- export declare class ProxyChannelPayload extends ProxyChannelPayload_base {
86
- }
87
- declare const ProxyChannelPayloadAck_base: Schema.TaggedStruct<"ProxyChannelPayloadAck", {
88
- reqId: typeof Schema.String;
89
- remainingHops: Schema.Array$<typeof Schema.String>;
90
- combinedChannelId: typeof Schema.String;
91
- id: Schema.PropertySignature<":", string, never, "?:", string | undefined, true, never>;
92
- target: typeof Schema.String;
93
- source: typeof Schema.String;
94
- channelName: typeof Schema.String;
95
- hops: Schema.Array$<typeof Schema.String>;
65
+ export declare const ProxyChannelPayload: Schema.TaggedStruct<"ProxyChannelPayload", {
66
+ readonly remainingHops: Schema.optional<Schema.Undefined>;
67
+ readonly payload: Schema.Any;
68
+ readonly combinedChannelId: Schema.String;
69
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
70
+ readonly target: Schema.String;
71
+ readonly source: Schema.String;
72
+ readonly channelName: Schema.String;
73
+ readonly hops: Schema.$Array<Schema.String>;
96
74
  }>;
97
- export declare class ProxyChannelPayloadAck extends ProxyChannelPayloadAck_base {
98
- }
99
- declare const NetworkEdgeAdded_base: Schema.TaggedStruct<"NetworkEdgeAdded", {
100
- id: Schema.PropertySignature<":", string, never, "?:", string | undefined, true, never>;
101
- source: typeof Schema.String;
102
- target: typeof Schema.String;
75
+ export declare const ProxyChannelPayloadAck: Schema.TaggedStruct<"ProxyChannelPayloadAck", {
76
+ readonly reqId: Schema.String;
77
+ readonly remainingHops: Schema.$Array<Schema.String>;
78
+ readonly combinedChannelId: Schema.String;
79
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
80
+ readonly target: Schema.String;
81
+ readonly source: Schema.String;
82
+ readonly channelName: Schema.String;
83
+ readonly hops: Schema.$Array<Schema.String>;
103
84
  }>;
104
85
  /**
105
86
  * Broadcast to all nodes when a new edge is added.
106
87
  * Mostly used for auto-reconnect purposes.
107
88
  */
108
- export declare class NetworkEdgeAdded extends NetworkEdgeAdded_base {
109
- }
110
- declare const NetworkTopologyRequest_base: Schema.TaggedStruct<"NetworkTopologyRequest", {
111
- id: Schema.PropertySignature<":", string, never, "?:", string | undefined, true, never>;
112
- hops: Schema.Array$<typeof Schema.String>;
89
+ export declare const NetworkEdgeAdded: Schema.TaggedStruct<"NetworkEdgeAdded", {
90
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
91
+ readonly source: Schema.String;
92
+ readonly target: Schema.String;
93
+ }>;
94
+ export declare const NetworkTopologyRequest: Schema.TaggedStruct<"NetworkTopologyRequest", {
95
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
96
+ readonly hops: Schema.$Array<Schema.String>;
113
97
  /** Always fixed to who requested the topology */
114
- source: typeof Schema.String;
115
- target: Schema.Literal<["-"]>;
98
+ readonly source: Schema.String;
99
+ readonly target: Schema.Literal<"-">;
116
100
  }>;
117
- export declare class NetworkTopologyRequest extends NetworkTopologyRequest_base {
118
- }
119
- declare const NetworkTopologyResponse_base: Schema.TaggedStruct<"NetworkTopologyResponse", {
120
- id: Schema.PropertySignature<":", string, never, "?:", string | undefined, true, never>;
121
- reqId: typeof Schema.String;
122
- remainingHops: Schema.Array$<typeof Schema.String>;
123
- nodeName: typeof Schema.String;
124
- edges: Schema.Array$<typeof Schema.String>;
101
+ export declare const NetworkTopologyResponse: Schema.TaggedStruct<"NetworkTopologyResponse", {
102
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
103
+ readonly reqId: Schema.String;
104
+ readonly remainingHops: Schema.$Array<Schema.String>;
105
+ readonly nodeName: Schema.String;
106
+ readonly edges: Schema.$Array<Schema.String>;
125
107
  /** Always fixed to who requested the topology */
126
- source: typeof Schema.String;
127
- target: Schema.Literal<["-"]>;
108
+ readonly source: Schema.String;
109
+ readonly target: Schema.Literal<"-">;
128
110
  }>;
129
- export declare class NetworkTopologyResponse extends NetworkTopologyResponse_base {
130
- }
131
111
  export declare const BroadcastChannelPacket: Schema.TaggedStruct<"BroadcastChannelPacket", {
132
- id: Schema.PropertySignature<":", string, never, "?:", string | undefined, true, never>;
133
- channelName: typeof Schema.String;
112
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
113
+ readonly channelName: Schema.String;
134
114
  /**
135
115
  * The payload is expected to be encoded/decoded by the send/listen schema.
136
116
  * Transferables are not supported.
137
117
  */
138
- payload: typeof Schema.Any;
139
- hops: Schema.Array$<typeof Schema.String>;
140
- source: typeof Schema.String;
141
- target: Schema.Literal<["-"]>;
118
+ readonly payload: Schema.Any;
119
+ readonly hops: Schema.$Array<Schema.String>;
120
+ readonly source: Schema.String;
121
+ readonly target: Schema.Literal<"-">;
142
122
  }>;
143
- declare const DirectChannelPacket_base: Schema.Union<[typeof DirectChannelRequest, typeof DirectChannelResponseSuccess, typeof DirectChannelResponseNoTransferables]>;
144
- export declare class DirectChannelPacket extends DirectChannelPacket_base {
145
- }
146
- declare const ProxyChannelPacket_base: Schema.Union<[typeof ProxyChannelRequest, typeof ProxyChannelResponseSuccess, typeof ProxyChannelPayload, typeof ProxyChannelPayloadAck]>;
147
- export declare class ProxyChannelPacket extends ProxyChannelPacket_base {
148
- }
149
- declare const Packet_base: Schema.Union<[typeof DirectChannelPacket, typeof ProxyChannelPacket, typeof NetworkEdgeAdded, typeof NetworkTopologyRequest, typeof NetworkTopologyResponse, Schema.TaggedStruct<"BroadcastChannelPacket", {
150
- id: Schema.PropertySignature<":", string, never, "?:", string | undefined, true, never>;
151
- channelName: typeof Schema.String;
123
+ export declare const DirectChannelPacket: Schema.Union<readonly [Schema.TaggedStruct<"DirectChannelRequest", {
124
+ readonly remainingHops: Schema.optional<Schema.$Array<Schema.String>>;
125
+ readonly channelVersion: Schema.Finite;
126
+ /** Only set if the request is in response to an incoming request */
127
+ readonly reqId: Schema.UndefinedOr<Schema.String>;
128
+ /**
129
+ * Additionally to the `source` field, we use this field to track whether the instance of a
130
+ * source has changed.
131
+ */
132
+ readonly sourceId: Schema.String;
133
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
134
+ readonly target: Schema.String;
135
+ readonly source: Schema.String;
136
+ readonly channelName: Schema.String;
137
+ readonly hops: Schema.$Array<Schema.String>;
138
+ }>, Schema.TaggedStruct<"DirectChannelResponseSuccess", {
139
+ readonly reqId: Schema.String;
140
+ readonly port: Transferable.Transferable<Schema.declare<MessagePort, MessagePort>>;
141
+ readonly remainingHops: Schema.$Array<Schema.String>;
142
+ readonly channelVersion: Schema.Finite;
143
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
144
+ readonly target: Schema.String;
145
+ readonly source: Schema.String;
146
+ readonly channelName: Schema.String;
147
+ readonly hops: Schema.$Array<Schema.String>;
148
+ }>, Schema.TaggedStruct<"DirectChannelResponseNoTransferables", {
149
+ readonly reqId: Schema.String;
150
+ readonly remainingHops: Schema.$Array<Schema.String>;
151
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
152
+ readonly target: Schema.String;
153
+ readonly source: Schema.String;
154
+ readonly channelName: Schema.String;
155
+ readonly hops: Schema.$Array<Schema.String>;
156
+ }>]>;
157
+ export declare const ProxyChannelPacket: Schema.Union<readonly [Schema.TaggedStruct<"ProxyChannelRequest", {
158
+ readonly remainingHops: Schema.optional<Schema.Undefined>;
159
+ readonly channelIdCandidate: Schema.String;
160
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
161
+ readonly target: Schema.String;
162
+ readonly source: Schema.String;
163
+ readonly channelName: Schema.String;
164
+ readonly hops: Schema.$Array<Schema.String>;
165
+ }>, Schema.TaggedStruct<"ProxyChannelResponseSuccess", {
166
+ readonly reqId: Schema.String;
167
+ readonly remainingHops: Schema.$Array<Schema.String>;
168
+ readonly combinedChannelId: Schema.String;
169
+ readonly channelIdCandidate: Schema.String;
170
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
171
+ readonly target: Schema.String;
172
+ readonly source: Schema.String;
173
+ readonly channelName: Schema.String;
174
+ readonly hops: Schema.$Array<Schema.String>;
175
+ }>, Schema.TaggedStruct<"ProxyChannelPayload", {
176
+ readonly remainingHops: Schema.optional<Schema.Undefined>;
177
+ readonly payload: Schema.Any;
178
+ readonly combinedChannelId: Schema.String;
179
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
180
+ readonly target: Schema.String;
181
+ readonly source: Schema.String;
182
+ readonly channelName: Schema.String;
183
+ readonly hops: Schema.$Array<Schema.String>;
184
+ }>, Schema.TaggedStruct<"ProxyChannelPayloadAck", {
185
+ readonly reqId: Schema.String;
186
+ readonly remainingHops: Schema.$Array<Schema.String>;
187
+ readonly combinedChannelId: Schema.String;
188
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
189
+ readonly target: Schema.String;
190
+ readonly source: Schema.String;
191
+ readonly channelName: Schema.String;
192
+ readonly hops: Schema.$Array<Schema.String>;
193
+ }>]>;
194
+ export declare const Packet: Schema.Union<readonly [Schema.Union<readonly [Schema.TaggedStruct<"DirectChannelRequest", {
195
+ readonly remainingHops: Schema.optional<Schema.$Array<Schema.String>>;
196
+ readonly channelVersion: Schema.Finite;
197
+ /** Only set if the request is in response to an incoming request */
198
+ readonly reqId: Schema.UndefinedOr<Schema.String>;
199
+ /**
200
+ * Additionally to the `source` field, we use this field to track whether the instance of a
201
+ * source has changed.
202
+ */
203
+ readonly sourceId: Schema.String;
204
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
205
+ readonly target: Schema.String;
206
+ readonly source: Schema.String;
207
+ readonly channelName: Schema.String;
208
+ readonly hops: Schema.$Array<Schema.String>;
209
+ }>, Schema.TaggedStruct<"DirectChannelResponseSuccess", {
210
+ readonly reqId: Schema.String;
211
+ readonly port: Transferable.Transferable<Schema.declare<MessagePort, MessagePort>>;
212
+ readonly remainingHops: Schema.$Array<Schema.String>;
213
+ readonly channelVersion: Schema.Finite;
214
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
215
+ readonly target: Schema.String;
216
+ readonly source: Schema.String;
217
+ readonly channelName: Schema.String;
218
+ readonly hops: Schema.$Array<Schema.String>;
219
+ }>, Schema.TaggedStruct<"DirectChannelResponseNoTransferables", {
220
+ readonly reqId: Schema.String;
221
+ readonly remainingHops: Schema.$Array<Schema.String>;
222
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
223
+ readonly target: Schema.String;
224
+ readonly source: Schema.String;
225
+ readonly channelName: Schema.String;
226
+ readonly hops: Schema.$Array<Schema.String>;
227
+ }>]>, Schema.Union<readonly [Schema.TaggedStruct<"ProxyChannelRequest", {
228
+ readonly remainingHops: Schema.optional<Schema.Undefined>;
229
+ readonly channelIdCandidate: Schema.String;
230
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
231
+ readonly target: Schema.String;
232
+ readonly source: Schema.String;
233
+ readonly channelName: Schema.String;
234
+ readonly hops: Schema.$Array<Schema.String>;
235
+ }>, Schema.TaggedStruct<"ProxyChannelResponseSuccess", {
236
+ readonly reqId: Schema.String;
237
+ readonly remainingHops: Schema.$Array<Schema.String>;
238
+ readonly combinedChannelId: Schema.String;
239
+ readonly channelIdCandidate: Schema.String;
240
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
241
+ readonly target: Schema.String;
242
+ readonly source: Schema.String;
243
+ readonly channelName: Schema.String;
244
+ readonly hops: Schema.$Array<Schema.String>;
245
+ }>, Schema.TaggedStruct<"ProxyChannelPayload", {
246
+ readonly remainingHops: Schema.optional<Schema.Undefined>;
247
+ readonly payload: Schema.Any;
248
+ readonly combinedChannelId: Schema.String;
249
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
250
+ readonly target: Schema.String;
251
+ readonly source: Schema.String;
252
+ readonly channelName: Schema.String;
253
+ readonly hops: Schema.$Array<Schema.String>;
254
+ }>, Schema.TaggedStruct<"ProxyChannelPayloadAck", {
255
+ readonly reqId: Schema.String;
256
+ readonly remainingHops: Schema.$Array<Schema.String>;
257
+ readonly combinedChannelId: Schema.String;
258
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
259
+ readonly target: Schema.String;
260
+ readonly source: Schema.String;
261
+ readonly channelName: Schema.String;
262
+ readonly hops: Schema.$Array<Schema.String>;
263
+ }>]>, Schema.TaggedStruct<"NetworkEdgeAdded", {
264
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
265
+ readonly source: Schema.String;
266
+ readonly target: Schema.String;
267
+ }>, Schema.TaggedStruct<"NetworkTopologyRequest", {
268
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
269
+ readonly hops: Schema.$Array<Schema.String>;
270
+ /** Always fixed to who requested the topology */
271
+ readonly source: Schema.String;
272
+ readonly target: Schema.Literal<"-">;
273
+ }>, Schema.TaggedStruct<"NetworkTopologyResponse", {
274
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
275
+ readonly reqId: Schema.String;
276
+ readonly remainingHops: Schema.$Array<Schema.String>;
277
+ readonly nodeName: Schema.String;
278
+ readonly edges: Schema.$Array<Schema.String>;
279
+ /** Always fixed to who requested the topology */
280
+ readonly source: Schema.String;
281
+ readonly target: Schema.Literal<"-">;
282
+ }>, Schema.TaggedStruct<"BroadcastChannelPacket", {
283
+ readonly id: Schema.withConstructorDefault<Schema.withDecodingDefaultType<Schema.String, never>>;
284
+ readonly channelName: Schema.String;
152
285
  /**
153
286
  * The payload is expected to be encoded/decoded by the send/listen schema.
154
287
  * Transferables are not supported.
155
288
  */
156
- payload: typeof Schema.Any;
157
- hops: Schema.Array$<typeof Schema.String>;
158
- source: typeof Schema.String;
159
- target: Schema.Literal<["-"]>;
289
+ readonly payload: Schema.Any;
290
+ readonly hops: Schema.$Array<Schema.String>;
291
+ readonly source: Schema.String;
292
+ readonly target: Schema.Literal<"-">;
160
293
  }>]>;
161
- export declare class Packet extends Packet_base {
162
- }
163
- declare const DirectChannelPing_base: Schema.TaggedStruct<"DirectChannelPing", {}>;
164
- export declare class DirectChannelPing extends DirectChannelPing_base {
165
- }
166
- declare const DirectChannelPong_base: Schema.TaggedStruct<"DirectChannelPong", {}>;
167
- export declare class DirectChannelPong extends DirectChannelPong_base {
168
- }
169
- export {};
294
+ export declare const DirectChannelPing: Schema.TaggedStruct<"DirectChannelPing", {}>;
295
+ export declare const DirectChannelPong: Schema.TaggedStruct<"DirectChannelPong", {}>;
170
296
  //# sourceMappingURL=mesh-schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mesh-schema.d.ts","sourceRoot":"","sources":["../src/mesh-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,yBAAyB,CAAA;;;;IA6B5D,oEAAoE;;IAEpE;;;OAGG;;;;;;;;AAhBL;;;;;;GAMG;AACH,qBAAa,oBAAqB,SAAQ,yBAWxC;CAAG;;;;;;;;;;;;AAEL,qBAAa,4BAA6B,SAAQ,iCAOhD;CAAG;;;;;;;;;;AAEL,qBAAa,oCAAqC,SAAQ,yCAIxD;CAAG;;;;;;;;;;AAEL,qBAAa,mBAAoB,SAAQ,wBAIvC;CAAG;;;;;;;;;;;;AAEL,qBAAa,2BAA4B,SAAQ,gCAM/C;CAAG;;;;;;;;;;;AAEL,qBAAa,mBAAoB,SAAQ,wBAKvC;CAAG;;;;;;;;;;;AAEL,qBAAa,sBAAuB,SAAQ,2BAK1C;CAAG;;;;;;AAEL;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,qBAIpC;CAAG;;;;IAKH,iDAAiD;;;;AAHnD,qBAAa,sBAAuB,SAAQ,2BAM1C;CAAG;;;;;;;IAQH,iDAAiD;;;;AANnD,qBAAa,uBAAwB,SAAQ,4BAS3C;CAAG;AAEL,eAAO,MAAM,sBAAsB;;;IAGjC;;;OAGG;;;;;EAKH,CAAA;;AAEF,qBAAa,mBAAoB,SAAQ,wBAIxC;CAAG;;AAEJ,qBAAa,kBAAmB,SAAQ,uBAKvC;CAAG;;;;IArBF;;;OAGG;;;;;;AAoBL,qBAAa,MAAO,SAAQ,WAO3B;CAAG;;AAEJ,qBAAa,iBAAkB,SAAQ,sBAA4C;CAAG;;AACtF,qBAAa,iBAAkB,SAAQ,sBAA4C;CAAG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E7E,eAAO,MAAM,iBAAiB,8CAA+C,CAAA"}
@@ -1,6 +1,6 @@
1
- import { Schema, Transferable } from '@livestore/utils/effect';
1
+ import { Effect, Schema, Transferable } from '@livestore/utils/effect';
2
2
  import { nanoid } from '@livestore/utils/nanoid';
3
- const id = Schema.String.pipe(Schema.optional, Schema.withDefaults({ constructor: () => nanoid(10), decoding: () => nanoid(10) }));
3
+ const id = Schema.String.pipe(Schema.withDecodingDefaultType(Effect.sync(() => nanoid(10))), Schema.withConstructorDefault(Effect.sync(() => nanoid(10))));
4
4
  const defaultPacketFields = {
5
5
  id,
6
6
  target: Schema.String,
@@ -16,10 +16,10 @@ const remainingHopsUndefined = Schema.Undefined.pipe(Schema.optional);
16
16
  * We need a clear path back to the sender to avoid this, thus we respond with a separate
17
17
  * `DirectChannelResponseSuccess` which contains the `port`.
18
18
  */
19
- export class DirectChannelRequest extends Schema.TaggedStruct('DirectChannelRequest', {
19
+ export const DirectChannelRequest = Schema.TaggedStruct('DirectChannelRequest', {
20
20
  ...defaultPacketFields,
21
21
  remainingHops: Schema.Array(Schema.String).pipe(Schema.optional),
22
- channelVersion: Schema.Number,
22
+ channelVersion: Schema.Finite,
23
23
  /** Only set if the request is in response to an incoming request */
24
24
  reqId: Schema.UndefinedOr(Schema.String),
25
25
  /**
@@ -27,70 +27,61 @@ export class DirectChannelRequest extends Schema.TaggedStruct('DirectChannelRequ
27
27
  * source has changed.
28
28
  */
29
29
  sourceId: Schema.String,
30
- }) {
31
- }
32
- export class DirectChannelResponseSuccess extends Schema.TaggedStruct('DirectChannelResponseSuccess', {
30
+ });
31
+ export const DirectChannelResponseSuccess = Schema.TaggedStruct('DirectChannelResponseSuccess', {
33
32
  ...defaultPacketFields,
34
33
  reqId: Schema.String,
35
34
  port: Transferable.MessagePort,
36
35
  // Since we can't copy this message, we need to follow the exact route back to the sender
37
36
  remainingHops: Schema.Array(Schema.String),
38
- channelVersion: Schema.Number,
39
- }) {
40
- }
41
- export class DirectChannelResponseNoTransferables extends Schema.TaggedStruct('DirectChannelResponseNoTransferables', {
37
+ channelVersion: Schema.Finite,
38
+ });
39
+ export const DirectChannelResponseNoTransferables = Schema.TaggedStruct('DirectChannelResponseNoTransferables', {
42
40
  ...defaultPacketFields,
43
41
  reqId: Schema.String,
44
42
  remainingHops: Schema.Array(Schema.String),
45
- }) {
46
- }
47
- export class ProxyChannelRequest extends Schema.TaggedStruct('ProxyChannelRequest', {
43
+ });
44
+ export const ProxyChannelRequest = Schema.TaggedStruct('ProxyChannelRequest', {
48
45
  ...defaultPacketFields,
49
46
  remainingHops: remainingHopsUndefined,
50
47
  channelIdCandidate: Schema.String,
51
- }) {
52
- }
53
- export class ProxyChannelResponseSuccess extends Schema.TaggedStruct('ProxyChannelResponseSuccess', {
48
+ });
49
+ export const ProxyChannelResponseSuccess = Schema.TaggedStruct('ProxyChannelResponseSuccess', {
54
50
  ...defaultPacketFields,
55
51
  reqId: Schema.String,
56
52
  remainingHops: Schema.Array(Schema.String),
57
53
  combinedChannelId: Schema.String,
58
54
  channelIdCandidate: Schema.String,
59
- }) {
60
- }
61
- export class ProxyChannelPayload extends Schema.TaggedStruct('ProxyChannelPayload', {
55
+ });
56
+ export const ProxyChannelPayload = Schema.TaggedStruct('ProxyChannelPayload', {
62
57
  ...defaultPacketFields,
63
58
  remainingHops: remainingHopsUndefined,
64
59
  payload: Schema.Any,
65
60
  combinedChannelId: Schema.String,
66
- }) {
67
- }
68
- export class ProxyChannelPayloadAck extends Schema.TaggedStruct('ProxyChannelPayloadAck', {
61
+ });
62
+ export const ProxyChannelPayloadAck = Schema.TaggedStruct('ProxyChannelPayloadAck', {
69
63
  ...defaultPacketFields,
70
64
  reqId: Schema.String,
71
65
  remainingHops: Schema.Array(Schema.String),
72
66
  combinedChannelId: Schema.String,
73
- }) {
74
- }
67
+ });
75
68
  /**
76
69
  * Broadcast to all nodes when a new edge is added.
77
70
  * Mostly used for auto-reconnect purposes.
78
71
  */
79
- export class NetworkEdgeAdded extends Schema.TaggedStruct('NetworkEdgeAdded', {
72
+ export const NetworkEdgeAdded = Schema.TaggedStruct('NetworkEdgeAdded', {
80
73
  id,
81
74
  source: Schema.String,
82
75
  target: Schema.String,
83
- }) {
84
- }
85
- export class NetworkTopologyRequest extends Schema.TaggedStruct('NetworkTopologyRequest', {
76
+ });
77
+ export const NetworkTopologyRequest = Schema.TaggedStruct('NetworkTopologyRequest', {
86
78
  id,
87
79
  hops: Schema.Array(Schema.String),
88
80
  /** Always fixed to who requested the topology */
89
81
  source: Schema.String,
90
82
  target: Schema.Literal('-'),
91
- }) {
92
- }
93
- export class NetworkTopologyResponse extends Schema.TaggedStruct('NetworkTopologyResponse', {
83
+ });
84
+ export const NetworkTopologyResponse = Schema.TaggedStruct('NetworkTopologyResponse', {
94
85
  id,
95
86
  reqId: Schema.String,
96
87
  remainingHops: Schema.Array(Schema.String),
@@ -99,8 +90,7 @@ export class NetworkTopologyResponse extends Schema.TaggedStruct('NetworkTopolog
99
90
  /** Always fixed to who requested the topology */
100
91
  source: Schema.String,
101
92
  target: Schema.Literal('-'),
102
- }) {
103
- }
93
+ });
104
94
  export const BroadcastChannelPacket = Schema.TaggedStruct('BroadcastChannelPacket', {
105
95
  id,
106
96
  channelName: Schema.String,
@@ -113,14 +103,25 @@ export const BroadcastChannelPacket = Schema.TaggedStruct('BroadcastChannelPacke
113
103
  source: Schema.String,
114
104
  target: Schema.Literal('-'),
115
105
  });
116
- export class DirectChannelPacket extends Schema.Union(DirectChannelRequest, DirectChannelResponseSuccess, DirectChannelResponseNoTransferables) {
117
- }
118
- export class ProxyChannelPacket extends Schema.Union(ProxyChannelRequest, ProxyChannelResponseSuccess, ProxyChannelPayload, ProxyChannelPayloadAck) {
119
- }
120
- export class Packet extends Schema.Union(DirectChannelPacket, ProxyChannelPacket, NetworkEdgeAdded, NetworkTopologyRequest, NetworkTopologyResponse, BroadcastChannelPacket) {
121
- }
122
- export class DirectChannelPing extends Schema.TaggedStruct('DirectChannelPing', {}) {
123
- }
124
- export class DirectChannelPong extends Schema.TaggedStruct('DirectChannelPong', {}) {
125
- }
106
+ export const DirectChannelPacket = Schema.Union([
107
+ DirectChannelRequest,
108
+ DirectChannelResponseSuccess,
109
+ DirectChannelResponseNoTransferables,
110
+ ]);
111
+ export const ProxyChannelPacket = Schema.Union([
112
+ ProxyChannelRequest,
113
+ ProxyChannelResponseSuccess,
114
+ ProxyChannelPayload,
115
+ ProxyChannelPayloadAck,
116
+ ]);
117
+ export const Packet = Schema.Union([
118
+ DirectChannelPacket,
119
+ ProxyChannelPacket,
120
+ NetworkEdgeAdded,
121
+ NetworkTopologyRequest,
122
+ NetworkTopologyResponse,
123
+ BroadcastChannelPacket,
124
+ ]);
125
+ export const DirectChannelPing = Schema.TaggedStruct('DirectChannelPing', {});
126
+ export const DirectChannelPong = Schema.TaggedStruct('DirectChannelPong', {});
126
127
  //# sourceMappingURL=mesh-schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"mesh-schema.js","sourceRoot":"","sources":["../src/mesh-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAEhD,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAC3B,MAAM,CAAC,QAAQ,EACf,MAAM,CAAC,YAAY,CAAC,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,CACnF,CAAA;AAED,MAAM,mBAAmB,GAAG;IAC1B,EAAE;IACF,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,MAAM,EAAE,MAAM,CAAC,MAAM;IACrB,WAAW,EAAE,MAAM,CAAC,MAAM;IAC1B,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAA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