mirror of
https://github.com/morluto/rea.git
synced 2026-11-11 01:13:39 +00:00
fix(javascript): preserve selected inputs and completed source evidence
This commit is contained in:
1 parent
3864c7d667
commit
721dd3d1aa
11 files changed
+453
-177
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { parseAnalysisInput } from "../AnalysisInput.js";
|
||||
import { isAbsolute, resolve } from "node:path";
|
||||
import { isAbsolute } from "node:path";
|
||||
|
||||
import {
|
||||
AnalysisInputError,
|
||||
@@ -59,24 +59,6 @@ export class JavaScriptRecoveryService {
|
||||
})),
|
||||
]),
|
||||
);
|
||||
const selectedInputs = new Set(
|
||||
[parsed.value.path, ...(parsed.value.additional_paths ?? [])].map(
|
||||
(path) => resolve(path),
|
||||
),
|
||||
);
|
||||
if (
|
||||
selectedInputs.size !==
|
||||
1 + (parsed.value.additional_paths ?? []).length
|
||||
)
|
||||
return err(
|
||||
new AnalysisInputError(OPERATION, undefined, [
|
||||
{
|
||||
path: ["additional_paths"],
|
||||
reason: "invalid_format",
|
||||
message: "additional_paths must not repeat path or each other.",
|
||||
},
|
||||
]),
|
||||
);
|
||||
const execution = await this.provider.recover(parsed.value, options);
|
||||
if (!execution.ok) return execution;
|
||||
const result = javascriptRecoveryResultSchema.safeParse(
|
||||
|
||||
Reference in new issue
Block a user