From d54e91c6582ed160cf2f2fcf977e48b4439d133b Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Sun, 18 May 2025 22:54:15 -0700 Subject: snapshot --- hooks/server/mod.ts | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) (limited to 'hooks/server/mod.ts') diff --git a/hooks/server/mod.ts b/hooks/server/mod.ts index b635b05..0a520f9 100644 --- a/hooks/server/mod.ts +++ b/hooks/server/mod.ts @@ -1,37 +1,3 @@ -import { - getRequiredEnv, - getStdout, - type HealthCheckInput, - HealthCheckOutput, - type IEither, - type ITraceable, - LogTraceable, - TraceUtil, -} from "@emprespresso/pengueno"; - -export class LizCIServer { - private constructor( - private readonly healthCheckActivity = HealthCheckActivity(healthCheck), - private readonly jobHookActivity = JobHookActivity(jobQueuer), - private readonly fourOhFourActivity = FourOhFourActivity(), - ) {} - - private async route(req: LogTraceable) { - return req.flatMap((req) => { - const { item: request } = req; - const url = new URL(request.url); - if (url.pathname === "/health") { - return this.healthCheckActivity.healthCheck(req); - } - if (url.pathname === "/job") { - return this.jobHookActivity.processHook(req); - } - }); - } - - public async serve(req: Request): Promise { - return LogTraceable(req).bimap(TraceUtil.withClassTrace(this)).map( - this.route, - ); - } -} +export * from "./ci.ts"; +export * from "./health.ts"; +export * from "./job/mod.ts"; -- cgit v1.2.3-70-g09d2