truecourse 0.5.3 → 0.5.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.
Files changed (2) hide show
  1. package/cli.mjs +14 -11
  2. package/package.json +1 -1
package/cli.mjs CHANGED
@@ -4335,8 +4335,8 @@ function resolveSkillsSrcDir() {
4335
4335
  const candidate = resolve(__dirname4, "skills", "truecourse");
4336
4336
  return existsSync(candidate) ? candidate : null;
4337
4337
  }
4338
- function skillDestDir(repoPath) {
4339
- return resolve(repoPath, ".claude", "skills", "truecourse");
4338
+ function skillsParentDir(repoPath) {
4339
+ return resolve(repoPath, ".claude", "skills");
4340
4340
  }
4341
4341
  function listSkillDirs(root) {
4342
4342
  if (!existsSync(root)) return [];
@@ -4345,9 +4345,9 @@ function listSkillDirs(root) {
4345
4345
  function computeMissingSkills(repoPath) {
4346
4346
  const src = resolveSkillsSrcDir();
4347
4347
  if (!src) return [];
4348
- const shipped = new Set(listSkillDirs(src));
4349
- const installed = new Set(listSkillDirs(skillDestDir(repoPath)));
4350
- return [...shipped].filter((name) => !installed.has(name));
4348
+ const shipped = listSkillDirs(src);
4349
+ const parent = skillsParentDir(repoPath);
4350
+ return shipped.filter((name) => !existsSync(resolve(parent, name)));
4351
4351
  }
4352
4352
  function hasInstalledSkills(repoPath) {
4353
4353
  return computeMissingSkills(repoPath).length === 0;
@@ -4358,11 +4358,11 @@ function copySkills(repoPath, skillNames) {
4358
4358
  O2.warn("Skills directory not found in package \u2014 skipping.");
4359
4359
  return;
4360
4360
  }
4361
- const destParent = skillDestDir(repoPath);
4362
- mkdirSync(destParent, { recursive: true });
4361
+ const parent = skillsParentDir(repoPath);
4362
+ mkdirSync(parent, { recursive: true });
4363
4363
  for (const name of skillNames) {
4364
4364
  const skillSrc = resolve(src, name);
4365
- const skillDest = resolve(destParent, name);
4365
+ const skillDest = resolve(parent, name);
4366
4366
  if (existsSync(skillDest)) continue;
4367
4367
  cpSync(skillSrc, skillDest, { recursive: true });
4368
4368
  }
@@ -4380,8 +4380,11 @@ async function promptInstallSkills(repoPath, { install } = {}) {
4380
4380
  }
4381
4381
  if (install === false) return;
4382
4382
  if (!isInteractive()) return;
4383
- const isUpgrade = existsSync(skillDestDir(repoPath));
4384
- const message = isUpgrade ? `New Claude Code skill${missing.length === 1 ? "" : "s"} available: ${missing.join(", ")}. Install?` : "Would you like to install Claude Code skills?";
4383
+ const src = resolveSkillsSrcDir();
4384
+ const shipped = src ? listSkillDirs(src) : [];
4385
+ const parent = skillsParentDir(repoPath);
4386
+ const alreadyInstalled = shipped.some((name) => existsSync(resolve(parent, name)));
4387
+ const message = alreadyInstalled ? `New Claude Code skill${missing.length === 1 ? "" : "s"} available: ${missing.join(", ")}. Install?` : "Would you like to install Claude Code skills?";
4385
4388
  const answer = await ot2({ message });
4386
4389
  if (q(answer) || !answer) return;
4387
4390
  copySkills(repoPath, missing);
@@ -130730,7 +130733,7 @@ async function runHooksRun() {
130730
130733
 
130731
130734
  // tools/cli/src/index.ts
130732
130735
  var program2 = new Command();
130733
- program2.name("truecourse").version("0.5.3").description("TrueCourse CLI \u2014 analyze your repository and open the dashboard");
130736
+ program2.name("truecourse").version("0.5.4").description("TrueCourse CLI \u2014 analyze your repository and open the dashboard");
130734
130737
  var dashboardCmd = program2.command("dashboard").description("Start the TrueCourse dashboard and open it in your browser").option("--reconfigure", "Re-prompt for console vs background service mode").option("--service", "Run as a background service (skips mode prompt)").option("--console", "Run in this terminal (skips mode prompt)").action(async (options) => {
130735
130738
  if (options.service && options.console) {
130736
130739
  console.error("error: --service and --console are mutually exclusive");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "truecourse",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Visualize your codebase architecture as an interactive graph",
5
5
  "type": "module",
6
6
  "bin": {