mindpm 1.0.0 → 1.0.1
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 +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -139,6 +139,10 @@ function resolveDbPath() {
|
|
|
139
139
|
}
|
|
140
140
|
return resolve(homedir(), ".mindpm", "memory.db");
|
|
141
141
|
}
|
|
142
|
+
function ensureDbDirectory() {
|
|
143
|
+
const dbPath = resolveDbPath();
|
|
144
|
+
mkdirSync(dirname(dbPath), { recursive: true });
|
|
145
|
+
}
|
|
142
146
|
function getDb() {
|
|
143
147
|
if (db) return db;
|
|
144
148
|
const dbPath = resolveDbPath();
|
|
@@ -963,6 +967,7 @@ registerNoteTools(server);
|
|
|
963
967
|
registerSessionTools(server);
|
|
964
968
|
registerQueryTools(server);
|
|
965
969
|
async function main() {
|
|
970
|
+
ensureDbDirectory();
|
|
966
971
|
const transport = new StdioServerTransport();
|
|
967
972
|
await server.connect(transport);
|
|
968
973
|
}
|