@@ -17,9 +17,7 @@ import {
1717 ParameterLookup ,
1818 SqlSyncRules ,
1919 RequestJwtPayload ,
20- BucketSource ,
21- BucketSourceType ,
22- BucketParameterQuerier
20+ BucketSource
2321} from '@powersync/service-sync-rules' ;
2422import { describe , expect , test , beforeEach } from 'vitest' ;
2523
@@ -661,9 +659,9 @@ config:
661659
662660 beforeEach ( ( ) => {
663661 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 } ) ;
667665 } ) ;
668666
669667 test ( 'includes defaults' , async ( ) => {
@@ -677,7 +675,7 @@ config:
677675 expect ( line ?. checkpointLine ) . toEqual ( {
678676 checkpoint : {
679677 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 } ] }
681679 ] ,
682680 last_op_id : '1' ,
683681 write_checkpoint : undefined ,
@@ -726,9 +724,9 @@ config:
726724 expect ( line ?. checkpointLine ) . toEqual ( {
727725 checkpoint : {
728726 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 } ] }
732730 ] ,
733731 last_op_id : '1' ,
734732 write_checkpoint : undefined ,
@@ -758,8 +756,8 @@ config:
758756 expect ( line ?. checkpointLine ) . toEqual ( {
759757 checkpoint : {
760758 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 } ] }
763761 ] ,
764762 last_op_id : '1' ,
765763 write_checkpoint : undefined ,
@@ -786,9 +784,9 @@ config:
786784 expect ( line ?. checkpointLine ) . toEqual ( {
787785 checkpoint : {
788786 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 } ] } ,
790788 {
791- bucket : 'stream|0["default"]' ,
789+ bucket : '1# stream|0["default"]' ,
792790 checksum : 1 ,
793791 count : 1 ,
794792 priority : 1 ,
@@ -823,10 +821,10 @@ config:
823821 expect ( line ?. checkpointLine ) . toEqual ( {
824822 checkpoint : {
825823 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 } ] } ,
828826 {
829- bucket : 'stream|0["default"]' ,
827+ bucket : '1# stream|0["default"]' ,
830828 checksum : 1 ,
831829 count : 1 ,
832830 priority : 3 ,
0 commit comments