fix: updated from 9.3.3 to 15

This commit is contained in:
2026-05-19 20:22:37 +01:00
parent 27806f438f
commit 8589c83fb8
18 changed files with 45 additions and 76 deletions
+4 -4
View File
@@ -29,9 +29,9 @@ export function getPool(): Pool {
}
// Helper function for queries - handles errors nicely
export async function query<T = any>(
export async function query<T = unknown>(
text: string,
params?: any[]
params?: unknown[]
): Promise<T[]> {
const pool = getPool();
try {
@@ -44,9 +44,9 @@ export async function query<T = any>(
}
// Helper for single row queries
export async function queryOne<T = any>(
export async function queryOne<T = unknown>(
text: string,
params?: any[]
params?: unknown[]
): Promise<T | null> {
const rows = await query<T>(text, params);
return rows.length > 0 ? rows[0] : null;
+2 -2
View File
@@ -75,11 +75,11 @@ class TelemetryBridge {
const CAR_SIZE = 1 + 64 + 64 + 64 + 4 + 4 + 1 + 2 + 4 + 4 + 2 + 1; // 211 bytes per car
while (this.buffer.length >= HEADER_SIZE) {
const server_id = this.buffer.readUInt8(0);
// UNUSED: const server_id = this.buffer.readUInt8(0);
const car_count = this.buffer.readUInt8(1);
// Updated CAR_SIZE: 1 + 64 + 64 + 64 + 12 + 4 + 4 + 1 + 2 + 4 + 4 + 2 + 1 = 227 bytes
const CAR_SIZE = 227;
// UNUSED: const CAR_SIZE = 227;
const expected_size = HEADER_SIZE + (car_count * CAR_SIZE);
if (this.buffer.length >= expected_size) {