@kaban-board/tui 0.1.3 → 0.2.4
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 +8 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1844,7 +1844,12 @@ function handleKeypress(state, key) {
|
|
|
1844
1844
|
// src/lib/project.ts
|
|
1845
1845
|
import { existsSync, mkdirSync, writeFileSync } from "fs";
|
|
1846
1846
|
import { resolve } from "path";
|
|
1847
|
-
import {
|
|
1847
|
+
import {
|
|
1848
|
+
BoardService,
|
|
1849
|
+
createDb,
|
|
1850
|
+
DEFAULT_CONFIG,
|
|
1851
|
+
initializeSchema
|
|
1852
|
+
} from "@kaban-board/core";
|
|
1848
1853
|
function findKabanRoot(startDir) {
|
|
1849
1854
|
let dir = startDir;
|
|
1850
1855
|
while (dir !== "/") {
|
|
@@ -1871,7 +1876,7 @@ async function initializeProject(root, boardName) {
|
|
|
1871
1876
|
board: { name: boardName }
|
|
1872
1877
|
};
|
|
1873
1878
|
writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
1874
|
-
const db = createDb(dbPath);
|
|
1879
|
+
const db = await createDb(dbPath);
|
|
1875
1880
|
await initializeSchema(db);
|
|
1876
1881
|
const boardService = new BoardService(db);
|
|
1877
1882
|
await boardService.initializeBoard(config);
|
|
@@ -1897,7 +1902,7 @@ async function main() {
|
|
|
1897
1902
|
taskService = new TaskService(db, boardService);
|
|
1898
1903
|
} else {
|
|
1899
1904
|
const { dbPath } = getKabanPaths(projectRoot);
|
|
1900
|
-
db = createDb2(dbPath);
|
|
1905
|
+
db = await createDb2(dbPath);
|
|
1901
1906
|
boardService = new BoardService2(db);
|
|
1902
1907
|
taskService = new TaskService(db, boardService);
|
|
1903
1908
|
}
|