refactor(core): normalize core service naming

Standardize core service module and export names to reduce naming ambiguity and make imports predictable across runtime, tests, scripts, and docs.
This commit is contained in:
2026-02-17 01:18:10 -08:00
parent 25faf3ef3e
commit 37cc3a6b01
3 changed files with 18 additions and 19 deletions

View File

@@ -342,7 +342,6 @@ test("handleCliCommand runs AniList retry command", async () => {
assert.ok(calls.includes("retryAnilistQueue")); assert.ok(calls.includes("retryAnilistQueue"));
assert.ok(calls.includes("log:AniList retry processed.")); assert.ok(calls.includes("log:AniList retry processed."));
}); });
test("handleCliCommand runs refresh-known-words command", () => { test("handleCliCommand runs refresh-known-words command", () => {
const { deps, calls } = createDeps(); const { deps, calls } = createDeps();

View File

@@ -54,9 +54,9 @@ test("mineSentenceCard handles missing integration and disconnected mpv", async
assert.equal( assert.equal(
await mineSentenceCard({ await mineSentenceCard({
ankiIntegration: null, ankiIntegration: null,
mpvClient: null, mpvClient: null,
showMpvOsd: (text) => osd.push(text), showMpvOsd: (text) => osd.push(text),
}), }),
false, false,
); );
@@ -64,19 +64,19 @@ test("mineSentenceCard handles missing integration and disconnected mpv", async
assert.equal( assert.equal(
await mineSentenceCard({ await mineSentenceCard({
ankiIntegration: { ankiIntegration: {
updateLastAddedFromClipboard: async () => {}, updateLastAddedFromClipboard: async () => {},
triggerFieldGroupingForLastAddedCard: async () => {}, triggerFieldGroupingForLastAddedCard: async () => {},
markLastCardAsAudioCard: async () => {}, markLastCardAsAudioCard: async () => {},
createSentenceCard: async () => false, createSentenceCard: async () => false,
}, },
mpvClient: { mpvClient: {
connected: false, connected: false,
currentSubText: "line", currentSubText: "line",
currentSubStart: 1, currentSubStart: 1,
currentSubEnd: 2, currentSubEnd: 2,
}, },
showMpvOsd: (text) => osd.push(text), showMpvOsd: (text) => osd.push(text),
}), }),
false, false,
); );
@@ -180,7 +180,7 @@ test("handleMineSentenceDigit reports async create failures", async () => {
assert.equal(cardsMined, 0); assert.equal(cardsMined, 0);
}); });
test("handleMineSentenceDigitService increments successful card count", async () => { test("handleMineSentenceDigit increments successful card count", async () => {
const osd: string[] = []; const osd: string[] = [];
let cardsMined = 0; let cardsMined = 0;

View File

@@ -112,8 +112,8 @@ import {
loadYomitanExtension as loadYomitanExtensionCore, loadYomitanExtension as loadYomitanExtensionCore,
markLastCardAsAudioCard as markLastCardAsAudioCardCore, markLastCardAsAudioCard as markLastCardAsAudioCardCore,
DEFAULT_MPV_SUBTITLE_RENDER_METRICS, DEFAULT_MPV_SUBTITLE_RENDER_METRICS,
mineSentenceCard as mineSentenceCardCore,
ImmersionTrackerService, ImmersionTrackerService,
mineSentenceCard as mineSentenceCardCore,
openYomitanSettingsWindow, openYomitanSettingsWindow,
playNextSubtitleRuntime, playNextSubtitleRuntime,
registerGlobalShortcuts as registerGlobalShortcutsCore, registerGlobalShortcuts as registerGlobalShortcutsCore,