@lifeaitools/clauth 0.5.0 → 0.5.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.
@@ -898,9 +898,24 @@ function createServer(initPassword, whitelist, port) {
898
898
 
899
899
  try {
900
900
  // Named tunnel "clauth" — ingress configured in ~/.cloudflared/config.yml
901
- // Falls back to quick tunnel if named tunnel fails
902
901
  const tunnelName = "clauth";
903
- const proc = spawnProc("cloudflared", ["tunnel", "run", tunnelName], {
902
+
903
+ // Resolve cloudflared binary — may not be on PATH in bash shells
904
+ let cfBin = "cloudflared";
905
+ if (os.platform() === "win32") {
906
+ const candidates = [
907
+ "cloudflared",
908
+ path.join(process.env.ProgramFiles || "", "cloudflared", "cloudflared.exe"),
909
+ path.join(process.env["ProgramFiles(x86)"] || "C:\\Program Files (x86)", "cloudflared", "cloudflared.exe"),
910
+ path.join(os.homedir(), "scoop", "shims", "cloudflared.exe"),
911
+ "C:\\ProgramData\\chocolatey\\bin\\cloudflared.exe",
912
+ ];
913
+ for (const c of candidates) {
914
+ try { if (fs.statSync(c).isFile()) { cfBin = c; break; } } catch {}
915
+ }
916
+ }
917
+
918
+ const proc = spawnProc(cfBin, ["tunnel", "run", tunnelName], {
904
919
  stdio: ["ignore", "pipe", "pipe"],
905
920
  });
906
921
 
package/cli/index.js CHANGED
@@ -12,7 +12,7 @@ import * as api from "./api.js";
12
12
  import os from "os";
13
13
 
14
14
  const config = new Conf(getConfOptions());
15
- const VERSION = "0.5.0";
15
+ const VERSION = "0.5.1";
16
16
 
17
17
  // ============================================================
18
18
  // Password prompt helper
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/clauth",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "Hardware-bound credential vault for the LIFEAI infrastructure stack",
5
5
  "type": "module",
6
6
  "bin": {