Commit Graph
1 Commits
Author SHA1 Message Date
morluto 832984c2cc fix(cli): describe a contract option whose description sits inside .optional() (#11661)
* fix(cli): describe a contract option whose description sits inside .optional()

zod does not carry a wrapped schema's description to its .optional()
wrapper. Since #10798 projected analyze_javascript_application from its
contract, source_paths is javaScriptSourcePathsSchema.optional(), so
'analyze --help' and 'analyze-javascript-application --help' listed
--source-path with no description and cliOptionAliases.test.ts fails on
main.

The contract option projection now reads the field's description through
its wrappers (describedThroughWrappers), once for every argv branch, in
place of three per-branch copies that read only the outer schema. The
opener and member option projections use the same reader.

* test(cli): assert the exact help text of a wrapped contract field and of a projection override
2026-11-16 10:35:14 +08:00