coding-friend-cli 1.2.1 → 1.3.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.
@@ -3,6 +3,7 @@ import {
3
3
  run
4
4
  } from "./chunk-UFGNO6CW.js";
5
5
  import {
6
+ claudeSettingsPath,
6
7
  devStatePath,
7
8
  installedPluginsPath,
8
9
  knownMarketplacesPath,
@@ -63,6 +64,28 @@ function runClaude(args, label) {
63
64
  }
64
65
  return true;
65
66
  }
67
+ function updateSettingsCachePaths() {
68
+ const cachePath = pluginCachePath();
69
+ if (!existsSync(cachePath)) return;
70
+ const versions = readdirSync(cachePath, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort().reverse();
71
+ const latest = versions[0];
72
+ if (!latest) return;
73
+ const settingsPath = claudeSettingsPath();
74
+ const settings = readJson(settingsPath);
75
+ if (!settings) return;
76
+ const statusLine = settings.statusLine;
77
+ if (!statusLine?.command) return;
78
+ const prefix = cachePath + "/";
79
+ if (!statusLine.command.includes(prefix)) return;
80
+ const updated = statusLine.command.replace(
81
+ new RegExp(`${prefix.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}[^/]+/`),
82
+ `${prefix}${latest}/`
83
+ );
84
+ if (updated === statusLine.command) return;
85
+ settings.statusLine = { ...statusLine, command: updated };
86
+ writeJson(settingsPath, settings);
87
+ log.info(`Updated statusline path to ${chalk.green(`v${latest}`)}`);
88
+ }
66
89
  async function devOnCommand(path) {
67
90
  const state = getDevState();
68
91
  if (state) {
@@ -116,6 +139,7 @@ async function devOnCommand(path) {
116
139
  savedAt: (/* @__PURE__ */ new Date()).toISOString()
117
140
  };
118
141
  writeJson(devStatePath(), devState);
142
+ updateSettingsCachePaths();
119
143
  console.log();
120
144
  log.success(
121
145
  `Dev mode ${chalk.green("ON")} \u2014 using local plugin from ${chalk.cyan(localPath)}`
package/dist/index.js CHANGED
@@ -45,28 +45,28 @@ Dev subcommands:
45
45
  dev restart [path] Reinstall local dev plugin (off + on)`
46
46
  );
47
47
  dev.command("on").description("Switch to local plugin source").argument("[path]", "path to local coding-friend repo (default: cwd)").action(async (path) => {
48
- const { devOnCommand } = await import("./dev-MAAWPWML.js");
48
+ const { devOnCommand } = await import("./dev-VMN2JHA6.js");
49
49
  await devOnCommand(path);
50
50
  });
51
51
  dev.command("off").description("Switch back to remote marketplace").action(async () => {
52
- const { devOffCommand } = await import("./dev-MAAWPWML.js");
52
+ const { devOffCommand } = await import("./dev-VMN2JHA6.js");
53
53
  await devOffCommand();
54
54
  });
55
55
  dev.command("status").description("Show current dev mode").action(async () => {
56
- const { devStatusCommand } = await import("./dev-MAAWPWML.js");
56
+ const { devStatusCommand } = await import("./dev-VMN2JHA6.js");
57
57
  await devStatusCommand();
58
58
  });
59
59
  dev.command("sync").description(
60
60
  "Copy local source files to plugin cache (no version bump needed)"
61
61
  ).action(async () => {
62
- const { devSyncCommand } = await import("./dev-MAAWPWML.js");
62
+ const { devSyncCommand } = await import("./dev-VMN2JHA6.js");
63
63
  await devSyncCommand();
64
64
  });
65
65
  dev.command("restart").description("Reinstall local dev plugin (off + on)").argument(
66
66
  "[path]",
67
67
  "path to local coding-friend repo (default: saved path or cwd)"
68
68
  ).action(async (path) => {
69
- const { devRestartCommand } = await import("./dev-MAAWPWML.js");
69
+ const { devRestartCommand } = await import("./dev-VMN2JHA6.js");
70
70
  await devRestartCommand(path);
71
71
  });
72
72
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coding-friend-cli",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "CLI for coding-friend — host learning docs, setup MCP server, initialize projects",
5
5
  "type": "module",
6
6
  "bin": {