a little carrier pigeon that ferries figma events to discord
1name = "pigeon"
2main = "src/index.ts"
3compatibility_date = "2025-09-01"
4
5# Pin deploys to a specific Cloudflare account by one of:
6# 1. export CLOUDFLARE_ACCOUNT_ID=<your-account-id> (recommended; keeps repo reusable)
7# 2. uncomment the line below and paste your id
8# Get your account id via: bunx wrangler whoami
9# account_id = ""
10
11[observability]
12enabled = true
13
14# KV namespace mapping: Figma file_key -> Discord channel webhook URL.
15# Create with:
16# bunx wrangler kv namespace create FIGMA_DISCORD_WEBHOOK
17# then paste the returned id below.
18[[kv_namespaces]]
19binding = "FIGMA_DISCORD_WEBHOOK"
20id = "REPLACE_WITH_KV_NAMESPACE_ID"
21
22# Durable Object: one actor per Figma file_key. Holds the current batch of
23# publish events and fires an alarm ~60s after the first event to flush a
24# single aggregated message to Discord.
25[[durable_objects.bindings]]
26name = "BATCHER"
27class_name = "Batcher"
28
29[[migrations]]
30tag = "v1"
31new_sqlite_classes = ["Batcher"]
32
33# Optional: bind a custom domain instead of the default <name>.<subdomain>.workers.dev.
34# Requires the parent zone to already exist on this Cloudflare account.
35# Uncomment and set to your chosen hostname.
36# [[routes]]
37# pattern = "figma.example.com"
38# custom_domain = true