Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -1,24 +1,42 @@
import { loadWebConfig } from "@hivegrid/config";
import { assertPortalRlsRuntimeReady } from "@hivegrid/db/portal-rls-runtime-readiness.server";
import { db } from "~/utils/db.server";
import { checkCachedWebReadiness } from "~/utils/readiness-cache.server";
import { getWebServiceName } from "../../build-surface";
const checkDatabase = () => db.appConfiguration.count();
const checkPortalDatabaseRole = async () => {
const readiness = await assertPortalRlsRuntimeReady();
if (!readiness.ready) {
throw new Error("portal RLS readiness failed");
}
};
export const loader = async () => {
const { releaseRevision, runtimeSurface } = loadWebConfig().config;
const service = getWebServiceName(runtimeSurface);
try {
await db.appConfiguration.count();
await checkCachedWebReadiness(runtimeSurface === "portal" ? checkPortalDatabaseRole : checkDatabase);
return Response.json(
{
status: "ready",
service: "web",
service,
surface: runtimeSurface,
revision: releaseRevision,
},
{ status: 200 },
{ status: 200 }
);
} catch {
return Response.json(
{
status: "not_ready",
service: "web",
service,
surface: runtimeSurface,
revision: releaseRevision,
error: "database_unavailable",
},
{ status: 503 },
{ status: 503 }
);
}
};