CI / Build & Test (push) Successful in 3m19s
- Add unit tests (hostname-validator, TLDs, payload-schemas) and integration tests for message handler registry - Refactor native host message router into handler registry (handlers/state, tunnels, ssh, rdp, backup, ca, connections) - Add ESLint config and npm test + lint steps in CI - Dashboard: visibility-based refresh pause, configurable refresh interval (2s/5s/10s/paused) - Accessibility: ARIA on nav and modals, focus trap and restore, prefers-reduced-motion - Empty states: primary action buttons for virtual hosts, servers, service tunnels - Native host rate limiting for backup and CA operations; update SECURITY.md - CONTRIBUTING: "Adding a new dashboard page", dev workflow; add npm run dev script
34 lines
972 B
JavaScript
34 lines
972 B
JavaScript
/**
|
|
* Handlers for RDP/VNC sessions.
|
|
* Context: rdpManager, debugLog
|
|
*/
|
|
|
|
function register(deps) {
|
|
const { rdpManager, debugLog } = deps;
|
|
return [
|
|
{
|
|
type: 'startRdpSession',
|
|
handle: async (payload, reply) => {
|
|
debugLog('startRdpSession: type=', payload.type, 'label=', payload.label);
|
|
const result = await rdpManager.startSession(payload);
|
|
debugLog('startRdpSession: result=', JSON.stringify({ ok: result.ok, sessionId: result.sessionId, wsPort: result.wsPort }));
|
|
reply(result);
|
|
}
|
|
},
|
|
{
|
|
type: 'stopRdpSession',
|
|
handle: async (payload, reply) => {
|
|
debugLog('stopRdpSession: sessionId=', payload.sessionId);
|
|
const result = await rdpManager.stopSession(payload);
|
|
reply(result);
|
|
}
|
|
},
|
|
{
|
|
type: 'getRdpSessions',
|
|
handle: async (payload, reply) => reply({ ok: true, sessions: rdpManager.getSessions() })
|
|
}
|
|
];
|
|
}
|
|
|
|
module.exports = { register };
|