x-cubed / event-store-client

JS client library for connecting to Event Store over TCP/IP
The Unlicense
71 stars 24 forks source link

Feature/3 catch up subscriptions #10

Closed ZBlocker655 closed 8 years ago

ZBlocker655 commented 8 years ago

Pertaining to issue #3, I have ported the catch-up subscription functionality from the official Event Store .NET client.

As of now only single-stream catch-up subscriptions are implemented, not all-event catch-up subscriptions, primarily because the subscribeToAll functionality seems to be missing from the Connection class. As I don't need subscribe-to-all right now, I've chosen not to implement it for this pull request.

I added one (tiny) additional package: the argument-validator package - just for some quick argument validation. That package has no dependencies of its own; it's very lightweight.

In addition to the new code, I have updated the README file and the TypeScript definitions.

There are some new Mocha tests in the testing area, all working on a bare-bones installation of Event Store. The tests create and destroy randomly named streams. As part of adding the new test code, I've centralized some of the common test functionality and adding quick utilities for generating and writing test events.

x-cubed commented 8 years ago

Awesome, tests and docs included!

Thanks for the contribution!