From ac0e720de19e452b75cd1a13cb576b0dec242721 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sat, 28 Feb 2026 23:16:03 -0800 Subject: [PATCH] fine there --- apps/server/src/attachmentPaths.ts | 2 +- apps/server/src/imageMime.ts | 2 -- .../server/src/orchestration/Layers/ProjectionPipeline.ts | 8 ++------ apps/server/src/wsServer.ts | 7 +++++-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/apps/server/src/attachmentPaths.ts b/apps/server/src/attachmentPaths.ts index f9fb605669..7023d5a3ae 100644 --- a/apps/server/src/attachmentPaths.ts +++ b/apps/server/src/attachmentPaths.ts @@ -1,6 +1,6 @@ import path from "node:path"; -import { ATTACHMENTS_ROUTE_PREFIX } from "./imageMime.ts"; +export const ATTACHMENTS_ROUTE_PREFIX = "/attachments"; export function normalizeAttachmentRelativePath(rawRelativePath: string): string | null { const normalized = path.normalize(rawRelativePath).replace(/^[/\\]+/, ""); diff --git a/apps/server/src/imageMime.ts b/apps/server/src/imageMime.ts index f808cefdcd..249deff0ca 100644 --- a/apps/server/src/imageMime.ts +++ b/apps/server/src/imageMime.ts @@ -1,7 +1,5 @@ import Mime from "@effect/platform-node/Mime"; -export const ATTACHMENTS_ROUTE_PREFIX = "/attachments"; - export const IMAGE_EXTENSION_BY_MIME_TYPE: Record = { "image/avif": ".avif", "image/bmp": ".bmp", diff --git a/apps/server/src/orchestration/Layers/ProjectionPipeline.ts b/apps/server/src/orchestration/Layers/ProjectionPipeline.ts index 45e6196b50..8f8e01a512 100644 --- a/apps/server/src/orchestration/Layers/ProjectionPipeline.ts +++ b/apps/server/src/orchestration/Layers/ProjectionPipeline.ts @@ -37,12 +37,8 @@ import { OrchestrationProjectionPipeline, type OrchestrationProjectionPipelineShape, } from "../Services/ProjectionPipeline.ts"; -import { attachmentRouteToRelativePath } from "../../attachmentPaths.ts"; -import { - ATTACHMENTS_ROUTE_PREFIX, - inferImageExtension, - parseBase64DataUrl, -} from "../../imageMime.ts"; +import { ATTACHMENTS_ROUTE_PREFIX, attachmentRouteToRelativePath } from "../../attachmentPaths.ts"; +import { inferImageExtension, parseBase64DataUrl } from "../../imageMime.ts"; export const ORCHESTRATION_PROJECTOR_NAMES = { projects: "projection.projects", diff --git a/apps/server/src/wsServer.ts b/apps/server/src/wsServer.ts index 85991dc2bb..c40ef39a4c 100644 --- a/apps/server/src/wsServer.ts +++ b/apps/server/src/wsServer.ts @@ -55,8 +55,11 @@ import { Open } from "./open"; import { ServerConfig } from "./config"; import { GitCore } from "./git/Services/GitCore.ts"; import { tryHandleProjectFaviconRequest } from "./projectFaviconRoute"; -import { normalizeAttachmentRelativePath, resolveAttachmentRelativePath } from "./attachmentPaths"; -import { ATTACHMENTS_ROUTE_PREFIX } from "./imageMime.ts"; +import { + ATTACHMENTS_ROUTE_PREFIX, + normalizeAttachmentRelativePath, + resolveAttachmentRelativePath, +} from "./attachmentPaths"; /** * ServerShape - Service API for server lifecycle control.