@ngocsangairvds/vsaf 3.1.4 → 3.1.6

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.4",
3
+ "version": "3.1.6",
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/utils.js CHANGED
@@ -14,12 +14,14 @@ const step = (msg) => console.log(`\n\x1b[1m${msg}\x1b[0m`);
14
14
  const isWindows = process.platform === 'win32';
15
15
 
16
16
  function hasCommand(cmd) {
17
+ // Try --version first (works on most CLIs across all platforms)
17
18
  const versionCheck = spawnSync(cmd, ['--version'], { stdio: 'ignore', shell: isWindows });
18
19
  if (versionCheck.status === 0) return true;
19
20
 
20
- // Some CLIs don't support --version but are still available on PATH.
21
+ // Fallback: check if command exists on PATH
21
22
  if (isWindows) {
22
- const whereCheck = spawnSync('where', [cmd], { stdio: 'ignore', shell: true });
23
+ // 'where' is a native Windows command; run as a single string via shell
24
+ const whereCheck = spawnSync(`where "${cmd}"`, { stdio: 'ignore', shell: true });
23
25
  return whereCheck.status === 0;
24
26
  } else {
25
27
  const pathCheck = spawnSync('sh', ['-c', `command -v "${cmd}"`], { stdio: 'ignore', shell: false });
package/src/workflow.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const { ok, info, warn, step, hasCommand, exec } = require('./utils');
3
+ const { ok, info, warn, step, hasCommand, exec, isWindows } = require('./utils');
4
+ const { execSync } = require('child_process');
4
5
 
5
6
  function runIndex() {
6
7
  step('Index');
@@ -12,7 +13,12 @@ function runIndex() {
12
13
 
13
14
  info('Running gitnexus analyze...');
14
15
  const gitnexusOk = exec('gitnexus analyze');
15
- gitnexusOk ? ok('GitNexus index updated') : warn('gitnexus analyze failed — run manually');
16
+ if (gitnexusOk) {
17
+ ok('GitNexus index updated');
18
+ } else {
19
+ warn('gitnexus analyze failed — run manually');
20
+ printAnalyzeHint();
21
+ }
16
22
 
17
23
  return gitnexusOk;
18
24
  }
@@ -65,4 +71,20 @@ function runServe() {
65
71
  return exec('gitnexus serve');
66
72
  }
67
73
 
74
+ function printAnalyzeHint() {
75
+ if (isWindows) {
76
+ info('Windows troubleshooting:');
77
+ info(' 1. Run with verbose output: gitnexus analyze --verbose');
78
+ info(' 2. LadybugDB may have file-locking issues on Windows.');
79
+ info(' Try closing other terminals/editors that access this repo.');
80
+ info(' 3. Clean and retry:');
81
+ info(' gitnexus clean');
82
+ info(' gitnexus analyze');
83
+ info(' 4. If LadybugDB keeps failing, try running inside WSL:');
84
+ info(' wsl -- bash -c "cd $(wslpath -a .) && gitnexus analyze"');
85
+ } else {
86
+ info('Try running manually: gitnexus analyze --verbose');
87
+ }
88
+ }
89
+
68
90
  module.exports = { runIndex, runReview, runClean, runServe };