@ziuus/vanta 0.10.19 → 0.10.20
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/bin/vanta-bin +0 -0
- package/install.js +16 -2
- package/package.json +4 -4
package/bin/vanta-bin
ADDED
|
Binary file
|
package/install.js
CHANGED
|
@@ -37,9 +37,23 @@ function download(url, hops = 0) {
|
|
|
37
37
|
res.resume();
|
|
38
38
|
return reject(new Error(`HTTP ${statusCode} for ${url}`));
|
|
39
39
|
}
|
|
40
|
+
const total = parseInt(headers['content-length'] || '0', 10);
|
|
41
|
+
let downloaded = 0;
|
|
40
42
|
const chunks = [];
|
|
41
|
-
res.on('data', (c) =>
|
|
42
|
-
|
|
43
|
+
res.on('data', (c) => {
|
|
44
|
+
chunks.push(c);
|
|
45
|
+
downloaded += c.length;
|
|
46
|
+
if (total > 0 && process.stderr.isTTY) {
|
|
47
|
+
const pct = Math.round((downloaded / total) * 100);
|
|
48
|
+
const mb = (downloaded / (1024 * 1024)).toFixed(1);
|
|
49
|
+
const totMb = (total / (1024 * 1024)).toFixed(1);
|
|
50
|
+
process.stderr.write(`\rvanta: downloading... ${pct}% (${mb}/${totMb} MB)`);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
res.on('end', () => {
|
|
54
|
+
if (process.stderr.isTTY) process.stderr.write('\n');
|
|
55
|
+
resolve(Buffer.concat(chunks));
|
|
56
|
+
});
|
|
43
57
|
res.on('error', reject);
|
|
44
58
|
})
|
|
45
59
|
.on('error', reject);
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziuus/vanta",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.20",
|
|
4
4
|
"description": "Aesthetic Rust TUI system dashboard — CPU, memory, disk, network, GPU, processes, now-playing, clock, file manager, notes and visualizer in one terminal pane",
|
|
5
5
|
"bin": {
|
|
6
6
|
"vanta": "bin/vanta.js"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
|
-
"prepack": "cp ../README.md ../LICENSE . && sed -i 's|src=\"docs/|src=\"https://raw.githubusercontent.com/ziuus/vanta/main/docs/|g' README.md",
|
|
10
|
-
"release": "node sync-version.js && npm publish --access public"
|
|
11
|
-
"postinstall": "node install.js"
|
|
9
|
+
"prepack": "cp ../README.md ../LICENSE . && cp ../target/release/vanta bin/vanta-bin && chmod +x bin/vanta-bin && sed -i 's|src=\"docs/|src=\"https://raw.githubusercontent.com/ziuus/vanta/main/docs/|g' README.md",
|
|
10
|
+
"release": "node sync-version.js && npm publish --access public"
|
|
12
11
|
},
|
|
13
12
|
"publishConfig": {
|
|
14
13
|
"access": "public"
|
|
15
14
|
},
|
|
16
15
|
"files": [
|
|
17
16
|
"bin/vanta.js",
|
|
17
|
+
"bin/vanta-bin",
|
|
18
18
|
"install.js"
|
|
19
19
|
],
|
|
20
20
|
"os": [
|