@ngocsangairvds/vsaf 3.1.9 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngocsangairvds/vsaf",
3
- "version": "3.1.9",
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')) {