lightyears1998/a-cycle-server

View on GitHub

Showing 6 of 8 total issues

File sync.ts has 434 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { AuthenticatedWebSocket } from "./authentication";
import {
  GoodbyeMessage,
  ControlMessage,
  DebugNodeUpdateMessage,
Severity: Minor
Found in src/socket/sync.ts - About 6 hrs to fix

Function syncModeRecentRequestMessageHandler has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export async function syncModeRecentRequestMessageHandler(
  this: SyncingWebSocket,
  message: SyncModeRecentRequestMessage
) {
  const { userId } = this.authState;
Severity: Minor
Found in src/socket/sync.ts - About 1 hr to fix

Function syncModeRecentResponseMessageHandler has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function syncModeRecentResponseMessageHandler(
  this: SyncingWebSocket,
  message: SyncModeRecentResponseMessage
) {
  const { session } = message;
Severity: Minor
Found in src/socket/sync.ts - About 1 hr to fix

Function syncModeFullMetaResponseMessageHandler has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function syncModeFullMetaResponseMessageHandler(
  this: SyncingWebSocket,
  message: SyncModeFullMetaResponseMessage
) {
  const { session } = message;
Severity: Minor
Found in src/socket/sync.ts - About 1 hr to fix

Function doSync has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export async function doSync(socket: SyncingWebSocket) {
  socket.on("message", async (data) => {
    const message = parseMessage(socket, data);
    if (!message) {
      return;
Severity: Minor
Found in src/socket/sync.ts - About 1 hr to fix

Function initSyncFromPeerNode has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function initSyncFromPeerNode(this: SyncingWebSocket) {
  const { userId, nodeUuid } = this.authState;

  this.log("Initializing synchronization from peer node.");

Severity: Minor
Found in src/socket/sync.ts - About 1 hr to fix
Severity
Category
Status
Source
Language