mirror of
https://github.com/xtr-dev/rondevu-client.git
synced 2025-12-15 21:33:23 +00:00
Add DX improvements and EventEmitter support (v0.18.1)
This release introduces several developer experience improvements: Breaking Changes: - Add EventEmitter support - Rondevu now extends EventEmitter - Consolidate discovery methods into findService() (getService, discoverService, discoverServices methods still exist but findService is the new unified API) New Features: - EventEmitter lifecycle events: - offer:created (offerId, serviceFqn) - offer:answered (offerId, peerUsername) - connection:opened (offerId, dataChannel) - connection:closed (offerId) - ice:candidate:local (offerId, candidate) - locally generated ICE - ice:candidate:remote (offerId, candidate, role) - remote ICE from server - error (error, context) - Unified findService() method with modes: - 'direct' - direct lookup by FQN with username - 'random' - random discovery without username - 'paginated' - paginated results with limit/offset - Typed error classes for better error handling: - RondevuError (base class with context) - NetworkError (network/API failures) - ValidationError (input validation) - ConnectionError (WebRTC connection issues) - Convenience methods: - getOfferCount() - get active offer count - isConnected(offerId) - check connection status - disconnectAll() - close all connections - getServiceStatus() - get service state Type Exports: - Export ActiveOffer interface for getActiveOffers() typing - Export FindServiceOptions, ServiceResult, PaginatedServiceResult - Export all error classes Dependencies: - Add @types/node for EventEmitter support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.39.1",
|
||||
"@types/node": "^25.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^8.48.1",
|
||||
"@typescript-eslint/parser": "^8.48.1",
|
||||
"eslint": "^9.39.1",
|
||||
|
||||
Reference in New Issue
Block a user