@hadoku/game-server 0.1.85 → 0.1.86

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.
@@ -195,6 +195,8 @@ export interface RoomTypeHooks<G, I extends RoomCreateInput = RoomCreateInput> {
195
195
  aiSeated?(room: LobbyRoom<G>, seat: number, on: boolean): void;
196
196
  /** Every member id `ids` names, in the game part, before the record's ids are replaced (account erase). */
197
197
  anonymise?(room: LobbyRoom<G>, ids: ReadonlySet<string>): void;
198
+ /** A testing room's stand-in gave `to` its place (`#handOver`): the record already names `to`; what the game keeps outside it follows. */
199
+ handedOver?(room: LobbyRoom<G>, from: string, to: string): void;
198
200
  /** The room is about to be forgotten (a close or the sweep): keep what it played, settle what it owes. */
199
201
  ending?(room: LobbyRoom<G>, why: 'close' | 'sweep' | 'forget'): void;
200
202
  /** A relay room's match seat count: set for a type whose room IS its match (`onRelayRoomOpened`). */
@@ -517,6 +517,7 @@ export class RoomLobby {
517
517
  member.userId = caller.userId;
518
518
  member.name = caller.name;
519
519
  }
520
+ this.hooksOf(room).handedOver?.(room, TESTING_STAND_IN_ID, caller.id);
520
521
  this.persist(room);
521
522
  this.log({ event: 'room-handed-over', roomId: room.id });
522
523
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hadoku/game-server",
3
- "version": "0.1.85",
4
- "gitHead": "1a3573c1826fba797814c0e5198c8edbbad3f831",
3
+ "version": "0.1.86",
4
+ "gitHead": "e8b772122ad9076872ef9875450556103a090512",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "description": "The server parts any hosted game shares, above the kernel: the app config and edge auth, the room core (identity, seats, sessions, membership, the room list, the generic room routes), match hosting (the host contract, local and remote JVMs, placement, the start queue, recordings, the in-process and relay runtimes), streams, erase, telemetry and usage. Knows no game; Magic plugs in from apps/server. MIT; imports only node built-ins, express, socket.io, @wolffm/* and the platform packages.",
@@ -16,9 +16,9 @@
16
16
  "play/remote/"
17
17
  ],
18
18
  "dependencies": {
19
- "@wolffm/host-wire": "npm:@hadoku/host-wire@0.1.85",
20
- "@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.85",
21
- "@wolffm/service-kernel": "npm:@hadoku/service-kernel@0.1.118",
19
+ "@wolffm/host-wire": "npm:@hadoku/host-wire@0.1.86",
20
+ "@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.86",
21
+ "@wolffm/service-kernel": "npm:@hadoku/service-kernel@0.1.119",
22
22
  "@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.1.31",
23
23
  "@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.125",
24
24
  "@wolffm/rooms-server": "npm:@hadoku/rooms-server@^0.45.125",