@@ -22,7 +22,12 @@ import { ChildrenNode } from './snap/ChildrenNode';
2222import { ImmutableTree } from './util/ImmutableTree' ;
2323import { ListenComplete } from './operation/ListenComplete' ;
2424import { Merge } from './operation/Merge' ;
25- import { Operation , OperationSource } from './operation/Operation' ;
25+ import {
26+ newOperationSourceServer ,
27+ newOperationSourceServerTaggedQuery ,
28+ newOperationSourceUser ,
29+ Operation
30+ } from './operation/Operation' ;
2631import { Overwrite } from './operation/Overwrite' ;
2732import { Path } from './util/Path' ;
2833import { SyncPoint } from './SyncPoint' ;
@@ -118,7 +123,7 @@ export class SyncTree {
118123 return [ ] ;
119124 } else {
120125 return this . applyOperationToSyncPoints_ (
121- new Overwrite ( OperationSource . user ( ) , path , newData )
126+ new Overwrite ( newOperationSourceUser ( ) , path , newData )
122127 ) ;
123128 }
124129 }
@@ -139,7 +144,7 @@ export class SyncTree {
139144 const changeTree = ImmutableTree . fromObject ( changedChildren ) ;
140145
141146 return this . applyOperationToSyncPoints_ (
142- new Merge ( OperationSource . user ( ) , path , changeTree )
147+ new Merge ( newOperationSourceUser ( ) , path , changeTree )
143148 ) ;
144149 }
145150
@@ -177,7 +182,7 @@ export class SyncTree {
177182 */
178183 applyServerOverwrite ( path : Path , newData : Node ) : Event [ ] {
179184 return this . applyOperationToSyncPoints_ (
180- new Overwrite ( OperationSource . server ( ) , path , newData )
185+ new Overwrite ( newOperationSourceServer ( ) , path , newData )
181186 ) ;
182187 }
183188
@@ -193,7 +198,7 @@ export class SyncTree {
193198 const changeTree = ImmutableTree . fromObject ( changedChildren ) ;
194199
195200 return this . applyOperationToSyncPoints_ (
196- new Merge ( OperationSource . server ( ) , path , changeTree )
201+ new Merge ( newOperationSourceServer ( ) , path , changeTree )
197202 ) ;
198203 }
199204
@@ -204,7 +209,7 @@ export class SyncTree {
204209 */
205210 applyListenComplete ( path : Path ) : Event [ ] {
206211 return this . applyOperationToSyncPoints_ (
207- new ListenComplete ( OperationSource . server ( ) , path )
212+ new ListenComplete ( newOperationSourceServer ( ) , path )
208213 ) ;
209214 }
210215
@@ -221,7 +226,7 @@ export class SyncTree {
221226 queryId = r . queryId ;
222227 const relativePath = Path . relativePath ( queryPath , path ) ;
223228 const op = new Overwrite (
224- OperationSource . forServerTaggedQuery ( queryId ) ,
229+ newOperationSourceServerTaggedQuery ( queryId ) ,
225230 relativePath ,
226231 snap
227232 ) ;
@@ -250,7 +255,7 @@ export class SyncTree {
250255 const relativePath = Path . relativePath ( queryPath , path ) ;
251256 const changeTree = ImmutableTree . fromObject ( changedChildren ) ;
252257 const op = new Merge (
253- OperationSource . forServerTaggedQuery ( queryId ) ,
258+ newOperationSourceServerTaggedQuery ( queryId ) ,
254259 relativePath ,
255260 changeTree
256261 ) ;
@@ -274,7 +279,7 @@ export class SyncTree {
274279 queryId = r . queryId ;
275280 const relativePath = Path . relativePath ( queryPath , path ) ;
276281 const op = new ListenComplete (
277- OperationSource . forServerTaggedQuery ( queryId ) ,
282+ newOperationSourceServerTaggedQuery ( queryId ) ,
278283 relativePath
279284 ) ;
280285 return this . applyTaggedOperation_ ( queryPath , op ) ;
0 commit comments