@ngocsangairvds/vsaf 4.0.5 → 4.0.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": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "description": "README",
5
5
  "main": "packages/core/dist/index.js",
6
6
  "types": "packages/core/dist/index.d.ts",
@@ -14,8 +14,14 @@ Before doing anything, run this check via Bash tool:
14
14
  ```bash
15
15
  source .claude/skills/_shared/vds-skill/credentials.sh 2>/dev/null
16
16
  MISSING=""
17
- { command -v vds-cli >/dev/null 2>&1 || [[ -x .claude/bin/vds-cli ]]; } || MISSING="$MISSING vds-cli"
18
17
  [[ -x .claude/bin/vds-cli ]] && export PATH=".claude/bin:$PATH"
18
+ if ! vds-cli --version >/dev/null 2>&1; then
19
+ MISSING="$MISSING vds-cli"
20
+ VDS_PATH=$(command -v vds-cli 2>/dev/null)
21
+ if [[ -n "$VDS_PATH" ]]; then
22
+ echo "NOTE: $VDS_PATH exists but fails to run (broken shim or missing venv)"
23
+ fi
24
+ fi
19
25
  [[ -z "${VDS_BITBUCKET_TOKEN:-}" ]] && MISSING="$MISSING VDS_BITBUCKET_TOKEN"
20
26
  if [[ -n "$MISSING" ]]; then
21
27
  echo "BLOCKED — missing:$MISSING"
@@ -14,8 +14,14 @@ Before doing anything, run this check via Bash tool:
14
14
  ```bash
15
15
  source .claude/skills/_shared/vds-skill/credentials.sh 2>/dev/null
16
16
  MISSING=""
17
- { command -v vds-cli >/dev/null 2>&1 || [[ -x .claude/bin/vds-cli ]]; } || MISSING="$MISSING vds-cli"
18
17
  [[ -x .claude/bin/vds-cli ]] && export PATH=".claude/bin:$PATH"
18
+ if ! vds-cli --version >/dev/null 2>&1; then
19
+ MISSING="$MISSING vds-cli"
20
+ VDS_PATH=$(command -v vds-cli 2>/dev/null)
21
+ if [[ -n "$VDS_PATH" ]]; then
22
+ echo "NOTE: $VDS_PATH exists but fails to run (broken shim or missing venv)"
23
+ fi
24
+ fi
19
25
  [[ -z "${VDS_JIRA_TOKEN:-}" ]] && MISSING="$MISSING VDS_JIRA_TOKEN"
20
26
  [[ -z "${VDS_JIRA_PROJECT_DEFAULT:-}" ]] && MISSING="$MISSING VDS_JIRA_PROJECT_DEFAULT"
21
27
  if [[ -n "$MISSING" ]]; then
@@ -229,4 +229,55 @@ if (vdsScriptsDir) {
229
229
  log('⚠️', 'vds-scripts not found at .claude/vds-scripts/ or ~/.claude/vds-scripts/');
230
230
  }
231
231
 
232
+ // ── Step 6: Verify vds-cli actually works (catch broken shims) ──
233
+
234
+ console.log('');
235
+ log('🔍', 'Verifying vds-cli...');
236
+
237
+ let verified = false;
238
+ try {
239
+ const ver = execSync('vds-cli --version', { stdio: 'pipe', encoding: 'utf-8', timeout: 15000 }).trim();
240
+ log('✅', `vds-cli ${ver} — working`);
241
+ verified = true;
242
+ } catch {
243
+ // Try with project-local wrapper in PATH
244
+ try {
245
+ const wrapperPath = join(projectPath, '.claude', 'bin');
246
+ const ver = execSync('vds-cli --version', {
247
+ stdio: 'pipe', encoding: 'utf-8', timeout: 15000,
248
+ env: { ...process.env, PATH: `${wrapperPath}:${process.env.PATH}` },
249
+ }).trim();
250
+ log('✅', `vds-cli ${ver} — working (via .claude/bin/vds-cli)`);
251
+ verified = true;
252
+ } catch {
253
+ // Check if a shim exists but is broken
254
+ try {
255
+ const shimPath = execSync('command -v vds-cli', { stdio: 'pipe', encoding: 'utf-8' }).trim();
256
+ log('❌', `vds-cli BROKEN — ${shimPath} exists but fails to run`);
257
+ log(' ', 'The shim likely points to a deleted venv or missing vds-scripts directory.');
258
+ log(' ', `Fix: rm ${shimPath} then re-run: vsaf install vds-skill`);
259
+ } catch {
260
+ log('❌', 'vds-cli not found');
261
+ }
262
+ }
263
+ }
264
+
265
+ // ── Step 7: Print verification commands for user ──
266
+
267
+ console.log('');
268
+ console.log(' ┌──────────────────────────────────────────────────────┐');
269
+ console.log(' │ Verify commands (run these to confirm setup): │');
270
+ console.log(' ├──────────────────────────────────────────────────────┤');
271
+ console.log(' │ vds-cli --version # CLI is executable │');
272
+ console.log(' │ vds-cli confluence --help # Confluence subcommand │');
273
+ console.log(' │ vds-cli jira --help # Jira subcommand │');
274
+ console.log(' │ vds-cli bitbucket --help # Bitbucket subcommand │');
275
+ console.log(' └──────────────────────────────────────────────────────┘');
276
+
277
+ if (!verified) {
278
+ console.log('');
279
+ log('⚠️', 'vds-cli is NOT working — skills will be BLOCKED at runtime.');
280
+ log(' ', 'Fix vds-cli first, then run the verify commands above.');
281
+ }
282
+
232
283
  console.log('\n[vds-skill] Setup complete ✅\n');
