@morebeans/cli 2.3.0 → 2.3.2
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/index.ts +12 -28
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
|
15
15
|
import { join, resolve } from "path";
|
|
16
16
|
import { homedir } from "os";
|
|
17
17
|
|
|
18
|
-
const VERSION = "2.3.
|
|
18
|
+
const VERSION = "2.3.2";
|
|
19
19
|
const BEANS_HOME = join(homedir(), ".beans");
|
|
20
20
|
const BEANS_CONFIG = join(BEANS_HOME, "config.json");
|
|
21
21
|
|
|
@@ -217,12 +217,6 @@ async function cmdInit() {
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
// Symlink CLAUDE.md for project docs
|
|
221
|
-
const claudeMd = join(pluginSource, "CLAUDE.md");
|
|
222
|
-
if (existsSync(claudeMd)) {
|
|
223
|
-
await $`ln -sf ${claudeMd} ${join(cwd, ".claude/CLAUDE.md")}`.nothrow();
|
|
224
|
-
}
|
|
225
|
-
|
|
226
220
|
// Copy settings.json if not exists
|
|
227
221
|
const settingsSrc = join(pluginSource, "settings.json");
|
|
228
222
|
const settingsDest = join(cwd, ".claude/settings.json");
|
|
@@ -391,39 +385,29 @@ async function cmdDoctor(args: string[]) {
|
|
|
391
385
|
}
|
|
392
386
|
}
|
|
393
387
|
|
|
394
|
-
// Check beads database (
|
|
388
|
+
// Check beads database (supports both .beans and legacy .beads locations)
|
|
395
389
|
const beansDir = join(cwd, ".beans");
|
|
396
|
-
const
|
|
390
|
+
const legacyBeadsDir = join(cwd, ".beads");
|
|
397
391
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
const result = await $`bd doctor --fix`.nothrow();
|
|
406
|
-
if (result.exitCode !== 0) {
|
|
407
|
-
warn("bd doctor reported issues (see output above)");
|
|
408
|
-
} else {
|
|
409
|
-
fixed++;
|
|
410
|
-
}
|
|
411
|
-
} catch {
|
|
412
|
-
warn("bd doctor failed");
|
|
413
|
-
}
|
|
414
|
-
}
|
|
392
|
+
const hasBeadsInBeans = existsSync(join(beansDir, "beads.db")) || existsSync(join(beansDir, "issues.jsonl"));
|
|
393
|
+
const hasLegacyBeads = existsSync(join(legacyBeadsDir, "beads.db")) || existsSync(join(legacyBeadsDir, "issues.jsonl"));
|
|
394
|
+
|
|
395
|
+
if (hasBeadsInBeans) {
|
|
396
|
+
success(".beans/ (issue tracker)");
|
|
397
|
+
} else if (hasLegacyBeads) {
|
|
398
|
+
success(".beads/ (issue tracker - legacy location)");
|
|
415
399
|
} else {
|
|
416
400
|
if (fix) {
|
|
417
401
|
info("Initializing beads (bd init)...");
|
|
418
402
|
try {
|
|
419
403
|
await $`bd init`.nothrow();
|
|
420
|
-
success("beads initialized
|
|
404
|
+
success("beads initialized");
|
|
421
405
|
fixed++;
|
|
422
406
|
} catch {
|
|
423
407
|
warn("bd init failed - run manually");
|
|
424
408
|
}
|
|
425
409
|
} else {
|
|
426
|
-
warn("
|
|
410
|
+
warn("Issue tracker not initialized (run 'beans doctor --fix' or 'bd init')");
|
|
427
411
|
}
|
|
428
412
|
}
|
|
429
413
|
|