@avesta-hq/prevention 0.6.0-pre.3 → 0.6.0-pre.4
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/lib/utils.js +16 -9
- package/package.json +1 -1
package/bin/lib/utils.js
CHANGED
|
@@ -70,16 +70,23 @@ function getPlatformBinaryName() {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
function getLatestVersion() {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
// Use package version to match the corresponding GitHub Release
|
|
74
|
+
const pkgVersion = `v${getVersion()}`;
|
|
75
|
+
|
|
76
|
+
// For stable releases, verify the release exists via GitHub latest redirect
|
|
77
|
+
// (handles partial release failures where npm published but binary upload failed)
|
|
78
|
+
if (!pkgVersion.includes('-pre')) {
|
|
79
|
+
try {
|
|
80
|
+
const result = execSync(
|
|
81
|
+
`curl -sI "https://github.com/${GITHUB_RELEASES_REPO}/releases/latest" | grep -i ^location:`,
|
|
82
|
+
{ encoding: 'utf8', timeout: 10000 }
|
|
83
|
+
);
|
|
84
|
+
const match = result.match(/\/tag\/(v[^\s\r\n]+)/);
|
|
85
|
+
if (match) return match[1];
|
|
86
|
+
} catch {}
|
|
82
87
|
}
|
|
88
|
+
|
|
89
|
+
return pkgVersion;
|
|
83
90
|
}
|
|
84
91
|
|
|
85
92
|
function downloadBinary(targetDir) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@avesta-hq/prevention",
|
|
3
|
-
"version": "0.6.0-pre.
|
|
3
|
+
"version": "0.6.0-pre.4",
|
|
4
4
|
"description": "XP/CD development agent commands for Claude Code - achieve Elite DORA metrics through disciplined TDD and Continuous Delivery practices",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|