ccstatusline-usage 2.3.6 → 2.3.8

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/README.md CHANGED
@@ -40,8 +40,8 @@ This fork adds API-based usage widgets beyond the upstream:
40
40
  ### Enhanced Status Line Preview
41
41
 
42
42
  ```
43
- Session: [████░░░░░░░░░░░] 27.0% | Weekly: [███████████████] 100.0% | Extra: €2.50/€50.00 | Model: Opus 4.6 | Session ID: 0109b99d...
44
- Context: [███████░░░░░░░░] 103k/200k (51%) | Pace: [░░░░░░░|██░░░░░] D5/7 +12% | Off peak: Off-peak 2x
43
+ Session: [████░░░░░░░░░░░] 27.0% | Weekly: [████░░░░░░░░░░░] 34.0% | 2:03 hr | Model: Opus 4.6 | Session ID: 0109b99d...
44
+ Context: [██████░░░░░░░░░] 389k/1M (39%) | Pace: [░░░░░░█|░░░░░░░] D4/7 -8% | Off-peak (4:03 hr)
45
45
  ```
46
46
 
47
47
  ![Demo](https://raw.githubusercontent.com/sirmalloc/ccstatusline/main/screenshots/demo.gif)
@@ -66,6 +66,15 @@ Session: [████░░░░░░░░░░░] 27.0% | Weekly: [██
66
66
 
67
67
  ## 🆕 Recent Updates
68
68
 
69
+ ### [v2.3.8](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.3.8) - Fix off-peak countdown + Windows EEXIST fix
70
+
71
+ - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **Off-peak countdown fix** — Friday evening now correctly counts to Monday peak instead of Saturday noon. Added test coverage for the off-peak time calculation logic.
72
+ - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **Windows EEXIST fix** — Handle `mkdir` throwing EEXIST on Windows junction points/symlinks when saving config ([#2](https://github.com/pcvelz/ccstatusline-usage/pull/2), thanks [@BenIsLegit](https://github.com/BenIsLegit))
73
+
74
+ ### [v2.3.7](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.3.7) - Weekly Pace as default layout
75
+
76
+ - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **Default layout update** — Weekly Pace widget (pendulum mode) is now included in the default status line layout on line 2, between the context bar and off-peak indicator. Model widget color changed to magenta.
77
+
69
78
  ### [v2.3.6](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.3.6) - Remove expired 2x promo code
70
79
 
71
80
  - [pcvelz/ccstatusline-usage](https://github.com/pcvelz/ccstatusline-usage): **Off-Peak cleanup** — Removed expired March 2026 promo (2x) code path, leaving only the permanent peak/off-peak indicator
@@ -52423,12 +52423,14 @@ var init_Settings = __esm(() => {
52423
52423
  { id: "sep-battery", type: "separator" },
52424
52424
  { id: "battery", type: "battery", color: "yellow" },
52425
52425
  { id: "sep3", type: "separator" },
52426
- { id: "model", type: "model", color: "cyan" },
52426
+ { id: "model", type: "model", color: "magenta" },
52427
52427
  { id: "sep4", type: "separator" },
52428
52428
  { id: "session-id", type: "claude-session-id", color: "cyan" }
52429
52429
  ],
52430
52430
  [
52431
52431
  { id: "context-bar", type: "context-bar", color: "blue" },
52432
+ { id: "sep-weekly-pace", type: "separator" },
52433
+ { id: "weekly-pace", type: "weekly-pace", color: "brightBlue", metadata: { display: "pendulum" } },
52432
52434
  { id: "sep-off-peak", type: "separator" },
52433
52435
  { id: "off-peak", type: "off-peak", color: "green" }
52434
52436
  ],
@@ -54072,7 +54074,7 @@ function getTerminalWidth() {
54072
54074
  function canDetectTerminalWidth() {
54073
54075
  return probeTerminalWidth() !== null;
54074
54076
  }
54075
- var __dirname = "/Users/peter/Documents/Code/ccstatusline-usage/src/utils", PACKAGE_VERSION = "2.3.6";
54077
+ var __dirname = "/Users/peter/Documents/Code/ccstatusline-usage/src/utils", PACKAGE_VERSION = "2.3.8";
54076
54078
  var init_terminal = () => {};
54077
54079
 
54078
54080
  // src/utils/renderer.ts
@@ -62746,6 +62748,11 @@ function minutesUntilFlip(now2) {
62746
62748
  const flipHour = peak ? PEAK_END_UTC_HOUR : PEAK_START_UTC_HOUR;
62747
62749
  const target = new Date(now2);
62748
62750
  if (!peak && utcHour >= PEAK_END_UTC_HOUR) {
62751
+ const tomorrow = new Date(now2);
62752
+ tomorrow.setUTCDate(now2.getUTCDate() + 1);
62753
+ if (isWeekend(tomorrow)) {
62754
+ return minutesUntilMondayPeak(now2);
62755
+ }
62749
62756
  target.setUTCDate(now2.getUTCDate() + 1);
62750
62757
  }
62751
62758
  target.setUTCHours(flipHour, 0, 0, 0);
@@ -63101,8 +63108,16 @@ function getSettingsPaths() {
63101
63108
  settingsBackupPath: path8.join(configDir, backupBaseName)
63102
63109
  };
63103
63110
  }
63111
+ async function ensureDir(dir) {
63112
+ try {
63113
+ await mkdir(dir, { recursive: true });
63114
+ } catch (err) {
63115
+ if (err.code !== "EEXIST")
63116
+ throw err;
63117
+ }
63118
+ }
63104
63119
  async function writeSettingsJson(settings, paths) {
63105
- await mkdir(paths.configDir, { recursive: true });
63120
+ await ensureDir(paths.configDir);
63106
63121
  await writeFile(paths.settingsPath, JSON.stringify(settings, null, 2), "utf-8");
63107
63122
  }
63108
63123
  async function backupBadSettings(paths) {
@@ -63288,7 +63303,7 @@ async function saveClaudeSettings(settings) {
63288
63303
  const settingsPath2 = getClaudeSettingsPath();
63289
63304
  const dir = path9.dirname(settingsPath2);
63290
63305
  await backupClaudeSettings();
63291
- await mkdir2(dir, { recursive: true });
63306
+ await ensureDir(dir);
63292
63307
  await writeFile2(settingsPath2, JSON.stringify(settings, null, 2), "utf-8");
63293
63308
  }
63294
63309
  async function isInstalled() {
@@ -63381,13 +63396,12 @@ async function getExistingStatusLine() {
63381
63396
  return null;
63382
63397
  }
63383
63398
  }
63384
- var readFile4, writeFile2, mkdir2, CCSTATUSLINE_COMMANDS;
63399
+ var readFile4, writeFile2, CCSTATUSLINE_COMMANDS;
63385
63400
  var init_claude_settings = __esm(() => {
63386
63401
  init_Settings();
63387
63402
  init_config();
63388
63403
  readFile4 = fs11.promises.readFile;
63389
63404
  writeFile2 = fs11.promises.writeFile;
63390
- mkdir2 = fs11.promises.mkdir;
63391
63405
  CCSTATUSLINE_COMMANDS = {
63392
63406
  NPM: "npx -y ccstatusline-usage@latest",
63393
63407
  BUNX: "bunx -y ccstatusline-usage@latest",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccstatusline-usage",
3
- "version": "2.3.6",
3
+ "version": "2.3.8",
4
4
  "description": "A customizable status line formatter for Claude Code CLI",
5
5
  "module": "src/ccstatusline.ts",
6
6
  "type": "module",