codehydra 2026.2.14 → 2026.2.18
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/codehydra.js +13 -5
- package/package.json +1 -1
package/codehydra.js
CHANGED
|
@@ -14,8 +14,8 @@ const REPO = "stefanhoelzl/codehydra";
|
|
|
14
14
|
// Platform/arch to GitHub asset mapping
|
|
15
15
|
const ASSET_MAP = {
|
|
16
16
|
"linux-x64": "CodeHydra-linux-x64.AppImage",
|
|
17
|
-
"darwin-x64": "CodeHydra-darwin-x64.
|
|
18
|
-
"darwin-arm64": "CodeHydra-darwin-arm64.
|
|
17
|
+
"darwin-x64": "CodeHydra-darwin-x64.tar.gz",
|
|
18
|
+
"darwin-arm64": "CodeHydra-darwin-arm64.tar.gz",
|
|
19
19
|
"win32-x64": "CodeHydra-win-portable-x64.zip",
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -62,7 +62,7 @@ function getBinaryPath(cacheDir, assetName) {
|
|
|
62
62
|
if (platform === "win32") {
|
|
63
63
|
return path.join(cacheDir, "CodeHydra-win-portable-x64", "CodeHydra.exe");
|
|
64
64
|
} else if (platform === "darwin") {
|
|
65
|
-
const appName = assetName.replace(".
|
|
65
|
+
const appName = assetName.replace(".tar.gz", "");
|
|
66
66
|
return path.join(cacheDir, appName, "CodeHydra.app", "Contents", "MacOS", "CodeHydra");
|
|
67
67
|
}
|
|
68
68
|
return path.join(cacheDir, assetName);
|
|
@@ -109,7 +109,11 @@ async function main() {
|
|
|
109
109
|
const downloadPath = path.join(cacheDir, assetName);
|
|
110
110
|
await download(downloadUrl, downloadPath);
|
|
111
111
|
|
|
112
|
-
if (assetName.endsWith(".
|
|
112
|
+
if (assetName.endsWith(".tar.gz")) {
|
|
113
|
+
console.log("Extracting...");
|
|
114
|
+
execSync(`tar xzf "${downloadPath}" -C "${cacheDir}"`, { stdio: "pipe" });
|
|
115
|
+
fs.unlinkSync(downloadPath);
|
|
116
|
+
} else if (assetName.endsWith(".zip")) {
|
|
113
117
|
console.log("Extracting...");
|
|
114
118
|
if (os.platform() === "win32") {
|
|
115
119
|
execSync(
|
|
@@ -122,7 +126,11 @@ async function main() {
|
|
|
122
126
|
fs.unlinkSync(downloadPath);
|
|
123
127
|
}
|
|
124
128
|
|
|
125
|
-
if (os.platform()
|
|
129
|
+
if (os.platform() === "darwin") {
|
|
130
|
+
const appName = assetName.replace(".tar.gz", "");
|
|
131
|
+
const appPath = path.join(cacheDir, appName, "CodeHydra.app");
|
|
132
|
+
execSync(`xattr -cr "${appPath}"`, { stdio: "pipe" });
|
|
133
|
+
} else if (os.platform() !== "win32") {
|
|
126
134
|
fs.chmodSync(binaryPath, 0o755);
|
|
127
135
|
}
|
|
128
136
|
console.log("Done!\n");
|