Commit eadd55f
refactor(schema): use Zod transforms instead of manual mutation
Replace manual result mutation in safeParseConfig/safeParsePartialConfig
with proper Zod .transform() methods:
- Add budgetSchema transform for string-to-number conversion (e.g., '10ms' → ns)
- Add budgetsSchema transform for nested-to-flat structure conversion
- Extract baseConfigProperties to avoid duplication between runtime and
JSON Schema generation schemas
- Export ModestBenchConfigInput type for consumers needing the input shape
- Export partialModestBenchConfigInputSchema for JSON Schema generation
(transforms can't be represented in JSON Schema)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 9fe0dd6 commit eadd55f
File tree
4 files changed
+304
-264
lines changed- scripts
- src
- config
- services
- types
4 files changed
+304
-264
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments