@beads/bd 0.63.3 → 1.0.3
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/README.md +8 -8
- package/package.json +4 -4
- package/scripts/postinstall.js +35 -9
package/README.md
CHANGED
|
@@ -97,13 +97,13 @@ This package downloads the appropriate native binary for your platform:
|
|
|
97
97
|
|
|
98
98
|
## Full Documentation
|
|
99
99
|
|
|
100
|
-
For complete documentation, see the [beads GitHub repository](https://github.com/
|
|
100
|
+
For complete documentation, see the [beads GitHub repository](https://github.com/gastownhall/beads):
|
|
101
101
|
|
|
102
|
-
- [Complete README](https://github.com/
|
|
103
|
-
- [Quick Start
|
|
104
|
-
- [Installation Guide](https://github.com/
|
|
105
|
-
- [FAQ](https://github.com/
|
|
106
|
-
- [Troubleshooting](https://github.com/
|
|
102
|
+
- [Complete README](https://github.com/gastownhall/beads#readme)
|
|
103
|
+
- [Quick Start (documentation site)](https://gastownhall.github.io/beads/getting-started/quickstart) · [repo pointer](https://github.com/gastownhall/beads/blob/main/docs/QUICKSTART.md)
|
|
104
|
+
- [Installation Guide](https://github.com/gastownhall/beads/blob/main/docs/INSTALLING.md)
|
|
105
|
+
- [FAQ](https://github.com/gastownhall/beads/blob/main/docs/FAQ.md)
|
|
106
|
+
- [Troubleshooting](https://github.com/gastownhall/beads/blob/main/docs/TROUBLESHOOTING.md)
|
|
107
107
|
|
|
108
108
|
## Why npm Package vs WASM?
|
|
109
109
|
|
|
@@ -120,5 +120,5 @@ MIT - See [LICENSE](LICENSE) for details.
|
|
|
120
120
|
|
|
121
121
|
## Support
|
|
122
122
|
|
|
123
|
-
- [GitHub Issues](https://github.com/
|
|
124
|
-
- [Documentation](https://github.com/
|
|
123
|
+
- [GitHub Issues](https://github.com/gastownhall/beads/issues)
|
|
124
|
+
- [Documentation](https://github.com/gastownhall/beads)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beads/bd",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Beads issue tracker - lightweight memory system for coding agents with native binary support",
|
|
5
5
|
"main": "bin/bd.js",
|
|
6
6
|
"bin": {
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|
|
29
|
-
"url": "https://github.com/
|
|
29
|
+
"url": "https://github.com/gastownhall/beads.git",
|
|
30
30
|
"directory": "npm-package"
|
|
31
31
|
},
|
|
32
32
|
"bugs": {
|
|
33
|
-
"url": "https://github.com/
|
|
33
|
+
"url": "https://github.com/gastownhall/beads/issues"
|
|
34
34
|
},
|
|
35
|
-
"homepage": "https://github.com/
|
|
35
|
+
"homepage": "https://github.com/gastownhall/beads#readme",
|
|
36
36
|
"engines": {
|
|
37
37
|
"node": ">=14.0.0"
|
|
38
38
|
},
|
package/scripts/postinstall.js
CHANGED
|
@@ -64,15 +64,38 @@ function downloadFile(url, dest) {
|
|
|
64
64
|
if (response.statusCode === 301 || response.statusCode === 302) {
|
|
65
65
|
const redirectUrl = response.headers.location;
|
|
66
66
|
console.log(`Following redirect to: ${redirectUrl}`);
|
|
67
|
-
|
|
67
|
+
response.destroy();
|
|
68
|
+
request.destroy();
|
|
69
|
+
file.close((closeErr) => {
|
|
70
|
+
if (closeErr) {
|
|
71
|
+
fs.unlink(dest, () => {});
|
|
72
|
+
reject(closeErr);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
fs.unlink(dest, () => {});
|
|
76
|
+
downloadFile(redirectUrl, dest).then(resolve).catch(reject);
|
|
77
|
+
});
|
|
68
78
|
return;
|
|
69
79
|
}
|
|
70
80
|
|
|
71
81
|
if (response.statusCode !== 200) {
|
|
72
|
-
|
|
82
|
+
const error = new Error(`Failed to download: HTTP ${response.statusCode}`);
|
|
83
|
+
response.destroy();
|
|
84
|
+
request.destroy();
|
|
85
|
+
file.close(() => {
|
|
86
|
+
fs.unlink(dest, () => {});
|
|
87
|
+
reject(error);
|
|
88
|
+
});
|
|
73
89
|
return;
|
|
74
90
|
}
|
|
75
91
|
|
|
92
|
+
response.on('error', (err) => {
|
|
93
|
+
file.close(() => {
|
|
94
|
+
fs.unlink(dest, () => {});
|
|
95
|
+
reject(err);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
76
99
|
response.pipe(file);
|
|
77
100
|
|
|
78
101
|
file.on('finish', () => {
|
|
@@ -80,7 +103,10 @@ function downloadFile(url, dest) {
|
|
|
80
103
|
// This is critical on Windows where the file may still be locked
|
|
81
104
|
file.close((err) => {
|
|
82
105
|
if (err) reject(err);
|
|
83
|
-
else
|
|
106
|
+
else {
|
|
107
|
+
response.destroy();
|
|
108
|
+
resolve();
|
|
109
|
+
}
|
|
84
110
|
});
|
|
85
111
|
});
|
|
86
112
|
});
|
|
@@ -137,7 +163,7 @@ async function waitForFileAccess(filePath, timeoutMs = 30000) {
|
|
|
137
163
|
|
|
138
164
|
while (Date.now() - startTime < timeoutMs) {
|
|
139
165
|
try {
|
|
140
|
-
const fd = fs.openSync(filePath, 'r');
|
|
166
|
+
const fd = fs.openSync(filePath, 'r+');
|
|
141
167
|
fs.closeSync(fd);
|
|
142
168
|
return; // File is accessible
|
|
143
169
|
} catch (err) {
|
|
@@ -234,11 +260,11 @@ async function install() {
|
|
|
234
260
|
}
|
|
235
261
|
|
|
236
262
|
// Construct download URL
|
|
237
|
-
// Format: https://github.com/
|
|
263
|
+
// Format: https://github.com/gastownhall/beads/releases/download/v0.21.5/beads_0.21.5_darwin_amd64.tar.gz
|
|
238
264
|
const releaseVersion = VERSION;
|
|
239
265
|
const archiveExt = platformName === 'windows' ? 'zip' : 'tar.gz';
|
|
240
266
|
const archiveName = `beads_${releaseVersion}_${platformName}_${archName}.${archiveExt}`;
|
|
241
|
-
const downloadUrl = `https://github.com/
|
|
267
|
+
const downloadUrl = `https://github.com/gastownhall/beads/releases/download/v${releaseVersion}/${archiveName}`;
|
|
242
268
|
const archivePath = path.join(binDir, archiveName);
|
|
243
269
|
|
|
244
270
|
// Download the archive
|
|
@@ -273,9 +299,9 @@ async function install() {
|
|
|
273
299
|
console.error(`Error installing bd: ${err.message}`);
|
|
274
300
|
console.error('');
|
|
275
301
|
console.error('Installation failed. You can try:');
|
|
276
|
-
console.error('1. Installing manually from: https://github.com/
|
|
277
|
-
console.error('2. Using the install script: curl -fsSL https://raw.githubusercontent.com/
|
|
278
|
-
console.error('3. Opening an issue: https://github.com/
|
|
302
|
+
console.error('1. Installing manually from: https://github.com/gastownhall/beads/releases');
|
|
303
|
+
console.error('2. Using the install script: curl -fsSL https://raw.githubusercontent.com/gastownhall/beads/main/scripts/install.sh | bash');
|
|
304
|
+
console.error('3. Opening an issue: https://github.com/gastownhall/beads/issues');
|
|
279
305
|
process.exit(1);
|
|
280
306
|
}
|
|
281
307
|
}
|