cc-pulse 1.5.0 → 1.5.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.
Files changed (2) hide show
  1. package/dist/cli.js +21 -11
  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.0",
19
+ version: "1.5.2",
20
20
  description: "A customizable, real-time statusline for Claude Code",
21
21
  type: "module",
22
22
  bin: {
@@ -487,6 +487,10 @@ function getHooksSummary() {
487
487
  mergeHooksFromFile(globalPath, events);
488
488
  const projectPath = join2(process.cwd(), ".claude", "settings.json");
489
489
  mergeHooksFromFile(projectPath, events);
490
+ for (const [key, detail] of Object.entries(events)) {
491
+ if (detail.count === 0)
492
+ delete events[key];
493
+ }
490
494
  let totalBroken = 0;
491
495
  for (const detail of Object.values(events)) {
492
496
  total += detail.count;
@@ -498,8 +502,19 @@ function extractHookInfo(command) {
498
502
  const parts = command.split(/\s+/);
499
503
  for (const part of parts) {
500
504
  if (part.includes("/")) {
501
- const cleaned = part.replace(/^["']|["']$/g, "");
502
- const expanded = cleaned.replace(/\$(\w+)/g, (_, v) => process.env[v] ?? `$${v}`);
505
+ const cleaned = part.replace(/["']/g, "");
506
+ let expanded = cleaned.replace(/\$(\w+)/g, (_, v) => {
507
+ if (v === "CLAUDE_PROJECT_DIR")
508
+ return process.env[v] ?? process.cwd();
509
+ return process.env[v] ?? `$${v}`;
510
+ });
511
+ if (expanded.startsWith("~/")) {
512
+ expanded = join2(homedir3(), expanded.slice(2));
513
+ }
514
+ if (!expanded.startsWith("/")) {
515
+ const projectDir = process.env.CLAUDE_PROJECT_DIR ?? process.cwd();
516
+ expanded = join2(projectDir, expanded);
517
+ }
503
518
  const base = expanded.split("/").pop() ?? expanded;
504
519
  const name2 = base.replace(/\.[^.]+$/, "");
505
520
  const broken = !existsSync2(expanded);
@@ -566,7 +581,7 @@ import { execSync as execSync2 } from "node:child_process";
566
581
  import { existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs";
567
582
  import { homedir as homedir4 } from "node:os";
568
583
  import { join as join3 } from "node:path";
569
- var CACHE_TTL2 = 30000;
584
+ var CACHE_TTL2 = 1e4;
570
585
  function renderMcp(config, theme) {
571
586
  if (config.enabled === false) {
572
587
  return { text: "" };
@@ -609,9 +624,7 @@ function renderMcp(config, theme) {
609
624
  const text2 = `${theme.sky}${label} ${theme.overlay0}0${theme.reset}`;
610
625
  return { text: text2, action: "/mcp" };
611
626
  }
612
- const displayServers = servers.slice(0, maxDisplay);
613
- const remaining = servers.length - maxDisplay;
614
- const serverItems = displayServers.map((server) => {
627
+ const serverItems = servers.map((server) => {
615
628
  let icon;
616
629
  let color;
617
630
  switch (server.status) {
@@ -633,9 +646,6 @@ function renderMcp(config, theme) {
633
646
  }
634
647
  return `${color}${server.name} ${icon}${theme.reset}`;
635
648
  });
636
- if (remaining > 0) {
637
- serverItems.push(`${theme.sky}+${remaining} more${theme.reset}`);
638
- }
639
649
  const countStr = `${connectedCount}/${servers.length}`;
640
650
  const header = `${theme.sky}${label} ${theme.green}${countStr}${theme.reset}:`;
641
651
  if (config.showNames === false) {
@@ -656,7 +666,7 @@ function getMcpServers() {
656
666
  try {
657
667
  const output = execSync2("claude mcp list", {
658
668
  encoding: "utf-8",
659
- timeout: 3000,
669
+ timeout: 8000,
660
670
  stdio: ["pipe", "pipe", "ignore"]
661
671
  });
662
672
  servers = parseMcpOutput(output);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-pulse",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "A customizable, real-time statusline for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {