feat: improve workshop publishing flow

This commit is contained in:
Thomas Camlong committed 2026-08-14 23:16:39 +02:00
1 parent 168091134d
commit b491d45fdc
19 files changed
+254 -82

No files matched your search

+14
View File
@@ -32,6 +32,20 @@ describe("Workshop URL configuration", () => {
});
});
test("uses an explicit Workshop web URL for public Workshop links", () => {
expect(
resolveHomarrUrlConfig({
homarrWebsiteUrl: "https://homarr.example.com",
workshopApiUrl: "https://api.example.com",
workshopWebUrl: "https://community.example.com/workshop",
}),
).toEqual({
homarrWebsiteUrl: "https://homarr.example.com",
workshopApiUrl: "https://api.example.com",
workshopWebUrl: "https://community.example.com/workshop",
});
});
test("rejects unsafe or ambiguous public URLs", () => {
expect(() => normalizeHttpUrl("file:///tmp/workshop", "WORKSHOP_API_URL")).toThrow("HTTP or HTTPS");
expect(() => normalizeHttpUrl("https://user:secret@example.com", "WORKSHOP_API_URL")).toThrow("credentials");