sp-rag 0.6.2 → 0.6.3

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/dist/cli.js +10 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -17,7 +17,7 @@ CLI để setup nhanh SP-RAG theo hướng dev-friendly:
17
17
  ## Trạng thái package
18
18
 
19
19
  - package npm public: `sp-rag`
20
- - version đang publish: `0.6.2`
20
+ - version đang publish: `0.6.3`
21
21
  - binary public: `sp-rag`
22
22
 
23
23
  ## Cài từ source trong monorepo
package/dist/cli.js CHANGED
@@ -4,11 +4,16 @@ import { runEvaluationSuite } from './lib/eval.js';
4
4
  import { defaultBaseUrl, defaultMcpServerAlias, defaultMcpUrl, installMcpConfig, resolveMcpConfigPath, } from './lib/mcp-config.js';
5
5
  import { fetchJson, fetchText, runDoctor } from './lib/http.js';
6
6
  import { installSkill, resolveSkillInstallTarget, } from './lib/skill.js';
7
+ const cliVersion = '0.6.3';
7
8
  function parseArgv(argv) {
8
9
  const positionals = [];
9
10
  const options = {};
10
11
  for (let index = 0; index < argv.length; index += 1) {
11
12
  const current = argv[index];
13
+ if (current === '-v') {
14
+ options['version'] = true;
15
+ continue;
16
+ }
12
17
  if (!current.startsWith('--')) {
13
18
  positionals.push(current);
14
19
  continue;
@@ -551,6 +556,10 @@ export async function runCli(argv) {
551
556
  const parsed = parseArgv(argv);
552
557
  const [group, action] = parsed.positionals;
553
558
  try {
559
+ if (optionFlag(parsed, 'version')) {
560
+ process.stdout.write(`sp-rag ${cliVersion}\n`);
561
+ return 0;
562
+ }
554
563
  if (!group || group === 'help' || group === '--help') {
555
564
  process.stdout.write(helpText());
556
565
  return 0;
@@ -643,7 +652,7 @@ export async function runCli(argv) {
643
652
  return 0;
644
653
  }
645
654
  if (group === 'version') {
646
- process.stdout.write('sp-rag 0.6.2\n');
655
+ process.stdout.write(`sp-rag ${cliVersion}\n`);
647
656
  return 0;
648
657
  }
649
658
  process.stdout.write(helpText());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sp-rag",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "CLI cho setup MCP, codegraph GitNexus và skill của SP-RAG",
5
5
  "type": "module",
6
6
  "files": [