cc-pulse 1.5.2 → 1.6.0

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/dist/cli.js +29 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -16,7 +16,7 @@ var __export = (target, all) => {
16
16
  // package.json
17
17
  var package_default = {
18
18
  name: "cc-pulse",
19
- version: "1.5.2",
19
+ version: "1.6.0",
20
20
  description: "A customizable, real-time statusline for Claude Code",
21
21
  type: "module",
22
22
  bin: {
@@ -428,6 +428,26 @@ function getGitInfo() {
428
428
  import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
429
429
  import { homedir as homedir3 } from "node:os";
430
430
  import { join as join2 } from "node:path";
431
+
432
+ // src/utils.ts
433
+ import { execSync as execSync2 } from "node:child_process";
434
+ var cachedProjectRoot;
435
+ function getProjectRoot() {
436
+ if (cachedProjectRoot !== undefined)
437
+ return cachedProjectRoot;
438
+ try {
439
+ cachedProjectRoot = execSync2("git rev-parse --show-toplevel", {
440
+ encoding: "utf-8",
441
+ timeout: 2000,
442
+ stdio: ["pipe", "pipe", "ignore"]
443
+ }).trim();
444
+ } catch {
445
+ cachedProjectRoot = null;
446
+ }
447
+ return cachedProjectRoot;
448
+ }
449
+
450
+ // src/components/hooks.ts
431
451
  var EVENT_LABELS = {
432
452
  PreToolUse: "Pre",
433
453
  PostToolUse: "Post",
@@ -485,8 +505,11 @@ function getHooksSummary() {
485
505
  let total = 0;
486
506
  const globalPath = join2(homedir3(), ".claude", "settings.json");
487
507
  mergeHooksFromFile(globalPath, events);
488
- const projectPath = join2(process.cwd(), ".claude", "settings.json");
508
+ const projectRoot = getProjectRoot() ?? process.cwd();
509
+ const projectPath = join2(projectRoot, ".claude", "settings.json");
489
510
  mergeHooksFromFile(projectPath, events);
511
+ const localPath = join2(projectRoot, ".claude", "settings.local.json");
512
+ mergeHooksFromFile(localPath, events);
490
513
  for (const [key, detail] of Object.entries(events)) {
491
514
  if (detail.count === 0)
492
515
  delete events[key];
@@ -577,7 +600,7 @@ function renderLinesChanged(input, config, theme) {
577
600
  return { text: parts.join(" ") };
578
601
  }
579
602
  // src/components/mcp.ts
580
- import { execSync as execSync2 } from "node:child_process";
603
+ import { execSync as execSync3 } from "node:child_process";
581
604
  import { existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs";
582
605
  import { homedir as homedir4 } from "node:os";
583
606
  import { join as join3 } from "node:path";
@@ -664,7 +687,7 @@ function getMcpServers() {
664
687
  servers = state.mcp.servers.map((s) => ({ ...s }));
665
688
  } else {
666
689
  try {
667
- const output = execSync2("claude mcp list", {
690
+ const output = execSync3("claude mcp list", {
668
691
  encoding: "utf-8",
669
692
  timeout: 8000,
670
693
  stdio: ["pipe", "pipe", "ignore"]
@@ -964,7 +987,8 @@ function getSkillsSummary() {
964
987
  const skills = [];
965
988
  const userSkillsPath = join4(homedir5(), ".claude", "skills");
966
989
  scanSkillsDirectory(userSkillsPath, skills);
967
- const projectSkillsPath = join4(process.cwd(), ".claude", "skills");
990
+ const projectRoot = getProjectRoot() ?? process.cwd();
991
+ const projectSkillsPath = join4(projectRoot, ".claude", "skills");
968
992
  scanSkillsDirectory(projectSkillsPath, skills);
969
993
  const seen = new Set;
970
994
  const deduped = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-pulse",
3
- "version": "1.5.2",
3
+ "version": "1.6.0",
4
4
  "description": "A customizable, real-time statusline for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {