@ngocsangairvds/vsaf 3.1.9 → 3.1.11
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/assets/lbug_cli-windows-x86_64.zip +0 -0
- package/package.json +1 -1
- package/src/global.js +47 -0
- package/src/project.js +1 -1
- package/src/workflow.js +2 -2
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngocsangairvds/vsaf",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.11",
|
|
4
4
|
"description": "VSAF — Agentic AI SDLC Framework. 3 integrated tools: BMAD, GitNexus, Superpowers. 2-layer review.",
|
|
5
5
|
"keywords": ["claude", "claude-code", "ai", "sdlc", "framework", "bmad", "gitnexus", "superpowers"],
|
|
6
6
|
"bin": {
|
package/src/global.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const fs = require('fs');
|
|
4
|
+
const os = require('os');
|
|
4
5
|
const { ok, info, warn, step, hasCommand, exec, copyDir, copyFile, CLAUDE_HOME, isWindows } = require('./utils');
|
|
5
6
|
|
|
6
7
|
const PKG_ROOT = path.join(__dirname, '..');
|
|
@@ -14,6 +15,7 @@ async function installGlobal() {
|
|
|
14
15
|
|
|
15
16
|
installSkills();
|
|
16
17
|
installBinary('gitnexus', () => exec('npm install -g gitnexus'));
|
|
18
|
+
if (isWindows) ensureLadybugDbWindows();
|
|
17
19
|
setupGitnexusMcp();
|
|
18
20
|
|
|
19
21
|
console.log('\n\x1b[32m\x1b[1m✓ Global infra ready.\x1b[0m\n');
|
|
@@ -61,6 +63,51 @@ function installBinary(name, installFn) {
|
|
|
61
63
|
: warn(`${name} install failed — run manually`);
|
|
62
64
|
}
|
|
63
65
|
|
|
66
|
+
function ensureLadybugDbWindows() {
|
|
67
|
+
step('LadybugDB native binary (Windows)');
|
|
68
|
+
|
|
69
|
+
// 1. Check if npm optional dep is present
|
|
70
|
+
try {
|
|
71
|
+
const npmRoot = require('child_process')
|
|
72
|
+
.execSync('npm root -g', { encoding: 'utf8', shell: true }).trim();
|
|
73
|
+
const ladybugPath = path.join(npmRoot, 'gitnexus', 'node_modules', '@ladybugdb', 'core-win32-x64');
|
|
74
|
+
if (fs.existsSync(ladybugPath)) {
|
|
75
|
+
ok('LadybugDB Windows binary present');
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
warn('LadybugDB Windows binary missing — installing via npm...');
|
|
79
|
+
const gitnexusDir = path.join(npmRoot, 'gitnexus');
|
|
80
|
+
if (exec('npm install @ladybugdb/core-win32-x64 --no-save', { cwd: gitnexusDir })) {
|
|
81
|
+
ok('LadybugDB Windows binary installed');
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
} catch { /* fall through to bundled binary */ }
|
|
85
|
+
|
|
86
|
+
// 2. Fallback: extract bundled lbug.exe
|
|
87
|
+
const lbugZip = path.join(PKG_ROOT, 'assets', 'lbug_cli-windows-x86_64.zip');
|
|
88
|
+
const lbugDest = path.join(os.homedir(), '.vsaf', 'bin');
|
|
89
|
+
const lbugExe = path.join(lbugDest, 'lbug.exe');
|
|
90
|
+
|
|
91
|
+
if (fs.existsSync(lbugExe)) {
|
|
92
|
+
ok('lbug.exe already installed at ' + lbugDest);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (!fs.existsSync(lbugZip)) {
|
|
97
|
+
warn('Could not install LadybugDB binary — bundled zip not found');
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
info('Extracting bundled lbug.exe...');
|
|
102
|
+
fs.mkdirSync(lbugDest, { recursive: true });
|
|
103
|
+
if (exec(`powershell -Command "Expand-Archive -Path '${lbugZip}' -DestinationPath '${lbugDest}' -Force"`)) {
|
|
104
|
+
ok('lbug.exe extracted to ' + lbugDest);
|
|
105
|
+
info('Add to PATH: ' + lbugDest);
|
|
106
|
+
} else {
|
|
107
|
+
warn('Failed to extract lbug.exe');
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
64
111
|
function setupGitnexusMcp() {
|
|
65
112
|
step('GitNexus MCP');
|
|
66
113
|
if (!hasCommand('claude')) {
|
package/src/project.js
CHANGED
|
@@ -141,7 +141,7 @@ function syncLocalBmadSkills() {
|
|
|
141
141
|
function initGitNexus() {
|
|
142
142
|
step('GitNexus');
|
|
143
143
|
if (!hasCommand('gitnexus')) { warn('gitnexus not found — run: vsaf global'); return; }
|
|
144
|
-
const analyzeCmd =
|
|
144
|
+
const analyzeCmd = 'gitnexus analyze';
|
|
145
145
|
info('Indexing repository (gitnexus analyze)...');
|
|
146
146
|
exec(analyzeCmd, { cwd: CWD }) ? ok('Repository indexed') : warn('gitnexus analyze failed — run manually');
|
|
147
147
|
}
|
package/src/workflow.js
CHANGED
|
@@ -10,7 +10,7 @@ function runIndex() {
|
|
|
10
10
|
return false;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
const analyzeCmd =
|
|
13
|
+
const analyzeCmd = 'gitnexus analyze';
|
|
14
14
|
info('Running gitnexus analyze...');
|
|
15
15
|
const gitnexusOk = exec(analyzeCmd);
|
|
16
16
|
if (gitnexusOk) {
|
|
@@ -78,7 +78,7 @@ function printAnalyzeHint() {
|
|
|
78
78
|
warn(' [Most common] PowerShell blocks npm global scripts (.ps1).');
|
|
79
79
|
warn(' Use CMD instead of PowerShell, or prefix with cmd /c:');
|
|
80
80
|
warn('');
|
|
81
|
-
warn(' cmd /c gitnexus analyze
|
|
81
|
+
warn(' cmd /c gitnexus analyze');
|
|
82
82
|
warn('');
|
|
83
83
|
info(' Other options:');
|
|
84
84
|
info(' - Run via npx: npx gitnexus analyze');
|