@ngocsangairvds/vsaf 3.1.6 → 3.1.8
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/vsaf.js +3 -0
- package/package.json +1 -1
- package/src/global.js +22 -1
- package/src/project.js +2 -1
- package/src/workflow.js +16 -11
package/bin/vsaf.js
CHANGED
|
@@ -105,6 +105,9 @@ function printInstallHint() {
|
|
|
105
105
|
console.log(`\n Detected OS: \x1b[36m${platform}\x1b[0m\n`);
|
|
106
106
|
|
|
107
107
|
if (platform === 'windows') {
|
|
108
|
+
console.log(` \x1b[1m\x1b[31m[IMPORTANT]\x1b[0m PowerShell blocks npm global scripts by default.`);
|
|
109
|
+
console.log(` Run this first (one-time, in PowerShell as Admin):\n`);
|
|
110
|
+
console.log(` \x1b[32mSet-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned\x1b[0m\n`);
|
|
108
111
|
console.log(` \x1b[1m\x1b[33m[Windows]\x1b[0m Recommended installation methods:\n`);
|
|
109
112
|
console.log(` \x1b[1mOption 1: PowerShell (Admin)\x1b[0m`);
|
|
110
113
|
console.log(` \x1b[32mnpm install -g ${pkg}\x1b[0m\n`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngocsangairvds/vsaf",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.8",
|
|
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,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const fs = require('fs');
|
|
4
|
-
const { ok, info, warn, step, hasCommand, exec, copyDir, copyFile, CLAUDE_HOME } = require('./utils');
|
|
4
|
+
const { ok, info, warn, step, hasCommand, exec, copyDir, copyFile, CLAUDE_HOME, isWindows } = require('./utils');
|
|
5
5
|
|
|
6
6
|
const PKG_ROOT = path.join(__dirname, '..');
|
|
7
7
|
const SKILLS_SRC = path.join(PKG_ROOT, '.claude', 'skills');
|
|
@@ -14,6 +14,7 @@ async function installGlobal() {
|
|
|
14
14
|
|
|
15
15
|
installSkills();
|
|
16
16
|
installBinary('gitnexus', () => exec('npm install -g gitnexus'));
|
|
17
|
+
setupGitnexusMcp();
|
|
17
18
|
|
|
18
19
|
console.log('\n\x1b[32m\x1b[1m✓ Global infra ready.\x1b[0m\n');
|
|
19
20
|
}
|
|
@@ -60,4 +61,24 @@ function installBinary(name, installFn) {
|
|
|
60
61
|
: warn(`${name} install failed — run manually`);
|
|
61
62
|
}
|
|
62
63
|
|
|
64
|
+
function setupGitnexusMcp() {
|
|
65
|
+
step('GitNexus MCP');
|
|
66
|
+
if (!hasCommand('claude')) {
|
|
67
|
+
info('Claude Code CLI not found — skip MCP auto-setup');
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if (isWindows) {
|
|
72
|
+
info('Configuring GitNexus MCP for Windows...');
|
|
73
|
+
exec('claude mcp add gitnexus -- cmd /c npx -y gitnexus@latest mcp')
|
|
74
|
+
? ok('GitNexus MCP configured (Windows)')
|
|
75
|
+
: warn('MCP setup failed — run manually: claude mcp add gitnexus -- cmd /c npx -y gitnexus@latest mcp');
|
|
76
|
+
} else {
|
|
77
|
+
info('Configuring GitNexus MCP...');
|
|
78
|
+
exec('claude mcp add gitnexus -- npx -y gitnexus@latest mcp')
|
|
79
|
+
? ok('GitNexus MCP configured')
|
|
80
|
+
: warn('MCP setup failed — run manually: claude mcp add gitnexus -- npx -y gitnexus@latest mcp');
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
63
84
|
module.exports = { installGlobal };
|
package/src/project.js
CHANGED
|
@@ -141,8 +141,9 @@ 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 = isWindows ? 'gitnexus analyze --worker-timeout 60' : 'gitnexus analyze';
|
|
144
145
|
info('Indexing repository (gitnexus analyze)...');
|
|
145
|
-
exec(
|
|
146
|
+
exec(analyzeCmd, { cwd: CWD }) ? ok('Repository indexed') : warn('gitnexus analyze failed — run manually');
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
module.exports = { installProject };
|
package/src/workflow.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const { ok, info, warn, step, hasCommand, exec, isWindows } = require('./utils');
|
|
4
|
-
const { execSync } = require('child_process');
|
|
5
4
|
|
|
6
5
|
function runIndex() {
|
|
7
6
|
step('Index');
|
|
@@ -11,8 +10,9 @@ function runIndex() {
|
|
|
11
10
|
return false;
|
|
12
11
|
}
|
|
13
12
|
|
|
13
|
+
const analyzeCmd = isWindows ? 'gitnexus analyze --worker-timeout 60' : 'gitnexus analyze';
|
|
14
14
|
info('Running gitnexus analyze...');
|
|
15
|
-
const gitnexusOk = exec(
|
|
15
|
+
const gitnexusOk = exec(analyzeCmd);
|
|
16
16
|
if (gitnexusOk) {
|
|
17
17
|
ok('GitNexus index updated');
|
|
18
18
|
} else {
|
|
@@ -73,15 +73,20 @@ function runServe() {
|
|
|
73
73
|
|
|
74
74
|
function printAnalyzeHint() {
|
|
75
75
|
if (isWindows) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
76
|
+
warn('Windows troubleshooting:');
|
|
77
|
+
warn('');
|
|
78
|
+
warn(' [Most common] PowerShell blocks npm global scripts by default.');
|
|
79
|
+
warn(' Fix: run this command once in PowerShell (Admin):');
|
|
80
|
+
warn('');
|
|
81
|
+
warn(' Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned');
|
|
82
|
+
warn('');
|
|
83
|
+
warn(' Then retry: vsaf index');
|
|
84
|
+
warn('');
|
|
85
|
+
info(' Other options:');
|
|
86
|
+
info(' - Use CMD instead of PowerShell (CMD does not block scripts)');
|
|
87
|
+
info(' - Use Git Bash: bash -c "gitnexus analyze"');
|
|
88
|
+
info(' - Run via npx: npx gitnexus analyze');
|
|
89
|
+
info(' - Use WSL: wsl -- bash -c "cd $(wslpath -a .) && gitnexus analyze"');
|
|
85
90
|
} else {
|
|
86
91
|
info('Try running manually: gitnexus analyze --verbose');
|
|
87
92
|
}
|