aboutsummaryrefslogtreecommitdiffstats
path: root/dist/main/db/index.js
diff options
context:
space:
mode:
authorClawd <ai@clawd.bot>2026-02-28 15:26:21 -0800
committerClawd <ai@clawd.bot>2026-02-28 15:26:21 -0800
commit5bd5da261732a1fce6a94ffa4d348dd6c80887cf (patch)
tree7893aea50ba0d37ceff3ecddef4abc8b8784b822 /dist/main/db/index.js
parent519d6b850e07a0387511a8f024dc394250b1a241 (diff)
Fix .gitignore: ignore dist/, .claude-flow/, and sync-conflict files
Remove accidentally committed build artifacts and working files.
Diffstat (limited to 'dist/main/db/index.js')
-rw-r--r--dist/main/db/index.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/dist/main/db/index.js b/dist/main/db/index.js
deleted file mode 100644
index 652d189..0000000
--- a/dist/main/db/index.js
+++ /dev/null
@@ -1,33 +0,0 @@
1"use strict";
2var __importDefault = (this && this.__importDefault) || function (mod) {
3 return (mod && mod.__esModule) ? mod : { "default": mod };
4};
5Object.defineProperty(exports, "__esModule", { value: true });
6exports.getDb = getDb;
7exports.closeDb = closeDb;
8const better_sqlite3_1 = __importDefault(require("better-sqlite3"));
9const electron_1 = require("electron");
10const node_path_1 = __importDefault(require("node:path"));
11const node_fs_1 = __importDefault(require("node:fs"));
12const schema_1 = require("./schema");
13let db = null;
14function getDb() {
15 if (db)
16 return db;
17 const dbDir = electron_1.app.getPath("userData");
18 if (!node_fs_1.default.existsSync(dbDir)) {
19 node_fs_1.default.mkdirSync(dbDir, { recursive: true });
20 }
21 const dbPath = node_path_1.default.join(dbDir, "claude-flow.db");
22 db = new better_sqlite3_1.default(dbPath);
23 db.pragma("journal_mode = WAL");
24 db.pragma("foreign_keys = ON");
25 (0, schema_1.initSchema)(db);
26 return db;
27}
28function closeDb() {
29 if (db) {
30 db.close();
31 db = null;
32 }
33}