@ngocsangairvds/vsaf 3.1.8 → 3.1.10

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 CHANGED
@@ -111,9 +111,8 @@ function printInstallHint() {
111
111
  console.log(` \x1b[1m\x1b[33m[Windows]\x1b[0m Recommended installation methods:\n`);
112
112
  console.log(` \x1b[1mOption 1: PowerShell (Admin)\x1b[0m`);
113
113
  console.log(` \x1b[32mnpm install -g ${pkg}\x1b[0m\n`);
114
- console.log(` \x1b[1mOption 2: PowerShell setup script\x1b[0m`);
115
- console.log(` \x1b[32mSet-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass\x1b[0m`);
116
- console.log(` \x1b[32m.\\scripts\\setup-vsaf.ps1\x1b[0m\n`);
114
+ console.log(` \x1b[1mOption 2: Setup script (CMD)\x1b[0m`);
115
+ console.log(` \x1b[32mscripts\\setup-vsaf.bat\x1b[0m\n`);
117
116
  console.log(` \x1b[1mOption 3: WSL (Windows Subsystem for Linux)\x1b[0m`);
118
117
  console.log(` \x1b[90mRun inside WSL terminal for full Linux compatibility:\x1b[0m`);
119
118
  console.log(` \x1b[32mnpm install -g ${pkg}\x1b[0m`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngocsangairvds/vsaf",
3
- "version": "3.1.8",
3
+ "version": "3.1.10",
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/workflow.js CHANGED
@@ -75,18 +75,17 @@ function printAnalyzeHint() {
75
75
  if (isWindows) {
76
76
  warn('Windows troubleshooting:');
77
77
  warn('');
78
- warn(' [Most common] PowerShell blocks npm global scripts by default.');
79
- warn(' Fix: run this command once in PowerShell (Admin):');
78
+ warn(' [Most common] PowerShell blocks npm global scripts (.ps1).');
79
+ warn(' Use CMD instead of PowerShell, or prefix with cmd /c:');
80
80
  warn('');
81
- warn(' Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned');
82
- warn('');
83
- warn(' Then retry: vsaf index');
81
+ warn(' cmd /c gitnexus analyze --worker-timeout 60');
84
82
  warn('');
85
83
  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
84
  info(' - Run via npx: npx gitnexus analyze');
85
+ info(' - Use Git Bash: bash -c "gitnexus analyze"');
89
86
  info(' - Use WSL: wsl -- bash -c "cd $(wslpath -a .) && gitnexus analyze"');
87
+ info(' - Or fix PowerShell permanently (Admin):');
88
+ info(' Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned');
90
89
  } else {
91
90
  info('Try running manually: gitnexus analyze --verbose');
92
91
  }