Files
recflare/apps/match/wrangler.jsonc
T
2026-08-12 14:16:21 -04:00

73 lines
2.6 KiB
JSON

{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "match",
"main": "src/match.app.ts",
"compatibility_date": "2026-06-16",
"compatibility_flags": ["nodejs_compat"],
// Shared `recflare` DB. Reads room scenes for matchmaking, writes a player's
// personal dorm room on first dorm entry (see getOrCreateDormRoom), and holds
// player presence (the `presence` table — owned/migrated by the `rooms` worker).
// The "local" placeholder is replaced with the real id from RECFLARE_D1 at deploy time.
"d1_databases": [
{
"binding": "DB",
"database_name": "recflare",
"database_id": "local"
}
],
// Per-player settings KV, owned by the `playersettings` worker. Read-only here, for
// GET /player/avoidjuniors. The "local" id placeholder is replaced with the real id
// from RECFLARE_KV at deploy time.
"kv_namespaces": [
{
"binding": "RECFLARE_PLAYER_SETTINGS",
"id": "local"
}
],
// Presence sweep. Rows expire on their own TTL (15m) and reads already ignore
// expired ones, so this is housekeeping: it purges them, deletes the room
// instances left with nobody in them, and recomputes the fullness of the
// instances the departed players were in (a crashed player never matchmakes out,
// so nothing else notices they left). Every 5 minutes.
"triggers": {
"crons": ["*/5 * * * *"]
},
"logpush": false,
// Shared Secrets Store holding the HS256 JWT signing key. Every worker binds the
// same store as JWT_SECRET so tokens signed by `auth` verify here. The "local"
// store_id placeholder is replaced with RECFLARE_SECRETS_STORE at deploy time.
"secrets_store_secrets": [
{
"binding": "JWT_SECRET",
"store_id": "local",
"secret_name": "JWT_SECRET"
}
],
// The `notify` worker's NotificationsHub DO — used by POST /invite to push the
// game-invite message to the invitee's live socket.
"durable_objects": {
"bindings": [
{
"name": "RECFLARE_NOTIFICATIONS_HUB",
"class_name": "NotificationsHub",
"script_name": "notify"
}
]
},
"upload_source_maps": true,
"observability": {
"logs": {
"enabled": true,
"head_sampling_rate": 1 // 100%
}
},
// The room substitutions (ROOM_REDIRECTS) are deliberately NOT set here. They're
// injected at deploy time from the gitignored .env (RECFLARE_ROOM_REDIRECTS, see
// .env.example), so swapping a room out never means editing a versioned file. Unset —
// the default — means every matchmake enters the room it asked for.
"vars": {
"ENVIRONMENT": "development", // overridden during deployment
"SENTRY_RELEASE": "unknown" // overridden during deployment
}
}