feat(stats): add launcher stats command and build integration

- Launcher stats subcommand with cleanup mode
- Stats frontend build integrated into Makefile
- CI workflow updated for stats package
- Config example updated with stats section
- mpv plugin menu entry for stats toggle
This commit is contained in:
2026-03-14 22:14:46 -07:00
parent 6d8650994f
commit e374e53d97
20 changed files with 456 additions and 60 deletions

View File

@@ -58,3 +58,26 @@ test('parseArgs maps dictionary command and log-level override', () => {
assert.equal(parsed.dictionaryTarget, process.cwd());
assert.equal(parsed.logLevel, 'debug');
});
test('parseArgs maps stats command and log-level override', () => {
const parsed = parseArgs(['stats', '--log-level', 'debug'], 'subminer', {});
assert.equal(parsed.stats, true);
assert.equal(parsed.logLevel, 'debug');
});
test('parseArgs maps stats cleanup to vocab mode by default', () => {
const parsed = parseArgs(['stats', 'cleanup'], 'subminer', {});
assert.equal(parsed.stats, true);
assert.equal(parsed.statsCleanup, true);
assert.equal(parsed.statsCleanupVocab, true);
});
test('parseArgs maps explicit stats cleanup vocab flag', () => {
const parsed = parseArgs(['stats', 'cleanup', '-v'], 'subminer', {});
assert.equal(parsed.stats, true);
assert.equal(parsed.statsCleanup, true);
assert.equal(parsed.statsCleanupVocab, true);
});