@hadoku/service-kernel 0.1.159 → 0.1.161
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/http/index.d.ts +5 -0
- package/dist/http/index.js +7 -1
- package/package.json +3 -3
package/dist/http/index.d.ts
CHANGED
|
@@ -92,6 +92,11 @@ export interface BasePathVerdict {
|
|
|
92
92
|
* @param basePrefix e.g. `/cardtable` (no trailing slash)
|
|
93
93
|
*/
|
|
94
94
|
export declare function checkBasePath(indexHtmlPath: string, basePrefix: string): BasePathVerdict;
|
|
95
|
+
/**
|
|
96
|
+
* Whether a file under the web dir keeps its name across builds, and so is served `no-cache`: the
|
|
97
|
+
* app's own embed entries, and the embed's `manifest.json` (`@hadoku/platform-wire/external-game-manifest`),
|
|
98
|
+
* which every embed may carry and a host re-reads after each release.
|
|
99
|
+
*/
|
|
95
100
|
export declare function isEmbedEntry(filePath: string, embedEntries: readonly string[]): boolean;
|
|
96
101
|
/**
|
|
97
102
|
* Serve index.html. The ONE place a page leaves this server, shared by the SPA
|
package/dist/http/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { readFileSync } from 'node:fs';
|
|
|
9
9
|
import { createServer } from 'node:http';
|
|
10
10
|
import { basename, dirname, sep } from 'node:path';
|
|
11
11
|
import express from 'express';
|
|
12
|
+
import { EXTERNAL_GAME_MANIFEST_FILE } from '@wolffm/platform-wire/external-game-manifest';
|
|
12
13
|
/** One gate, bound to an app's auth functions and its `reportSealRefused`. */
|
|
13
14
|
export function createGate(deps) {
|
|
14
15
|
function floor(headers, minTier) {
|
|
@@ -97,8 +98,13 @@ export function checkBasePath(indexHtmlPath, basePrefix) {
|
|
|
97
98
|
}
|
|
98
99
|
return { ok: true, reason: 'ok', offenders: [], detail: `base path "${wanted}" verified` };
|
|
99
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Whether a file under the web dir keeps its name across builds, and so is served `no-cache`: the
|
|
103
|
+
* app's own embed entries, and the embed's `manifest.json` (`@hadoku/platform-wire/external-game-manifest`),
|
|
104
|
+
* which every embed may carry and a host re-reads after each release.
|
|
105
|
+
*/
|
|
100
106
|
export function isEmbedEntry(filePath, embedEntries) {
|
|
101
|
-
return embedEntries.some((name) => filePath.endsWith(`${sep}embed${sep}${name}`));
|
|
107
|
+
return [...embedEntries, EXTERNAL_GAME_MANIFEST_FILE].some((name) => filePath.endsWith(`${sep}embed${sep}${name}`));
|
|
102
108
|
}
|
|
103
109
|
/**
|
|
104
110
|
* Serve index.html. The ONE place a page leaves this server, shared by the SPA
|
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.161",
|
|
4
|
+
"gitHead": "182a659f9700cc6e96b706061f16427eb303993d",
|
|
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.128",
|
|
60
60
|
"express": "^5.1.0",
|
|
61
61
|
"socket.io": "^4.8.3"
|
|
62
62
|
},
|