@diffenderfer-games/hub 2.0.0-next.1 → 2.0.0-next.2
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/CHANGELOG.md +36 -9
- package/README.md +25 -10
- package/dist/auto.d.ts +6 -6
- package/dist/auto.js +2 -2
- package/dist/doctor/cli.mjs +14 -7
- package/dist/doctor/cli.mjs.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/mp.d.ts +3 -3
- package/dist/race.d.ts +1 -1
- package/dist/rooms.d.ts +3 -3
- package/dist/shared/bridge.js +9 -3
- package/dist/shared/bridge.js.map +1 -1
- package/dist/shared/client-version.gen.js +1 -1
- package/dist/shared/daily.d.ts +10 -4
- package/dist/shared/daily.d.ts.map +1 -1
- package/dist/shared/daily.js +12 -2
- package/dist/shared/daily.js.map +1 -1
- package/dist/shared/index.d.ts +314 -35
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/input.js +7 -2
- package/dist/shared/input.js.map +1 -1
- package/dist/shared/latest-state.js +1 -1
- package/dist/shared/mp.js +10 -2
- package/dist/shared/mp.js.map +1 -1
- package/dist/shared/multiplayer-types.d.ts +15 -2
- package/dist/shared/multiplayer-types.d.ts.map +1 -1
- package/dist/shared/race-types.d.ts +1 -1
- package/dist/shared/race.js +1 -1
- package/dist/shared/room-types.d.ts +28 -3
- package/dist/shared/room-types.d.ts.map +1 -1
- package/dist/shared/rooms.d.ts.map +1 -1
- package/dist/shared/rooms.js +10 -2
- package/dist/shared/rooms.js.map +1 -1
- package/dist/shared/runtime-opener.js +1 -1
- package/dist/shared/social.d.ts +23 -8
- package/dist/shared/social.d.ts.map +1 -1
- package/dist/shared/social.js +6 -1
- package/dist/shared/social.js.map +1 -1
- package/dist/shared/src.js +1588 -388
- package/dist/shared/src.js.map +1 -1
- package/dist/shared/wire-types.d.ts +6 -2
- package/dist/shared/wire-types.d.ts.map +1 -1
- package/dist/social.d.ts +5 -5
- package/dist/social.js +1 -1
- package/package.json +2 -2
- package/src/core/connection.ts +187 -92
- package/src/core/game-data.ts +11 -9
- package/src/core/hub-economy.ts +47 -10
- package/src/core/hub-progress.ts +13 -16
- package/src/core/hub.ts +4 -2
- package/src/core/offline/hub-kinds/daily-kind.ts +68 -0
- package/src/core/offline/hub-kinds/economy-kinds.ts +86 -0
- package/src/core/offline/hub-kinds/game-fields.ts +2 -0
- package/src/core/offline/hub-kinds/index.ts +35 -0
- package/src/core/offline/hub-kinds/legacy-ops.ts +37 -0
- package/src/core/offline/hub-kinds/progress-kinds.ts +148 -0
- package/src/core/offline/kind-adapters.ts +48 -0
- package/src/core/offline/local-inventory.ts +64 -0
- package/src/core/offline/local-store.ts +20 -22
- package/src/core/offline/offline-api.ts +65 -0
- package/src/core/offline/outbox-entry.ts +59 -0
- package/src/core/offline/outbox-kinds.ts +78 -0
- package/src/core/offline/outbox-merge.ts +39 -0
- package/src/core/offline/outbox-replayer.ts +141 -0
- package/src/core/offline/outbox-store.ts +85 -0
- package/src/core/offline/outbox.ts +232 -0
- package/src/core/offline/queue.ts +4 -49
- package/src/core/offline/replay-lease.ts +87 -0
- package/src/core/offline/replay-policy.ts +52 -0
- package/src/core/rest/rest-client.ts +14 -3
- package/src/core/rest/routes.gen.ts +108 -87
- package/src/core/storage/json-guards.ts +6 -0
- package/src/core/version/client-version.gen.ts +1 -1
- package/src/daily/daily-system.ts +8 -1
- package/src/daily/types.ts +3 -2
- package/src/doctor/checks.ts +10 -2
- package/src/index.ts +6 -1
- package/src/input/input-registry.ts +9 -2
- package/src/mp.ts +1 -1
- package/src/realtime/bridge.ts +5 -0
- package/src/realtime/multiplayer-forwarder.ts +13 -1
- package/src/realtime/multiplayer-types.ts +15 -1
- package/src/realtime/room-types.ts +28 -2
- package/src/realtime/rooms-forwarder.ts +13 -1
- package/src/realtime/runtime-api.ts +19 -8
- package/src/realtime/social-forwarder.ts +5 -0
- package/src/realtime/social-types.ts +8 -0
- package/src/realtime/wire-types.ts +7 -0
- package/src/rooms.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,36 @@
|
|
|
1
|
-
# @diffenderfer-games/hub
|
|
2
|
-
|
|
3
|
-
## 2.0.0-next.
|
|
4
|
-
|
|
5
|
-
###
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
# @diffenderfer-games/hub
|
|
2
|
+
|
|
3
|
+
## 2.0.0-next.2
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3944819: `game.labels`: say what kind of game yours is, from a fixed vocabulary (`GAME_LABELS`, with display names in `GAME_LABEL_TITLES`, grouped in `GAME_LABEL_GROUPS`): genre (`cards`, `board`, `puzzle`, `arcade`, `platformer`, `real-time-strategy`, `physics`, `typing`, `word`, `sports`, `racing`), look (`2d`, `3d`), where it plays (`phone`, `controller`, `desktop`) and players (`multiplayer`, `single-player`). The home page filters by them. An unknown label is a `hub-doctor` warning, not an error.
|
|
8
|
+
|
|
9
|
+
New endpoints: `GET /catalog/players` (how many accounts and guests have each game open right now: counts only) and `GET /games/:slug/me/activity` (the signed-in player's plays and minutes in a game). The `lobbyOpen` notification preference now means "tell me when people want to play": an open public lobby or race, or a tournament opening.
|
|
10
|
+
- 937d61e: Explicit offline replay. Writes made offline now go into a typed operation outbox in `localStorage`: each op has a kind whose handler performs it (several dependent calls can be one op), ops replay in order with backoff when the hub is back and after a reload, one tab replays at a time, and the outbox is capped. Saves, stats, scores, the profile, daily completions, inventory grants and house exchanges, and starring a game all queue offline. Games add their own kinds with `hub.offline.define(kind, handler)`, queue them with `hub.offline.enqueue(kind, payload)`, list them with `hub.offline.pending()`, and hear `queued`, `replayed` and `failed` through `hub.offline.on(...)` (and `hub:offline-*` window events). An offline `hub.daily.complete()` resolves `null`, fires `hub:daily-queued`, and replays later. The contract marks the endpoints that may be replayed (`OFFLINE_REPLAY_ENDPOINTS`); each replayed call carries an operation key (`x-hub-op`) and the hub runs it once per key. `SyncConflict.op` is now the dropped outbox op.
|
|
11
|
+
- ed68402: Invite links and resilient online games (batch 2026-10, R13 and R14).
|
|
12
|
+
|
|
13
|
+
- **Invite links:** `hub.mp.inviteLink()` makes (or reuses) a shareable link to the room the player is in; `hub.mp.revokeInviteLink(token)` revokes it. Opening `/<slug>/<lobby>?hub_link=<token>` arrives as an ordinary `join` or `watch` launch with `via: 'link'`. Contract: `POST /mp/links`, `GET /mp/links`, `DELETE /mp/links/:token`, `POST /mp/links/:token/open`, the `InviteLink` shape and the `link_invalid`, `link_room_gone` and `too_many_links` error codes.
|
|
14
|
+
- **Resilient rooms:** the new `room.seat` event (`room.on('seat', …)`: `away` with `graceEndsAt`, `back`, `gone` with `reason`), `room.seats()`, `hub.rooms.reclaim()` (socket op `room.reclaim`), seats' `graceEndsAt`, and `Launch.via` (`'link' | 'rejoin'`). The host role now passes on instead of the room closing with `host_left`: once the host's seat is freed by default, or as soon as the host drops with `hub.rooms.create({ hostMigration: 'drop' })`.
|
|
15
|
+
- The realtime feature version is 3; on an older runtime the new methods reject with `OfflineError` asking for a reload.
|
|
16
|
+
- 5b68831: Tournaments (docs/multiplayer.md §15). `game.multiplayer.tournaments: true` says a game plays 1v1 tournament matches and reports their winner; race games need nothing. A ready match reaches the game as an ordinary `host`/`guest` launch with the new `launch.tournament` (`{ id, title, match, opponent }`); a hub-room game ends it with `room.end({ winnerId })`, an own-server game posts results with `tournament: { id, match }`.
|
|
17
|
+
|
|
18
|
+
New endpoints: `GET /play-online` (lobbies waiting for a player, invites, my tournaments, open ones coming up), `GET|POST /tournaments`, `GET|DELETE /tournaments/:id`, `POST /tournaments/:id/join|leave|start|invites`, `PUT|DELETE /tournaments/:id/follow` and `POST /tournaments/:id/matches/:match/launch`; the `tournament` socket event; the `tournament` notice kind; `GameInfo.tournaments`; `TOURNAMENT_LIMITS`. `hub.social.openPlayOnline()` opens the hub's Play online window (realtime feature version 4).
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- `hub.input.axis(name)` reads a vertical-only axis (`axes: { paddle: { y: ['up', 'down'] } }`); it used to read 0.
|
|
23
|
+
- A save, profile or score meta with an optional field set to `undefined` is stored and sent as the JSON it stands for (the field left out); with the new outbox it was refused as "Malformed offline operation payload" and never reached the hub.
|
|
24
|
+
- Updated dependencies [3944819]
|
|
25
|
+
- Updated dependencies [937d61e]
|
|
26
|
+
- Updated dependencies [ed68402]
|
|
27
|
+
- Updated dependencies [5b68831]
|
|
28
|
+
- @diffenderfer-games/hub-contract@2.0.0-next.2
|
|
29
|
+
|
|
30
|
+
## 2.0.0-next.1
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- Follow-ups from the Bubble Pop pilot. `hub-doctor` gives up after `--timeout` ms (default 10 s) and fails with `hub unreachable at <url>` instead of hanging. A v1 vendored singleton adopted on the page is now recorded in `window.__DG__` as `{ version: 'v1' }`. The README covers exact pins for prereleases, sharing the page with the host's `/_hub/hub.js`, and testing against the hub.
|
|
35
|
+
- Updated dependencies
|
|
36
|
+
- @diffenderfer-games/hub-contract@2.0.0-next.1
|
package/README.md
CHANGED
|
@@ -90,16 +90,31 @@ The analytics calls (`recordPlay`, `heartbeat`, `event`) never throw.
|
|
|
90
90
|
|
|
91
91
|
With `offline: 'auto'` (the default), reads fall back to a cache in
|
|
92
92
|
`localStorage` when the hub can't be reached, and writes (saves, stats,
|
|
93
|
-
scores, profile
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
93
|
+
scores, profile, daily completions, inventory grants and exchanges, stars)
|
|
94
|
+
apply to the cache at once and are queued in an outbox. The outbox replays
|
|
95
|
+
in order when the connection returns (and after a reload), one tab at a
|
|
96
|
+
time, and the hub applies each replayed call once. `hub.sync()` replays it
|
|
97
|
+
on demand, `hub.pending()` counts what waits, and `hub.onStatus(listener)`
|
|
98
|
+
reports changes. `hub.prefetchAll()` warms the cache for every game in one
|
|
99
|
+
request. `offline: 'always'` never touches the network (develop without a
|
|
100
|
+
hub); `offline: 'never'` always throws instead.
|
|
101
|
+
|
|
102
|
+
Queue your own operations, with a handler that may make several dependent
|
|
103
|
+
calls:
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
hub.offline.define<{ score: number }>('my-game.finish', async (run, context) => {
|
|
107
|
+
const { rank } = await context.call('submitScore', { slug: 'my-game', key: 'runs', score: run.score });
|
|
108
|
+
await context.call('updateGameStat', { slug: 'my-game', key: 'best-rank', value: rank ?? 0, mode: 'max' });
|
|
109
|
+
});
|
|
110
|
+
hub.offline.enqueue('my-game.finish', { score: 4200 });
|
|
111
|
+
hub.offline.on('failed', ({ op, error }) => console.warn(op.kind, error));
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
The full rules (what replays, ordering, retries, the size cap) are in the
|
|
115
|
+
hub docs' "Offline and replay" section. The cache keeps the old vendored
|
|
116
|
+
client's `localStorage` keys, and its queue moves into the outbox, so a game
|
|
117
|
+
that switches to this package keeps its players' queued progress.
|
|
103
118
|
|
|
104
119
|
## Games without a build step
|
|
105
120
|
|
package/dist/auto.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as RaceRecordPlayer, c as RealtimeErrorShape, d as RoomSeat, f as RoomSeatChange, g as Snapshot, h as ServerEvents, i as RaceHistory, l as RoomChatLine, m as SchemaOutput, n as InviteLink, o as RaceResultPlayer, p as RoomStateChange, r as Notice, s as RaceStatusEvent, t as InviteCreated, u as RoomMessage } from "./shared/wire-types.js";
|
|
2
2
|
import { _ as DailyStatus, a as isDailySystem, c as DailyAll, d as DailyCompletionMeta, f as DailyDefinition, g as DailyStartResponse, h as DailyHost, i as getDaily, l as DailyChallenge, m as DailyGameStatus, n as DailyCompletions, o as DAILY_START_EVENT, p as DailyEventDetail, r as DAILY_SINGLETON_API, s as DailySystem, t as DailyCompletion, u as DailyCompleteResponse } from "./shared/daily.js";
|
|
3
3
|
import { $ as VirtualControlType, A as AxisSide, B as InputReading, C as parseInputOverrides, D as isPageInputControl, E as PageInputControl, F as InputConfig, G as NavElement, H as MenuBridge, I as InputDef, J as NavTarget, K as NavElementKind, L as InputEvents, M as EdgeOffsets, N as GamepadMapping, O as Anchor, P as GroupDef, Q as Vector, R as InputHost, S as isInputSystem, T as InputSystemOptions, U as MouseMapping, V as InputSource, W as NavBlurEvent, X as Rect, Y as NavigableDef, Z as TouchMapping, _ as boxesTouch, a as OverlayEdge, b as InputOptions, c as OverlayReason, d as LayoutOptions, et as VirtualDef, f as layoutControls, g as LayoutItem, h as LayoutBox, i as AutoPauseOptions, j as DraggedSpot, k as AxisDef, l as UiStack, m as Insets, n as getUiStack, nt as VirtualOverride, o as OverlayEvent, p as Overlay, q as NavFocusEvent, r as isUiStack, s as OverlayListener, t as UI_STACK_VERSION, tt as VirtualInputs, u as UiStackHandoff, v as controlSize, w as InputSystem, x as getInput, y as INPUT_SINGLETON_API, z as InputOverrides } from "./shared/input.js";
|
|
4
|
-
import { a as
|
|
4
|
+
import { a as InviteResult, i as InviteOptions, n as HubMpApi, o as JoinInfoEvent, r as InviteLinkMethods, t as BusyOptions } from "./shared/multiplayer-types.js";
|
|
5
5
|
import { o as multiplayerForwarder } from "./shared/mp.js";
|
|
6
|
-
import { a as RoomEvents, c as
|
|
6
|
+
import { a as RoomEvents, c as RoomSelf, d as RoomStateOptions, i as RoomCreateOptions, l as RoomSendOptions, n as HubRoomsApi, o as RoomListOptions, r as JoinOptions, s as RoomReclaimMethods, t as HubRoom, u as RoomState } from "./shared/room-types.js";
|
|
7
7
|
import { a as RaceHistoryQuery, c as RaceRuntimeApi, i as RaceEvents, l as RaceStart, n as RaceCreateOptions, o as RaceHistoryViewOptions, r as RaceDefinition, s as RaceHudPlace, t as HubRaceApi } from "./shared/race-types.js";
|
|
8
8
|
import { f as raceForwarder } from "./shared/race.js";
|
|
9
9
|
import { n as roomsForwarder } from "./shared/rooms.js";
|
|
10
|
-
import { $ as HubNotifyApi, A as RacerState, B as SuggestionStatus, C as RaceRecord, D as RaceStats, E as RaceState, F as ReportReason, G as REALTIME_READY_EVENT, H as isRealtimeApi, I as RoomInfo, J as RealtimeHubLink, K as REALTIME_SINGLETON_API, L as SocialConfig, M as Relation, N as ReportInput, O as Racer, P as ReportKind, Q as socialForwarder, R as SocialMe, S as RaceParams, T as RaceStatValue, U as REALTIME_FAILED_EVENT, V as findRealtimeApi, W as REALTIME_FEATURE_VERSION, X as notifyForwarder, Y as linkRealtimeToHub, Z as presenceForwarder, _ as PlayerLite, a as ErrorBody, at as
|
|
11
|
-
import { $ as
|
|
10
|
+
import { $ as HubNotifyApi, A as RacerState, B as SuggestionStatus, C as RaceRecord, D as RaceStats, E as RaceState, F as ReportReason, G as REALTIME_READY_EVENT, H as isRealtimeApi, I as RoomInfo, J as RealtimeHubLink, K as REALTIME_SINGLETON_API, L as SocialConfig, M as Relation, N as ReportInput, O as Racer, P as ReportKind, Q as socialForwarder, R as SocialMe, S as RaceParams, T as RaceStatValue, U as REALTIME_FAILED_EVENT, V as findRealtimeApi, W as REALTIME_FEATURE_VERSION, X as notifyForwarder, Y as linkRealtimeToHub, Z as presenceForwarder, _ as PlayerLite, a as ErrorBody, at as SocialCounts, b as PresenceKind, c as JoinInfo, d as Message, et as HubPresenceApi, f as MessagesPage, g as PlayerCard, h as Party, i as Counts, it as PlayerRef, j as RecentPlayer, k as RacerResult, l as Launch, m as NotifyPrefs, n as ChatMode, nt as OpenInviteOptions, o as FriendEntry, ot as SocialEvents, p as NotifyChange, q as RealtimeApi, r as Conversation, rt as PlayOnlineMethods, s as Invite, t as Audience, tt as HubSocialApi, u as LaunchTicket, v as Presence, w as RaceResult, x as RaceOutcome, y as PresenceInput, z as Suggestion } from "./shared/social.js";
|
|
11
|
+
import { $ as LeaderboardResult, A as OUTBOX_MAX_ENTRIES, B as Board, C as OfflineApi, D as OfflineListener, E as OfflineEventName, F as ProfilePatch, G as GameRecords, H as GameAnalytics, I as QueueOp, J as HubStatus, K as GlobalAnalytics, L as QueueOpInput, M as OfflineKindDefinition, N as ReplayContext, O as OfflineOp, P as CLIENT_VERSION_HEADER, Q as LeaderboardEntry, R as QueuedScoreOptions, S as SyncResult, T as OfflineEventDetails, U as GameInfo, V as BoardWithTop, W as GameLeaderboards, X as InventorySnapshot, Y as Inventory, Z as Json, _ as TradeNoteOptions, a as HubErrorDetails, at as SaveMeta, b as StatResult, c as Hub, ct as Stats, d as ClientSupport, dt as User, et as MeResponse, f as HubMenuControl, ft as EndpointFields, g as TradeListOptions, h as TradeId, ht as GamePayload, i as HubErrorCode, it as Save, j as OfflineHandler, k as OUTBOX_MAX_CHARS, l as createHub, lt as SubmitScoreOptions, m as TradeBundle, mt as EndpointReply, n as ContentRejectedError, nt as Profile, o as OfflineError, ot as SnapshotResponse, p as GrantBundle, pt as EndpointName, q as HubOptions, r as HubError, rt as ProfileSummary, s as UNSUPPORTED_BY_HUB, st as SortDir, t as HUB_CLIENT_VERSION, tt as Metrics, u as hub, ut as SubmitScoreResult, v as AuthResponse, w as OUTBOX_FULL_CODE, x as SyncConflict, y as ProfileUpdate, z as BufferedEvent } from "./shared/index.js";
|
|
12
12
|
//#region src/auto.d.ts
|
|
13
13
|
/** What `window.HubSDK` holds. */
|
|
14
14
|
export interface HubSdkGlobal {
|
|
@@ -32,5 +32,5 @@ declare global {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
//#endregion
|
|
35
|
-
export { type Anchor, type Audience, type AuthResponse, type AutoPauseOptions, type AxisDef, type AxisSide, type Board, type BoardWithTop, type BufferedEvent, type BusyOptions, CLIENT_VERSION_HEADER, type ChatMode, type ClientSupport, ContentRejectedError, type Conversation, type Counts, DAILY_SINGLETON_API, DAILY_START_EVENT, type DailyAll, type DailyChallenge, type DailyCompleteResponse, type DailyCompletion, type DailyCompletionMeta, type DailyCompletions, type DailyDefinition, type DailyEventDetail, type DailyGameStatus, type DailyHost, type DailyStartResponse, type DailyStatus, DailySystem, type DraggedSpot, type EdgeOffsets, type EndpointFields, type EndpointName, type EndpointReply, type ErrorBody, type FriendEntry, type GameAnalytics, type GameInfo, type GameLeaderboards, type GamePayload, type GameRecords, type GamepadMapping, type GlobalAnalytics, type GrantBundle, type GroupDef, HUB_CLIENT_VERSION, Hub, HubError, type HubErrorCode, type HubErrorDetails, type HubMenuControl, type HubMpApi, type HubNotifyApi, type HubOptions, type HubPresenceApi, type HubRaceApi, type HubRoom, type HubRoomsApi, type HubSocialApi, type HubStatus, INPUT_SINGLETON_API, type InputConfig, type InputDef, type InputEvents, type InputHost, type InputOptions, type InputOverrides, type InputReading, type InputSource, InputSystem, type InputSystemOptions, type Insets, type Inventory, type InventorySnapshot, type Invite, type InviteCreated, type InviteOptions, type InviteResult, type JoinInfo, type JoinInfoEvent, type JoinOptions, type Json, type Launch, type LaunchTicket, type LayoutBox, type LayoutItem, type LayoutOptions, type LeaderboardEntry, type LeaderboardResult, type MeResponse, type MenuBridge, type Message, type MessagesPage, type Metrics, type MouseMapping, type NavBlurEvent, type NavElement, type NavElementKind, type NavFocusEvent, type NavTarget, type NavigableDef, type Notice, type NotifyChange, type NotifyPrefs, OfflineError, type OpenInviteOptions, Overlay, type OverlayEdge, type OverlayEvent, type OverlayListener, type OverlayReason, type PageInputControl, type Party, type PlayerCard, type PlayerLite, type PlayerRef, type Presence, type PresenceInput, type PresenceKind, type Profile, type ProfilePatch, type ProfileSummary, type ProfileUpdate, type QueueOp, type QueueOpInput, type QueuedScoreOptions, type REALTIME_FAILED_EVENT, type REALTIME_FEATURE_VERSION, type REALTIME_READY_EVENT, type REALTIME_SINGLETON_API, type RaceCreateOptions, type RaceDefinition, type RaceEvents, type RaceHistory, type RaceHistoryQuery, type RaceHistoryViewOptions, type RaceHudPlace, type RaceOutcome, type RaceParams, type RaceRecord, type RaceRecordPlayer, type RaceResult, type RaceResultPlayer, type RaceRuntimeApi, type RaceStart, type RaceStatValue, type RaceState, type RaceStats, type RaceStatusEvent, type Racer, type RacerResult, type RacerState, type RealtimeApi, type RealtimeErrorShape, type RealtimeHubLink, type RecentPlayer, type Rect, type Relation, type ReportInput, type ReportKind, type ReportReason, type RoomChatLine, type RoomCreateOptions, type RoomEvents, type RoomInfo, type RoomListOptions, type RoomMessage, type RoomSeat, type RoomSelf, type RoomSendOptions, type RoomState, type RoomStateChange, type RoomStateOptions, type Save, type SaveMeta, type SchemaOutput, type ServerEvents, type Snapshot, type SnapshotResponse, type SocialConfig, type SocialCounts, type SocialEvents, type SocialMe, type SortDir, type StatResult, type Stats, type SubmitScoreOptions, type SubmitScoreResult, type Suggestion, type SuggestionStatus, type SyncConflict, type SyncResult, type TouchMapping, type TradeBundle, type TradeId, type TradeListOptions, type TradeNoteOptions, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, type UiStack, type UiStackHandoff, type User, type Vector, type VirtualControlType, type VirtualDef, type VirtualInputs, type VirtualOverride, boxesTouch, controlSize, createHub, type findRealtimeApi, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, type isRealtimeApi, isUiStack, layoutControls, type linkRealtimeToHub, type multiplayerForwarder as mp, type notifyForwarder as notify, parseInputOverrides, type presenceForwarder as presence, type raceForwarder as race, type roomsForwarder as rooms, type socialForwarder as social };
|
|
35
|
+
export { type Anchor, type Audience, type AuthResponse, type AutoPauseOptions, type AxisDef, type AxisSide, type Board, type BoardWithTop, type BufferedEvent, type BusyOptions, CLIENT_VERSION_HEADER, type ChatMode, type ClientSupport, ContentRejectedError, type Conversation, type Counts, DAILY_SINGLETON_API, DAILY_START_EVENT, type DailyAll, type DailyChallenge, type DailyCompleteResponse, type DailyCompletion, type DailyCompletionMeta, type DailyCompletions, type DailyDefinition, type DailyEventDetail, type DailyGameStatus, type DailyHost, type DailyStartResponse, type DailyStatus, DailySystem, type DraggedSpot, type EdgeOffsets, type EndpointFields, type EndpointName, type EndpointReply, type ErrorBody, type FriendEntry, type GameAnalytics, type GameInfo, type GameLeaderboards, type GamePayload, type GameRecords, type GamepadMapping, type GlobalAnalytics, type GrantBundle, type GroupDef, HUB_CLIENT_VERSION, Hub, HubError, type HubErrorCode, type HubErrorDetails, type HubMenuControl, type HubMpApi, type HubNotifyApi, type HubOptions, type HubPresenceApi, type HubRaceApi, type HubRoom, type HubRoomsApi, type HubSocialApi, type HubStatus, INPUT_SINGLETON_API, type InputConfig, type InputDef, type InputEvents, type InputHost, type InputOptions, type InputOverrides, type InputReading, type InputSource, InputSystem, type InputSystemOptions, type Insets, type Inventory, type InventorySnapshot, type Invite, type InviteCreated, type InviteLink, type InviteLinkMethods, type InviteOptions, type InviteResult, type JoinInfo, type JoinInfoEvent, type JoinOptions, type Json, type Launch, type LaunchTicket, type LayoutBox, type LayoutItem, type LayoutOptions, type LeaderboardEntry, type LeaderboardResult, type MeResponse, type MenuBridge, type Message, type MessagesPage, type Metrics, type MouseMapping, type NavBlurEvent, type NavElement, type NavElementKind, type NavFocusEvent, type NavTarget, type NavigableDef, type Notice, type NotifyChange, type NotifyPrefs, OUTBOX_FULL_CODE, OUTBOX_MAX_CHARS, OUTBOX_MAX_ENTRIES, OfflineApi, OfflineError, type OfflineEventDetails, type OfflineEventName, type OfflineHandler, type OfflineKindDefinition, type OfflineListener, type OfflineOp, type OpenInviteOptions, Overlay, type OverlayEdge, type OverlayEvent, type OverlayListener, type OverlayReason, type PageInputControl, type Party, type PlayOnlineMethods, type PlayerCard, type PlayerLite, type PlayerRef, type Presence, type PresenceInput, type PresenceKind, type Profile, type ProfilePatch, type ProfileSummary, type ProfileUpdate, type QueueOp, type QueueOpInput, type QueuedScoreOptions, type REALTIME_FAILED_EVENT, type REALTIME_FEATURE_VERSION, type REALTIME_READY_EVENT, type REALTIME_SINGLETON_API, type RaceCreateOptions, type RaceDefinition, type RaceEvents, type RaceHistory, type RaceHistoryQuery, type RaceHistoryViewOptions, type RaceHudPlace, type RaceOutcome, type RaceParams, type RaceRecord, type RaceRecordPlayer, type RaceResult, type RaceResultPlayer, type RaceRuntimeApi, type RaceStart, type RaceStatValue, type RaceState, type RaceStats, type RaceStatusEvent, type Racer, type RacerResult, type RacerState, type RealtimeApi, type RealtimeErrorShape, type RealtimeHubLink, type RecentPlayer, type Rect, type Relation, type ReplayContext, type ReportInput, type ReportKind, type ReportReason, type RoomChatLine, type RoomCreateOptions, type RoomEvents, type RoomInfo, type RoomListOptions, type RoomMessage, type RoomReclaimMethods, type RoomSeat, type RoomSeatChange, type RoomSelf, type RoomSendOptions, type RoomState, type RoomStateChange, type RoomStateOptions, type Save, type SaveMeta, type SchemaOutput, type ServerEvents, type Snapshot, type SnapshotResponse, type SocialConfig, type SocialCounts, type SocialEvents, type SocialMe, type SortDir, type StatResult, type Stats, type SubmitScoreOptions, type SubmitScoreResult, type Suggestion, type SuggestionStatus, type SyncConflict, type SyncResult, type TouchMapping, type TradeBundle, type TradeId, type TradeListOptions, type TradeNoteOptions, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, type UiStack, type UiStackHandoff, type User, type Vector, type VirtualControlType, type VirtualDef, type VirtualInputs, type VirtualOverride, boxesTouch, controlSize, createHub, type findRealtimeApi, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, type isRealtimeApi, isUiStack, layoutControls, type linkRealtimeToHub, type multiplayerForwarder as mp, type notifyForwarder as notify, parseInputOverrides, type presenceForwarder as presence, type raceForwarder as race, type roomsForwarder as rooms, type socialForwarder as social };
|
|
36
36
|
//# sourceMappingURL=auto.d.ts.map
|
package/dist/auto.js
CHANGED
|
@@ -2,7 +2,7 @@ import { a as DailySystem, i as DAILY_START_EVENT, n as getDaily, r as isDailySy
|
|
|
2
2
|
import { t as HUB_CLIENT_VERSION } from "./shared/client-version.gen.js";
|
|
3
3
|
import { a as isPageInputControl, c as layoutControls, i as parseInputOverrides, l as boxesTouch, n as getInput, o as InputSystem, r as isInputSystem, s as Overlay, t as INPUT_SINGLETON_API, u as controlSize } from "./shared/input.js";
|
|
4
4
|
import { n as isUiStack, r as UI_STACK_VERSION, t as getUiStack } from "./shared/page-stack.js";
|
|
5
|
-
import { a as
|
|
5
|
+
import { a as OUTBOX_FULL_CODE, c as OfflineApi, d as OfflineError, f as UNSUPPORTED_BY_HUB, i as CLIENT_VERSION_HEADER, l as ContentRejectedError, n as createHub, o as OUTBOX_MAX_CHARS, r as hub, s as OUTBOX_MAX_ENTRIES, t as Hub, u as HubError } from "./shared/src.js";
|
|
6
6
|
//#region src/auto.ts
|
|
7
7
|
/**
|
|
8
8
|
* `@diffenderfer-games/hub/auto`: everything the main entry exports, plus a
|
|
@@ -22,6 +22,6 @@ if (typeof window !== "undefined") window.HubSDK = {
|
|
|
22
22
|
ContentRejectedError
|
|
23
23
|
};
|
|
24
24
|
//#endregion
|
|
25
|
-
export { CLIENT_VERSION_HEADER, ContentRejectedError, DAILY_SINGLETON_API, DAILY_START_EVENT, DailySystem, HUB_CLIENT_VERSION, Hub, HubError, INPUT_SINGLETON_API, InputSystem, OfflineError, Overlay, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, boxesTouch, controlSize, createHub, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, isUiStack, layoutControls, parseInputOverrides };
|
|
25
|
+
export { CLIENT_VERSION_HEADER, ContentRejectedError, DAILY_SINGLETON_API, DAILY_START_EVENT, DailySystem, HUB_CLIENT_VERSION, Hub, HubError, INPUT_SINGLETON_API, InputSystem, OUTBOX_FULL_CODE, OUTBOX_MAX_CHARS, OUTBOX_MAX_ENTRIES, OfflineApi, OfflineError, Overlay, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, boxesTouch, controlSize, createHub, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, isUiStack, layoutControls, parseInputOverrides };
|
|
26
26
|
|
|
27
27
|
//# sourceMappingURL=auto.js.map
|
package/dist/doctor/cli.mjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { join, resolve } from "node:path";
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
|
-
import { GamePackageJson, HubVersion } from "@diffenderfer-games/hub-contract";
|
|
5
|
+
import { GAME_LABELS, GamePackageJson, HubVersion, splitGameLabels } from "@diffenderfer-games/hub-contract";
|
|
6
6
|
//#region src/core/version/client-version.gen.ts
|
|
7
7
|
/** This client's package version, sent as `x-hub-client` on REST calls and `client` in `hello`. */
|
|
8
|
-
const HUB_CLIENT_VERSION = "2.0.0-next.
|
|
8
|
+
const HUB_CLIENT_VERSION = "2.0.0-next.2";
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/core/version/semver.ts
|
|
11
11
|
const VERSION_PATTERN = /^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;
|
|
@@ -174,11 +174,18 @@ function checkVendoredCopies(gameDir) {
|
|
|
174
174
|
/** The `package.json` `game.*` block against the contract's manifest schema. */
|
|
175
175
|
function checkManifest(packageJson) {
|
|
176
176
|
const parsed = GamePackageJson.safeParse(packageJson);
|
|
177
|
-
if (parsed.success)
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
if (parsed.success) {
|
|
178
|
+
const unknownLabels = splitGameLabels(parsed.data.game.labels ?? []).unknown;
|
|
179
|
+
return [{
|
|
180
|
+
level: "info",
|
|
181
|
+
check: "manifest",
|
|
182
|
+
message: `the game.* block is valid (${parsed.data.game.type})`
|
|
183
|
+
}, ...unknownLabels.map((label) => ({
|
|
184
|
+
level: "warning",
|
|
185
|
+
check: "manifest",
|
|
186
|
+
message: `game.labels: "${label}" is not a known label (the catalog ignores it); use any of ${GAME_LABELS.join(", ")}`
|
|
187
|
+
}))];
|
|
188
|
+
}
|
|
182
189
|
return parsed.error.issues.map((issue) => ({
|
|
183
190
|
level: "error",
|
|
184
191
|
check: "manifest",
|
package/dist/doctor/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.mjs","names":[],"sources":["../../src/core/version/client-version.gen.ts","../../src/core/version/semver.ts","../../src/core/version/hub-version.ts","../../src/doctor/hub-version-fetch.ts","../../src/doctor/checks.ts","../../src/doctor/cli.ts"],"mappings":";;;;;;;AAEA,MAAa,qBAAqB;;;ACclC,MAAM,kBAAkB;;AAGxB,SAAgB,aAAa,MAAyC;CACpE,MAAM,QAAQ,gBAAgB,KAAK,KAAK,KAAK,CAAC;CAC9C,IAAI,UAAU,MACZ;CAEF,MAAM,GAAG,QAAQ,KAAK,QAAQ,KAAK,QAAQ,KAAK,cAAc;CAC9D,OAAO;EAAE,SAAS;GAAC,OAAO,KAAK;GAAG,OAAO,KAAK;GAAG,OAAO,KAAK;EAAC;EAAG,YAAY,eAAe,KAAA,IAAY,CAAC,IAAI,WAAW,MAAM,GAAG;CAAE;AACrI;;AAGA,SAAS,mBAAmB,OAAe,QAAwB;CACjE,MAAM,iBAAiB,QAAQ,KAAK,KAAK;CACzC,MAAM,kBAAkB,QAAQ,KAAK,MAAM;CAC3C,IAAI,kBAAkB,iBACpB,OAAO,OAAO,KAAK,IAAI,OAAO,MAAM;CAEtC,IAAI,mBAAmB,iBACrB,OAAO,iBAAiB,KAAK;CAE/B,OAAO,QAAQ,SAAS,KAAK,QAAQ,SAAS,IAAI;AACpD;;AAGA,SAAgB,gBAAgB,OAAsB,QAA+B;CACnF,KAAK,IAAI,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG;EAC7B,MAAM,cAAc,MAAM,QAAQ,MAAM,MAAM,OAAO,QAAQ,MAAM;EACnE,IAAI,eAAe,GACjB,OAAO;CAEX;CACA,IAAI,MAAM,WAAW,WAAW,KAAK,OAAO,WAAW,WAAW,GAChE,OAAO,OAAO,WAAW,SAAS,MAAM,WAAW;CAErD,MAAM,SAAS,KAAK,IAAI,MAAM,WAAW,QAAQ,OAAO,WAAW,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AK;EAAa,CAAC;EACpL,KAAK,WACH,OAAO,CAAC;GAAE,OAAO;GAAQ,OAAO;GAAW,SAAS;EAAqF,CAAC;EAC5I,KAAK,aACH,OAAO,CAAC;GAAE,OAAO;GAAQ,OAAO;GAAW,SAAS,2BAA2B,iBAAiB,qBAAqB,YAAY,UAAU,IAAI;EAAG,CAAC;CACvJ;AACF;;AAGA,MAAM,qBAAqB;CACzB;CACA;CACA;CACA;AACF;;AAGA,SAAgB,oBAAoB,SAA4B;CAC9D,OAAO,mBAAmB,QAAQ,aAAa,WAAW,KAAK,SAAS,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,cAAc;EACrG,OAAO;EACP,OAAO;EACP,SAAS,GAAG,SAAS;CACvB,EAAE;AACJ;;AAIA,SAAgB,cAAc,aAAiC;CAC7D,MAAM,SAAS,gBAAgB,UAAU,WAAW;CACpD,IAAI,OAAO,
|
|
1
|
+
{"version":3,"file":"cli.mjs","names":[],"sources":["../../src/core/version/client-version.gen.ts","../../src/core/version/semver.ts","../../src/core/version/hub-version.ts","../../src/doctor/hub-version-fetch.ts","../../src/doctor/checks.ts","../../src/doctor/cli.ts"],"mappings":";;;;;;;AAEA,MAAa,qBAAqB;;;ACclC,MAAM,kBAAkB;;AAGxB,SAAgB,aAAa,MAAyC;CACpE,MAAM,QAAQ,gBAAgB,KAAK,KAAK,KAAK,CAAC;CAC9C,IAAI,UAAU,MACZ;CAEF,MAAM,GAAG,QAAQ,KAAK,QAAQ,KAAK,QAAQ,KAAK,cAAc;CAC9D,OAAO;EAAE,SAAS;GAAC,OAAO,KAAK;GAAG,OAAO,KAAK;GAAG,OAAO,KAAK;EAAC;EAAG,YAAY,eAAe,KAAA,IAAY,CAAC,IAAI,WAAW,MAAM,GAAG;CAAE;AACrI;;AAGA,SAAS,mBAAmB,OAAe,QAAwB;CACjE,MAAM,iBAAiB,QAAQ,KAAK,KAAK;CACzC,MAAM,kBAAkB,QAAQ,KAAK,MAAM;CAC3C,IAAI,kBAAk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ACT;AAEA,eAAe,UAAU,SAA4C;CACnE,MAAM,WAAsB,CAAC;CAC7B,IAAI,CAAC,QAAQ,WACX,SAAS,KAAK,GAAG,mBAAmB,uBAAuB,QAAQ,OAAO,GAAG,MAAM,gBAAgB,QAAQ,QAAQ,QAAQ,SAAS,CAAC,CAAC;CAExI,SAAS,KAAK,GAAG,oBAAoB,QAAQ,OAAO,CAAC;CACrD,IAAI;EACF,SAAS,KAAK,GAAG,cAAc,aAAa,KAAK,QAAQ,SAAS,cAAc,CAAC,CAAC,CAAC;CACrF,SAAS,SAAS;EAChB,SAAS,KAAK;GAAE,OAAO;GAAS,OAAO;GAAY,SAAS,gCAAgC,mBAAmB,QAAQ,QAAQ,UAAU,OAAO,OAAO;EAAI,CAAC;CAC9J;CACA,OAAO;AACT;AAEA,MAAM,UAAU,YAAY;AAC5B,MAAM,WAAW,MAAM,UAAU,OAAO;AACxC,IAAI,QAAQ,QACV,QAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,EAAE,SAAS,GAAG,MAAM,CAAC,EAAE,GAAG;KAEjE,KAAK,MAAM,WAAW,UACpB,QAAQ,OAAO,MAAM,GAAG,QAAQ,MAAM,OAAO,CAAC,EAAE,GAAG,QAAQ,MAAM,IAAI,QAAQ,QAAQ,GAAG;AAG5F,QAAQ,WAAW,SAAS,MAAM,YAAY,QAAQ,UAAU,OAAO,IAAI,IAAI"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as RaceRecordPlayer, c as RealtimeErrorShape, d as RoomSeat, f as RoomSeatChange, g as Snapshot, h as ServerEvents, i as RaceHistory, l as RoomChatLine, m as SchemaOutput, n as InviteLink, o as RaceResultPlayer, p as RoomStateChange, r as Notice, s as RaceStatusEvent, t as InviteCreated, u as RoomMessage } from "./shared/wire-types.js";
|
|
2
2
|
import { _ as DailyStatus, a as isDailySystem, c as DailyAll, d as DailyCompletionMeta, f as DailyDefinition, g as DailyStartResponse, h as DailyHost, i as getDaily, l as DailyChallenge, m as DailyGameStatus, n as DailyCompletions, o as DAILY_START_EVENT, p as DailyEventDetail, r as DAILY_SINGLETON_API, s as DailySystem, t as DailyCompletion, u as DailyCompleteResponse } from "./shared/daily.js";
|
|
3
3
|
import { $ as VirtualControlType, A as AxisSide, B as InputReading, C as parseInputOverrides, D as isPageInputControl, E as PageInputControl, F as InputConfig, G as NavElement, H as MenuBridge, I as InputDef, J as NavTarget, K as NavElementKind, L as InputEvents, M as EdgeOffsets, N as GamepadMapping, O as Anchor, P as GroupDef, Q as Vector, R as InputHost, S as isInputSystem, T as InputSystemOptions, U as MouseMapping, V as InputSource, W as NavBlurEvent, X as Rect, Y as NavigableDef, Z as TouchMapping, _ as boxesTouch, a as OverlayEdge, b as InputOptions, c as OverlayReason, d as LayoutOptions, et as VirtualDef, f as layoutControls, g as LayoutItem, h as LayoutBox, i as AutoPauseOptions, j as DraggedSpot, k as AxisDef, l as UiStack, m as Insets, n as getUiStack, nt as VirtualOverride, o as OverlayEvent, p as Overlay, q as NavFocusEvent, r as isUiStack, s as OverlayListener, t as UI_STACK_VERSION, tt as VirtualInputs, u as UiStackHandoff, v as controlSize, w as InputSystem, x as getInput, y as INPUT_SINGLETON_API, z as InputOverrides } from "./shared/input.js";
|
|
4
|
-
import { a as
|
|
4
|
+
import { a as InviteResult, i as InviteOptions, n as HubMpApi, o as JoinInfoEvent, r as InviteLinkMethods, t as BusyOptions } from "./shared/multiplayer-types.js";
|
|
5
5
|
import { o as multiplayerForwarder } from "./shared/mp.js";
|
|
6
|
-
import { a as RoomEvents, c as
|
|
6
|
+
import { a as RoomEvents, c as RoomSelf, d as RoomStateOptions, i as RoomCreateOptions, l as RoomSendOptions, n as HubRoomsApi, o as RoomListOptions, r as JoinOptions, s as RoomReclaimMethods, t as HubRoom, u as RoomState } from "./shared/room-types.js";
|
|
7
7
|
import { a as RaceHistoryQuery, c as RaceRuntimeApi, i as RaceEvents, l as RaceStart, n as RaceCreateOptions, o as RaceHistoryViewOptions, r as RaceDefinition, s as RaceHudPlace, t as HubRaceApi } from "./shared/race-types.js";
|
|
8
8
|
import { f as raceForwarder } from "./shared/race.js";
|
|
9
9
|
import { n as roomsForwarder } from "./shared/rooms.js";
|
|
10
|
-
import { $ as HubNotifyApi, A as RacerState, B as SuggestionStatus, C as RaceRecord, D as RaceStats, E as RaceState, F as ReportReason, G as REALTIME_READY_EVENT, H as isRealtimeApi, I as RoomInfo, J as RealtimeHubLink, K as REALTIME_SINGLETON_API, L as SocialConfig, M as Relation, N as ReportInput, O as Racer, P as ReportKind, Q as socialForwarder, R as SocialMe, S as RaceParams, T as RaceStatValue, U as REALTIME_FAILED_EVENT, V as findRealtimeApi, W as REALTIME_FEATURE_VERSION, X as notifyForwarder, Y as linkRealtimeToHub, Z as presenceForwarder, _ as PlayerLite, a as ErrorBody, at as
|
|
11
|
-
import { $ as
|
|
12
|
-
export { type Anchor, type Audience, type AuthResponse, type AutoPauseOptions, type AxisDef, type AxisSide, type Board, type BoardWithTop, type BufferedEvent, type BusyOptions, CLIENT_VERSION_HEADER, type ChatMode, type ClientSupport, ContentRejectedError, type Conversation, type Counts, DAILY_SINGLETON_API, DAILY_START_EVENT, type DailyAll, type DailyChallenge, type DailyCompleteResponse, type DailyCompletion, type DailyCompletionMeta, type DailyCompletions, type DailyDefinition, type DailyEventDetail, type DailyGameStatus, type DailyHost, type DailyStartResponse, type DailyStatus, DailySystem, type DraggedSpot, type EdgeOffsets, type EndpointFields, type EndpointName, type EndpointReply, type ErrorBody, type FriendEntry, type GameAnalytics, type GameInfo, type GameLeaderboards, type GamePayload, type GameRecords, type GamepadMapping, type GlobalAnalytics, type GrantBundle, type GroupDef, HUB_CLIENT_VERSION, Hub, HubError, type HubErrorCode, type HubErrorDetails, type HubMenuControl, type HubMpApi, type HubNotifyApi, type HubOptions, type HubPresenceApi, type HubRaceApi, type HubRoom, type HubRoomsApi, type HubSocialApi, type HubStatus, INPUT_SINGLETON_API, type InputConfig, type InputDef, type InputEvents, type InputHost, type InputOptions, type InputOverrides, type InputReading, type InputSource, InputSystem, type InputSystemOptions, type Insets, type Inventory, type InventorySnapshot, type Invite, type InviteCreated, type InviteOptions, type InviteResult, type JoinInfo, type JoinInfoEvent, type JoinOptions, type Json, type Launch, type LaunchTicket, type LayoutBox, type LayoutItem, type LayoutOptions, type LeaderboardEntry, type LeaderboardResult, type MeResponse, type MenuBridge, type Message, type MessagesPage, type Metrics, type MouseMapping, type NavBlurEvent, type NavElement, type NavElementKind, type NavFocusEvent, type NavTarget, type NavigableDef, type Notice, type NotifyChange, type NotifyPrefs, OfflineError, type OpenInviteOptions, Overlay, type OverlayEdge, type OverlayEvent, type OverlayListener, type OverlayReason, type PageInputControl, type Party, type PlayerCard, type PlayerLite, type PlayerRef, type Presence, type PresenceInput, type PresenceKind, type Profile, type ProfilePatch, type ProfileSummary, type ProfileUpdate, type QueueOp, type QueueOpInput, type QueuedScoreOptions, type REALTIME_FAILED_EVENT, type REALTIME_FEATURE_VERSION, type REALTIME_READY_EVENT, type REALTIME_SINGLETON_API, type RaceCreateOptions, type RaceDefinition, type RaceEvents, type RaceHistory, type RaceHistoryQuery, type RaceHistoryViewOptions, type RaceHudPlace, type RaceOutcome, type RaceParams, type RaceRecord, type RaceRecordPlayer, type RaceResult, type RaceResultPlayer, type RaceRuntimeApi, type RaceStart, type RaceStatValue, type RaceState, type RaceStats, type RaceStatusEvent, type Racer, type RacerResult, type RacerState, type RealtimeApi, type RealtimeErrorShape, type RealtimeHubLink, type RecentPlayer, type Rect, type Relation, type ReportInput, type ReportKind, type ReportReason, type RoomChatLine, type RoomCreateOptions, type RoomEvents, type RoomInfo, type RoomListOptions, type RoomMessage, type RoomSeat, type RoomSelf, type RoomSendOptions, type RoomState, type RoomStateChange, type RoomStateOptions, type Save, type SaveMeta, type SchemaOutput, type ServerEvents, type Snapshot, type SnapshotResponse, type SocialConfig, type SocialCounts, type SocialEvents, type SocialMe, type SortDir, type StatResult, type Stats, type SubmitScoreOptions, type SubmitScoreResult, type Suggestion, type SuggestionStatus, type SyncConflict, type SyncResult, type TouchMapping, type TradeBundle, type TradeId, type TradeListOptions, type TradeNoteOptions, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, type UiStack, type UiStackHandoff, type User, type Vector, type VirtualControlType, type VirtualDef, type VirtualInputs, type VirtualOverride, boxesTouch, controlSize, createHub, type findRealtimeApi, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, type isRealtimeApi, isUiStack, layoutControls, type linkRealtimeToHub, type multiplayerForwarder as mp, type notifyForwarder as notify, parseInputOverrides, type presenceForwarder as presence, type raceForwarder as race, type roomsForwarder as rooms, type socialForwarder as social };
|
|
10
|
+
import { $ as HubNotifyApi, A as RacerState, B as SuggestionStatus, C as RaceRecord, D as RaceStats, E as RaceState, F as ReportReason, G as REALTIME_READY_EVENT, H as isRealtimeApi, I as RoomInfo, J as RealtimeHubLink, K as REALTIME_SINGLETON_API, L as SocialConfig, M as Relation, N as ReportInput, O as Racer, P as ReportKind, Q as socialForwarder, R as SocialMe, S as RaceParams, T as RaceStatValue, U as REALTIME_FAILED_EVENT, V as findRealtimeApi, W as REALTIME_FEATURE_VERSION, X as notifyForwarder, Y as linkRealtimeToHub, Z as presenceForwarder, _ as PlayerLite, a as ErrorBody, at as SocialCounts, b as PresenceKind, c as JoinInfo, d as Message, et as HubPresenceApi, f as MessagesPage, g as PlayerCard, h as Party, i as Counts, it as PlayerRef, j as RecentPlayer, k as RacerResult, l as Launch, m as NotifyPrefs, n as ChatMode, nt as OpenInviteOptions, o as FriendEntry, ot as SocialEvents, p as NotifyChange, q as RealtimeApi, r as Conversation, rt as PlayOnlineMethods, s as Invite, t as Audience, tt as HubSocialApi, u as LaunchTicket, v as Presence, w as RaceResult, x as RaceOutcome, y as PresenceInput, z as Suggestion } from "./shared/social.js";
|
|
11
|
+
import { $ as LeaderboardResult, A as OUTBOX_MAX_ENTRIES, B as Board, C as OfflineApi, D as OfflineListener, E as OfflineEventName, F as ProfilePatch, G as GameRecords, H as GameAnalytics, I as QueueOp, J as HubStatus, K as GlobalAnalytics, L as QueueOpInput, M as OfflineKindDefinition, N as ReplayContext, O as OfflineOp, P as CLIENT_VERSION_HEADER, Q as LeaderboardEntry, R as QueuedScoreOptions, S as SyncResult, T as OfflineEventDetails, U as GameInfo, V as BoardWithTop, W as GameLeaderboards, X as InventorySnapshot, Y as Inventory, Z as Json, _ as TradeNoteOptions, a as HubErrorDetails, at as SaveMeta, b as StatResult, c as Hub, ct as Stats, d as ClientSupport, dt as User, et as MeResponse, f as HubMenuControl, ft as EndpointFields, g as TradeListOptions, h as TradeId, ht as GamePayload, i as HubErrorCode, it as Save, j as OfflineHandler, k as OUTBOX_MAX_CHARS, l as createHub, lt as SubmitScoreOptions, m as TradeBundle, mt as EndpointReply, n as ContentRejectedError, nt as Profile, o as OfflineError, ot as SnapshotResponse, p as GrantBundle, pt as EndpointName, q as HubOptions, r as HubError, rt as ProfileSummary, s as UNSUPPORTED_BY_HUB, st as SortDir, t as HUB_CLIENT_VERSION, tt as Metrics, u as hub, ut as SubmitScoreResult, v as AuthResponse, w as OUTBOX_FULL_CODE, x as SyncConflict, y as ProfileUpdate, z as BufferedEvent } from "./shared/index.js";
|
|
12
|
+
export { type Anchor, type Audience, type AuthResponse, type AutoPauseOptions, type AxisDef, type AxisSide, type Board, type BoardWithTop, type BufferedEvent, type BusyOptions, CLIENT_VERSION_HEADER, type ChatMode, type ClientSupport, ContentRejectedError, type Conversation, type Counts, DAILY_SINGLETON_API, DAILY_START_EVENT, type DailyAll, type DailyChallenge, type DailyCompleteResponse, type DailyCompletion, type DailyCompletionMeta, type DailyCompletions, type DailyDefinition, type DailyEventDetail, type DailyGameStatus, type DailyHost, type DailyStartResponse, type DailyStatus, DailySystem, type DraggedSpot, type EdgeOffsets, type EndpointFields, type EndpointName, type EndpointReply, type ErrorBody, type FriendEntry, type GameAnalytics, type GameInfo, type GameLeaderboards, type GamePayload, type GameRecords, type GamepadMapping, type GlobalAnalytics, type GrantBundle, type GroupDef, HUB_CLIENT_VERSION, Hub, HubError, type HubErrorCode, type HubErrorDetails, type HubMenuControl, type HubMpApi, type HubNotifyApi, type HubOptions, type HubPresenceApi, type HubRaceApi, type HubRoom, type HubRoomsApi, type HubSocialApi, type HubStatus, INPUT_SINGLETON_API, type InputConfig, type InputDef, type InputEvents, type InputHost, type InputOptions, type InputOverrides, type InputReading, type InputSource, InputSystem, type InputSystemOptions, type Insets, type Inventory, type InventorySnapshot, type Invite, type InviteCreated, type InviteLink, type InviteLinkMethods, type InviteOptions, type InviteResult, type JoinInfo, type JoinInfoEvent, type JoinOptions, type Json, type Launch, type LaunchTicket, type LayoutBox, type LayoutItem, type LayoutOptions, type LeaderboardEntry, type LeaderboardResult, type MeResponse, type MenuBridge, type Message, type MessagesPage, type Metrics, type MouseMapping, type NavBlurEvent, type NavElement, type NavElementKind, type NavFocusEvent, type NavTarget, type NavigableDef, type Notice, type NotifyChange, type NotifyPrefs, OUTBOX_FULL_CODE, OUTBOX_MAX_CHARS, OUTBOX_MAX_ENTRIES, OfflineApi, OfflineError, type OfflineEventDetails, type OfflineEventName, type OfflineHandler, type OfflineKindDefinition, type OfflineListener, type OfflineOp, type OpenInviteOptions, Overlay, type OverlayEdge, type OverlayEvent, type OverlayListener, type OverlayReason, type PageInputControl, type Party, type PlayOnlineMethods, type PlayerCard, type PlayerLite, type PlayerRef, type Presence, type PresenceInput, type PresenceKind, type Profile, type ProfilePatch, type ProfileSummary, type ProfileUpdate, type QueueOp, type QueueOpInput, type QueuedScoreOptions, type REALTIME_FAILED_EVENT, type REALTIME_FEATURE_VERSION, type REALTIME_READY_EVENT, type REALTIME_SINGLETON_API, type RaceCreateOptions, type RaceDefinition, type RaceEvents, type RaceHistory, type RaceHistoryQuery, type RaceHistoryViewOptions, type RaceHudPlace, type RaceOutcome, type RaceParams, type RaceRecord, type RaceRecordPlayer, type RaceResult, type RaceResultPlayer, type RaceRuntimeApi, type RaceStart, type RaceStatValue, type RaceState, type RaceStats, type RaceStatusEvent, type Racer, type RacerResult, type RacerState, type RealtimeApi, type RealtimeErrorShape, type RealtimeHubLink, type RecentPlayer, type Rect, type Relation, type ReplayContext, type ReportInput, type ReportKind, type ReportReason, type RoomChatLine, type RoomCreateOptions, type RoomEvents, type RoomInfo, type RoomListOptions, type RoomMessage, type RoomReclaimMethods, type RoomSeat, type RoomSeatChange, type RoomSelf, type RoomSendOptions, type RoomState, type RoomStateChange, type RoomStateOptions, type Save, type SaveMeta, type SchemaOutput, type ServerEvents, type Snapshot, type SnapshotResponse, type SocialConfig, type SocialCounts, type SocialEvents, type SocialMe, type SortDir, type StatResult, type Stats, type SubmitScoreOptions, type SubmitScoreResult, type Suggestion, type SuggestionStatus, type SyncConflict, type SyncResult, type TouchMapping, type TradeBundle, type TradeId, type TradeListOptions, type TradeNoteOptions, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, type UiStack, type UiStackHandoff, type User, type Vector, type VirtualControlType, type VirtualDef, type VirtualInputs, type VirtualOverride, boxesTouch, controlSize, createHub, type findRealtimeApi, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, type isRealtimeApi, isUiStack, layoutControls, type linkRealtimeToHub, type multiplayerForwarder as mp, type notifyForwarder as notify, parseInputOverrides, type presenceForwarder as presence, type raceForwarder as race, type roomsForwarder as rooms, type socialForwarder as social };
|
package/dist/index.js
CHANGED
|
@@ -2,5 +2,5 @@ import { a as DailySystem, i as DAILY_START_EVENT, n as getDaily, r as isDailySy
|
|
|
2
2
|
import { t as HUB_CLIENT_VERSION } from "./shared/client-version.gen.js";
|
|
3
3
|
import { a as isPageInputControl, c as layoutControls, i as parseInputOverrides, l as boxesTouch, n as getInput, o as InputSystem, r as isInputSystem, s as Overlay, t as INPUT_SINGLETON_API, u as controlSize } from "./shared/input.js";
|
|
4
4
|
import { n as isUiStack, r as UI_STACK_VERSION, t as getUiStack } from "./shared/page-stack.js";
|
|
5
|
-
import { a as
|
|
6
|
-
export { CLIENT_VERSION_HEADER, ContentRejectedError, DAILY_SINGLETON_API, DAILY_START_EVENT, DailySystem, HUB_CLIENT_VERSION, Hub, HubError, INPUT_SINGLETON_API, InputSystem, OfflineError, Overlay, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, boxesTouch, controlSize, createHub, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, isUiStack, layoutControls, parseInputOverrides };
|
|
5
|
+
import { a as OUTBOX_FULL_CODE, c as OfflineApi, d as OfflineError, f as UNSUPPORTED_BY_HUB, i as CLIENT_VERSION_HEADER, l as ContentRejectedError, n as createHub, o as OUTBOX_MAX_CHARS, r as hub, s as OUTBOX_MAX_ENTRIES, t as Hub, u as HubError } from "./shared/src.js";
|
|
6
|
+
export { CLIENT_VERSION_HEADER, ContentRejectedError, DAILY_SINGLETON_API, DAILY_START_EVENT, DailySystem, HUB_CLIENT_VERSION, Hub, HubError, INPUT_SINGLETON_API, InputSystem, OUTBOX_FULL_CODE, OUTBOX_MAX_CHARS, OUTBOX_MAX_ENTRIES, OfflineApi, OfflineError, Overlay, UI_STACK_VERSION, UNSUPPORTED_BY_HUB, boxesTouch, controlSize, createHub, getDaily, getInput, getUiStack, hub, isDailySystem, isInputSystem, isPageInputControl, isUiStack, layoutControls, parseInputOverrides };
|
package/dist/mp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as InviteCreated } from "./shared/wire-types.js";
|
|
2
|
-
import { a as
|
|
1
|
+
import { n as InviteLink, t as InviteCreated } from "./shared/wire-types.js";
|
|
2
|
+
import { a as InviteResult, i as InviteOptions, n as HubMpApi, o as JoinInfoEvent, r as InviteLinkMethods, t as BusyOptions } from "./shared/multiplayer-types.js";
|
|
3
3
|
import { a as Party, i as LaunchTicket, n as JoinInfo, o as multiplayerForwarder, r as Launch, t as Invite } from "./shared/mp.js";
|
|
4
|
-
export { type BusyOptions, type HubMpApi, type Invite, type InviteCreated, type InviteOptions, type InviteResult, type JoinInfo, type JoinInfoEvent, type Launch, type LaunchTicket, type Party, multiplayerForwarder as mp };
|
|
4
|
+
export { type BusyOptions, type HubMpApi, type Invite, type InviteCreated, type InviteLink, type InviteLinkMethods, type InviteOptions, type InviteResult, type JoinInfo, type JoinInfoEvent, type Launch, type LaunchTicket, type Party, multiplayerForwarder as mp };
|
package/dist/race.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as RaceRecordPlayer, i as RaceHistory, o as RaceResultPlayer, s as RaceStatusEvent } from "./shared/wire-types.js";
|
|
2
2
|
import { a as RaceHistoryQuery, c as RaceRuntimeApi, i as RaceEvents, l as RaceStart, n as RaceCreateOptions, o as RaceHistoryViewOptions, r as RaceDefinition, s as RaceHudPlace, t as HubRaceApi } from "./shared/race-types.js";
|
|
3
3
|
import { a as RaceStatValue, c as Racer, d as RoomInfo, f as raceForwarder, i as RaceResult, l as RacerResult, n as RaceParams, o as RaceState, r as RaceRecord, s as RaceStats, t as RaceOutcome, u as RacerState } from "./shared/race.js";
|
|
4
4
|
export { type HubRaceApi, type RaceCreateOptions, type RaceDefinition, type RaceEvents, type RaceHistory, type RaceHistoryQuery, type RaceHistoryViewOptions, type RaceHudPlace, type RaceOutcome, type RaceParams, type RaceRecord, type RaceRecordPlayer, type RaceResult, type RaceResultPlayer, type RaceRuntimeApi, type RaceStart, type RaceStatValue, type RaceState, type RaceStats, type RaceStatusEvent, type Racer, type RacerResult, type RacerState, type RoomInfo, raceForwarder as race };
|
package/dist/rooms.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as RoomEvents, c as
|
|
1
|
+
import { d as RoomSeat, f as RoomSeatChange, l as RoomChatLine, p as RoomStateChange, u as RoomMessage } from "./shared/wire-types.js";
|
|
2
|
+
import { a as RoomEvents, c as RoomSelf, d as RoomStateOptions, i as RoomCreateOptions, l as RoomSendOptions, n as HubRoomsApi, o as RoomListOptions, r as JoinOptions, s as RoomReclaimMethods, t as HubRoom, u as RoomState } from "./shared/room-types.js";
|
|
3
3
|
import { n as roomsForwarder, t as RoomInfo } from "./shared/rooms.js";
|
|
4
|
-
export { type HubRoom, type HubRoomsApi, type JoinOptions, type RoomChatLine, type RoomCreateOptions, type RoomEvents, type RoomInfo, type RoomListOptions, type RoomMessage, type RoomSeat, type RoomSelf, type RoomSendOptions, type RoomState, type RoomStateChange, type RoomStateOptions, roomsForwarder as rooms };
|
|
4
|
+
export { type HubRoom, type HubRoomsApi, type JoinOptions, type RoomChatLine, type RoomCreateOptions, type RoomEvents, type RoomInfo, type RoomListOptions, type RoomMessage, type RoomReclaimMethods, type RoomSeat, type RoomSeatChange, type RoomSelf, type RoomSendOptions, type RoomState, type RoomStateChange, type RoomStateOptions, roomsForwarder as rooms };
|
package/dist/shared/bridge.js
CHANGED
|
@@ -47,9 +47,11 @@ function hubLink() {
|
|
|
47
47
|
//#region src/realtime/runtime-api.ts
|
|
48
48
|
/**
|
|
49
49
|
* The realtime feature version the runtime reports in {@link RealtimeApi.version}.
|
|
50
|
-
* 2 added races;
|
|
50
|
+
* 2 added races; 3 added invite links and taking back a held seat; 4 added
|
|
51
|
+
* "Play online" (tournaments). A client feature-detects newer additions with
|
|
52
|
+
* it (or by the optional method).
|
|
51
53
|
*/
|
|
52
|
-
const REALTIME_FEATURE_VERSION =
|
|
54
|
+
const REALTIME_FEATURE_VERSION = 4;
|
|
53
55
|
/**
|
|
54
56
|
* The cross-bundle shape number of the `rt` page singleton (plan §4.4). The
|
|
55
57
|
* runtime registers with it through `claimSingleton`; bump it only when the
|
|
@@ -201,9 +203,13 @@ async function rethrowAsHubError(pending) {
|
|
|
201
203
|
throw hubLink().toHubError(error);
|
|
202
204
|
}
|
|
203
205
|
}
|
|
206
|
+
/** The rejection for a feature the page's social runtime is too old to have (version 3 additions). */
|
|
207
|
+
function outdatedRuntime(feature) {
|
|
208
|
+
return hubLink().createOfflineError(`${feature} needs the newest hub. Reload the page to update.`);
|
|
209
|
+
}
|
|
204
210
|
/** The page's one bridge (per client bundle). */
|
|
205
211
|
const pageBridge = new RealtimeBridge();
|
|
206
212
|
//#endregion
|
|
207
|
-
export {
|
|
213
|
+
export { isRealtimeApi as a, REALTIME_FEATURE_VERSION as c, hubLink as d, linkRealtimeToHub as f, findRealtimeApi as i, REALTIME_READY_EVENT as l, pageBridge as n, readRuntimeFailure as o, rethrowAsHubError as r, REALTIME_FAILED_EVENT as s, outdatedRuntime as t, REALTIME_SINGLETON_API as u };
|
|
208
214
|
|
|
209
215
|
//# sourceMappingURL=bridge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.js","names":[],"sources":["../../src/realtime/hub-link.ts","../../src/realtime/runtime-api.ts","../../src/realtime/page-runtime.ts","../../src/realtime/bridge.ts"],"mappings":";;;;;;;;;;AAuBA,SAAS,iBAAiB,OAAoC;CAC5D,IAAI,iBAAiB,OACnB,OAAO;CAET,MAAM,UAAU,UAAU,OAAO,SAAS;CAC1C,MAAM,OAA2B,IAAI,MAAM,OAAO,YAAY,WAAW,UAAU,OAAO,KAAK,CAAC;CAChG,KAAK,MAAM,OAAO,CAAC,UAAU,cAAc,GAAY;EACrD,MAAM,QAAQ,UAAU,OAAO,GAAG;EAClC,IAAI,OAAO,UAAU,UACnB,KAAK,OAAO;CAEhB;CACA,KAAK,MAAM,OAAO;EAAC;EAAQ;EAAU;CAAM,GAAY;EACrD,MAAM,QAAQ,UAAU,OAAO,GAAG;EAClC,IAAI,OAAO,UAAU,UACnB,KAAK,OAAO;CAEhB;CACA,OAAO;AACT;AAYA,IAAI,cAA+B;CATjC,YAAY;CACZ,mBAAmB,SAAS;EAC1B,MAAM,UAA8B,IAAI,MAAM,OAAO;EACrD,QAAQ,OAAO;EACf,OAAO;CACT;CACA,2BAA2B,QAAQ,uBAAO,IAAI,MAAM,qEAAqE,CAAC;AAG5E;;AAGhD,SAAgB,kBAAkB,MAA6B;CAC7D,cAAc;AAChB;;AAGA,SAAgB,UAA2B;CACzC,OAAO;AACT
|
|
1
|
+
{"version":3,"file":"bridge.js","names":[],"sources":["../../src/realtime/hub-link.ts","../../src/realtime/runtime-api.ts","../../src/realtime/page-runtime.ts","../../src/realtime/bridge.ts"],"mappings":";;;;;;;;;;AAuBA,SAAS,iBAAiB,OAAoC;CAC5D,IAAI,iBAAiB,OACnB,OAAO;CAET,MAAM,UAAU,UAAU,OAAO,SAAS;CAC1C,MAAM,OAA2B,IAAI,MAAM,OAAO,YAAY,WAAW,UAAU,OAAO,KAAK,CAAC;CAChG,KAAK,MAAM,OAAO,CAAC,UAAU,cAAc,GAAY;EACrD,MAAM,QAAQ,UAAU,OAAO,GAAG;EAClC,IAAI,OAAO,UAAU,UACnB,KAAK,OAAO;CAEhB;CACA,KAAK,MAAM,OAAO;EAAC;EAAQ;EAAU;CAAM,GAAY;EACrD,MAAM,QAAQ,UAAU,OAAO,GAAG;EAClC,IAAI,OAAO,UAAU,UACnB,KAAK,OAAO;CAEhB;CACA,OAAO;AACT;AAYA,IAAI,cAA+B;CATjC,YAAY;CACZ,mBAAmB,SAAS;EAC1B,MAAM,UAA8B,IAAI,MAAM,OAAO;EACrD,QAAQ,OAAO;EACf,OAAO;CACT;CACA,2BAA2B,QAAQ,uBAAO,IAAI,MAAM,qEAAqE,CAAC;AAG5E;;AAGhD,SAAgB,kBAAkB,MAA6B;CAC7D,cAAc;AAChB;;AAGA,SAAgB,UAA2B;CACzC,OAAO;AACT;;;;;;;;;AChDA,MAAa,2BAA2B;;;;;;AAgBxC,MAAa,yBAAyB;;AAGtC,MAAa,uBAAuB;;AAGpC,MAAa,wBAAwB;;;;;;;;;AC1BrC,SAAgB,cAAc,WAA8C;CAC1E,OAAO,OAAO,UAAU,WAAW,SAAS,MAAM,YAC7C,WAAW,UAAU,WAAW,UAAU,GAAG,CAAC,OAAO,OAAO,CAAC,KAC7D,WAAW,UAAU,WAAW,QAAQ,GAAG;EAAC;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MAAM,QAAQ,CAAC,CAAC,WAAW,KAAK;CAClC;AACF;;AAGA,SAAgB,gBAAgB,SAAwB;CACtD,OAAO,QAAQ,CAAC,CAAC,mBAAmB,GAAG,QAAQ,kDAAkD;AACnG;;AAGA,MAAa,aAAa,IAAI,eAAe"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/core/version/client-version.gen.ts
|
|
2
2
|
/** This client's package version, sent as `x-hub-client` on REST calls and `client` in `hello`. */
|
|
3
|
-
const HUB_CLIENT_VERSION = "2.0.0-next.
|
|
3
|
+
const HUB_CLIENT_VERSION = "2.0.0-next.2";
|
|
4
4
|
//#endregion
|
|
5
5
|
export { HUB_CLIENT_VERSION as t };
|
|
6
6
|
|
package/dist/shared/daily.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { m as SchemaOutput } from "./wire-types.js";
|
|
2
2
|
import { DailyCompletion, DailyCompletions, Json, dailyEndpoints } from "@diffenderfer-games/hub-contract";
|
|
3
3
|
//#region src/daily/types.d.ts
|
|
4
4
|
/** The response type of a daily endpoint. */
|
|
@@ -41,8 +41,8 @@ interface DailyHost {
|
|
|
41
41
|
all(): Promise<DailyAll>;
|
|
42
42
|
/** `POST /games/:slug/daily/:day/start`. */
|
|
43
43
|
start(day: string): Promise<DailyStartResponse>;
|
|
44
|
-
/** `POST /games/:slug/daily/:day/complete
|
|
45
|
-
complete(day: string, token: string, meta: DailyCompletionMeta): Promise<DailyCompleteResponse>;
|
|
44
|
+
/** `POST /games/:slug/daily/:day/complete`; `null` when it was queued offline, to replay when the hub is back. */
|
|
45
|
+
complete(day: string, token: string, meta: DailyCompletionMeta): Promise<DailyCompleteResponse | null>;
|
|
46
46
|
/** Fire a `hub:*` window event (the menu listens). */
|
|
47
47
|
emit(name: string, detail: DailyEventDetail): void;
|
|
48
48
|
}
|
|
@@ -56,6 +56,10 @@ type DailyEventDetail = {
|
|
|
56
56
|
count: number;
|
|
57
57
|
rank: number | null;
|
|
58
58
|
meta: DailyCompletionMeta;
|
|
59
|
+
} | {
|
|
60
|
+
day: string;
|
|
61
|
+
queued: true;
|
|
62
|
+
meta: DailyCompletionMeta;
|
|
59
63
|
} | {
|
|
60
64
|
day: string;
|
|
61
65
|
error: string;
|
|
@@ -94,7 +98,9 @@ declare class DailySystem {
|
|
|
94
98
|
/**
|
|
95
99
|
* Record completion of the active challenge with optional metadata.
|
|
96
100
|
* Resolves with the new completion count and rank, or `null` when no
|
|
97
|
-
* challenge is active or the hub
|
|
101
|
+
* challenge is active, the hub refused, or the hub can't be reached: then
|
|
102
|
+
* the completion is queued (`hub:daily-queued`) and replays when it is
|
|
103
|
+
* back (`hub:daily-complete` follows).
|
|
98
104
|
*/
|
|
99
105
|
complete(meta?: DailyCompletionMeta): Promise<DailyCompleteResponse | null>;
|
|
100
106
|
/** Ask the page's other daily systems to start `day` (this one ignores its own event). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daily.d.ts","names":[],"sources":["../../src/daily/types.ts","../../src/daily/daily-system.ts","../../src/daily/page-daily.ts"],"mappings":";;;;KAQK,cAAc,0BAA0B,kBAAkB,qBAAqB,gBAAgB;;KAGxF,cAAc;;KAGd,WAAW;;KAGX,kBAAkB;;KAGlB,qBAAqB;;KAGrB,wBAAwB;;UAGnB;;EAEf;;EAEA;;EAEA;;EAEA;;;UAIe;;EAEf,OAAO,WAAW;;;KAIR,sBAAsB,eAAe;;UAGhC;;WAEN;;EAET,UAAU,QAAQ;;EAElB,OAAO,QAAQ;;EAEf,MAAM,cAAc,QAAQ;;EAE5B,SAAS,aAAa,eAAe,MAAM,sBAAsB,QAAQ;;EAEzE,KAAK,cAAc,QAAQ;;;KAIjB;EACN;EAAa;EAAc;;EAC3B;EAAa;EAAe;EAAqB,MAAM;;EACvD;EAAa;;;;;
|
|
1
|
+
{"version":3,"file":"daily.d.ts","names":[],"sources":["../../src/daily/types.ts","../../src/daily/daily-system.ts","../../src/daily/page-daily.ts"],"mappings":";;;;KAQK,cAAc,0BAA0B,kBAAkB,qBAAqB,gBAAgB;;KAGxF,cAAc;;KAGd,WAAW;;KAGX,kBAAkB;;KAGlB,qBAAqB;;KAGrB,wBAAwB;;UAGnB;;EAEf;;EAEA;;EAEA;;EAEA;;;UAIe;;EAEf,OAAO,WAAW;;;KAIR,sBAAsB,eAAe;;UAGhC;;WAEN;;EAET,UAAU,QAAQ;;EAElB,OAAO,QAAQ;;EAEf,MAAM,cAAc,QAAQ;;EAE5B,SAAS,aAAa,eAAe,MAAM,sBAAsB,QAAQ;;EAEzE,KAAK,cAAc,QAAQ;;;KAIjB;EACN;EAAa;EAAc;;EAC3B;EAAa;EAAe;EAAqB,MAAM;;EACvD;EAAa;EAAc,MAAM;;EACjC;EAAa;;;;;cCnDN;;cA0BA;;;;;EAKX,QAAQ;mBACS;UACT;UACA;UACA;EAEI,YAAA,MAAM;;MAiBd;;;;;;EASJ,OAAO,YAAY;;;;;;;EAeb,aAAa,cAAc;;;;;;;;EAyB3B,SAAS,OAAM,sBAA2B,QAAQ;;UAsBhD;;EAaR;;EAKA,UAAU,QAAQ;;EAKlB,OAAO,QAAQ;;;;;cCzJJ;;iBAIG,cAAc,qBAAqB,aAAa;;;;;;iBAWhD,SAAS,MAAM,YAAY"}
|
package/dist/shared/daily.js
CHANGED
|
@@ -104,7 +104,9 @@ var DailySystem = class {
|
|
|
104
104
|
/**
|
|
105
105
|
* Record completion of the active challenge with optional metadata.
|
|
106
106
|
* Resolves with the new completion count and rank, or `null` when no
|
|
107
|
-
* challenge is active or the hub
|
|
107
|
+
* challenge is active, the hub refused, or the hub can't be reached: then
|
|
108
|
+
* the completion is queued (`hub:daily-queued`) and replays when it is
|
|
109
|
+
* back (`hub:daily-complete` follows).
|
|
108
110
|
*/
|
|
109
111
|
async complete(meta = {}) {
|
|
110
112
|
const challenge = this.active;
|
|
@@ -112,6 +114,14 @@ var DailySystem = class {
|
|
|
112
114
|
try {
|
|
113
115
|
const completed = await this.host.complete(challenge.day, challenge.token, meta);
|
|
114
116
|
this.active = null;
|
|
117
|
+
if (completed === null) {
|
|
118
|
+
this.host.emit("hub:daily-queued", {
|
|
119
|
+
day: challenge.day,
|
|
120
|
+
queued: true,
|
|
121
|
+
meta
|
|
122
|
+
});
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
115
125
|
this.host.emit("hub:daily-complete", {
|
|
116
126
|
day: challenge.day,
|
|
117
127
|
count: completed.count,
|
|
@@ -178,7 +188,7 @@ let claimedDaily = null;
|
|
|
178
188
|
function getDaily(host) {
|
|
179
189
|
claimedDaily ?? (claimedDaily = claimSingleton({
|
|
180
190
|
name: "daily",
|
|
181
|
-
version: "2.0.0-next.
|
|
191
|
+
version: "2.0.0-next.2",
|
|
182
192
|
api: 1,
|
|
183
193
|
create: () => new DailySystem(host),
|
|
184
194
|
isInstance: isDailySystem
|
package/dist/shared/daily.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daily.js","names":[],"sources":["../../src/daily/daily-system.ts","../../src/daily/page-daily.ts"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,cAAc;;AAGpB,MAAa,oBAAoB;;AAIjC,SAAS,SAAS,WAAmC;CACnD,OAAO,OAAO,cAAc,YAAY,YAAY,KAAK,SAAS,IAAI,YAAY;AACpF;;AAGA,SAAS,kBAAiC;CAGxC,MAAM,WAAW,OAAO,WAAW,cAAc,OAAO,SAAS,UAAU,QAAQ,gBAAgB,CAAC;CACpG,IAAI,aAAa,QAAQ,OAAO,aAAa,aAC3C,OAAO;CAET,OAAO,SAAS,IAAI,IAAI,SAAS,IAAI,CAAC,CAAC,aAAa,IAAI,OAAO,CAAC;AAClE;;AAIA,SAAS,UAAU,OAAwB;CACzC,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;AAC9D;;AAGA,IAAa,cAAb,MAAyB;CAWvB,YAAY,MAAiB;;;;;;;GAN7B;GAAgC;;EACf,gBAAA,MAAA,Q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