claudeck 1.0.5 → 1.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudeck",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "type": "module",
5
5
  "description": "A browser-based UI for Claude Code — chat, run workflows, manage MCP servers, track costs, and orchestrate autonomous agents from a local web interface. Installable as a PWA.",
6
6
  "main": "server.js",
@@ -28,9 +28,10 @@ function findClaudeBinary() {
28
28
  if (process.platform === "win32") {
29
29
  candidates.push(join(home, "AppData", "Local", "Programs", "claude", "claude.exe"));
30
30
  candidates.push(join(home, ".claude", "local", "claude.exe"));
31
- // npm global installs on Windows use .cmd shims
31
+ // npm global installs on Windows both .cmd shim and plain executable
32
32
  const appData = process.env.APPDATA || join(home, "AppData", "Roaming");
33
33
  candidates.push(join(appData, "npm", "claude.cmd"));
34
+ candidates.push(join(appData, "npm", "claude"));
34
35
  }
35
36
  for (const p of candidates) {
36
37
  if (existsSync(p)) return p;
@@ -45,14 +46,18 @@ router.get("/account", async (req, res) => {
45
46
  }
46
47
  try {
47
48
  const data = await new Promise((resolve, reject) => {
48
- const opts = { timeout: 10000 };
49
- const cb = (err, stdout) => {
49
+ const opts = { timeout: 10000, env: { ...process.env, FORCE_COLOR: "0" } };
50
+ const cb = (err, stdout, stderr) => {
50
51
  if (err) return reject(err);
51
- try { resolve(JSON.parse(stdout)); } catch (e) { reject(e); }
52
+ const out = (stdout || "").trim();
53
+ try { resolve(JSON.parse(out)); } catch {
54
+ // claude auth status may not return JSON — extract what we can
55
+ resolve({ email: null, subscriptionType: null, raw: out });
56
+ }
52
57
  };
53
- // On Windows, use exec so .cmd shims on PATH resolve correctly
58
+ // On Windows, use exec with shell so .cmd shims and PATH resolve correctly
54
59
  if (process.platform === "win32") {
55
- exec("claude auth status", opts, cb);
60
+ exec(`"${claudeBin}" auth status`, { ...opts, shell: true }, cb);
56
61
  } else {
57
62
  execFile(claudeBin, ["auth", "status"], opts, cb);
58
63
  }