@node9/proxy 1.55.0 → 1.55.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/cli.js +12 -4
- package/dist/cli.mjs +12 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -7863,6 +7863,11 @@ function fullPathCommand(subcommand) {
|
|
|
7863
7863
|
function toForwardSlashes(p) {
|
|
7864
7864
|
return p.replace(/\\/g, "/");
|
|
7865
7865
|
}
|
|
7866
|
+
function isNode9StatusLine(command) {
|
|
7867
|
+
if (!command) return false;
|
|
7868
|
+
const c = String(command).trim();
|
|
7869
|
+
return c.includes("node9") && /(^|\s)hud$/.test(c);
|
|
7870
|
+
}
|
|
7866
7871
|
function isStaleHookCommand(command) {
|
|
7867
7872
|
if (!command) return false;
|
|
7868
7873
|
const tokens = [];
|
|
@@ -8127,7 +8132,8 @@ async function setupClaude() {
|
|
|
8127
8132
|
const statusLineObj = { type: "command", command: hudCommand };
|
|
8128
8133
|
const existingStatusLine = settings.statusLine;
|
|
8129
8134
|
const existingStatusCommand = typeof existingStatusLine === "object" ? existingStatusLine?.command : existingStatusLine;
|
|
8130
|
-
|
|
8135
|
+
const isNode9OrEmpty = !existingStatusCommand || isNode9StatusLine(existingStatusCommand);
|
|
8136
|
+
if (isNode9OrEmpty && existingStatusCommand !== hudCommand) {
|
|
8131
8137
|
settings.statusLine = statusLineObj;
|
|
8132
8138
|
hooksChanged = true;
|
|
8133
8139
|
anythingChanged = true;
|
|
@@ -9035,13 +9041,15 @@ function setupHud() {
|
|
|
9035
9041
|
console.log(import_chalk.default.gray(" Restart Claude Code to activate."));
|
|
9036
9042
|
return;
|
|
9037
9043
|
}
|
|
9038
|
-
if (existing && existingCommand !== hudCommand) {
|
|
9044
|
+
if (existing && existingCommand !== hudCommand && !isNode9StatusLine(existingCommand)) {
|
|
9039
9045
|
console.log(
|
|
9040
9046
|
import_chalk.default.yellow(
|
|
9041
9047
|
` \u26A0\uFE0F statusLine is already set to: "${existingCommand}"
|
|
9042
|
-
|
|
9048
|
+
Leaving it as-is \u2014 node9 won't overwrite a statusLine you configured.
|
|
9049
|
+
Remove it from ~/.claude/settings.json first if you want the node9 HUD.`
|
|
9043
9050
|
)
|
|
9044
9051
|
);
|
|
9052
|
+
return;
|
|
9045
9053
|
}
|
|
9046
9054
|
settings.statusLine = statusLineObj;
|
|
9047
9055
|
writeJson(hooksPath, settings);
|
|
@@ -9059,7 +9067,7 @@ function teardownHud() {
|
|
|
9059
9067
|
}
|
|
9060
9068
|
const existing = settings.statusLine;
|
|
9061
9069
|
const existingCommand = typeof existing === "object" ? existing?.command : existing;
|
|
9062
|
-
if (!
|
|
9070
|
+
if (!isNode9StatusLine(existingCommand)) {
|
|
9063
9071
|
console.log(import_chalk.default.blue(" \u2139\uFE0F node9 HUD not found in ~/.claude/settings.json"));
|
|
9064
9072
|
return;
|
|
9065
9073
|
}
|
package/dist/cli.mjs
CHANGED
|
@@ -7845,6 +7845,11 @@ function fullPathCommand(subcommand) {
|
|
|
7845
7845
|
function toForwardSlashes(p) {
|
|
7846
7846
|
return p.replace(/\\/g, "/");
|
|
7847
7847
|
}
|
|
7848
|
+
function isNode9StatusLine(command) {
|
|
7849
|
+
if (!command) return false;
|
|
7850
|
+
const c = String(command).trim();
|
|
7851
|
+
return c.includes("node9") && /(^|\s)hud$/.test(c);
|
|
7852
|
+
}
|
|
7848
7853
|
function isStaleHookCommand(command) {
|
|
7849
7854
|
if (!command) return false;
|
|
7850
7855
|
const tokens = [];
|
|
@@ -8109,7 +8114,8 @@ async function setupClaude() {
|
|
|
8109
8114
|
const statusLineObj = { type: "command", command: hudCommand };
|
|
8110
8115
|
const existingStatusLine = settings.statusLine;
|
|
8111
8116
|
const existingStatusCommand = typeof existingStatusLine === "object" ? existingStatusLine?.command : existingStatusLine;
|
|
8112
|
-
|
|
8117
|
+
const isNode9OrEmpty = !existingStatusCommand || isNode9StatusLine(existingStatusCommand);
|
|
8118
|
+
if (isNode9OrEmpty && existingStatusCommand !== hudCommand) {
|
|
8113
8119
|
settings.statusLine = statusLineObj;
|
|
8114
8120
|
hooksChanged = true;
|
|
8115
8121
|
anythingChanged = true;
|
|
@@ -9017,13 +9023,15 @@ function setupHud() {
|
|
|
9017
9023
|
console.log(chalk.gray(" Restart Claude Code to activate."));
|
|
9018
9024
|
return;
|
|
9019
9025
|
}
|
|
9020
|
-
if (existing && existingCommand !== hudCommand) {
|
|
9026
|
+
if (existing && existingCommand !== hudCommand && !isNode9StatusLine(existingCommand)) {
|
|
9021
9027
|
console.log(
|
|
9022
9028
|
chalk.yellow(
|
|
9023
9029
|
` \u26A0\uFE0F statusLine is already set to: "${existingCommand}"
|
|
9024
|
-
|
|
9030
|
+
Leaving it as-is \u2014 node9 won't overwrite a statusLine you configured.
|
|
9031
|
+
Remove it from ~/.claude/settings.json first if you want the node9 HUD.`
|
|
9025
9032
|
)
|
|
9026
9033
|
);
|
|
9034
|
+
return;
|
|
9027
9035
|
}
|
|
9028
9036
|
settings.statusLine = statusLineObj;
|
|
9029
9037
|
writeJson(hooksPath, settings);
|
|
@@ -9041,7 +9049,7 @@ function teardownHud() {
|
|
|
9041
9049
|
}
|
|
9042
9050
|
const existing = settings.statusLine;
|
|
9043
9051
|
const existingCommand = typeof existing === "object" ? existing?.command : existing;
|
|
9044
|
-
if (!
|
|
9052
|
+
if (!isNode9StatusLine(existingCommand)) {
|
|
9045
9053
|
console.log(chalk.blue(" \u2139\uFE0F node9 HUD not found in ~/.claude/settings.json"));
|
|
9046
9054
|
return;
|
|
9047
9055
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@node9/proxy",
|
|
3
|
-
"version": "1.55.
|
|
3
|
+
"version": "1.55.1",
|
|
4
4
|
"description": "The Sudo Command for AI Agents. Execution Security for Claude Code, Codex, Gemini, Cursor, Opencode, Pi, and any MCP server.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|