Refactor WeatherKit client to injectable interface

- Add WeatherKitClient interface and DefaultWeatherKitClient class
- WeatherKitDataSource accepts either client or credentials
- Simplify tests by injecting mock client directly
- Update fixture generation script to use new client class

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2026-01-17 01:14:18 +00:00
parent 850d1925b6
commit 6cf147989f
6 changed files with 6548 additions and 108 deletions

View File

@@ -26,10 +26,13 @@ export {
Certainty,
PrecipitationType,
ConditionCode,
DefaultWeatherKitClient,
type Severity as SeverityType,
type Urgency as UrgencyType,
type Certainty as CertaintyType,
type PrecipitationType as PrecipitationTypeType,
type ConditionCode as ConditionCodeType,
type WeatherKitCredentials,
type WeatherKitClient,
type WeatherKitQueryOptions,
} from "./weatherkit"