Skip to content

0.1.0-alpha

Pre-release
Pre-release
Compare
Choose a tag to compare
@heckj heckj released this 25 Apr 15:22
· 51 commits to main since this release
4d8ce30

0.1.0-alpha

Initial release

The first release of automerge-repo-swift, a library that provides coordination and synchronization for networking and storage, built in spiration from, and compatibility with, automerge-repo.

This initial release has an initial API set up for the repository that mirrors the structure and functions of its inspiration.

Pluggable storage

While it supports a storage provider, no public storage adapters are currently written.
The test package associated with this library includes an in-memory testing provider.

Pluggable networking

Two networking providers are included, as well as general public code that encapsulates the core of the automerge-repo v1 sync protocol.

  • WebSocket - supports an outgoing websocket connection to another peer.
  • Peer to Peer - supports incoming and outgoing connections using a TLS-encrypted socket protocol that uses the automerge-repo v1 sync protocol. This is a revised protocol from what was originally created in the demo app MeetingNotes, in that it includes the full protocol definition with CBOR encoded messages.

The test package associated with this library also includes an mock network provider and an in-memory network provider.

The demo app MeetingNotes has been updated to use this project to full vet the flesh out the API and prove functionality. As of this release, that project is operational and fully functional, but maintained in the branch testingARmain until this has a full release and documentation both in this package, and in MeetingNotes demo app, has been updated to reflect all the changes.

Testing

Unit test coverage is roughly 40%, with most of the untested areas being the network providers that are covered in Integration Tests.

In addition to the demo app, this project includes a subdirect IntegrationTests which hosts a separate Swift package that exists to run functional, integration tests to interact with live automerge-repo repositories. It's not currently viable to run these in GitHub Actions CI, but they can be run manually to work the API. The IntegrationTests were explicitly broken out to avoid pulling in a large swath of additional dependencies that I didn't want to burden this repository with.

Documentation

The API documentation has been loosely curated and all the main types provided with abstracts, but additional detail and consistency cleanup is still pending.

What's Changed

  • CI by @heckj in #7
  • breaking integration tests off into a subpackage by @heckj in #9
  • removing @testable import in IntegrationTest by @heckj in #10
  • calculating a backoff value for auto-reconnect timing by @heckj in #11
  • Peer2peer by @heckj in #12
  • reconnect with backoff in websocket by @heckj in #13
  • SPI file for swift package index documentation host/links by @heckj in #15
  • wraps up Peer to peer by @heckj in #16
  • fixing iOS compilation by @heckj in #17
  • adds privacy info to express use of UserDefaults by @heckj in #18
  • public initializers on error types by @heckj in #19
  • adding in a few missed public initializers by @heckj in #20
  • making provider configurations public initializers by @heckj in #21
  • converting to a synchronous init on P2P config by @heckj in #22
  • make an explicit start and stop for listening on Peer2Peer network by @heckj in #23
  • exposing publisher for updated information feed for SwiftUI by @heckj in #24
  • expand PeerConnection information, and provide a publisher from the peerToPeer provider by @heckj in #25
  • externalizing availablePeer for access by @heckj in #26
  • exposing AvailablePeer and PeerConnection as identifiable, hashable, … by @heckj in #27
  • exposing setPeerName explicitly by @heckj in #28
  • remove use of userdefaults from library directly by @heckj in #29
  • adding logging, starting browser on listener activation by @heckj in #30
  • Morepublish by @heckj in #31
  • fixes state update publications on termination of browser and listener by @heckj in #32
  • makes repo.peerId nonisolated for synchronous access by @heckj in #33
  • clear out availablePeers on terminating browser by @heckj in #34
  • Fix incorrectly setting peerId to the same value as name by @heckj in #35
  • adding logging to debug data flow in peer to peer connection by @heckj in #37
  • exposing connectionState and explicitly checking isReady with timeouts by @heckj in #38
  • rename PeerConnection to PeerConnectionInfo by @heckj in #39
  • explicit queue for connections by @heckj in #40
  • missing error capture, adds additional logging and tracing on connect… by @heckj in #41
  • adding configurable timeouts and logging by @heckj in #42
  • fixing listener check for determining pre-existing connections by @heckj in #43
  • constraining TLS to version 1.2 to allow support for private-shared-keys by @heckj in #44
  • expanding accept timeout by @heckj in #45
  • removes asyncstream handler for state updates by @heckj in #46
  • cleanup cruft now that I've got this working by @heckj in #47
  • removing all the actors … by @heckj in #51
  • fixes initializer to be non-isolated for peer to peer provider by @heckj in #52
  • Pushing more things to be synchronous by @heckj in #54
  • expand repo initializers and rework SharePolicy api by @heckj in #55
  • assembling peer to peer integration tests - 2 peers by @heckj in #56
  • observing docs for changes by @heckj in #57
  • fleshing out abstracts, rebuilding curation, and trimming types that … by @heckj in #58

New Contributors

  • @heckj made their first contribution in #7

Full Changelog: https://github.com/automerge/automerge-repo-swift/commits/0.1.0-alpha