WebHooker/nuxt.config.ts
RhenCloud 25ebae4ae5
feat(storage): migrate config, dedup and delivery state to D1
- Move oversized queue payloads from KV to R2 (PAYLOAD binding, webhooks/YYYY/MM/DD/*.json, KV queue:payload:* fallback)
- Persist routes/groups to D1 (d1_routes/d1_groups) with memory -> KV -> D1 three-tier cache, seeded from legacy KV config keys
- Move webhook dedup (dedup_keys), delivery state (delivery_state) and message tracking (message_tracking) to D1 via canUseD1 probe with automatic KV fallback
- Batch send_logs inserts (recordSendBatch) and add group_id/ts index
- Add storage-prune scheduled task for expired dedup/state/tracking rows
- Add TTL to invite:group:{id} index and audit all ephemeral KV keys
- Add D1 indexes for the new tables
- Sync AGENTS.md, README.md/zh and docs/ (en/zh) with the new storage layout
2026-08-17 15:01:20 +08:00

43 lines
1.2 KiB
TypeScript

export default defineNuxtConfig({
compatibilityDate: "2025-07-15",
modules: ["@nuxtjs/tailwindcss"],
// Target: Cloudflare Workers (single _worker.js via the cloudflare_module preset).
nitro: {
preset: "cloudflare_module",
errorHandler: "~~/server/error-handler",
experimental: {
tasks: true,
},
scheduledTasks: {
"*/5 * * * *": ["discord-sync", "telegram-sync", "audit-prune", "storage-prune"],
},
},
app: {
head: {
title: "WebHooker",
link: [
{
rel: "stylesheet",
href: "https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap",
},
],
},
},
tailwindcss: {
cssPath: "~/assets/css/main.css",
configPath: "tailwind.config",
},
devtools: { enabled: false },
runtimeConfig: {
// Overridable via NUXT_PUBLIC_DOCS_URL / NUXT_PUBLIC_REPO_URL.
public: {
docsUrl: "",
repoUrl: "",
},
},
// The config console stays a client-side SPA (same behavior as the old
// standalone admin app); home/legal pages render server-side.
routeRules: {
"/admin/**": { ssr: false },
},
});