mirror of
https://github.com/morluto/rea.git
synced 2026-12-05 06:21:12 +00:00
refactor(views): reuse invalid-view results and row selectors (#14314)
This commit is contained in:
1 parent
f9518dea59
commit
5dafc31d23
53 files changed
+333
-708
No files matched your search
@@ -3,14 +3,14 @@ import {
|
||||
pythonPycSchema,
|
||||
type PythonPycCodeObject,
|
||||
} from "../python/pythonPyc.js";
|
||||
import { err, ok } from "../result.js";
|
||||
import { ok } from "../result.js";
|
||||
import type { AnalysisViewParent } from "./analysisViewParent.js";
|
||||
import {
|
||||
ownedView,
|
||||
type AdmittedView,
|
||||
type SummaryAnalysisView,
|
||||
} from "./analysisViewShape.js";
|
||||
import { analysisViewInputError } from "./analysisViewErrors.js";
|
||||
import { invalidAnalysisView } from "./analysisViewErrors.js";
|
||||
import { createAnalysisViewResultReader } from "./analysisViewParent.js";
|
||||
import {
|
||||
boundedViewMessages,
|
||||
@@ -64,14 +64,8 @@ export const projectPythonPycView = (
|
||||
SummaryAnalysisView | z.output<typeof pythonPycViewRequestSchema>
|
||||
>(admitted, "summary", "python-pyc");
|
||||
if (view === undefined)
|
||||
return err(
|
||||
analysisViewInputError([
|
||||
{
|
||||
path: ["view"],
|
||||
reason: "invalid_value",
|
||||
message: "Python pyc Evidence supports summary and python-pyc views.",
|
||||
},
|
||||
]),
|
||||
return invalidAnalysisView(
|
||||
"Python pyc Evidence supports summary and python-pyc views.",
|
||||
);
|
||||
const parsed = readReport(parent);
|
||||
if (!parsed.ok) return parsed;
|
||||
|
||||
Reference in new issue
Block a user