From 2b5b82b465748b7fb0abdbf12a754c29dc5210c5 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Wed, 15 May 2024 17:07:34 -1000 Subject: [PATCH] fix: :bug: Fix all TypeScript issues --- .gitignore | 1 + bun.lockb | Bin 269316 -> 269316 bytes package.json | 5 +++-- packages/config-manager/config.type.ts | 11 +++++++++-- .../api/v1/instance/extended_description.ts | 2 +- utils/content_types.ts | 2 +- utils/response.ts | 2 +- 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 60a2b6a8..b378a2e4 100644 --- a/.gitignore +++ b/.gitignore @@ -182,3 +182,4 @@ glitch-dev *.pem oclif.manifest.json .direnv/ +tsconfig.tsbuildinfo \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index 0ccf05372d0ca6ed1346ab4081d675727f07cef6..10be65b827ca52eadb1e33c5324ff44b3fc94664 100755 GIT binary patch delta 30 icmZqKA<(izprM6v3zN!DHU= let lastModified = new Date(2024, 0, 0); const extended_description_file = Bun.file( - config.instance.extended_description_path, + config.instance.extended_description_path || "", ); if (await extended_description_file.exists()) { diff --git a/utils/content_types.ts b/utils/content_types.ts index 41bbf0c2..3899c42f 100644 --- a/utils/content_types.ts +++ b/utils/content_types.ts @@ -22,7 +22,7 @@ export const getBestContentType = ( }; export const urlToContentFormat = ( - url: string, + url?: string, ): typeof EntityValidator.$ContentFormat | null => { if (!url) return null; if (url.startsWith("https://api.dicebear.com/")) { diff --git a/utils/response.ts b/utils/response.ts index c75ccbbf..a8e755c5 100644 --- a/utils/response.ts +++ b/utils/response.ts @@ -72,7 +72,7 @@ export const redirect = (url: string | URL, status = 302) => { }); }; -export const proxyUrl = (url: string | null) => { +export const proxyUrl = (url: string | null = null) => { const urlAsBase64Url = Buffer.from(url || "").toString("base64url"); return url ? new URL(