@hadoku/service-kernel 0.1.184 → 0.1.185
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/auth/index.d.ts +6 -0
- package/dist/auth/index.js +8 -0
- package/package.json +3 -3
package/dist/auth/index.d.ts
CHANGED
|
@@ -114,5 +114,11 @@ export declare function userNameFromHeaders(headers: IncomingHttpHeaders): strin
|
|
|
114
114
|
* UTF-8; anything else (plain ASCII, or a lone Latin-1 byte) is kept as it came.
|
|
115
115
|
*/
|
|
116
116
|
export declare function utf8HeaderValue(value: string): string;
|
|
117
|
+
/**
|
|
118
|
+
* An operator: someone the edge names `wife` or above, who has a room leader's reach in every room
|
|
119
|
+
* (cardtable's operator, 2026-11-27). Read from the raw edge tier (`edgeTierOf`), never `tierOf`, which
|
|
120
|
+
* promotes a member: friend and member are not operators.
|
|
121
|
+
*/
|
|
122
|
+
export declare function isOperator(req: Request): boolean;
|
|
117
123
|
/** The one admin check: `rankOf(tierOf(req)) >= rankOf('admin')`. */
|
|
118
124
|
export declare function isAdmin(req: Request): boolean;
|
package/dist/auth/index.js
CHANGED
|
@@ -187,6 +187,14 @@ export function utf8HeaderValue(value) {
|
|
|
187
187
|
return value;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
+
/**
|
|
191
|
+
* An operator: someone the edge names `wife` or above, who has a room leader's reach in every room
|
|
192
|
+
* (cardtable's operator, 2026-11-27). Read from the raw edge tier (`edgeTierOf`), never `tierOf`, which
|
|
193
|
+
* promotes a member: friend and member are not operators.
|
|
194
|
+
*/
|
|
195
|
+
export function isOperator(req) {
|
|
196
|
+
return rankOf(edgeTierOf(req)) >= rankOf('wife');
|
|
197
|
+
}
|
|
190
198
|
/** The one admin check: `rankOf(tierOf(req)) >= rankOf('admin')`. */
|
|
191
199
|
export function isAdmin(req) {
|
|
192
200
|
return rankOf(tierOf(req)) >= rankOf('admin');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hadoku/service-kernel",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "0.1.185",
|
|
4
|
+
"gitHead": "6a384c4363e40e9f65aea9c1c5f2ecb719434aa1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "The server parts any game keeps: edge auth and the tier gate, base path and bundle check, health and the busy probe, lifecycle, the JSON logger, the state directory, telemetry and capacity, per-caller limits, the browser relays, the erase registry, and createGameServer, which boots a game from its config and plugins. Knows no game; the app binds its service id, prefix and env names. MIT; imports only node built-ins, express, socket.io, platform-wire and @wolffm/*.",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.
|
|
59
|
+
"@wolffm/platform-wire": "npm:@hadoku/platform-wire@0.1.152",
|
|
60
60
|
"express": "^5.1.0",
|
|
61
61
|
"socket.io": "^4.8.3"
|
|
62
62
|
},
|