diff options
| author | Clawd <ai@clawd.bot> | 2026-02-28 15:26:21 -0800 |
|---|---|---|
| committer | Clawd <ai@clawd.bot> | 2026-02-28 15:26:21 -0800 |
| commit | 5bd5da261732a1fce6a94ffa4d348dd6c80887cf (patch) | |
| tree | 7893aea50ba0d37ceff3ecddef4abc8b8784b822 /dist/main/db/index.js | |
| parent | 519d6b850e07a0387511a8f024dc394250b1a241 (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.js | 33 |
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"; | ||
| 2 | var __importDefault = (this && this.__importDefault) || function (mod) { | ||
| 3 | return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
| 4 | }; | ||
| 5 | Object.defineProperty(exports, "__esModule", { value: true }); | ||
| 6 | exports.getDb = getDb; | ||
| 7 | exports.closeDb = closeDb; | ||
| 8 | const better_sqlite3_1 = __importDefault(require("better-sqlite3")); | ||
| 9 | const electron_1 = require("electron"); | ||
| 10 | const node_path_1 = __importDefault(require("node:path")); | ||
| 11 | const node_fs_1 = __importDefault(require("node:fs")); | ||
| 12 | const schema_1 = require("./schema"); | ||
| 13 | let db = null; | ||
| 14 | function 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 | } | ||
| 28 | function closeDb() { | ||
| 29 | if (db) { | ||
| 30 | db.close(); | ||
| 31 | db = null; | ||
| 32 | } | ||
| 33 | } | ||
