@solongate/proxy 0.81.69 → 0.81.70
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/global-install.d.ts +1 -0
- package/dist/global-install.js +10 -1
- package/dist/index.js +387 -395
- package/dist/login.js +1 -1
- package/dist/tui/components.d.ts +31 -0
- package/dist/tui/index.js +181 -167
- package/package.json +1 -1
package/dist/global-install.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export declare function globalPaths(): {
|
|
|
9
9
|
backupPath: string;
|
|
10
10
|
configPath: string;
|
|
11
11
|
};
|
|
12
|
+
export declare function clearGuardUpdateCheck(): boolean;
|
|
12
13
|
export declare function runGlobalRestore(): void;
|
|
13
14
|
export declare function installClaudeShim(shieldPath: string): void;
|
|
14
15
|
export declare function removeClaudeShim(): void;
|
package/dist/global-install.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/global-install.ts
|
|
2
|
-
import { readFileSync, writeFileSync, existsSync, mkdirSync } from "fs";
|
|
2
|
+
import { readFileSync, writeFileSync, existsSync, mkdirSync, rmSync } from "fs";
|
|
3
3
|
import { resolve, join, dirname } from "path";
|
|
4
4
|
import { homedir } from "os";
|
|
5
5
|
import { fileURLToPath } from "url";
|
|
@@ -95,6 +95,14 @@ function globalPaths() {
|
|
|
95
95
|
configPath: join(sgDir, "cloud-guard.json")
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
+
function clearGuardUpdateCheck() {
|
|
99
|
+
try {
|
|
100
|
+
rmSync(join(globalPaths().sgDir, ".hook-update-check"), { force: true });
|
|
101
|
+
return true;
|
|
102
|
+
} catch {
|
|
103
|
+
return false;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
98
106
|
function readHook(filename) {
|
|
99
107
|
return readFileSync(join(HOOKS_DIR, filename), "utf-8");
|
|
100
108
|
}
|
|
@@ -267,6 +275,7 @@ async function installGlobalWithKey(apiKey, apiUrl) {
|
|
|
267
275
|
await runGlobalInstall({ apiKey, apiUrl });
|
|
268
276
|
}
|
|
269
277
|
export {
|
|
278
|
+
clearGuardUpdateCheck,
|
|
270
279
|
globalPaths,
|
|
271
280
|
installClaudeShim,
|
|
272
281
|
installGlobalWithKey,
|