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:
František Musil
2026-05-12 09:25:11 +02:00
parent ffa638429e
commit a37b3e848d
8 changed files with 309 additions and 35 deletions
+6
View File
@@ -38,3 +38,9 @@ config/local.ts
# Dev mode request/response logs
debug/
# Runtime state
state/
# Change logs
logs/