197 lines · 9.1 KB
import handler from "@tanstack/react-start/server-entry";
import { retryHiddenRefCleanups, sweepClosedPullRefs } from "./server/git/pull-bridge";
import { sweepOrphanedLfsBlobs } from "./server/lfs/objects";
import { handleGitRequest, matchGitRoute } from "./server/git/proxy";
import { handleJobApi, handleRunnerApi, reapStaleRunnerJobs } from "./server/ci/runner-api";
import { handleQueueBatch } from "./server/events/consumer";
import type { QueueMessage } from "./server/events/emit";
import { HttpError } from "./server/errors";
import { finishGithubLogin, startGithubLogin } from "./server/github-oauth";
import { handleRawRoutes } from "./server/raw";
import { handleLfsRequest, matchLfsRoute } from "./server/lfs/api";
import { handlePagesRequest } from "./server/pages/serve";
import { handleSitesRequest } from "./server/sites/dispatch";
import { handleSitesForgeRoutes } from "./server/sites/forge";
import { sweepScratchSites } from "./server/sites/scratch";
import { reconcileSites } from "./server/sites/sync";
import { runMeteringCron } from "./server/metering/cron";
import { handleSecurityApi } from "./server/security/api";
import { handleSecurityBatch, SECURITY_QUEUE } from "./server/security/queue";
import { handleAttachmentRoutes } from "./server/attachments";
import { handleProjectRoutes } from "./server/projects";
import { handleAvatarRoutes } from "./server/avatars";
import { purgeExpiredAuthTokens } from "./server/auth-tokens";
import { hasSessionCookie } from "./server/auth";
import { handleActionsRoutes } from "./server/ci/http";
import { runActionsCron } from "./server/ci/maintenance";
import { API_V1_PREFIX, handleApiV1 } from "./server/api/router";
import { handleEditorRoutes } from "./server/editor/api";
import { handleEditorOrigin } from "./server/editor/host";
import { handleIntegrationRoutes, INBOUND_HOOK_PREFIX } from "./server/integrations/http";
import {
  handleIntegrationBatch,
  INTEGRATIONS_DLQ,
  INTEGRATIONS_QUEUE,
  runIntegrationsCron,
} from "./server/integrations/queue";
import type { IntegrationMessage } from "./server/integrations/queue";
import { handleMcpRoutes } from "./server/mcp/routes";
import { DEV_MAIL_MESSAGES_PATH, handleDevMailRoutes } from "./server/notify/dev-mail";
import { flushNotificationDigests } from "./server/notify/deliver";