feat: add display kiosk host
CI / verify (pull_request) Successful in 38s
CI / infrastructure-smoke (pull_request) Successful in 20s
CI / migration-smoke (pull_request) Successful in 59s

This commit is contained in:
ekklesia
2026-08-23 20:50:56 -05:00
parent be5ed7853d
commit 2e0fe059c3
80 changed files with 4868 additions and 397 deletions
+13 -9
View File
@@ -11,24 +11,28 @@ function isRecord(value: unknown): value is Record<string, unknown> {
/**
* `ekklesia-build-module-ui` — the canonical module UI build command, run from a module directory.
*
* A module with no `entrypoints.ui` is not an error: backend-only modules stay first-class and this
* command reports that there was nothing to build and exits successfully, so one `build` script
* works for every module.
* A module with neither UI role is not an error: backend-only modules stay first-class and this
* command reports that there was nothing to build and exits successfully. When one or both roles
* are declared, this one command builds exactly that set.
*/
async function main(): Promise<number> {
const moduleDirectory = process.argv[2] ?? process.cwd();
try {
const result = await buildModuleUi({ moduleDirectory });
process.stdout.write(`Built module UI: ${path.relative(moduleDirectory, result.outputFile)}\n`);
if (result.artifacts.length === 0) {
process.stdout.write("No module UI entrypoints declared; skipping the module UI build.\n");
return 0;
}
for (const artifact of result.artifacts) {
process.stdout.write(
`Built module UI (${artifact.kind}): ${path.relative(moduleDirectory, artifact.outputFile)}\n`,
);
}
return 0;
} catch (error) {
if (error instanceof ModuleUiBuildError) {
if (error.code === "MODULE_UI_ENTRYPOINT_NOT_DECLARED") {
process.stdout.write("No entrypoints.ui declared; skipping the module UI build.\n");
return 0;
}
process.stderr.write(`${error.message}\n`);
process.stderr.write(`${error.kind ? `${error.kind}: ` : ""}${error.message}\n`);
// esbuild's own diagnostics carry the file, line, and reason a developer needs. They are
// printed here, never folded into the sanitized error message itself.
const diagnostics = isRecord(error) ? error.diagnostics : undefined;