mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-07-14 18:15:56 -04:00
feat: add public-api app and route update checks through it
- Add `apps/public-api` (`@sofa/public-api`) — minimal Hono app
deployable to Vercel; `GET /v1/version` fetches the latest GitHub
release and returns `{ version, releaseUrl }` with a 15-minute
CDN cache (`s-maxage=900, stale-while-revalidate=3600`)
- Update `packages/core/src/update-check.ts` to call
`PUBLIC_API_URL/v1/version` instead of the GitHub API directly;
`PUBLIC_API_URL` defaults to `https://public-api.sofa.watch`
This commit is contained in:
@@ -85,6 +85,17 @@
|
||||
"typescript": "catalog:",
|
||||
},
|
||||
},
|
||||
"apps/public-api": {
|
||||
"name": "@sofa/public-api",
|
||||
"version": "0.1.0",
|
||||
"dependencies": {
|
||||
"hono": "4.12.7",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "catalog:",
|
||||
"typescript": "catalog:",
|
||||
},
|
||||
},
|
||||
"apps/server": {
|
||||
"name": "@sofa/server",
|
||||
"version": "0.1.0",
|
||||
@@ -997,6 +1008,8 @@
|
||||
|
||||
"@sofa/native": ["@sofa/native@workspace:apps/native"],
|
||||
|
||||
"@sofa/public-api": ["@sofa/public-api@workspace:apps/public-api"],
|
||||
|
||||
"@sofa/server": ["@sofa/server@workspace:apps/server"],
|
||||
|
||||
"@sofa/tmdb": ["@sofa/tmdb@workspace:packages/tmdb"],
|
||||
|
||||
Reference in New Issue
Block a user