feat(admin): display running version in footer and /health

Inline package.json version at bundle time via src/config/version.ts
(resolveJsonModule), surface it in the shared admin/status footer and
add it to the /health JSON so self-hosters can tell which build runs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Julien Herr
2026-05-25 15:43:05 +02:00
parent 70552e5fa6
commit 7086526670
7 changed files with 36 additions and 2 deletions
+4 -1
View File
@@ -13,6 +13,7 @@ import { hubRouter } from "./routes/hub";
import { apiApp } from "./routes/api";
import { handleCloudflareEmail } from "./infrastructure/cloudflare-email";
import { Env } from "./types";
import { APP_VERSION } from "./config/version";
import { logger } from "./infrastructure/logger";
import { FeedRepository } from "./infrastructure/feed-repository";
import { purgeExpiredFeeds } from "./application/feed-cleanup";
@@ -185,7 +186,9 @@ app.get("/favicon.ico", handleFavicon); // readers/browsers that hardcode .ico
app.get("/favicon/:feedId", handleFeedFavicon);
// Health check endpoint for monitoring
app.get("/health", (c) => c.json({ status: "ok", timestamp: Date.now() }));
app.get("/health", (c) =>
c.json({ status: "ok", version: APP_VERSION, timestamp: Date.now() }),
);
// Public status page (counters + link to admin)
app.get("/", handleHome);