claudish 3.0.4 → 3.0.5

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/index.js +16 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -39898,8 +39898,8 @@ var init_openai_compat = __esm(() => {
39898
39898
  });
39899
39899
 
39900
39900
  // src/handlers/openrouter-handler.ts
39901
- import { writeFileSync as writeFileSync8 } from "node:fs";
39902
- import { tmpdir as tmpdir2 } from "node:os";
39901
+ import { writeFileSync as writeFileSync8, mkdirSync as mkdirSync5 } from "node:fs";
39902
+ import { homedir as homedir2 } from "node:os";
39903
39903
  import { join as join8 } from "node:path";
39904
39904
 
39905
39905
  class OpenRouterHandler {
@@ -39947,7 +39947,9 @@ class OpenRouterHandler {
39947
39947
  context_left_percent: leftPct,
39948
39948
  updated_at: Date.now()
39949
39949
  };
39950
- writeFileSync8(join8(tmpdir2(), `claudish-tokens-${this.port}.json`), JSON.stringify(data), "utf-8");
39950
+ const claudishDir = join8(homedir2(), ".claudish");
39951
+ mkdirSync5(claudishDir, { recursive: true });
39952
+ writeFileSync8(join8(claudishDir, `tokens-${this.port}.json`), JSON.stringify(data), "utf-8");
39951
39953
  } catch (e) {}
39952
39954
  }
39953
39955
  async handle(c, payload) {
@@ -60599,8 +60601,8 @@ var init_undici = __esm(() => {
60599
60601
  });
60600
60602
 
60601
60603
  // src/handlers/local-provider-handler.ts
60602
- import { writeFileSync as writeFileSync9 } from "node:fs";
60603
- import { tmpdir as tmpdir3 } from "node:os";
60604
+ import { writeFileSync as writeFileSync9, mkdirSync as mkdirSync6 } from "node:fs";
60605
+ import { homedir as homedir3 } from "node:os";
60604
60606
  import { join as join9 } from "node:path";
60605
60607
 
60606
60608
  class LocalProviderHandler {
@@ -60767,7 +60769,9 @@ class LocalProviderHandler {
60767
60769
  context_left_percent: leftPct,
60768
60770
  updated_at: Date.now()
60769
60771
  };
60770
- writeFileSync9(join9(tmpdir3(), `claudish-tokens-${this.port}.json`), JSON.stringify(data), "utf-8");
60772
+ const claudishDir = join9(homedir3(), ".claudish");
60773
+ mkdirSync6(claudishDir, { recursive: true });
60774
+ writeFileSync9(join9(claudishDir, `tokens-${this.port}.json`), JSON.stringify(data), "utf-8");
60771
60775
  } catch (e) {}
60772
60776
  }
60773
60777
  async handle(c, payload) {
@@ -61289,24 +61293,24 @@ __export(exports_update_checker, {
61289
61293
  });
61290
61294
  import { execSync } from "node:child_process";
61291
61295
  import { createInterface as createInterface2 } from "node:readline";
61292
- import { existsSync as existsSync7, readFileSync as readFileSync6, writeFileSync as writeFileSync10, mkdirSync as mkdirSync5, unlinkSync as unlinkSync2 } from "node:fs";
61296
+ import { existsSync as existsSync7, readFileSync as readFileSync6, writeFileSync as writeFileSync10, mkdirSync as mkdirSync7, unlinkSync as unlinkSync2 } from "node:fs";
61293
61297
  import { join as join10 } from "node:path";
61294
- import { tmpdir as tmpdir4, homedir as homedir2, platform } from "node:os";
61298
+ import { tmpdir as tmpdir2, homedir as homedir4, platform } from "node:os";
61295
61299
  function getCacheFilePath() {
61296
61300
  let cacheDir;
61297
61301
  if (isWindows2) {
61298
- const localAppData = process.env.LOCALAPPDATA || join10(homedir2(), "AppData", "Local");
61302
+ const localAppData = process.env.LOCALAPPDATA || join10(homedir4(), "AppData", "Local");
61299
61303
  cacheDir = join10(localAppData, "claudish");
61300
61304
  } else {
61301
- cacheDir = join10(homedir2(), ".cache", "claudish");
61305
+ cacheDir = join10(homedir4(), ".cache", "claudish");
61302
61306
  }
61303
61307
  try {
61304
61308
  if (!existsSync7(cacheDir)) {
61305
- mkdirSync5(cacheDir, { recursive: true });
61309
+ mkdirSync7(cacheDir, { recursive: true });
61306
61310
  }
61307
61311
  return join10(cacheDir, "update-check.json");
61308
61312
  } catch {
61309
- return join10(tmpdir4(), "claudish-update-check.json");
61313
+ return join10(tmpdir2(), "claudish-update-check.json");
61310
61314
  }
61311
61315
  }
61312
61316
  function readCache() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudish",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "Run Claude Code with any model - OpenRouter, Ollama, LM Studio & local models",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",