mirror of
https://github.com/morluto/rea
synced 2026-10-26 14:25:49 -04:00
fix: report JavaScript worker phases and parent budget recovery
This commit is contained in:
@@ -257,6 +257,7 @@ export class JavaScriptAnalysisWorker {
|
||||
file: JavaScriptArtifactFile,
|
||||
capacity: JavaScriptSemanticProjectionCapacity,
|
||||
signal?: AbortSignal,
|
||||
onPhase?: (phase: string) => Promise<void>,
|
||||
): Promise<
|
||||
Result<JavaScriptAnalyzedSource, JavaScriptSourceAnalysisFailure>
|
||||
> {
|
||||
@@ -343,6 +344,7 @@ export class JavaScriptAnalysisWorker {
|
||||
);
|
||||
if (response.kind === "phase") {
|
||||
this.#phase = response.phase;
|
||||
await onPhase?.(response.phase);
|
||||
continue;
|
||||
}
|
||||
if (response.kind === "static") {
|
||||
@@ -362,6 +364,9 @@ export class JavaScriptAnalysisWorker {
|
||||
parent_result_budget_bytes: this.#resultBudgetBytes,
|
||||
parent_result_budget_exhausted: true,
|
||||
},
|
||||
{
|
||||
remediationAction: JAVASCRIPT_PARENT_RESULT_BUDGET_REMEDIATION,
|
||||
},
|
||||
);
|
||||
offeredResultBudget =
|
||||
this.#applicationProjectionFailure !== undefined &&
|
||||
|
||||
Reference in New Issue
Block a user