feat(v2): full spec implementation — root SSH, bootstrap sentinel, HMAC webhook, all parametric routes fixed #1

Merged
space merged 9 commits from v2/full-spec-implementation into main 2026-07-26 14:26:39 +02:00
Showing only changes of commit 16fea6b952 - Show all commits
+8 -8
View File
@@ -54,7 +54,7 @@ server.path("/", (path) => path
// Webhook
server.path("/", (path) => path
.http("POST", "/webhook/:userId", (http) => http.onRequest(webhookHandler))
.http("POST", "/webhook/{userId}", (http) => http.onRequest(webhookHandler))
);
// User settings
@@ -73,15 +73,15 @@ server.path("/", (path) => path
.http("GET", "/api/repos", (http) => http.onRequest(listRepos))
.http("POST", "/api/repos/config", (http) => http.onRequest(saveRepoConfig))
.http("POST", "/api/repos/toggle", (http) => http.onRequest(toggleRepoEnabled))
.http("GET", "/api/repos/:owner/:repo/config", (http) => http.onRequest(getRepoConfig))
.http("GET", "/api/repos/{owner}/{repo}/config", (http) => http.onRequest(getRepoConfig))
);
// Previews
server.path("/", (path) => path
.http("GET", "/api/previews", (http) => http.onRequest(listPreviews))
.http("GET", "/api/previews/:id", (http) => http.onRequest(getPreview))
.http("POST", "/api/previews/:id/stop", (http) => http.onRequest(stopPreviewRoute))
.ws("/api/previews/:id/logs", (ws) => ws
.http("GET", "/api/previews/{id}", (http) => http.onRequest(getPreview))
.http("POST", "/api/previews/{id}/stop", (http) => http.onRequest(stopPreviewRoute))
.ws("/api/previews/{id}/logs", (ws) => ws
.onOpen(previewLogsWs)
.onMessage(async () => {})
.onClose(async () => {})
@@ -92,12 +92,12 @@ server.path("/", (path) => path
server.path("/", (path) => path
.http("GET", "/api/admin/users", (http) => http.onRequest(listUsers))
.http("POST", "/api/admin/users", (http) => http.onRequest(createUser))
.http("PATCH", "/api/admin/users/:id", (http) => http.onRequest(updateUser))
.http("DELETE", "/api/admin/users/:id", (http) => http.onRequest(deleteUser))
.http("PATCH", "/api/admin/users/{id}", (http) => http.onRequest(updateUser))
.http("DELETE", "/api/admin/users/{id}", (http) => http.onRequest(deleteUser))
.http("GET", "/api/admin/settings", (http) => http.onRequest(getSettings))
.http("PUT", "/api/admin/settings", (http) => http.onRequest(updateSettings))
.http("GET", "/api/admin/previews", (http) => http.onRequest(adminListPreviews))
.http("POST", "/api/admin/previews/:id/stop", (http) => http.onRequest(adminStopPreview))
.http("POST", "/api/admin/previews/{id}/stop", (http) => http.onRequest(adminStopPreview))
);
// Static UI — must come AFTER API routes