mnemosyne-core 2.1.5 → 2.1.8
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 +16 -11
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +16 -11
- package/dist/cli/index.mjs.map +1 -1
- package/dist/dashboard/assets/banner.png +0 -0
- package/dist/dashboard/assets/favicon.png +0 -0
- package/dist/dashboard/assets/full-horizontal-logo.png +0 -0
- package/dist/dashboard/assets/logo.png +0 -0
- package/dist/dashboard/index.html +5 -5
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -7
- package/dist/index.mjs.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/index.mjs +1 -1
- package/dist/mcp/index.mjs.map +1 -1
- package/dist/server/api.js +3 -3
- package/dist/server/api.js.map +1 -1
- package/dist/server/api.mjs +3 -3
- package/dist/server/api.mjs.map +1 -1
- package/dist/server/index.js +11 -6
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +11 -6
- package/dist/server/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -207,7 +207,7 @@ function getVersion() {
|
|
|
207
207
|
const pkg = JSON.parse(readFileSync6(resolve9(process.cwd(), "package.json"), "utf-8"));
|
|
208
208
|
return pkg.version;
|
|
209
209
|
} catch {
|
|
210
|
-
return "2.1.
|
|
210
|
+
return "2.1.8";
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
}
|
|
@@ -4568,8 +4568,9 @@ var Store = class extends EventEmitter {
|
|
|
4568
4568
|
vals.push(this.now());
|
|
4569
4569
|
sets.push("version = version + 1");
|
|
4570
4570
|
vals.push(id);
|
|
4571
|
+
const sql = `UPDATE atoms SET ${sets.join(", ")} WHERE id = ?`;
|
|
4571
4572
|
try {
|
|
4572
|
-
this.stmt(
|
|
4573
|
+
this.stmt(sql).run(...vals);
|
|
4573
4574
|
} catch (err) {
|
|
4574
4575
|
if (err.message?.includes("malformed") || err.message?.includes("corrupt")) {
|
|
4575
4576
|
throw new Error(`Database appears corrupted. Run "mnemosyne doctor --data-dir ./data" or delete the data directory and run "mnemosyne init" again.`);
|
|
@@ -5360,7 +5361,7 @@ function getVersion2() {
|
|
|
5360
5361
|
const pkg = JSON.parse(readFileSync6(resolve9(process.cwd(), "package.json"), "utf-8"));
|
|
5361
5362
|
return pkg.version;
|
|
5362
5363
|
} catch {
|
|
5363
|
-
return "2.1.
|
|
5364
|
+
return "2.1.8";
|
|
5364
5365
|
}
|
|
5365
5366
|
}
|
|
5366
5367
|
}
|
|
@@ -5599,7 +5600,7 @@ CREATE TRIGGER IF NOT EXISTS trig_search_atoms_insert AFTER INSERT ON atoms BEGI
|
|
|
5599
5600
|
END;
|
|
5600
5601
|
|
|
5601
5602
|
CREATE TRIGGER IF NOT EXISTS trig_search_atoms_update AFTER UPDATE ON atoms BEGIN
|
|
5602
|
-
|
|
5603
|
+
INSERT OR REPLACE INTO search_atoms(rowid, title, summary) VALUES (new.rowid, new.title, COALESCE(new.summary, ''));
|
|
5603
5604
|
END;
|
|
5604
5605
|
|
|
5605
5606
|
CREATE TRIGGER IF NOT EXISTS trig_search_atoms_delete AFTER DELETE ON atoms BEGIN
|
|
@@ -5947,7 +5948,7 @@ function getVersion3() {
|
|
|
5947
5948
|
const pkg = JSON.parse(readFileSync6(resolve9(process.cwd(), "package.json"), "utf-8"));
|
|
5948
5949
|
return pkg.version;
|
|
5949
5950
|
} catch {
|
|
5950
|
-
return "2.1.
|
|
5951
|
+
return "2.1.8";
|
|
5951
5952
|
}
|
|
5952
5953
|
}
|
|
5953
5954
|
}
|
|
@@ -7113,7 +7114,7 @@ var PKG_VERSION = (() => {
|
|
|
7113
7114
|
const pkg = JSON.parse(__require("fs").readFileSync(__require("path").resolve(__dirname, "../../package.json"), "utf-8"));
|
|
7114
7115
|
return pkg.version;
|
|
7115
7116
|
} catch {
|
|
7116
|
-
return "2.1.
|
|
7117
|
+
return "2.1.8";
|
|
7117
7118
|
}
|
|
7118
7119
|
})();
|
|
7119
7120
|
function handleHealth(store, pathname, method, res) {
|
|
@@ -7396,6 +7397,10 @@ function getDb() {
|
|
|
7396
7397
|
db.pragma("journal_mode = WAL");
|
|
7397
7398
|
db.pragma("foreign_keys = ON");
|
|
7398
7399
|
db.pragma("synchronous = NORMAL");
|
|
7400
|
+
try {
|
|
7401
|
+
db.pragma("wal_checkpoint(TRUNCATE)");
|
|
7402
|
+
} catch {
|
|
7403
|
+
}
|
|
7399
7404
|
try {
|
|
7400
7405
|
const { getLoadablePath } = __require("sqlite-vec");
|
|
7401
7406
|
db.loadExtension(getLoadablePath());
|
|
@@ -7474,7 +7479,7 @@ var MnemosyneServer = class {
|
|
|
7474
7479
|
const wss = new import_websocket_server.default({ server: this.httpServer });
|
|
7475
7480
|
this.wsHandler = new WebSocketHandler(wss, this.store);
|
|
7476
7481
|
}
|
|
7477
|
-
const version = cfg?.server?.version || "2.1.
|
|
7482
|
+
const version = cfg?.server?.version || "2.1.8";
|
|
7478
7483
|
this.httpServer.listen(port, () => {
|
|
7479
7484
|
console.log(`Mnemosyne v${version} \u2014 port ${port}`);
|
|
7480
7485
|
console.log(`Dashboard: http://${host}:${port}/dashboard`);
|