Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements the sync progress API for the JavaScript SDKs. This is currently work in progress as it's waiting for the releevant core extensions to be released.
The overall API is very similar to the one exposed by the other SDKs:
SyncDataFlowStatus
, which needs to be transferrable from workers, adds a newInternalProgressInformation
field tracking progress across different buckets. Users are encouraged not to use that directly though.downloadProgress
getter is added toSyncStatus
with the same interface we expose for Dart and Kotlin: AnuntilCompletion
getter and auntilPriority(priority)
method. They both return a structure making the total and downloaded operations available (as well as a relative progress indicator).I've added unit tests for this through the Node SDK, because that's easier to test with a local core extension build than the Web / RN SDKs that need subsequent builds. I think we should eventually share tests between the SDKs to be sure we're not missing anything, but I think this already points towards the implementation working :)