Commit 6e02506
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 6e02506
File tree
9 files changed
+327
-313
lines changed- scripts
- src
- adapters
- config
- services
- types
- test/contract
9 files changed
+327
-313
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | 184 | | |
186 | 185 | | |
187 | 186 | | |
| |||
| 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 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
0 commit comments