trucoshi 5.5.3 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/events.d.ts CHANGED
@@ -8,6 +8,7 @@ export type IEventCallback<T = {}> = (args: {
8
8
  } & T) => void;
9
9
  export declare enum EServerEvent {
10
10
  PONG = "PONG",
11
+ NEW_MESSAGE = "NEW_MESSAGE",
11
12
  SET_SESSION = "SET_SESSION",
12
13
  REFRESH_IDENTITY = "REFRESH_IDENTITY",
13
14
  PREVIOUS_HAND = "PREVIOUS_HAND",
@@ -22,7 +23,8 @@ export declare enum EServerEvent {
22
23
  export interface ServerToClientEvents {
23
24
  [EServerEvent.PONG]: (serverTime: number, clientTime: number) => void;
24
25
  [EServerEvent.PREVIOUS_HAND]: (value: IMatchPreviousHand, callback: () => void) => void;
25
- [EServerEvent.UPDATE_CHAT]: (room: IPublicChatRoom, message?: IChatMessage) => void;
26
+ [EServerEvent.UPDATE_CHAT]: (room: IPublicChatRoom) => void;
27
+ [EServerEvent.NEW_MESSAGE]: (roomId: string, message?: IChatMessage) => void;
26
28
  [EServerEvent.UPDATE_ACTIVE_MATCHES]: (activeMatches: IPublicMatchInfo[]) => void;
27
29
  [EServerEvent.UPDATE_MATCH]: (match: IPublicMatch, callback?: () => void) => void;
28
30
  [EServerEvent.KICK_PLAYER]: (match: IPublicMatch, session: string, reason?: string) => void;
@@ -45,6 +47,7 @@ export declare enum EClientEvent {
45
47
  START_MATCH = "START_MATCH",
46
48
  SET_PLAYER_READY = "SET_PLAYER_READY",
47
49
  FETCH_MATCH = "FETCH_MATCH",
50
+ FETCH_CHAT_ROOM = "FETCH_CHAT_ROOM",
48
51
  KICK_PLAYER = "KICK_PLAYER",
49
52
  CHAT = "CHAT",
50
53
  PING = "PING",
@@ -77,6 +80,7 @@ export interface ClientToServerEvents {
77
80
  [EClientEvent.FETCH_MATCH]: (matchSessionId: string, callback: IEventCallback<{
78
81
  match: IPublicMatch | null;
79
82
  }>) => void;
83
+ [EClientEvent.FETCH_CHAT_ROOM]: (roomId: string) => void;
80
84
  [EClientEvent.FETCH_MATCH_DETAILS]: (matchId: number, callback: IEventCallback<{
81
85
  match: IMatchDetails | null;
82
86
  }>) => void;
package/dist/events.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export var EServerEvent;
2
2
  (function (EServerEvent) {
3
3
  EServerEvent["PONG"] = "PONG";
4
+ EServerEvent["NEW_MESSAGE"] = "NEW_MESSAGE";
4
5
  EServerEvent["SET_SESSION"] = "SET_SESSION";
5
6
  EServerEvent["REFRESH_IDENTITY"] = "REFRESH_IDENTITY";
6
7
  EServerEvent["PREVIOUS_HAND"] = "PREVIOUS_HAND";
@@ -26,6 +27,7 @@ export var EClientEvent;
26
27
  EClientEvent["START_MATCH"] = "START_MATCH";
27
28
  EClientEvent["SET_PLAYER_READY"] = "SET_PLAYER_READY";
28
29
  EClientEvent["FETCH_MATCH"] = "FETCH_MATCH";
30
+ EClientEvent["FETCH_CHAT_ROOM"] = "FETCH_CHAT_ROOM";
29
31
  EClientEvent["KICK_PLAYER"] = "KICK_PLAYER";
30
32
  EClientEvent["CHAT"] = "CHAT";
31
33
  EClientEvent["PING"] = "PING";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trucoshi",
3
- "version": "5.5.3",
3
+ "version": "6.0.0",
4
4
  "description": "Lightning Truco Server",
5
5
  "main": "dist/types.js",
6
6
  "license": "GPL-3.0",
@@ -76,7 +76,7 @@
76
76
  "dotenv-cli": "^7.3.0",
77
77
  "form-data": "^4.0.0",
78
78
  "jsonwebtoken": "^9.0.2",
79
- "lightning-accounts": "3.0.0",
79
+ "lightning-accounts": "^4.1.0",
80
80
  "node-forge": "^1.3.1",
81
81
  "path-scurry": "^1.9.2",
82
82
  "pino": "^9.3.2",