playing wiith database Blocked Users

This commit is contained in:
NigeParis 2025-12-01 18:46:38 +01:00 committed by apetitco
parent 6a53c5266f
commit 05a9c58de5
13 changed files with 291 additions and 168 deletions

View file

@ -20,8 +20,8 @@
"fastify-plugin": "^5.1.0",
"joi": "^18.0.2",
"otp": "^1.1.2",
"typebox": "^1.0.56",
"uuidv7": "^1.0.2"
"typebox": "^1.0.59",
"uuidv7": "^1.1.0"
},
"devDependencies": {
"@types/better-sqlite3": "^7.6.13",

View file

@ -2,7 +2,6 @@ import { isNullish } from '@shared/utils';
import type { Database } from './_base';
import { UserId } from './user';
// never use this directly
// describe every function in the object
export interface IBlockedDb extends Database {
@ -10,6 +9,8 @@ export interface IBlockedDb extends Database {
addBlockedUserFor(id: UserId, blocked: UserId): void,
removeBlockedUserFor(id: UserId, blocked: UserId): void,
unblockAllUserFor(id: UserId): void,
getAllBlockedUsers(this: IBlockedDb): BlockedData[] | undefined,
};
export const BlockedImpl: Omit<IBlockedDb, keyof Database> = {
@ -28,6 +29,23 @@ export const BlockedImpl: Omit<IBlockedDb, keyof Database> = {
removeBlockedUserFor(this: IBlockedDb, id: UserId, blocked: UserId): void {
this.prepare('DELETE FROM blocked WHERE user = @id AND blocked = @blocked').run({ id, blocked });
},
/**
* Get all blocked user
*
* @param
*
* @returns The list of users if it exists, undefined otherwise
*/
getAllBlockedUsers(this: IBlockedDb): BlockedData[] {
const rows = this.prepare('SELECT * FROM blocked').all() as Partial<BlockedData>[];
return rows
.map(row => blockedFromRow(row))
.filter((u): u is BlockedData => u !== undefined);
},
};
export type BlockedId = number & { readonly __brand: unique symbol };
@ -46,6 +64,7 @@ export type BlockedData = {
* @returns The blocked if it exists, undefined otherwise
*/
export function blockedFromRow(row?: Partial<BlockedData>): BlockedData | undefined {
console.log('HELLO ?????', row);
if (isNullish(row)) return undefined;
if (isNullish(row.id)) return undefined;
if (isNullish(row.user)) return undefined;

View file

@ -18,6 +18,8 @@ export interface IUserDb extends Database {
ensureUserOtpSecret(id: UserId): string | undefined,
deleteUserOtpSecret(id: UserId): void,
getAllUserFromProvider(provider: string): User[] | undefined,
getAllUsers(this: IUserDb): User[] | undefined,
};
export const UserImpl: Omit<IUserDb, keyof Database> = {
@ -36,6 +38,15 @@ export const UserImpl: Omit<IUserDb, keyof Database> = {
);
},
getAllUsers(this: IUserDb): User[] {
const rows = this.prepare('SELECT * FROM user').all() as Partial<User>[];
return rows
.map(row => userFromRow(row))
.filter((u): u is User => u !== undefined);
},
/**
* Get a user from a raw [UserId]
*

View file

@ -21,18 +21,18 @@
"@fastify/autoload": "^6.3.1",
"@fastify/formbody": "^8.0.2",
"@fastify/multipart": "^9.3.0",
"@fastify/sensible": "^6.0.3",
"@fastify/sensible": "^6.0.4",
"@fastify/static": "^8.3.0",
"confbox": "^0.2.2",
"fastify": "^5.6.2",
"fastify-cli": "^7.4.1",
"fastify-plugin": "^5.1.0",
"typebox": "^1.0.56"
"typebox": "^1.0.59"
},
"devDependencies": {
"@types/node": "^22.19.1",
"rollup-plugin-node-externals": "^8.1.2",
"vite": "^7.2.4",
"vite": "^7.2.6",
"vite-tsconfig-paths": "^5.1.4"
}
}

View file

@ -21,18 +21,18 @@
"@fastify/autoload": "^6.3.1",
"@fastify/formbody": "^8.0.2",
"@fastify/multipart": "^9.3.0",
"@fastify/sensible": "^6.0.3",
"@fastify/sensible": "^6.0.4",
"@fastify/static": "^8.3.0",
"@fastify/websocket": "^11.2.0",
"@sinclair/typebox": "^0.34.41",
"fastify": "^5.6.2",
"fastify-plugin": "^5.1.0",
"socket.io": "^4.8.1"
"socket.io": "^4.8.1",
"typebox": "^1.0.59"
},
"devDependencies": {
"@types/node": "^22.19.1",
"rollup-plugin-node-externals": "^8.1.2",
"vite": "^7.2.4",
"vite": "^7.2.6",
"vite-tsconfig-paths": "^5.1.4"
}
}

View file

@ -1,6 +1,27 @@
import { FastifyPluginAsync } from 'fastify';
import { MakeStaticResponse, typeResponse } from '@shared/utils';
import { Type } from '@sinclair/typebox';
import { Type } from 'typebox';
import { UserId } from '@shared/database/mixin/user';
import { Server } from 'socket.io';
// colors for console.log
export const color = {
red: '\x1b[31m',
green: '\x1b[32m',
yellow: '\x1b[33m',
blue: '\x1b[34m',
reset: '\x1b[0m',
};
// Global map of clients
// key = socket, value = clientname
interface ClientInfo {
user: string;
lastSeen: number;
}
const clientChat = new Map<string, ClientInfo>();
export const ChatRes = {
200: typeResponse('success', 'chat.success', {
@ -12,6 +33,56 @@ export const ChatRes = {
export type ChatResType = MakeStaticResponse<typeof ChatRes>;
function connectedUser(io: Server | undefined, targetSocketId?: string): number {
let count = 0;
// Track unique usernames (avoid duplicates)
const seenUsers = new Set<string>();
for (const [socketId, info] of clientChat) {
// Validate entry
if (!info || typeof info.user !== "string" || info.user.trim() === "") {
clientChat.delete(socketId);
continue;
}
const username = info.user;
// Validate socket exists if io is passed
if (io) {
const socket = io.sockets.sockets.get(socketId);
// Remove disconnected sockets
if (!socket || socket.disconnected) {
clientChat.delete(socketId);
continue;
}
}
// Skip duplicates
if (seenUsers.has(username))
continue;
seenUsers.add(username);
count++;
// Send to target only
if (io && targetSocketId) {
io.to(targetSocketId).emit("listBud", username);
}
console.log(color.yellow, "Client:", color.reset, username);
console.log(color.yellow, "Socket ID:", color.reset, socketId);
}
return count;
}
const route: FastifyPluginAsync = async (fastify): Promise<void> => {
fastify.get(
'/api/chat/test',
@ -23,8 +94,25 @@ const route: FastifyPluginAsync = async (fastify): Promise<void> => {
config: { requireAuth: true },
},
async (req, res) => {
// console.log('/api/chat/test called =================>');
res.makeResponse(200, 'success', 'CCChat.success', { name: 'My_namw', 'id': req.authUser!.id, guest: false });
let users = fastify.db.getAllUsers();
console.log("ALL USERS EVER CONNECTED:", users);
if (!users) return;
for (const user of users) {
console.log(color.yellow, "USER:", user.name);
}
// const usersBlocked = fastify.db.getAllBlockedUsers();
// console.log(color.red, "ALL BLOCKED USERS:", usersBlocked);
fastify.db.addBlockedUserFor(users[0].id, users[1].id)
let usersBlocked2;
usersBlocked2 = fastify.db.getAllBlockedUsers();
console.log(color.green, "ALL BLOCKED USERS:", usersBlocked2);
res.makeResponse(200, 'success', 'CCChat.success', { name: 'name', 'id': req.authUser!.id, guest: false });
},
);
};

View file

@ -20,7 +20,7 @@
"@fastify/autoload": "^6.3.1",
"@fastify/formbody": "^8.0.2",
"@fastify/multipart": "^9.3.0",
"@fastify/sensible": "^6.0.3",
"@fastify/sensible": "^6.0.4",
"@fastify/static": "^8.3.0",
"fastify": "^5.6.2",
"fastify-cli": "^7.4.1",
@ -31,7 +31,7 @@
"devDependencies": {
"@types/node": "^22.19.1",
"rollup-plugin-node-externals": "^8.1.2",
"vite": "^7.2.4",
"vite": "^7.2.6",
"vite-tsconfig-paths": "^5.1.4"
}
}

View file

@ -33,10 +33,10 @@
"openapi-typescript": "^7.10.1",
"typescript": "^5.9.3",
"typescript-eslint": "^8.48.0",
"vite": "^7.2.4"
"vite": "^7.2.6"
},
"dependencies": {
"@redocly/cli": "^2.12.0",
"@redocly/cli": "^2.12.1",
"bindings": "^1.5.0"
}
}

266
src/pnpm-lock.yaml generated
View file

@ -9,8 +9,8 @@ importers:
.:
dependencies:
'@redocly/cli':
specifier: ^2.12.0
version: 2.12.0(@opentelemetry/api@1.9.0)(ajv@8.17.1)(core-js@3.47.0)
specifier: ^2.12.1
version: 2.12.1(@opentelemetry/api@1.9.0)(ajv@8.17.1)(core-js@3.47.0)
bindings:
specifier: ^1.5.0
version: 1.5.0
@ -49,8 +49,8 @@ importers:
specifier: ^8.48.0
version: 8.48.0(eslint@9.39.1)(typescript@5.9.3)
vite:
specifier: ^7.2.4
version: 7.2.4(@types/node@24.10.1)(yaml@2.8.1)
specifier: ^7.2.6
version: 7.2.6(@types/node@24.10.1)(yaml@2.8.2)
'@shared':
dependencies:
@ -88,11 +88,11 @@ importers:
specifier: ^1.1.2
version: 1.1.2
typebox:
specifier: ^1.0.56
version: 1.0.56
specifier: ^1.0.59
version: 1.0.59
uuidv7:
specifier: ^1.0.2
version: 1.0.2
specifier: ^1.1.0
version: 1.1.0
devDependencies:
'@types/better-sqlite3':
specifier: ^7.6.13
@ -113,8 +113,8 @@ importers:
specifier: ^9.3.0
version: 9.3.0
'@fastify/sensible':
specifier: ^6.0.3
version: 6.0.3
specifier: ^6.0.4
version: 6.0.4
'@fastify/static':
specifier: ^8.3.0
version: 8.3.0
@ -131,8 +131,8 @@ importers:
specifier: ^5.1.0
version: 5.1.0
typebox:
specifier: ^1.0.56
version: 1.0.56
specifier: ^1.0.59
version: 1.0.59
devDependencies:
'@types/node':
specifier: ^22.19.1
@ -141,11 +141,11 @@ importers:
specifier: ^8.1.2
version: 8.1.2(rollup@4.53.3)
vite:
specifier: ^7.2.4
version: 7.2.4(@types/node@22.19.1)(yaml@2.8.1)
specifier: ^7.2.6
version: 7.2.6(@types/node@22.19.1)(yaml@2.8.2)
vite-tsconfig-paths:
specifier: ^5.1.4
version: 5.1.4(typescript@5.9.3)(vite@7.2.4(@types/node@22.19.1)(yaml@2.8.1))
version: 5.1.4(typescript@5.9.3)(vite@7.2.6(@types/node@22.19.1)(yaml@2.8.2))
chat:
dependencies:
@ -159,17 +159,14 @@ importers:
specifier: ^9.3.0
version: 9.3.0
'@fastify/sensible':
specifier: ^6.0.3
version: 6.0.3
specifier: ^6.0.4
version: 6.0.4
'@fastify/static':
specifier: ^8.3.0
version: 8.3.0
'@fastify/websocket':
specifier: ^11.2.0
version: 11.2.0
'@sinclair/typebox':
specifier: ^0.34.41
version: 0.34.41
fastify:
specifier: ^5.6.2
version: 5.6.2
@ -179,6 +176,9 @@ importers:
socket.io:
specifier: ^4.8.1
version: 4.8.1
typebox:
specifier: ^1.0.59
version: 1.0.59
devDependencies:
'@types/node':
specifier: ^22.19.1
@ -187,11 +187,11 @@ importers:
specifier: ^8.1.2
version: 8.1.2(rollup@4.53.3)
vite:
specifier: ^7.2.4
version: 7.2.4(@types/node@22.19.1)(yaml@2.8.1)
specifier: ^7.2.6
version: 7.2.6(@types/node@22.19.1)(yaml@2.8.2)
vite-tsconfig-paths:
specifier: ^5.1.4
version: 5.1.4(typescript@5.9.3)(vite@7.2.4(@types/node@22.19.1)(yaml@2.8.1))
version: 5.1.4(typescript@5.9.3)(vite@7.2.6(@types/node@22.19.1)(yaml@2.8.2))
icons:
dependencies:
@ -205,8 +205,8 @@ importers:
specifier: ^9.3.0
version: 9.3.0
'@fastify/sensible':
specifier: ^6.0.3
version: 6.0.3
specifier: ^6.0.4
version: 6.0.4
'@fastify/static':
specifier: ^8.3.0
version: 8.3.0
@ -233,11 +233,11 @@ importers:
specifier: ^8.1.2
version: 8.1.2(rollup@4.53.3)
vite:
specifier: ^7.2.4
version: 7.2.4(@types/node@22.19.1)(yaml@2.8.1)
specifier: ^7.2.6
version: 7.2.6(@types/node@22.19.1)(yaml@2.8.2)
vite-tsconfig-paths:
specifier: ^5.1.4
version: 5.1.4(typescript@5.9.3)(vite@7.2.4(@types/node@22.19.1)(yaml@2.8.1))
version: 5.1.4(typescript@5.9.3)(vite@7.2.6(@types/node@22.19.1)(yaml@2.8.2))
user:
dependencies:
@ -251,8 +251,8 @@ importers:
specifier: ^9.3.0
version: 9.3.0
'@fastify/sensible':
specifier: ^6.0.3
version: 6.0.3
specifier: ^6.0.4
version: 6.0.4
'@fastify/static':
specifier: ^8.3.0
version: 8.3.0
@ -266,8 +266,8 @@ importers:
specifier: ^5.1.0
version: 5.1.0
typebox:
specifier: ^1.0.56
version: 1.0.56
specifier: ^1.0.59
version: 1.0.59
devDependencies:
'@types/node':
specifier: ^22.19.1
@ -276,11 +276,11 @@ importers:
specifier: ^8.1.2
version: 8.1.2(rollup@4.53.3)
vite:
specifier: ^7.2.4
version: 7.2.4(@types/node@22.19.1)(yaml@2.8.1)
specifier: ^7.2.6
version: 7.2.6(@types/node@22.19.1)(yaml@2.8.2)
vite-tsconfig-paths:
specifier: ^5.1.4
version: 5.1.4(typescript@5.9.3)(vite@7.2.4(@types/node@22.19.1)(yaml@2.8.1))
version: 5.1.4(typescript@5.9.3)(vite@7.2.6(@types/node@22.19.1)(yaml@2.8.2))
packages:
@ -489,8 +489,8 @@ packages:
resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/eslintrc@3.3.1':
resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==}
'@eslint/eslintrc@3.3.3':
resolution: {integrity: sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/js@9.39.1':
@ -557,8 +557,8 @@ packages:
'@fastify/send@4.1.0':
resolution: {integrity: sha512-TMYeQLCBSy2TOFmV95hQWkiTYgC/SEx7vMdV+wnZVX4tt8VBLKzmH8vV9OzJehV0+XBfg+WxPMt5wp+JBUKsVw==}
'@fastify/sensible@6.0.3':
resolution: {integrity: sha512-Iyn8698hp/e5+v8SNBBruTa7UfrMEP52R16dc9jMpqSyEcPsvWFQo+R6WwHCUnJiLIsuci2ZoEZ7ilrSSCPIVg==}
'@fastify/sensible@6.0.4':
resolution: {integrity: sha512-1vxcCUlPMew6WroK8fq+LVOwbsLtX+lmuRuqpcp6eYqu6vmkLwbKTdBWAZwbeaSgCfW4tzUpTIHLLvTiQQ1BwQ==}
'@fastify/static@8.3.0':
resolution: {integrity: sha512-yKxviR5PH1OKNnisIzZKmgZSus0r2OZb8qCSbqmw34aolT4g3UlzYfeBRym+HJ1J471CR8e2ldNub4PubD1coA==}
@ -940,14 +940,11 @@ packages:
'@protobufjs/utf8@1.1.0':
resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==}
'@redocly/ajv@8.11.4':
resolution: {integrity: sha512-77MhyFgZ1zGMwtCpqsk532SJEc3IJmSOXKTCeWoMTAvPnQOkuOgxEip1n5pG5YX1IzCTJ4kCvPKr8xYyzWFdhg==}
'@redocly/ajv@8.17.1':
resolution: {integrity: sha512-EDtsGZS964mf9zAUXAl9Ew16eYbeyAFWhsPr0fX6oaJxgd8rApYlPBf0joyhnUHz88WxrigyFtTaqqzXNzPgqw==}
'@redocly/cli@2.12.0':
resolution: {integrity: sha512-/q8RnBe+Duo+XYFCG8LnaD0kroGZ8MoS6575Xq59tCgjaCL16F+pZZ75xNBU2oXfEypJClNz/6ilc2G0q1+tlw==}
'@redocly/cli@2.12.1':
resolution: {integrity: sha512-XGD28QjjZEzN+J9WOROzw4fHNi+Fyw/gCyDZDgI4nX4j9gEBT1PcxN75wWpMoDGHKAUj8ghrhMHtfQoUuR90zg==}
engines: {node: '>=22.12.0 || >=20.19.0 <21.0.0', npm: '>=10'}
hasBin: true
@ -961,12 +958,12 @@ packages:
resolution: {integrity: sha512-0EbE8LRbkogtcCXU7liAyC00n9uNG9hJ+eMyHFdUsy9lB/WGqnEBgwjA9q2cyzAVcdTkQqTBBU1XePNnN3OijA==}
engines: {node: '>=18.17.0', npm: '>=9.5.0'}
'@redocly/openapi-core@2.12.0':
resolution: {integrity: sha512-RsVwmRD0KhyJbR8acIeU98ce6N+/YCuLJf6IGN+2SOsbwnDhnI5MG0TFV9D7URK/ukEewaNA701dVYsoP1VtRQ==}
'@redocly/openapi-core@2.12.1':
resolution: {integrity: sha512-xMlKf4dnZsxP3JYBNZFsMNBJqVxWlwLuyGLhGc36hXw50YOla1UjrVZ5psIyzLXgUPI3QJDA1XmGcJ8rcex/ow==}
engines: {node: '>=22.12.0 || >=20.19.0 <21.0.0', npm: '>=10'}
'@redocly/respect-core@2.12.0':
resolution: {integrity: sha512-mrYrfE81shSRS96ygXaRiSithV4Fe4Y7XlSYLSTfM8Lo3YAz7Geirg7HZ5fNFsI+hdW05ZuQewqpKL8XLwaAeA==}
'@redocly/respect-core@2.12.1':
resolution: {integrity: sha512-ADm+JMHWGYeOwzdGEQ8CYKjmMBLU0ycZTwJbCkQsUulXSNkNA7GzA8lrMM2+I8cPMRk25G5PmtfAR7U+a0o1ew==}
engines: {node: '>=22.12.0 || >=20.19.0 <21.0.0', npm: '>=10'}
'@rollup/rollup-android-arm-eabi@4.53.3':
@ -1079,9 +1076,6 @@ packages:
cpu: [x64]
os: [win32]
'@sinclair/typebox@0.34.41':
resolution: {integrity: sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==}
'@socket.io/component-emitter@3.1.2':
resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==}
@ -1209,14 +1203,6 @@ packages:
resolution: {integrity: sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==}
engines: {node: '>= 14'}
ajv-formats@2.1.1:
resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==}
peerDependencies:
ajv: ^8.0.0
peerDependenciesMeta:
ajv:
optional: true
ajv-formats@3.0.1:
resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==}
peerDependencies:
@ -1479,6 +1465,10 @@ packages:
resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==}
engines: {node: '>= 0.6'}
content-type@1.0.5:
resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==}
engines: {node: '>= 0.6'}
cookie@0.7.2:
resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==}
engines: {node: '>= 0.6'}
@ -1726,8 +1716,8 @@ packages:
resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==}
engines: {node: '>=6'}
fast-copy@3.0.2:
resolution: {integrity: sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ==}
fast-copy@4.0.0:
resolution: {integrity: sha512-/oA0gx1xyXE9R2YlV4FXwZJXngFdm9Du0zN8FhY38jnLkhp1u35h6bCyKgRhlsA6C9I+1vfXE4KISdt7xc6M9w==}
fast-decode-uri-component@1.0.1:
resolution: {integrity: sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==}
@ -2019,8 +2009,8 @@ packages:
resolution: {integrity: sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==}
engines: {node: '>= 12'}
ipaddr.js@2.2.0:
resolution: {integrity: sha512-Ag3wB2o37wslZS19hZqorUnrnzSkpOVy+IiiDEiTqNubEYpYuHWIf6K4psgN2ZWKExS4xhVCrRVfb/wfW8fWJA==}
ipaddr.js@2.3.0:
resolution: {integrity: sha512-Zv/pA+ciVFbCSBBjGfaKUya/CcGmUHzTydLMaTwrUUEM2DIEO3iZvueGxmacvmN50fGpGVKeTXpb2LcYQxeVdg==}
engines: {node: '>= 10'}
is-binary-path@2.1.0:
@ -2187,8 +2177,8 @@ packages:
resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==}
hasBin: true
lru-cache@11.2.2:
resolution: {integrity: sha512-F9ODfyqML2coTIsQpSkRHnLSZMtkU8Q+mSfcaIyKwy58u+8k5nvAYeiNhsyMARvzNcXJ9QfWVrcPsC9e9rAxtg==}
lru-cache@11.2.4:
resolution: {integrity: sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==}
engines: {node: 20 || >=22}
lru-cache@7.18.3:
@ -2213,9 +2203,9 @@ packages:
resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==}
engines: {node: '>= 0.4'}
media-typer@0.3.0:
resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==}
engines: {node: '>= 0.6'}
media-typer@1.1.0:
resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==}
engines: {node: '>= 0.8'}
micromatch@4.0.8:
resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==}
@ -2225,10 +2215,18 @@ packages:
resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==}
engines: {node: '>= 0.6'}
mime-db@1.54.0:
resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==}
engines: {node: '>= 0.6'}
mime-types@2.1.35:
resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==}
engines: {node: '>= 0.6'}
mime-types@3.0.2:
resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==}
engines: {node: '>=18'}
mime@3.0.0:
resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==}
engines: {node: '>=10.0.0'}
@ -2521,8 +2519,11 @@ packages:
pino-abstract-transport@2.0.0:
resolution: {integrity: sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==}
pino-pretty@13.1.2:
resolution: {integrity: sha512-3cN0tCakkT4f3zo9RXDIhy6GTvtYD6bK4CRBLN9j3E/ePqN1tugAXD5rGVfoChW6s0hiek+eyYlLNqc/BG7vBQ==}
pino-abstract-transport@3.0.0:
resolution: {integrity: sha512-wlfUczU+n7Hy/Ha5j9a/gZNy7We5+cXp8YL+X+PG8S0KXxw7n/JXA3c46Y0zQznIJ83URJiwy7Lh56WLokNuxg==}
pino-pretty@13.1.3:
resolution: {integrity: sha512-ttXRkkOz6WWC95KeY9+xxWL6AtImwbyMHrL1mSwqwW9u+vLp/WIElvHvCSDg0xO/Dzrggz1zv3rN5ovTRVowKg==}
hasBin: true
pino-std-serializers@7.0.0:
@ -3021,12 +3022,12 @@ packages:
resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==}
engines: {node: '>=16'}
type-is@1.6.18:
resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==}
type-is@2.0.1:
resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==}
engines: {node: '>= 0.6'}
typebox@1.0.56:
resolution: {integrity: sha512-KMd1DJnIRqLUzAicpFmGqgmt+/IePCEmT/Jtywyyyn0hK6+dupQnxm7OAIn/cL/vu22jKi1XvDjDhrpatZ46kA==}
typebox@1.0.59:
resolution: {integrity: sha512-D8pTcn4yPzUb34OWFyPVITP1fMZjJXV5n7tT5ss/BxHSnzfuMK4rQEFunpk1UOwq9lMCOed2BJ3GXGoIBKl7Rw==}
typescript-eslint@8.48.0:
resolution: {integrity: sha512-fcKOvQD9GUn3Xw63EgiDqhvWJ5jsyZUaekl3KVpGsDJnN46WJTe3jWxtQP9lMZm1LJNkFLlTaWAxK2vUQR+cqw==}
@ -3071,9 +3072,6 @@ packages:
resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}
engines: {node: '>= 0.8'}
uri-js-replace@1.0.1:
resolution: {integrity: sha512-W+C9NWNLFOoBI2QWDp4UT9pv65r2w5Cx+3sTYFvtMdDBxkKt1syCqsUdSFAChbEe1uK5TfS04wt/nGwmaeIQ0g==}
uri-js@4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
@ -3088,8 +3086,8 @@ packages:
util-deprecate@1.0.2:
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
uuidv7@1.0.2:
resolution: {integrity: sha512-8JQkH4ooXnm1JCIhqTMbtmdnYEn6oKukBxHn1Ic9878jMkL7daTI7anTExfY18VRCX7tcdn5quzvCb6EWrR8PA==}
uuidv7@1.1.0:
resolution: {integrity: sha512-2VNnOC0+XQlwogChUDzy6pe8GQEys9QFZBGOh54l6qVfwoCUwwRvk7rDTgaIsRgsF5GFa5oiNg8LqXE3jofBBg==}
hasBin: true
vary@1.1.2:
@ -3104,8 +3102,8 @@ packages:
vite:
optional: true
vite@7.2.4:
resolution: {integrity: sha512-NL8jTlbo0Tn4dUEXEsUg8KeyG/Lkmc4Fnzb8JXN/Ykm9G4HNImjtABMJgkQoVjOBN/j2WAwDTRytdqJbZsah7w==}
vite@7.2.6:
resolution: {integrity: sha512-tI2l/nFHC5rLh7+5+o7QjKjSR04ivXDF4jcgV0f/bTQ+OJiITy5S6gaynVsEM+7RqzufMnVbIon6Sr5x1SDYaQ==}
engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true
peerDependencies:
@ -3238,8 +3236,8 @@ packages:
resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==}
engines: {node: '>= 6'}
yaml@2.8.1:
resolution: {integrity: sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==}
yaml@2.8.2:
resolution: {integrity: sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==}
engines: {node: '>= 14.6'}
hasBin: true
@ -3395,7 +3393,7 @@ snapshots:
dependencies:
'@types/json-schema': 7.0.15
'@eslint/eslintrc@3.3.1':
'@eslint/eslintrc@3.3.3':
dependencies:
ajv: 6.12.6
debug: 4.4.3(supports-color@10.2.2)
@ -3477,7 +3475,7 @@ snapshots:
'@fastify/proxy-addr@5.1.0':
dependencies:
'@fastify/forwarded': 3.0.1
ipaddr.js: 2.2.0
ipaddr.js: 2.3.0
'@fastify/send@4.1.0':
dependencies:
@ -3487,14 +3485,14 @@ snapshots:
http-errors: 2.0.1
mime: 3.0.0
'@fastify/sensible@6.0.3':
'@fastify/sensible@6.0.4':
dependencies:
'@lukeed/ms': 2.0.2
dequal: 2.0.3
fastify-plugin: 5.1.0
forwarded: 0.2.0
http-errors: 2.0.1
type-is: 1.6.18
type-is: 2.0.1
vary: 1.1.2
'@fastify/static@8.3.0':
@ -3512,7 +3510,7 @@ snapshots:
fastify-plugin: 5.1.0
openapi-types: 12.1.3
rfdc: 1.4.1
yaml: 2.8.1
yaml: 2.8.2
'@fastify/swagger@9.6.1':
dependencies:
@ -3520,7 +3518,7 @@ snapshots:
json-schema-resolver: 3.0.0
openapi-types: 12.1.3
rfdc: 1.4.1
yaml: 2.8.1
yaml: 2.8.2
transitivePeerDependencies:
- supports-color
@ -3859,13 +3857,6 @@ snapshots:
'@protobufjs/utf8@1.1.0': {}
'@redocly/ajv@8.11.4':
dependencies:
fast-deep-equal: 3.1.3
json-schema-traverse: 1.0.0
require-from-string: 2.0.2
uri-js-replace: 1.0.1
'@redocly/ajv@8.17.1':
dependencies:
fast-deep-equal: 3.1.3
@ -3873,14 +3864,14 @@ snapshots:
json-schema-traverse: 1.0.0
require-from-string: 2.0.2
'@redocly/cli@2.12.0(@opentelemetry/api@1.9.0)(ajv@8.17.1)(core-js@3.47.0)':
'@redocly/cli@2.12.1(@opentelemetry/api@1.9.0)(ajv@8.17.1)(core-js@3.47.0)':
dependencies:
'@opentelemetry/exporter-trace-otlp-http': 0.202.0(@opentelemetry/api@1.9.0)
'@opentelemetry/resources': 2.0.1(@opentelemetry/api@1.9.0)
'@opentelemetry/sdk-trace-node': 2.0.1(@opentelemetry/api@1.9.0)
'@opentelemetry/semantic-conventions': 1.34.0
'@redocly/openapi-core': 2.12.0(ajv@8.17.1)
'@redocly/respect-core': 2.12.0(ajv@8.17.1)
'@redocly/openapi-core': 2.12.1(ajv@8.17.1)
'@redocly/respect-core': 2.12.1(ajv@8.17.1)
abort-controller: 3.0.0
chokidar: 3.6.0
colorette: 1.4.0
@ -3931,11 +3922,11 @@ snapshots:
transitivePeerDependencies:
- supports-color
'@redocly/openapi-core@2.12.0(ajv@8.17.1)':
'@redocly/openapi-core@2.12.1(ajv@8.17.1)':
dependencies:
'@redocly/ajv': 8.17.1
'@redocly/config': 0.40.0
ajv-formats: 2.1.1(ajv@8.17.1)
ajv-formats: 3.0.1(ajv@8.17.1)
colorette: 1.4.0
js-levenshtein: 1.1.6
js-yaml: 4.1.1
@ -3945,12 +3936,12 @@ snapshots:
transitivePeerDependencies:
- ajv
'@redocly/respect-core@2.12.0(ajv@8.17.1)':
'@redocly/respect-core@2.12.1(ajv@8.17.1)':
dependencies:
'@faker-js/faker': 7.6.0
'@noble/hashes': 1.8.0
'@redocly/ajv': 8.11.4
'@redocly/openapi-core': 2.12.0(ajv@8.17.1)
'@redocly/ajv': 8.17.1
'@redocly/openapi-core': 2.12.1(ajv@8.17.1)
better-ajv-errors: 1.2.0(ajv@8.17.1)
colorette: 2.0.20
json-pointer: 0.6.2
@ -4026,8 +4017,6 @@ snapshots:
'@rollup/rollup-win32-x64-msvc@4.53.3':
optional: true
'@sinclair/typebox@0.34.41': {}
'@socket.io/component-emitter@3.1.2': {}
'@standard-schema/spec@1.0.0': {}
@ -4184,10 +4173,6 @@ snapshots:
agent-base@7.1.4: {}
ajv-formats@2.1.1(ajv@8.17.1):
optionalDependencies:
ajv: 8.17.1
ajv-formats@3.0.1(ajv@8.17.1):
optionalDependencies:
ajv: 8.17.1
@ -4446,6 +4431,8 @@ snapshots:
dependencies:
safe-buffer: 5.2.1
content-type@1.0.5: {}
cookie@0.7.2: {}
cookie@1.1.1: {}
@ -4656,7 +4643,7 @@ snapshots:
'@eslint/config-array': 0.21.1
'@eslint/config-helpers': 0.4.2
'@eslint/core': 0.17.0
'@eslint/eslintrc': 3.3.1
'@eslint/eslintrc': 3.3.3
'@eslint/js': 9.39.1
'@eslint/plugin-kit': 0.4.1
'@humanfs/node': 0.16.7
@ -4714,7 +4701,7 @@ snapshots:
expand-template@2.0.3: {}
fast-copy@3.0.2: {}
fast-copy@4.0.0: {}
fast-decode-uri-component@1.0.1: {}
@ -4769,7 +4756,7 @@ snapshots:
generify: 4.2.0
help-me: 5.0.0
is-docker: 2.2.1
pino-pretty: 13.1.2
pino-pretty: 13.1.3
pkg-up: 3.1.0
resolve-from: 5.0.0
semver: 7.7.3
@ -5058,7 +5045,7 @@ snapshots:
ip-address@10.1.0: {}
ipaddr.js@2.2.0: {}
ipaddr.js@2.3.0: {}
is-binary-path@2.1.0:
dependencies:
@ -5179,7 +5166,7 @@ snapshots:
nano-spawn: 2.0.0
pidtree: 0.6.0
string-argv: 0.3.2
yaml: 2.8.1
yaml: 2.8.2
listr2@9.0.5:
dependencies:
@ -5224,7 +5211,7 @@ snapshots:
dependencies:
js-tokens: 4.0.0
lru-cache@11.2.2: {}
lru-cache@11.2.4: {}
lru-cache@7.18.3: {}
@ -5240,7 +5227,7 @@ snapshots:
math-intrinsics@1.1.0: {}
media-typer@0.3.0: {}
media-typer@1.1.0: {}
micromatch@4.0.8:
dependencies:
@ -5249,10 +5236,16 @@ snapshots:
mime-db@1.52.0: {}
mime-db@1.54.0: {}
mime-types@2.1.35:
dependencies:
mime-db: 1.52.0
mime-types@3.0.2:
dependencies:
mime-db: 1.54.0
mime@3.0.0: {}
mimic-fn@2.1.0: {}
@ -5501,7 +5494,7 @@ snapshots:
path-scurry@2.0.1:
dependencies:
lru-cache: 11.2.2
lru-cache: 11.2.4
minipass: 7.1.2
path-to-regexp@8.3.0: {}
@ -5520,17 +5513,21 @@ snapshots:
dependencies:
split2: 4.2.0
pino-pretty@13.1.2:
pino-abstract-transport@3.0.0:
dependencies:
split2: 4.2.0
pino-pretty@13.1.3:
dependencies:
colorette: 2.0.20
dateformat: 4.6.3
fast-copy: 3.0.2
fast-copy: 4.0.0
fast-safe-stringify: 2.1.1
help-me: 5.0.0
joycon: 3.1.1
minimist: 1.2.8
on-exit-leak-free: 2.1.2
pino-abstract-transport: 2.0.0
pino-abstract-transport: 3.0.0
pump: 3.0.3
secure-json-parse: 4.1.0
sonic-boom: 4.2.0
@ -6151,12 +6148,13 @@ snapshots:
type-fest@4.41.0: {}
type-is@1.6.18:
type-is@2.0.1:
dependencies:
media-typer: 0.3.0
mime-types: 2.1.35
content-type: 1.0.5
media-typer: 1.1.0
mime-types: 3.0.2
typebox@1.0.56: {}
typebox@1.0.59: {}
typescript-eslint@8.48.0(eslint@9.39.1)(typescript@5.9.3):
dependencies:
@ -6190,8 +6188,6 @@ snapshots:
unpipe@1.0.0: {}
uri-js-replace@1.0.1: {}
uri-js@4.4.1:
dependencies:
punycode: 2.3.1
@ -6204,22 +6200,22 @@ snapshots:
util-deprecate@1.0.2: {}
uuidv7@1.0.2: {}
uuidv7@1.1.0: {}
vary@1.1.2: {}
vite-tsconfig-paths@5.1.4(typescript@5.9.3)(vite@7.2.4(@types/node@22.19.1)(yaml@2.8.1)):
vite-tsconfig-paths@5.1.4(typescript@5.9.3)(vite@7.2.6(@types/node@22.19.1)(yaml@2.8.2)):
dependencies:
debug: 4.4.3(supports-color@10.2.2)
globrex: 0.1.2
tsconfck: 3.1.6(typescript@5.9.3)
optionalDependencies:
vite: 7.2.4(@types/node@22.19.1)(yaml@2.8.1)
vite: 7.2.6(@types/node@22.19.1)(yaml@2.8.2)
transitivePeerDependencies:
- supports-color
- typescript
vite@7.2.4(@types/node@22.19.1)(yaml@2.8.1):
vite@7.2.6(@types/node@22.19.1)(yaml@2.8.2):
dependencies:
esbuild: 0.25.12
fdir: 6.5.0(picomatch@4.0.3)
@ -6230,9 +6226,9 @@ snapshots:
optionalDependencies:
'@types/node': 22.19.1
fsevents: 2.3.3
yaml: 2.8.1
yaml: 2.8.2
vite@7.2.4(@types/node@24.10.1)(yaml@2.8.1):
vite@7.2.6(@types/node@24.10.1)(yaml@2.8.2):
dependencies:
esbuild: 0.25.12
fdir: 6.5.0(picomatch@4.0.3)
@ -6243,7 +6239,7 @@ snapshots:
optionalDependencies:
'@types/node': 24.10.1
fsevents: 2.3.3
yaml: 2.8.1
yaml: 2.8.2
walker@1.0.8:
dependencies:
@ -6308,7 +6304,7 @@ snapshots:
yaml@1.10.2: {}
yaml@2.8.1: {}
yaml@2.8.2: {}
yargs-parser@20.2.9: {}

View file

@ -21,17 +21,17 @@
"@fastify/autoload": "^6.3.1",
"@fastify/formbody": "^8.0.2",
"@fastify/multipart": "^9.3.0",
"@fastify/sensible": "^6.0.3",
"@fastify/sensible": "^6.0.4",
"@fastify/static": "^8.3.0",
"fastify": "^5.6.2",
"fastify-cli": "^7.4.1",
"fastify-plugin": "^5.1.0",
"typebox": "^1.0.56"
"typebox": "^1.0.59"
},
"devDependencies": {
"@types/node": "^22.19.1",
"rollup-plugin-node-externals": "^8.1.2",
"vite": "^7.2.4",
"vite": "^7.2.6",
"vite-tsconfig-paths": "^5.1.4"
}
}