refactor: share Android and firmware provider factories (#826)
This commit is contained in:
@@ -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);
|
||||
@@ -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);
|
||||
Reference in New Issue
Block a user