feat: provision non-root Hub service

This commit is contained in:
2026-07-10 15:59:35 +08:00
parent 5f791c5ce4
commit 73fa28a178
19 changed files with 1608 additions and 134 deletions
@@ -0,0 +1,31 @@
#!/usr/bin/env node
import "dotenv/config";
import "../hub.js";
import { prisma } from "../db.js";
async function main(): Promise<void> {
let queryFailure: unknown;
try {
await prisma.$queryRawUnsafe("SELECT 1");
} catch (error) {
queryFailure = error;
}
let disconnectFailure: unknown;
try {
await prisma.$disconnect();
} catch (error) {
disconnectFailure = error;
}
const failures = [queryFailure, disconnectFailure].filter((failure) => failure !== undefined);
if (failures.length > 0) {
throw new AggregateError(failures, "Hub dependency load or authenticated database query failed");
}
console.log("[service-runtime-probe] Hub dependencies and PostgreSQL query succeeded");
}
main().catch((error: unknown) => {
console.error("[service-runtime-probe] failed:", error);
process.exitCode = 1;
});