@@ -19,8 +19,15 @@ Before doing anything, run this check via Bash tool:
19
19
  ```bash
20
20
  source .claude/skills/_shared/vds-skill/credentials.sh 2>/dev/null
21
21
  MISSING=""
22
- { command -v vds-cli >/dev/null 2>&1 || [[ -x .claude/bin/vds-cli ]]; } || MISSING="$MISSING vds-cli"
23
22
  [[ -x .claude/bin/vds-cli ]] && export PATH=".claude/bin:$PATH"
23
+ if ! vds-cli --version >/dev/null 2>&1; then
24
+ MISSING="$MISSING vds-cli"
25
+ # Show why: broken shim vs truly missing
26
+ VDS_PATH=$(command -v vds-cli 2>/dev/null)
27
+ if [[ -n "$VDS_PATH" ]]; then
28
+ echo "NOTE: $VDS_PATH exists but fails to run (broken shim or missing venv)"
29
+ fi
30
+ fi
24
31
  [[ -z "${VDS_CONFLUENCE_TOKEN:-}" ]] && MISSING="$MISSING VDS_CONFLUENCE_TOKEN"
25
32
  [[ -z "${VDS_CONFLUENCE_SPACE_DEFAULT:-}" ]] && MISSING="$MISSING VDS_CONFLUENCE_SPACE_DEFAULT"
26
33
  if [[ -n "$MISSING" ]]; then
@@ -19,8 +19,14 @@ Before doing anything, run this check via Bash tool:
19
19
  ```bash
20
20
  source .claude/skills/_shared/vds-skill/credentials.sh 2>/dev/null
21
21
  MISSING=""
22
- { command -v vds-cli >/dev/null 2>&1 || [[ -x .claude/bin/vds-cli ]]; } || MISSING="$MISSING vds-cli"
23
22
  [[ -x .claude/bin/vds-cli ]] && export PATH=".claude/bin:$PATH"
23
+ if ! vds-cli --version >/dev/null 2>&1; then
24
+ MISSING="$MISSING vds-cli"
25
+ VDS_PATH=$(command -v vds-cli 2>/dev/null)
26
+ if [[ -n "$VDS_PATH" ]]; then
27
+ echo "NOTE: $VDS_PATH exists but fails to run (broken shim or missing venv)"
28
+ fi
29
+ fi
24
30
  [[ -z "${VDS_CONFLUENCE_TOKEN:-}" ]] && MISSING="$MISSING VDS_CONFLUENCE_TOKEN"
25
31
  [[ -z "${VDS_CONFLUENCE_SPACE_DEFAULT:-}" ]] && MISSING="$MISSING VDS_CONFLUENCE_SPACE_DEFAULT"
26
32
  if [[ -n "$MISSING" ]]; then
@@ -14,8 +14,14 @@ Before doing anything, run this check via Bash tool:
14
14
  ```bash
15
15
  source .claude/skills/_shared/vds-skill/credentials.sh 2>/dev/null
16
16
  MISSING=""
17
- { command -v vds-cli >/dev/null 2>&1 || [[ -x .claude/bin/vds-cli ]]; } || MISSING="$MISSING vds-cli"
18
17
  [[ -x .claude/bin/vds-cli ]] && export PATH=".claude/bin:$PATH"
18
+ if ! vds-cli --version >/dev/null 2>&1; then
19
+ MISSING="$MISSING vds-cli"
20
+ VDS_PATH=$(command -v vds-cli 2>/dev/null)
21
+ if [[ -n "$VDS_PATH" ]]; then
22
+ echo "NOTE: $VDS_PATH exists but fails to run (broken shim or missing venv)"
23
+ fi
24
+ fi
19
25
  [[ -z "${VDS_CONFLUENCE_TOKEN:-}" ]] && MISSING="$MISSING VDS_CONFLUENCE_TOKEN"
20
26
  [[ -z "${VDS_JIRA_TOKEN:-}" ]] && MISSING="$MISSING VDS_JIRA_TOKEN"
21
27
  [[ -z "${VDS_CONFLUENCE_SPACE_DEFAULT:-}" ]] && MISSING="$MISSING VDS_CONFLUENCE_SPACE_DEFAULT"