Rename RondevuClient to RondevuAPI and integrate into Rondevu class

- Renamed RondevuClient class to RondevuAPI for clarity
- Integrated API as public property `api` on Rondevu class
- Updated all internal references from `client` to `api`
- Updated all example code in documentation
- Removed recursive publish script from package.json
- Bumped version to 0.2.1

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-12 21:51:11 +01:00
parent 35dc5aee36
commit a893c7d040
5 changed files with 36 additions and 37 deletions

View File

@@ -1,5 +1,5 @@
import { EventEmitter } from './event-emitter';
import { RondevuClient } from './client';
import { RondevuAPI } from './client';
import { RondevuConnectionParams } from './types';
/**
@@ -12,7 +12,7 @@ export class RondevuConnection extends EventEmitter {
readonly remotePeerId: string;
private pc: RTCPeerConnection;
private client: RondevuClient;
private client: RondevuAPI;
private localPeerId: string;
private dataChannels: Map<string, RTCDataChannel>;
private pollingInterval?: ReturnType<typeof setInterval>;
@@ -22,7 +22,7 @@ export class RondevuConnection extends EventEmitter {
private isPolling: boolean = false;
private isClosed: boolean = false;
constructor(params: RondevuConnectionParams, client: RondevuClient) {
constructor(params: RondevuConnectionParams, client: RondevuAPI) {
super();
this.id = params.id;
this.topic = params.topic;