@zoer7788/mcp-nexus-node 0.1.4 → 0.1.5

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.
Files changed (2) hide show
  1. package/cli.js +10 -4
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -90,6 +90,11 @@ function run(cmd, args, options = {}) {
90
90
  return out.stdout.trim();
91
91
  }
92
92
 
93
+ function runInteractive(cmd, args) {
94
+ const out = spawnSync(cmd, args, { stdio: "inherit" });
95
+ if (out.status !== 0) throw new Error(`${cmd} failed`);
96
+ }
97
+
93
98
  function commandExists(cmd) {
94
99
  return Boolean(commandPath(cmd));
95
100
  }
@@ -147,16 +152,17 @@ function cloudflaredCommand() {
147
152
  const local = join(binDir, "cloudflared");
148
153
  if (existsSync(local)) return local;
149
154
  ensureState();
150
- console.log("Installing cloudflared...");
151
- run("sh", ["-lc", `curl -L --fail -o ${quote(local)} ${quote(cloudflaredDownloadUrl())} && chmod +x ${quote(local)}`]);
155
+ console.log(`Installing cloudflared to ${local}...`);
156
+ runInteractive("sh", ["-lc", `curl -L --fail -o ${quote(local)} ${quote(cloudflaredDownloadUrl())} && chmod +x ${quote(local)}`]);
152
157
  return local;
153
158
  }
154
159
 
155
160
  function ensureCloudflareAuth() {
156
161
  const certFile = join(home, ".cloudflared", "cert.pem");
157
162
  if (existsSync(certFile)) return;
158
- console.log("Cloudflare authorization required. Opening login flow...");
159
- const out = spawnSync(cloudflaredCommand(), ["tunnel", "login"], { stdio: "inherit" });
163
+ const cloudflared = cloudflaredCommand();
164
+ console.log("Cloudflare authorization required. Open the printed URL in your local browser.");
165
+ const out = spawnSync(cloudflared, ["tunnel", "login"], { stdio: "inherit" });
160
166
  if (out.status !== 0) throw new Error("cloudflared tunnel login failed");
161
167
  if (!existsSync(certFile)) throw new Error(`cloudflared login did not create ${certFile}`);
162
168
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zoer7788/mcp-nexus-node",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Remote node for MCP Nexus pairing and DevSpace project control.",
5
5
  "license": "MIT",
6
6
  "type": "module",