mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 17:11:17 +00:00
Replace per-source services (LocationService, WeatherService, TflService, FeedEngineService) with a single UserSessionManager that owns all per-user state. Source creation is delegated to thin FeedSourceProvider implementations per source type. Co-authored-by: Ona <no-reply@ona.com>
16 lines
452 B
TypeScript
16 lines
452 B
TypeScript
import { WeatherSource, type WeatherSourceOptions } from "@aris/source-weatherkit"
|
|
|
|
import type { FeedSourceProvider } from "../session/feed-source-provider.ts"
|
|
|
|
export class WeatherSourceProvider implements FeedSourceProvider {
|
|
private readonly options: WeatherSourceOptions
|
|
|
|
constructor(options: WeatherSourceOptions) {
|
|
this.options = options
|
|
}
|
|
|
|
feedSourceForUser(_userId: string): WeatherSource {
|
|
return new WeatherSource(this.options)
|
|
}
|
|
}
|