@hadoku/platform-wire 0.1.202 → 0.1.204
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/tiers.d.ts +5 -0
- package/dist/tiers.js +6 -0
- package/package.json +2 -2
package/dist/tiers.d.ts
CHANGED
|
@@ -12,3 +12,8 @@
|
|
|
12
12
|
export declare const TIER_ORDER: readonly ["public", "guest", "member", "friend", "service", "wife", "admin"];
|
|
13
13
|
export type Tier = (typeof TIER_ORDER)[number];
|
|
14
14
|
export declare function rankOf(tier: string): number;
|
|
15
|
+
/** A tier as every gate and page reads it: a member (a guest the operator verified) is a friend; nobody else is promoted. */
|
|
16
|
+
export declare function effectiveTier<T extends string>(tier: T): T | 'friend';
|
|
17
|
+
/** The floors a room may set above the app's own: friends only. */
|
|
18
|
+
export declare const ROOM_FLOOR_TIERS: readonly ["friend"];
|
|
19
|
+
export type RoomFloorTier = (typeof ROOM_FLOOR_TIERS)[number];
|
package/dist/tiers.js
CHANGED
|
@@ -16,3 +16,9 @@ export function rankOf(tier) {
|
|
|
16
16
|
// heard of must not out-rank the floor by accident.
|
|
17
17
|
return i === -1 ? 0 : i;
|
|
18
18
|
}
|
|
19
|
+
/** A tier as every gate and page reads it: a member (a guest the operator verified) is a friend; nobody else is promoted. */
|
|
20
|
+
export function effectiveTier(tier) {
|
|
21
|
+
return tier === 'member' ? 'friend' : tier;
|
|
22
|
+
}
|
|
23
|
+
/** The floors a room may set above the app's own: friends only. */
|
|
24
|
+
export const ROOM_FLOOR_TIERS = ['friend'];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hadoku/platform-wire",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "0.1.204",
|
|
4
|
+
"gitHead": "6212ef2571050bce6d2e17cfccd0bb5d14ef966e",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "The wire any game speaks: room ids, telemetry, presence, events and tables, the Discord relay, looks, room settings, the restart notice, secure random and a generic server envelope. Knows no game; a game's own part rides as a type parameter. MIT; imports only zod.",
|