backlog.md 0.1.21 → 0.1.23
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/getBinaryName.cjs +39 -0
- package/package.json +2 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
function getBinaryName(platform = process.platform, arch = process.arch) {
|
|
2
|
+
let binaryName = "backlog-";
|
|
3
|
+
|
|
4
|
+
// Map Node.js platform names to Bun target names
|
|
5
|
+
switch (platform) {
|
|
6
|
+
case "linux":
|
|
7
|
+
binaryName += "bun-linux-";
|
|
8
|
+
break;
|
|
9
|
+
case "darwin":
|
|
10
|
+
binaryName += "bun-darwin-";
|
|
11
|
+
break;
|
|
12
|
+
case "win32":
|
|
13
|
+
binaryName += "bun-windows-";
|
|
14
|
+
break;
|
|
15
|
+
default:
|
|
16
|
+
throw new Error(`Unsupported platform: ${platform}`);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Map Node.js arch names to Bun target names
|
|
20
|
+
switch (arch) {
|
|
21
|
+
case "x64":
|
|
22
|
+
binaryName += "x64";
|
|
23
|
+
break;
|
|
24
|
+
case "arm64":
|
|
25
|
+
binaryName += "arm64";
|
|
26
|
+
break;
|
|
27
|
+
default:
|
|
28
|
+
throw new Error(`Unsupported architecture: ${arch}`);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Windows executables have .exe extension
|
|
32
|
+
if (platform === "win32") {
|
|
33
|
+
binaryName += ".exe";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return binaryName;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
module.exports = { getBinaryName };
|
package/package.json
CHANGED