Commit Graph
8 Commits
Author SHA1 Message Date
tiennm99 83103b3b3b build(deps): migrate to @cloudflare/vitest-plugin 1.x
@cloudflare/vitest-pool-workers was renamed to @cloudflare/vitest-plugin
for its v1 release; the old name stopped at 0.22.0 with pinned vulnerable
wrangler and miniflare versions. Vitest stays on 4: the plugin's peer
range is still ^4.1.0.
2026-10-03 13:18:36 +07:00
tiennm99 c57a04a7cf fix(deps): update dependencies to latest compatible versions
Rebased onto current main: the original commit only touched pnpm files and
versions main has since moved past, so it is replaced by a fresh npm update
within the declared ranges plus npm audit fix.
2026-10-03 12:41:57 +07:00
tiennm99 f69d14e1e2 build: move from pnpm to npm
Replace pnpm-lock.yaml with package-lock.json. pnpm-workspace.yaml's
allowBuilds becomes package.json#allowScripts, which npm 11 gates the same way,
listing only the packages actually present in the tree.
2026-08-17 13:07:27 +07:00
tiennm99 4ebf94daa4 chore: migrate from npm to pnpm 2026-05-13 10:17:26 +07:00
dependabot[bot] 9a9649ab4a build(deps): bump hono from 4.12.12 to 4.12.14 (#1)
Bumps [hono](https://github.com/honojs/hono) from 4.12.12 to 4.12.14.
- [Release notes](https://github.com/honojs/hono/releases)
- [Commits](https://github.com/honojs/hono/compare/v4.12.12...v4.12.14)

---
updated-dependencies:
- dependency-name: hono
  dependency-version: 4.12.14
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 13:33:16 +07:00
tiennm99 8c993df72b fix: harden webhook reliability, fix bugs, add test suite
- Statuspage webhook always returns 200 to prevent subscriber removal
- Fix parseKvKey returning string chatId instead of number
- Queue consumer retries on Telegram 5xx instead of acking (prevents message loss)
- Fix observability top-level enabled flag (false → true)
- Add defensive null checks for webhook payload body
- Cache Bot instance per isolate to avoid middleware rebuild per request
- Add vitest + @cloudflare/vitest-pool-workers with 31 tests
- Document DLQ and KV sharding as declined features
2026-04-09 10:29:30 +07:00
tiennm99 877a75b053 fix: normalize double slashes in URL path for webhook routing
Statuspage deactivated our webhook because requests to
//webhook/status/<secret> returned 404 — Hono requires exact path
matches. Added middleware that rewrites consecutive slashes before
routing, preserving POST body via internal re-dispatch.
2026-04-09 08:41:32 +07:00
tiennm99 01320abacd feat: implement Telegram bot for Claude status webhooks
Cloudflare Workers bot that forwards status.claude.com (Atlassian
Statuspage) incident and component updates to subscribed Telegram
users via CF Queues fan-out.

- Hono.js routing with grammY webhook handler
- Bot commands: /start, /stop, /status, /subscribe
- Supergroup topic support (message_thread_id)
- KV store with claude-status: prefix and composite keys
- Queue consumer with batch send, 403 auto-removal, 429 retry
- Timing-safe webhook secret validation
- HTML escaping for Telegram messages
2026-04-08 22:59:37 +07:00