mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-07 13:08:54 -07:00
fix(stats): start stats server on background app launch (#144)
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
type: fixed
|
||||||
|
area: stats
|
||||||
|
|
||||||
|
- `subminer app` background launches now start the stats server automatically when `stats.autoStartServer` is enabled, and skip startup when a background stats server is already running.
|
||||||
@@ -95,7 +95,7 @@ Stats server config lives under `stats`:
|
|||||||
|
|
||||||
- `toggleKey` is overlay-local, not a system-wide shortcut.
|
- `toggleKey` is overlay-local, not a system-wide shortcut.
|
||||||
- `serverPort` controls the localhost dashboard URL.
|
- `serverPort` controls the localhost dashboard URL.
|
||||||
- `autoStartServer` starts the local stats HTTP server on launch once immersion tracking is active, or reuses the dedicated background stats server when one is already running.
|
- `autoStartServer` starts the local stats HTTP server on launch once immersion tracking is active, or reuses the dedicated background stats server when one is already running. Background app launches (`subminer app`) start the stats server immediately, registering it so later launches reuse it instead of starting another one.
|
||||||
- `autoOpenBrowser` controls whether `subminer stats` launches the dashboard URL in your browser after ensuring the server is running.
|
- `autoOpenBrowser` controls whether `subminer stats` launches the dashboard URL in your browser after ensuring the server is running.
|
||||||
- `subminer stats` forces the dashboard server to start even when `autoStartServer` is `false`.
|
- `subminer stats` forces the dashboard server to start even when `autoStartServer` is `false`.
|
||||||
- `subminer stats -b` starts or reuses the dedicated background stats daemon and exits after startup acknowledgement.
|
- `subminer stats -b` starts or reuses the dedicated background stats daemon and exits after startup acknowledgement.
|
||||||
|
|||||||
@@ -374,6 +374,46 @@ test('handleCliCommand processes --start for second-instance when overlay runtim
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('handleCliCommand ensures background stats server for initial --start --background', () => {
|
||||||
|
const ensured: number[] = [];
|
||||||
|
const { deps } = createDeps({
|
||||||
|
ensureBackgroundStatsServer: () => {
|
||||||
|
ensured.push(1);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
handleCliCommand(makeArgs({ start: true, background: true }), 'initial', deps);
|
||||||
|
|
||||||
|
assert.equal(ensured.length, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('handleCliCommand ensures background stats server for second-instance --start --background', () => {
|
||||||
|
const ensured: number[] = [];
|
||||||
|
const { deps } = createDeps({
|
||||||
|
isOverlayRuntimeInitialized: () => true,
|
||||||
|
ensureBackgroundStatsServer: () => {
|
||||||
|
ensured.push(1);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
handleCliCommand(makeArgs({ start: true, background: true }), 'second-instance', deps);
|
||||||
|
|
||||||
|
assert.equal(ensured.length, 1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('handleCliCommand does not ensure background stats server for foreground --start', () => {
|
||||||
|
const ensured: number[] = [];
|
||||||
|
const { deps } = createDeps({
|
||||||
|
ensureBackgroundStatsServer: () => {
|
||||||
|
ensured.push(1);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
handleCliCommand(makeArgs({ start: true }), 'initial', deps);
|
||||||
|
|
||||||
|
assert.equal(ensured.length, 0);
|
||||||
|
});
|
||||||
|
|
||||||
test('handleCliCommand forces setup open for second-instance setup command', () => {
|
test('handleCliCommand forces setup open for second-instance setup command', () => {
|
||||||
const { deps, calls } = createDeps();
|
const { deps, calls } = createDeps();
|
||||||
|
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ export interface CliCommandServiceDeps {
|
|||||||
mode: NonNullable<CliArgs['youtubeMode']>;
|
mode: NonNullable<CliArgs['youtubeMode']>;
|
||||||
source: CliCommandSource;
|
source: CliCommandSource;
|
||||||
}) => Promise<void>;
|
}) => Promise<void>;
|
||||||
|
ensureBackgroundStatsServer?: () => void;
|
||||||
printHelp: () => void;
|
printHelp: () => void;
|
||||||
hasMainWindow: () => boolean;
|
hasMainWindow: () => boolean;
|
||||||
getMultiCopyTimeoutMs: () => number;
|
getMultiCopyTimeoutMs: () => number;
|
||||||
@@ -185,6 +186,7 @@ interface AnilistCliRuntime {
|
|||||||
interface AppCliRuntime {
|
interface AppCliRuntime {
|
||||||
stop: () => void;
|
stop: () => void;
|
||||||
hasMainWindow: () => boolean;
|
hasMainWindow: () => boolean;
|
||||||
|
ensureBackgroundStatsServer?: () => void;
|
||||||
runUpdateCommand: CliCommandServiceDeps['runUpdateCommand'];
|
runUpdateCommand: CliCommandServiceDeps['runUpdateCommand'];
|
||||||
runEnsureLinuxRuntimePluginAssetsCommand: CliCommandServiceDeps['runEnsureLinuxRuntimePluginAssetsCommand'];
|
runEnsureLinuxRuntimePluginAssetsCommand: CliCommandServiceDeps['runEnsureLinuxRuntimePluginAssetsCommand'];
|
||||||
runYoutubePlaybackFlow: CliCommandServiceDeps['runYoutubePlaybackFlow'];
|
runYoutubePlaybackFlow: CliCommandServiceDeps['runYoutubePlaybackFlow'];
|
||||||
@@ -299,6 +301,7 @@ export function createCliCommandDepsRuntime(
|
|||||||
runUpdateCommand: options.app.runUpdateCommand,
|
runUpdateCommand: options.app.runUpdateCommand,
|
||||||
runEnsureLinuxRuntimePluginAssetsCommand: options.app.runEnsureLinuxRuntimePluginAssetsCommand,
|
runEnsureLinuxRuntimePluginAssetsCommand: options.app.runEnsureLinuxRuntimePluginAssetsCommand,
|
||||||
runYoutubePlaybackFlow: options.app.runYoutubePlaybackFlow,
|
runYoutubePlaybackFlow: options.app.runYoutubePlaybackFlow,
|
||||||
|
ensureBackgroundStatsServer: options.app.ensureBackgroundStatsServer,
|
||||||
printHelp: options.ui.printHelp,
|
printHelp: options.ui.printHelp,
|
||||||
hasMainWindow: options.app.hasMainWindow,
|
hasMainWindow: options.app.hasMainWindow,
|
||||||
getMultiCopyTimeoutMs: options.getMultiCopyTimeoutMs,
|
getMultiCopyTimeoutMs: options.getMultiCopyTimeoutMs,
|
||||||
@@ -393,6 +396,10 @@ export function handleCliCommand(
|
|||||||
deps.log(`Starting MPV IPC connection on socket: ${socketPath}`);
|
deps.log(`Starting MPV IPC connection on socket: ${socketPath}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args.start && args.background) {
|
||||||
|
deps.ensureBackgroundStatsServer?.();
|
||||||
|
}
|
||||||
|
|
||||||
if (args.sessionAction) {
|
if (args.sessionAction) {
|
||||||
dispatchCliSessionAction(
|
dispatchCliSessionAction(
|
||||||
args.sessionAction,
|
args.sessionAction,
|
||||||
|
|||||||
+10
@@ -37,6 +37,7 @@ import { createAniSkipRuntime } from './main/runtime/aniskip-runtime';
|
|||||||
import { resolveAniSkipMetadataForFile } from './main/runtime/aniskip-metadata';
|
import { resolveAniSkipMetadataForFile } from './main/runtime/aniskip-metadata';
|
||||||
import { createDiscordRpcClient } from './main/runtime/discord-rpc-client.js';
|
import { createDiscordRpcClient } from './main/runtime/discord-rpc-client.js';
|
||||||
import { startAppControlServer } from './main/runtime/app-control-server';
|
import { startAppControlServer } from './main/runtime/app-control-server';
|
||||||
|
import { createEnsureBackgroundStatsServerHandler } from './main/runtime/background-stats-startup';
|
||||||
import {
|
import {
|
||||||
markJellyfinRemotePlaybackLoaded as markJellyfinRemotePlaybackLoadedState,
|
markJellyfinRemotePlaybackLoaded as markJellyfinRemotePlaybackLoadedState,
|
||||||
shouldAutoLoadSecondarySubTrackForJellyfinPlayback,
|
shouldAutoLoadSecondarySubTrackForJellyfinPlayback,
|
||||||
@@ -4069,6 +4070,14 @@ const statsStartupRuntime = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
const ensureBackgroundStatsServer = createEnsureBackgroundStatsServerHandler({
|
||||||
|
isStatsAutoStartEnabled: () => getResolvedConfig().stats.autoStartServer,
|
||||||
|
isImmersionTrackingEnabled: () => getResolvedConfig().immersionTracking?.enabled !== false,
|
||||||
|
ensureBackgroundStatsServerStarted: () =>
|
||||||
|
statsStartupRuntime.ensureBackgroundStatsServerStarted(),
|
||||||
|
logInfo: (message) => logger.info(message),
|
||||||
|
logWarn: (message, error) => logger.warn(message, error),
|
||||||
|
});
|
||||||
|
|
||||||
const runStatsCliCommand = createRunStatsCliCommandHandler({
|
const runStatsCliCommand = createRunStatsCliCommandHandler({
|
||||||
getResolvedConfig: () => getResolvedConfig(),
|
getResolvedConfig: () => getResolvedConfig(),
|
||||||
@@ -5965,6 +5974,7 @@ const { handleCliCommand, handleInitialArgs } = composeCliStartupHandlers({
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
runYoutubePlaybackFlow: (request) => youtubePlaybackRuntime.runYoutubePlaybackFlow(request),
|
runYoutubePlaybackFlow: (request) => youtubePlaybackRuntime.runYoutubePlaybackFlow(request),
|
||||||
|
ensureBackgroundStatsServer: () => ensureBackgroundStatsServer(),
|
||||||
openYomitanSettings: () => openYomitanSettings(),
|
openYomitanSettings: () => openYomitanSettings(),
|
||||||
openConfigSettingsWindow: () => openConfigSettingsWindow(),
|
openConfigSettingsWindow: () => openConfigSettingsWindow(),
|
||||||
cycleSecondarySubMode: () => handleCycleSecondarySubMode(),
|
cycleSecondarySubMode: () => handleCycleSecondarySubMode(),
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ export interface CliCommandRuntimeServiceContext {
|
|||||||
runUpdateCommand: CliCommandRuntimeServiceDepsParams['app']['runUpdateCommand'];
|
runUpdateCommand: CliCommandRuntimeServiceDepsParams['app']['runUpdateCommand'];
|
||||||
runEnsureLinuxRuntimePluginAssetsCommand: CliCommandRuntimeServiceDepsParams['app']['runEnsureLinuxRuntimePluginAssetsCommand'];
|
runEnsureLinuxRuntimePluginAssetsCommand: CliCommandRuntimeServiceDepsParams['app']['runEnsureLinuxRuntimePluginAssetsCommand'];
|
||||||
runYoutubePlaybackFlow: CliCommandRuntimeServiceDepsParams['app']['runYoutubePlaybackFlow'];
|
runYoutubePlaybackFlow: CliCommandRuntimeServiceDepsParams['app']['runYoutubePlaybackFlow'];
|
||||||
|
ensureBackgroundStatsServer?: CliCommandRuntimeServiceDepsParams['app']['ensureBackgroundStatsServer'];
|
||||||
openYomitanSettings: () => void;
|
openYomitanSettings: () => void;
|
||||||
openConfigSettingsWindow: () => void;
|
openConfigSettingsWindow: () => void;
|
||||||
cycleSecondarySubMode: () => void;
|
cycleSecondarySubMode: () => void;
|
||||||
@@ -124,6 +125,7 @@ function createCliCommandDepsFromContext(
|
|||||||
app: {
|
app: {
|
||||||
stop: context.stopApp,
|
stop: context.stopApp,
|
||||||
hasMainWindow: context.hasMainWindow,
|
hasMainWindow: context.hasMainWindow,
|
||||||
|
ensureBackgroundStatsServer: context.ensureBackgroundStatsServer,
|
||||||
runUpdateCommand: context.runUpdateCommand,
|
runUpdateCommand: context.runUpdateCommand,
|
||||||
runEnsureLinuxRuntimePluginAssetsCommand: context.runEnsureLinuxRuntimePluginAssetsCommand,
|
runEnsureLinuxRuntimePluginAssetsCommand: context.runEnsureLinuxRuntimePluginAssetsCommand,
|
||||||
runYoutubePlaybackFlow: context.runYoutubePlaybackFlow,
|
runYoutubePlaybackFlow: context.runYoutubePlaybackFlow,
|
||||||
|
|||||||
@@ -200,6 +200,7 @@ export interface CliCommandRuntimeServiceDepsParams {
|
|||||||
app: {
|
app: {
|
||||||
stop: CliCommandDepsRuntimeOptions['app']['stop'];
|
stop: CliCommandDepsRuntimeOptions['app']['stop'];
|
||||||
hasMainWindow: CliCommandDepsRuntimeOptions['app']['hasMainWindow'];
|
hasMainWindow: CliCommandDepsRuntimeOptions['app']['hasMainWindow'];
|
||||||
|
ensureBackgroundStatsServer?: CliCommandDepsRuntimeOptions['app']['ensureBackgroundStatsServer'];
|
||||||
runUpdateCommand: CliCommandDepsRuntimeOptions['app']['runUpdateCommand'];
|
runUpdateCommand: CliCommandDepsRuntimeOptions['app']['runUpdateCommand'];
|
||||||
runEnsureLinuxRuntimePluginAssetsCommand: CliCommandDepsRuntimeOptions['app']['runEnsureLinuxRuntimePluginAssetsCommand'];
|
runEnsureLinuxRuntimePluginAssetsCommand: CliCommandDepsRuntimeOptions['app']['runEnsureLinuxRuntimePluginAssetsCommand'];
|
||||||
runYoutubePlaybackFlow: CliCommandDepsRuntimeOptions['app']['runYoutubePlaybackFlow'];
|
runYoutubePlaybackFlow: CliCommandDepsRuntimeOptions['app']['runYoutubePlaybackFlow'];
|
||||||
@@ -402,6 +403,7 @@ export function createCliCommandRuntimeServiceDeps(
|
|||||||
app: {
|
app: {
|
||||||
stop: params.app.stop,
|
stop: params.app.stop,
|
||||||
hasMainWindow: params.app.hasMainWindow,
|
hasMainWindow: params.app.hasMainWindow,
|
||||||
|
ensureBackgroundStatsServer: params.app.ensureBackgroundStatsServer,
|
||||||
runUpdateCommand: params.app.runUpdateCommand,
|
runUpdateCommand: params.app.runUpdateCommand,
|
||||||
runEnsureLinuxRuntimePluginAssetsCommand: params.app.runEnsureLinuxRuntimePluginAssetsCommand,
|
runEnsureLinuxRuntimePluginAssetsCommand: params.app.runEnsureLinuxRuntimePluginAssetsCommand,
|
||||||
runYoutubePlaybackFlow: params.app.runYoutubePlaybackFlow,
|
runYoutubePlaybackFlow: params.app.runYoutubePlaybackFlow,
|
||||||
|
|||||||
@@ -0,0 +1,78 @@
|
|||||||
|
import test from 'node:test';
|
||||||
|
import assert from 'node:assert/strict';
|
||||||
|
import { createEnsureBackgroundStatsServerHandler } from './background-stats-startup';
|
||||||
|
|
||||||
|
function createDeps(
|
||||||
|
overrides: Partial<Parameters<typeof createEnsureBackgroundStatsServerHandler>[0]> = {},
|
||||||
|
) {
|
||||||
|
const calls: string[] = [];
|
||||||
|
const deps: Parameters<typeof createEnsureBackgroundStatsServerHandler>[0] = {
|
||||||
|
isStatsAutoStartEnabled: () => true,
|
||||||
|
isImmersionTrackingEnabled: () => true,
|
||||||
|
ensureBackgroundStatsServerStarted: () => {
|
||||||
|
calls.push('ensureBackgroundStatsServerStarted');
|
||||||
|
return { url: 'http://127.0.0.1:3888', runningInCurrentProcess: true };
|
||||||
|
},
|
||||||
|
logInfo: (message) => {
|
||||||
|
calls.push(`info:${message}`);
|
||||||
|
},
|
||||||
|
logWarn: (message) => {
|
||||||
|
calls.push(`warn:${message}`);
|
||||||
|
},
|
||||||
|
...overrides,
|
||||||
|
};
|
||||||
|
return { deps, calls };
|
||||||
|
}
|
||||||
|
|
||||||
|
test('ensures background stats server and logs local startup', () => {
|
||||||
|
const { deps, calls } = createDeps();
|
||||||
|
|
||||||
|
createEnsureBackgroundStatsServerHandler(deps)();
|
||||||
|
|
||||||
|
assert.ok(calls.includes('ensureBackgroundStatsServerStarted'));
|
||||||
|
assert.ok(
|
||||||
|
calls.some((value) => value.startsWith('info:') && value.includes('http://127.0.0.1:3888')),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('logs reuse when a background stats server is already running', () => {
|
||||||
|
const { deps, calls } = createDeps({
|
||||||
|
ensureBackgroundStatsServerStarted: () => ({
|
||||||
|
url: 'http://127.0.0.1:3888',
|
||||||
|
runningInCurrentProcess: false,
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
|
||||||
|
createEnsureBackgroundStatsServerHandler(deps)();
|
||||||
|
|
||||||
|
assert.ok(
|
||||||
|
calls.some((value) => value.startsWith('info:') && /already running|reusing/i.test(value)),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('skips when stats.autoStartServer is disabled', () => {
|
||||||
|
const { deps, calls } = createDeps({ isStatsAutoStartEnabled: () => false });
|
||||||
|
|
||||||
|
createEnsureBackgroundStatsServerHandler(deps)();
|
||||||
|
|
||||||
|
assert.equal(calls.includes('ensureBackgroundStatsServerStarted'), false);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('skips when immersion tracking is disabled', () => {
|
||||||
|
const { deps, calls } = createDeps({ isImmersionTrackingEnabled: () => false });
|
||||||
|
|
||||||
|
createEnsureBackgroundStatsServerHandler(deps)();
|
||||||
|
|
||||||
|
assert.equal(calls.includes('ensureBackgroundStatsServerStarted'), false);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('logs a warning instead of throwing when startup fails', () => {
|
||||||
|
const { deps, calls } = createDeps({
|
||||||
|
ensureBackgroundStatsServerStarted: () => {
|
||||||
|
throw new Error('port in use');
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
assert.doesNotThrow(() => createEnsureBackgroundStatsServerHandler(deps)());
|
||||||
|
assert.ok(calls.some((value) => value.startsWith('warn:')));
|
||||||
|
});
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
export interface EnsureBackgroundStatsServerDeps {
|
||||||
|
isStatsAutoStartEnabled: () => boolean;
|
||||||
|
isImmersionTrackingEnabled: () => boolean;
|
||||||
|
ensureBackgroundStatsServerStarted: () => {
|
||||||
|
url: string;
|
||||||
|
runningInCurrentProcess: boolean;
|
||||||
|
};
|
||||||
|
logInfo: (message: string) => void;
|
||||||
|
logWarn: (message: string, error?: unknown) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createEnsureBackgroundStatsServerHandler(
|
||||||
|
deps: EnsureBackgroundStatsServerDeps,
|
||||||
|
): () => void {
|
||||||
|
return () => {
|
||||||
|
if (!deps.isStatsAutoStartEnabled()) {
|
||||||
|
deps.logInfo('Background start: stats.autoStartServer is disabled; skipping stats server.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!deps.isImmersionTrackingEnabled()) {
|
||||||
|
deps.logInfo('Background start: immersion tracking is disabled; skipping stats server.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
const result = deps.ensureBackgroundStatsServerStarted();
|
||||||
|
deps.logInfo(
|
||||||
|
result.runningInCurrentProcess
|
||||||
|
? `Background start: stats server started at ${result.url}.`
|
||||||
|
: `Background start: stats server already running at ${result.url}; skipping.`,
|
||||||
|
);
|
||||||
|
} catch (error) {
|
||||||
|
deps.logWarn('Background start: failed to start stats server.', error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -45,6 +45,7 @@ export function createBuildCliCommandContextDepsHandler(deps: {
|
|||||||
runUpdateCommand: CliCommandContextFactoryDeps['runUpdateCommand'];
|
runUpdateCommand: CliCommandContextFactoryDeps['runUpdateCommand'];
|
||||||
runEnsureLinuxRuntimePluginAssetsCommand: CliCommandContextFactoryDeps['runEnsureLinuxRuntimePluginAssetsCommand'];
|
runEnsureLinuxRuntimePluginAssetsCommand: CliCommandContextFactoryDeps['runEnsureLinuxRuntimePluginAssetsCommand'];
|
||||||
runYoutubePlaybackFlow: CliCommandContextFactoryDeps['runYoutubePlaybackFlow'];
|
runYoutubePlaybackFlow: CliCommandContextFactoryDeps['runYoutubePlaybackFlow'];
|
||||||
|
ensureBackgroundStatsServer?: CliCommandContextFactoryDeps['ensureBackgroundStatsServer'];
|
||||||
openYomitanSettings: () => void;
|
openYomitanSettings: () => void;
|
||||||
openConfigSettingsWindow: () => void;
|
openConfigSettingsWindow: () => void;
|
||||||
cycleSecondarySubMode: () => void;
|
cycleSecondarySubMode: () => void;
|
||||||
@@ -103,6 +104,7 @@ export function createBuildCliCommandContextDepsHandler(deps: {
|
|||||||
runUpdateCommand: deps.runUpdateCommand,
|
runUpdateCommand: deps.runUpdateCommand,
|
||||||
runEnsureLinuxRuntimePluginAssetsCommand: deps.runEnsureLinuxRuntimePluginAssetsCommand,
|
runEnsureLinuxRuntimePluginAssetsCommand: deps.runEnsureLinuxRuntimePluginAssetsCommand,
|
||||||
runYoutubePlaybackFlow: deps.runYoutubePlaybackFlow,
|
runYoutubePlaybackFlow: deps.runYoutubePlaybackFlow,
|
||||||
|
ensureBackgroundStatsServer: deps.ensureBackgroundStatsServer,
|
||||||
openYomitanSettings: deps.openYomitanSettings,
|
openYomitanSettings: deps.openYomitanSettings,
|
||||||
openConfigSettingsWindow: deps.openConfigSettingsWindow,
|
openConfigSettingsWindow: deps.openConfigSettingsWindow,
|
||||||
cycleSecondarySubMode: deps.cycleSecondarySubMode,
|
cycleSecondarySubMode: deps.cycleSecondarySubMode,
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ export function createBuildCliCommandContextMainDepsHandler(deps: {
|
|||||||
source: CliCommandSource,
|
source: CliCommandSource,
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
runYoutubePlaybackFlow: CliCommandContextFactoryDeps['runYoutubePlaybackFlow'];
|
runYoutubePlaybackFlow: CliCommandContextFactoryDeps['runYoutubePlaybackFlow'];
|
||||||
|
ensureBackgroundStatsServer?: CliCommandContextFactoryDeps['ensureBackgroundStatsServer'];
|
||||||
|
|
||||||
openYomitanSettings: () => void;
|
openYomitanSettings: () => void;
|
||||||
openConfigSettingsWindow: () => void;
|
openConfigSettingsWindow: () => void;
|
||||||
@@ -140,6 +141,7 @@ export function createBuildCliCommandContextMainDepsHandler(deps: {
|
|||||||
runEnsureLinuxRuntimePluginAssetsCommand: (args: CliArgs, source: CliCommandSource) =>
|
runEnsureLinuxRuntimePluginAssetsCommand: (args: CliArgs, source: CliCommandSource) =>
|
||||||
deps.runEnsureLinuxRuntimePluginAssetsCommand(args, source),
|
deps.runEnsureLinuxRuntimePluginAssetsCommand(args, source),
|
||||||
runYoutubePlaybackFlow: (request) => deps.runYoutubePlaybackFlow(request),
|
runYoutubePlaybackFlow: (request) => deps.runYoutubePlaybackFlow(request),
|
||||||
|
ensureBackgroundStatsServer: deps.ensureBackgroundStatsServer,
|
||||||
openYomitanSettings: () => deps.openYomitanSettings(),
|
openYomitanSettings: () => deps.openYomitanSettings(),
|
||||||
openConfigSettingsWindow: () => deps.openConfigSettingsWindow(),
|
openConfigSettingsWindow: () => deps.openConfigSettingsWindow(),
|
||||||
cycleSecondarySubMode: () => deps.cycleSecondarySubMode(),
|
cycleSecondarySubMode: () => deps.cycleSecondarySubMode(),
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ export type CliCommandContextFactoryDeps = {
|
|||||||
runUpdateCommand: CliCommandRuntimeServiceContext['runUpdateCommand'];
|
runUpdateCommand: CliCommandRuntimeServiceContext['runUpdateCommand'];
|
||||||
runEnsureLinuxRuntimePluginAssetsCommand: CliCommandRuntimeServiceContext['runEnsureLinuxRuntimePluginAssetsCommand'];
|
runEnsureLinuxRuntimePluginAssetsCommand: CliCommandRuntimeServiceContext['runEnsureLinuxRuntimePluginAssetsCommand'];
|
||||||
runYoutubePlaybackFlow: CliCommandRuntimeServiceContext['runYoutubePlaybackFlow'];
|
runYoutubePlaybackFlow: CliCommandRuntimeServiceContext['runYoutubePlaybackFlow'];
|
||||||
|
ensureBackgroundStatsServer?: CliCommandRuntimeServiceContext['ensureBackgroundStatsServer'];
|
||||||
openYomitanSettings: () => void;
|
openYomitanSettings: () => void;
|
||||||
openConfigSettingsWindow: () => void;
|
openConfigSettingsWindow: () => void;
|
||||||
cycleSecondarySubMode: () => void;
|
cycleSecondarySubMode: () => void;
|
||||||
@@ -130,6 +131,7 @@ export function createCliCommandContext(
|
|||||||
runUpdateCommand: deps.runUpdateCommand,
|
runUpdateCommand: deps.runUpdateCommand,
|
||||||
runEnsureLinuxRuntimePluginAssetsCommand: deps.runEnsureLinuxRuntimePluginAssetsCommand,
|
runEnsureLinuxRuntimePluginAssetsCommand: deps.runEnsureLinuxRuntimePluginAssetsCommand,
|
||||||
runYoutubePlaybackFlow: deps.runYoutubePlaybackFlow,
|
runYoutubePlaybackFlow: deps.runYoutubePlaybackFlow,
|
||||||
|
ensureBackgroundStatsServer: deps.ensureBackgroundStatsServer,
|
||||||
openYomitanSettings: deps.openYomitanSettings,
|
openYomitanSettings: deps.openYomitanSettings,
|
||||||
openConfigSettingsWindow: deps.openConfigSettingsWindow,
|
openConfigSettingsWindow: deps.openConfigSettingsWindow,
|
||||||
cycleSecondarySubMode: deps.cycleSecondarySubMode,
|
cycleSecondarySubMode: deps.cycleSecondarySubMode,
|
||||||
|
|||||||
Reference in New Issue
Block a user