Releases: adonisjs/transmit-client
Stable release
Nothing change since last version
Export Subscription class
Commits
Full Changelog: v0.2.1...v0.2.2
Do not try to connect subscription not already created
Commits
- fix(transmit): do not try to connect subscription not already created (54db79a)
- chore: update the readme (fd035a9)
Full Changelog: v0.2.0...v0.2.1
Overall rewrite
Breaking
We completely rewrote the API to create a simpler and more testable solution. This also introduced some nice features, like the possibility to await
subscription creation.
Now, subscriptions are self-managed. You have to create one using the transmit.subscription()
method.
const subscription = transmit.subscription('users/1')
Then, you can add as many listeners as you want for this subscription using the onMessage
method.
subscription.onMessage(() => {
console.log(`I am here!`)
})
Finally, remember to register your subscription on the server using the create()
method.
await subscription.create()
Note listeners are local only; you can add them before or after registering your subscription on the server.
Commits
- chore: migrate to release-it (011593d)
- chore: update readme (4136409)
- ci: update ga workflows (0f63f4a)
- refactor: define simpler api (45b3b9f)
- test(transmit): close server and all connections (2bfcc46)
- chore: remove useless await (89bf25e)
- test(transmit): add a few tests (ee90804)
- fix(transmit): make the unsubscribe method use lock (1bd1fc7)
- chore(transmit): make it easier to test in Node.js env (6c07a34)
- feat(transmit): do not crash if listener is async and throw (83d6dad)
Full Changelog: v0.1.6...v0.2.0
Send XSRF token when using POST request
What's Changed
- fix: MDN EventSource url by @raynirola in #1
New Contributors
- @raynirola made their first contribution in #1
Full Changelog: v0.1.5...v0.1.6
Send credentials when subscribing and unsubscribing
Full Changelog: v0.1.4...v0.1.5
Properly remove a channel from subscription lock
- fix: properly remove channel from subscription lock (3c24230)
- refactor: re-subscribe only on open connection (25a53f6)
Full Changelog: v0.1.3...v0.1.4
Re-subscribe when the connection is lost
- fix: re-subscribe when connection is lost (c67a763)
Full Changelog: v0.1.2...v0.1.3
Add some hooks and way to get the list of subscription
Full Changelog: 0.0.5...v0.1.0
Make the UID field public
Full Changelog: 0.0.4...0.0.5