Add release headers service, runtime-aware API header handling, and i18n updates for release configuration

- Implement `releaseHeaders.js` to manage release-related HTTP headers.
- Update requests to include runtime-based release headers.
- Extend i18n phrases across multiple locales for release runtime and configuration labels.
- Enhance unit tests for header building and API availability error handling.
This commit is contained in:
Jeppe Bundgaard
2026-05-20 17:52:54 +02:00
parent 130cc2fc10
commit ea8db593c5
43 changed files with 3191 additions and 171 deletions
+17
View File
@@ -18,6 +18,7 @@ import {
releaseManagerControlApiCandidates,
setReleaseManagerControlApiUrl,
} from "@/services/superuserReleases.js";
import { deployCoolifyGatewayRoutes } from "@/services/superuserCoolify.js";
import { __configureRequestQueueForTests, __resetRequestQueueForTests } from "@/services/requestQueue.js";
describe("superuser release manager service", () => {
@@ -71,4 +72,20 @@ describe("superuser release manager service", () => {
expect(localStorage.getItem(RELEASE_MANAGER_CONTROL_API_STORAGE_KEY)).toBeNull();
expect(releaseManagerControlApiCandidates()).toContain("https://api.truckwash.io:4433");
});
it("keeps Coolify route deployment on the release manager control API", async () => {
setReleaseManagerControlApiUrl("https://control.example.test");
axiosMock.mockResolvedValueOnce({ status: 200, data: { success: true } });
await deployCoolifyGatewayRoutes({ dry_run: true });
expect(axiosMock).toHaveBeenCalledWith(
expect.objectContaining({
url: "https://control.example.test/superuser/coolify/load-balancer/routes/deploy",
method: "POST",
data: { dry_run: true },
__skipReleaseApiRewrite: true,
})
);
});
});