@@ -17,9 +17,7 @@ import {
17
17
ParameterLookup ,
18
18
SqlSyncRules ,
19
19
RequestJwtPayload ,
20
- BucketSource ,
21
- BucketSourceType ,
22
- BucketParameterQuerier
20
+ BucketSource
23
21
} from '@powersync/service-sync-rules' ;
24
22
import { describe , expect , test , beforeEach } from 'vitest' ;
25
23
@@ -661,9 +659,9 @@ config:
661
659
662
660
beforeEach ( ( ) => {
663
661
storage = new MockBucketChecksumStateStorage ( ) ;
664
- storage . updateTestChecksum ( { bucket : 'stream|0["default"]' , checksum : 1 , count : 1 } ) ;
665
- storage . updateTestChecksum ( { bucket : 'stream|0["a"]' , checksum : 1 , count : 1 } ) ;
666
- storage . updateTestChecksum ( { bucket : 'stream|0["b"]' , checksum : 1 , count : 1 } ) ;
662
+ storage . updateTestChecksum ( { bucket : '1# stream|0["default"]' , checksum : 1 , count : 1 } ) ;
663
+ storage . updateTestChecksum ( { bucket : '1# stream|0["a"]' , checksum : 1 , count : 1 } ) ;
664
+ storage . updateTestChecksum ( { bucket : '1# stream|0["b"]' , checksum : 1 , count : 1 } ) ;
667
665
} ) ;
668
666
669
667
test ( 'includes defaults' , async ( ) => {
@@ -677,7 +675,7 @@ config:
677
675
expect ( line ?. checkpointLine ) . toEqual ( {
678
676
checkpoint : {
679
677
buckets : [
680
- { bucket : 'stream|0["default"]' , checksum : 1 , count : 1 , priority : 3 , subscriptions : [ { default : 0 } ] }
678
+ { bucket : '1# stream|0["default"]' , checksum : 1 , count : 1 , priority : 3 , subscriptions : [ { default : 0 } ] }
681
679
] ,
682
680
last_op_id : '1' ,
683
681
write_checkpoint : undefined ,
@@ -726,9 +724,9 @@ config:
726
724
expect ( line ?. checkpointLine ) . toEqual ( {
727
725
checkpoint : {
728
726
buckets : [
729
- { bucket : 'stream|0["a"]' , checksum : 1 , count : 1 , priority : 3 , subscriptions : [ { sub : 0 } ] } ,
730
- { bucket : 'stream|0["b"]' , checksum : 1 , count : 1 , priority : 1 , subscriptions : [ { sub : 1 } ] } ,
731
- { bucket : 'stream|0["default"]' , checksum : 1 , count : 1 , priority : 3 , subscriptions : [ { default : 0 } ] }
727
+ { bucket : '1# stream|0["a"]' , checksum : 1 , count : 1 , priority : 3 , subscriptions : [ { sub : 0 } ] } ,
728
+ { bucket : '1# stream|0["b"]' , checksum : 1 , count : 1 , priority : 1 , subscriptions : [ { sub : 1 } ] } ,
729
+ { bucket : '1# stream|0["default"]' , checksum : 1 , count : 1 , priority : 3 , subscriptions : [ { default : 0 } ] }
732
730
] ,
733
731
last_op_id : '1' ,
734
732
write_checkpoint : undefined ,
@@ -758,8 +756,8 @@ config:
758
756
expect ( line ?. checkpointLine ) . toEqual ( {
759
757
checkpoint : {
760
758
buckets : [
761
- { bucket : 'stream|0["a"]' , checksum : 1 , count : 1 , priority : 3 , subscriptions : [ { sub : 0 } ] } ,
762
- { bucket : 'stream|0["b"]' , checksum : 1 , count : 1 , priority : 1 , subscriptions : [ { sub : 0 } , { sub : 1 } ] }
759
+ { bucket : '1# stream|0["a"]' , checksum : 1 , count : 1 , priority : 3 , subscriptions : [ { sub : 0 } ] } ,
760
+ { bucket : '1# stream|0["b"]' , checksum : 1 , count : 1 , priority : 1 , subscriptions : [ { sub : 0 } , { sub : 1 } ] }
763
761
] ,
764
762
last_op_id : '1' ,
765
763
write_checkpoint : undefined ,
@@ -786,9 +784,9 @@ config:
786
784
expect ( line ?. checkpointLine ) . toEqual ( {
787
785
checkpoint : {
788
786
buckets : [
789
- { bucket : 'stream|0["a"]' , checksum : 1 , count : 1 , priority : 1 , subscriptions : [ { sub : 0 } ] } ,
787
+ { bucket : '1# stream|0["a"]' , checksum : 1 , count : 1 , priority : 1 , subscriptions : [ { sub : 0 } ] } ,
790
788
{
791
- bucket : 'stream|0["default"]' ,
789
+ bucket : '1# stream|0["default"]' ,
792
790
checksum : 1 ,
793
791
count : 1 ,
794
792
priority : 1 ,
@@ -823,10 +821,10 @@ config:
823
821
expect ( line ?. checkpointLine ) . toEqual ( {
824
822
checkpoint : {
825
823
buckets : [
826
- { bucket : 'stream|0["a"]' , checksum : 1 , count : 1 , priority : 1 , subscriptions : [ { sub : 0 } ] } ,
827
- { bucket : 'stream|0["b"]' , checksum : 1 , count : 1 , priority : 1 , subscriptions : [ { sub : 0 } ] } ,
824
+ { bucket : '1# stream|0["a"]' , checksum : 1 , count : 1 , priority : 1 , subscriptions : [ { sub : 0 } ] } ,
825
+ { bucket : '1# stream|0["b"]' , checksum : 1 , count : 1 , priority : 1 , subscriptions : [ { sub : 0 } ] } ,
828
826
{
829
- bucket : 'stream|0["default"]' ,
827
+ bucket : '1# stream|0["default"]' ,
830
828
checksum : 1 ,
831
829
count : 1 ,
832
830
priority : 3 ,
0 commit comments