File tree Expand file tree Collapse file tree 4 files changed +696
-643
lines changed
src/__demos__/json-crdt-server/services/blocks/store/level Expand file tree Collapse file tree 4 files changed +696
-643
lines changed Original file line number Diff line number Diff line change 76
76
},
77
77
"dependencies" : {
78
78
"@jsonjoy.com/jit-router" : " ^1.0.1" ,
79
- "@jsonjoy.com/json-pack" : " ^1.1 .0" ,
80
- "@jsonjoy.com/util" : " ^1.4 .0" ,
79
+ "@jsonjoy.com/json-pack" : " ^1.2 .0" ,
80
+ "@jsonjoy.com/util" : " ^1.6 .0" ,
81
81
"abstract-level" : " ^2.0.0" ,
82
82
"classic-level" : " ^1.4.1" ,
83
83
"fs-zoo" : " ^1.1.0" ,
84
84
"memory-level" : " ^1.0.0" ,
85
85
"rpc-error" : " ^1.1.0" ,
86
- "rx-use" : " ^1.8.1 " ,
87
- "sonic-forest" : " ^1.0.3 " ,
88
- "thingies" : " ^2.4 .0"
86
+ "rx-use" : " ^1.8.2 " ,
87
+ "sonic-forest" : " ^1.2.0 " ,
88
+ "thingies" : " ^2.5 .0"
89
89
},
90
90
"devDependencies" : {
91
91
"@biomejs/biome" : " ^1.9.3" ,
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export class LevelStore implements types.Store {
69
69
const key = this . startKey ( id ) ;
70
70
try {
71
71
const blob = await kv . get ( key ) ;
72
- const snapshot = decoder . decode ( blob ) as types . StoreSnapshot ;
72
+ const snapshot = decoder . decode ( blob as any ) as types . StoreSnapshot ;
73
73
const batches : types . StoreBatch [ ] = [ ] ;
74
74
if ( snapshot . seq < seq ) {
75
75
const gte = this . batchKey ( id , snapshot . seq + 1 ) ;
@@ -187,7 +187,7 @@ export class LevelStore implements types.Store {
187
187
const { encoder, decoder} = codec ;
188
188
const key = this . startKey ( id ) ;
189
189
await this . mutex . acquire ( id + '.trunc' , async ( ) => {
190
- const start = decoder . decode ( await kv . get ( key ) ) as types . StoreSnapshot ;
190
+ const start = decoder . decode ( ( await kv . get ( key ) ) as any ) as types . StoreSnapshot ;
191
191
if ( start . seq >= to ) return ;
192
192
const gt = this . batchKey ( id , start . seq ) ;
193
193
const lte = this . batchKey ( id , to ) ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments