make pretty

This commit is contained in:
2026-03-02 02:45:51 -08:00
parent 83d21c4b6d
commit be4db24861
42 changed files with 395 additions and 336 deletions

View File

@@ -1,6 +1,11 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { hasExplicitCommand, parseArgs, shouldRunSettingsOnlyStartup, shouldStartApp } from './args';
import {
hasExplicitCommand,
parseArgs,
shouldRunSettingsOnlyStartup,
shouldStartApp,
} from './args';
test('parseArgs parses booleans and value flags', () => {
const args = parseArgs([
@@ -148,10 +153,7 @@ test('hasExplicitCommand and shouldStartApp preserve command intent', () => {
'/tmp/subminer-jf-response.json',
]);
assert.equal(jellyfinPreviewAuth.jellyfinPreviewAuth, true);
assert.equal(
jellyfinPreviewAuth.jellyfinResponsePath,
'/tmp/subminer-jf-response.json',
);
assert.equal(jellyfinPreviewAuth.jellyfinResponsePath, '/tmp/subminer-jf-response.json');
assert.equal(hasExplicitCommand(jellyfinPreviewAuth), true);
assert.equal(shouldStartApp(jellyfinPreviewAuth), false);

View File

@@ -240,7 +240,9 @@ export function parseArgs(argv: string[]): CliArgs {
if (value === 'true' || value === '1' || value === 'yes') args.jellyfinRecursive = true;
if (value === 'false' || value === '0' || value === 'no') args.jellyfinRecursive = false;
} else if (arg === '--jellyfin-recursive') {
const value = readValue(argv[i + 1])?.trim().toLowerCase();
const value = readValue(argv[i + 1])
?.trim()
.toLowerCase();
if (value === 'false' || value === '0' || value === 'no') {
args.jellyfinRecursive = false;
} else if (value === 'true' || value === '1' || value === 'yes') {