Replace the ad-hoc `worker.js` with a self-contained `linearvoid-media` worker under `infrastructure/cloudflare/` that owns `media.linearvoid.tv`. It serves HLS objects from the R2 bucket, enforcing immutable Cache-Control on segments, a short TTL on live manifests, plus HLS CORS, OPTIONS preflight, Range support, and a `/health` probe. Includes wrapper config with production domain, Vitest unit tests, Miniflare R2 integration tests, automated deploy workflow, and docs updates.
21 lines
554 B
JSON
21 lines
554 B
JSON
{
|
|
"name": "linearvoid-media-worker",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"description": "Linear Void media edge worker: serves HLS from R2 on media.linearvoid.tv with immutable segment caching.",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "wrangler dev",
|
|
"start": "wrangler dev",
|
|
"deploy": "wrangler deploy",
|
|
"deploy:production": "wrangler deploy --env production",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest"
|
|
},
|
|
"devDependencies": {
|
|
"miniflare": "^4.0.0",
|
|
"vitest": "^4.1.10",
|
|
"wrangler": "^4.0.0"
|
|
}
|
|
}
|