mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 12:11:28 -07:00
feat: stabilize startup sync and overlay/runtime paths
This commit is contained in:
@@ -147,12 +147,26 @@ test('hasExplicitCommand and shouldStartApp preserve command intent', () => {
|
||||
'--stats',
|
||||
'--stats-response-path',
|
||||
'/tmp/subminer-stats-response.json',
|
||||
'--stats-cleanup-lifetime',
|
||||
]);
|
||||
assert.equal(stats.stats, true);
|
||||
assert.equal(stats.statsResponsePath, '/tmp/subminer-stats-response.json');
|
||||
assert.equal(stats.statsCleanup, false);
|
||||
assert.equal(stats.statsCleanupVocab, false);
|
||||
assert.equal(stats.statsCleanupLifetime, true);
|
||||
assert.equal(hasExplicitCommand(stats), true);
|
||||
assert.equal(shouldStartApp(stats), true);
|
||||
|
||||
const statsLifetimeRebuild = parseArgs([
|
||||
'--stats',
|
||||
'--stats-cleanup',
|
||||
'--stats-cleanup-lifetime',
|
||||
]);
|
||||
assert.equal(statsLifetimeRebuild.stats, true);
|
||||
assert.equal(statsLifetimeRebuild.statsCleanup, true);
|
||||
assert.equal(statsLifetimeRebuild.statsCleanupLifetime, true);
|
||||
assert.equal(statsLifetimeRebuild.statsCleanupVocab, false);
|
||||
|
||||
const jellyfinLibraries = parseArgs(['--jellyfin-libraries']);
|
||||
assert.equal(jellyfinLibraries.jellyfinLibraries, true);
|
||||
assert.equal(hasExplicitCommand(jellyfinLibraries), true);
|
||||
|
||||
@@ -32,6 +32,7 @@ export interface CliArgs {
|
||||
stats: boolean;
|
||||
statsCleanup?: boolean;
|
||||
statsCleanupVocab?: boolean;
|
||||
statsCleanupLifetime?: boolean;
|
||||
statsResponsePath?: string;
|
||||
jellyfin: boolean;
|
||||
jellyfinLogin: boolean;
|
||||
@@ -104,6 +105,7 @@ export function parseArgs(argv: string[]): CliArgs {
|
||||
stats: false,
|
||||
statsCleanup: false,
|
||||
statsCleanupVocab: false,
|
||||
statsCleanupLifetime: false,
|
||||
jellyfin: false,
|
||||
jellyfinLogin: false,
|
||||
jellyfinLogout: false,
|
||||
@@ -172,6 +174,7 @@ export function parseArgs(argv: string[]): CliArgs {
|
||||
} else if (arg === '--stats') args.stats = true;
|
||||
else if (arg === '--stats-cleanup') args.statsCleanup = true;
|
||||
else if (arg === '--stats-cleanup-vocab') args.statsCleanupVocab = true;
|
||||
else if (arg === '--stats-cleanup-lifetime') args.statsCleanupLifetime = true;
|
||||
else if (arg.startsWith('--stats-response-path=')) {
|
||||
const value = arg.split('=', 2)[1];
|
||||
if (value) args.statsResponsePath = value;
|
||||
|
||||
Reference in New Issue
Block a user