@opentrust/dashboard 7.3.7 → 7.3.9

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/index.js CHANGED
@@ -2,7 +2,7 @@ import express from "express";
2
2
  import cors from "cors";
3
3
  import helmet from "helmet";
4
4
  import morgan from "morgan";
5
- import { existsSync } from "node:fs";
5
+ import { existsSync, readFileSync } from "node:fs";
6
6
  import { join, dirname } from "node:path";
7
7
  import { fileURLToPath } from "node:url";
8
8
  import { sessionAuth } from "./middleware/session-auth.js";
@@ -18,6 +18,10 @@ import { discoveryRouter } from "./routes/discovery.js";
18
18
  import { observationsRouter } from "./routes/observations.js";
19
19
  import { errorHandler } from "./middleware/error-handler.js";
20
20
  const __dirname = dirname(fileURLToPath(import.meta.url));
21
+ const pkgPath = join(__dirname, "..", "package.json");
22
+ const PKG_VERSION = existsSync(pkgPath)
23
+ ? JSON.parse(readFileSync(pkgPath, "utf-8")).version
24
+ : "unknown";
21
25
  const app = express();
22
26
  const PORT = parseInt(process.env.PORT || process.env.API_PORT || "53667", 10);
23
27
  const DASHBOARD_MODE = (process.env.DASHBOARD_MODE || "selfhosted");
@@ -30,7 +34,7 @@ app.use(morgan("short"));
30
34
  app.use(express.json());
31
35
  // Public routes
32
36
  app.get("/health", (_req, res) => {
33
- res.json({ status: "ok", service: "opentrust-api", timestamp: new Date().toISOString() });
37
+ res.json({ status: "ok", service: "opentrust-api", version: PKG_VERSION, timestamp: new Date().toISOString() });
34
38
  });
35
39
  app.use("/api/auth", authRouter); // /request, /verify/:token, /me, /logout
36
40
  // Serve static web app in embedded mode (before auth middleware)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentrust/dashboard",
3
- "version": "7.3.7",
3
+ "version": "7.3.9",
4
4
  "type": "module",
5
5
  "description": "OpenTrust Dashboard — management panel for AI Agent security (API + embedded web)",
6
6
  "main": "dist/index.js",
@@ -19,8 +19,8 @@
19
19
  "morgan": "^1.10.0",
20
20
  "nodemailer": "^8.0.1",
21
21
  "zod": "^3.23.0",
22
- "@opentrust/db": "7.3.7",
23
- "@opentrust/shared": "7.3.7"
22
+ "@opentrust/db": "7.3.9",
23
+ "@opentrust/shared": "7.3.9"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/cors": "^2.8.17",