@hellacardgames/speed 0.4.0 → 0.5.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["GAME_KEY","WATCHDOG_INTERVAL_MS","games"],"sources":["../../src/manager/watchdog.ts","../../src/manager/index.ts"],"sourcesContent":["import { GAME_KEY, WATCHDOG_INTERVAL_MS } from \"./constants.js\";\nimport { games } from \"./games.js\";\n\nclass Watchdog {\n start() {\n console.log(`watchdog start at ${Date.now()} (${GAME_KEY})`);\n setInterval(() => this.wakeUp(), WATCHDOG_INTERVAL_MS);\n }\n\n wakeUp() {\n const now = Date.now();\n // console.log(`watchdog wakeUp at ${now} (${GAME_KEY})`);\n for (const game of games.values()) {\n if (game.expiresAt <= now) {\n games.delete(game.id);\n console.log(`watchdog purged ${game.id} (${GAME_KEY})`);\n }\n }\n }\n}\n\nexport const watchdog = new Watchdog();\n","import { watchdog } from \"./watchdog.js\";\n\nexport { createGame } from \"./actions/createGame.js\";\nexport { drawCard } from \"./actions/drawCard.js\";\nexport { getClientStateAndClearEvents } from \"./actions/getClientStateAndClearEvents.js\";\nexport { getEventsAndClearAcknowledged } from \"./actions/getEventsAndClearAcknowledged.js\";\nexport { getJoinableGames } from \"./actions/getJoinableGames.js\";\nexport { joinGame } from \"./actions/joinGame.js\";\nexport { leaveGame } from \"./actions/leaveGame.js\";\nexport { playCard } from \"./actions/playCard.js\";\nexport { reportNoPlayableCards } from \"./actions/reportNoPlayableCards.js\";\nexport { sendChat } from \"./actions/sendChat.js\";\nexport { startGame } from \"./actions/startGame.js\";\n\
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["GAME_KEY","WATCHDOG_INTERVAL_MS","games"],"sources":["../../src/manager/watchdog.ts","../../src/manager/index.ts"],"sourcesContent":["import { GAME_KEY, WATCHDOG_INTERVAL_MS } from \"./constants.js\";\nimport { games } from \"./games.js\";\n\nclass Watchdog {\n start() {\n console.log(`watchdog start at ${Date.now()} (${GAME_KEY})`);\n setInterval(() => this.wakeUp(), WATCHDOG_INTERVAL_MS);\n }\n\n wakeUp() {\n const now = Date.now();\n // console.log(`watchdog wakeUp at ${now} (${GAME_KEY})`);\n for (const game of games.values()) {\n if (game.expiresAt <= now) {\n games.delete(game.id);\n console.log(`watchdog purged ${game.id} (${GAME_KEY})`);\n }\n }\n }\n}\n\nexport const watchdog = new Watchdog();\n","import { watchdog } from \"./watchdog.js\";\n\nexport { createGame } from \"./actions/createGame.js\";\nexport { drawCard } from \"./actions/drawCard.js\";\nexport { getClientStateAndClearEvents } from \"./actions/getClientStateAndClearEvents.js\";\nexport { getEventsAndClearAcknowledged } from \"./actions/getEventsAndClearAcknowledged.js\";\nexport { getJoinableGames } from \"./actions/getJoinableGames.js\";\nexport { joinGame } from \"./actions/joinGame.js\";\nexport { leaveGame } from \"./actions/leaveGame.js\";\nexport { playCard } from \"./actions/playCard.js\";\nexport { reportNoPlayableCards } from \"./actions/reportNoPlayableCards.js\";\nexport { sendChat } from \"./actions/sendChat.js\";\nexport { startGame } from \"./actions/startGame.js\";\n\nwatchdog.start();\n"],"mappings":";;;AAGA,IAAM,WAAN,MAAe;CACb,QAAQ;EACN,QAAQ,IAAI,qBAAqB,KAAK,IAAI,EAAE,IAAIA,kBAAAA,SAAS,EAAE;EAC3D,kBAAkB,KAAK,OAAO,GAAGC,kBAAAA,oBAAoB;CACvD;CAEA,SAAS;EACP,MAAM,MAAM,KAAK,IAAI;EAErB,KAAK,MAAM,QAAQC,kBAAAA,MAAM,OAAO,GAC9B,IAAI,KAAK,aAAa,KAAK;GACzB,kBAAA,MAAM,OAAO,KAAK,EAAE;GACpB,QAAQ,IAAI,mBAAmB,KAAK,GAAG,IAAIF,kBAAAA,SAAS,EAAE;EACxD;CAEJ;AACF;;;ACLA,IDO4B,SCP5B,CAAA,CAAS,MAAM"}
|
package/dist/manager/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as ClientState, t as GameEvent } from "../GameEvent-DDQ4jXxt.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/manager/actions/createGame.d.ts
|
|
4
4
|
type CreateGameResult = {
|
|
@@ -105,5 +105,5 @@ type StartGameResult = {
|
|
|
105
105
|
};
|
|
106
106
|
declare function startGame(gameId: string, playerId: string): StartGameResult;
|
|
107
107
|
//#endregion
|
|
108
|
-
export {
|
|
108
|
+
export { createGame, drawCard, getClientStateAndClearEvents, getEventsAndClearAcknowledged, getJoinableGames, joinGame, leaveGame, playCard, reportNoPlayableCards, sendChat, startGame };
|
|
109
109
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/manager/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as ClientState, t as GameEvent } from "../GameEvent-DDQ4jXxt.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/manager/actions/createGame.d.ts
|
|
4
4
|
type CreateGameResult = {
|
|
@@ -105,5 +105,5 @@ type StartGameResult = {
|
|
|
105
105
|
};
|
|
106
106
|
declare function startGame(gameId: string, playerId: string): StartGameResult;
|
|
107
107
|
//#endregion
|
|
108
|
-
export {
|
|
108
|
+
export { createGame, drawCard, getClientStateAndClearEvents, getEventsAndClearAcknowledged, getJoinableGames, joinGame, leaveGame, playCard, reportNoPlayableCards, sendChat, startGame };
|
|
109
109
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/manager/watchdog.ts","../../src/manager/index.ts"],"sourcesContent":["import { GAME_KEY, WATCHDOG_INTERVAL_MS } from \"./constants.js\";\nimport { games } from \"./games.js\";\n\nclass Watchdog {\n start() {\n console.log(`watchdog start at ${Date.now()} (${GAME_KEY})`);\n setInterval(() => this.wakeUp(), WATCHDOG_INTERVAL_MS);\n }\n\n wakeUp() {\n const now = Date.now();\n // console.log(`watchdog wakeUp at ${now} (${GAME_KEY})`);\n for (const game of games.values()) {\n if (game.expiresAt <= now) {\n games.delete(game.id);\n console.log(`watchdog purged ${game.id} (${GAME_KEY})`);\n }\n }\n }\n}\n\nexport const watchdog = new Watchdog();\n","import { watchdog } from \"./watchdog.js\";\n\nexport { createGame } from \"./actions/createGame.js\";\nexport { drawCard } from \"./actions/drawCard.js\";\nexport { getClientStateAndClearEvents } from \"./actions/getClientStateAndClearEvents.js\";\nexport { getEventsAndClearAcknowledged } from \"./actions/getEventsAndClearAcknowledged.js\";\nexport { getJoinableGames } from \"./actions/getJoinableGames.js\";\nexport { joinGame } from \"./actions/joinGame.js\";\nexport { leaveGame } from \"./actions/leaveGame.js\";\nexport { playCard } from \"./actions/playCard.js\";\nexport { reportNoPlayableCards } from \"./actions/reportNoPlayableCards.js\";\nexport { sendChat } from \"./actions/sendChat.js\";\nexport { startGame } from \"./actions/startGame.js\";\n\
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/manager/watchdog.ts","../../src/manager/index.ts"],"sourcesContent":["import { GAME_KEY, WATCHDOG_INTERVAL_MS } from \"./constants.js\";\nimport { games } from \"./games.js\";\n\nclass Watchdog {\n start() {\n console.log(`watchdog start at ${Date.now()} (${GAME_KEY})`);\n setInterval(() => this.wakeUp(), WATCHDOG_INTERVAL_MS);\n }\n\n wakeUp() {\n const now = Date.now();\n // console.log(`watchdog wakeUp at ${now} (${GAME_KEY})`);\n for (const game of games.values()) {\n if (game.expiresAt <= now) {\n games.delete(game.id);\n console.log(`watchdog purged ${game.id} (${GAME_KEY})`);\n }\n }\n }\n}\n\nexport const watchdog = new Watchdog();\n","import { watchdog } from \"./watchdog.js\";\n\nexport { createGame } from \"./actions/createGame.js\";\nexport { drawCard } from \"./actions/drawCard.js\";\nexport { getClientStateAndClearEvents } from \"./actions/getClientStateAndClearEvents.js\";\nexport { getEventsAndClearAcknowledged } from \"./actions/getEventsAndClearAcknowledged.js\";\nexport { getJoinableGames } from \"./actions/getJoinableGames.js\";\nexport { joinGame } from \"./actions/joinGame.js\";\nexport { leaveGame } from \"./actions/leaveGame.js\";\nexport { playCard } from \"./actions/playCard.js\";\nexport { reportNoPlayableCards } from \"./actions/reportNoPlayableCards.js\";\nexport { sendChat } from \"./actions/sendChat.js\";\nexport { startGame } from \"./actions/startGame.js\";\n\nwatchdog.start();\n"],"mappings":";;AAGA,IAAM,WAAN,MAAe;CACb,QAAQ;EACN,QAAQ,IAAI,qBAAqB,KAAK,IAAI,EAAE,IAAI,SAAS,EAAE;EAC3D,kBAAkB,KAAK,OAAO,GAAG,oBAAoB;CACvD;CAEA,SAAS;EACP,MAAM,MAAM,KAAK,IAAI;EAErB,KAAK,MAAM,QAAQ,MAAM,OAAO,GAC9B,IAAI,KAAK,aAAa,KAAK;GACzB,MAAM,OAAO,KAAK,EAAE;GACpB,QAAQ,IAAI,mBAAmB,KAAK,GAAG,IAAI,SAAS,EAAE;EACxD;CAEJ;AACF;;;ACLA,IDO4B,SCP5B,CAAA,CAAS,MAAM"}
|