fix(contracts): align CLI omission and native capability coverage

This commit is contained in:
morluto committed 2026-10-26 22:22:27 +08:00
1 parent 4a8205456c
commit 2b84efe0da
8 files changed
+162 -95

No files matched your search

+3 -2
View File
@@ -40,9 +40,10 @@ const withOmittableDefaults = (schema: z.ZodObject): z.ZodObject => {
);
};
/** Zod accepts an omitted value (`optin`) but always produces one (`optout`). */
/** Let the object parser decide omission; Incur advertises required outputs. */
const fillsOmission = (field: z.ZodType): boolean =>
field._zod.optin === "optional" && field._zod.optout === undefined;
field._zod.optout === undefined &&
z.object({ value: field }).safeParse({}).success;
const optionalWithMetadata = (field: z.ZodType): z.ZodType => {
const metadata = field.meta();