@my-swu/simulator-client 0.1.3 → 0.1.4

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.
@@ -37,6 +37,7 @@ export declare class MatchSessionController implements MatchSession {
37
37
  get errorMessages(): readonly string[];
38
38
  get matchId(): string | undefined;
39
39
  get reconnectState(): MatchSessionReconnectState;
40
+ get snapshotRevision(): number;
40
41
  get snapshot(): GameState | undefined;
41
42
  get seat(): MatchSeat | undefined;
42
43
  get state(): MatchSessionState;
@@ -92,6 +92,9 @@ export class MatchSessionController {
92
92
  get reconnectState() {
93
93
  return this.#reconnectState;
94
94
  }
95
+ get snapshotRevision() {
96
+ return this.#connection?.snapshotRevision ?? 0;
97
+ }
95
98
  get snapshot() {
96
99
  return this.#snapshot;
97
100
  }
@@ -45,6 +45,8 @@ export interface MatchSession extends MatchSessionMethods {
45
45
  readonly matchId: string | undefined;
46
46
  /** Automatic reconnect progress after an abnormal socket close. */
47
47
  readonly reconnectState: MatchSessionReconnectState;
48
+ /** Monotonic revision of the latest authoritative match snapshot. */
49
+ readonly snapshotRevision: number;
48
50
  /** Latest authoritative private snapshot for this seat. */
49
51
  readonly snapshot: GameState | undefined;
50
52
  /** Seat controlled by this session when known. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@my-swu/simulator-client",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Typed TypeScript client for the swu-simulator HTTP and WebSocket engine.",
5
5
  "keywords": [
6
6
  "swu",