feat(launcher): add --version / -v flag to print app version

- Exits early with `SubMiner <version>` output, no app binary required
- Maps `-v` at root level without conflicting with `stats cleanup -v`
- Adds `version: boolean` to `Args` type and default args
- Documents flag in docs-site and adds changelog fragment
This commit is contained in:
2026-05-16 22:47:57 -07:00
parent 4d010e6a18
commit 6ca5cede3e
11 changed files with 60 additions and 0 deletions
+11
View File
@@ -69,6 +69,17 @@ test('parseArgs maps root update flags without conflicting with jellyfin usernam
assert.equal(jellyfinParsed.jellyfinUsername, 'kyle');
});
test('parseArgs maps root version flags without conflicting with stats vocab flag', () => {
const shortParsed = parseArgs(['-v'], 'subminer', {});
const longParsed = parseArgs(['--version'], 'subminer', {});
const statsParsed = parseArgs(['stats', 'cleanup', '-v'], 'subminer', {});
assert.equal(shortParsed.version, true);
assert.equal(longParsed.version, true);
assert.equal(statsParsed.version, false);
assert.equal(statsParsed.statsCleanupVocab, true);
});
test('parseArgs maps jellyfin play action and log-level override', () => {
const parsed = parseArgs(['jellyfin', 'play', '--log-level', 'debug'], 'subminer', {});