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 @@...@@ -1,6 +1,6 @@
1import path from "node:path";1import path from "node:path";
22
3import { ATTACHMENTS_ROUTE_PREFIX } from "./imageMime.ts";3export const ATTACHMENTS_ROUTE_PREFIX = "/attachments";
44
5export function normalizeAttachmentRelativePath(rawRelativePath: string): string | null {5export 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 @@
1import Mime from "@effect/platform-node/Mime";1import Mime from "@effect/platform-node/Mime";
22
3export const ATTACHMENTS_ROUTE_PREFIX = "/attachments";
4
5export const IMAGE_EXTENSION_BY_MIME_TYPE: Record<string, string> = {3export 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";
40import { attachmentRouteToRelativePath } from "../../attachmentPaths.ts";40import { ATTACHMENTS_ROUTE_PREFIX, attachmentRouteToRelativePath } from "../../attachmentPaths.ts";
41import {41import { inferImageExtension, parseBase64DataUrl } from "../../imageMime.ts";
42 ATTACHMENTS_ROUTE_PREFIX,
43 inferImageExtension,
44 parseBase64DataUrl,
45} from "../../imageMime.ts";
4642
47export const ORCHESTRATION_PROJECTOR_NAMES = {43export 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";
55import { ServerConfig } from "./config";55import { ServerConfig } from "./config";
56import { GitCore } from "./git/Services/GitCore.ts";56import { GitCore } from "./git/Services/GitCore.ts";
57import { tryHandleProjectFaviconRequest } from "./projectFaviconRoute";57import { tryHandleProjectFaviconRequest } from "./projectFaviconRoute";
58import { normalizeAttachmentRelativePath, resolveAttachmentRelativePath } from "./attachmentPaths";58import {
59import { ATTACHMENTS_ROUTE_PREFIX } from "./imageMime.ts";59 ATTACHMENTS_ROUTE_PREFIX,
60 normalizeAttachmentRelativePath,
61 resolveAttachmentRelativePath,
62} from "./attachmentPaths";
6063
61/**64/**
62 * ServerShape - Service API for server lifecycle control.65 * ServerShape - Service API for server lifecycle control.