bdtui 0.3.0 → 0.3.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.3.1] - 2026-05-16
6
+
7
+ ### Added
8
+
9
+ - Auto-start Dolt on launch: `bdtui` runs `bd dolt test` and falls back to `bd dolt start` if the project's Dolt server is down, so the TUI no longer opens against a dead backend. Skipped for `-v`/`--version`.
10
+
5
11
  ## [0.3.0] - 2026-05-15
6
12
 
7
13
  ### Added
package/bin/bdtui.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import path from 'path';
3
+ import { spawnSync } from 'child_process';
3
4
  import { createRequire } from 'module';
4
5
 
5
6
  const require = createRequire(import.meta.url);
@@ -15,5 +16,21 @@ if (arg === '-v' || arg === '--version') {
15
16
  const cwd = arg ? path.resolve(arg) : process.cwd();
16
17
  process.chdir(cwd);
17
18
 
19
+ ensureDoltRunning(cwd);
20
+
18
21
  const { run } = await import('../src/app.js');
19
22
  await run(cwd);
23
+
24
+ function ensureDoltRunning(cwd) {
25
+ const test = spawnSync('bd', ['dolt', 'test'], { cwd, stdio: 'ignore' });
26
+ if (test.status === 0) return;
27
+ // `bd` missing or otherwise unusable — let the TUI surface the real error.
28
+ if (test.error && test.error.code === 'ENOENT') return;
29
+
30
+ process.stderr.write("Dolt server not running — starting via 'bd dolt start'…\n");
31
+ const start = spawnSync('bd', ['dolt', 'start'], { cwd, stdio: 'inherit' });
32
+ if (start.status !== 0) {
33
+ process.stderr.write("Failed to start Dolt server. Run 'bd dolt start' manually.\n");
34
+ process.exit(start.status ?? 1);
35
+ }
36
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bdtui",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Terminal UI for the bd beads issue tracker",
5
5
  "type": "module",
6
6
  "bin": {