diff --git a/apps/server/src/services/icon_packs.spec.ts b/apps/server/src/services/icon_packs.spec.ts index 915dc1c99..03f6bd9c5 100644 --- a/apps/server/src/services/icon_packs.spec.ts +++ b/apps/server/src/services/icon_packs.spec.ts @@ -2,7 +2,6 @@ import { buildNote } from "../test/becca_easy_mocking"; import { determineBestFontAttachment, generateCss, generateIconRegistry, IconPackManifest, processIconPack } from "./icon_packs"; const manifest: IconPackManifest = { - name: "Boxicons v2", prefix: "bx", icons: { "bx-ball": { @@ -33,6 +32,7 @@ describe("Processing icon packs", () => { it("processes manifest", () => { const iconPack = processIconPack(buildNote({ + title: "Boxicons v2", type: "text", content: JSON.stringify(manifest), attachments: [ defaultAttachment ] @@ -111,7 +111,6 @@ describe("Mapping attachments", () => { describe("CSS generation", () => { it("generates the CSS", () => { const manifest: IconPackManifest = { - name: "Boxicons v2", prefix: "bx", icons: { "bx-ball": { @@ -126,6 +125,7 @@ describe("CSS generation", () => { }; const processedResult = processIconPack(buildNote({ type: "text", + title: "Boxicons v2", content: JSON.stringify(manifest), attachments: [ { @@ -153,6 +153,7 @@ describe("CSS generation", () => { describe("Icon registery", () => { it("generates the registry", () => { const iconPack = processIconPack(buildNote({ + title: "Boxicons v2", type: "text", content: JSON.stringify(manifest), attachments: [ defaultAttachment ] diff --git a/apps/server/src/services/icon_packs.ts b/apps/server/src/services/icon_packs.ts index 09280f132..851ca92a7 100644 --- a/apps/server/src/services/icon_packs.ts +++ b/apps/server/src/services/icon_packs.ts @@ -19,7 +19,6 @@ const MIME_TO_CSS_FORMAT_MAPPINGS: Record { if (!id || !terms) return null; @@ -53,7 +53,7 @@ export function generateIconRegistry(iconPacks: ProcessResult[]): IconRegistry { sources.push({ prefix: manifest.prefix, - name: manifest.name, + name: manifestNote.title, icons }); } @@ -77,7 +77,8 @@ export function processIconPack(iconPackNote: BNote): ProcessResult | undefined return { manifest, fontMime: attachment.mime, - fontAttachmentId: attachment.attachmentId + fontAttachmentId: attachment.attachmentId, + manifestNote: iconPackNote }; }