cody
cody copied to clipboard
Config: JSON Generated Schema & Singleton
WIP: A proposal to make some DX changes to the config
PoC
- Use literal strings for getting config values.
- Much easier to search / grep
- 1-on-1 relation between package.json & code
- Use zod schema validation
- generated from source of truth...JSON Schema
- config is always valid
- gracefully handle migrations, deprecations and fallbacks
- Place env variables in single point.
- all configuration in a single inspectable object
- derived flags can be computed values
- validation
Open Questions
- Move to singleton config object?
- Live in shared lib?
- Some have injected config / some look up in workspace etc.
- How to handle listeners
Test plan
CI