mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-03-20 12:11:28 -07:00
style: restore repo formatting
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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;
|
||||
}> {
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user