aboutsummaryrefslogtreecommitdiffstats
path: root/dist/main/db/projects.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/projects.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/projects.js')
-rw-r--r--dist/main/db/projects.js28
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";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.listProjects = listProjects;
4exports.getProject = getProject;
5exports.createProject = createProject;
6exports.deleteProject = deleteProject;
7const index_1 = require("./index");
8const uuid_1 = require("uuid");
9function listProjects() {
10 return (0, index_1.getDb)()
11 .prepare("SELECT * FROM projects ORDER BY updated_at DESC")
12 .all();
13}
14function getProject(id) {
15 return (0, index_1.getDb)()
16 .prepare("SELECT * FROM projects WHERE id = ?")
17 .get(id);
18}
19function 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}
26function deleteProject(id) {
27 (0, index_1.getDb)().prepare("DELETE FROM projects WHERE id = ?").run(id);
28}