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.
Files changed (2) hide show
  1. package/getBinaryName.cjs +39 -0
  2. 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backlog.md",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "bin": {
5
5
  "backlog": "cli.js"
6
6
  },
@@ -44,6 +44,7 @@
44
44
  ],
45
45
  "files": [
46
46
  "cli.js",
47
+ "getBinaryName.cjs",
47
48
  "package.json",
48
49
  "README.md",
49
50
  "LICENSE"