| 1 | import type { DiffineryEvent } from "@diffinery/shared"; |
| 2 | import type { Env } from "./env.js"; |
| 3 | import type { MailJob } from "./mail/types.js"; |
| 4 | import { app, queue, scheduled } from "./app.js"; |
| 5 | import { web } from "./web/routes.js"; |
| 6 | |
| 7 | export { RepoDO } from "./repo/RepoDO.js"; |
| 8 | export { RunnerContainer, SandboxContainer } from "./runner/containers.js"; |
| 9 | export { RunWorkflow } from "./runner/workflow.js"; |
| 10 | |
| 11 | // The web UI is mounted last so API, git and runner routes take precedence. |
| 12 | app.route("/", web); |
| 13 | |
| 14 | export default { |
| 15 | fetch: app.fetch, |
| 16 | queue, |
| 17 | scheduled, |
| 18 | } satisfies ExportedHandler<Env, DiffineryEvent | MailJob>; |