mnemosyne-core 2.0.1 → 2.0.2
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/cli/index.js +56 -10
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +56 -10
- package/dist/cli/index.mjs.map +1 -1
- package/dist/dashboard/index.html +9401 -0
- package/dist/index.js +56 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -10
- package/dist/index.mjs.map +1 -1
- package/dist/server/api.js +24 -3
- package/dist/server/api.js.map +1 -1
- package/dist/server/api.mjs +30 -3
- package/dist/server/api.mjs.map +1 -1
- package/dist/server/index.js +31 -8
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +31 -8
- package/dist/server/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/server/api.js
CHANGED
|
@@ -106,9 +106,22 @@ function loadConfig() {
|
|
|
106
106
|
return defaultConfig();
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
+
function getVersion() {
|
|
110
|
+
try {
|
|
111
|
+
const pkg = JSON.parse((0, import_fs.readFileSync)((0, import_path.resolve)(__dirname, "../package.json"), "utf-8"));
|
|
112
|
+
return pkg.version;
|
|
113
|
+
} catch {
|
|
114
|
+
try {
|
|
115
|
+
const pkg = JSON.parse((0, import_fs.readFileSync)((0, import_path.resolve)(process.cwd(), "package.json"), "utf-8"));
|
|
116
|
+
return pkg.version;
|
|
117
|
+
} catch {
|
|
118
|
+
return "2.0.1";
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
109
122
|
function defaultConfig() {
|
|
110
123
|
return {
|
|
111
|
-
server: { port: 7321, host: "localhost", version:
|
|
124
|
+
server: { port: 7321, host: "localhost", version: getVersion() },
|
|
112
125
|
database: { path: "data/nexus.db", wal_mode: true, vec_extension_path: "data/vec0" },
|
|
113
126
|
storage: { files_dir: "data/files", max_file_size_mb: 50, backups_dir: "data/backups", backup_interval_hours: 24, max_backups: 7 },
|
|
114
127
|
limits: { max_atoms_per_project: 1e4, rate_limit_requests: 100, rate_limit_window_ms: 6e4 },
|
|
@@ -1548,12 +1561,20 @@ function handleEvents(store, pathname, method, res, searchParams) {
|
|
|
1548
1561
|
}
|
|
1549
1562
|
|
|
1550
1563
|
// src/api/routes/health.ts
|
|
1564
|
+
var PKG_VERSION = (() => {
|
|
1565
|
+
try {
|
|
1566
|
+
const pkg = JSON.parse(require("fs").readFileSync(require("path").resolve(__dirname, "../../../package.json"), "utf-8"));
|
|
1567
|
+
return pkg.version;
|
|
1568
|
+
} catch {
|
|
1569
|
+
return "2.0.1";
|
|
1570
|
+
}
|
|
1571
|
+
})();
|
|
1551
1572
|
function handleHealth(store, pathname, method, res) {
|
|
1552
|
-
if (pathname === "/health" && method === "GET") {
|
|
1573
|
+
if ((pathname === "/health" || pathname === "/api/v1/health") && method === "GET") {
|
|
1553
1574
|
const stats = store.getStats();
|
|
1554
1575
|
json(res, 200, {
|
|
1555
1576
|
status: "ok",
|
|
1556
|
-
version:
|
|
1577
|
+
version: PKG_VERSION,
|
|
1557
1578
|
storage: "sqlite",
|
|
1558
1579
|
database: store.config.database.path,
|
|
1559
1580
|
uptime: process.uptime(),
|