Files
recflare/apps/econ/wrangler.jsonc
T
2026-07-14 12:55:03 -04:00

52 lines
1.8 KiB
JSON

{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "econ",
"main": "src/econ.app.ts",
"compatibility_date": "2026-06-16",
"compatibility_flags": ["nodejs_compat"],
// Storefront catalogs served dynamically by id: `/api/storefronts/v3/giftdropstore/:id`
// fetches `sf{id}.json` from this directory via the ASSETS binding. Drop a new
// `sfN.json` in `static/storefronts` to add a storefront — no code change needed.
"assets": {
"binding": "ASSETS",
"directory": "./static/storefronts"
},
// Shared `recflare` D1. Econ reads/writes the player's avatar column on the accounts
// table (whose schema/migrations the `auth` worker owns) and owns the `balance` table
// itself — hence its own migrations_dir, with a dedicated migrations_table so its
// history doesn't clash with the auth/rooms migrations on the same database. Apply
// with `wrangler d1 migrations apply recflare --remote`. 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",
"migrations_dir": "migrations",
"migrations_table": "d1_migrations_econ"
}
],
"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"
}
],
"upload_source_maps": true,
"observability": {
"logs": {
"enabled": true,
"head_sampling_rate": 1 // 100%
}
},
"vars": {
"ENVIRONMENT": "development", // overridden during deployment
"SENTRY_RELEASE": "unknown" // overridden during deployment
}
}