refactor(main): split main.ts into focused runtime modules (#123)

This commit is contained in:
2026-06-12 17:35:46 -07:00
committed by GitHub
parent 94a65416ae
commit 33e767458f
32 changed files with 3582 additions and 2003 deletions
@@ -0,0 +1,18 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { detectWindowsMpvPluginRemovalCandidates } from './first-run-setup-plugin';
test('Windows plugin removal candidates include portable directory installs', () => {
const mpvPath = 'C:\\tools\\mpv\\mpv.exe';
const portablePluginDir = 'C:\\tools\\mpv\\portable_config\\scripts\\subminer';
const existing = new Set([portablePluginDir]);
const candidates = detectWindowsMpvPluginRemovalCandidates({
homeDir: 'C:\\Users\\tester',
appDataDir: 'C:\\Users\\tester\\AppData\\Roaming',
mpvExecutablePath: mpvPath,
existsSync: (candidate) => existing.has(candidate),
});
assert.deepEqual(candidates, [{ path: portablePluginDir, kind: 'directory' }]);
});