mirror of
https://github.com/kennethnym/freya
synced 2026-06-19 16:11:18 +01:00
Add lastFeed() method that returns cached FeedResult within a configurable TTL (default 5 min). refresh() always fetches fresh data and updates the cache. Periodic auto-refresh via recursive setTimeout when engine is started. Reactive updates reset the timer to avoid redundant fetches. Co-authored-by: Ona <no-reply@ona.com>
47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
// Context
|
|
export type { Context, ContextKey } from "./context"
|
|
export { contextKey, contextValue } from "./context"
|
|
|
|
// Actions
|
|
export type { ActionDefinition } from "./action"
|
|
export { UnknownActionError } from "./action"
|
|
|
|
// Feed
|
|
export type { FeedItem } from "./feed"
|
|
|
|
// Feed Source
|
|
export type { FeedSource } from "./feed-source"
|
|
|
|
// Feed Engine
|
|
export type { FeedEngineConfig, FeedResult, FeedSubscriber, SourceError } from "./feed-engine"
|
|
export { FeedEngine } from "./feed-engine"
|
|
|
|
// =============================================================================
|
|
// DEPRECATED - Use FeedSource + FeedEngine instead
|
|
// =============================================================================
|
|
|
|
// Data Source (deprecated - use FeedSource)
|
|
export type { DataSource } from "./data-source"
|
|
|
|
// Context Provider (deprecated - use FeedSource)
|
|
export type { ContextProvider } from "./context-provider"
|
|
|
|
// Context Bridge (deprecated - use FeedEngine)
|
|
export type { ProviderError, RefreshResult } from "./context-bridge"
|
|
export { ContextBridge } from "./context-bridge"
|
|
|
|
// Reconciler (deprecated - use FeedEngine)
|
|
export type {
|
|
ReconcileResult,
|
|
ReconcilerConfig,
|
|
SourceError as ReconcilerSourceError,
|
|
} from "./reconciler"
|
|
export { Reconciler } from "./reconciler"
|
|
|
|
// Feed Controller (deprecated - use FeedEngine)
|
|
export type {
|
|
FeedControllerConfig,
|
|
FeedSubscriber as FeedControllerSubscriber,
|
|
} from "./feed-controller"
|
|
export { FeedController } from "./feed-controller"
|