authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-02-28 23:16:03-08:00
committergravatar for jmarminge@gmail.comJulius Marminge <jmarminge@gmail.com> 2026-03-01 20:06:21-08:00
logac0e720de19e452b75cd1a13cb576b0dec242721
tree8993ba2f4c1a7cb0966c550ebe7d3dd10078de86
parent5144d32b771cb64c7e6e7aa0d109e480a4382a01

fine there


4 files changed, 8 insertions(+), 11 deletions(-)

apps/server/src/attachmentPaths.ts+1-1
......@@ -1,6 +1,6 @@
11import path from "node:path";
22
3import { ATTACHMENTS_ROUTE_PREFIX } from "./imageMime.ts";
3export const ATTACHMENTS_ROUTE_PREFIX = "/attachments";
44
55export function normalizeAttachmentRelativePath(rawRelativePath: string): string | null {
66 const normalized = path.normalize(rawRelativePath).replace(/^[/\\]+/, "");
apps/server/src/imageMime.ts-2
......@@ -1,7 +1,5 @@
11import Mime from "@effect/platform-node/Mime";
22
3export const ATTACHMENTS_ROUTE_PREFIX = "/attachments";
4
53export const IMAGE_EXTENSION_BY_MIME_TYPE: Record<string, string> = {
64 "image/avif": ".avif",
75 "image/bmp": ".bmp",
apps/server/src/orchestration/Layers/ProjectionPipeline.ts+2-6
......@@ -37,12 +37,8 @@ import {
3737 OrchestrationProjectionPipeline,
3838 type OrchestrationProjectionPipelineShape,
3939} from "../Services/ProjectionPipeline.ts";
40import { attachmentRouteToRelativePath } from "../../attachmentPaths.ts";
41import {
42 ATTACHMENTS_ROUTE_PREFIX,
43 inferImageExtension,
44 parseBase64DataUrl,
45} from "../../imageMime.ts";
40import { ATTACHMENTS_ROUTE_PREFIX, attachmentRouteToRelativePath } from "../../attachmentPaths.ts";
41import { inferImageExtension, parseBase64DataUrl } from "../../imageMime.ts";
4642
4743export const ORCHESTRATION_PROJECTOR_NAMES = {
4844 projects: "projection.projects",
apps/server/src/wsServer.ts+5-2
......@@ -55,8 +55,11 @@ import { Open } from "./open";
5555import { ServerConfig } from "./config";
5656import { GitCore } from "./git/Services/GitCore.ts";
5757import { tryHandleProjectFaviconRequest } from "./projectFaviconRoute";
58import { normalizeAttachmentRelativePath, resolveAttachmentRelativePath } from "./attachmentPaths";
59import { ATTACHMENTS_ROUTE_PREFIX } from "./imageMime.ts";
58import {
59 ATTACHMENTS_ROUTE_PREFIX,
60 normalizeAttachmentRelativePath,
61 resolveAttachmentRelativePath,
62} from "./attachmentPaths";
6063
6164/**
6265 * ServerShape - Service API for server lifecycle control.