@ngocsangairvds/vsaf 3.2.2 → 3.2.4

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.2.2",
3
+ "version": "3.2.4",
4
4
  "description": "add vds script env",
5
5
  "keywords": ["claude", "claude-code", "ai", "sdlc", "framework", "bmad", "gitnexus", "superpowers"],
6
6
  "bin": {
package/src/global.js CHANGED
@@ -11,12 +11,13 @@ const CODEX_SKILLS_DST = path.join(CODEX_HOME, 'skills');
11
11
 
12
12
  async function installGlobal() {
13
13
  console.log('\n\x1b[1m╔══════════════════════════════════════════╗\x1b[0m');
14
- console.log('\x1b[1m║ VSAF — Global Infra ║\x1b[0m');
15
- console.log('\x1b[1m╚══════════════════════════════════════════╝\x1b[0m');
14
+ console.log('\x1b [1m║ VSAF — Global Infra ║\x1b[0m');
15
+ console.log('\x1b[ 1m╚══════════════════════════════════════════╝\x1b[0m');
16
16
 
17
17
  installSkills();
18
18
  installBinary('gitnexus', () => exec('npm install -g gitnexus@1.6.4-rc.79'));
19
19
  setupGitnexusMcp();
20
+ installBinary('uv', () => exec('curl -LsSf https://astral.sh/uv/install.sh | sh'));
20
21
  await setupVdsScriptsMcp();
21
22
 
22
23
  console.log('\n\x1b[32m\x1b[1m✓ Global infra ready.\x1b[0m\n');
@@ -101,18 +102,16 @@ async function setupVdsScriptsMcp() {
101
102
  if (!fs.existsSync(envFile)) {
102
103
  fs.mkdirSync(envDir, { recursive: true });
103
104
 
104
- info('Vui lòng cung cấp các thông tin xác thực sau (Bắt buộc):');
105
- let vdsUsername = ''; while (!vdsUsername) vdsUsername = await promptInput(' Nhập VDS_USERNAME: ');
106
- let vdsPassword = ''; while (!vdsPassword) vdsPassword = await promptSecret(' Nhập VDS_PASSWORD: ');
107
- let bitbucketToken = ''; while (!bitbucketToken) bitbucketToken = await promptSecret(' Nhập BITBUCKET_TOKEN: ');
108
- let jiraToken = ''; while (!jiraToken) jiraToken = await promptSecret(' Nhập JIRA_TOKEN: ');
109
- let confluenceToken = ''; while (!confluenceToken) confluenceToken = await promptSecret(' Nhập INTERNAL_CONFLUENCE_TOKEN: ');
110
- let extConfluenceToken = ''; while (!extConfluenceToken) extConfluenceToken = await promptSecret(' Nhập EXTERNAL_CONFLUENCE_TOKEN: ');
105
+ info('Vui lòng cung cấp các thông tin xác thực sau (Enter để bỏ qua nếu đã có sẵn):');
106
+ const vdsUsername = await promptInput(' Nhập VDS_USERNAME: ');
107
+ const vdsPassword = await promptSecret(' Nhập VDS_PASSWORD: ');
108
+ const bitbucketToken = await promptSecret(' Nhập BITBUCKET_TOKEN: ');
109
+ const jiraToken = await promptSecret(' Nhập JIRA_TOKEN: ');
110
+ const confluenceToken = await promptSecret(' Nhập INTERNAL_CONFLUENCE_TOKEN: ');
111
+ const extConfluenceToken = await promptSecret(' Nhập EXTERNAL_CONFLUENCE_TOKEN: ');
111
112
 
112
- let jiraBaseUrl = ''; while (!jiraBaseUrl) jiraBaseUrl = await promptInput(' Nhập JIRA_BASE_URL (e.g. https://jira.viettelmoney.vn/): ');
113
- let bitbucketBaseUrl = ''; while (!bitbucketBaseUrl) bitbucketBaseUrl = await promptInput(' Nhập BITBUCKET_BASE_URL (e.g. http://bitbucket.digital.vn): ');
114
- let confluenceInternalUrl = ''; while (!confluenceInternalUrl) confluenceInternalUrl = await promptInput(' Nhập CONFLUENCE_INTERNAL_URL (e.g. http://10.254.136.35:8090): ');
115
- let confluenceExternalUrl = ''; while (!confluenceExternalUrl) confluenceExternalUrl = await promptInput(' Nhập CONFLUENCE_EXTERNAL_URL (e.g. http://10.254.136.35:8090): ');
113
+ const confluenceInternalUrl = (await promptInput(' Nhập CONFLUENCE_INTERNAL_URL (ex: http://10.254.136.35:8090): ')) || 'http://10.254.136.35:8090';
114
+ const confluenceExternalUrl = (await promptInput(' Nhập CONFLUENCE_EXTERNAL_URL (ex: https://atlassian.digital.vn): ')) || 'https://atlassian.digital.vn';
116
115
 
117
116
  const envContent = [
118
117
  `VDS_USERNAME=${vdsUsername}`,
@@ -121,10 +120,10 @@ async function setupVdsScriptsMcp() {
121
120
  `JIRA_TOKEN=${jiraToken}`,
122
121
  `INTERNAL_CONFLUENCE_TOKEN=${confluenceToken}`,
123
122
  `EXTERNAL_CONFLUENCE_TOKEN=${extConfluenceToken}`,
124
- `JIRA_BASE_URL=${jiraBaseUrl}`,
123
+ 'JIRA_BASE_URL=https://jira.viettelmoney.vn/',
125
124
  `CONFLUENCE_INTERNAL_URL=${confluenceInternalUrl}`,
126
125
  `CONFLUENCE_EXTERNAL_URL=${confluenceExternalUrl}`,
127
- `BITBUCKET_BASE_URL=${bitbucketBaseUrl}`
126
+ 'BITBUCKET_BASE_URL=http://bitbucket.digital.vn'
128
127
  ].join('\n') + '\n';
129
128
 
130
129
  fs.writeFileSync(envFile, envContent);
@@ -188,4 +187,4 @@ function promptSecret(question) {
188
187
  });
189
188
  }
190
189
 
191
- module.exports = { installGlobal };
190
+ module.exports = { installGlobal, setupVdsScriptsMcp };
package/src/project.js CHANGED
@@ -2,6 +2,7 @@
2
2
  const path = require('path');
3
3
  const fs = require('fs');
4
4
  const { ok, info, warn, step, hasCommand, exec, copyDir, copyFile, cleanStaleWal } = require('./utils');
5
+ const { setupVdsScriptsMcp } = require('./global');
5
6
 
6
7
  const PKG_ROOT = path.join(__dirname, '..');
7
8
  const TEMPLATES = path.join(PKG_ROOT, 'assets', 'templates');
@@ -16,8 +17,9 @@ async function installProject() {
16
17
 
17
18
  scaffoldFiles();
18
19
  scaffoldBmadWorkspace();
19
- syncLocalBmadSkills();
20
+ syncLocalSkills();
20
21
  initGitNexus();
22
+ await setupVdsScriptsMcp();
21
23
 
22
24
  console.log('\n\x1b[32m\x1b[1m✓ Project ready.\x1b[0m');
23
25
  console.log('\n Next steps:');
@@ -128,7 +130,7 @@ function syncLocalBmadSkills() {
128
130
 
129
131
  const entries = fs
130
132
  .readdirSync(SKILLS_SRC, { withFileTypes: true })
131
- .filter((entry) => entry.name.startsWith('bmad-'));
133
+ .filter((entry) => entry.name.startsWith('bmad-') || entry.name.startsWith('vsaf-') || entry.name.startsWith('vds-'));
132
134
 
133
135
  if (entries.length === 0) {
134
136
  warn('No BMAD skills found in package — skipping');
package/src/status.js CHANGED
@@ -11,7 +11,9 @@ async function showStatus() {
11
11
  checkSkills();
12
12
  checkCodexSkills();
13
13
  checkCmd('gitnexus', 'GitNexus');
14
-
14
+ checkCmd('uv', 'UV Package Manager');
15
+ checkVdsScripts();
16
+ checkVdsEnv();
15
17
  // ── Project ────────────────────────────────────────────────────────────────
16
18
  console.log('\n\x1b[1mProject (current repo)\x1b[0m');
17
19
  checkPath('.claude/settings.json', 'Claude settings');
@@ -71,4 +73,16 @@ function checkProjectSkillDir(rel, label) {
71
73
  }
72
74
  }
73
75
 
76
+ function checkVdsScripts() {
77
+ const dir = path.join(CLAUDE_HOME, 'vds-scripts');
78
+ const exists = fs.existsSync(dir);
79
+ console.log(` ${exists ? '\x1b[32m✓\x1b[0m' : '\x1b[31m✗\x1b[0m'} VDS Scripts (~/.claude/vds-scripts)`);
80
+ }
81
+
82
+ function checkVdsEnv() {
83
+ const file = path.join(require('os').homedir(), '.vds', '.env');
84
+ const exists = fs.existsSync(file);
85
+ console.log(` ${exists ? '\x1b[32m✓\x1b[0m' : '\x1b[31m✗\x1b[0m'} VDS Config (~/.vds/.env)`);
86
+ }
87
+
74
88
  module.exports = { showStatus };