feedback5 R1: docs and comments follow the split — DESIGN §2 layout lists server/http/, the README table names the entry and http/, path comments in shared/media.js, public/js/media.js, buildGuard.js, net.js and three tests point at the new modules; .git-blame-ignore-revs lists the pure-move commit

This commit is contained in:
sganggs committed 2026-10-05 16:11:30 +08:00
1 parent 1b38e30819
commit 5f0830cdc5
10 files changed
+29 -11

No files matched your search

+3 -2
View File
@@ -1,5 +1,6 @@
// test/build.test.js — the served-runtime build tag (server/index.js computeBuildTag / buildTag): the signal that lets
// an already-open page notice a deploy (public/js/ui/buildGuard.js; /healthz `build`).
// test/build.test.js — the served-runtime build tag (server/http/buildTag.js computeBuildTag / buildTag, exported by
// server/index.js): the signal that lets an already-open page notice a deploy (public/js/ui/buildGuard.js;
// /healthz `build`).
import { test } from 'node:test';
import assert from 'node:assert/strict';
import fs from 'node:fs';
+1 -1
View File
@@ -36,7 +36,7 @@ function walk(dir, ext, out = []) {
return out;
}
/** URL path served by the server → file on disk (mirrors server/index.js mounts). */
/** URL path served by the server → file on disk (mirrors the server/http/static.js mounts). */
function urlPathToFile(urlPath) {
const clean = decodeURIComponent(urlPath.split(/[?#]/)[0]);
if (clean.startsWith('/shared/')) return path.join(ROOT, clean);
+1 -1
View File
@@ -23,7 +23,7 @@ const manifest = {
'ui/battle': { img_chess_level_3: { path: '/assets/local/ui/battle/img_chess_level_3.png', w: 45, h: 45 } },
},
};
// what server/index.js serves when data/local-assets.json is absent
// what the server (server/http/static.js) serves when data/local-assets.json is absent
const EMPTY_LOCAL = { version: 1, source: 'none', count: 0, groups: {} };
let mode = 'ok'; // data/local-assets.json: 'ok' (the manifest above) | 'empty' (the server's stand-in) | 'missing' (404)