@hadoku/game-server 0.1.49 → 0.1.51
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/relay-game.js +6 -1
- package/dist/room/events.js +1 -1
- package/package.json +5 -5
package/dist/relay-game.js
CHANGED
|
@@ -158,6 +158,9 @@ export async function startRelayGame(options) {
|
|
|
158
158
|
},
|
|
159
159
|
};
|
|
160
160
|
let arrived = () => { };
|
|
161
|
+
// The room feed, from the `sockets` phase on: a pending start is no lobby write, so its route
|
|
162
|
+
// pings the room's watchers itself, or every page but the starter's missed the countdown.
|
|
163
|
+
let feedChanged = () => { };
|
|
161
164
|
const roomsPlugin = {
|
|
162
165
|
name: 'rooms',
|
|
163
166
|
phase: 'routes',
|
|
@@ -188,6 +191,7 @@ export async function startRelayGame(options) {
|
|
|
188
191
|
const result = starts.request(room, caller.id);
|
|
189
192
|
if (!result.ok)
|
|
190
193
|
return badRequest(res, result.reason);
|
|
194
|
+
feedChanged(roomId);
|
|
191
195
|
// Read again: the view is built per read, and this one now carries the start.
|
|
192
196
|
res.json(roomCore.roomBody(lobby.get(roomId) ?? room, caller.id));
|
|
193
197
|
});
|
|
@@ -280,7 +284,8 @@ export async function startRelayGame(options) {
|
|
|
280
284
|
return;
|
|
281
285
|
ctx.state.userKeys.set(identityFromHeaders(socket.request.headers, socket.id), key);
|
|
282
286
|
});
|
|
283
|
-
const feed = attachRoomFeed(ctx.io, { lobby });
|
|
287
|
+
const feed = attachRoomFeed(ctx.io, { lobby, log: jsonLogger(`${id}-feed`) });
|
|
288
|
+
feedChanged = (roomId) => feed.changed(roomId);
|
|
284
289
|
return {
|
|
285
290
|
shutdown: () => {
|
|
286
291
|
relay.close();
|
package/dist/room/events.js
CHANGED
|
@@ -21,7 +21,7 @@ const EventRecordSchema = z.object({
|
|
|
21
21
|
organizerUserId: z.string().nullable().optional(),
|
|
22
22
|
/** Read only, from a record written before `organizerUserId`: never written again. */
|
|
23
23
|
organizerName: z.string().optional(),
|
|
24
|
-
/** The Rally sign-up form it was made from:
|
|
24
|
+
/** The Rally sign-up form it was made from: whoever submitted it is signed up (`EventView.signups`). */
|
|
25
25
|
formId: z.string().optional(),
|
|
26
26
|
/** What the Discord server's calendar holds for it, as last sent (`discord-events.ts`): absent while it has none. */
|
|
27
27
|
discord: z.object({ eventId: z.string(), sent: z.string() }).optional(),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hadoku/game-server",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "0.1.51",
|
|
4
|
+
"gitHead": "afb568b441f3bcca3e4ab5bbdd860a0cbfc9ca15",
|
|
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.
|
|
20
|
-
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.
|
|
21
|
-
"@wolffm/service-kernel": "npm:@hadoku/service-kernel@0.1.
|
|
19
|
+
"@wolffm/host-wire": "npm:@hadoku/host-wire@0.1.51",
|
|
20
|
+
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.51",
|
|
21
|
+
"@wolffm/service-kernel": "npm:@hadoku/service-kernel@0.1.84",
|
|
22
22
|
"@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.1.27",
|
|
23
23
|
"@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.111",
|
|
24
24
|
"@wolffm/rooms-server": "npm:@hadoku/rooms-server@^0.45.111",
|