@prih/mcp-graph-memory 1.0.3 → 1.0.4
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/api/rest/index.js +5 -2
- package/dist/ui/assets/index-DfkDVShL.js +1563 -0
- package/dist/ui/assets/index-kKd4mVrh.css +1 -0
- package/dist/ui/favicon.svg +1 -0
- package/dist/ui/icons.svg +24 -0
- package/dist/ui/index.html +14 -0
- package/package.json +2 -3
- package/ui/README.md +0 -54
package/dist/api/rest/index.js
CHANGED
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.createRestApp = createRestApp;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
7
8
|
const path_1 = __importDefault(require("path"));
|
|
8
9
|
const express_1 = __importDefault(require("express"));
|
|
9
10
|
const cors_1 = __importDefault(require("cors"));
|
|
@@ -90,8 +91,10 @@ function createRestApp(projectManager) {
|
|
|
90
91
|
app.use('/api/projects/:projectId/files', (0, files_1.createFilesRouter)());
|
|
91
92
|
app.use('/api/projects/:projectId/graph', (0, graph_1.createGraphRouter)());
|
|
92
93
|
app.use('/api/projects/:projectId/tools', (0, tools_1.createToolsRouter)(projectManager));
|
|
93
|
-
// Serve UI static files (ui/dist)
|
|
94
|
-
const
|
|
94
|
+
// Serve UI static files — check dist/ui/ (npm package) then ui/dist/ (dev)
|
|
95
|
+
const uiDistPkg = path_1.default.resolve(__dirname, '../../ui');
|
|
96
|
+
const uiDistDev = path_1.default.resolve(__dirname, '../../../ui/dist');
|
|
97
|
+
const uiDist = fs_1.default.existsSync(uiDistPkg) ? uiDistPkg : uiDistDev;
|
|
95
98
|
app.use(express_1.default.static(uiDist));
|
|
96
99
|
// SPA fallback: serve index.html for non-API routes
|
|
97
100
|
app.get('/{*splat}', (_req, res, next) => {
|