style: restore repo formatting

This commit is contained in:
2026-03-09 18:10:32 -07:00
parent a34a7489db
commit fed60c265d
85 changed files with 641 additions and 143 deletions

View File

@@ -58,8 +58,7 @@ export function parseMacOSHelperOutput(result: string): MacOSHelperWindowState |
}
const focusedRaw = parts[4]?.trim().toLowerCase();
const focused =
focusedRaw === undefined ? true : focusedRaw === '1' || focusedRaw === 'true';
const focused = focusedRaw === undefined ? true : focusedRaw === '1' || focusedRaw === 'true';
return {
geometry: {

View File

@@ -64,16 +64,13 @@ function inferHelperKindFromPath(helperPath: string): WindowsTrackerHelperKind |
function materializeAsarHelper(
sourcePath: string,
kind: WindowsTrackerHelperKind,
deps: Required<
Pick<ResolveWindowsTrackerHelperOptions, 'mkdirSync' | 'copyFileSync'>
>,
deps: Required<Pick<ResolveWindowsTrackerHelperOptions, 'mkdirSync' | 'copyFileSync'>>,
): string | null {
if (!sourcePath.includes('.asar')) {
return sourcePath;
}
const fileName =
kind === 'native' ? 'get-mpv-window-windows.exe' : 'get-mpv-window-windows.ps1';
const fileName = kind === 'native' ? 'get-mpv-window-windows.exe' : 'get-mpv-window-windows.ps1';
const targetDir = windowsPath.join(os.tmpdir(), 'subminer', 'helpers');
const targetPath = windowsPath.join(targetDir, fileName);
@@ -130,7 +127,10 @@ function normalizeHelperPathOverride(
return { path: helperPath, kind };
}
function getHelperCandidates(dirname: string, resourcesPath: string | undefined): Array<{
function getHelperCandidates(
dirname: string,
resourcesPath: string | undefined,
): Array<{
path: string;
kind: WindowsTrackerHelperKind;
}> {

View File

@@ -48,8 +48,7 @@ function runHelperWithExecFile(
targetMpvSocketPath: string | null,
): Promise<WindowsTrackerRunnerResult> {
return new Promise((resolve, reject) => {
const modeArgs =
spec.kind === 'native' ? ['--mode', mode] : ['-Mode', mode];
const modeArgs = spec.kind === 'native' ? ['--mode', mode] : ['-Mode', mode];
const args = targetMpvSocketPath
? [...spec.args, ...modeArgs, targetMpvSocketPath]
: [...spec.args, ...modeArgs];