ccstatusline-usage 2.3.7 → 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
@@ -66,6 +66,11 @@ 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
+
69
74
  ### [v2.3.7](https://github.com/pcvelz/ccstatusline-usage/releases/tag/v2.3.7) - Weekly Pace as default layout
70
75
 
71
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.
@@ -54074,7 +54074,7 @@ function getTerminalWidth() {
54074
54074
  function canDetectTerminalWidth() {
54075
54075
  return probeTerminalWidth() !== null;
54076
54076
  }
54077
- var __dirname = "/Users/peter/Documents/Code/ccstatusline-usage/src/utils", PACKAGE_VERSION = "2.3.7";
54077
+ var __dirname = "/Users/peter/Documents/Code/ccstatusline-usage/src/utils", PACKAGE_VERSION = "2.3.8";
54078
54078
  var init_terminal = () => {};
54079
54079
 
54080
54080
  // src/utils/renderer.ts
@@ -62748,6 +62748,11 @@ function minutesUntilFlip(now2) {
62748
62748
  const flipHour = peak ? PEAK_END_UTC_HOUR : PEAK_START_UTC_HOUR;
62749
62749
  const target = new Date(now2);
62750
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
+ }
62751
62756
  target.setUTCDate(now2.getUTCDate() + 1);
62752
62757
  }
62753
62758
  target.setUTCHours(flipHour, 0, 0, 0);
@@ -63103,8 +63108,16 @@ function getSettingsPaths() {
63103
63108
  settingsBackupPath: path8.join(configDir, backupBaseName)
63104
63109
  };
63105
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
+ }
63106
63119
  async function writeSettingsJson(settings, paths) {
63107
- await mkdir(paths.configDir, { recursive: true });
63120
+ await ensureDir(paths.configDir);
63108
63121
  await writeFile(paths.settingsPath, JSON.stringify(settings, null, 2), "utf-8");
63109
63122
  }
63110
63123
  async function backupBadSettings(paths) {
@@ -63290,7 +63303,7 @@ async function saveClaudeSettings(settings) {
63290
63303
  const settingsPath2 = getClaudeSettingsPath();
63291
63304
  const dir = path9.dirname(settingsPath2);
63292
63305
  await backupClaudeSettings();
63293
- await mkdir2(dir, { recursive: true });
63306
+ await ensureDir(dir);
63294
63307
  await writeFile2(settingsPath2, JSON.stringify(settings, null, 2), "utf-8");
63295
63308
  }
63296
63309
  async function isInstalled() {
@@ -63383,13 +63396,12 @@ async function getExistingStatusLine() {
63383
63396
  return null;
63384
63397
  }
63385
63398
  }
63386
- var readFile4, writeFile2, mkdir2, CCSTATUSLINE_COMMANDS;
63399
+ var readFile4, writeFile2, CCSTATUSLINE_COMMANDS;
63387
63400
  var init_claude_settings = __esm(() => {
63388
63401
  init_Settings();
63389
63402
  init_config();
63390
63403
  readFile4 = fs11.promises.readFile;
63391
63404
  writeFile2 = fs11.promises.writeFile;
63392
- mkdir2 = fs11.promises.mkdir;
63393
63405
  CCSTATUSLINE_COMMANDS = {
63394
63406
  NPM: "npx -y ccstatusline-usage@latest",
63395
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.7",
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",