WebHooker/wrangler.jsonc
RhenCloud c3e22de4e6
fix(ci): build admin SPA during wrangler deploy
Cloudflare Workers Build runs "wrangler deploy" on a fresh checkout,
where admin/dist (a gitignored symlink) does not exist, so the deploy
failed with a missing assets.directory.

- add build.command to generate the Nuxt SPA before bundling
- point assets.directory at the real ./admin/.output/public output
  instead of the gitignored admin/dist symlink
2026-08-02 07:43:11 +08:00

45 lines
794 B
JSON

{
"name": "webhooker",
"main": "src/index.ts",
"compatibility_date": "2025-01-01",
"compatibility_flags": [],
"vars": {
"DISCORD_GATEWAY_ENABLED": "true"
},
"build": {
"command": "cd admin && bun install --frozen-lockfile && bun run generate"
},
"assets": {
"directory": "./admin/.output/public",
"binding": "ASSETS",
"run_worker_first": true,
"not_found_handling": "single-page-application"
},
"triggers": {
"crons": [
"*/5 * * * *"
]
},
"durable_objects": {
"bindings": [
{
"name": "DISCORD_GATEWAY",
"class_name": "DiscordGateway",
},
],
},
"migrations": [
{
"tag": "v1",
"new_sqlite_classes": [
"DiscordGateway"
],
},
],
"kv_namespaces": [
{
"binding": "KV",
"id": "53abb6d985a44b80b2b08d510f73928a"
},
],
}