pnpm workspace with apps/web, apps/api, apps/collab, and packages/shared; strict TypeScript base config, repo-wide ESLint (flat) + Prettier, Vitest per package, and root scripts lint/typecheck/test/ build. @dorfteich/shared ships a first health-response helper consumed by apps/api to prove workspace linking. Existing markdown docs are reformatted once by the new Prettier setup. Closes #1 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
24 lines
536 B
TypeScript
24 lines
536 B
TypeScript
/**
|
|
* Shape of the liveness responses served by every Dorfteich service
|
|
* (`/healthz` on web, api, and collab). Readiness (`/readyz`) has a richer,
|
|
* service-specific shape and lives with the api.
|
|
*/
|
|
export interface HealthResponse {
|
|
status: 'ok';
|
|
service: 'web' | 'api' | 'collab';
|
|
version: string;
|
|
time: string;
|
|
}
|
|
|
|
export function healthResponse(
|
|
service: HealthResponse['service'],
|
|
version: string,
|
|
): HealthResponse {
|
|
return {
|
|
status: 'ok',
|
|
service,
|
|
version,
|
|
time: new Date().toISOString(),
|
|
};
|
|
}
|