perf(cli): defer command-specific analysis implementations
Load application and Electron workflow implementations only when their commands execute. Keep command schemas and catalog registration eager, and extend the startup import boundary to cover the deferred services.
This commit is contained in:
1 parent
ae95e68ba5
commit
a4dd4e8e87
4 files changed
+92
-31
No files matched your search
@@ -1,4 +1,3 @@
|
||||
import { analyzeJavaScriptApplication } from "../application/javascript/JavaScriptApplicationService.js";
|
||||
import { JAVASCRIPT_APPLICATION_PROVIDER } from "../application/InvestigationProviders.js";
|
||||
import { createProgressReporter } from "../application/ProgressReporter.js";
|
||||
import { ArtifactReaderFailure } from "../artifacts/ArtifactReader.js";
|
||||
@@ -13,6 +12,8 @@ export const runCliJavaScriptApplicationAnalysis = async (
|
||||
input: unknown,
|
||||
signal?: AbortSignal,
|
||||
): Promise<JsonValue> => {
|
||||
const { analyzeJavaScriptApplication } =
|
||||
await import("../application/javascript/JavaScriptApplicationService.js");
|
||||
const progress = createProgressReporter(
|
||||
async (update) => {
|
||||
process.stderr.write(`${JSON.stringify({ rea_progress: update })}\n`);
|
||||
|
||||
Reference in new issue
Block a user