@solongate/proxy 0.81.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 +5 -3
- package/dist/login.js +5 -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");
|
package/dist/index.js
CHANGED
|
@@ -10596,12 +10596,14 @@ async function runGlobalInstall(opts = {}) {
|
|
|
10596
10596
|
const auditAbs = join9(p.hooksDir, "audit.mjs").replace(/\\/g, "/");
|
|
10597
10597
|
const stopAbs = join9(p.hooksDir, "stop.mjs").replace(/\\/g, "/");
|
|
10598
10598
|
const nodeBin = process.execPath.replace(/\\/g, "/");
|
|
10599
|
+
const call = process.platform === "win32" ? "& " : "";
|
|
10600
|
+
const hookCmd = (script) => `${call}"${nodeBin}" "${script}" claude-code "Claude Code"`;
|
|
10599
10601
|
const merged = {
|
|
10600
10602
|
...existing,
|
|
10601
10603
|
hooks: {
|
|
10602
|
-
PreToolUse: [{ matcher: "", hooks: [{ type: "command", command:
|
|
10603
|
-
PostToolUse: [{ matcher: "", hooks: [{ type: "command", command:
|
|
10604
|
-
Stop: [{ matcher: "", hooks: [{ type: "command", command:
|
|
10604
|
+
PreToolUse: [{ matcher: "", hooks: [{ type: "command", command: hookCmd(guardAbs) }] }],
|
|
10605
|
+
PostToolUse: [{ matcher: "", hooks: [{ type: "command", command: hookCmd(auditAbs) }] }],
|
|
10606
|
+
Stop: [{ matcher: "", hooks: [{ type: "command", command: hookCmd(stopAbs) }] }]
|
|
10605
10607
|
}
|
|
10606
10608
|
};
|
|
10607
10609
|
writeFileSync4(p.settingsPath, JSON.stringify(merged, null, 2) + "\n");
|
package/dist/login.js
CHANGED
|
@@ -217,12 +217,14 @@ async function runGlobalInstall(opts = {}) {
|
|
|
217
217
|
const auditAbs = join(p.hooksDir, "audit.mjs").replace(/\\/g, "/");
|
|
218
218
|
const stopAbs = join(p.hooksDir, "stop.mjs").replace(/\\/g, "/");
|
|
219
219
|
const nodeBin = process.execPath.replace(/\\/g, "/");
|
|
220
|
+
const call = process.platform === "win32" ? "& " : "";
|
|
221
|
+
const hookCmd = (script) => `${call}"${nodeBin}" "${script}" claude-code "Claude Code"`;
|
|
220
222
|
const merged = {
|
|
221
223
|
...existing,
|
|
222
224
|
hooks: {
|
|
223
|
-
PreToolUse: [{ matcher: "", hooks: [{ type: "command", command:
|
|
224
|
-
PostToolUse: [{ matcher: "", hooks: [{ type: "command", command:
|
|
225
|
-
Stop: [{ matcher: "", hooks: [{ type: "command", command:
|
|
225
|
+
PreToolUse: [{ matcher: "", hooks: [{ type: "command", command: hookCmd(guardAbs) }] }],
|
|
226
|
+
PostToolUse: [{ matcher: "", hooks: [{ type: "command", command: hookCmd(auditAbs) }] }],
|
|
227
|
+
Stop: [{ matcher: "", hooks: [{ type: "command", command: hookCmd(stopAbs) }] }]
|
|
226
228
|
}
|
|
227
229
|
};
|
|
228
230
|
writeFileSync(p.settingsPath, JSON.stringify(merged, null, 2) + "\n");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.81.
|
|
3
|
+
"version": "0.81.1",
|
|
4
4
|
"description": "AI tool security proxy: protect any AI tool server with customizable policies, path/command constraints, rate limiting, and audit logging. No code changes required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|