name = "nodewarden"
main = "src/index.ts"
compatibility_date = "2024-01-01"

[build]
command = "npm run build"

[assets]
binding = "ASSETS"
directory = "./dist"
html_handling = "none"
not_found_handling = "single-page-application"
run_worker_first = true

[triggers]
crons = [ "*/5 * * * *" ]

[[d1_databases]]
binding = "DB"
database_name = "nodewarden-db"

[[durable_objects.bindings]]
name = "NOTIFICATIONS_HUB"
class_name = "NotificationsHub"

[[durable_objects.bindings]]
name = "BACKUP_TRANSFER_RUNNER"
class_name = "BackupTransferRunner"

[[r2_buckets]]
binding = "ATTACHMENTS"
bucket_name = "nodewarden-attachments"

[[migrations]]
tag = "v1-notifications-hub"
new_sqlite_classes = [ "NotificationsHub" ]

[[migrations]]
tag = "v2-backup-transfer-runner"
new_sqlite_classes = [ "BackupTransferRunner" ]
