more integration tests

This commit is contained in:
seavor 2026-04-16 12:40:47 -05:00
parent 4b5f66d497
commit decebc25c7
192 changed files with 3090 additions and 1657 deletions

View file

@ -1,35 +1,13 @@
import { WebClient } from '@app/websocket';
import type { IWebClientRequest } from '@app/websocket';
export { initWebClient } from './initWebClient';
export { createWebClientResponse } from './response';
export { createWebClientRequest } from './request';
import { createWebClientRequest } from './request';
/**
* UI-facing request surface. Each property is a lazy getter that resolves
* `WebClient.instance` at call time, so consumers can import this before the
* singleton is bootstrapped it only needs to exist by the first actual call.
*
* Prefer this over importing `WebClient` directly: it keeps UI code free of
* transport-layer names and makes `@app/websocket` an internal detail of the
* `api` layer.
* UI-facing request surface. The request implementations are created once
* at module load. They access `WebClient.instance` at call time (via lazy
* internal references), so the singleton only needs to exist by the first
* actual command send.
*/
export const request: IWebClientRequest = {
get authentication() {
return WebClient.instance.request.authentication;
},
get session() {
return WebClient.instance.request.session;
},
get rooms() {
return WebClient.instance.request.rooms;
},
get admin() {
return WebClient.instance.request.admin;
},
get moderator() {
return WebClient.instance.request.moderator;
},
get game() {
return WebClient.instance.request.game;
},
};
export const request = createWebClientRequest();