@livestore/sync-cf 0.1.0-dev.9 → 0.2.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.
|
@@ -7,41 +7,47 @@ export interface Env {
|
|
|
7
7
|
ADMIN_SECRET: string;
|
|
8
8
|
}
|
|
9
9
|
type WebSocketClient = WebSocket;
|
|
10
|
-
export declare const mutationLogTable: DbSchema.TableDef<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
export declare const mutationLogTable: DbSchema.TableDef<{
|
|
11
|
+
name: "__unused";
|
|
12
|
+
columns: {
|
|
13
|
+
idGlobal: {
|
|
14
|
+
columnType: "integer";
|
|
15
|
+
schema: Schema.Schema<number, number, never>;
|
|
16
|
+
default: import("effect/Option").None<never>;
|
|
17
|
+
nullable: false;
|
|
18
|
+
primaryKey: true;
|
|
19
|
+
};
|
|
20
|
+
parentIdGlobal: {
|
|
21
|
+
columnType: "integer";
|
|
22
|
+
schema: Schema.Schema<number, number, never>;
|
|
23
|
+
default: import("effect/Option").None<never>;
|
|
24
|
+
nullable: false;
|
|
25
|
+
primaryKey: false;
|
|
26
|
+
};
|
|
27
|
+
mutation: {
|
|
28
|
+
columnType: "text";
|
|
29
|
+
schema: Schema.Schema<string, string, never>;
|
|
30
|
+
default: import("effect/Option").None<never>;
|
|
31
|
+
nullable: false;
|
|
32
|
+
primaryKey: false;
|
|
33
|
+
};
|
|
34
|
+
args: {
|
|
35
|
+
columnType: "text";
|
|
36
|
+
schema: Schema.Schema<any, string, never>;
|
|
37
|
+
default: import("effect/Option").None<never>;
|
|
38
|
+
nullable: false;
|
|
39
|
+
primaryKey: false;
|
|
40
|
+
};
|
|
41
|
+
id: DbSchema.SqliteDsl.ColumnDefinition<string, string>;
|
|
17
42
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
default: import("effect/Option").None<never>;
|
|
22
|
-
nullable: false;
|
|
23
|
-
primaryKey: false;
|
|
24
|
-
};
|
|
25
|
-
mutation: {
|
|
26
|
-
columnType: "text";
|
|
27
|
-
schema: Schema.Schema<string, string, never>;
|
|
28
|
-
default: import("effect/Option").None<never>;
|
|
29
|
-
nullable: false;
|
|
30
|
-
primaryKey: false;
|
|
31
|
-
};
|
|
32
|
-
args: {
|
|
33
|
-
columnType: "text";
|
|
34
|
-
schema: Schema.Schema<any, string, never>;
|
|
35
|
-
default: import("effect/Option").None<never>;
|
|
36
|
-
nullable: false;
|
|
37
|
-
primaryKey: false;
|
|
38
|
-
};
|
|
39
|
-
id: DbSchema.SqliteDsl.ColumnDefinition<string, string>;
|
|
40
|
-
}>, false, {
|
|
43
|
+
indexes?: ReadonlyArray<DbSchema.SqliteDsl.Index>;
|
|
44
|
+
ast: import("@livestore/db-schema/dist/ast/sqlite.js").Table;
|
|
45
|
+
}, {
|
|
41
46
|
isSingleton: false;
|
|
42
47
|
disableAutomaticIdColumn: false;
|
|
43
48
|
deriveMutations: never;
|
|
44
49
|
isSingleColumn: false;
|
|
50
|
+
requiredInsertColumnNames: "idGlobal" | "parentIdGlobal" | "mutation" | "args";
|
|
45
51
|
}, Schema.Schema<{
|
|
46
52
|
readonly idGlobal: number;
|
|
47
53
|
readonly parentIdGlobal: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durable-object.d.ts","sourceRoot":"","sources":["../../src/cf-worker/durable-object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAA0B,MAAM,0BAA0B,CAAA;AAE/F,OAAO,EAAU,MAAM,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAIlD,MAAM,WAAW,GAAG;IAClB,gBAAgB,EAAE,sBAAsB,CAAC,eAAe,CAAC,CAAA;IACzD,EAAE,EAAE,UAAU,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,KAAK,eAAe,GAAG,SAAS,CAAA;AAMhC,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"durable-object.d.ts","sourceRoot":"","sources":["../../src/cf-worker/durable-object.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAA0B,MAAM,0BAA0B,CAAA;AAE/F,OAAO,EAAU,MAAM,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAIlD,MAAM,WAAW,GAAG;IAClB,gBAAgB,EAAE,sBAAsB,CAAC,eAAe,CAAC,CAAA;IACzD,EAAE,EAAE,UAAU,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,KAAK,eAAe,GAAG,SAAS,CAAA;AAMhC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAK3B,CAAA;AAGF,qBAAa,eAAgB,SAAQ,aAAa,CAAC,GAAG,CAAC;IACrD,MAAM,SAA2C;IACjD,OAAO;8BAiK0B,OAAO,CAAC,aAAa,CAAC,GAAG,GAAG,SAAS,CAAC;4BAatC,MAAM,GAAG,SAAS,KAAG,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;6BAe7D,aAAa,CAAC,GAAG;;MA7LG;gBAE1C,GAAG,EAAE,kBAAkB,EAAE,GAAG,EAAE,GAAG;IAI7C,KAAK,aAAoB,OAAO,uBAsBsB;IAEtD,gBAAgB,OAAc,eAAe,WAAW,WAAW,GAAG,MAAM,wBA0H3E;IAED,cAAc,OAAc,eAAe,QAAQ,MAAM,WAAW,MAAM,aAAa,OAAO,mBAG7F;CACF"}
|
|
@@ -8,23 +8,23 @@ export type PullReq = typeof PullReq.Type;
|
|
|
8
8
|
export declare const PullRes: Schema.TaggedStruct<"WSMessage.PullRes", {
|
|
9
9
|
requestId: typeof Schema.String;
|
|
10
10
|
events: Schema.Array$<Schema.SchemaClass<{
|
|
11
|
+
readonly mutation: string;
|
|
12
|
+
readonly args: any;
|
|
11
13
|
readonly id: {
|
|
12
14
|
readonly global: number;
|
|
13
15
|
readonly local: number;
|
|
14
16
|
};
|
|
15
|
-
readonly mutation: string;
|
|
16
|
-
readonly args: any;
|
|
17
17
|
readonly parentId: {
|
|
18
18
|
readonly global: number;
|
|
19
19
|
readonly local: number;
|
|
20
20
|
};
|
|
21
21
|
}, {
|
|
22
|
+
readonly mutation: string;
|
|
23
|
+
readonly args: any;
|
|
22
24
|
readonly id: {
|
|
23
25
|
readonly global: number;
|
|
24
26
|
readonly local: number;
|
|
25
27
|
};
|
|
26
|
-
readonly mutation: string;
|
|
27
|
-
readonly args: any;
|
|
28
28
|
readonly parentId: {
|
|
29
29
|
readonly global: number;
|
|
30
30
|
readonly local: number;
|
|
@@ -35,23 +35,23 @@ export declare const PullRes: Schema.TaggedStruct<"WSMessage.PullRes", {
|
|
|
35
35
|
export type PullRes = typeof PullRes.Type;
|
|
36
36
|
export declare const PushBroadcast: Schema.TaggedStruct<"WSMessage.PushBroadcast", {
|
|
37
37
|
mutationEventEncoded: Schema.SchemaClass<{
|
|
38
|
+
readonly mutation: string;
|
|
39
|
+
readonly args: any;
|
|
38
40
|
readonly id: {
|
|
39
41
|
readonly global: number;
|
|
40
42
|
readonly local: number;
|
|
41
43
|
};
|
|
42
|
-
readonly mutation: string;
|
|
43
|
-
readonly args: any;
|
|
44
44
|
readonly parentId: {
|
|
45
45
|
readonly global: number;
|
|
46
46
|
readonly local: number;
|
|
47
47
|
};
|
|
48
48
|
}, {
|
|
49
|
+
readonly mutation: string;
|
|
50
|
+
readonly args: any;
|
|
49
51
|
readonly id: {
|
|
50
52
|
readonly global: number;
|
|
51
53
|
readonly local: number;
|
|
52
54
|
};
|
|
53
|
-
readonly mutation: string;
|
|
54
|
-
readonly args: any;
|
|
55
55
|
readonly parentId: {
|
|
56
56
|
readonly global: number;
|
|
57
57
|
readonly local: number;
|
|
@@ -63,23 +63,23 @@ export type PushBroadcast = typeof PushBroadcast.Type;
|
|
|
63
63
|
export declare const PushReq: Schema.TaggedStruct<"WSMessage.PushReq", {
|
|
64
64
|
requestId: typeof Schema.String;
|
|
65
65
|
mutationEventEncoded: Schema.SchemaClass<{
|
|
66
|
+
readonly mutation: string;
|
|
67
|
+
readonly args: any;
|
|
66
68
|
readonly id: {
|
|
67
69
|
readonly global: number;
|
|
68
70
|
readonly local: number;
|
|
69
71
|
};
|
|
70
|
-
readonly mutation: string;
|
|
71
|
-
readonly args: any;
|
|
72
72
|
readonly parentId: {
|
|
73
73
|
readonly global: number;
|
|
74
74
|
readonly local: number;
|
|
75
75
|
};
|
|
76
76
|
}, {
|
|
77
|
+
readonly mutation: string;
|
|
78
|
+
readonly args: any;
|
|
77
79
|
readonly id: {
|
|
78
80
|
readonly global: number;
|
|
79
81
|
readonly local: number;
|
|
80
82
|
};
|
|
81
|
-
readonly mutation: string;
|
|
82
|
-
readonly args: any;
|
|
83
83
|
readonly parentId: {
|
|
84
84
|
readonly global: number;
|
|
85
85
|
readonly local: number;
|
|
@@ -133,23 +133,23 @@ export declare const Message: Schema.Union<[Schema.TaggedStruct<"WSMessage.PullR
|
|
|
133
133
|
}>, Schema.TaggedStruct<"WSMessage.PullRes", {
|
|
134
134
|
requestId: typeof Schema.String;
|
|
135
135
|
events: Schema.Array$<Schema.SchemaClass<{
|
|
136
|
+
readonly mutation: string;
|
|
137
|
+
readonly args: any;
|
|
136
138
|
readonly id: {
|
|
137
139
|
readonly global: number;
|
|
138
140
|
readonly local: number;
|
|
139
141
|
};
|
|
140
|
-
readonly mutation: string;
|
|
141
|
-
readonly args: any;
|
|
142
142
|
readonly parentId: {
|
|
143
143
|
readonly global: number;
|
|
144
144
|
readonly local: number;
|
|
145
145
|
};
|
|
146
146
|
}, {
|
|
147
|
+
readonly mutation: string;
|
|
148
|
+
readonly args: any;
|
|
147
149
|
readonly id: {
|
|
148
150
|
readonly global: number;
|
|
149
151
|
readonly local: number;
|
|
150
152
|
};
|
|
151
|
-
readonly mutation: string;
|
|
152
|
-
readonly args: any;
|
|
153
153
|
readonly parentId: {
|
|
154
154
|
readonly global: number;
|
|
155
155
|
readonly local: number;
|
|
@@ -158,23 +158,23 @@ export declare const Message: Schema.Union<[Schema.TaggedStruct<"WSMessage.PullR
|
|
|
158
158
|
hasMore: typeof Schema.Boolean;
|
|
159
159
|
}>, Schema.TaggedStruct<"WSMessage.PushBroadcast", {
|
|
160
160
|
mutationEventEncoded: Schema.SchemaClass<{
|
|
161
|
+
readonly mutation: string;
|
|
162
|
+
readonly args: any;
|
|
161
163
|
readonly id: {
|
|
162
164
|
readonly global: number;
|
|
163
165
|
readonly local: number;
|
|
164
166
|
};
|
|
165
|
-
readonly mutation: string;
|
|
166
|
-
readonly args: any;
|
|
167
167
|
readonly parentId: {
|
|
168
168
|
readonly global: number;
|
|
169
169
|
readonly local: number;
|
|
170
170
|
};
|
|
171
171
|
}, {
|
|
172
|
+
readonly mutation: string;
|
|
173
|
+
readonly args: any;
|
|
172
174
|
readonly id: {
|
|
173
175
|
readonly global: number;
|
|
174
176
|
readonly local: number;
|
|
175
177
|
};
|
|
176
|
-
readonly mutation: string;
|
|
177
|
-
readonly args: any;
|
|
178
178
|
readonly parentId: {
|
|
179
179
|
readonly global: number;
|
|
180
180
|
readonly local: number;
|
|
@@ -184,23 +184,23 @@ export declare const Message: Schema.Union<[Schema.TaggedStruct<"WSMessage.PullR
|
|
|
184
184
|
}>, Schema.TaggedStruct<"WSMessage.PushReq", {
|
|
185
185
|
requestId: typeof Schema.String;
|
|
186
186
|
mutationEventEncoded: Schema.SchemaClass<{
|
|
187
|
+
readonly mutation: string;
|
|
188
|
+
readonly args: any;
|
|
187
189
|
readonly id: {
|
|
188
190
|
readonly global: number;
|
|
189
191
|
readonly local: number;
|
|
190
192
|
};
|
|
191
|
-
readonly mutation: string;
|
|
192
|
-
readonly args: any;
|
|
193
193
|
readonly parentId: {
|
|
194
194
|
readonly global: number;
|
|
195
195
|
readonly local: number;
|
|
196
196
|
};
|
|
197
197
|
}, {
|
|
198
|
+
readonly mutation: string;
|
|
199
|
+
readonly args: any;
|
|
198
200
|
readonly id: {
|
|
199
201
|
readonly global: number;
|
|
200
202
|
readonly local: number;
|
|
201
203
|
};
|
|
202
|
-
readonly mutation: string;
|
|
203
|
-
readonly args: any;
|
|
204
204
|
readonly parentId: {
|
|
205
205
|
readonly global: number;
|
|
206
206
|
readonly local: number;
|
|
@@ -236,23 +236,23 @@ export type MessageEncoded = typeof Message.Encoded;
|
|
|
236
236
|
export declare const BackendToClientMessage: Schema.Union<[Schema.TaggedStruct<"WSMessage.PullRes", {
|
|
237
237
|
requestId: typeof Schema.String;
|
|
238
238
|
events: Schema.Array$<Schema.SchemaClass<{
|
|
239
|
+
readonly mutation: string;
|
|
240
|
+
readonly args: any;
|
|
239
241
|
readonly id: {
|
|
240
242
|
readonly global: number;
|
|
241
243
|
readonly local: number;
|
|
242
244
|
};
|
|
243
|
-
readonly mutation: string;
|
|
244
|
-
readonly args: any;
|
|
245
245
|
readonly parentId: {
|
|
246
246
|
readonly global: number;
|
|
247
247
|
readonly local: number;
|
|
248
248
|
};
|
|
249
249
|
}, {
|
|
250
|
+
readonly mutation: string;
|
|
251
|
+
readonly args: any;
|
|
250
252
|
readonly id: {
|
|
251
253
|
readonly global: number;
|
|
252
254
|
readonly local: number;
|
|
253
255
|
};
|
|
254
|
-
readonly mutation: string;
|
|
255
|
-
readonly args: any;
|
|
256
256
|
readonly parentId: {
|
|
257
257
|
readonly global: number;
|
|
258
258
|
readonly local: number;
|
|
@@ -261,23 +261,23 @@ export declare const BackendToClientMessage: Schema.Union<[Schema.TaggedStruct<"
|
|
|
261
261
|
hasMore: typeof Schema.Boolean;
|
|
262
262
|
}>, Schema.TaggedStruct<"WSMessage.PushBroadcast", {
|
|
263
263
|
mutationEventEncoded: Schema.SchemaClass<{
|
|
264
|
+
readonly mutation: string;
|
|
265
|
+
readonly args: any;
|
|
264
266
|
readonly id: {
|
|
265
267
|
readonly global: number;
|
|
266
268
|
readonly local: number;
|
|
267
269
|
};
|
|
268
|
-
readonly mutation: string;
|
|
269
|
-
readonly args: any;
|
|
270
270
|
readonly parentId: {
|
|
271
271
|
readonly global: number;
|
|
272
272
|
readonly local: number;
|
|
273
273
|
};
|
|
274
274
|
}, {
|
|
275
|
+
readonly mutation: string;
|
|
276
|
+
readonly args: any;
|
|
275
277
|
readonly id: {
|
|
276
278
|
readonly global: number;
|
|
277
279
|
readonly local: number;
|
|
278
280
|
};
|
|
279
|
-
readonly mutation: string;
|
|
280
|
-
readonly args: any;
|
|
281
281
|
readonly parentId: {
|
|
282
282
|
readonly global: number;
|
|
283
283
|
readonly local: number;
|
|
@@ -308,23 +308,23 @@ export declare const ClientToBackendMessage: Schema.Union<[Schema.TaggedStruct<"
|
|
|
308
308
|
}>, Schema.TaggedStruct<"WSMessage.PushReq", {
|
|
309
309
|
requestId: typeof Schema.String;
|
|
310
310
|
mutationEventEncoded: Schema.SchemaClass<{
|
|
311
|
+
readonly mutation: string;
|
|
312
|
+
readonly args: any;
|
|
311
313
|
readonly id: {
|
|
312
314
|
readonly global: number;
|
|
313
315
|
readonly local: number;
|
|
314
316
|
};
|
|
315
|
-
readonly mutation: string;
|
|
316
|
-
readonly args: any;
|
|
317
317
|
readonly parentId: {
|
|
318
318
|
readonly global: number;
|
|
319
319
|
readonly local: number;
|
|
320
320
|
};
|
|
321
321
|
}, {
|
|
322
|
+
readonly mutation: string;
|
|
323
|
+
readonly args: any;
|
|
322
324
|
readonly id: {
|
|
323
325
|
readonly global: number;
|
|
324
326
|
readonly local: number;
|
|
325
327
|
};
|
|
326
|
-
readonly mutation: string;
|
|
327
|
-
readonly args: any;
|
|
328
328
|
readonly parentId: {
|
|
329
329
|
readonly global: number;
|
|
330
330
|
readonly local: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livestore/sync-cf",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0-dev.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@livestore/common": "0.
|
|
13
|
-
"@livestore/utils": "0.
|
|
12
|
+
"@livestore/common": "0.2.0-dev.0",
|
|
13
|
+
"@livestore/utils": "0.2.0-dev.0"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@cloudflare/workers-types": "4.20241022.0",
|