@miermontoto/vkm 1.0.0 → 1.1.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 +15 -11
- package/package.json +7 -2
package/bin/download.js
CHANGED
|
@@ -5,7 +5,7 @@ const crypto = require("crypto");
|
|
|
5
5
|
|
|
6
6
|
// Replaced during npm pack by workflow
|
|
7
7
|
const R2_BASE_URL = "https://github.com/miermontoto/vkm/releases/download";
|
|
8
|
-
const BINARY_TAG = "v1.
|
|
8
|
+
const BINARY_TAG = "v1.1.1"; // e.g., v0.0.135-20251215122030
|
|
9
9
|
const CACHE_DIR = path.join(require("os").homedir(), ".vkm", "bin");
|
|
10
10
|
|
|
11
11
|
// Local development mode: use binaries from npx-cli/dist/ instead of R2
|
|
@@ -116,22 +116,26 @@ async function ensureBinary(platform, binaryName, onProgress) {
|
|
|
116
116
|
|
|
117
117
|
fs.mkdirSync(cacheDir, { recursive: true });
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
// GitHub Releases format: /{tag}/{binary}-{platform}.zip
|
|
120
|
+
// Example: /v1.0.0/vkm-linux-x64.zip
|
|
121
|
+
const url = `${R2_BASE_URL}/${BINARY_TAG}/${binaryName}-${platform}.zip`;
|
|
121
122
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const url = `${R2_BASE_URL}/binaries/${BINARY_TAG}/${platform}/${binaryName}.zip`;
|
|
127
|
-
await downloadFile(url, zipPath, binaryInfo.sha256, onProgress);
|
|
123
|
+
// Skip checksum validation for GitHub Releases (no manifest.json)
|
|
124
|
+
await downloadFile(url, zipPath, null, onProgress);
|
|
128
125
|
|
|
129
126
|
return zipPath;
|
|
130
127
|
}
|
|
131
128
|
|
|
132
129
|
async function getLatestVersion() {
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
try {
|
|
131
|
+
// Use GitHub API to get latest release
|
|
132
|
+
const data = await fetchJson("https://api.github.com/repos/miermontoto/vkm/releases/latest");
|
|
133
|
+
// GitHub returns version with 'v' prefix, remove it to match package.json
|
|
134
|
+
return data.tag_name?.replace(/^v/, "");
|
|
135
|
+
} catch (err) {
|
|
136
|
+
// silently fail si no hay conexión o el API no está disponible
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
135
139
|
}
|
|
136
140
|
|
|
137
141
|
module.exports = { R2_BASE_URL, BINARY_TAG, CACHE_DIR, LOCAL_DEV_MODE, LOCAL_DIST_DIR, ensureBinary, getLatestVersion };
|
package/package.json
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@miermontoto/vkm",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.1.1",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"vkm": "bin/cli.js"
|
|
8
8
|
},
|
|
9
|
-
"keywords": [
|
|
9
|
+
"keywords": [
|
|
10
|
+
"kanban",
|
|
11
|
+
"project-management",
|
|
12
|
+
"task-management",
|
|
13
|
+
"developer-tools"
|
|
14
|
+
],
|
|
10
15
|
"author": "Juan Mier",
|
|
11
16
|
"license": "",
|
|
12
17
|
"description": "NPX wrapper around vkm and vkm-mcp",
|