feat: extend main-server artifact consumers

This commit is contained in:
Codex
2026-05-20 01:07:52 +00:00
parent b28f693fda
commit 93d9488d36
17 changed files with 519 additions and 34 deletions
@@ -14,6 +14,11 @@ interface RuntimeConfig {
databaseUrl: string;
logFile: string;
databasePoolMax: number;
deployServiceId: string;
deployRef: string;
deployRepo: string;
deployCommit: string;
deployRequestedCommit: string;
}
interface ProjectRow {
@@ -92,6 +97,11 @@ function configFromEnv(): RuntimeConfig {
databaseUrl,
logFile: process.env.LOG_FILE || "",
databasePoolMax: Math.max(1, Math.min(8, Number(process.env.DATABASE_POOL_MAX || 1) || 1)),
deployServiceId: process.env.UNIDESK_DEPLOY_SERVICE_ID || "project-manager",
deployRef: process.env.UNIDESK_DEPLOY_REF || "",
deployRepo: process.env.UNIDESK_DEPLOY_REPO || "",
deployCommit: process.env.UNIDESK_DEPLOY_COMMIT || "",
deployRequestedCommit: process.env.UNIDESK_DEPLOY_REQUESTED_COMMIT || "",
};
}
@@ -569,6 +579,13 @@ async function health(): Promise<Response> {
service: "project-manager",
storage: { primary: "postgres", table: "project_manager_projects", projects: Number(rows[0]?.count ?? 0) },
capabilities: ["crud", "excel-import", "excel-export"],
deploy: {
serviceId: config.deployServiceId,
ref: config.deployRef,
repo: config.deployRepo,
commit: config.deployCommit,
requestedCommit: config.deployRequestedCommit,
},
startedAt: serviceStartedAt,
});
}