add prettier import plugin

This commit is contained in:
Evan
2025-03-31 13:09:27 -07:00
parent 38f6af9659
commit 8b6895d745
120 changed files with 543 additions and 690 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
import { GameRecord, GameID, GameRecordSchema } from "../core/Schemas";
import { S3 } from "@aws-sdk/client-s3";
import { GameEnv } from "../core/configuration/Config";
import { getServerConfigFromServer } from "../core/configuration/ConfigLoader";
import { GameID, GameRecord } from "../core/Schemas";
import { logger } from "./Logger";
const config = getServerConfigFromServer();
+1 -1
View File
@@ -1,6 +1,6 @@
import WebSocket from "ws";
import { ClientID } from "../core/Schemas";
import { PlayerID, Tick } from "../core/game/Game";
import { ClientID } from "../core/Schemas";
import { generateID } from "../core/Util";
export class Client {
+2 -2
View File
@@ -1,9 +1,9 @@
import { Logger } from "winston";
import { ServerConfig } from "../core/configuration/Config";
import { Difficulty, GameMapType, GameMode, GameType } from "../core/game/Game";
import { GameConfig, GameID } from "../core/Schemas";
import { Client } from "./Client";
import { GamePhase, GameServer } from "./GameServer";
import { Difficulty, GameMapType, GameMode, GameType } from "../core/game/Game";
import { Logger } from "winston";
export class GameManager {
private games: Map<GameID, GameServer> = new Map();
+3 -4
View File
@@ -1,4 +1,4 @@
import { RateLimiterMemory } from "rate-limiter-flexible";
import { Logger } from "winston";
import WebSocket from "ws";
import {
AllPlayersStats,
@@ -17,14 +17,13 @@ import {
ServerTurnMessageSchema,
Turn,
} from "../core/Schemas";
import { createGameRecord, generateID } from "../core/Util";
import { createGameRecord } from "../core/Util";
import { ServerConfig } from "../core/configuration/Config";
import { GameType } from "../core/game/Game";
import { archive } from "./Archive";
import { Client } from "./Client";
import { slog } from "./StructuredLog";
import { gatekeeper } from "./Gatekeeper";
import { Logger } from "winston";
import { slog } from "./StructuredLog";
export enum GamePhase {
Lobby = "LOBBY",
Active = "ACTIVE",
+2 -2
View File
@@ -1,9 +1,9 @@
// src/server/Security.ts
import { Request, Response, NextFunction } from "express";
import { NextFunction, Request, Response } from "express";
import fs from "fs";
import http from "http";
import path from "path";
import { fileURLToPath } from "url";
import fs from "fs";
export enum LimiterType {
Get = "get",
+8 -8
View File
@@ -1,17 +1,17 @@
import cluster from "cluster";
import http from "http";
import express from "express";
import { GameMapType, GameType, Difficulty } from "../core/game/Game";
import { generateID } from "../core/Util";
import { PseudoRandom } from "../core/PseudoRandom";
import { getServerConfigFromServer } from "../core/configuration/ConfigLoader";
import { GameConfig, GameInfo } from "../core/Schemas";
import path from "path";
import rateLimit from "express-rate-limit";
import http from "http";
import path from "path";
import { fileURLToPath } from "url";
import { getServerConfigFromServer } from "../core/configuration/ConfigLoader";
import { Difficulty, GameMapType, GameType } from "../core/game/Game";
import { PseudoRandom } from "../core/PseudoRandom";
import { GameConfig, GameInfo } from "../core/Schemas";
import { generateID } from "../core/Util";
import { gatekeeper, LimiterType } from "./Gatekeeper";
import { setupMetricsServer } from "./MasterMetrics";
import { logger } from "./Logger";
import { setupMetricsServer } from "./MasterMetrics";
const config = getServerConfigFromServer();
const readyWorkers = new Set();
+8 -10
View File
@@ -1,22 +1,20 @@
import express, { Request, Response, NextFunction } from "express";
import express, { NextFunction, Request, Response } from "express";
import rateLimit from "express-rate-limit";
import http from "http";
import { WebSocketServer } from "ws";
import path from "path";
import { fileURLToPath } from "url";
import { GameManager } from "./GameManager";
import { WebSocket, WebSocketServer } from "ws";
import { GameEnv } from "../core/configuration/Config";
import { getServerConfigFromServer } from "../core/configuration/ConfigLoader";
import { WebSocket } from "ws";
import { Client } from "./Client";
import rateLimit from "express-rate-limit";
import { RateLimiterMemory } from "rate-limiter-flexible";
import { GameConfig, GameRecord, LogSeverity } from "../core/Schemas";
import { slog } from "./StructuredLog";
import { GameType } from "../core/game/Game";
import { GameConfig, GameRecord, LogSeverity } from "../core/Schemas";
import { archive, readGameRecord } from "./Archive";
import { Client } from "./Client";
import { GameManager } from "./GameManager";
import { gatekeeper, LimiterType } from "./Gatekeeper";
import { metrics } from "./WorkerMetrics";
import { logger } from "./Logger";
import { slog } from "./StructuredLog";
import { metrics } from "./WorkerMetrics";
const config = getServerConfigFromServer();
+1 -1
View File
@@ -1,6 +1,6 @@
import promClient from "prom-client";
import { GameManager } from "./GameManager";
import { getServerConfigFromServer } from "../core/configuration/ConfigLoader";
import { GameManager } from "./GameManager";
const config = getServerConfigFromServer();
const region = config.region();
+1 -1
View File
@@ -1,4 +1,4 @@
import { Pool, PoolConfig } from "pg";
import { Pool } from "pg";
export interface SessionData {
discord_id: string;
+1 -1
View File
@@ -1,5 +1,5 @@
import { Pool, PoolClient } from "pg";
import dotenv from "dotenv";
import { Pool, PoolClient } from "pg";
import { schemas } from "./Schema";
dotenv.config();