@ngocsangairvds/vsaf 4.0.14 → 4.0.16

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": "4.0.14",
3
+ "version": "4.0.16",
4
4
  "description": "is it ready to use ?",
5
5
  "main": "packages/core/dist/index.js",
6
6
  "types": "packages/core/dist/index.d.ts",
@@ -179,7 +179,7 @@ let vdsCliFound = false;
179
179
 
180
180
  // Check if vds-cli is already on PATH
181
181
  try {
182
- const version = execSync('vds-cli --version', { stdio: 'pipe', encoding: 'utf-8' }).trim();
182
+ const version = execSync('vds-cli version', { stdio: 'pipe', encoding: 'utf-8' }).trim();
183
183
  log('✅', `vds-cli ${version} (on PATH)`);
184
184
  vdsCliFound = true;
185
185
  } catch {
@@ -197,7 +197,7 @@ if (!vdsCliFound && vdsScriptsDir) {
197
197
  // Project-local vds-cli wrapper — created by vsaf install vds-skill
198
198
  const { execFileSync } = require('child_process');
199
199
  try {
200
- execFileSync('uv', ['run', '--directory', ${JSON.stringify(vdsScriptsDir)}, '--package', 'vds-cli', 'vds-cli', ...process.argv.slice(2)], { stdio: 'inherit' });
200
+ execFileSync('uv', ['run', '--directory', ${JSON.stringify(vdsScriptsDir)}, '--package', 'vds-cli', 'vds-cli', ...process.argv.slice(2)], { stdio: 'inherit', shell: true });
201
201
  } catch (e) {
202
202
  process.exit(e.status || 1);
203
203
  }
@@ -210,7 +210,12 @@ try {
210
210
  }
211
211
  log('✅', `vds-cli wrapper created: ${wrapperPath}`);
212
212
  log(' ', `Points to: ${vdsScriptsDir}`);
213
- log('💡', 'Add to PATH: export PATH=".claude/bin:$PATH"');
213
+ if (process.platform === 'win32') {
214
+ log('💡', 'Add to PATH: set "PATH=.claude\\bin;%PATH%"');
215
+ log(' ', 'PowerShell: $env:PATH = ".claude\\bin;$env:PATH"');
216
+ } else {
217
+ log('💡', 'Add to PATH: export PATH=".claude/bin:$PATH"');
218
+ }
214
219
  vdsCliFound = true;
215
220
  }
216
221
  }
@@ -219,7 +224,7 @@ if (!vdsCliFound) {
219
224
  log('⚠️', 'vds-cli not found — required for non-dry-run execution');
220
225
  log(' ', 'Option 1: Clone vds-scripts into .claude/vds-scripts/ then re-run install');
221
226
  log(' ', 'Option 2: Install vds-cli globally (pip install / Viettel internal)');
222
- log(' ', 'Verify: vds-cli --version');
227
+ log(' ', 'Verify: vds-cli version');
223
228
  }
224
229
 
225
230
  // ── Step 5: Sync all vds-scripts packages (ensures subcommand binaries exist) ──
@@ -254,8 +259,9 @@ if (vdsScriptsDir) {
254
259
  cwd: vdsScriptsDir,
255
260
  });
256
261
  log('✅', 'All vds-scripts packages synced');
257
- } catch {
262
+ } catch (e) {
258
263
  log('⚠️', 'Failed to sync vds-scripts packages — subcommands like confluence/jira may not work');
264
+ if (e.stderr) log(' ', `Error: ${e.stderr.trim().split('\n')[0]}`);
259
265
  log(' ', `Fix: cd ${vdsScriptsDir} && uv sync --all-packages`);
260
266
  }
261
267
  }
@@ -273,7 +279,7 @@ let verified = false;
273
279
 
274
280
  // First pass: try vds-cli on PATH
275
281
  try {
276
- const ver = execSync('vds-cli --version', { stdio: 'pipe', encoding: 'utf-8', timeout: 15000 }).trim();
282
+ const ver = execSync('vds-cli version', { stdio: 'pipe', encoding: 'utf-8', timeout: 15000 }).trim();
277
283
  log('✅', `vds-cli ${ver} — working`);
278
284
  verified = true;
279
285
  } catch {
@@ -305,14 +311,29 @@ try {
305
311
  if (!verified) {
306
312
  try {
307
313
  const wrapperPath = join(projectPath, '.claude', 'bin');
308
- const ver = execSync('vds-cli --version', {
314
+ const ver = execSync('vds-cli version', {
309
315
  stdio: 'pipe', encoding: 'utf-8', timeout: 15000,
310
316
  env: { ...process.env, PATH: `${wrapperPath}${delimiter}${process.env.PATH}` },
311
317
  }).trim();
312
318
  log('✅', `vds-cli ${ver} — working (via .claude/bin/vds-cli)`);
313
319
  verified = true;
314
- } catch {
320
+ } catch (e) {
315
321
  log('❌', 'vds-cli not working — skills will be BLOCKED at runtime');
322
+ if (e.stderr) log(' ', `stderr: ${e.stderr.toString().trim().split('\n').slice(0, 3).join('\n ')}`);
323
+ else log(' ', `Error: ${e.message || e}`);
324
+
325
+ // Diagnostic: test uv run directly to isolate the issue
326
+ if (vdsScriptsDir) {
327
+ try {
328
+ const uvVer = execSync(`uv run --directory ${JSON.stringify(vdsScriptsDir)} --package vds-cli vds-cli version`, {
329
+ stdio: 'pipe', encoding: 'utf-8', timeout: 15000,
330
+ }).trim();
331
+ log(' ', `Direct uv run works: ${uvVer}`);
332
+ log(' ', 'Issue is with the wrapper script, not uv/vds-cli');
333
+ } catch (uvErr) {
334
+ log(' ', `Direct uv run also fails: ${uvErr.stderr ? uvErr.stderr.toString().trim().split('\n')[0] : uvErr.message}`);
335
+ }
336
+ }
316
337
  }
317
338
  }
318
339
 
@@ -322,7 +343,7 @@ console.log('');
322
343
  console.log(' ┌──────────────────────────────────────────────────────┐');
323
344
  console.log(' │ Verify commands (run these to confirm setup): │');
324
345
  console.log(' ├──────────────────────────────────────────────────────┤');
325
- console.log(' │ vds-cli --version # CLI is executable │');
346
+ console.log(' │ vds-cli version # CLI is executable │');
326
347
  console.log(' │ vds-cli confluence --help # Confluence subcommand │');
327
348
  console.log(' │ vds-cli jira --help # Jira subcommand │');
328
349
  console.log(' │ vds-cli bitbucket --help # Bitbucket subcommand │');