@mxyhi/vibe-kanban 0.0.149-fixci2 → 0.0.149-rc.1
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/download.js +11 -3
- package/package.json +3 -2
package/bin/download.js
CHANGED
|
@@ -2,10 +2,11 @@ const https = require("https");
|
|
|
2
2
|
const fs = require("fs");
|
|
3
3
|
const path = require("path");
|
|
4
4
|
const crypto = require("crypto");
|
|
5
|
+
const ProxyAgent = require("proxy-agent");
|
|
5
6
|
|
|
6
7
|
// Replaced during npm publish by workflow
|
|
7
8
|
const RELEASE_REPO = "mxyhi/vibe-kanban"; // e.g., mxyhi/vibe-kanban
|
|
8
|
-
const BINARY_TAG = "v0.0.149-
|
|
9
|
+
const BINARY_TAG = "v0.0.149-rc.1"; // e.g., v0.0.135
|
|
9
10
|
const RELEASE_BASE_URL = `https://github.com/${RELEASE_REPO}/releases/download`;
|
|
10
11
|
const CACHE_DIR = path.join(require("os").homedir(), ".vibe-kanban", "bin");
|
|
11
12
|
|
|
@@ -13,10 +14,17 @@ const CACHE_DIR = path.join(require("os").homedir(), ".vibe-kanban", "bin");
|
|
|
13
14
|
// Only activate if dist/ exists (i.e., running from source after local-build.sh)
|
|
14
15
|
const LOCAL_DIST_DIR = path.join(__dirname, "..", "dist");
|
|
15
16
|
const LOCAL_DEV_MODE = fs.existsSync(LOCAL_DIST_DIR) || process.env.VIBE_KANBAN_LOCAL === "1";
|
|
17
|
+
// ProxyAgent will pick HTTP/HTTPS/SOCKS proxy from env (HTTP(S)_PROXY/NO_PROXY).
|
|
18
|
+
const proxyAgent = new ProxyAgent();
|
|
19
|
+
|
|
20
|
+
function withProxyAgent(options = {}) {
|
|
21
|
+
if (options.agent) return options;
|
|
22
|
+
return { ...options, agent: proxyAgent };
|
|
23
|
+
}
|
|
16
24
|
|
|
17
25
|
async function fetchJson(url, options = {}) {
|
|
18
26
|
return new Promise((resolve, reject) => {
|
|
19
|
-
https.get(url, options, (res) => {
|
|
27
|
+
https.get(url, withProxyAgent(options), (res) => {
|
|
20
28
|
if (res.statusCode === 301 || res.statusCode === 302) {
|
|
21
29
|
return fetchJson(res.headers.location, options).then(resolve).catch(reject);
|
|
22
30
|
}
|
|
@@ -48,7 +56,7 @@ async function downloadFile(url, destPath, expectedSha256, onProgress) {
|
|
|
48
56
|
} catch {}
|
|
49
57
|
};
|
|
50
58
|
|
|
51
|
-
https.get(url, (res) => {
|
|
59
|
+
https.get(url, withProxyAgent(), (res) => {
|
|
52
60
|
if (res.statusCode === 301 || res.statusCode === 302) {
|
|
53
61
|
file.close();
|
|
54
62
|
cleanup();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mxyhi/vibe-kanban",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.149-
|
|
4
|
+
"version": "0.0.149-rc.1",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"vibe-kanban": "bin/cli.js"
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"license": "",
|
|
12
12
|
"description": "NPX wrapper around vibe-kanban and vibe-kanban-mcp",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"adm-zip": "^0.5.16"
|
|
14
|
+
"adm-zip": "^0.5.16",
|
|
15
|
+
"proxy-agent": "^6.5.0"
|
|
15
16
|
},
|
|
16
17
|
"files": [
|
|
17
18
|
"bin",
|