@tedbrain/vlink 0.1.161 → 0.1.162

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 (3) hide show
  1. package/binaries.json +22 -22
  2. package/install.js +3 -50
  3. package/package.json +1 -1
package/binaries.json CHANGED
@@ -1,40 +1,40 @@
1
1
  {
2
- "version": "0.1.161",
2
+ "version": "0.1.162",
3
3
  "binaries": {
4
4
  "linux-x86_64": {
5
- "url": "https://cloud.tsinghua.edu.cn/f/4b824ceb5a6141709ccd/?dl=1",
6
- "sha256": "cd85e516e29f1f754d4721468140caff0222aff5903cb80a480e60d9d0ff90d7",
7
- "size": 24877437
5
+ "url": "https://cloud.tsinghua.edu.cn/f/28806d4398b04f86b2cd/?dl=1",
6
+ "sha256": "7c6169a9fb2446438987e8e434c99af4cb760209b2327551f0b35f88893720f0",
7
+ "size": 24807677
8
8
  },
9
9
  "linux-x86_64-glibc2.17": {
10
- "url": "https://cloud.tsinghua.edu.cn/f/1620d41fbbd0405fb684/?dl=1",
11
- "sha256": "ac36a5ae4510917b80442804f608ea66f2f72dea8be301f4add8aafeca14619a",
12
- "size": 25603249
10
+ "url": "https://cloud.tsinghua.edu.cn/f/0ad134b039424d01b114/?dl=1",
11
+ "sha256": "ce5510d2932bc03f7da80624aab84a8222068cf0dfe4c0feb026b8728d736c25",
12
+ "size": 25529721
13
13
  },
14
14
  "linux-aarch64": {
15
- "url": "https://cloud.tsinghua.edu.cn/f/0754e59860cd4a1a86ef/?dl=1",
16
- "sha256": "6d65f88f0f7e1b8167e6568674680a5bfa6f3e5568e3f994088d97570a3d776c",
17
- "size": 21179301
15
+ "url": "https://cloud.tsinghua.edu.cn/f/1971610875924db4b176/?dl=1",
16
+ "sha256": "1b5a7ad7996f52f032290dcc7a68b6ba3b4775f0f25c56692b2aabd29f77c2e9",
17
+ "size": 21113645
18
18
  },
19
19
  "macos-x86_64": {
20
- "url": "https://cloud.tsinghua.edu.cn/f/30983e728c7041858932/?dl=1",
21
- "sha256": "d2fff46ccfeb3b150b4888bcad364c5c1160f8397d45c38d34ec020866be1408",
22
- "size": 22247233
20
+ "url": "https://cloud.tsinghua.edu.cn/f/9a1be749932f45769d4a/?dl=1",
21
+ "sha256": "d775b4e5ec4b83a3231421868ac1cc9c7bf163fec5c6a665995b1e784d9f8924",
22
+ "size": 22185609
23
23
  },
24
24
  "macos-aarch64": {
25
- "url": "https://cloud.tsinghua.edu.cn/f/151b437c7bcd4df7846d/?dl=1",
26
- "sha256": "362a30090ccd57ffa18eaf9cd32f42ad3b63e89785aab2f9add802ddb0d9004a",
27
- "size": 18022389
25
+ "url": "https://cloud.tsinghua.edu.cn/f/594358ec14ac4fc09ce3/?dl=1",
26
+ "sha256": "64116b5fc377629bc05ff1d2ff7a4dccb2f817b2c474cd7745c475a5b13b79e8",
27
+ "size": 17972709
28
28
  },
29
29
  "windows-x86_64.exe": {
30
- "url": "https://cloud.tsinghua.edu.cn/f/2c23d16117a84a8abe60/?dl=1",
31
- "sha256": "035b5b6b006ebc30c6e1460e0ff4e271f499dc51fd84b27919acc8934c58859c",
32
- "size": 9781029
30
+ "url": "https://cloud.tsinghua.edu.cn/f/aa5b9c3d1e7d4f43bbdb/?dl=1",
31
+ "sha256": "ffb28876ed49b0ee1d0d2c0514b8da892ccd2a47d08068dd221d79e9922b08c7",
32
+ "size": 9775397
33
33
  },
34
34
  "windows-aarch64.exe": {
35
- "url": "https://cloud.tsinghua.edu.cn/f/6a586869ac0f4329b75b/?dl=1",
36
- "sha256": "99e52099ae5e1b77939670d75ae3bf0ebac5e76783d96352b5e9a8b1cc14d598",
37
- "size": 11281193
35
+ "url": "https://cloud.tsinghua.edu.cn/f/8ffd00a6b6f44aab90c0/?dl=1",
36
+ "sha256": "b4a37128ab2ab3b5362a092e1da6042c41662432b309e6494a63464d8e840bed",
37
+ "size": 11270441
38
38
  }
39
39
  }
40
40
  }
package/install.js CHANGED
@@ -482,56 +482,9 @@ function sha256File(filePath) {
482
482
  });
483
483
  }
484
484
 
485
- function downloadFile(url, destPath, options = {}) {
486
- return new Promise((resolve, reject) => {
487
- const fileStream = fs.createWriteStream(destPath, { mode: 0o755 });
488
-
489
- const finish = () => {
490
- fileStream.close((closeErr) => {
491
- if (closeErr) reject(closeErr);
492
- else resolve();
493
- });
494
- };
495
-
496
- const request = (target, redirects) => {
497
- const transport = target.startsWith('https:') ? https : http;
498
- const req = transport.get(
499
- target,
500
- {
501
- agent: requestAgent(target, options),
502
- headers: { 'user-agent': `${PKG.name}/${PKG.version}` }
503
- },
504
- (res) => {
505
- if (
506
- res.statusCode >= 300 &&
507
- res.statusCode < 400 &&
508
- res.headers.location &&
509
- redirects < 5
510
- ) {
511
- res.resume();
512
- const next = new URL(res.headers.location, target).toString();
513
- return request(next, redirects + 1);
514
- }
515
- if (res.statusCode !== 200) {
516
- res.resume();
517
- return reject(
518
- new VlinkInstallError(
519
- `download failed: HTTP ${res.statusCode} from ${displayUrl(target)}`
520
- )
521
- );
522
- }
523
- res.pipe(fileStream);
524
- }
525
- );
526
-
527
- req.on('error', reject);
528
- req.setTimeout(downloadTimeoutMs(), () => req.destroy(new VlinkInstallError('download timed out')));
529
- };
530
-
531
- fileStream.on('finish', finish);
532
- fileStream.on('error', reject);
533
- request(url, 0);
534
- });
485
+ async function downloadFile(url, destPath, options = {}) {
486
+ const response = await httpResponse(url, downloadTimeoutMs(), options);
487
+ await pipeline(response, fs.createWriteStream(destPath, { mode: 0o755 }));
535
488
  }
536
489
 
537
490
  function verifyBinary(binaryPath) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tedbrain/vlink",
3
- "version": "0.1.161",
3
+ "version": "0.1.162",
4
4
  "description": "vlink Virtuoso bridge CLI installer. Installs the matching platform binary at npm install time, like Claude Code / Codex.",
5
5
  "license": "UNLICENSED",
6
6
  "bin": {