| author | |
| committer | |
| log | ac0e720de19e452b75cd1a13cb576b0dec242721 |
| tree | 8993ba2f4c1a7cb0966c550ebe7d3dd10078de86 |
| parent | 5144d32b771cb64c7e6e7aa0d109e480a4382a01 |
4 files changed, 8 insertions(+), 11 deletions(-)
apps/server/src/attachmentPaths.ts+1-1| ... | @@ -1,6 +1,6 @@ | ... | @@ -1,6 +1,6 @@ |
| 1 | import path from "node:path"; | 1 | import path from "node:path"; |
| 2 | 2 | ||
| 3 | import { ATTACHMENTS_ROUTE_PREFIX } from "./imageMime.ts"; | 3 | export const ATTACHMENTS_ROUTE_PREFIX = "/attachments"; |
| 4 | 4 | ||
| 5 | export function normalizeAttachmentRelativePath(rawRelativePath: string): string | null { | 5 | export function normalizeAttachmentRelativePath(rawRelativePath: string): string | null { |
| 6 | const normalized = path.normalize(rawRelativePath).replace(/^[/\\]+/, ""); | 6 | const normalized = path.normalize(rawRelativePath).replace(/^[/\\]+/, ""); |
apps/server/src/imageMime.ts-2| ... | @@ -1,7 +1,5 @@ | ... | @@ -1,7 +1,5 @@ |
| 1 | import Mime from "@effect/platform-node/Mime"; | 1 | import Mime from "@effect/platform-node/Mime"; |
| 2 | 2 | ||
| 3 | export const ATTACHMENTS_ROUTE_PREFIX = "/attachments"; | ||
| 4 | |||
| 5 | export const IMAGE_EXTENSION_BY_MIME_TYPE: Record<string, string> = { | 3 | export const IMAGE_EXTENSION_BY_MIME_TYPE: Record<string, string> = { |
| 6 | "image/avif": ".avif", | 4 | "image/avif": ".avif", |
| 7 | "image/bmp": ".bmp", | 5 | "image/bmp": ".bmp", |
apps/server/src/orchestration/Layers/ProjectionPipeline.ts+2-6| ... | @@ -37,12 +37,8 @@ import { | ... | @@ -37,12 +37,8 @@ import { |
| 37 | OrchestrationProjectionPipeline, | 37 | OrchestrationProjectionPipeline, |
| 38 | type OrchestrationProjectionPipelineShape, | 38 | type OrchestrationProjectionPipelineShape, |
| 39 | } from "../Services/ProjectionPipeline.ts"; | 39 | } from "../Services/ProjectionPipeline.ts"; |
| 40 | import { attachmentRouteToRelativePath } from "../../attachmentPaths.ts"; | 40 | import { ATTACHMENTS_ROUTE_PREFIX, attachmentRouteToRelativePath } from "../../attachmentPaths.ts"; |
| 41 | import { | 41 | import { inferImageExtension, parseBase64DataUrl } from "../../imageMime.ts"; |
| 42 | ATTACHMENTS_ROUTE_PREFIX, | ||
| 43 | inferImageExtension, | ||
| 44 | parseBase64DataUrl, | ||
| 45 | } from "../../imageMime.ts"; | ||
| 46 | 42 | ||
| 47 | export const ORCHESTRATION_PROJECTOR_NAMES = { | 43 | export const ORCHESTRATION_PROJECTOR_NAMES = { |
| 48 | projects: "projection.projects", | 44 | projects: "projection.projects", |
apps/server/src/wsServer.ts+5-2| ... | @@ -55,8 +55,11 @@ import { Open } from "./open"; | ... | @@ -55,8 +55,11 @@ import { Open } from "./open"; |
| 55 | import { ServerConfig } from "./config"; | 55 | import { ServerConfig } from "./config"; |
| 56 | import { GitCore } from "./git/Services/GitCore.ts"; | 56 | import { GitCore } from "./git/Services/GitCore.ts"; |
| 57 | import { tryHandleProjectFaviconRequest } from "./projectFaviconRoute"; | 57 | import { tryHandleProjectFaviconRequest } from "./projectFaviconRoute"; |
| 58 | import { normalizeAttachmentRelativePath, resolveAttachmentRelativePath } from "./attachmentPaths"; | 58 | import { |
| 59 | import { ATTACHMENTS_ROUTE_PREFIX } from "./imageMime.ts"; | 59 | ATTACHMENTS_ROUTE_PREFIX, |
| 60 | normalizeAttachmentRelativePath, | ||
| 61 | resolveAttachmentRelativePath, | ||
| 62 | } from "./attachmentPaths"; | ||
| 60 | 63 | ||
| 61 | /** | 64 | /** |
| 62 | * ServerShape - Service API for server lifecycle control. | 65 | * ServerShape - Service API for server lifecycle control. |