mirror of
https://github.com/morluto/rea.git
synced 2026-11-20 05:32:44 +00:00
20 lines
614 B
TypeScript
20 lines
614 B
TypeScript
import { z } from "zod";
|
|
|
|
/** Shared ASAR node declarations; consumers select only the fields they interpret. */
|
|
export const asarNodeSchema = z.looseObject({
|
|
files: z
|
|
.custom<Record<string, unknown>>(
|
|
(value) =>
|
|
value !== null && typeof value === "object" && !Array.isArray(value),
|
|
)
|
|
.optional(),
|
|
link: z.string().optional(),
|
|
size: z.number().nonnegative().safe().optional(),
|
|
offset: z.string().optional(),
|
|
unpacked: z.boolean().optional(),
|
|
executable: z.boolean().optional(),
|
|
integrity: z
|
|
.looseObject({ algorithm: z.string(), hash: z.string() })
|
|
.optional(),
|
|
});
|