swixter 0.1.3 → 0.1.4

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/dist/cli/index.js CHANGED
@@ -13999,7 +13999,7 @@ var CONFIG_VERSION = "2.0.0", EXPORT_VERSION = "1.0.0";
13999
13999
  var init_versions2 = () => {};
14000
14000
 
14001
14001
  // src/constants/meta.ts
14002
- var APP_VERSION = "0.1.3";
14002
+ var APP_VERSION = "0.1.4";
14003
14003
  var init_meta = () => {};
14004
14004
 
14005
14005
  // src/constants/install.ts
@@ -26527,7 +26527,7 @@ var init_client = __esm(() => {
26527
26527
  });
26528
26528
 
26529
26529
  // src/auth/token.ts
26530
- import { existsSync as existsSync11 } from "node:fs";
26530
+ import { existsSync as existsSync12 } from "node:fs";
26531
26531
  import { readFile as readFile9, writeFile as writeFile8, unlink as unlink2 } from "node:fs/promises";
26532
26532
  import { join as join10 } from "node:path";
26533
26533
  function getAuthFilePath() {
@@ -26535,7 +26535,7 @@ function getAuthFilePath() {
26535
26535
  }
26536
26536
  async function loadAuthState() {
26537
26537
  const authPath = getAuthFilePath();
26538
- if (!existsSync11(authPath))
26538
+ if (!existsSync12(authPath))
26539
26539
  return null;
26540
26540
  try {
26541
26541
  const content = await readFile9(authPath, "utf-8");
@@ -26550,7 +26550,7 @@ async function saveAuthState(state) {
26550
26550
  }
26551
26551
  async function clearAuthState() {
26552
26552
  const authPath = getAuthFilePath();
26553
- if (existsSync11(authPath)) {
26553
+ if (existsSync12(authPath)) {
26554
26554
  await unlink2(authPath);
26555
26555
  }
26556
26556
  }
@@ -29429,6 +29429,7 @@ var import_picocolors12 = __toESM(require_picocolors(), 1);
29429
29429
 
29430
29430
  // src/server/index.ts
29431
29431
  import http2 from "node:http";
29432
+ import { existsSync as existsSync11 } from "node:fs";
29432
29433
  import { dirname as dirname9, join as join9 } from "node:path";
29433
29434
  import { fileURLToPath } from "node:url";
29434
29435
 
@@ -30446,11 +30447,11 @@ function openBrowser(url2) {
30446
30447
  });
30447
30448
  }
30448
30449
  function getUiDir() {
30449
- const isDev = true;
30450
- if (isDev) {
30451
- return join9(__dirname2, "..", "..", "ui", "dist");
30450
+ const bundledUiDir = join9(__dirname2, "..", "ui");
30451
+ if (existsSync11(join9(bundledUiDir, "index.html"))) {
30452
+ return bundledUiDir;
30452
30453
  }
30453
- return join9(__dirname2, "..", "..", "ui");
30454
+ return join9(__dirname2, "..", "..", "ui", "dist");
30454
30455
  }
30455
30456
  async function startServer(portArg) {
30456
30457
  const port = portArg || await findAvailablePort(3141);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swixter",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "CLI tool for managing AI coding assistant configurations - easily switch between providers (Claude Code, Codex, Continue) with Anthropic, Ollama, or custom APIs",
5
5
  "main": "dist/cli/index.js",
6
6
  "module": "dist/cli/index.js",