swixter 0.1.8 → 0.1.9
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 +11 -7
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -14021,7 +14021,7 @@ var CONFIG_VERSION = "2.0.0", EXPORT_VERSION = "1.0.0";
|
|
|
14021
14021
|
var init_versions2 = () => {};
|
|
14022
14022
|
|
|
14023
14023
|
// src/constants/meta.ts
|
|
14024
|
-
var APP_VERSION = "0.1.
|
|
14024
|
+
var APP_VERSION = "0.1.9";
|
|
14025
14025
|
var init_meta = () => {};
|
|
14026
14026
|
|
|
14027
14027
|
// src/constants/install.ts
|
|
@@ -27123,7 +27123,7 @@ var init_handler = __esm(() => {
|
|
|
27123
27123
|
|
|
27124
27124
|
// src/proxy/server.ts
|
|
27125
27125
|
import http from "node:http";
|
|
27126
|
-
import { existsSync as existsSync7, readFileSync, writeFileSync } from "node:fs";
|
|
27126
|
+
import { existsSync as existsSync7, mkdirSync as mkdirSync2, readFileSync, writeFileSync } from "node:fs";
|
|
27127
27127
|
import { dirname as dirname7, join as join7 } from "node:path";
|
|
27128
27128
|
function getRegistryPath() {
|
|
27129
27129
|
return join7(dirname7(getConfigPath2()), "proxy-instances.json");
|
|
@@ -27140,7 +27140,9 @@ function loadRegistry() {
|
|
|
27140
27140
|
}
|
|
27141
27141
|
}
|
|
27142
27142
|
function saveRegistry(registry2) {
|
|
27143
|
-
|
|
27143
|
+
const path = getRegistryPath();
|
|
27144
|
+
mkdirSync2(dirname7(path), { recursive: true });
|
|
27145
|
+
writeFileSync(path, JSON.stringify(registry2, null, 2), "utf-8");
|
|
27144
27146
|
}
|
|
27145
27147
|
function updateInstanceInRegistry(status) {
|
|
27146
27148
|
const registry2 = loadRegistry();
|
|
@@ -27572,8 +27574,8 @@ var init_client = __esm(() => {
|
|
|
27572
27574
|
|
|
27573
27575
|
// src/auth/token.ts
|
|
27574
27576
|
import { existsSync as existsSync13 } from "node:fs";
|
|
27575
|
-
import { readFile as readFile10, writeFile as writeFile9, unlink as unlink4 } from "node:fs/promises";
|
|
27576
|
-
import { join as join11 } from "node:path";
|
|
27577
|
+
import { mkdir as mkdir7, readFile as readFile10, writeFile as writeFile9, unlink as unlink4 } from "node:fs/promises";
|
|
27578
|
+
import { dirname as dirname11, join as join11 } from "node:path";
|
|
27577
27579
|
function getAuthFilePath() {
|
|
27578
27580
|
return join11(getConfigDir("swixter"), AUTH_FILE);
|
|
27579
27581
|
}
|
|
@@ -27590,6 +27592,7 @@ async function loadAuthState() {
|
|
|
27590
27592
|
}
|
|
27591
27593
|
async function saveAuthState(state) {
|
|
27592
27594
|
const authPath = getAuthFilePath();
|
|
27595
|
+
await mkdir7(dirname11(authPath), { recursive: true });
|
|
27593
27596
|
await writeFile9(authPath, JSON.stringify(state, null, 2), { mode: 384, encoding: "utf-8" });
|
|
27594
27597
|
}
|
|
27595
27598
|
async function clearAuthState() {
|
|
@@ -31679,8 +31682,8 @@ async function startServer(portArg, options) {
|
|
|
31679
31682
|
// src/utils/daemon.ts
|
|
31680
31683
|
init_paths();
|
|
31681
31684
|
import { existsSync as existsSync12 } from "node:fs";
|
|
31682
|
-
import { readFile as readFile9, writeFile as writeFile8, unlink as unlink3 } from "node:fs/promises";
|
|
31683
|
-
import { join as join10 } from "node:path";
|
|
31685
|
+
import { mkdir as mkdir6, readFile as readFile9, writeFile as writeFile8, unlink as unlink3 } from "node:fs/promises";
|
|
31686
|
+
import { dirname as dirname10, join as join10 } from "node:path";
|
|
31684
31687
|
function getPidFilePath() {
|
|
31685
31688
|
return join10(getConfigDir("swixter"), "ui.pid");
|
|
31686
31689
|
}
|
|
@@ -31701,6 +31704,7 @@ async function readPidFile() {
|
|
|
31701
31704
|
async function writePidFile(pid, port) {
|
|
31702
31705
|
const path = getPidFilePath();
|
|
31703
31706
|
const data = { pid, port, startTime: new Date().toISOString() };
|
|
31707
|
+
await mkdir6(dirname10(path), { recursive: true });
|
|
31704
31708
|
await writeFile8(path, JSON.stringify(data, null, 2), "utf-8");
|
|
31705
31709
|
}
|
|
31706
31710
|
async function removePidFile() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "swixter",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
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",
|