camouflage-tui 2.4.0-beta.4 → 2.4.0-beta.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camouflage-tui",
3
- "version": "2.4.0-beta.4",
3
+ "version": "2.4.0-beta.6",
4
4
  "description": "High-performance terminal renderer for AI agent applications. A React Ink alternative built for streaming, persistence, and replay.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -9,20 +9,22 @@
9
9
  */
10
10
 
11
11
  import { createWriteStream, mkdirSync, chmodSync, existsSync, unlinkSync } from "node:fs";
12
- import { execSync } from "node:child_process";
12
+ import { execFileSync } from "node:child_process";
13
13
  import { join, dirname } from "node:path";
14
14
  import { fileURLToPath } from "node:url";
15
15
  import { get as httpsGet } from "node:https";
16
16
 
17
17
  const __dirname = dirname(fileURLToPath(import.meta.url));
18
18
  const BIN_DIR = join(__dirname, "..", "bin");
19
- const BIN_PATH = join(BIN_DIR, "camouflage-tui");
19
+ const EXE = process.platform === "win32" ? ".exe" : "";
20
+ const BIN_PATH = join(BIN_DIR, `camouflage-tui${EXE}`);
20
21
 
21
22
  const PLATFORM_MAP = {
22
23
  "darwin-x64": "x86_64-apple-darwin",
23
24
  "darwin-arm64": "aarch64-apple-darwin",
24
25
  "linux-x64": "x86_64-unknown-linux-gnu",
25
26
  "linux-arm64": "aarch64-unknown-linux-gnu",
27
+ "win32-x64": "x86_64-pc-windows-msvc",
26
28
  };
27
29
 
28
30
  const REPO = "sinameraji/camouflage";
@@ -61,8 +63,8 @@ async function main() {
61
63
  process.stdout.write(`camouflage-tui: downloading ${target} binary (${tag})...\n`);
62
64
  await download(url, tmpPath);
63
65
 
64
- // Extract the binary from the tarball
65
- execSync(`tar xzf "${tmpPath}" -C "${BIN_DIR}"`, { stdio: "pipe" });
66
+ // Extract the binary from the tarball (Windows 10+ ships tar.exe).
67
+ execFileSync("tar", ["xzf", tmpPath, "-C", BIN_DIR], { stdio: "pipe" });
66
68
  unlinkSync(tmpPath);
67
69
 
68
70
  chmodSync(BIN_PATH, 0o755);
package/src/binding.js CHANGED
@@ -17,7 +17,7 @@ import { fileURLToPath } from "node:url";
17
17
  import { encode, validate } from "./types.js";
18
18
 
19
19
  const __dirname = dirname(fileURLToPath(import.meta.url));
20
- const LOCAL_BIN = join(__dirname, "..", "bin", "camouflage-tui");
20
+ const LOCAL_BIN = join(__dirname, "..", "bin", process.platform === "win32" ? "camouflage-tui.exe" : "camouflage-tui");
21
21
  const DEFAULT_BIN = existsSync(LOCAL_BIN) ? LOCAL_BIN : "camouflage-tui";
22
22
 
23
23
  /**