@hadoku/game-server 0.1.96 → 0.1.97
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/edge-auth.d.ts +2 -2
- package/dist/edge-auth.js +2 -2
- package/dist/http/usage.d.ts +6 -5
- package/dist/http/usage.js +5 -4
- package/package.json +5 -5
package/dist/edge-auth.d.ts
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
* them only when the shared secret checks out; otherwise we overwrite them with
|
|
12
12
|
* the most restrictive identity.
|
|
13
13
|
*/
|
|
14
|
-
import { TIER_ORDER, type Tier, rankOf, tierOf, callerIdOf, userIdOf, userKeyOf, accountIdOf, userNameOf, isAdmin } from '@wolffm/service-kernel/auth';
|
|
15
|
-
export { TIER_ORDER, rankOf, tierOf, callerIdOf, userIdOf, userKeyOf, accountIdOf, userNameOf, isAdmin };
|
|
14
|
+
import { TIER_ORDER, type Tier, rankOf, tierOf, edgeTierOf, callerIdOf, userIdOf, userKeyOf, accountIdOf, userNameOf, isAdmin } from '@wolffm/service-kernel/auth';
|
|
15
|
+
export { TIER_ORDER, rankOf, tierOf, edgeTierOf, callerIdOf, userIdOf, userKeyOf, accountIdOf, userNameOf, isAdmin };
|
|
16
16
|
export type { Tier };
|
|
17
17
|
/**
|
|
18
18
|
* The floor must be a tier this build knows, and never `public` here —
|
package/dist/edge-auth.js
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
* them only when the shared secret checks out; otherwise we overwrite them with
|
|
12
12
|
* the most restrictive identity.
|
|
13
13
|
*/
|
|
14
|
-
import { TIER_ORDER, assertFloor as kernelAssertFloor, rankOf, tierOf, callerIdOf, userIdOf, userKeyOf, accountIdOf, userNameOf, isAdmin, } from '@wolffm/service-kernel/auth';
|
|
14
|
+
import { TIER_ORDER, assertFloor as kernelAssertFloor, rankOf, tierOf, edgeTierOf, callerIdOf, userIdOf, userKeyOf, accountIdOf, userNameOf, isAdmin, } from '@wolffm/service-kernel/auth';
|
|
15
15
|
import { ENV_PREFIX, edgeAuth, gate } from './kernel.js';
|
|
16
|
-
export { TIER_ORDER, rankOf, tierOf, callerIdOf, userIdOf, userKeyOf, accountIdOf, userNameOf, isAdmin };
|
|
16
|
+
export { TIER_ORDER, rankOf, tierOf, edgeTierOf, callerIdOf, userIdOf, userKeyOf, accountIdOf, userNameOf, isAdmin };
|
|
17
17
|
/**
|
|
18
18
|
* The floor must be a tier this build knows, and never `public` here —
|
|
19
19
|
* cardtable admits members and friends, never the public tier. An unknown
|
package/dist/http/usage.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Adapter: cardtable's binding of `@hadoku/service-kernel/relays`'s `attachUsage` (w93-K3).
|
|
3
3
|
* `POST /api/usage`: the browser's usage batches (`packages/game-ui/src/usage.ts`), counted here and posted
|
|
4
|
-
* to telemetry
|
|
5
|
-
* pressed, how often, by how many people, by tier
|
|
6
|
-
*
|
|
4
|
+
* to telemetry once per window: one `usage` event for everyone (which screens were shown and which
|
|
5
|
+
* controls pressed, how often, by how many people, by tier) and one `usage-user` event per person
|
|
6
|
+
* with their own ordered trail. The tier reported is the edge's (`edgeTierOf`), so a member reads
|
|
7
|
+
* as a member, not as the friend cardtable's gates treat them as. Nothing is answered but 204.
|
|
7
8
|
*
|
|
8
9
|
* Every export and signature below is unchanged from before this moved into the kernel:
|
|
9
10
|
* `index.ts` imports this path exactly as it did. The cardtable-specific bits are
|
|
10
11
|
* `@hadoku/platform-wire/telemetry`'s schema and path, bound here — the kernel itself never imports it.
|
|
11
12
|
*/
|
|
12
13
|
import type { Router } from 'express';
|
|
13
|
-
import { MAX_BATCHES_PER_MINUTE, USAGE_TOP, USAGE_WINDOW_MS, type UsageCounter } from '@wolffm/service-kernel/relays';
|
|
14
|
+
import { MAX_BATCHES_PER_MINUTE, USAGE_TOP, USAGE_TRAIL_MAX, USAGE_WINDOW_MS, type UsageCounter } from '@wolffm/service-kernel/relays';
|
|
14
15
|
import { type Report } from '../telemetry.js';
|
|
15
|
-
export { MAX_BATCHES_PER_MINUTE, USAGE_TOP, USAGE_WINDOW_MS };
|
|
16
|
+
export { MAX_BATCHES_PER_MINUTE, USAGE_TOP, USAGE_TRAIL_MAX, USAGE_WINDOW_MS };
|
|
16
17
|
export type { UsageCounter };
|
|
17
18
|
export interface UsageDeps {
|
|
18
19
|
report?: Report;
|
package/dist/http/usage.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { USAGE_PATH, UsageBatchSchema } from '@wolffm/platform-wire/telemetry';
|
|
2
|
-
import { attachUsage as kernelAttachUsage, MAX_BATCHES_PER_MINUTE, USAGE_TOP, USAGE_WINDOW_MS, } from '@wolffm/service-kernel/relays';
|
|
3
|
-
import {
|
|
2
|
+
import { attachUsage as kernelAttachUsage, MAX_BATCHES_PER_MINUTE, USAGE_TOP, USAGE_TRAIL_MAX, USAGE_WINDOW_MS, } from '@wolffm/service-kernel/relays';
|
|
3
|
+
import { edgeTierOf, userIdOf, userNameOf } from '../edge-auth.js';
|
|
4
4
|
import { report as defaultReport } from '../telemetry.js';
|
|
5
|
-
export { MAX_BATCHES_PER_MINUTE, USAGE_TOP, USAGE_WINDOW_MS };
|
|
5
|
+
export { MAX_BATCHES_PER_MINUTE, USAGE_TOP, USAGE_TRAIL_MAX, USAGE_WINDOW_MS };
|
|
6
6
|
export function attachUsage(api, deps = {}) {
|
|
7
7
|
return kernelAttachUsage(api, {
|
|
8
8
|
schema: UsageBatchSchema,
|
|
9
9
|
path: USAGE_PATH,
|
|
10
|
-
tierOf,
|
|
10
|
+
tierOf: edgeTierOf,
|
|
11
11
|
userIdOf,
|
|
12
|
+
nameOf: userNameOf,
|
|
12
13
|
report: deps.report ?? defaultReport,
|
|
13
14
|
now: deps.now,
|
|
14
15
|
windowMs: deps.windowMs,
|
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.97",
|
|
4
|
+
"gitHead": "155c8c9335e64b29e1c0f0c9c18a8c79509093fb",
|
|
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.97",
|
|
20
|
+
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.97",
|
|
21
|
+
"@wolffm/service-kernel": "npm:@hadoku/service-kernel@0.1.130",
|
|
22
22
|
"@wolffm/prefs-client": "npm:@hadoku/prefs-client@^1.1.31",
|
|
23
23
|
"@wolffm/rooms-protocol": "npm:@hadoku/rooms-protocol@^0.45.128",
|
|
24
24
|
"@wolffm/rooms-server": "npm:@hadoku/rooms-server@^0.45.128",
|