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/projects.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/projects.js')
| -rw-r--r-- | dist/main/db/projects.js | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/dist/main/db/projects.js b/dist/main/db/projects.js deleted file mode 100644 index af36cc0..0000000 --- a/dist/main/db/projects.js +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | "use strict"; | ||
| 2 | Object.defineProperty(exports, "__esModule", { value: true }); | ||
| 3 | exports.listProjects = listProjects; | ||
| 4 | exports.getProject = getProject; | ||
| 5 | exports.createProject = createProject; | ||
| 6 | exports.deleteProject = deleteProject; | ||
| 7 | const index_1 = require("./index"); | ||
| 8 | const uuid_1 = require("uuid"); | ||
| 9 | function listProjects() { | ||
| 10 | return (0, index_1.getDb)() | ||
| 11 | .prepare("SELECT * FROM projects ORDER BY updated_at DESC") | ||
| 12 | .all(); | ||
| 13 | } | ||
| 14 | function getProject(id) { | ||
| 15 | return (0, index_1.getDb)() | ||
| 16 | .prepare("SELECT * FROM projects WHERE id = ?") | ||
| 17 | .get(id); | ||
| 18 | } | ||
| 19 | function createProject(name, projectPath) { | ||
| 20 | const db = (0, index_1.getDb)(); | ||
| 21 | const id = (0, uuid_1.v4)(); | ||
| 22 | const now = Math.floor(Date.now() / 1000); | ||
| 23 | db.prepare("INSERT INTO projects (id, name, path, created_at, updated_at) VALUES (?, ?, ?, ?, ?)").run(id, name, projectPath, now, now); | ||
| 24 | return { id, name, path: projectPath, created_at: now, updated_at: now }; | ||
| 25 | } | ||
| 26 | function deleteProject(id) { | ||
| 27 | (0, index_1.getDb)().prepare("DELETE FROM projects WHERE id = ?").run(id); | ||
| 28 | } | ||
