refactor: share Android and firmware provider factories (#826)

This commit is contained in:
N0zoM1z0
2026-10-07 11:20:26 +08:00
committed by GitHub
parent 764ff05231
commit 3ed59b2812
13 changed files with 228 additions and 27 deletions
+9
View File
@@ -0,0 +1,9 @@
import type { AndroidAnalysisPort } from "../application/AndroidAnalysisPort.js";
import type { JadxLauncher } from "../android/JadxMcpTransport.js";
import { JadxProvider } from "../android/JadxProvider.js";
/** Construct one APK provider with its own queue and cleanup-failure state. */
export const createAndroidAnalysisProvider = (
environment: Readonly<Record<string, string | undefined>> = process.env,
launcher?: JadxLauncher,
): AndroidAnalysisPort => new JadxProvider(environment, launcher);
+9
View File
@@ -0,0 +1,9 @@
import type { FirmwareAnalysisPort } from "../application/FirmwareAnalysisPort.js";
import type { FirmwareLauncher } from "../firmware/FirmwareCommand.js";
import { FirmwareProvider } from "../firmware/FirmwareProvider.js";
/** Construct one firmware provider without launching or acquiring an engine. */
export const createFirmwareAnalysisProvider = (
environment: Readonly<Record<string, string | undefined>> = process.env,
launcher?: FirmwareLauncher,
): FirmwareAnalysisPort => new FirmwareProvider(environment, launcher);