mirror of
https://github.com/saltbo/zpan.git
synced 2026-08-30 17:50:07 +08:00
00f48cf355
* feat(avatars): host avatars + team logos on Cloud via SDK 2.4.0; remove public-bucket mode Host user avatars and org logos on the ZPan Cloud avatar service (zpan-cloud-sdk ^2.4.0) instead of a public S3/R2 bucket, then remove the now-dead storages.mode / public-bucket concept entirely (#456 parts 2-3). - image-upload gateway: upload/delete via SDK uploadAvatar/deleteAvatar against a bound Cloud client; validate mime (AVATAR_CONTENT_TYPES) + size (MAX_AVATAR_BYTES) before the call; map cloud error codes to 400/403/413/500; unbound instance returns 503 cloud_required (delete is a best-effort no-op). - licensing-cloud: createAvatarUploadClient builds the client with a plain-object bearer header so both the image content-type and Authorization survive hono's per-request header merge (a Headers instance would be dropped). - drop storages.mode (migration via drizzle-kit), StorageRepo.select() no longer takes a mode, remove StorageMode / Storage.mode / mode schema+audit+UI+i18n and the PUBLIC_IMAGES bucket + PUBLIC_IMAGES_URL wiring. Agent-Profile: https://agent-kanban.dev/agents/f759c704c282d88a * ci(deploy): drop dead PUBLIC_IMAGES R2 provisioning from CF deploy The Cloud avatar migration removed the PUBLIC_IMAGES binding from wrangler.toml, so the deploy workflow's R2 public-images steps are dead and must go too — otherwise every CF deploy keeps re-provisioning a public-read zpan-public-images bucket (the footgun #456 eliminates) and sets an unused PUBLIC_IMAGES_URL secret. Removes the bucket-create, managed-public-URL, and secret steps (steps.r2 was only consumed by the secret step). Also drops a stale storage-modes line from the v2.0 roadmap. Agent-Profile: https://agent-kanban.dev/agents/f759c704c282d88a --------- Co-authored-by: Alex Chen <alex-chen@mails.agent-kanban.dev>
66 lines
1.7 KiB
TOML
66 lines
1.7 KiB
TOML
name = "zpan"
|
|
main = "./workers/bootstrap.ts"
|
|
compatibility_date = "2026-04-12"
|
|
compatibility_flags = ["nodejs_compat", "global_fetch_strictly_public"]
|
|
|
|
[assets]
|
|
binding = "ASSETS"
|
|
not_found_handling = "single-page-application"
|
|
run_worker_first = ["/api/*", "/dav", "/dav/*", "/r/*", "/s/*"]
|
|
|
|
[[d1_databases]]
|
|
binding = "DB"
|
|
database_name = "zpan-db"
|
|
database_id = "5bd64957-fa49-4da0-8b7b-6e0ad84037e7"
|
|
migrations_dir = "./migrations"
|
|
|
|
[[send_email]]
|
|
name = "EMAIL"
|
|
|
|
[[queues.producers]]
|
|
binding = "ARCHIVE_QUEUE"
|
|
queue = "zpan-archive-jobs"
|
|
|
|
[[queues.consumers]]
|
|
queue = "zpan-archive-jobs"
|
|
max_batch_size = 1
|
|
max_batch_timeout = 1
|
|
max_retries = 3
|
|
|
|
[observability]
|
|
enabled = true
|
|
|
|
[triggers]
|
|
crons = ["*/10 * * * *", "0 */6 * * *", "0 */12 * * *", "0 0 1 * *", "0 4 * * *"]
|
|
|
|
# ----------------------------------------------------------------------------
|
|
# Staging environment — used by non-production branch builds.
|
|
# CLOUDFLARE_ENV=staging is set automatically in the build script.
|
|
# Workers Builds creates preview versions on the same zpan Worker
|
|
# but with staging D1 binding.
|
|
# ----------------------------------------------------------------------------
|
|
[env.staging]
|
|
|
|
[env.staging.vars]
|
|
BETTER_AUTH_URL = "https://zpan-staging.saltbo.workers.dev"
|
|
ZPAN_CLOUD_URL = "https://zpan-cloud-staging.saltbo.workers.dev"
|
|
|
|
[[env.staging.d1_databases]]
|
|
binding = "DB"
|
|
database_name = "zpan-db-staging"
|
|
database_id = "a9197d7a-6524-42f0-b646-e714dcb30b3b"
|
|
migrations_dir = "./migrations"
|
|
|
|
[[env.staging.send_email]]
|
|
name = "EMAIL"
|
|
|
|
[[env.staging.queues.producers]]
|
|
binding = "ARCHIVE_QUEUE"
|
|
queue = "zpan-archive-jobs-staging"
|
|
|
|
[[env.staging.queues.consumers]]
|
|
queue = "zpan-archive-jobs-staging"
|
|
max_batch_size = 1
|
|
max_batch_timeout = 1
|
|
max_retries = 3
|