mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
refactor: remove unused/deprecated code and legacy socket events
This commit is contained in:
@@ -451,10 +451,8 @@ export function registerCliHandlers(socket: SocketWithData, deps: CliHandlersDep
|
||||
}
|
||||
|
||||
socket.on('machine-update-metadata', handleMachineMetadataUpdate)
|
||||
socket.on('update-machine-metadata', handleMachineMetadataUpdate)
|
||||
|
||||
socket.on('machine-update-state', handleMachineStateUpdate)
|
||||
socket.on('update-machine-state', handleMachineStateUpdate)
|
||||
|
||||
socket.on('ping', (callback: () => void) => {
|
||||
callback()
|
||||
|
||||
@@ -18,7 +18,6 @@ import { MessageService } from './messageService'
|
||||
import { RpcGateway, type RpcCommandResponse, type RpcPathExistsResponse, type RpcReadFileResponse } from './rpcGateway'
|
||||
import { SessionCache } from './sessionCache'
|
||||
|
||||
export type ConnectionStatus = 'disconnected' | 'connected'
|
||||
export type { Session, SyncEvent } from '@hapi/protocol/types'
|
||||
export type { Machine } from './machineCache'
|
||||
export type { SyncEventListener } from './eventPublisher'
|
||||
@@ -30,7 +29,6 @@ export class SyncEngine {
|
||||
private readonly machineCache: MachineCache
|
||||
private readonly messageService: MessageService
|
||||
private readonly rpcGateway: RpcGateway
|
||||
private connectionStatus: ConnectionStatus = 'connected'
|
||||
private inactivityTimer: NodeJS.Timeout | null = null
|
||||
|
||||
constructor(
|
||||
@@ -55,10 +53,6 @@ export class SyncEngine {
|
||||
}
|
||||
}
|
||||
|
||||
start(): Promise<void> {
|
||||
return Promise.resolve()
|
||||
}
|
||||
|
||||
subscribe(listener: SyncEventListener): () => void {
|
||||
return this.eventPublisher.subscribe(listener)
|
||||
}
|
||||
@@ -76,10 +70,6 @@ export class SyncEngine {
|
||||
return undefined
|
||||
}
|
||||
|
||||
getConnectionStatus(): ConnectionStatus {
|
||||
return this.connectionStatus
|
||||
}
|
||||
|
||||
getSessions(): Session[] {
|
||||
return this.sessionCache.getSessions()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user