trucoshi 0.5.4 → 0.5.5

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.
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PLAYER_TIMEOUT_GRACE = exports.PLAYER_TURN_TIMEOUT = exports.PLAYER_ABANDON_TIMEOUT = exports.PREVIOUS_HAND_ACK_TIMEOUT = void 0;
4
4
  exports.PREVIOUS_HAND_ACK_TIMEOUT = 1000 * 6;
5
- exports.PLAYER_ABANDON_TIMEOUT = 1000 * 45;
6
- exports.PLAYER_TURN_TIMEOUT = 1000 * 30;
5
+ exports.PLAYER_ABANDON_TIMEOUT = 1000 * 10;
6
+ exports.PLAYER_TURN_TIMEOUT = 1000 * 10;
7
7
  exports.PLAYER_TIMEOUT_GRACE = 500;
package/dist/types.d.ts CHANGED
@@ -123,7 +123,7 @@ export type IEventCallback<T = {}> = (args: {
123
123
  success: boolean;
124
124
  } & T) => void;
125
125
  export interface ServerToClientEvents {
126
- [EServerEvent.PONG]: (msg: string) => void;
126
+ [EServerEvent.PONG]: (serverTime: number, clientTime: number) => void;
127
127
  [EServerEvent.WAITING_POSSIBLE_SAY]: (match: IPublicMatch, callback: (data: IWaitingSayData) => void) => void;
128
128
  [EServerEvent.PREVIOUS_HAND]: (value: IMatchPreviousHand, callback: () => void) => void;
129
129
  [EServerEvent.UPDATE_CHAT]: (room: IPublicChatRoom, message?: IChatMessage) => void;
@@ -134,7 +134,7 @@ export interface ServerToClientEvents {
134
134
  [EServerEvent.WAITING_PLAY]: (match: IPublicMatch, callback: (data: IWaitingPlayData) => void) => void;
135
135
  }
136
136
  export interface ClientToServerEvents {
137
- [EClientEvent.PING]: (msg: string) => void;
137
+ [EClientEvent.PING]: (clientTime: number) => void;
138
138
  [EClientEvent.CHAT]: (matchId: string, msg: string, callback: () => void) => void;
139
139
  [EClientEvent.LEAVE_MATCH]: (matchId: string) => void;
140
140
  [EClientEvent.CREATE_MATCH]: (callback: IEventCallback<{
@@ -247,7 +247,7 @@ export interface IPlayer {
247
247
  teamIdx: number;
248
248
  id: string;
249
249
  key: string;
250
- session?: string;
250
+ session: string;
251
251
  hand: Array<ICard>;
252
252
  envido: Array<number>;
253
253
  _commands: Set<ECommand>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trucoshi",
3
- "version": "0.5.4",
3
+ "version": "0.5.5",
4
4
  "main": "dist/types.js",
5
5
  "license": "GPL-3.0",
6
6
  "scripts": {