Files
reverse-engineering-anything/src/composition/webBundleAnalysisWorkerProcess.ts
T
morluto 9aca543f46 fix(browser): isolate web bundle analysis with bounded partial results
Run inert captured-script analysis in owned children with per-script and aggregate deadlines, bounded source/result transfer and explicit per-script coverage. Preserve completed facts and exact cleanup authority across cancellation, mixed descriptor/process failures and cross-consumer retry.

Share aggregate source admission across page and Electron capture, expose CLI/MCP resource controls and retain selected parameters in Evidence. Verified with controlled CDP public workflows, real owned Node failure controls and the reporter-matching ReactDOM UMD artifact; real Chrome/Electron and Windows/Bun remain unqualified.
2026-10-19 13:22:54 +08:00

18 lines
495 B
TypeScript

import { analyzeCapturedWebScript } from "../domain/webBundleAnalyzer.js";
import {
serveWebBundleAnalysisWorker,
type WebBundleScriptAnalyzer,
} from "../browser/WebBundleAnalysisWorkerServer.js";
const analyze: WebBundleScriptAnalyzer = (script) =>
analyzeCapturedWebScript(script);
try {
await serveWebBundleAnalysisWorker(analyze);
} catch (cause: unknown) {
process.stderr.write(
`${cause instanceof Error ? cause.message : String(cause)}\n`,
);
process.exitCode = 1;
}