mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-11-25 04:46:06 -08:00
refactor(main): drop pass-through main-deps builders (#306)
* refactor(main): drop mining/anki main-deps builders * refactor(anilist): drop main-deps builders * refactor(jellyfin): drop main-deps builders * refactor(overlay): drop overlay and shortcut main-deps builders * refactor(main): drop ipc, tray, and osd main-deps builders * refactor(startup): drop startup main-deps builders * test(scripts): ignore stray local requests in AUR download test Also apply prettier to launcher/mpv.test.ts so format:check:src passes. * fix(shortcuts): forward overlay numeric selection hooks through the composer composeShortcutRuntimes only passed the digit callbacks, so the visible-overlay selection added in #78 never ran from the multi-copy/mine-sentence shortcuts. * fix(stats): skip mpv auto-connect when stats starts the immersion tracker The immersion-startup main-deps builder never forwarded shouldAutoConnectMpv, so background stats and stats CLI startup always connected to mpv. Drop the builder and pass the deps straight to the handler. * build(deps): bump follow-redirects override to 1.16.2 Resolves GHSA-mrwp-f3q8-3g9p (high), which fails the quality-gate bun audit --audit-level high step. * test(subtitles): cover the null-tokenization settle path in prefetch test The mock ignored the value the test resolved, so the null case never ran. * test(e2e): surface mpv crashes and install current mpv on macOS CI The harness IPC client never handled socket close, so a crashed mpv left commands pending until the 120s test timeout with an empty mpv.log. Reject pending commands on close, write mpv's own log via --log-file, and refresh Homebrew on macOS CI so the installed mpv build no longer depends on the runner image. * test(e2e): render mpv through cocoa-cb OpenGL on macOS mpv 0.41.0_12 with libplacebo 7.387.0 segfaults in gpu-next's MoltenVK path on GitHub's paravirtual macOS GPU on the first frame, so the E2E session never started. * test(e2e): name mpv-stdio.log in the mpv close diagnostic
This commit is contained in:
1 parent
0129e03c0f
commit
2a0e931325
84 files changed
+719
-2754
No files matched your search
@@ -1,15 +1,4 @@
|
||||
import {
|
||||
createBuildEnsureAnilistMediaGuessMainDepsHandler,
|
||||
createBuildGetAnilistMediaGuessRuntimeStateMainDepsHandler,
|
||||
createBuildGetCurrentAnilistMediaKeyMainDepsHandler,
|
||||
createBuildMaybeProbeAnilistDurationMainDepsHandler,
|
||||
createBuildMaybeRunAnilistPostWatchUpdateMainDepsHandler,
|
||||
createBuildProcessNextAnilistRetryUpdateMainDepsHandler,
|
||||
createBuildRecordAnilistMediaDurationMainDepsHandler,
|
||||
createBuildRefreshAnilistClientSecretStateMainDepsHandler,
|
||||
createBuildResetAnilistMediaGuessStateMainDepsHandler,
|
||||
createBuildResetAnilistMediaTrackingMainDepsHandler,
|
||||
createBuildSetAnilistMediaGuessRuntimeStateMainDepsHandler,
|
||||
createEnsureAnilistMediaGuessHandler,
|
||||
createGetAnilistMediaGuessRuntimeStateHandler,
|
||||
createGetCurrentAnilistMediaKeyHandler,
|
||||
@@ -25,36 +14,22 @@ import {
|
||||
import type { ComposerInputs, ComposerOutputs } from './contracts';
|
||||
|
||||
export type AnilistTrackingComposerOptions = ComposerInputs<{
|
||||
refreshClientSecretMainDeps: Parameters<
|
||||
typeof createBuildRefreshAnilistClientSecretStateMainDepsHandler
|
||||
>[0];
|
||||
getCurrentMediaKeyMainDeps: Parameters<
|
||||
typeof createBuildGetCurrentAnilistMediaKeyMainDepsHandler
|
||||
>[0];
|
||||
resetMediaTrackingMainDeps: Parameters<
|
||||
typeof createBuildResetAnilistMediaTrackingMainDepsHandler
|
||||
>[0];
|
||||
refreshClientSecretMainDeps: Parameters<typeof createRefreshAnilistClientSecretStateHandler>[0];
|
||||
getCurrentMediaKeyMainDeps: Parameters<typeof createGetCurrentAnilistMediaKeyHandler>[0];
|
||||
resetMediaTrackingMainDeps: Parameters<typeof createResetAnilistMediaTrackingHandler>[0];
|
||||
getMediaGuessRuntimeStateMainDeps: Parameters<
|
||||
typeof createBuildGetAnilistMediaGuessRuntimeStateMainDepsHandler
|
||||
typeof createGetAnilistMediaGuessRuntimeStateHandler
|
||||
>[0];
|
||||
setMediaGuessRuntimeStateMainDeps: Parameters<
|
||||
typeof createBuildSetAnilistMediaGuessRuntimeStateMainDepsHandler
|
||||
>[0];
|
||||
recordMediaDurationMainDeps: Parameters<
|
||||
typeof createBuildRecordAnilistMediaDurationMainDepsHandler
|
||||
>[0];
|
||||
resetMediaGuessStateMainDeps: Parameters<
|
||||
typeof createBuildResetAnilistMediaGuessStateMainDepsHandler
|
||||
>[0];
|
||||
maybeProbeDurationMainDeps: Parameters<
|
||||
typeof createBuildMaybeProbeAnilistDurationMainDepsHandler
|
||||
>[0];
|
||||
ensureMediaGuessMainDeps: Parameters<typeof createBuildEnsureAnilistMediaGuessMainDepsHandler>[0];
|
||||
processNextRetryUpdateMainDeps: Parameters<
|
||||
typeof createBuildProcessNextAnilistRetryUpdateMainDepsHandler
|
||||
typeof createSetAnilistMediaGuessRuntimeStateHandler
|
||||
>[0];
|
||||
recordMediaDurationMainDeps: Parameters<typeof createRecordAnilistMediaDurationHandler>[0];
|
||||
resetMediaGuessStateMainDeps: Parameters<typeof createResetAnilistMediaGuessStateHandler>[0];
|
||||
maybeProbeDurationMainDeps: Parameters<typeof createMaybeProbeAnilistDurationHandler>[0];
|
||||
ensureMediaGuessMainDeps: Parameters<typeof createEnsureAnilistMediaGuessHandler>[0];
|
||||
processNextRetryUpdateMainDeps: Parameters<typeof createProcessNextAnilistRetryUpdateHandler>[0];
|
||||
maybeRunPostWatchUpdateMainDeps: Parameters<
|
||||
typeof createBuildMaybeRunAnilistPostWatchUpdateMainDepsHandler
|
||||
typeof createMaybeRunAnilistPostWatchUpdateHandler
|
||||
>[0];
|
||||
}>;
|
||||
|
||||
@@ -80,47 +55,37 @@ export function composeAnilistTrackingHandlers(
|
||||
options: AnilistTrackingComposerOptions,
|
||||
): AnilistTrackingComposerResult {
|
||||
const refreshAnilistClientSecretState = createRefreshAnilistClientSecretStateHandler(
|
||||
createBuildRefreshAnilistClientSecretStateMainDepsHandler(
|
||||
options.refreshClientSecretMainDeps,
|
||||
)(),
|
||||
options.refreshClientSecretMainDeps,
|
||||
);
|
||||
const getCurrentAnilistMediaKey = createGetCurrentAnilistMediaKeyHandler(
|
||||
createBuildGetCurrentAnilistMediaKeyMainDepsHandler(options.getCurrentMediaKeyMainDeps)(),
|
||||
options.getCurrentMediaKeyMainDeps,
|
||||
);
|
||||
const resetAnilistMediaTracking = createResetAnilistMediaTrackingHandler(
|
||||
createBuildResetAnilistMediaTrackingMainDepsHandler(options.resetMediaTrackingMainDeps)(),
|
||||
options.resetMediaTrackingMainDeps,
|
||||
);
|
||||
const getAnilistMediaGuessRuntimeState = createGetAnilistMediaGuessRuntimeStateHandler(
|
||||
createBuildGetAnilistMediaGuessRuntimeStateMainDepsHandler(
|
||||
options.getMediaGuessRuntimeStateMainDeps,
|
||||
)(),
|
||||
options.getMediaGuessRuntimeStateMainDeps,
|
||||
);
|
||||
const setAnilistMediaGuessRuntimeState = createSetAnilistMediaGuessRuntimeStateHandler(
|
||||
createBuildSetAnilistMediaGuessRuntimeStateMainDepsHandler(
|
||||
options.setMediaGuessRuntimeStateMainDeps,
|
||||
)(),
|
||||
options.setMediaGuessRuntimeStateMainDeps,
|
||||
);
|
||||
const recordAnilistMediaDuration = createRecordAnilistMediaDurationHandler(
|
||||
createBuildRecordAnilistMediaDurationMainDepsHandler(options.recordMediaDurationMainDeps)(),
|
||||
options.recordMediaDurationMainDeps,
|
||||
);
|
||||
const resetAnilistMediaGuessState = createResetAnilistMediaGuessStateHandler(
|
||||
createBuildResetAnilistMediaGuessStateMainDepsHandler(options.resetMediaGuessStateMainDeps)(),
|
||||
options.resetMediaGuessStateMainDeps,
|
||||
);
|
||||
const maybeProbeAnilistDuration = createMaybeProbeAnilistDurationHandler(
|
||||
createBuildMaybeProbeAnilistDurationMainDepsHandler(options.maybeProbeDurationMainDeps)(),
|
||||
options.maybeProbeDurationMainDeps,
|
||||
);
|
||||
const ensureAnilistMediaGuess = createEnsureAnilistMediaGuessHandler(
|
||||
createBuildEnsureAnilistMediaGuessMainDepsHandler(options.ensureMediaGuessMainDeps)(),
|
||||
options.ensureMediaGuessMainDeps,
|
||||
);
|
||||
const processNextAnilistRetryUpdate = createProcessNextAnilistRetryUpdateHandler(
|
||||
createBuildProcessNextAnilistRetryUpdateMainDepsHandler(
|
||||
options.processNextRetryUpdateMainDeps,
|
||||
)(),
|
||||
options.processNextRetryUpdateMainDeps,
|
||||
);
|
||||
const maybeRunAnilistPostWatchUpdate = createMaybeRunAnilistPostWatchUpdateHandler(
|
||||
createBuildMaybeRunAnilistPostWatchUpdateMainDepsHandler(
|
||||
options.maybeRunPostWatchUpdateMainDeps,
|
||||
)(),
|
||||
options.maybeRunPostWatchUpdateMainDeps,
|
||||
);
|
||||
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user