Fix multiple connect events and add leave method

- Add hasConnected flag to prevent duplicate connect events
- Add leave() method to RondevuConnection to end sessions
- Add leave() API method to call /leave endpoint
- Version 0.3.5

The connect event will now only fire once per connection,
fixing the issue where it could fire multiple times as the
WebRTC connectionState transitions.

The leave() method allows either peer to end the session
by deleting the offer from the server.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-13 00:05:29 +01:00
parent 2f47107018
commit e1ca8e1c16
4 changed files with 42 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@xtr-dev/rondevu-client",
"version": "0.3.4",
"version": "0.3.5",
"description": "TypeScript client for Rondevu peer signaling and discovery server",
"type": "module",
"main": "dist/index.js",