Add time-based orchestration, state management, diffing and logging
- config: add overrideTime for testing (HH:MM string) - state.ts: daily state persistence (reference, lastKnown, sentAt10) - differ.ts: detect text changes and sold-out changes between menu snapshots - logger.ts: append timestamped changes to logs/YYYY-MM-DD.log - index.ts: full cron logic — before 10 log only, at 10 send TG, after 10 send on text change; sold-out always to TG without log; exit after 14:00 - .gitignore: add state/ and logs/ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ export interface TelegramConfig {
|
||||
export interface Config {
|
||||
days: DayUrls
|
||||
devMode: boolean
|
||||
overrideTime: string | null
|
||||
telegram: TelegramConfig
|
||||
}
|
||||
|
||||
@@ -26,6 +27,7 @@ const config: Config = {
|
||||
friday: "",
|
||||
},
|
||||
devMode: false,
|
||||
overrideTime: null,
|
||||
telegram: {
|
||||
botToken: "",
|
||||
chatId: "",
|
||||
|
||||
Reference in New Issue
Block a user