cbrowser 10.4.2 → 10.4.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.
package/dist/cli.js CHANGED
@@ -1042,7 +1042,6 @@ async function main() {
1042
1042
  }
1043
1043
  // Install/Sync Claude skill (both commands do the same thing)
1044
1044
  if (command === "install-skill" || command === "sync-skill") {
1045
- const { execSync } = await import("child_process");
1046
1045
  const path = await import("path");
1047
1046
  const fs = await import("fs");
1048
1047
  const os = await import("os");
@@ -1069,7 +1068,7 @@ async function main() {
1069
1068
  fs.mkdirSync(path.join(skillDir, "Workflows"), { recursive: true });
1070
1069
  fs.mkdirSync(path.join(skillDir, "Tools"), { recursive: true });
1071
1070
  fs.mkdirSync(path.join(skillDir, ".memory", "sessions"), { recursive: true });
1072
- // Download files
1071
+ // Download files using native fetch (cross-platform, better error handling)
1073
1072
  console.log("Downloading skill files...");
1074
1073
  const files = [
1075
1074
  "SKILL.md",
@@ -1091,10 +1090,15 @@ async function main() {
1091
1090
  const url = `${repoUrl}/skill/${file}`;
1092
1091
  const dest = path.join(skillDir, file);
1093
1092
  console.log(` - ${file}`);
1094
- execSync(`curl -fsSL "${url}" -o "${dest}"`, { stdio: "pipe" });
1093
+ const response = await fetch(url);
1094
+ if (!response.ok) {
1095
+ throw new Error(`HTTP ${response.status}`);
1096
+ }
1097
+ const content = await response.text();
1098
+ fs.writeFileSync(dest, content, "utf-8");
1095
1099
  }
1096
- catch {
1097
- console.log(` Warning: Could not download ${file}`);
1100
+ catch (e) {
1101
+ console.log(` Warning: Could not download ${file} (${e.message})`);
1098
1102
  }
1099
1103
  }
1100
1104
  console.log(`