Couchbase-Ecosystem / cbl-ionic

Ionic Capacitor plugin for Couchbase Lite Enterprise (3.x+)
https://cbl-ionic.dev/
Apache License 2.0
4 stars 1 forks source link

Channels missing from ReplicatorConfiguration #58

Closed rahmedbuehler closed 1 day ago

rahmedbuehler commented 1 month ago

Describe the bug In the documentation, it's stated that "it’s also possible to specify a string array of channel names on Couchbase Lite’s replicator configuration object". Actually instantiating a ReplicatorConfiguration object, however, shows no methods related to channels. Have I missed something or is this functionality not currently present?

Expected behavior Support for channels when replicating.

Current behavior All channel support appears to be missing.

Plugin Version 0.2.3

Do you have a workaround? [ ] Yes [X] No

biozal commented 1 month ago

@rahmedbuehler have you tried using the CollectionConfig object to specify the channels? You can see the config object here: https://github.com/Couchbase-Ecosystem/cblite-js/blob/main/cblite/src/collection-config.ts

There is an override to the addCollections function that takes in the config as an option: https://github.com/Couchbase-Ecosystem/cblite-js/blob/main/cblite/src/replicator-configuration.ts#L102

The docs need to be updated to call out how this works. In the defense of the docs, they are just taken from the Swift/Kotlin docs so they should also probably be improved to call this out. Let me know if this doesn't work for you.