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.
- package/README.md +1 -1
- package/dist/cli.js +10 -1
- package/package.json +1 -1
package/README.md
CHANGED
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(
|
|
655
|
+
process.stdout.write(`sp-rag ${cliVersion}\n`);
|
|
647
656
|
return 0;
|
|
648
657
|
}
|
|
649
658
|
process.stdout.write(helpText());
|