@solongate/proxy 0.80.0 → 0.81.1
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.js +5 -3
- package/dist/index.js +338 -142
- package/dist/login.js +5 -3
- package/dist/tui/config.d.ts +6 -0
- package/dist/tui/index.js +230 -55
- package/dist/tui/panels/Agents.d.ts +4 -0
- package/dist/tui/theme.d.ts +2 -3
- package/package.json +1 -1
package/dist/global-install.js
CHANGED
|
@@ -252,12 +252,14 @@ async function runGlobalInstall(opts = {}) {
|
|
|
252
252
|
const auditAbs = join(p.hooksDir, "audit.mjs").replace(/\\/g, "/");
|
|
253
253
|
const stopAbs = join(p.hooksDir, "stop.mjs").replace(/\\/g, "/");
|
|
254
254
|
const nodeBin = process.execPath.replace(/\\/g, "/");
|
|
255
|
+
const call = process.platform === "win32" ? "& " : "";
|
|
256
|
+
const hookCmd = (script) => `${call}"${nodeBin}" "${script}" claude-code "Claude Code"`;
|
|
255
257
|
const merged = {
|
|
256
258
|
...existing,
|
|
257
259
|
hooks: {
|
|
258
|
-
PreToolUse: [{ matcher: "", hooks: [{ type: "command", command:
|
|
259
|
-
PostToolUse: [{ matcher: "", hooks: [{ type: "command", command:
|
|
260
|
-
Stop: [{ matcher: "", hooks: [{ type: "command", command:
|
|
260
|
+
PreToolUse: [{ matcher: "", hooks: [{ type: "command", command: hookCmd(guardAbs) }] }],
|
|
261
|
+
PostToolUse: [{ matcher: "", hooks: [{ type: "command", command: hookCmd(auditAbs) }] }],
|
|
262
|
+
Stop: [{ matcher: "", hooks: [{ type: "command", command: hookCmd(stopAbs) }] }]
|
|
261
263
|
}
|
|
262
264
|
};
|
|
263
265
|
writeFileSync(p.settingsPath, JSON.stringify(merged, null, 2) + "\n");
|