mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 19:44:26 +08:00
refactor(domain): one owner each for non-empty text schemas and UTF-8 head excerpts (#10569)
Fifteen domain schema files each declared z.string().min(1), eight of them as boundedTextSchema although it bounds nothing. They now share nonEmptyTextSchema from src/domain/textSchemas.ts; the one trimming copy in reconstructionCoverage.ts is renamed trimmedTextSchema. Three private UTF-8 prefix truncators (gdb recent MI records, rizin diagnostics, environment replay) and src/process/boundedUtf8Text.ts are replaced by utf8HeadExcerpt in src/domain/utf8HeadExcerpt.ts, which encodes only the retained prefix and returns a slice of the source text.
This commit is contained in:
@@ -8,8 +8,7 @@ import {
|
||||
} from "./javascriptApplicationEvidenceSchemas.js";
|
||||
import { jsonValueSchema } from "../jsonValue.js";
|
||||
import { prefixedDigestSchema } from "../digests.js";
|
||||
|
||||
const boundedTextSchema = z.string().min(1);
|
||||
import { nonEmptyTextSchema } from "../textSchemas.js";
|
||||
|
||||
/** An observed IPC channel match whose uniqueness is not established. */
|
||||
export const IPC_COVERAGE_LIMITED_PAIRING_BASIS =
|
||||
@@ -148,7 +147,7 @@ export const javascriptApplicationGraphInputSchema = z.strictObject({
|
||||
nodes: z.array(applicationNodeSchema).min(1),
|
||||
edges: z.array(applicationEdgeSchema),
|
||||
coverage: applicationCoverageSchema,
|
||||
limitations: z.array(boundedTextSchema),
|
||||
limitations: z.array(nonEmptyTextSchema),
|
||||
});
|
||||
|
||||
/** Strict stored shape for a JavaScript Application Graph. */
|
||||
|
||||
Reference in New Issue
Block a user